emacs-diffs
[Top][All Lists]
Advanced

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

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


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

branch: xwidget_mvp
commit 40919702dfbd91b5e48bf1d248447ad1e39063f1
Merge: f569bd4 91718f5
Author: Joakim Verona <address@hidden>
Commit: Joakim Verona <address@hidden>

    Merge remote-tracking branch 'origin/master' into xwidget_mvp
---
 .gitignore                           |    8 +-
 ChangeLog.2                          | 3204 +++++++++++++++++++++++++++++++++-
 INSTALL                              |   13 +-
 Makefile.in                          |   39 +-
 admin/admin.el                       |    6 +-
 admin/charsets/cp51932.awk           |    2 +-
 admin/charsets/eucjp-ms.awk          |    2 +-
 admin/gitmerge.el                    |    3 +
 admin/merge-gnulib                   |    8 +-
 admin/unidata/BidiBrackets.txt       |    6 +-
 admin/unidata/BidiMirroring.txt      |   10 +-
 admin/unidata/Blocks.txt             |  298 ++++
 admin/unidata/Makefile.in            |   16 +-
 admin/unidata/README                 |    4 +
 admin/unidata/UnicodeData.txt        | 2161 ++++++++++++++++++++++--
 admin/unidata/blocks.awk             |  225 +++
 admin/update_autogen                 |    2 +-
 build-aux/gitlog-to-changelog        |   43 +-
 build-aux/gitlog-to-emacslog         |   31 +-
 build-aux/update-copyright           |    2 +-
 build-aux/update-subdirs             |    1 +
 configure.ac                         |   43 +-
 doc/emacs/arevert-xtra.texi          |    7 +-
 doc/emacs/basic.texi                 |   39 +-
 doc/emacs/buffers.texi               |   12 +-
 doc/emacs/calendar.texi              |  175 +-
 doc/emacs/display.texi               |   29 +-
 doc/emacs/emacs.texi                 |    2 +-
 doc/emacs/files.texi                 |   14 +-
 doc/emacs/fixit.texi                 |   14 +-
 doc/emacs/frames.texi                |   43 +-
 doc/emacs/help.texi                  |   10 +-
 doc/emacs/killing.texi               |    6 +-
 doc/emacs/mule.texi                  |    7 +-
 doc/emacs/package.texi               |    4 +-
 doc/emacs/search.texi                |   12 +-
 doc/emacs/text.texi                  |    5 +-
 doc/emacs/trouble.texi               |    4 -
 doc/emacs/windows.texi               |   18 +-
 doc/lispintro/emacs-lisp-intro.texi  |   10 +-
 doc/lispref/display.texi             |   19 +-
 doc/lispref/frames.texi              |   13 +
 doc/lispref/hash.texi                |    8 -
 doc/lispref/help.texi                |   29 +-
 doc/lispref/nonascii.texi            |   35 +-
 doc/lispref/os.texi                  |   80 +-
 doc/lispref/sequences.texi           |   34 +
 doc/lispref/text.texi                |    8 +-
 doc/lispref/tips.texi                |   20 +-
 doc/lispref/variables.texi           |    4 +-
 doc/lispref/windows.texi             |   34 +-
 doc/misc/autotype.texi               |    6 -
 doc/misc/cl.texi                     |   15 +-
 doc/misc/efaq-w32.texi               |   31 +-
 doc/misc/gnus.texi                   |    4 +
 doc/misc/texinfo.tex                 |   94 +-
 doc/misc/tramp.texi                  |   74 +-
 doc/misc/trampver.texi               |    2 +-
 etc/DEBUG                            |  277 ++-
 etc/NEWS                             |  144 ++-
 etc/tutorials/TUTORIAL.cn            |   13 +-
 etc/tutorials/TUTORIAL.ja            |    4 +-
 leim/Makefile.in                     |    2 +
 lib-src/Makefile.in                  |    2 +-
 lib/acl-internal.c                   |    7 +
 lib/acl-internal.h                   |   18 +-
 lib/get-permissions.c                |   99 +-
 lib/gnulib.mk                        |   45 +-
 lib/readlinkat.c                     |   18 +
 lib/set-permissions.c                |   74 +-
 lib/stdio.in.h                       |    3 +-
 lib/strftime.c                       |   72 +-
 lib/strftime.h                       |    7 +-
 lib/time-internal.h                  |   49 +
 lib/time.in.h                        |   27 +-
 lib/time_rz.c                        |  324 ++++
 lib/timegm.c                         |   38 +
 lisp/Makefile.in                     |  122 +-
 lisp/allout.el                       |    4 +-
 lisp/apropos.el                      |    3 +-
 lisp/arc-mode.el                     |    4 +-
 lisp/autorevert.el                   |  115 +-
 lisp/bindings.el                     |    2 +-
 lisp/calc/calc-help.el               |   34 +-
 lisp/calc/calc-misc.el               |    4 +-
 lisp/calc/calc-store.el              |    3 +-
 lisp/calendar/appt.el                |    4 +-
 lisp/calendar/cal-bahai.el           |    8 +-
 lisp/calendar/calendar.el            |    7 +-
 lisp/calendar/diary-lib.el           |    4 +-
 lisp/calendar/icalendar.el           |    8 +-
 lisp/calendar/todo-mode.el           |   12 +-
 lisp/cedet/ede.el                    |   16 +
 lisp/cedet/mode-local.el             |   18 +-
 lisp/cedet/semantic/symref/grep.el   |    2 +-
 lisp/cedet/srecode/srt-mode.el       |    4 +-
 lisp/character-fold.el               |  132 ++
 lisp/cmuscheme.el                    |    2 +-
 lisp/cus-dep.el                      |    2 +-
 lisp/cus-start.el                    |   12 +-
 lisp/cus-theme.el                    |    4 +-
 lisp/descr-text.el                   |   12 +-
 lisp/dired-x.el                      |  141 +-
 lisp/dired.el                        |   16 +-
 lisp/elec-pair.el                    |    2 +-
 lisp/electric.el                     |    2 +-
 lisp/emacs-lisp/advice.el            |   10 +-
 lisp/emacs-lisp/autoload.el          |  294 ++--
 lisp/emacs-lisp/byte-opt.el          |    2 +-
 lisp/emacs-lisp/bytecomp.el          |    4 +-
 lisp/emacs-lisp/check-declare.el     |    6 +-
 lisp/emacs-lisp/checkdoc.el          |   70 +-
 lisp/emacs-lisp/cl-extra.el          |  184 ++-
 lisp/emacs-lisp/cl-generic.el        |  110 +-
 lisp/emacs-lisp/cl-indent.el         |    1 +
 lisp/emacs-lisp/cl-lib.el            |   15 +-
 lisp/emacs-lisp/cl-macs.el           |   24 +-
 lisp/emacs-lisp/cl-preloaded.el      |    8 +-
 lisp/emacs-lisp/debug.el             |    6 +-
 lisp/emacs-lisp/derived.el           |    7 +-
 lisp/emacs-lisp/easy-mmode.el        |   62 +-
 lisp/emacs-lisp/eieio-base.el        |   53 +-
 lisp/emacs-lisp/eieio-compat.el      |    2 +-
 lisp/emacs-lisp/eieio-core.el        |  128 +-
 lisp/emacs-lisp/eieio-opt.el         |  168 +--
 lisp/emacs-lisp/eieio.el             |   27 +-
 lisp/emacs-lisp/eldoc.el             |    2 +-
 lisp/emacs-lisp/find-func.el         |   52 +-
 lisp/emacs-lisp/generator.el         |    2 +-
 lisp/emacs-lisp/gv.el                |   57 +-
 lisp/{ => emacs-lisp}/let-alist.el   |    8 +-
 lisp/emacs-lisp/lisp-mode.el         |   15 +-
 lisp/emacs-lisp/macroexp.el          |   99 +-
 lisp/emacs-lisp/map.el               |  371 ++++
 lisp/emacs-lisp/nadvice.el           |    7 +-
 lisp/emacs-lisp/package.el           |  314 +++--
 lisp/emacs-lisp/pcase.el             |   29 +-
 lisp/emacs-lisp/seq.el               |   22 +-
 lisp/emacs-lisp/tabulated-list.el    |    8 +-
 lisp/emacs-lisp/warnings.el          |  166 +-
 lisp/epg-config.el                   |    5 +
 lisp/epg.el                          |   14 +
 lisp/erc/erc.el                      |    5 +-
 lisp/face-remap.el                   |    2 +-
 lisp/faces.el                        |   30 +-
 lisp/ffap.el                         |   27 +-
 lisp/files-x.el                      |    7 +
 lisp/files.el                        |   20 +-
 lisp/finder.el                       |    6 +-
 lisp/frame.el                        |  116 ++
 lisp/gnus/gnus-art.el                |    8 +-
 lisp/gnus/gnus-group.el              |    4 +-
 lisp/gnus/gnus-registry.el           |    2 +-
 lisp/gnus/nnimap.el                  |   39 +-
 lisp/gnus/nnmaildir.el               |  121 +-
 lisp/gnus/sieve-mode.el              |    3 +-
 lisp/help-fns.el                     |  199 ++-
 lisp/help-mode.el                    |  101 +-
 lisp/help.el                         |   46 +-
 lisp/ido.el                          |   17 +-
 lisp/info.el                         |   72 +-
 lisp/international/characters.el     |  220 +---
 lisp/international/fontset.el        |   94 +-
 lisp/international/mule-cmds.el      |   26 +-
 lisp/international/mule-util.el      |  186 ++-
 lisp/international/titdic-cnv.el     |    4 +-
 lisp/isearch.el                      |   60 +-
 lisp/kermit.el                       |    2 +-
 lisp/ldefs-boot.el                   |  434 +++--
 lisp/leim/quail/lrt.el               |    4 +-
 lisp/loadup.el                       |    4 +-
 lisp/ls-lisp.el                      |   12 +-
 lisp/macros.el                       |   10 +-
 lisp/menu-bar.el                     |   99 +-
 lisp/mh-e/mh-comp.el                 |    2 +-
 lisp/minibuffer.el                   |    4 +-
 lisp/mouse-drag.el                   |    2 +
 lisp/mouse.el                        |   39 +-
 lisp/net/newst-treeview.el           |   97 +-
 lisp/net/pinentry.el                 |  397 +++++
 lisp/net/rcirc.el                    |    5 +-
 lisp/net/tramp-adb.el                |    6 +-
 lisp/net/tramp-cache.el              |   33 +-
 lisp/net/tramp-gvfs.el               |  244 ++--
 lisp/net/tramp-gw.el                 |    7 +-
 lisp/net/tramp-sh.el                 |  159 +-
 lisp/net/tramp.el                    |   73 +-
 lisp/net/trampver.el                 |    4 +-
 lisp/obsolete/bruce.el               |    2 +-
 lisp/obsolete/keyswap.el             |    2 +-
 lisp/{play => obsolete}/landmark.el  |    3 +
 lisp/obsolete/longlines.el           |   11 +-
 lisp/obsolete/otodo-mode.el          |    2 +-
 lisp/obsolete/patcomp.el             |    2 +-
 lisp/obsolete/vc-arch.el             |    2 +-
 lisp/progmodes/cfengine.el           |   66 +-
 lisp/progmodes/compile.el            |   12 +-
 lisp/progmodes/elisp-mode.el         |   53 +-
 lisp/progmodes/etags.el              |   22 +-
 lisp/progmodes/executable.el         |    8 +-
 lisp/progmodes/f90.el                |   10 +-
 lisp/progmodes/flymake.el            |    2 +-
 lisp/progmodes/fortran.el            |   12 +-
 lisp/progmodes/grep.el               |   52 +-
 lisp/progmodes/inf-lisp.el           |    4 +-
 lisp/progmodes/js.el                 |    4 +-
 lisp/progmodes/make-mode.el          |    2 +-
 lisp/progmodes/octave.el             |    4 +-
 lisp/progmodes/perl-mode.el          |   36 +-
 lisp/progmodes/prog-mode.el          |   66 +
 lisp/progmodes/project.el            |  144 ++
 lisp/progmodes/python.el             |  408 +++--
 lisp/progmodes/sh-script.el          |   13 +-
 lisp/progmodes/vhdl-mode.el          |    2 +-
 lisp/progmodes/xref.el               |  357 +++-
 lisp/replace.el                      |   15 +-
 lisp/ruler-mode.el                   |    2 +
 lisp/server.el                       |    6 +
 lisp/shell.el                        |   25 +-
 lisp/simple.el                       |   17 +-
 lisp/skeleton.el                     |   17 +-
 lisp/startup.el                      |   81 +-
 lisp/subr.el                         |   36 +-
 lisp/term/ns-win.el                  |    9 +-
 lisp/term/pc-win.el                  |    2 +-
 lisp/term/w32console.el              |    2 +-
 lisp/term/xterm.el                   |   74 +-
 lisp/textmodes/artist.el             |    3 +
 lisp/textmodes/flyspell.el           |   23 +-
 lisp/textmodes/page-ext.el           |   17 +-
 lisp/textmodes/reftex-vars.el        |    4 +-
 lisp/textmodes/sgml-mode.el          |   14 +-
 lisp/textmodes/texinfmt.el           |    2 +-
 lisp/textmodes/texnfo-upd.el         |    2 +-
 lisp/thingatpt.el                    |   49 +-
 lisp/time-stamp.el                   |   12 +-
 lisp/time.el                         |   35 +-
 lisp/tmm.el                          |    2 +-
 lisp/vc/add-log.el                   |   23 +-
 lisp/vc/compare-w.el                 |    5 +-
 lisp/vc/ediff-help.el                |   82 +-
 lisp/vc/log-edit.el                  |    3 +-
 lisp/vc/vc-git.el                    |    4 +-
 lisp/vc/vc-hg.el                     |    2 +-
 lisp/vc/vc-mtn.el                    |   26 +-
 lisp/vc/vc-rcs.el                    |    4 +-
 lisp/vc/vc-svn.el                    |   16 +-
 lisp/vc/vc.el                        |    8 +-
 lisp/version.el                      |   57 +-
 lisp/whitespace.el                   |    1 +
 lisp/wid-edit.el                     |    2 +-
 lisp/window.el                       |  126 +-
 lwlib/Makefile.in                    |    3 +-
 m4/acl.m4                            |   24 +-
 m4/gnulib-common.m4                  |    4 +-
 m4/gnulib-comp.m4                    |   44 +-
 m4/pthread_sigmask.m4                |   26 +-
 m4/readlinkat.m4                     |   18 +-
 m4/sys_time_h.m4                     |    1 +
 m4/time_h.m4                         |    1 +
 m4/time_rz.m4                        |   21 +
 m4/timegm.m4                         |   26 +
 nextstep/INSTALL                     |    2 +
 nextstep/Makefile.in                 |   29 +-
 nextstep/templates/Info.plist.in     |   88 +
 nt/README                            |   16 +-
 nt/README.W32                        |   17 +-
 nt/gnulib.mk                         |   88 +-
 nt/inc/ms-w32.h                      |   12 -
 nt/mingw-cfg.site                    |    5 +
 nt/runemacs.c                        |   17 +-
 src/.gdbinit                         |    3 -
 src/ChangeLog.12                     |    2 +-
 src/ChangeLog.13                     |    2 +-
 src/Makefile.in                      |   12 +-
 src/alloc.c                          |   61 +-
 src/atimer.c                         |   22 +-
 src/bidi.c                           |    2 +-
 src/buffer.c                         |   72 +-
 src/coding.c                         |   18 +-
 src/composite.c                      |    6 +-
 src/conf_post.h                      |    7 +
 src/data.c                           |    2 +-
 src/dispextern.h                     |    9 +-
 src/dispnew.c                        |   12 +-
 src/doc.c                            |   71 +-
 src/editfns.c                        |  351 +++--
 src/emacs.c                          |   16 +-
 src/eval.c                           |    8 +
 src/fileio.c                         |    4 +-
 src/fns.c                            |   30 +-
 src/font.c                           |   53 +-
 src/fontset.c                        |   77 +-
 src/frame.c                          |   10 +-
 src/ftcrfont.c                       |    4 +-
 src/ftfont.c                         |   20 +-
 src/gnutls.c                         |    2 +-
 src/image.c                          |    4 +-
 src/indent.c                         |   13 +-
 src/keyboard.c                       |  180 +-
 src/keyboard.h                       |   30 +-
 src/keymap.c                         |   12 +-
 src/lisp.h                           |   14 +-
 src/macfont.m                        |  223 ++-
 src/nsfns.m                          |   80 +-
 src/nsterm.m                         |    9 +-
 src/print.c                          |   17 +-
 src/process.c                        |  335 ++--
 src/profiler.c                       |   25 +-
 src/scroll.c                         |   63 +-
 src/syntax.c                         |    3 +-
 src/sysdep.c                         |   94 +-
 src/syssignal.h                      |    6 +
 src/systime.h                        |   14 -
 src/termhooks.h                      |    5 +-
 src/w32fns.c                         |  124 +-
 src/w32font.c                        |   25 +-
 src/w32heap.c                        |   20 +-
 src/w32proc.c                        |  120 ++-
 src/w32term.c                        |   33 +-
 src/xdisp.c                          |  275 +++-
 src/xfns.c                           |   71 +-
 src/xftfont.c                        |   22 +-
 src/xselect.c                        |   54 +-
 src/xsmfns.c                         |    9 +
 src/xterm.c                          |   31 +-
 src/xterm.h                          |   20 +-
 test/BidiCharacterTest.txt           |    6 +-
 test/automated/Makefile.in           |    2 +-
 test/automated/auto-revert-tests.el  |  210 +++
 test/automated/bytecomp-tests.el     |    8 +-
 test/automated/eieio-test-persist.el |    4 +-
 test/automated/eieio-tests.el        |    2 +-
 test/automated/elisp-mode-tests.el   |   15 +-
 test/automated/ert-tests.el          |    2 +
 test/automated/ert-x-tests.el        |    4 +-
 test/automated/f90.el                |   26 +
 test/automated/file-notify-tests.el  |   29 +-
 test/automated/help-fns.el           |   23 +
 test/automated/icalendar-tests.el    |   10 +
 test/automated/let-alist.el          |   13 +
 test/automated/map-tests.el          |  326 ++++
 test/automated/package-test.el       |   38 +-
 test/automated/python-tests.el       |  222 +++-
 test/automated/seq-tests.el          |    5 +
 test/automated/subr-tests.el         |   24 +-
 test/automated/tramp-tests.el        |  306 +++-
 test/automated/vc-tests.el           |   14 +-
 test/indent/perl.perl                |    8 +
 349 files changed, 16213 insertions(+), 4816 deletions(-)

diff --git a/.gitignore b/.gitignore
index d7be846..1e2f206 100644
--- a/.gitignore
+++ b/.gitignore
@@ -195,6 +195,7 @@ admin/charsets/jisx2131-filter
 admin/unidata/unidata.txt
 etc/charsets/*.map
 lisp/international/charprop.el
+lisp/international/charscript.el
 lisp/international/cp51932.el
 lisp/international/eucjp-ms.el
 lisp/international/uni-*.el
@@ -208,8 +209,6 @@ lisp/international/uni-*.el
 *.dvi
 *.fn
 *.fns
-doc/*/*.html
-!test/etags/html-src/*.html
 *.info
 *.ky
 *.kys
@@ -224,7 +223,6 @@ doc/*/*.html
 *.pgs
 *.pj
 *.pjs
-doc/*/*.ps
 *.sc
 *.scs
 *.t2d/
@@ -235,6 +233,10 @@ doc/*/*.ps
 *.tps
 *.vr
 *.vrs
+doc/*/*.html
+doc/*/*/*.html
+doc/*/*.ps
+doc/*/*/*.ps
 doc/emacs/emacsver.texi
 doc/man/emacs.1
 doc/misc/cc-mode.ss
diff --git a/ChangeLog.2 b/ChangeLog.2
index 115ccda..c4bb659 100644
--- a/ChangeLog.2
+++ b/ChangeLog.2
@@ -1,3 +1,3178 @@
+2015-07-26  HOSOYA Kei  <address@hidden>  (tiny change)
+
+       * etc/tutorials/TUTORIAL.ja: Improve translation.
+
+2015-07-25  Eli Zaretskii  <address@hidden>
+
+       Avoid crashes when w32 GUI functions are called in -batch
+       * src/w32fns.c (Fx_frame_geometry, Fw32_frame_rect)
+       (Fw32_frame_menu_bar_size, Fw32_send_sys_command): Don't call
+       FRAME_W32_WINDOW for initial frame.  (Bug#21132)
+
+       Fix flyspell-check-previous-highlighted-word
+       * lisp/textmodes/flyspell.el
+       (flyspell-check-previous-highlighted-word): Really accept a
+       numeric argument, as the doc string describes.  Fix an off-by-one
+       error in looking up overlays, so invocation with point immediately
+       after a word would check that word.  Clarify the doc string as
+       Suggested by N. Jackson <address@hidden>.  (Bug#21129)
+
+2015-07-24  Michael Albinus  <address@hidden>
+
+       Minor cleanup in tramp-tests.el
+       * test/automated/tramp-tests.el (tramp-test31-*, tramp-test32-*):
+       Implement using the documented interface
+       `tramp-connection-properties', rather than with internal functions.
+
+2015-07-24  Harald Hanche-Olsen  <address@hidden>  (tiny change)
+
+       Pass lambdas to `skeleton-read'
+       * lisp/skeleton.el (skeleton-read): Allow PROMPT to be a function.
+       * lisp/textmodes/sgml-mode.el (sgml-attributes, sgml-value): Pass
+       lambdas to `skeleton-read' (bug#20386).
+
+2015-07-24  Eli Zaretskii  <address@hidden>
+
+       * INSTALL (DETAILED BUILDING AND INSTALLATION): Mention 
--without-imagemagick.
+
+       Don't require GUI frames and mouse for Flyspell menus
+       * lisp/textmodes/flyspell.el (flyspell-correct-word-before-point)
+       (flyspell-emacs-popup): Require neither a GUI frame nor mouse
+       support, since pop-up menus work with text terminals and can be
+       controlled via the keyboard.
+
+       Improve documentation of Flyspell commands
+       * doc/emacs/fixit.texi (Spelling): Mention Flyspell commands that
+       can be invoked via the keyboard.  Mention those commands by name
+       and add them to the fn index.  (Bug#21125)
+
+2015-07-23  Michael Albinus  <address@hidden>
+
+       Fix some Tramp problems with HP-UX
+       * lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
+       Add "tab0" to stty call.
+       * test/automated/tramp-tests.el (tramp-persistency-file-name):
+       Set to nil.
+       (tramp--test-hpux-p): New defun.
+       (tramp--test-utf8): Use it.
+
+2015-07-22  Glenn Morris  <address@hidden>
+
+       * build-aux/update-subdirs: Put "no-update-autoloads: t" in output.
+
+2015-07-22  Eli Zaretskii  <address@hidden>
+
+       Fix point positioning in ffap-next-guess
+       * lisp/ffap.el (ffap-url-at-point): Set ffap-string-at-point-region,
+       as our callers expect.  This was clobbered as part of fixing
+       bug#5673.  (Bug#21107)
+       (ffap-gopher-at-point): Set ffap-string-at-point-region.
+
+2015-07-22  Martin Rudalics  <address@hidden>
+
+       Fix customization type of `even-window-sizes'.
+       * lisp/window.el (even-window-sizes): Fix customization type.
+
+       2015-07-22  Martin Rudalics  <address@hidden>
+       Optionally even widths of `display-buffer' windows.  (Bug#21100)
+       * lisp/window.el (quit-restore-window): Restore width if
+       requested.
+       (display-buffer-record-window): Record width when window is
+       reused and horizontally combined.
+       (even-window-sizes): New option to allow evening window widths.
+       (even-window-heights): Defalias to `even-window-sizes'.
+       (window--even-window-heights): Rename to
+       `window--even-window-sizes'.  Handle side-by-side windows.
+       (display-buffer-use-some-window): Call `window--even-window-sizes'
+       instead of `window--even-window-heights'.
+       * lisp/help.el (resize-temp-buffer-window): Fix indentation.
+       * doc/lispref/windows.texi (Choosing Window Options): Describe
+       `even-window-sizes'.
+       (Coordinates and Windows): Fix typo.
+
+2015-07-22  Stephen Leake  <address@hidden>
+
+       add file name to autoload error messages.
+       * lisp/emacs-lisp/autoload.el (autoload-save-buffers): add 
condition-case
+         to add file name to error message.
+
+2015-07-22  Michael Albinus  <address@hidden>
+
+       Use 0.0.0.1 as test host in Tramp
+       * lisp/net/tramp-sh.el (tramp-ssh-controlmaster-options):
+       Use 0.0.0.1 as test host.
+
+2015-07-21  Stefan Monnier  <address@hidden>
+
+       (advice--called-interactively-skip): Fix inf-loop (bug#21083)
+       * lisp/emacs-lisp/nadvice.el (advice--called-interactively-skip):
+       Fix inf-loop (bug#21083).
+
+2015-07-21  Glenn Morris  <address@hidden>
+
+       * test/automated/package-test.el (package-test-signed):
+       Update for recent changes.
+
+       * test/automated/elisp-mode-tests.el
+       (elisp-xref-finds-both-function-and-variable)
+       (elisp-xref-finds-only-function-for-minor-mode):
+       Update for recent xref name changes.
+
+2015-07-21  Dmitry Gutov  <address@hidden>
+
+       Make eldoc timer non-repeatable
+       * lisp/emacs-lisp/eldoc.el (eldoc-schedule-timer): Make the timer
+       non-repeatable.  Since it's on post-command hook, that just wasted
+       CPU cycles.
+
+2015-07-21  Michael Albinus  <address@hidden>
+
+       Mention `tramp-connection-properties' in NEWS
+
+       Sync with Tramp repository
+       * doc/misc/tramp.texi (Configuration): Note, that Tramp must be
+       required prior changing its configuration.
+       (Connection caching, Predefined connection information)
+       (Remote shell setup): Fix typos.
+       (Predefined connection information): Describe, how to overwrite
+       parameters of `tramp-methods'.
+       (Remote programs, Remote processes, Traces and Profiles):
+       Simplify example.
+       (Remote programs): Remove superfluous comment.
+       * doc/misc/trampver.texi: Update release number.
+       * lisp/net/tramp-cache.el (tramp-connection-properties): Adapt 
docstring.
+       * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file): New defun.
+       (tramp-gvfs-handle-copy-file, tramp-gvfs-handle-rename-file): Use it.
+       (tramp-gvfs-handle-make-directory): Reimplement PARENTS handling,
+       "gvfs-mkdir -p ..." does not work robust.
+       (tramp-gvfs-maybe-open-connection): Adapt `tramp-get-method-parameter' 
call.
+       * lisp/net/tramp-sh.el (tramp-methods):
+       Add `tramp-remote-shell-login' parameter where it fits.
+       (tramp-get-remote-path): Use it.
+       (tramp-make-copy-program-file-name): Fix quoting for "psftp" method.
+       (all): Adapt `tramp-get-method-parameter' calls.
+       * lisp/net/tramp.el (tramp-methods): Adapt docstring.
+       (tramp-get-method-parameter): Replace argument METHOD by VEC.
+       Check also for hits in `tramp-connection-properties'.  Adapt docstring.
+       (tramp-get-remote-tmpdir): Cache only the local name of tmpdir.
+       (all): Adapt `tramp-get-method-parameter' calls.
+       * lisp/net/trampver.el Update release number.
+       * test/automated/tramp-tests.el (tramp--instrument-test-case):
+       Add "^make-symbolic-link not supported$" to `debug-ignored-errors'.
+       (tramp-test13-make-directory, tramp--test-adb-p)
+       (tramp--test-smb-or-windows-nt-p): Simplify.
+       (tramp--test-ftp-p, tramp--test-gvfs-p): New defuns.
+       (tramp--test-special-characters): Fix docstring.  Add gvfs and ftp 
tests.
+       (tramp--test-utf8): Fix docstring.
+
+2015-07-20  Dmitry Gutov  <address@hidden>
+
+       Add new xref-query-replace command
+       * lisp/progmodes/xref.el (xref--match-buffer-bounds): New
+       function, extracted from xref-pulse-momentarily.
+       (xref-query-replace): New command.
+       (xref--query-replace-1): New helper function.
+       (xref--xref-buffer-mode-map): Add `r' binding.
+
+2015-07-20  Paul Eggert  <address@hidden>
+
+       Simplify icalendar decoding of Z dates
+       * lisp/calendar/icalendar.el (icalendar--decode-isodatetime):
+       Simplify calculation of time strings with trailing "Z".
+
+2015-07-19  Dmitry Gutov  <address@hidden>
+
+       Do not corrupt grep-find-ignored-files
+       * lisp/progmodes/project.el (project-ignores): Change the order of
+       the arguments to nconc, in order not to corrupt grep-find-ignored-files.
+
+       Add xref-match-item, and use it
+       * lisp/progmodes/xref.el (xref-match-bounds): New generic function.
+       (xref-file-location): Add reader for the column slot.
+       (xref-match-item): New class.
+       (xref-match-bounds): A method implementation for it.
+       (xref-make-match): New constructor function.
+       (xref--current-item): New private variable.
+       (xref-pulse-momentarily): Use it.
+       (xref--pop-to-location): Change the first argument to an xref
+       item, instead of location, bind xref--current-item.
+       Update all callers.
+       (xref-next-line, xref-prev-line, xref--next-error-function)
+       (xref--mouse-2): Look for the property `xref-item',
+       instead of `xref-location'.
+       (xref--item-at-point): Likewise.  This function replaces
+       `xref-location-at-point'.  Update all callers.
+       (xref--insert-xrefs): Add the `xref-item' text property, instead
+       of `xref-location'.
+       (xref--collect-match): Use xref-make-match.
+
+       Rename xref--xref to xref-item
+       * lisp/progmodes/xref.el (xref-item): Rename from `xref--xref'.
+       Update all references.
+
+       Rename xref description slot to summary
+       * lisp/progmodes/xref.el (xref--xref): Rename the `description'
+       slot to `summary'.
+
+       vc-hg: Perform the print-log call asynchronously
+       * lisp/vc/vc-hg.el (vc-hg-print-log): Perform the call
+       asynchronously (bug#21067).
+
+       Add xref-after-jump-hook and xref-after-return-hook
+       * lisp/progmodes/xref.el (xref-after-jump-hook)
+       (xref-after-return-hook): New hooks.
+       (xref-pulse-on-jump): Remove, in favor of the above.
+       (xref-pulse-momentarily): Rename from xref--maybe-pulse.
+       (xref--pop-to-location, xref--display-position)
+       (xref-pop-marker-stack): Use the new hooks, as requested in
+       http://lists.gnu.org/archive/html/emacs-devel/2015-07/msg00213.html
+
+2015-07-19  Bozhidar Batsov  <address@hidden>
+
+       Correct js-mode's lighter
+       * lisp/progmodes/js.el (js-mode): Correct the lighter.
+
+2015-07-19  Leo Liu  <address@hidden>
+
+       Fix a bug in cfengine3-mode
+       * progmodes/cfengine.el (cfengine3-mode): Handle nil
+         eldoc-documentation-function.
+
+2015-07-18  Julien Danjou  <address@hidden>
+
+       sieve-mode: support "body" test command
+       * lisp/gnus/sieve-mode.el (sieve-font-lock-keywords):
+       Add missing "body" test command.
+
+2015-07-18  Eli Zaretskii  <address@hidden>
+
+       Fix info-apropos when the default encoding is Latin-N
+       * lisp/info.el (Info-find-node-2): Reset the buffer's encoding to
+       'undecided', so that it is set to the encoding of the Info file we
+       are about to insert.  Otherwise, 'info-apropos' will fail to find
+       some index nodes in some UTF-8 encoded files, if the buffer's
+       previous encoding is Latin-N or some such.
+
+2015-07-18  Ivan Andrus  <address@hidden>
+
+       * epg.el (epg--start): Check that gpgconf can be found before calling 
it.
+
+       Expose more file types to OS X that Emacs understands.
+       * Cocoa/Emacs.base/Contents/Info.plist: Add editor role for sty, dtx,
+       json, and org files.  Export UTIs for el, elc, and org files.
+
+2015-07-18  Eli Zaretskii  <address@hidden>
+
+       Fix visual-order cursor movement when lines are truncated
+       * src/xdisp.c (Fmove_point_visually): When lines are truncated,
+       simulate display in a window of infinite width, to allow move_it_*
+       functions reach positions outside of normal window dimensions.
+       Remove code that tried to handle a subset of these situations by
+       manual iteration of buffer text.  (Bug#17777)
+
+       Fix following Info cross-references to anchors
+       * lisp/info.el (Info-read-subfile): Add to the returned value the
+       length of subfile preamble, after converting it to file's byte
+       offset, as expected by the caller.  Use bufferpos-to-filepos.
+       (Info-find-node-2): If searching for a node with a
+       1000-character slop fails, try again with a 10000-character slop,
+       to account for known bugs in Texinfo 5.0 and 5.1.  (Bug#21055)
+       * lisp/international/mule-util.el (bufferpos-to-filepos): New
+       function.
+       * etc/NEWS: Mention bufferpos-to-filepos.
+
+       Fix scrolling backwards on TTY frames under scroll-conservatively
+       * src/xdisp.c (move_it_vertically_backward): Fix off-by-one error
+       in moving backwards on TTY frames.  (Bug#21080)
+
+2015-07-17  Dmitry Gutov  <address@hidden>
+
+       Consider a jsdoc tag to be a beginning of a paragraph as well
+       * lisp/progmodes/js.el (js-mode): Change c-paragraph-start to
+       consider a jsdoc tag to be a beginning of a paragraph as well.
+
+2015-07-17  Artur Malabarba  <address@hidden>
+
+       * lisp/emacs-lisp/package.el: Fix warnings
+
+       * lisp/emacs-lisp/package.el (package-buffer-info):
+       Add author and maintainers to `package-buffer-info'.
+
+       * lisp/emacs-lisp/package.el: Many small changes
+       Replace all instances of 'face with 'font-lock-face.
+       (describe-package-1): Improve some strings and move the summary up the
+       list.
+       (package-install-file): Update docstring.
+       (package-menu-hide-package): Bind to `H'.
+
+       * lisp/emacs-lisp/package.el (package--with-work-buffer-async):
+       Fix error handling.
+
+2015-07-17  Paul Eggert  <address@hidden>
+
+       Fix hang with large yanks This should fix the bug fixed by Mike
+       Crowe's patch in:
+       https://lists.gnu.org/archive/html/emacs-devel/2015-07/msg00106.html
+       A problem in this area has been reported by several users; see
+       Bug#16737, Bug#17101, Bug#17026, Bug#17172, Bug#19320, Bug#20283.
+       This fix differs from Mike Crowe's patch in that it should avoid a
+       race condition that could lose SIGIO signals.  ignore_sigio dates
+       back to the 1980s when some platforms couldn't block signals, and
+       could only ignore them, which led to races when signals arrived
+       while being ignored.  We shouldn't have to worry about those old
+       platforms now.
+       * src/dispextern.h, src/sysdep.c (ignore_sigio): Remove.
+       * src/emacs.c (shut_down_emacs):
+       Don't call ignore_sigio; unrequest_sigio should suffice.
+       * src/keyboard.c (kbd_buffer_store_buffered_event):
+       Use unrequest_sigio, not ignore_sigio.
+       (kbd_buffer_get_event):
+       Call request_sigio when getting the ball rolling again.
+
+2015-07-17  Artur Malabarba  <address@hidden>
+
+       * lisp/obsolete/longlines.el (longlines-search-function):
+       Fallback on `isearch-search-fun-default'.
+
+2015-07-17  Tassilo Horn  <address@hidden>
+
+       Support @-mentions
+       * rcirc.el (rcirc-completion-at-point): Support completion of
+       mentions/messages with @nick instead of just nick.
+
+2015-07-16  Michael Albinus  <address@hidden>
+
+       Fix Bug#20943.
+       * lisp/autorevert.el (auto-revert-handler): Do not check for
+       `buffer-modified-p'.
+       * lisp/files.el (buffer-stale--default-function): Check for
+       `buffer-modified-p'.
+       * test/automated/auto-revert-tests.el
+       (auto-revert-test02-auto-revert-mode-dired): Adapt test.
+
+2015-07-16  Ari Roponen  <address@hidden>
+
+       Fix delete-dups bug on long lists
+       * lisp/subr.el (delete-dups):
+       Don't mistakenly keep some dups when applied to long lists.
+
+2015-07-16  Paul Eggert  <address@hidden>
+
+       Better heuristic for C stack overflow
+       Improve the heuristic for distinguishing stack overflows from
+       other SIGSEGV causes (Bug#21004).  Corinna Vinschen explained that
+       the getrlimit method wasn't portable to Cygwin; see:
+       https://www.cygwin.com/ml/cygwin/2015-07/msg00092.html
+       Corinna suggested pthread_getattr_np but this also has problems.
+       Instead, replace the low-level system stuff with a simple
+       heuristic based on known good stack addresses.
+       * src/eval.c, src/lisp.h (near_C_stack_top): New function.
+       * src/sysdep.c: Don't include <sys/resource.h>.
+       (stack_direction): Remove.  All uses removed.
+       (stack_overflow): New function.
+       (handle_sigsegv): Use it instead of incorrect getrlimit heuristic.
+       Make SEGV fatal in non-main threads.
+
+2015-07-16  Daiki Ueno  <address@hidden>
+
+       epg: Automatically start pinentry server
+       * epg-config.el (epg-gpgconf-program): New variable.
+       * epg.el (epg--start): Call `pinentry-start' if
+       allow-emacs-pinentry is set in ~/.gnupg/gpg-agent.conf.
+
+2015-07-15  Katsumi Yamaoka  <address@hidden>
+
+       * lisp/gnus/nnimap.el: Fix my last bogus change
+       Reinstall Stefan Monnier's change that was made in
+       <83d824bc4041332f338ad7e5e830f443535aa300>.
+
+2015-07-15  Paul Eggert  <address@hidden>
+
+       Merge from gnulib
+       This incorporates:
+       2015-07-05 acl-permissions: Document FreeBSD ACL_TYPE_NFS4 acls
+       2015-07-05 acl-permissions: Fix on FreeBSD
+       2015-07-05 file-has-acl, acl-permissions: fix some more HP-UX typos
+       * lib/acl-internal.c, lib/acl-internal.h, lib/get-permissions.c:
+       * lib/set-permissions.c: Copy from gnulib.
+
+       Port to stricter C99
+       * src/keyboard.h (kbd_buffer_store_event_hold):
+       Don't return a void expression.
+
+2015-07-15  Xue Fuqiao  <address@hidden>
+
+       * doc/emacs/frames.texi (Creating Frames): Fix the command `C-x 5 m' 
runs.
+
+2015-07-14  Michael Albinus  <address@hidden>
+
+       New autorevert tests.
+       * test/automated/auto-revert-tests.el: New file.
+
+2015-07-14  Paul Eggert  <address@hidden>
+
+       Clear gcprolist etc. after stack overflow
+       After stack overflow, command_loop calls init_eval, and this needs to
+       clear gcprolist and byte_stack_list (Bug#20996).
+       * src/alloc.c (init_alloc):
+       Move gcprolist and byte_stack_list initialization from here ...
+       * src/eval.c (init_eval): ... to here.
+
+2015-07-13  Xue Fuqiao  <address@hidden>
+
+       * doc/emacs/windows.texi (Pop Up Window): Fix the description of `C-x 4 
m'.
+
+2015-07-13  YAMAMOTO Mitsuharu  <address@hidden>
+
+       Avoid deprecated enums in mac-ct font backend driver
+       * src/macfont.m (mac_font_copy_default_descriptors_for_language)
+       (mac_ctfont_get_advance_width_for_glyph)
+       (mac_ctfont_get_bounding_rect_for_glyph): Avoid deprecated enums.
+
+       Cache font family in mac-ct font backend driver
+       * src/macfont.m (macfont_family_cache): New variable.
+       (syms_of_macfont): Initialize it.
+       (macfont_available_families_cache): New variable.
+       (macfont_invalidate_family_cache, macfont_get_family_cache_if_present)
+       (macfont_set_family_cache, macfont_invalidate_available_families_cache)
+       (macfont_handle_font_change_notification)
+       (macfont_init_font_change_handler)
+       (macfont_copy_available_families_cache): New functions.
+       (macfont_create_family_with_symbol): Use font family caches.
+       (macfont_list, macfont_list_family): Use
+       macfont_copy_available_families_cache instead of
+       mac_font_create_available_families.
+
+2015-07-12  Dmitry Gutov  <address@hidden>
+
+       Show the default value in the prompt
+       * lisp/progmodes/xref.el: Add `M-?' binding for
+       xref-find-references.  Declare functions `grep-read-files' and
+       `grep-expand-template'.
+       (xref--read-identifier): Show the default value in the prompt.
+
+       When called with prefix argument, ask for file patterns to search as 
well
+       * lisp/progmodes/xref.el (xref-find-regexp): When called with
+       prefix argument, ask for file patterns to search as well.  When
+       prompting for the directory, require an existing one.
+       (xref-collect-matches): Add a new argument, FILES.  Use it in the
+       above function.
+
+       Add `project-ignores'
+       * lisp/progmodes/project.el (project-ignores): New generic
+       function, and an implementation for the VC project type.
+       * lisp/progmodes/xref.el (xref--rgrep-command): Split, as a
+       variant of rgrep-default-command that handles a generic list of
+       ignores.
+       (xref-collect-matches): Use it, and pass through to it the value
+       of the newly added argument.
+       (xref-find-regexp): Handle ignored paths within the project.
+       Remove outdated comment.
+       * lisp/vc/vc.el (vc-default-ignore-completion-table):
+       Skip the comments and the empty lines.
+
+2015-07-12  Xue Fuqiao  <address@hidden>
+
+       * doc/emacs/buffers.texi (Misc Buffer): Add a cross reference.
+
+2015-07-11  Eric Abrahamsen  <address@hidden>
+
+       gnus-registry.el: Correct function argument order
+       * lisp/gnus/gnus-registry.el (gnus-registry--set/remove-mark):
+       Reverse the order of function arguments.
+
+2015-07-11  Dmitry Gutov  <address@hidden>
+
+       Bind grep-highlight-matches to nil
+       * lisp/progmodes/xref.el (xref-collect-matches):
+       Bind grep-highlight-matches to nil (bug#20728).
+
+2015-07-11  Nikolaus Rath  <address@hidden>
+
+       nnimap.el: Fix IMAP message size parsing
+       * lisp/gnus/nnimap.el (nnimap-transform-headers):
+       Don't assume that UID comes before RFC822.SIZE.
+
+2015-07-10  Stefan Monnier  <address@hidden>
+
+       * lisp/gnus/nnimap.el: Clean up "unused var" warnings
+       (auth-source-creation-prompts): Declare.
+       (nnimap-retrieve-headers, nnimap-status-message)
+       (nnimap-request-create-group, nnimap-request-delete-group)
+       (nnimap-close-group, nnimap-request-move-article)
+       (nnimap-request-accept-article, nnimap-request-newgroups)
+       (nnimap-request-post, nnimap-dummy-active-number)
+       (nnimap-save-mail-spec, nnimap-get-groups): Add _ to unused vars.
+       (nnimap-parse-flags): Remove unused var `p'.
+       (nnimap-retrieve-group-data-early): Remove unused var `groups'.
+       (nnimap-flags-to-marks): Remove unused var `totalp'.
+
+2015-07-10  Andy Moreton  <address@hidden>  (tiny change)
+
+       * src/w32heap.c (DUMPED_HEAP_SIZE): Bump to 20MB.
+
+2015-07-10  YAMAMOTO Mitsuharu  <address@hidden>
+
+       * src/macfont.m (macfont_list): Ignore font families lacking font 
descriptors.
+
+2015-07-09  Dmitry Gutov  <address@hidden>
+
+       Don't check the exit status, it can be misleading
+       * lisp/progmodes/xref.el (xref-collect-matches): Don't check the
+       exit status, it can be misleading.
+
+       Introduce a Project API
+       * lisp/progmodes/project.el: New file.
+       * lisp/cedet/ede.el: (project-try-ede): New function.
+       (project-root): New implementation.
+       * lisp/progmodes/elisp-mode.el (emacs-lisp-mode):
+       Set project-search-path-function.
+       (elisp--xref-find-references): Delegate some logic to
+       project-search-path.
+       (elisp-search-path): New function.
+       (elisp-xref-find): Don't implement `matches' anymore.
+       * lisp/progmodes/etags.el: Don't implement `matches'.
+       Delegate some logic to project-search-path.
+       (etags-search-path): New function.
+       * lisp/progmodes/xref.el (xref-find-function):
+       Remove `matches' from the API.
+       (xref-find-regexp): Move whatever common logic was in elisp and
+       etags implementations, and search the directories returned by
+       project-directories and project-search-path.
+
+2015-07-09  Nicolas Petton  <address@hidden>
+
+       * test/automated/map-tests.el (test-map-delete-return-value): Uncomment 
test.
+
+       Add support for gv.el in map.el
+       * lisp/emacs-lisp/map.el (map-elt, map-delete): Declare a gv-expander.
+       * lisp/emacs-lisp/map.el (map-put): Refactor using `setf' and `map-elt'.
+       * test/automated/map-tests.el: Update tests to work with the new
+       implementations of map-elt and map-put.
+
+2015-07-09  Glenn Morris  <address@hidden>
+
+       * lisp/emacs-lisp/debug.el (debug-help-follow): Use describe-symbol.
+
+2015-07-09  Dmitry Gutov  <address@hidden>
+
+       Syntax-propertize until the end of the line first
+       * lisp/progmodes/xref.el (xref--collect-match): Syntax-propertize
+       until the end of the line first.
+
+2015-07-09  Xue Fuqiao  <address@hidden>
+
+       * doc/emacs/files.texi (File Archives): Add a cross reference.
+
+2015-07-08  Nikolaus Rath  <address@hidden>
+
+       nnimap.el: Handle plain value for nnimap-stream
+       * lisp/gnus/nnimap.el (nnimap-open-connection-1): Always query
+       capabilities, so that a 'plain value for the `nnimap-stream' server
+       variable is handled correctly.
+       * doc/misc/gnus.texi (Customizing the IMAP Connection):
+       Document the 'plain option.
+
+2015-07-08  Leo Liu  <address@hidden>
+
+       Fix bug in thing-at-point--bounds-of-well-formed-url
+       * lisp/thingatpt.el (thing-at-point--bounds-of-well-formed-url): Make
+         sure boundary contains current point.
+
+2015-07-08  Dmitry Gutov  <address@hidden>
+
+       * lisp/progmodes/xref.el (xref-collect-matches): Use `nreverse' in the 
end.
+
+       Declare whitespace-line-column a safe file-local
+       * lisp/whitespace.el (whitespace-line-column): Declare to be a
+       safe file-local when the value is an integer.
+
+2015-07-08  Eric Abrahamsen  <address@hidden>
+
+       gnus-group.el: Check if group names are already strings
+       * lisp/gnus/gnus-group.el (gnus-group-group-name):
+       The group name may already be a string.
+       Specifically, in the group list reached from the *Server* buffer,
+       the 'gnus-group text property returns a string.  Everywhere else
+       it returns a symbol.
+
+       nnimap.el: Remove unused let variables
+       * lisp/gnus/nnimap.el (nnimap-request-group): Variables are not used.
+
+2015-07-08  Eli Zaretskii  <address@hidden>
+
+       Support "maximized" property of runemacs's shortcut
+       * nt/runemacs.c (WinMain): If runemacs is invoked "maximized", pass
+       the '--maximized' switch to Emacs.
+
+       Support "minimized" property of runemacs's shortcut
+       * nt/runemacs.c (WinMain): If runemacs is invoked "minimized",
+       pass the '--iconic' switch to Emacs.  (Bug#20991)
+
+2015-07-08  Xue Fuqiao  <address@hidden>
+
+       Doc fixes
+       * doc/emacs/files.texi (Diff Mode): Fix the description of `C-c
+       C-w' in Diff mode.
+       * doc/emacs/arevert-xtra.texi (Auto Reverting the Buffer Menu):
+       Add a cross reference.
+
+2015-07-08  Nicolas Richard  <address@hidden>
+
+       * lisp/obsolete/landmark.el: Add Obsolete-since header
+
+2015-07-07  Glenn Morris  <address@hidden>
+
+       * test/automated/ert-tests.el (ert-test-deftest):
+       Update for recent changes.
+
+2015-07-07  Stefan Monnier  <address@hidden>
+
+       (gv-setter, gv-synthetic-place, gv-delay-error): New funs/macros
+       * lisp/emacs-lisp/gv.el (gv-setter): New function.
+       (gv-invalid-place): New error.
+       (gv-get): Use them.
+       (gv-synthetic-place, gv-delay-error): New places.
+       * lisp/emacs-lisp/cl-generic.el (cl--generic-setf-rewrite): Remove.
+       (cl-defgeneric, cl-defmethod): Use gv-setter.
+
+2015-07-07  Fabrice Popineau  <address@hidden>
+
+       Make vc-tests work with MSYS svn program
+       * lisp/vc/vc-svn.el (vc-svn-create-repo): Fix the file:// URL when
+       svn is an MSYS program.
+
+2015-07-07  Ken Brown  <address@hidden>
+
+       Improve recent change to emacsclient on Cygwin
+       * lisp/server.el (server-process-filter): Remove redundant check
+       that 'cygwin-convert-file-name-from-windows' is defined as a
+       function on Cygwin.  Don't call that function unless its argument
+       starts with a drive letter.
+
+2015-07-07  Artur Malabarba  <address@hidden>
+
+       * lisp/emacs-lisp/package.el (package-compute-transaction): Bug fix
+       Fix void variable due to `found-something' being in the wrong `let'.
+
+2015-07-07  Nicolas Richard  <address@hidden>
+
+       * lisp/play/landmark.el: Move to lisp/obsolete/
+
+2015-07-07  Martin Rudalics  <address@hidden>
+
+       Have `x-show-tip' handle `right' and `bottom' frame parameters.
+       * src/nsfns.m (compute_tip_xy, Fx_show_tip)
+       * src/w32fns.c (compute_tip_xy, Fx_show_tip)
+       * src/xfns.c (compute_tip_xy, Fx_show_tip): Allow aligning
+       tooltips also via `right' and `bottom' frame parameters.
+
+2015-07-07  Stefan Monnier  <address@hidden>
+
+       Add online-help support to describe types
+       * lisp/help-fns.el (describe-symbol-backends): Move to help-mode.el.
+       (describe-symbol): Improve the selection of default.
+       * lisp/help-mode.el: Require cl-lib.
+       (describe-symbol-backends): Move from help-fns.el.
+       (help-make-xrefs): Use it.
+       * lisp/emacs-lisp/cl-extra.el (describe-symbol-backends): Add entry
+       for types.
+       (cl--typedef-regexp): New const.
+       (find-function-regexp-alist): Add entry for types.
+       (cl-help-type, cl-type-definition): New buttons.
+       (cl-find-class): New function.
+       (cl-describe-type): New command.
+       (cl--describe-class, cl--describe-class-slot)
+       (cl--describe-class-slots): New functions, moved from eieio-opt.el.
+       * lisp/emacs-lisp/cl-generic.el (cl--generic-method-documentation)
+       (cl--generic-all-functions, cl--generic-specializers-apply-to-type-p):
+       New functions.  Moved from eieio-opt.el.
+       (cl--generic-class-parents): New function, extracted from
+       cl--generic-struct-specializers.
+       (cl--generic-struct-specializers): Use it.
+       * lisp/emacs-lisp/cl-macs.el (cl-defstruct): Use pcase-dolist.
+       Improve constructor's docstrings.
+       (cl-struct-unknown-slot): New error.
+       (cl-struct-slot-offset): Use it.
+       * lisp/emacs-lisp/cl-preloaded.el (cl-struct-define): Record the type
+       definition in current-load-list.
+       * lisp/emacs-lisp/eieio-core.el (eieio--known-slot-names): New var.
+       (eieio--add-new-slot): Set it.
+       (eieio-defclass-internal): Use new name for current-load-list.
+       (eieio-oref): Add compiler-macro to warn about unknown slots.
+       * lisp/emacs-lisp/eieio.el (defclass): Update eieio--known-slot-names
+       as compile-time as well.  Improve constructor docstrings.
+       * lisp/emacs-lisp/eieio-opt.el (eieio-help-class)
+       (eieio--help-print-slot, eieio-help-class-slots): Move to cl-extra.el.
+       (eieio-class-def): Remove button.
+       (eieio-help-constructor): Use new name for load-history element.
+       (eieio--specializers-apply-to-class-p, eieio-all-generic-functions)
+       (eieio-method-documentation): Move to cl-generic.el.
+       (eieio-display-method-list): Use new names.
+       * lisp/emacs-lisp/lisp-mode.el (lisp-imenu-generic-expression):
+       Add "define-linline".
+       (lisp-fdefs): Remove "defsubst".
+       (el-fdefs): Add "defsubst", "cl-defsubst", and "define-linline".
+       * lisp/emacs-lisp/macroexp.el (macroexp--warned): New var.
+       (macroexp--warn-and-return): Use it to avoid inf-loops.
+       Add `compile-only' argument.
+
+2015-07-06  Fabián Ezequiel Gallina  <address@hidden>
+
+       python.el: Fix local/remote shell environment setup
+       * lisp/progmodes/python.el (python-shell-with-environment): Fix
+       remote/local environment setup.
+       * test/automated/python-tests.el (python-shell-with-environment-1)
+       (python-shell-with-environment-2): New tests.
+
+2015-07-06  Glenn Morris  <address@hidden>
+
+       * lisp/simple.el (set-variable): Tweak recent doc fix.
+
+2015-07-06  Ken Brown  <address@hidden>
+
+       * src/sysdep.c (handle_sigsegv) [CYGWIN]: Increase STACK_DANGER_ZONE
+
+2015-07-06  Glenn Morris  <address@hidden>
+
+       * lisp/simple.el (set-variable): Use user-error for type mismatch.
+
+2015-07-06  Ken Brown  <address@hidden>
+
+       * src/emacs.c (main): Don't increase the stack size on Cygwin
+
+2015-07-06  Stefan Monnier  <address@hidden>
+
+       (describe-symbol): Rewrite describe-function-or-variable
+       * lisp/help-fns.el (describe-symbol-backends): New var.
+       (help-xref-stack-item): Declare.
+       (describe-symbol): Rename from describe-function-or-variable.
+       Rewrite using describe-symbol-backends instead of help-xref-interned.
+       * lisp/help.el (help-map): Use it.
+       * lisp/help-mode.el (help-symbol, help-follow-symbol): Use it.
+       (help-xref-interned): Make it into an obsolete alias.
+
+       (eieio-persistent-save): Don't ignore `file' arg (bug#20972)
+       * lisp/emacs-lisp/eieio-base.el (eieio-persistent-save): Don't ignore
+       `file' arg.  Always use utf-8-emacs.  Use with-temp-buffer and cl-letf.
+
+2015-07-06  Wolfgang Jenkner  <address@hidden>
+
+       Fix parsing glitches in dired-mark-sexp (bug#13575)
+       * lisp/dired-x.el (dired-x--string-to-number): New function.
+       (dired-mark-sexp): Use it.  Tweak dired-re-inode-size.  Fix usage
+       of directory-listing-before-filename-regexp.  Consider
+       forward-word harmful and replace it.  Add more verbiage in
+       comments and doc string.
+
+2015-07-06  Fabián Ezequiel Gallina  <address@hidden>
+
+       python.el: Respect process environment for remote shells
+       * lisp/progmodes/python.el
+       (python-shell-calculate-process-environment): Calculate
+       process-environment or tramp-remote-process-environment depending
+       whether current file is remote.
+       (python-shell-calculate-exec-path): Calculate exec-path or
+       tramp-remote-path depending whether current file is remote.
+       (python-shell-with-environment): New macro.
+       (python-shell-prompt-detect, python-shell-calculate-command)
+       (python-shell-make-comint, python-check): Use it.
+
+       python.el: Avoid making let-bound defvars buffer local  (Bug#18244)
+       * lisp/progmodes/python.el (python-shell--interpreter)
+       (python-shell--interpreter-args): New vars.
+       (inferior-python-mode, python-shell-make-comint): Use them.
+
+       python.el: Fixes for IPython 3.x  (Bug#20580)
+       * lisp/progmodes/python.el:
+       (python-shell-completion-native-setup): Fix IPython 3.x setup.
+       (python-shell-completion-native-get-completions): Fix timeout
+       logic.
+
+       python.el: Fix mark-defun behavior  (Bug#19665)
+       * lisp/progmodes/python.el: (python-mark-defun): New function.
+       * test/automated/python-tests.el (python-mark-defun-1)
+       (python-mark-defun-2, python-mark-defun-3): New tests.
+
+2015-07-05  Glenn Morris  <address@hidden>
+
+       * lisp/progmodes/f90.el (f90-type-def-re): Handle attribute lists
+       such as "extends(parent), private".  (Bug#20969)
+       * test/automated/f90.el (f90-test-bug20969, f90-test-bug20969b):
+       New tests.
+
+2015-07-05  Paul Eggert  <address@hidden>
+
+       Avoid duplicate calls to current_timespec
+       * src/process.c (wait_reading_process_output):
+       Cache current_timespec results as long as we're not waiting.
+
+2015-07-05  Ian Kelling  <address@hidden>
+
+       Avoid returning early reading process output due to SIGIO
+       * src/process.c (wait_reading_process_output): Extend the behavior of
+       not breaking due to not finding output when a timer has lowered the
+       timeout to include when SIGIO lowers the timeout.
+
+       Don't return as fast reading any process output
+       * src/process.c (wait_reading_process_output):
+       The patch for Bug#17647 returns too fast sometimes when reading
+       from any processes. Revert part of it, and limit the timeout more
+       sensibly (Bug#20978).
+
+       Refactor timeouts in wait_reading_process_output
+       * src/process.c (wait_reading_process_output):
+       Simplify timeouts with an enum.  Remove a redundant condition.
+       (Bug#20978)
+
+       Remove ADAPTIVE_READ_BUFFERING ifdef
+       * src/process.c (make-process, make-pipe-process, deactivate_process)
+       (wait_reading_process_output, read_process_output, send_process)
+       (init_process_emacs): ifdef ADAPTIVE_READ_BUFFERING was originally
+       added in case there was an operating system in which it was not
+       useful.  That was 11 years ago and it hasn't happened.  Make
+       development easier by not considering the effect of changes on a
+       theoretical OS where this is disabled (Bug#20978).
+
+2015-07-05  Glenn Morris  <address@hidden>
+
+       * lisp/simple.el (set-variable): Doc fix.
+
+       * lisp/progmodes/fortran.el (fortran-line-length): Doc fix.
+
+2015-07-05  Ian Kelling  <address@hidden>
+
+       accept-process-output fix
+       This is a followon to the fix for Bug#17647 (Bug#20976).
+       * src/process.c (status_notify): Fix too high return in some cases.
+
+2015-07-05  Artur Malabarba  <address@hidden>
+
+       * lisp/character-fold.el (character-fold-table):
+       Only fold decompositions if at least one character is non-spacing.
+       (Bug#20975)
+
+2015-07-05  Paul Eggert  <address@hidden>
+
+       Merge from gnulib
+       This incorporates:
+       2015-07-04 file-has-acl, acl-permissions: fix HP-UX typos
+       2015-07-03 set-permissions.c: adjust acl_from_mode's cpp guard
+       2015-07-02 update-copyright: fix test failure with perl >= 5.22
+       2015-07-01 gnulib-common.m4: change the ARFLAGS default to 'cr'
+       2015-07-01 acl: fix definition of acl_from_mode on FreeBSD
+       * build-aux/update-copyright, doc/misc/texinfo.tex, lib/acl-internal.h:
+       * lib/set-permissions.c, m4/gnulib-common.m4: Copy from gnulib.
+
+2015-07-05  Christoph Wedler  <address@hidden>
+
+       Respect `prog-indentation-context' in python.el
+       * lisp/progmodes/python.el (python-indent-guess-indent-offset)
+       (python-indent-context, python-indent--calculate-indentation)
+       (python-info-current-defun)
+       (python-info-dedenter-opening-block-message)
+       (python-info-line-ends-backslash-p)
+       (python-info-beginning-of-backslash)
+       (python-info-continuation-line-p): Use `prog-widen'.
+       (python-indent--calculate-indentation)
+       (python-indent--calculate-levels)
+       (python-indent-calculate-indentation): Use `prog-first-column'.
+       (python-indent--calculate-levels): Simplify.
+       Ignore also initial empty lines for syntax calculation.
+       * lisp/progmodes/python.el (python-indent-context): Return
+       :no-indent for first non-empty line, not just in line 1.
+       * test/automated/python-tests.el (python-indent-base-case)
+       (python-indent-inside-paren-1, python-indent-inside-paren-2)
+       (python-indent-inside-paren-3, python-indent-inside-paren-4)
+       (python-indent-inside-paren-5, python-indent-inside-paren-6)
+       (python-indent-after-backslash-1)
+       (python-indent-after-backslash-2)
+       (python-indent-after-backslash-3)
+       (python-indent-after-backslash-4, python-indent-inside-string-1):
+       Expect :no-indent for first non-empty line.
+
+2015-07-04  Daniel Colascione  <address@hidden>
+
+       Factor isearch word description into new function
+       * lisp/isearch.el (isearch--describe-word-mode): New function.
+       (isearch-message-prefix, isearch-query-replace): Use it.
+
+2015-07-04  Eli Zaretskii  <address@hidden>
+
+       Fix mouse pointer on w32 when a menu is active
+       * src/w32fns.c (w32_wnd_proc): Don't change the mouse pointer
+       shape while a menu is in use.  This started happening since we now
+       send WM_EMACS_SHOWCURSOR messages when the mouse moves.
+
+2015-07-04  Martin Rudalics  <address@hidden>
+
+       Fix processing of alpha parameter for Windows tip frames  (Bug#17344)
+       * src/w32fns.c (x_create_tip_frame): Fix processing alpha
+       parameter.  (Bug#17344)
+
+       Have `compilation-set-window' use right window for getting fringes 
(Bug#20829)
+       * lisp/progmodes/compile.el (compilation-set-window): Take
+       `window-fringes' from argument window.  (Bug#20829)
+
+2015-07-03  Glenn Morris  <address@hidden>
+
+       Update eieio tests for recent eieio-core change.
+       * test/automated/eieio-test-persist.el (persist-test-save-and-compare):
+       * test/automated/eieio-tests.el
+       (eieio-test-32-slot-attribute-override-2):
+       Replace the deleted eieio--class-v with cl--find-class.
+
+2015-07-03  Martin Rudalics  <address@hidden>
+
+       Fix some issues with `window-divider-mode'
+       * lisp/frame.el (window-divider-default-places): New option.
+       (window-divider-mode): Remove option.
+       (window-divider-mode): Make it a "regular" minor mode.
+       (window-divider-width-valid-p): Drop frame- prefix.
+       (window-divider-mode-apply): New argument ENABLE.  Drop frame-
+       prefix.  Handle `window-divider-default-places'.
+       (frame--window-divider-mode-set-and-apply): Remove.
+       (window-divider-default-bottom-width)
+       (window-divider-default-right-width): Drop :group entries.
+       * lisp/menu-bar.el (menu-bar-bottom-and-right-window-divider)
+       (menu-bar-right-window-divider, menu-bar-bottom-window-divider)
+       (menu-bar-no-window-divider): Set `window-divider-default-places'
+       and call `window-divider-mode'.
+       * doc/emacs/frames.texi (Window Dividers): Document
+       `window-divider-default-places'.
+
+2015-07-02  Xue Fuqiao  <address@hidden>
+
+       Add cross references in documentation
+       * doc/emacs/display.texi (Displaying Boundaries):
+       * doc/emacs/search.texi (Word Search): Add cross references.
+
+2015-07-02  Eli Zaretskii  <address@hidden>
+
+       ;* src/bidi.c (bpa_stack_entry): Update commentary for Unicode 8.0.
+
+2015-07-02  Paul Eggert  <address@hidden>
+
+       -batch should not affect ‘’ -> `' display
+       * lisp/startup.el (command-line): Do the ‘’ -> `' check even if
+       -batch (Bug#20926).
+
+2015-07-02  Stefan Monnier  <address@hidden>
+
+       * lisp/emacs-lisp/eieio-core.el (eieio--class-v): Remove
+       * lisp/emacs-lisp/eieio-core.el, lisp/emacs-lisp/eieio.el,
+         lisp/emacs-lisp/eieio-opt.el, lisp/emacs-lisp/eieio-compat.el:
+       Use cl--find-class instead.
+
+       * lisp/term/xterm.el (xterm--query): Fix paren typo (bug#20951).
+
+2015-07-02  Martin Rudalics  <address@hidden>
+
+       Some further fixes in Change Window node.  (Bug#20183)
+       * doc/emacs/windows.texi (Change Window): Replace "rearranging"
+       by "resizing" in section title.  Add some concept indices.
+       Suggested by N. Jackson (Bug#20183).
+
+       Reference window dividers in Change Window section.
+       * doc/emacs/windows.texi (Change Window): Reference window
+       dividers.
+
+       Document new `window-divider-mode'.
+       * lisp/frame.el (window-divider-mode): Fix doc-string.
+       * doc/emacs/frames.texi (Window Dividers): New section.
+
+       Improve accessibility of window dividers.  (Bug#20183)
+       * lisp/faces.el (window-divider)
+       (window-divider-first-pixel, window-divider-last-pixel): Change
+       membership from `frames' to `window-divider' customization group.
+       * lisp/frame.el (window-divider): New customization group.
+       (window-divider-mode): New minor mode.
+       (window-divider-default-bottom-width)
+       (window-divider-default-right-width): New options.
+       (frame--window-divider-previous-mode): New variable.
+       (frame-window-divider-width-valid-p)
+       (frame--window-divider-mode-apply)
+       (frame--window-divider-mode-set-and-apply): New functions.
+       * lisp/menu-bar.el (menu-bar-options-save): Save
+       window-divider-mode settings.
+       (menu-bar-window-divider-customize)
+       (menu-bar-bottom-and-right-window-divider)
+       (menu-bar-right-window-divider, menu-bar-bottom-window-divider)
+       (menu-bar-no-window-divider): New functions.
+       (menu-bar-showhide-window-divider-menu): New variable.
+       (menu-bar-showhide-menu): Show/hide window divider menu.
+       * lisp/mouse.el (mouse-split-window-vertically)
+       (mouse-split-window-horizontally): Replace `error' by
+       `user-error'.  Bind `window-combination-resize' to nil.
+       (top-level): Add/reorder mouse key bindings on mode- and
+       vertical-line.
+
+2015-07-02  Paul Eggert  <address@hidden>
+
+       Don't display ‘’ as `' under X in en_GB
+       The curved quote setup code invokes (char-displayable-p ?‘),
+       but this isn’t reliable until after the X frame replaces the
+       terminal frame (Bug#20926).
+       * lisp/international/mule-cmds.el (set-locale-environment):
+       Move curved quote setup code from here ...
+       * lisp/startup.el (command-line): ... to here, after creating
+       the X frame.
+
+2015-07-01  Nicolas Richard  <address@hidden>
+
+       * lisp/emacs-lisp/seq.el (seq-difference): Fix typo in docstring
+
+       Add argument to reverse the meaning of ido-restrict-to-matches
+       * lisp/ido.el (ido-restrict-to-matches): Add an optional argument
+       to reverse the meaning (Bug#15631).
+
+2015-07-01  Eli Zaretskii  <address@hidden>
+
+       Be more tolerant to fonts named "Foobar-12"
+       * src/frame.c (x_set_font): If font_spec_from_name returns nil,
+       don't barf; instead, request a new fontset to be generated.  This
+       avoids unnecessarily rejecting fonts named against XLFD rules.  See
+       
http://lists.gnu.org/archive/html/help-emacs-windows/2015-06/msg00001.html,
+       for the description of the original problem.
+       * lisp/faces.el (set-face-attribute): Don't be fooled too easily
+       by a hyphen in a font's name.
+
+       Fix value of posn-at-pont in R2L lines
+       * src/keyboard.c (Fposn_at_x_y, Fposn_at_point): Allow X pixel
+       coordinate of -1, for a newline in a right-to-left line that
+       overflowed into the left fringe.
+
+2015-07-01  Stefan Monnier  <address@hidden>
+
+       (cl--copy-slot-descriptor): Copy the `props' alist as well
+       * lisp/emacs-lisp/cl-preloaded.el (cl--copy-slot-descriptor-1):
+       Rename from cl--copy-slot-descriptor.
+       (cl--copy-slot-descriptor): New function.  Copy the alist (bug#20914).
+
+2015-06-30  Stefan Monnier  <address@hidden>
+
+       * lisp/term/xterm.el (xterm--query): Avoid generating garbage
+       (xterm-query-timeout): New var.
+       (xterm--query): Use it.  Fallback on async method if we timeout before
+       getting the first byte of the reply (bug#12354).
+
+2015-06-30  Paul Eggert  <address@hidden>
+
+       Spelling fixes
+
+2015-06-30  Xue Fuqiao  <address@hidden>
+
+       * doc/emacs/frames.texi (Frame Commands): Typo fix. (Bug#20946)
+
+2015-06-30  Paul Eggert  <address@hidden>
+
+       In strings, prefer plain ` and ' to \` and \'
+       * lisp/allout.el (allout-insert-listified):
+       * lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
+       * lisp/ls-lisp.el (ls-lisp-UCA-like-collation)
+       (ls-lisp-string-lessp):
+       * lisp/menu-bar.el (menu-bar-open):
+       * lisp/obsolete/otodo-mode.el (todo-top-priorities):
+       * lisp/progmodes/compile.el (compile):
+       * lisp/progmodes/etags.el (tags-loop-scan):
+       * lisp/progmodes/make-mode.el (makefile-browser-insert-continuation):
+       * lisp/subr.el (posn-actual-col-row):
+       * lisp/term/pc-win.el (x-list-fonts):
+       * lisp/textmodes/texinfmt.el (texinfmt-version):
+       * lisp/textmodes/texnfo-upd.el (texinfo-master-menu):
+       * lisp/time.el (display-time-world-list):
+       * lisp/tmm.el (tmm-menubar):
+       * src/buffer.c (syms_of_buffer):
+       * src/fileio.c (syms_of_fileio):
+       Omit unnecessary and confusing backslash before quote.
+       * lisp/erc/erc.el (erc-cmd-LASTLOG):
+       * lisp/progmodes/flymake.el (flymake-fix-file-name):
+       * lisp/progmodes/vhdl-mode.el (vhdl-in-extended-identifier-p):
+       Fix string that was intended to escape a backslash and not a quote.
+
+2015-06-30  Glenn Morris  <address@hidden>
+
+       * leim/Makefile.in, lisp/Makefile.in: Add missing EXEEXT definition.
+
+       * lisp/Makefile.in (MH_E_SRC, TRAMP_SRC, CAL_SRC):
+       Replace hard-coded lists with wildcard + filter-out.
+
+       * configure.ac (system-configuration-features): Add X11, NS.
+
+       Improve reproducibility of generated loaddefs file.
+       * lisp/emacs-lisp/autoload.el (autoload-generate-file-autoloads):
+       Make the return value the modtime of the input file (if no autoloads).
+       (update-directory-autoloads): In the "no autoloads" section,
+       use "most recent modtime" rather than "current time".
+
+2015-06-30  Artur Malabarba  <address@hidden>
+
+       * lisp/emacs-lisp/package.el (package--remove-hidden): Fix logic
+       (Bug#20930)
+
+2015-06-30  Nicolas Petton  <address@hidden>
+
+       * doc/lispref/sequences.texi: Add documentation for seq-min and seq-max.
+
+       Add seq-min and seq-max
+       Bump version number.
+       * lisp/emacs-lisp/seq.el (seq-min, seq-max): New functions.
+       * test/automated/seq-tests.el: Add tests for seq-min and seq-max.
+
+2015-06-30  Eli Zaretskii  <address@hidden>
+
+       Make sure sleep-for always delays for as long as it's told
+       * src/dispnew.c (Fsleep_for): Call wait_reading_process_output in
+       a loop, to ensure we always wait exactly the required amount of
+       time.  (Bug#15990)
+
+2015-06-30  Paul Eggert  <address@hidden>
+
+       Fix pointer signedness glitch
+       * src/font.c (font_load_for_lface): Use SSDATA, not SDATA.
+
+2015-06-30  Eli Zaretskii  <address@hidden>
+
+       Don't block changes in mouse pointer inside 'track-mouse'
+       * etc/NEWS:
+       * doc/lispref/frames.texi (Mouse Tracking): Document the special
+       effect of setting 'track-mouse' to 'dragging'.
+       * lisp/textmodes/artist.el (artist-mouse-draw-continously):
+       * lisp/ruler-mode.el (ruler-mode-mouse-drag-any-column-iteration):
+       * lisp/mouse-drag.el (mouse-drag-throw):
+       * lisp/mouse.el (mouse-drag-line): Set 'track-mouse' to 'dragging'
+       to avoid changes in the shape of the mouse pointer.
+       * src/xdisp.c (define_frame_cursor1): Don't change the mouse
+       pointer shape when do_mouse_tracking has the value of 'dragging',
+       not just any non-nil value.  (Bug#20934)
+       (syms_of_xdisp): DEFSYM 'dragging'.
+
+2015-06-30  Artur Malabarba  <address@hidden>
+
+       * lisp/isearch.el (isearch-toggle-word): Fix toggle
+
+       * lisp/emacs-lisp/package.el (package-compute-transaction):
+       Don't assume version sorting.
+
+       * lisp/emacs-lisp/package.el (package--save-selected-packages):
+       Don't save before init time, to avoid overwriting configurations.
+       (Bug#20855)
+
+2015-06-30  Xue Fuqiao  <address@hidden>
+
+       Add cross references.
+       * doc/emacs/display.texi (Standard Faces, Fringes): Add cross
+       references.
+
+2015-06-29  Ted Zlatanov  <address@hidden>
+
+       cfengine.el: update for the upcoming CFEngine 3.7 release
+       Update for the upcoming CFEngine 3.7 release: support macros and
+       quoted context strings; reformat JSON; indent promise attributes 2
+       units by default; give function parameter descriptions in the eldoc
+       glue.
+       * cfengine.el: Update version and docs and fix name.  Autoload
+       `json-pretty-print'.  Support new features in 3.7.
+       (cfengine-parameters-indent): Set default promise attribute indent to
+       2 more than the promise itself.
+       (cfengine3-macro-regex): New variable to match the new macro syntax.
+       (cfengine3-font-lock-keywords): Use it to highlight macros.
+       (cfengine3-indent-line): Use it to indent macros to column 0.
+       (cfengine3-class-selector-regex): Update for the new quoted strings
+       format.
+       (cfengine3-reformat-json-string): New function to reformat a JSON
+       string using `json-pretty-print'.
+       (cfengine3-format-function-docstring): Use function parameter
+       description if it's provided by the cf-promises syntax dump.
+
+2015-06-29  Michael R. Mauger  <address@hidden>
+
+       Cygwin emacsclient handles w32 file names
+
+2015-06-29  Katsumi Yamaoka  <address@hidden>
+
+       * lisp/isearch.el (isearch-exit): Don't call isearch-done twice 
(bug#20925).
+
+2015-06-29  Eli Zaretskii  <address@hidden>
+
+       * doc/lispref/text.texi (Sticky Properties): Improve wording.
+       (Bug#20924)
+
+       Allow font names that end in "-NN", where NN is a number
+       * src/font.c (font_load_for_lface): If the font-spec didn't match
+       any available fonts, try again without interpreting trailing "-NN"
+       as the font size.  For the description of the original problem, see
+       
http://lists.gnu.org/archive/html/help-emacs-windows/2015-06/msg00001.html
+
+       .gdbinit followup to changes in !USE_LSB_TAG
+       * src/.gdbinit (xgetsym): Don't left-shift $ptr even under
+       !USE_LSB_TAG, as Emacs no longer does.
+
+2015-06-29  Wolfgang Jenkner  <address@hidden>
+
+       * lisp/calc-store.el (calc-insert-permanent-variable): Heed case.
+       Otherwise `s p' of f and F will stomp on each other's value.  
(Bug#20916)
+
+2015-06-29  Artur Malabarba  <address@hidden>
+
+       * lisp/emacs-lisp/tabulated-list.el (tabulated-list-print):
+       Don't block remember-pos if buffer isn't displayed.  (Bug#20921)
+
+2015-06-29  Nicolas Richard  <address@hidden>
+
+       * lisp/emacs-lisp/package.el (describe-package): Use symbol-at-point as 
additional guess
+
+       * lisp/emacs-lisp/package.el (describe-package): Convert the guess to a 
string
+
+2015-06-28  Paul Eggert  <address@hidden>
+
+       apropos-library quoting fix
+       * lisp/apropos.el (apropos-library): Quote library consistently
+       with the rest of the quoting used by apropos.
+
+       Clarify interpreter-mode-alist doc
+       * lisp/files.el (interpreter-mode-alist):
+       Reword to avoid confusing quoting that wasn't working anyway.
+
+2015-06-28  Michael Albinus  <address@hidden>
+
+       Sync with Tramp 2.2.12
+       * doc/misc/trampver.texi:
+       * lisp/net/trampver.el: Update release number.
+       * test/automated/tramp-tests.el (tramp-test13-make-directory):
+       Fix cleanup.
+
+2015-06-28  Artur Malabarba  <address@hidden>
+
+       * lisp/isearch.el (isearch-mode): Don't char-fold regexps
+       (bug#20913)
+
+2015-06-27  Dmitry Gutov  <address@hidden>
+
+       Bind grep-highlight-matches around the rgrep call
+       * lisp/progmodes/grep.el (zrgrep): Bind grep-highlight-matches
+       around the rgrep call (bug#20728).
+
+       Put "--color" before the other options in grep-command
+       * lisp/progmodes/grep.el (grep-compute-defaults): Put "--color"
+       before the other options in grep-command (bug#20912).
+
+       Add --color Grep option to the command dynamically
+       * lisp/progmodes/grep.el (grep-template, grep-find-template):
+       Update the description for <C>.  (Bug#20728)
+       (grep-compute-defaults): Don't add the --color option to
+       grep-options.  Only add it to grep-command.
+       (grep-expand-keywords): Expand the env value opts into <C>.
+       (grep-expand-template): Replace cf in the env with the opts list,
+       that can include -i and --color.
+       * lisp/progmodes/xref.el (xref-collect-matches): Do not remove
+       "--color=always" from the template, because we don't have to.
+
+2015-06-27  Paul Eggert  <address@hidden>
+
+       cl-extra fixes for most-negative-fixnum
+       * lisp/emacs-lisp/cl-extra.el (cl-gcd, cl-lcm, cl-random):
+       Don't mishandle an argument equal to most-negative-fixnum,
+       whose absolute value equals itself.
+       (cl-gcd, cl-lcm): Use dolist rather than doing it by hand.
+
+       Initialize cl--gensym-counter to 0
+       Previously it was initialized to a random value, which made it
+       harder to reproduce earlier Emacs runs.  The need for a random
+       value went away when Emacs introduced and used the #: syntax for
+       uninterned symbols (Bug#20862).
+       * doc/misc/cl.texi (Creating Symbols, Common Lisp Compatibility):
+       Document that cl--gensym-counter now starts with 0.
+       * lisp/emacs-lisp/cl-lib.el (cl--gensym-counter): Remove.
+       (cl--random-time): Move to near only remaining use.
+       * lisp/emacs-lisp/cl-macs.el (cl--gensym-counter): Initialize to 0.
+
+       Improve docstring for macroexp-let2
+       * lisp/emacs-lisp/macroexp.el (macroexp-let2):
+       Improve as per suggestion by RMS in:
+       http://lists.gnu.org/archive/html/emacs-devel/2015-06/msg00621.html
+       Also, rename args to match new doc string.
+
+2015-06-27  Eli Zaretskii  <address@hidden>
+
+       Fix VC test suite on MS-Windows
+       * lisp/vc/vc-svn.el (vc-svn-create-repo): Make sure the file: URL
+       always starts with 3 slashes after the colon.
+       * test/automated/vc-tests.el (vc-test--create-repo-function): Use
+       'w32-application-type' to invoke CVS on MS-Windows with properly
+       formatted CVSROOT directory name.
+
+       Add a new function w32-application-type
+       * src/w32proc.c (Fw32_application_type): New function.
+
+       Avoid error in TLS connections due to incorrect format
+       * src/gnutls.c (Fgnutls_boot): Use the %x conversion specifier in
+       the call to 'error', instead of the unsupported %u.  Reported by
+       lo2net <address@hidden>.  (Bug#20908)
+
+2015-06-26  Artur Malabarba  <address@hidden>
+
+       * lisp/replace.el (replace-search): Fix regexp case (bug#20901)
+
+2015-06-26  Leo Liu  <address@hidden>
+
+       Fix indentation for with-output-to-string
+       * lisp/emacs-lisp/cl-indent.el: Fix indentation for
+         `with-output-to-string' in elisp.
+         Revert "lisp/emacs-lisp/cl-indent.el: Fix indent of 
with-output-to-string"
+         This reverts commit 659199f2ca5f283fb246faa78a244e5ca25f53dd.
+
+2015-06-26  Eli Zaretskii  <address@hidden>
+
+       Minor corrections in ELisp manual
+       * doc/lispref/nonascii.texi (Character Properties): Correct
+       inaccuracies in description of values of the Unicode properties.
+
+       Fix invisible mouse pointers on Windows.
+       * src/w32fns.c: Include windowsx.h.
+       (w32_wnd_proc): If the mouse moved and the mouse pointer is
+       invisible, make it visible again even when the main (Lisp)
+       thread is busy.
+       * src/w32term.c (w32_toggle_invisible_pointer): Rather then
+       garbaging the frame have the input thread call SetCursor.
+
+2015-06-26  Martin Rudalics  <address@hidden>
+
+       Provide invisible mouse pointers on Windows.  (Bug#6105) (Bug#12922)
+       * src/w32fns.c (w32_wnd_proc): Handle f->pointer_invisible
+       for WM_SETCURSOR and WM_EMACS_SETCURSOR cases.
+       * src/w32term.c (w32_hide_hourglass): Handle
+       f->pointer_invisible.
+       (w32_toggle_invisible_pointer): New function.
+       (w32_create_terminal): Add w32_toggle_invisible_pointer as
+       toggle_invisible_pointer_hook for this terminal.
+
+2015-06-25  Xue Fuqiao  <address@hidden>
+
+       Doc fix for deletion commands
+       'delete-char' does not respect the value of 'delete-active-region'.
+       * doc/emacs/killing.texi (Deletion):
+       Fix documentation for some single-char deletion commands.
+
+       * doc/emacs/help.texi (Apropos):
+       Improve documentation of 'apropos-do-all'.
+
+       * doc/emacs/help.texi (Help Summary):
+       Improve documentation of 'describe-mode'.
+
+2015-06-25  Paul Eggert  <address@hidden>
+
+       Fix submake dependency bug with .h files
+       * src/Makefile.in ($(libsrc)/make-docfile$(EXEEXT)):
+       Depend on $(lib)/libgnu.a, so that we build $(lib)/*/*.h
+       before the submake in $(libsrc) would spin off a subsubmake
+       for $(lib) in parallel with our submake for $(lib) (Bug#20894).
+
+2015-06-25  Artur Malabarba  <address@hidden>
+
+       * lisp/character-fold.el (character-fold-table): Reuse `table'
+
+2015-06-25  Paul Eggert  <address@hidden>
+
+       Translate undisplayable ‘ to `
+       * doc/lispref/help.texi (Keys in Documentation):
+       * lisp/international/mule-cmds.el (set-locale-environment):
+       * lisp/term/w32console.el (terminal-init-w32console):
+       * src/doc.c (Fsubstitute_command_keys, Vhelp_quote_translation):
+       If ‘ is not displayable, transliterate it to `, not to '.  See:
+       http://lists.gnu.org/archive/html/emacs-devel/2015-06/msg00542.html
+
+       Fix C99 incompatibilities in Cairo code
+       * src/image.c (xpm_load) [USE_CAIRO]:
+       * src/xterm.c (x_cr_accumulate_data) [USE_CAIRO]:
+       Fix pointer signedness problem.
+
+2015-06-25  Oleh Krehel  <address@hidden>
+
+       lisp/emacs-lisp/cl-indent.el: Fix indent of with-output-to-string
+       * lisp/emacs-lisp/cl-indent.el (common-lisp-indent-function):
+         `with-output-to-string' should have the same indent as `progn'.
+         This is in line with the declaration of `with-output-to-string'.
+
+2015-06-25  Paul Eggert  <address@hidden>
+
+       Get ‘./configure; make -C src emacs’ to work
+       Without this fix, lib/fcntl.h isn't built in time (Bug#20894).
+       * lib-src/Makefile.in (../lib/libgnu.a):
+       * src/Makefile.in ($(lib)/libgnu.a): Build all, not libgnu.a.
+
+2015-06-24  Paul Eggert  <address@hidden>
+
+       Fix GC bugs --with-wide-int and Qnil == 0
+       Use the same alignment for the !USE_LSB_TAG case as for the
+       more-typical USE_LSB_TAG case.  The attempt to support arbitrary
+       alignments with !USE_LSB_TAG had subtle bugs in garbage collection
+       once we changed the representation of symbols so that Qnil == 0.
+       Problem reported by Eli Zaretskii (Bug#20862).
+       * src/alloc.c (XMALLOC_HEADER_ALIGNMENT) [XMALLOC_OVERRUN_CHECK]:
+       * src/alloc.c (vector_alignment, union aligned_Lisp_Symbol)
+       (union aligned_Lisp_Misc, maybe_lisp_pointer, pure_alloc):
+       Use same alignment for !USE_LSB_TAG as for USE_LSB_TAG.
+       * src/alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS): Remove.
+       This optimization in the !USE_LSB_TAG case is no longer valid when
+       symbols are represented via offsets.  Change the only use to
+       assume that pointers might hide in objects.
+       * src/lisp.h (alignas) [!USE_LSB_TAG]:
+       Require support in this case, too.
+       (TAG_SYMOFFSET, XSYMBOL) [!USE_LSB_TAG]: Do not shift the offset.
+       This is OK, because the !USE_LSB_TAG case now applies only when
+       Lisp_Object is wider than void *, so there's no longer any need
+       to shift the offset.  Not shifting the offset means that
+       symbol representations have the same alignment as pointers,
+       which the GC assumes.
+
+2015-06-24  Xue Fuqiao  <address@hidden>
+
+       * doc/lispintro/emacs-lisp-intro.texi (Data types):
+       Improve documentation of 'substring'.
+
+2015-06-24  Artur Malabarba  <address@hidden>
+
+       * lisp/character-fold.el (character-fold-table): Fix table generation
+
+2015-06-24  Glenn Morris  <address@hidden>
+
+       * nextstep/Makefile.in (all): Make it the first target.
+       (../src/emacs${EXEEXT}): Add rule for making it.
+
+2015-06-24  Artur Malabarba  <address@hidden>
+
+       * etc/NEWS: Fix mention to old function name
+
+       * lisp/character-fold.el: New file (Bug#20887)
+       (character-fold-to-regexp): New function.
+       * lisp/replace.el (replace-search): Check value of
+       `character-fold-search'.
+       * lisp/isearch.el: Move character-folding code to
+       character-fold.el
+       (isearch-toggle-character-fold): New command.
+       (isearch-mode-map): Bind it to "\M-sf".
+       (isearch-mode): Check value of `character-fold-search'.
+
+2015-06-24  Stefan Monnier  <address@hidden>
+
+       * lisp/subr.el (remove-from-invisibility-spec): Handle the t case
+       * lisp/subr.el (remove-from-invisibility-spec): Make sure `element'
+       is visible even if it's not yet in buffer-invisibility-spec (bug#20468).
+
+       * lisp/progmodes/xref.el: Avoid init-args in oref.
+       * lisp/progmodes/xref.el (xref-location-group, xref-location-marker)
+       (xref--insert-xrefs, xref-collect-references): Avoid init-args in oref.
+
+2015-06-24  Glenn Morris  <address@hidden>
+
+       * Makefile.in (install-arch-dep): Don't set sticky bit on the binary.
+
+2015-06-24  Stefan Monnier  <address@hidden>
+
+       * lisp/gnus/nnmaildir.el: Silence lexical warnings
+       * lisp/gnus/nnmaildir.el (nnmaildir--prepare): Use a more
+       functional style.
+       (nnmaildir--update-nov): Remove unused var `numdir'.
+       (nnmaildir-request-type, nnmaildir--scan, nnmaildir-request-newgroups)
+       (nnmaildir-request-group, nnmaildir-request-create-group)
+       (nnmaildir-request-post, nnmaildir-request-move-article)
+       (nnmaildir-request-accept-article, nnmaildir-active-number): Mark 
unused args.
+       (nnmaildir-get-new-mail, nnmaildir-group-alist)
+       (nnmaildir-active-file): Declare.
+       (nnmaildir-request-scan): Remove unused vars `group' and `grp-dir'.
+       (nnmaildir-request-update-info): Remove unused vars `dotfile', `num',
+       `mark', `end', `new-mark', and `mark-sym'.
+       (nnmaildir-retrieve-headers): Remove unused args `srv-dir', `dir',
+       `nlist2'.
+       (nnmaildir-request-expire-articles):
+       Remove unused vars `article', `stop' and `nlist2'.
+       (nnmaildir-request-set-mark): Remove unused vars `begin', `article' and
+       `end'.  Use nnmaildir--article when dyn-binding is needed.
+       Give the value directly in the `let' for `del-mark', `del-action',
+       `add-action', and `set-action'.  Don't use `add-to-list' on a local var.
+       (nnmaildir-close-server): Declare those local vars that need to be
+       dyn-bound.
+
+2015-06-24  Paul Eggert  <address@hidden>
+
+       * src/keyboard.h (kbd_buffer_store_event_hold): Remove unused local.
+
+       Port selection info fix to clang
+       * src/keyboard.h (kbd_buffer_store_event_hold):
+       Don't assume C11 semantics for alignof (Bug#20756).
+
+       Fix bug that munged selection info
+       On some optimizing C compilers, copying a structure did not
+       copy the padding bytes between elements, and the type punning
+       between struct input_data and struct selection_input_data did
+       not work.  Change the C code to use a proper union type instead.
+       Problem reported by YAMAMOTO Mitsuharu (Bug#20756).
+       * src/keyboard.c (kbd_buffer, kbd_fetch_ptr, kbd_store_ptr)
+       (readable_events, discard_mouse_events, kbd_buffer_events_waiting)
+       (kbd_buffer_get_event, process_special_events, stuff_buffered_input)
+       (mark_kboards):
+       Use union buffered_input_event, not struct input_event.
+       (clear_event, deliver_input_available_signal, process_special_events):
+       Remove unnecessary forward decls.
+       (kbd_buffer_store_buffered_event): New function, mostly just the
+       old kbd_buffer_store_event_hold, except its argument is of type
+       union buffered_input_event, not struct input_event.
+       (kbd_buffer_unget_event): Define only if HAVE_X11, since it's
+       not needed otherwise.  Argument is now of type
+       struct selection_input_event *, not struct input_event *.
+       All callers changed.
+       (clear_event): Arg is now of type union buffered_input_event *,
+       not struct input_event *.  All callers changed.
+       * src/keyboard.h [HAVE_X11]: Include "xterm.h".
+       (union buffered_input_event): New type.
+       (kbd_buffer_store_event_hold): Now an inline function,
+       defined here.
+       * src/termhooks.h (EVENT_KIND_WIDTH): New constant.
+       (struct input_event): Use it.
+       * src/xselect.c (struct selection_event_queue):
+       Make elements be of type struct selection_input_event,
+       not struct input_event.
+       (selection_input_event_equal): New static function.
+       (x_queue_event): Use it.
+       (x_queue_event, x_decline_selection_request)
+       (x_selection_current_request, x_reply_selection_request)
+       (x_handle_selection_request, x_handle_selection_clear)
+       (x_handle_selection_event): Use struct selection_input_event,
+       not struct input_event.  All callers changed.
+       (x_convert_selection): Omit unused first arg.  All callers changed.
+       (Fx_disown_selection_internal): Omit unnecessary union.
+       * src/xterm.c (handle_one_xevent): Use new union buffered_input_event
+       rather than rolling our own equivalent.  Prefer sie.kind when
+       setting up that kind of structure.
+       Call kbd_buffer_store_buffered_event, not kbd_buffer_store_event_hold.
+       * src/xterm.h (struct selection_input_event: Use EVENT_KIND_WIDTH.
+       (SELECTION_EVENT_DISPLAY, SELECTION_EVENT_DPYINFO)
+       (SELECTION_EVENT_REQUESTOR, SELECTION_EVENT_SELECTION)
+       (SELECTION_EVENT_TARGET, SELECTION_EVENT_PROPERTY)
+       (SELECTION_EVENT_TIME, x_handle_selection_event):
+       Arg is now of type struct selection_input_event *)
+       not struct input_event *.  All callers changed.
+
+2015-06-23  Glenn Morris  <address@hidden>
+
+       * Makefile.in (install-arch-dep): Simplify with Make conditionals.
+
+2015-06-23  Artur Malabarba  <address@hidden>
+
+       * lisp/isearch.el: Fold many unicode characters to ASCII
+       (isearch-character-fold-search, isearch--character-fold-extras)
+       (isearch--character-fold-table): New variable.
+       (isearch--character-folded-regexp): New function.
+       (isearch-search-fun-default): Use them.
+       * lisp/replace.el (replace-character-fold): New variable.
+       (replace-search): Use it.
+       * etc/NEWS: Document it.
+
+2015-06-23  Glenn Morris  <address@hidden>
+
+       Check for an input event before showing a dialog box.  (Bug#20813)
+       * lisp/subr.el (y-or-n-p):
+       * src/fns.c (Fyes_or_no_p): Check last-input-event as well
+       as last-nonmenu-event.
+
+2015-06-23  Jürgen Hartmann  <address@hidden>  (tiny change)
+
+       Respect ‘switch-to-visible-buffer’ more rigidly.  (Bug#20861)
+       * lisp/window.el (switch-to-visible-buffer): Doc adjustment.
+       (switch-to-prev-buffer, switch-to-next-buffer): Respect
+       switch-to-visible-buffer independent of the windows history.
+
+2015-06-23  Paul Eggert  <address@hidden>
+
+       * src/keyboard.c (last_timer_event): Remove unused var.
+
+2015-06-23  Artur Malabarba  <address@hidden>
+
+       * test/automated/package-test.el (package-test-update-listing):
+       Fix test.
+
+2015-06-23  Glenn Morris  <address@hidden>
+
+       Revert 2014-06-25 nextstep/Makefile change.
+       * nextstep/Makefile.in (${ns_appbindir}): Remove rule.
+       (${ns_appbindir}/Emacs, links): Create ns_appbindir in the rule,
+       not as an order-only prerequisite.
+
+       * configure.ac (--with-ns): Enable by default on OS X.
+
+2015-06-23  Leo Liu  <address@hidden>
+
+       Fix shell-for/backward-command to exclude spaces
+       * lisp/shell.el (shell-forward-command, shell-backward-command):
+         Handle the 'move case from re-search-forward/backward.
+         fixes debbugs:20873
+
+2015-06-22  Juri Linkov  <address@hidden>
+
+       * lisp/replace.el (query-replace-read-from): Add separator to
+       the local binding of text-property-default-nonsticky.  (Bug#20690)
+
+       * lisp/simple.el (shell-command-on-region): Replace 'error' with 
'user-error'.
+       (Bug#20785)
+
+2015-06-22  Ken Brown  <address@hidden>
+
+       Enable CPU profiling on Cygwin
+       * src/syssignal.h [CYGWIN] (PROFILER_CPU_SUPPORT): Revert previous
+       change that undefined this.
+       (SIGEV_SIGNAL): Ensure that this is defined as a macro.
+       * src/profiler.c [CYGWIN] (timer_getoverrun): Define as a macro on
+         Cygwin.
+
+       Improve diagnostics of profiler-cpu-start
+       * src/profiler.c (setup_cpu_timer): Change return type to 'int';
+       return -1 if the sampling interval is invalid.
+       (Fprofiler_cpu_start): Improve error message if 'setup_cpu_timer'
+       fails.  (Bug#20843)
+
+2015-06-22  Artur Malabarba  <address@hidden>
+
+       * lisp/emacs-lisp/package.el: Exclude packages by name
+       (package-hidden-regexps): New variable.
+       (package-menu--refresh): Use it.
+       (package-menu-hide-package): New command.
+
+       * lisp/emacs-lisp/package.el: Rename hide-obsolete to toggle-hiding
+
+2015-06-22  Eli Zaretskii  <address@hidden>
+
+       Fix debug-timer-check on systems without HAVE_TIMERFD
+       * src/atimer.c (Fdebug_timer_check) [!HAVE_TIMERFD]: Actively run
+       the expired timers, since wait_reading_process_output doesn't.
+       (debug_timer_callback): Enlarge the tolerance to 20 msec.
+
+       Fix RCS crashes in vc-test
+       * lisp/vc/vc-rcs.el (vc-rcs-register): Avoid crashes with some old
+       ports of 'ci' on MS-Windows by always passing the -t- switch.
+
+2015-06-22  Glenn Morris  <address@hidden>
+
+       * doc/emacs/package.texi (Packages):
+       * doc/emacs/trouble.texi (Known Problems): Remove faq cross-references.
+
+       * doc/misc/efaq-w32.texi (Downloading): Copyedits.  (Bug#20851)
+
+2015-06-22  Paul Eggert  <address@hidden>
+
+       Port tests to help-quote-translation
+       * test/automated/ert-x-tests.el (ert-test-describe-test):
+       * test/automated/package-test.el (package-test-describe-package)
+       (package-test-signed): Allow straight quotes, too.
+
+2015-06-22  Dmitry Gutov  <address@hidden>
+
+       Make find-function-on-key use the current window
+       * lisp/emacs-lisp/find-func.el (find-function-on-key-do-it):
+       Extract from `find-function-on-key', add a second argument.
+       (find-function-on-key): Use it (bug#19679).
+       (find-function-on-key-other-window)
+       (find-function-on-key-other-frame): New commands.
+
+2015-06-21  Nicolas Petton  <address@hidden>
+
+       Revert "Define `map-elt' as a generalized variable"
+       This reverts commit 8b6d82d3ca86f76ed964063b3941a7c6ab0bf1c6.
+
+2015-06-21  Ken Brown  <address@hidden>
+
+       Drop support for CPU profiling on Cygwin
+       * src/syssignal.h (PROFILER_CPU_SUPPORT): Don't define on Cygwin.
+       (Bug#20843)
+
+2015-06-21  Paul Eggert  <address@hidden>
+
+       Fix some “nested” quoting confusion in doc strings
+       * lisp/emacs-lisp/advice.el (ad-map-arglists):
+       * lisp/kermit.el (kermit-clean-on):
+       * lisp/mh-e/mh-comp.el (mh-repl-group-formfile):
+       * src/keyboard.c (Frecursive_edit):
+       Use curved quotes when quoting text containing apostrophe,
+       so that the apostrophe isn't curved in the output.
+
+2015-06-21  Nicolas Petton  <address@hidden>
+
+       Define `map-elt' as a generalized variable
+       * lisp/emacs-lisp/map.el (map-elt): Define a gv-expander.
+       * lisp/emacs-lisp/map.el (map--dispatch): Tighten the code.
+       * lisp/emacs-lisp/map.el (map-put): Redefine it as a function using a
+       `setf' with `map-elt'.
+       * test/automated/map-tests.el: Comment out `test-map-put-literal'.
+
+2015-06-21  Michael Albinus  <address@hidden>
+
+       Improve error handling in tramp-adb.el
+       * lisp/net/tramp-adb.el (tramp-adb-handle-file-local-copy):
+       Improve error handling.
+
+2015-06-21  Nicolas Petton  <address@hidden>
+
+       Reuse `alist-get' in map.el
+       * lisp/emacs-lisp/map.el (map-elt): Use `alist-get' to retrieve alist
+       elements.
+
+2015-06-21  Eli Zaretskii  <address@hidden>
+
+       Fix bytecomp-tests--warnings when $TMPDIR has a long name
+       * test/automated/bytecomp-tests.el (bytecomp-tests--warnings):
+       Allow the warning to begin on the 3rd, not only 2nd line, which
+       happens if temporary-file-directory has a very long name.
+
+       Expect 2 icalendar tests to fail on MS-Windows
+       * test/automated/icalendar-tests.el (icalendar-import-with-timezone)
+       (icalendar-real-world): Make them expected failures on MS-Windows.
+
+2015-06-20  Paul Eggert  <address@hidden>
+
+       Improve port of settings UI to older displays
+       * lisp/cus-start.el (standard): Don't assume curved quotes are
+       easily distinguishable when users are tinkering with a setting
+       that affects how curved quotes are generated.
+
+       Fix quoting in electric-quote-mode doc string
+       * lisp/electric.el (electric-quote-mode): Fix quoting.
+       This is a fallout from the recent change introducing
+       ‘help-quote-translation’.
+
+       Spelling fix
+
+       * doc/misc/texinfo.tex, lib/set-permissions.c: Merge from gnulib.
+
+       * src/doc.c (syms_of_doc): Remove unused symbols.
+
+2015-06-20  Martin Rudalics  <address@hidden>
+
+       In ‘window-state-put’ undedicate target window.  (Bug#20848)
+       * lisp/window.el (window-state-put): Undedicate target window
+       before putting STATE into it.  (Bug#20848)
+
+2015-06-19  Paul Eggert  <address@hidden>
+
+       Merge from origin/emacs-24
+       a5e6f33 Fixes: debbugs:20832
+       b9f02cf Fixes: debbugs:20832
+
+2015-06-19  Eli Zaretskii  <address@hidden>
+
+       Fix file-in-directory-p when the directory is UNC
+       * lisp/files.el (file-in-directory-p): Support files and
+       directories that begin with "//".  (Bug#20844)
+
+2015-06-19  Stephen Berman  <address@hidden>
+
+       (Bug#20832)
+       * lisp/calendar/todo-mode.el (todo-show): Don't visit todo file
+       in the minibuffer.
+
+2015-06-19  Nicolas Richard  <address@hidden>
+
+       (Bug#20832)
+       * lisp/calendar/todo-mode.el (todo-show): Signal an error
+       if buffer for adding new todo file is empty but modified.
+
+2015-06-19  Stefan Monnier  <address@hidden>
+
+       (filepos-to-bufferpos): Further tweaks to the utf-16 code
+       * lisp/international/mule-util.el (filepos-to-bufferpos):
+       Fix typo.  Move non-exact check to the utf-16 branch (the only one
+       affected).  Don't use byte-to-position for the utf-16 case.
+
+2015-06-19  Eli Zaretskii  <address@hidden>
+
+       Minor fixes in filepos-to-bufferpos
+       * lisp/international/mule-util.el (filepos-to-bufferpos): Remove
+       test for utf-8-emacs.  Exempt single-byte encodings from the
+       'use-exact' path when QUALITY is 'exact'.  Test UTF-16 encodings
+       for BOM before subtracting 2 bytes.  Use 'identity' when adjusting
+       UTF-16 encoded files for CR-LF EOLs.
+
+2015-06-19  Paul Eggert  <address@hidden>
+
+       Improve the optional translation of quotes
+       Fix several problems with the recently-added custom variable
+       help-quote-translation where the code would quote inconsistently
+       in help buffers.  Add support for quoting 'like this', which
+       is common in other GNU programs in ASCII environments.  Change
+       help-quote-translation to use more mnemonic values: values are now the
+       initial quoting char, e.g., (setq help-quote-translation ?`) gets the
+       traditional Emacs help-buffer quoting style `like this'.  Change the
+       default behavior of substitute-command-keys to match what's done in
+       set-locale-environment, i.e., quote ‘like this’ if displayable,
+       'like this' otherwise.
+       * doc/lispref/help.texi (Keys in Documentation): Document
+       new behavior of substitute-command-keys, and document
+       help-quote-translation.
+       * doc/lispref/tips.texi (Documentation Tips):
+       Mention the effect of help-quote-translation.
+       * etc/NEWS: Mention new behavior of substitute-command-keys,
+       and merge help-quote-translation news into it.
+       When talking about doc strings, mention new ways to type quotes.
+       * lisp/cedet/mode-local.el (overload-docstring-extension):
+       Revert my recent change to this function, which shouldn't be
+       needed as the result is a doc string.
+       * lisp/cedet/mode-local.el (mode-local-print-binding)
+       (mode-local-describe-bindings-2):
+       * lisp/cedet/srecode/srt-mode.el (srecode-macro-help):
+       * lisp/cus-theme.el (describe-theme-1):
+       * lisp/descr-text.el (describe-text-properties-1, describe-char):
+       * 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):
+       Use substitute-command-keys to ensure a more-consistent quoting
+       style in help buffers.
+       * lisp/cus-start.el (standard):
+       Document new help-quote-translation behavior.
+       * lisp/emacs-lisp/lisp-mode.el (lisp-fdefs):
+       * lisp/help-mode.el (help-xref-symbol-regexp, help-xref-info-regexp)
+       (help-xref-url-regexp):
+       * lisp/international/mule-cmds.el (help-xref-mule-regexp-template):
+       * lisp/wid-edit.el (widget-documentation-link-regexp):
+       Also match 'foo', in case we're in a help buffer generated when
+       help-quote-translation is ?'.
+       * src/doc.c: Include disptab.h, for DISP_CHAR_VECTOR.
+       (LEFT_SINGLE_QUOTATION_MARK, uLSQM0, uLSQM1, uLSQM2, uRSQM0)
+       (uRSQM1, uRSQM2, LSQM, RSQM): New constants.
+       (Fsubstitute_command_keys): Document and implement new behavior.
+       (Vhelp_quote_translation): Document new behavior.
+
+2015-06-18  Glenn Morris  <address@hidden>
+
+       * lisp/cus-start.el (help-quote-translation): Add :version.
+
+       * src/doc.c (Fsubstitute_command_keys): Make previous change compile.
+
+2015-06-18  Alan Mackenzie  <address@hidden>
+
+       Make translation of quotes to curly in doc strings optional.
+       src/doc.c (traditional, prefer-unicode): new symbols.
+       (help-quote-translation): new variable.
+       (Fsubstitute_command_keys): make translation of quotes dependent on
+       `help-quote-translation'; also translate curly quotes back to ASCII
+       ones.
+       lisp/cus-start.el (top-level): Add a customization entry for
+       `help-quote-translation'.
+
+2015-06-18  Artur Malabarba  <address@hidden>
+
+       * lisp/emacs-lisp/package.el: Don't always propagate async errors
+       (package--with-work-buffer-async): Only propagate the error if the
+       callback returns non-nil.
+       (package--download-one-archive): Return nil on the signature
+       checking callback if we accept unsigned.
+       (package--download-and-read-archives): Return non-nil on the
+       archive download callback.
+
+2015-06-18  Martin Rudalics  <address@hidden>
+
+       Fix last fix"
+
+       Set image_cache_refcount before x_default_parameter calls.  (Bug#20802)
+       * src/nsfns.m (Fx_create_frame):
+       * src/xfns.c (Fx_create_frame, x_create_tip_frame): Move setting
+       image_cache_refcount before first x_default_parameter call.
+
+2015-06-18  Eli Zaretskii  <address@hidden>
+
+       Improve and extend filepos-to-bufferpos
+       * lisp/international/mule-util.el (filepos-to-bufferpos--dos):
+       Don't barf if F returns nil for some argument.
+       (filepos-to-bufferpos): Expand to support UTF-16 and not assume
+       that every encoding of type 'charset' is single-byte.
+
+2015-06-18  Artur Malabarba  <address@hidden>
+
+       * lisp/emacs-lisp/package.el (package-menu--perform-transaction):
+       Properly delete packages.  (Bug#20836)
+
+2015-06-18  Eli Zaretskii  <address@hidden>
+
+       Update data files from just-released Unicode 8.0
+       * etc/NEWS: Update wording since Unicode 8.0 is no longer in draft
+       status.
+       * test/BidiCharacterTest.txt: Update from Unicode 8.0.
+       * admin/unidata/BidiMirroring.txt:
+       * admin/unidata/BidiBrackets.txt:
+       * admin/unidata/UnicodeData.txt: Update from Unicode 8.0.
+
+2015-06-18  Paul Eggert  <address@hidden>
+
+       Document curved quotes a bit better
+       * doc/emacs/basic.texi (Inserting Text):
+       Mention C-x 8.  Change example to use curved quote rather
+       than infinity, as this lets us give more ways to do it.
+       * doc/emacs/mule.texi (International Chars): Mention C-x 8 shortcuts
+       and quotation marks.
+       * doc/emacs/text.texi (Quotation Marks):
+       * doc/lispref/tips.texi (Documentation Tips):
+       Add "curly quotes" and "curved quotes" to the index.
+       * doc/emacs/text.texi (Quotation Marks):
+       Give the C-x 8 shorthands for curved quotes.
+       Cross-reference to "Quotation Marks".
+
+2015-06-17  Daiki Ueno  <address@hidden>
+
+       Add pinentry.el for better GnuPG integration
+       * lisp/pinentry.el: New file.
+       * etc/NEWS: Add entry about pinentry.el.
+       * lisp/epg.el (epg--start): Set INSIDE_EMACS envvar.
+       (Bug#20550)
+
+2015-06-17  Artur Malabarba  <address@hidden>
+
+       * lisp/emacs-lisp/package.el: Slightly better error reporting.
+
+2015-06-17  Stefan Monnier  <address@hidden>
+
+       (define-minor-mode): Use setq-default for :global minor modes
+       * lisp/emacs-lisp/easy-mmode.el (define-minor-mode):
+       Use setq-default for :global minor modes (bug#20712).
+
+2015-06-17  Eli Zaretskii  <address@hidden>
+
+       Avoid infloop in redisplay with tall images
+       * src/xdisp.c (try_scrolling): Prevent an infloop when scrolling
+       down near ZV.  (Bug#20808)
+       Call bidi_unshelve_cache to avoid memory leaks.  Use IT_CHARPOS
+       instead of CHARPOS.
+
+2015-06-17  Artur Malabarba  <address@hidden>
+
+       * lisp/emacs-lisp/package.el (package--with-work-buffer-async):
+       Fix error reporting.
+
+       * lisp/let-alist.el: move to lisp/emacs-lisp/let-alist.el
+
+       * lisp/emacs-lisp/package.el: Revert buffer after any operation
+       Call `package-menu--post-refresh' after any operation that changes
+       the package database (`package-install' and `package-delete').  To
+       avoid performance issues in large transactions, these functions
+       add `post-refresh' to `post-command-hook' instead of calling it
+       immediately.
+       (package-menu--mark-or-notify-upgrades): New function.
+       (list-packages): Add it to `package--post-download-archives-hook'.
+       (package-menu--post-refresh): Lose the upgrade-checking code, add
+       code to remove itself from `post-command-hook'.
+       (package-install, package-delete): Add it to `post-command-hook'.
+       (package-menu-execute): Don't call `package-menu--post-refresh'.
+
+2015-06-17  Stephen Leake  <address@hidden>
+
+       Add missing function xref-location-group for elisp-mode.
+       * lisp/progmodes/elisp-mode.el: Add missing function 
xref-location-group.
+
+2015-06-17  Wolfgang Jenkner  <address@hidden>
+
+       * src/editfns.c (Fbyte_to_position): Fix bytepos not at char boundary.
+       The behavior now matches the description in the manual.  (Bug#20783)
+
+2015-06-17  Xue Fuqiao  <address@hidden>
+
+       Update tutorials/TUTORIAL.cn
+       * etc/tutorials/TUTORIAL.cn: Update; synchronize with TUTORIAL.
+
+2015-06-17  Glenn Morris  <address@hidden>
+
+       Generate char-script-table from Unicode source.  (Bug#20789)
+       * admin/unidata/Makefile.in (AWK): New, set by configure.
+       (all): Add charscript.el.
+       (blocks): New variable.
+       (charscript.el, ${unidir}/charscript.el): New targets.
+       (extraclean): Also remove generated charscript.el.
+       * admin/unidata/blocks.awk: New script.
+       * admin/unidata/Blocks.txt: New data file, from unicode.org.
+       * lisp/international/characters.el: Load charscript.
+       * src/Makefile.in (charscript): New variable.
+       (${charscript}): New target.
+       (${lispintdir}/characters.elc): Depend on charscript.elc.
+       (temacs$(EXEEXT)): Depend on charscript.
+
+       * lisp/international/characters.el (char-script-table): Tweak
+       some ranges to better match the source.  (Bug#20789#17)
+
+       Remove "no-byte-compile: t" from a few files.
+       * lisp/obsolete/bruce.el, lisp/obsolete/keyswap.el:
+       * lisp/obsolete/patcomp.el: No reason not to compile these.
+
+2015-06-16  Glenn Morris  <address@hidden>
+
+       Fix some typos in copied Unicode data.  (Bug#20789)
+       * lisp/international/characters.el (char-script-table):
+       * lisp/international/fontset.el (script-representative-chars)
+       (setup-default-fontset): Fix typos.
+
+       * lisp/emacs-lisp/check-declare.el (check-declare-warn):
+       Don't print filename twice (it's in the prefix now).
+
+       * lisp/emacs-lisp/pcase.el (pcase--u1): Revert earlier workaround.
+       No longer needed.
+
+       Address a compilation warning.
+       * lisp/emacs-lisp/bytecomp.el (byte-compile-file-form-defalias):
+       Replace 't' with '_' in pcase.
+
+       Address some check-declare warnings.
+       * lisp/simple.el (tabulated-list-print):
+       * lisp/progmodes/elisp-mode.el (xref-collect-matches):
+       * lisp/term/ns-win.el (ns-selection-owner-p, ns-selection-exists-p)
+       (ns-get-selection): Update declarations.
+
+       Address some compilation warnings.
+       * lisp/elec-pair.el (electric-pair-post-self-insert-function):
+       * lisp/vc/vc-git.el (vc-git-file-type-as-string):
+       Replace 't' with '_' in pcase.
+
+       Address some compilation warnings.
+       * lisp/face-remap.el (text-scale-adjust):
+       * lisp/menu-bar.el (popup-menu-normalize-position):
+       * lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand):
+       * lisp/emacs-lisp/bytecomp.el (byte-compile-arglist-warn):
+       * lisp/emacs-lisp/generator.el (cps--transform-1):
+       * lisp/emacs-lisp/macroexp.el (macroexp--expand-all):
+       * lisp/obsolete/vc-arch.el (vc-arch-mode-line-string):
+       * lisp/progmodes/octave.el (octave-goto-function-definition)
+       (octave-find-definition-default-filename):
+       Replace 't' with '_' in pcase.
+
+       * lisp/emacs-lisp/pcase.el (pcase--u1):
+       Paper-over today's bootstrap failure.
+
+2015-06-16  Nicolas Petton  <address@hidden>
+
+       * lisp/emacs-lisp/seq.el: Fix a byte-compiler warnings related to pcase.
+
+       * lisp/emacs-lisp/map.el (map-into): Fix a byte-compiler warning.
+
+       Better confirmation message in `find-alternate-file' (Bug#20830)
+       * lisp/files.el (find-alternate-file'): Improve the confirmation
+       message to show the buffer name.
+
+       Better docstring for null. (Bug#20815)
+       * src/data.c (null): Improves the docstring, saying what null returns
+       when OBJECT is non-nil.
+
+2015-06-16  Stefan Monnier  <address@hidden>
+
+       * lisp/net/newst-treeview.el: Use lexical-binding.
+
+       (filepos-to-bufferpos): Add missing cases.  Make sure it terminates.
+       * lisp/international/mule-util.el (filepos-to-bufferpos--dos):
+       New auxiliary function, extracted from filepos-to-bufferpos.
+       Make sure it terminates.
+       (filepos-to-bufferpos): Use it to fix the latin-1-dos case.
+       Add support for the `exact' quality.
+
+2015-06-16  Cédric Chépied  <address@hidden>
+
+       Identify feeds in newsticker treeview with :nt-feed property
+       * lisp/net/newst-treeview.el:
+       (newsticker--treeview-nodes-eq): Use property :nt-feed instead of :tag.
+
+2015-06-16  Stefan Monnier  <address@hidden>
+
+       * lisp/emacs-lisp/pcase.el: Improve docs and error handling
+       (pcase--self-quoting-p): Floats aren't self-quoting.
+       (pcase): Tweak docstring.
+       (pcase--u1): Deprecate the t pattern.  Improve error detection for
+       the nil pattern.
+       (\`): Tweak docstring.  Signal an error for unrecognized cases.
+       (bug#20784)
+
+2015-06-16  Eli Zaretskii  <address@hidden>
+
+       Fix infloop in filepos-to-bufferpos
+       * lisp/international/mule-util.el (filepos-to-bufferpos): Fix EOL
+       offset calculation, and make it conditional on the eol-type of the
+       file's encoding.  (Bug#20825)
+
+2015-06-16  Martin Rudalics  <address@hidden>
+
+       Fix handling of image cache refcounts.  (Bug#20802)
+       This backports Eli Zaretskii's solution of this problem for W32
+       to X and NS.
+       * src/nsfns.m (image_cache_refcount): Define unconditionally.
+       (unwind_create_frame): If the image cache's reference count
+       hasn't been updated yet, do that now.
+       (Fx_create_frame): Set image_cache_refcount unconditionally.
+       * src/xfns.c (image_cache_refcount): Define unconditionally.
+       (unwind_create_frame): If the image cache's reference count
+       hasn't been updated yet, do that now.
+       (Fx_create_frame, x_create_tip_frame): Set image_cache_refcount
+       unconditionally.
+       * src/w32fns.c (image_cache_refcount): Make it a ptrdiff_t as on
+       X and NS.
+
+2015-06-16  Nils Ackermann  <address@hidden>
+
+       Improve reftex-label-regexps default value
+       * lisp/textmodes/reftex-vars.el (reftex-label-regexps): Make
+       keyvals label regexp more strict to better cope with unbalanced
+       brackets common in math documents.
+
+2015-06-16  Glenn Morris  <address@hidden>
+
+       * doc/emacs/calendar.texi (Format of Diary File):
+       Move "nonmarking" from here...
+       (Displaying the Diary): ... to here.
+
+       * doc/emacs/calendar.texi (Format of Diary File, Displaying the Diary):
+       Swap the order of these nodes.
+       * doc/emacs/emacs.texi: Update detailed menu for the above change.
+
+       * doc/emacs/calendar.texi (Specified Dates, Special Diary Entries):
+       Update date of examples.
+       (Diary, Format of Diary File): Move example from former to latter.
+       Reduce duplication.
+
+       No need for cp51932.el, eucjp-ms.el to not be compiled any more.
+       * admin/charsets/cp51932.awk, admin/charsets/eucjp-ms.awk:
+       Don't set no-byte-compile in the outputs.
+       * lisp/loadup.el: Don't specify uncompiled cp51932, eucjp-ms.
+
+2015-06-15  Glenn Morris  <address@hidden>
+
+       * lisp/calendar/calendar.el (diary-file): Use locate-user-emacs-file.
+       * doc/emacs/calendar.texi (Diary, Format of Diary File):
+       Update for above diary-file change.
+       : * etc/NEWS: Mention this.
+
+       * lisp/macros.el (name-last-kbd-macro, kbd-macro-query)
+       (apply-macro-to-region-lines): Use user-error.
+
+       * lisp/textmodes/page-ext.el (add-new-page, pages-directory)
+       (pages-directory-for-addresses): Doc fixes.
+
+2015-06-15  Stefan Monnier  <address@hidden>
+
+       * lisp/info.el: Cleanup bytepos/charpos issues
+       * lisp/international/mule-util.el: Use lexical-binding.
+       (filepos-to-bufferpos): New function.
+       * lisp/info.el (Info-find-in-tag-table-1): Use 0-based file positions.
+       (Info-find-node-2): Use filepos-to-bufferpos (bug#20704).
+       (Info-read-subfile, Info-search): Use 0-based file positions.
+
+       * lisp/progmodes/perl-mode.el: Refine handling of /re/ and y/abc/def/
+       (perl--syntax-exp-intro-keywords): New var.
+       (perl--syntax-exp-intro-regexp, perl-syntax-propertize-function): Use 
it.
+       (bug#20800).
+
+2015-06-15  Paul Eggert  <address@hidden>
+
+       Fix quoting when making derived mode docstring
+       * lisp/emacs-lisp/derived.el (derived-mode-make-docstring):
+       Nest regexp-quote inside format, not the reverse.
+       Problem reported by Artur Malabarba in:
+       http://lists.gnu.org/archive/html/emacs-devel/2015-06/msg00206.html
+
+2015-06-15  Eli Zaretskii  <address@hidden>
+
+       ;* src/fontset.c: Update obsolete commentary.
+
+       Fix current-iso639-language on MS-Windows
+       * lisp/international/mule-cmds.el (set-locale-environment):
+       Downcase the locale name before interning it.  This is so the
+       'current-iso639-language' on MS-Windows matches the ':lang'
+       property of font-spec objects.
+
+       Limit Symbola usage some more
+       * lisp/international/fontset.el (setup-default-fontset): Limit
+       Symbol coverage of Currency Symbols to u+20B6..u+20CF.
+       (Bug#20727)
+
+2015-06-15  Nicolas Petton  <address@hidden>
+
+       * lisp/emacs-lisp/map.el (map-let): Better docstring.
+
+2015-06-15  Paul Eggert  <address@hidden>
+
+       Spelling fixes
+
+2015-06-14  Glenn Morris  <address@hidden>
+
+       * lisp/version.el (emacs-repository-version-git): Demote errors.
+       Check result is a hash.
+
+2015-06-14  Artur Malabarba  <address@hidden>
+
+       * lisp/emacs-lisp/package.el (package--with-work-buffer-async):
+       Catch errors that happen before going async.  (Bug#20809)
+
+2015-06-14  Eli Zaretskii  <address@hidden>
+
+       Another improvement of documentation of set-fontset-font
+       * doc/lispref/display.texi (Fontsets): Say explicitly that
+       CHARACTER can be a single codepoint.
+       * src/fontset.c (Fset_fontset_font): Doc fix.
+
+       Another improvement for symbol and punctuation characters
+       * lisp/international/fontset.el (setup-default-fontset): Exclude
+       from Symbola character ranges for symbols and punctuation covered
+       well by popular Unicode fonts.  Prefer fixed-misc Unicode font, if
+       installed and where its coverage of symbols and punctuation is
+       known to be good.  (Bug#20727)
+
+2015-06-14  Christoph Wedler  <address@hidden>
+
+       Some generic support for multi-mode indentation.
+               * lisp/progmodes/prog-mode.el (prog-indentation-context): New
+               variable.
+               (prog-first-column, prog-widen): New convenience functions.
+
+2015-06-14  Artur Malabarba  <address@hidden>
+
+       * lisp/emacs-lisp/tabulated-list.el (tabulated-list-print):
+       Don't assume that `tabulated-list-printer' will leave point at the
+       end of the buffer.  (Bug#20810)
+
+2015-06-13  Glenn Morris  <address@hidden>
+
+       Tweaks for getting repository version; a bit more like it was for bzr.
+       * lisp/version.el (emacs-repository-version-git)
+       (emacs-repository--version-git-1): New functions,
+       split from emacs-repository-get-version.
+       (emacs-repository-get-version): Make the second argument meaningful.
+
+       * lisp/startup.el (command-line-1): Inform if skipping relative
+       file names due to deleted PWD.
+
+       * src/xsmfns.c (x_session_initialize): Avoid libSM crash
+       when starup directory is missing.  (Bug#18851)
+       (errno.h): Include it.
+
+2015-06-13  Paul Eggert  <address@hidden>
+
+       Better fix for documenting `X as "`X"
+       Fix suggested by Stefan Monnier.
+       * lisp/help-fns.el (help-fns--signature):
+       Insert "`X", not "(\` X)", when documenting `X (Bug#20759).
+       * lisp/help.el (help-split-fundoc, help--make-usage-docstring):
+       Don't treat `X specially, as help-fns--signature now handles this.
+
+2015-06-13  Eli Zaretskii  <address@hidden>
+
+       Improve the default fontset when Symbola is not installed
+       * lisp/international/fontset.el (setup-default-fontset): Only
+       prepend Symbola and FreeMono font specs for symbols and
+       punctuation; do not replace the default spec for them.  This
+       should have better results when Symbola/FreeMono are not
+       installed.  (Bug#20727)
+
+       Improve documentation of ':lang' in font specs
+       * src/font.c (Ffont_spec): Doc fix: elaborate on the values and
+       use of the ':lang' property of the font spec.
+       * doc/emacs/frames.texi (Fonts): Document the language names that
+       can be in the STYLE part of XLFD.
+       * doc/lispref/display.texi (Low-Level Font): Document the ':lang'
+       property.
+
+       * nt/README: Don't advertise the (obsolescent) w32 FAQ.
+
+       * nt/README.W32: Don't advertise the (obsolescent) w32 FAQ.
+
+       Revert last change in fontset.el
+       * lisp/international/fontset.el (setup-default-fontset): Revert
+       the change "Configure Symbola font only if installed", since font
+       search is evidently not yet set up when this function is called.
+       (Bug#20727)
+
+2015-06-12  Glenn Morris  <address@hidden>
+
+       Ensure early startup warnings are visible at the end.  (Bug#20792)
+       * lisp/emacs-lisp/warnings.el (display-warning):
+       If startup isn't complete, delay the warning.
+       * lisp/startup.el (normal-top-level, command-line):
+       Let display-warning automatically handle the needed delays.
+       Run delayed-warnings-hook.
+
+       * lisp/version.el (emacs-repository-get-version):
+       Avoid calling external executable if possible.  (Bug#20799)
+
+2015-06-12  Paul Eggert  <address@hidden>
+
+       Document `X as "`X", not as "(` X)"
+       * lisp/help.el (help-split-fundoc, help--make-usage-docstring):
+       Document (backquote FOO) as "`FOO", not as "(` FOO)" (Bug#20759).
+
+       * src/print.c (print_object): Minor simplification.
+
+2015-06-12  Glenn Morris  <address@hidden>
+
+       * src/buffer.c (init_buffer): Add final newline to message.
+
+2015-06-12  Paul Eggert  <address@hidden>
+
+       Configure Symbola font only if installed
+       * lisp/international/fontset.el (setup-default-fontset):
+       Don't specify the Symbola font if it's not installed.
+       Likewise for FreeMono.  (Bug#20727)
+
+2015-06-12  Eli Zaretskii  <address@hidden>
+
+       Configure Symbola font only for symbols and punctuation
+       * lisp/international/fontset.el (setup-default-fontset): Leave
+       only symbols and punctuation in the fontset setup for Symbola
+       font; remove "Greek and Coptic" and "Cyrillic Supplement".
+       (Bug#20798)
+
+2015-06-12  Andreas Schwab  <address@hidden>
+
+       Fix crash in fontset-info
+       * src/fontset.c (Ffontset_info): Check that the RFONT-DEF elt is
+       non-nil.
+
+2015-06-12  Paul Eggert  <address@hidden>
+
+       Port to Solaris 10 sparc + Sun C 5.13
+       * configure.ac (SETUP_SLAVE_PTY) [sol2* | unixware]:
+       Adjust to process.c change.
+       * src/process.c (create_process): Declare volatile variables at
+       top level of this function, so that they're less likely to be
+       reused later in the function in the code executed by the vforked
+       child.  Do not declare locals used only in the vforked child, as
+       they might share memory with locals still live in the parent.
+       Instead, use the same variables in the child as in the parent.
+       This works around a subtle bug that causes a garbage collector
+       crash when Emacs is built with Sun C 5.13 sparc on Solaris 10.
+
+2015-06-12  Glenn Morris  <address@hidden>
+
+       * lisp/startup.el (normal-top-level): Don't let *Messages* get
+       a nil default-directory.
+
+2015-06-11  Glenn Morris  <address@hidden>
+
+       * lisp/startup.el (normal-top-level): Use delay-warning.  (Bug#20792)
+
+       Some progress towards starting with PWD deleted.  (Bug#18851)
+       * src/buffer.c (init_buffer): Handle get_current_dir_name failures.
+       * lisp/startup.el (normal-top-level, command-line-1):
+       * lisp/minibuffer.el (read-file-name-default):
+       Handle default-directory being nil.
+
+2015-06-11  Paul Eggert  <address@hidden>
+
+       Fix "not a tty" bug on Solaris 10
+       * configure.ac (PTY_OPEN): Define to plain 'open'
+       on SVR4-derived hosts, so that the O_CLOEXEC flag isn't set.
+       * src/process.c (allocate_pty): Set the O_CLOEXEC flag after
+       calling PTY_TTY_NAME_SPRINTF, for the benefit of SVR4-derived
+       hosts that call grantpt which does its work via a setuid subcommand
+       (Bug#19191, Bug#19927, Bug#20555, Bug#20686).
+       Also, set O_CLOEXEC even if PTY_OPEN is not defined, since it
+       seems relevant in that case too.
+
+2015-06-11  Juri Linkov  <address@hidden>
+
+       * lisp/bindings.el (debug-ignored-errors): Add mark-inactive.
+       * lisp/simple.el (kill-region): Replace 'error' with 'user-error'.
+       (Bug#20785)
+
+2015-06-11  Glenn Morris  <address@hidden>
+
+       * lisp/international/characters.el (char-script-table): Fix typo.
+
+2015-06-11  Paul Eggert  <address@hidden>
+
+       Fix quoting of help for functions with odd names
+       While investigating Bug#20759, I discovered other quoting problems:
+       C-h f mishandled characters like backslash and quote in function names.
+       This fix changes the behavior so that 'C-h f pcase RET' now
+       generates "... (\` QPAT) ..." instead of "... (` QPAT) ...",
+       because '(format "%S" '(` FOO))' returns "(\\` FOO)".  A comment
+       in src/lread.c's read1 function says that the backslash will be
+       needed starting in Emacs 25, which implies that 'format' is
+       correct and the old pcase documention was wrong to omit the backslash.
+       * lisp/emacs-lisp/nadvice.el (advice--make-docstring):
+       * lisp/help-fns.el (help-fns--signature):
+       * lisp/help.el (help-add-fundoc-usage):
+       * lisp/progmodes/elisp-mode.el (elisp-function-argstring):
+       Use help--make-usage-docstring rather than formatting
+       help-make-usage.
+       * lisp/emacs-lisp/pcase.el (pcase--make-docstring):
+       Return raw docstring.
+       * lisp/help-fns.el (help-fns--signature): New arg RAW, to return
+       raw docstring.  Take more care to distinguish raw from cooked dstrings.
+       (describe-function-1): Let help-fns--signature substitute
+       command keys.
+       * lisp/help.el (help--docstring-quote): New function.
+       (help-split-fundoc): Use it, to quote funny characters more
+       systematically.
+       (help--make-usage): Rename from help-make-usage, since this
+       should be private.  Leave an obsolete alias for the old name.
+       (help--make-usage-docstring): New function.
+       * test/automated/help-fns.el (help-fns-test-funny-names): New test.
+
+2015-06-11  Stefan Monnier  <address@hidden>
+
+       * lisp/thingatpt.el (in-string-p): Revert last change,
+       since in-string-p is not used in thingatpt.el but only from outside.
+       Also, use lexical binding.
+
+2015-06-11  Artur Malabarba  <address@hidden>
+
+       * lisp/let-alist.el (let-alist--deep-dot-search): Fix cons
+       * test/automated/let-alist.el (let-alist-cons): Test it.
+
+2015-06-11  Nicolas Richard  <address@hidden>
+
+       * src/syntax.c (Fbackward_prefix_chars): Reword docstring
+
+2015-06-10  Glenn Morris  <address@hidden>
+
+       * build-aux/gitlog-to-emacslog: Also ignore pointless merge commits.
+
+       Improve generated ChangeLog for gitmerge.el commits.  (Bug#20717)
+       * build-aux/gitlog-to-changelog: Handle gitmerge.el skipped commits.
+       * admin/gitmerge.el (gitmerge-commit-message):
+       Exclude "skipped" messages from ChangeLog once again.
+
+       Slight namespace cleanup for thingatpt.el.
+       * lisp/thingatpt.el (thing-at-point--in-string-p)
+       (thing-at-point--end-of-sexp, thing-at-point--beginning-of-sexp)
+       (thing-at-point--read-from-whole-string): Rename from
+       old versions without "thing-at-point--" prefix.
+       Keep old versions as obsolete aliases.  Update all uses.
+
+       * lisp/emacs-lisp/checkdoc.el (checkdoc-get-keywords):
+       Move requiring of finder from here...
+       (checkdoc-package-keywords): ... to here.
+
+       Use 'user-error' in a few calendar files.
+       * lisp/calendar/appt.el (appt-add):
+       * lisp/calendar/calendar.el (calendar-absolute-from-gregorian)
+       (calendar-generate):
+       * lisp/calendar/diary-lib.el (diary-mail-entries, diary-cyclic):
+       Replace 'error' with 'user-error'.
+
+       * lisp/progmodes/f90.el (f90-backslash-not-special): Use user-error.
+
+       * lisp/files-x.el (add-file-local-variable):
+       Special-case 'lexical-binding'.  (Bug#20641)
+
+       * lisp/progmodes/executable.el (executable-self-display): Obsolete.
+       No longer autoload.
+       * doc/misc/autotype.texi (Executables):
+       Undocument executable-self-display.
+
+       * lisp/progmodes/executable.el (executable-self-display):
+       Use non-obsolete tail syntax.  (Bug#20779)
+       (executable-self-display): Doc update.
+
+2015-06-10  Stefan Monnier  <address@hidden>
+
+       * lisp/emacs-lisp/checkdoc.el: Use lexical-binding
+       (finder-known-keywords): Silence byte-compiler.
+
+2015-06-09  Stefan Monnier  <address@hidden>
+
+       * lisp/simple.el (eval-expression): Macroexpand before evaluating 
(bug#20730)
+
+       * lisp/progmodes/sh-script.el: Better handle nested quotes
+       (sh-here-doc-open-re): Don't mis-match the <<< operator (bug#20683).
+       (sh-font-lock-quoted-subshell): Make sure double quotes within single
+       quotes don't mistakenly end prematurely the surrounding string.
+
+       * lisp/progmodes/elisp-mode.el: Require cl-lib for cl-defstruct.
+
+2015-06-09  Glenn Morris  <address@hidden>
+
+       * test/automated/Makefile.in (ELFILES): Sort.
+
+       * Makefile.in (SUBDIR_MAKEFILES):
+       * lwlib/Makefile.in (WARN_CFLAGS):
+       Use built-in Make functions rather than echo+sed.
+
+2015-06-09  Eli Zaretskii  <address@hidden>
+
+       Update char-script-table
+       * lisp/international/characters.el (char-script-table): Update
+       from Unicode 8.0 Draft.
+
+       Improve font selection for punctuation and other symbols
+       * src/fontset.c (face_for_char): If the character's script is
+       'symbol', and the font used for ASCII face has a glyph for it, use
+       the font for the ASCII face instead of searching the fontsets.
+       This comes instead of NS-specific code that used the current
+       face's font instead, which is now disabled due to undesirable
+       consequences.  (Bug#20727)
+
+2015-06-08  Dmitry Gutov  <address@hidden>
+
+       Skip past `#' to find BEG
+       * lisp/progmodes/elisp-mode.el (elisp-completion-at-point): Skip
+       past `#' to find BEG (bug#20771).
+       * test/automated/elisp-mode-tests.el
+       (elisp-completes-functions-after-hash-quote): New test.
+
+2015-06-08  Eli Zaretskii  <address@hidden>
+
+       Fix compilation warning/error in --without-x builds
+       * src/xdisp.c (append_space_for_newline): Condition GUI-specific
+       code on HAVE_WINDOW_SYSTEM.
+
+       Improve the default fontset wrt symbols
+       * lisp/international/fontset.el (setup-default-fontset): Better
+       setup of fontset-default for symbols: use Symbola and FreeMono.
+       (Bug#20727)
+
+2015-06-08  Oleh Krehel  <address@hidden>
+
+       Add new command checkdoc-package-keywords
+       * lisp/emacs-lisp/checkdoc.el (checkdoc-package-keywords-flag): New
+         defcustom.
+       (checkdoc-list-of-strings-p): Add doc.
+       (checkdoc-current-buffer): When `checkdoc-package-keywords-flag' is
+       non-nil, call `checkdoc-package-keywords'.
+       (checkdoc-get-keywords): New defun.
+       (checkdoc-package-keywords): New command. Warns if the current file
+       has package.el-style keywords that aren't in `finder-known-keywords'.
+       * etc/NEWS: Add entry.
+
+2015-06-08  Eli Zaretskii  <address@hidden>
+
+       Avoid crashes when key-binding is called from a timer
+       * src/keymap.c (Fkey_binding): Don't segfault if called with an
+       empty vector as KEY.  (Bug#20705)
+
+       Fix a thinko in arc-mode.el
+       * lisp/arc-mode.el (archive-zip-summarize): Fix last change in the
+       non-Zip64 case.  (Bug#20769)
+
+2015-06-08  Artur Malabarba  <address@hidden>
+
+       * lisp/emacs-lisp/package.el (package-delete): Make interactive
+
+2015-06-08  Oleh Krehel  <address@hidden>
+
+       checkdoc.el (checkdoc-file): New function
+       * lisp/emacs-lisp/checkdoc.el (checkdoc-error): When
+         `checkdoc-diagnostic-buffer' is set to "*warn*", print the warning
+         to the standard output.
+       (bug#20754)
+
+2015-06-07  Glenn Morris  <address@hidden>
+
+       * admin/update_autogen (changelog_files): Remove gitlog-to-emacslog.
+
+       * src/font.c (syms_of_font) <font-log>: Doc fix.
+
+       Remove the obsolete leading "*" from some C doc strings.
+       * src/coding.c (syms_of_coding):
+       * src/font.c (syms_of_font): Remove leading "*" from docs.
+       * lisp/cus-start.el (enable-character-translation): Add it.
+
+2015-06-07  Paul Eggert  <address@hidden>
+
+       Move gen_origin from program to data
+       That way, 'make change-history' needs to change only ChangeLog.2,
+       instead of having to change two files.
+       * ChangeLog.2: Add commit info for range that this file covers.
+       * Makefile.in (new_commit_regexp): New macro.
+       (change-history-nocommit): Simplify, by putting what used to be
+       the gen_origin value into the data (ChangeLog.2) rather than
+       into the program (gitlog-to-emacslog).
+       * build-aux/gitlog-to-emacslog (gen_origin): Calculate from
+       the input file (e.g., ChangeLog.2) rather than by having a
+       constant in the program.  Substitute it into the output.
+
+2015-06-07  Dmitry Gutov  <address@hidden>
+
+       Escape any quotes in the function name
+       * lisp/help-fns.el (help-fns--signature): Quote any quotes in the
+       function name (bug#20759).
+
+2015-06-07  Eli Zaretskii  <address@hidden>
+
+       Adapt 'struct timespec' to next release of MinGW runtime
+       * nt/inc/ms-w32.h (struct timespec): Don't declare if
+       __struct_timespec_defined is defined.
+
+2015-06-06  Paul Eggert  <address@hidden>
+
+       Merge from gnulib
+       This incorporates:
+       2015-06-06 acl-permissions: pacify -Wsuggest-attribute=const
+       2015-06-05 stdio: Don't redefine gets when using C++
+       2015-06-05 acl-permissions: port to AIX, C89 HP-UX
+       2015-06-02 file-has-acl: fix build on Mac OS X 10
+       2015-06-01 gnulib-tool: concatenate lib_SOURCES to a single line
+       2015-06-01 pthread_sigmask: discount system version if a simple macro
+       2015-05-31 readlinkat: avoid OS X 10.10 trailing slash bug
+       * doc/misc/texinfo.tex, lib/acl-internal.h, lib/get-permissions.c:
+       * lib/readlinkat.c, lib/set-permissions.c, lib/stdio.in.h:
+       * m4/acl.m4, m4/pthread_sigmask.m4, m4/readlinkat.m4: Copy from gnulib.
+       * lib/gnulib.mk: Regenerate.
+
+2015-06-06  Juri Linkov  <address@hidden>
+
+       * lisp/progmodes/grep.el (zrgrep): Let-bind grep-highlight-matches
+       before calling grep-compute-defaults because now it affects the
+       command lines computed in grep-compute-defaults. (Bug#20728)
+
+2015-06-06  Glenn Morris  <address@hidden>
+
+       Address some compilation warnings.
+       * lisp/international/mule-cmds.el (w32-get-console-codepage)
+       (w32-get-console-output-codepage):
+       * lisp/progmodes/elisp-mode.el (xref-collect-references):
+       * lisp/version.el (cairo-version-string): Declare.
+       * lisp/erc/erc.el (erc-nickname-in-use): Fix typo.
+
+2015-06-06  Eli Zaretskii  <address@hidden>
+
+       Fix display when a font claims large values of ascent and descent
+       This fixes bug#20628.
+       * src/xdisp.c (get_phys_cursor_geometry): Correct the Y
+       coordinate of a hollow cursor glyph when the original glyph's
+       ascent is too small.
+       (get_font_ascent_descent, normal_char_ascent_descent)
+       (normal_char_height): New functions.
+       (handle_single_display_spec, append_space_for_newline)
+       (calc_pixel_width_or_height, produce_stretch_glyph)
+       (calc_line_height_property): Use normal_char_ascent_descent and
+       normal_char_height.
+       (x_produce_glyphs): When font-global values of ascent and descent
+       are too large, use per-character glyph metrics instead, if
+       possible.  But don't allow the glyph row's ascent and descent
+       values become smaller than the values from the metrics of the
+       font's "normal" character.
+       * src/xftfont.c (xftfont_draw):
+       * src/w32font.c (w32font_draw): Correct the values of ascent and
+       descent used to draw glyphless characters' hex code in a box.
+       * src/xterm.c (x_draw_glyph_string_background):
+       * src/xdisp.c (x_produce_glyphs):
+       * src/w32term.c (x_draw_glyph_string_background):
+       * src/nsterm.m (ns_maybe_dumpglyphs_background): Use FONT_TOO_HIGH
+       to detect fonts whose global ascent and descent values are too
+       large to be used in layout decision, and redraw the background
+       when that happens.
+       * src/dispextern.h (FONT_TOO_HIGH): New macro.
+       (get_font_ascent_descent): Add prototype.
+       * src/xterm.c (x_new_font):
+       * src/w32term.c (x_new_font):
+       * src/nsterm.m (x_new_font):
+       * src/font.c (font_open_entity):
+       * src/composite.c (composition_gstring_width): Use
+       get_font_ascent_descent to obtain reasonable values for ascent and
+       descent of a font.
+
+2015-06-06  Nicolas Richard  <address@hidden>
+
+       Add assertion in adjust_point_for_property
+       * src/keyboard.c (adjust_point_for_property): Add eassert for
+       current buffer being shown in selected window.
+
+2015-06-06  Dmitry Gutov  <address@hidden>
+
+       Replace uses of in-string-p; make it obsolete
+       * lisp/thingatpt.el (in-string-p): Declare obsolete (bug#20732).
+       (end-of-sexp, beginning-of-sexp): Use syntax-ppss instead.
+
+2015-06-06  Eli Zaretskii  <address@hidden>
+
+       Fix Dired display of an explicit list of files by ls-lisp.el
+       * lisp/ls-lisp.el (ls-lisp-uid-d-fmt, ls-lisp-uid-s-fmt)
+       (ls-lisp-gid-d-fmt, ls-lisp-gid-s-fmt): Make the initial values be
+       correct for when displaying individual files separately, not as
+       part of listing a directory, in which case these values are not
+       recomputed by 'ls-lisp-insert-directory', but used verbatim.
+
+       * lisp/dired.el (dired): Doc fix.  (Bug#20739)
+
+2015-06-06  Nicolas Richard  <address@hidden>
+
+       Do not adjust point in a non-selected window
+       * src/keyboard.c (command_loop_1): Do not adjust point when
+       current buffer is not shown in selected window (Bug#20590).
+
+       * etc/DEBUG: Mention 'maybe_call_debugger'
+
+2015-06-05  Nicolas Petton  <address@hidden>
+
+       Fix a unit test for map.el
+       * test/automated/map-tests.el (test-map-let): Fix the test to work
+       with the new syntax of `map-let'.
+
+       * lisp/emacs-lisp/map.el (map-let): Better docstring.
+
+       Better syntax for the map pcase pattern
+       * lisp/emacs-lisp/map.el: Improves the map pcase pattern to take
+       bindings of the form (KEY PAT) or SYMBOL. KEY is not quoted.
+
+       * lisp/emacs-lisp/map.el (map--dispatch): Better docstring.
+
+       Fix a byte-compiler error in map-put and map-delete
+       * lisp/emacs-lisp/map.el (map-put, map-delete): Ensure that `setq' is
+       called with a symbol.
+
+2015-06-05  Glenn Morris  <address@hidden>
+
+       * admin/gitmerge.el (gitmerge-commit-message):
+       Revert to including "skipped" messages in ChangeLog once again.
+
+2015-06-05  Tassilo Horn  <address@hidden>
+
+       Use string> instead of equiv lambda with string<
+       * lisp/help.el (view-emacs-news): Use string> instead of equivalent
+       lambda with string<.
+
+2015-06-05  Glenn Morris  <address@hidden>
+
+       * lisp/emacs-lisp/map.el (map--dispatch): Move before use.
+       (map--delete-array): Fix typo.
+
+       * test/automated/map-tests.el: Replace "assert" with "should".
+
+       * lisp/Makefile.in (SUBDIRS): Rename from SUBDIRS_ABS.
+       (SUBDIRS_REL): Derive from SUBDIRS.
+
+       Tweak some build messages.
+       * lisp/Makefile.in ($(lisp)/loaddefs.el):
+       * lisp/cus-dep.el (custom-make-dependencies):
+       * lisp/finder.el (finder-compile-keywords): Say what we are doing.
+       * lisp/international/titdic-cnv.el (batch-titdic-convert):
+       Don't say how to compile.
+
+2015-06-05  Paul Eggert  <address@hidden>
+
+       Omit U+0332 COMBINING LOW LINE in previous change
+       It turns out that it does not work on Ubuntu 15.04.
+
+       Fix transliteration of Bahá'í months
+       * lisp/calendar/cal-bahai.el (calendar-bahai-month-name-array):
+       Improve quality of Latin transliteration of Bahá'í month names.
+
+       Fix curved quotes in a few places
+       * lisp/calc/calc-misc.el (calc-help): Fix quoting.
+       The strings in question are not doc strings, so this partially
+       undoes the recent change that assumed they were doc strings.
+       * lisp/cedet/srecode/srt-mode.el (srecode-macro-help):
+       * lisp/info.el (Info-finder-find-node):
+       Use curved quotes.
+       * lisp/emacs-lisp/derived.el (derived-mode-make-docstring):
+       Also allow curved quotes in doc strings.
+
+2015-06-04  Glenn Morris  <address@hidden>
+
+       * lisp/Makefile.in (AM_V_at): Add missing definition.
+
+       * lisp/Makefile.in: Quieten output a bit.
+       ($(lisp)/cus-load.el, $(lisp)/finder-inf.el):
+       Don't echo directories, since the commands we invoke print them.
+
+       * lisp/Makefile.in: Replace shell fragments in variables with $(shell).
+       (SUBDIRS_REL, SUBDIRS_ABS, SUBDIRS_ALMOST, SUBDIRS_FINDER)
+       (SUBDIRS_SUBDIRS): New variables.
+       (setwins, setwins_almost, setwins_finder, setwins_for_subdirs):
+       Remove.
+       ($(lisp)/cus-load.el, $(lisp)/finder-inf.el, $(lisp)/loaddefs.el)
+       (update-subdirs, compile-main, compile-clean):
+       Replace "setwins" usage with new "SUBDIRS" variables.
+
+       * lisp/vc/compare-w.el (compare-windows-get-window-function):
+       Fix :version tag.
+
+2015-06-04  YAMAMOTO Mitsuharu  <address@hidden>
+
+       * src/ftfont.c (ftfont_open2): Round divisions by upEM.
+
+       Undo removal of x_clear_area call on expose for GTK3 or cairo.
+       * src/xterm.c (handle_one_xevent) [HAVE_GTK3 || USE_CAIRO]: Clear
+       exposed area.  (Bug#20677)
+
+2015-06-04  Glenn Morris  <address@hidden>
+
+       * doc/lispref/hash.texi (Creating Hash): Remove obsolete makehash.
+
+       * lisp/Makefile.in (check-defun-dups): Also skip ldefs-boot.
+
+       * lisp/leim/quail/lrt.el (quail-lrt-update-translation):
+       Rename from quail-lao-update-translation, since lao.el defines that.
+
+2015-06-04  Dmitry Gutov  <address@hidden>
+
+       Handle new-style advice in find-funct
+       * lisp/emacs-lisp/find-func.el (find-function-advised-original):
+       Handle new-style advice.  Return the symbol's function definition.
+       (Bug#20718)
+       (find-function-library): Update accordingly.
+
+2015-06-04  Nicolas Petton  <address@hidden>
+
+       Merge branch 'map'
+
+       * lisp/emacs-lisp/map.el: Better docstring for the map pcase macro.
+
+       Add new function string-greaterp
+       * lisp/subr.el (string-greaterp): New function.  Also aliased to
+       `string>'.
+       * test/automated/subr-tests.el (string-comparison-test): Add unit
+       tests for `string>'and `string<'.
+       * src/fns.c (string-lessp): Better docstring.
+
+2015-06-04  Eli Zaretskii  <address@hidden>
+
+       Fix timezone-related functions on MS-Windows
+       * src/editfns.c (set_time_zone_rule) [WINDOWSNT]: Always call
+       'xputenv', even if no reallocation of tzvalbuf was necessary.
+       This fixes a bug in timezone-related functions on MS-Windows.
+       Reported by Fabrice Popineau <address@hidden>.
+
+2015-06-03  Paul Eggert  <address@hidden>
+
+       Don't pass raw directory name to 'error'
+       * lisp/files.el (basic-save-buffer-2): Avoid format error if
+       a directory name contains a string like "%s".
+
+2015-06-03  Dmitry Gutov  <address@hidden>
+
+       Override 'grep --color=always'
+       * lisp/progmodes/xref.el (xref-collect-matches):
+       Override --color=always in grep-find-template.
+
+2015-06-03  Michael Albinus  <address@hidden>
+
+       Fix error introduced recently in file-notify-tests.el
+       * test/automated/file-notify-tests.el
+       (file-notify--test-remote-enabled): Do not use `file-notify--test-desc'.
+       (file-notify--deftest-remote): Revert previous patch, not
+       necessary anymore.
+
+2015-06-03  Wolfgang Jenkner  <address@hidden>
+
+       * src/indent.c (Fvertical_motion): Amend motion by 0 lines.
+       Starting from a display string after a newline, point went to the
+       previous line.  Also, fix an inadvertent use of a buffer position
+       with FETCH_BYTE.  (Bug#20701)
+
+2015-06-03  Michael Albinus  <address@hidden>
+
+       Instrument file-notify-test.el in order to catch hydra error.
+       * test/automated/file-notify-tests.el (file-notify--deftest-remote):
+       Wrap body by `ignore-case', in order to trap non-local errors.
+
+2015-06-03  YAMAMOTO Mitsuharu  <address@hidden>
+
+       Undo previous changes in non-toolkit scroll bar drawing.
+       * src/xterm.c (x_scroll_bar_set_handle, x_scroll_bar_expose)
+       [!USE_TOOLKIT_SCROLL_BARS]: Draw into scroll bar window.  (Bug#20668)
+
+2015-06-03  Paul Eggert  <address@hidden>
+
+       * .gitignore: Also ignore doc/*/*/*.html and .ps.
+
+       Support quotes 'like this' in info files
+       This is possible when 'makeinfo --disable-encoding' is used
+       in Texinfo 5.
+       * lisp/calc/calc-help.el (calc-describe-thing):
+       * lisp/gnus/gnus-art.el (gnus-button-alist):
+       * lisp/info.el (Info-find-index-name):
+       * lisp/vc/ediff-help.el (ediff-help-for-quick-help):
+       Also support quotes 'like this'.
+       * lisp/calc/calc-help.el (calc-describe-thing): Simplify.
+       * lisp/finder.el (finder-font-lock-keywords): Remove var that
+       hasn't been used in years, instead of bothering to fix its quoting.
+
+2015-06-02  Paul Eggert  <address@hidden>
+
+       * .gitignore: Remove !test/etags/html-src/*.html.
+       It's no longer needed, since *.html was removed.  Sort.
+
+2015-06-02  Dmitry Gutov  <address@hidden>
+
+       Restore <D> instead of '.' in grep-find-template
+       * lisp/cedet/semantic/symref/grep.el
+       (semantic-symref-grep-use-template): Update a comment.
+       * lisp/progmodes/grep.el (grep-compute-defaults): Restore <D>
+       instead of '.' in grep-find-template (bug#20719).
+       (rgrep): Pass nil as the directory to rgrep-default-command.
+       * lisp/progmodes/grep.el (grep-expand-keywords): Use '.' as the
+       default value for DIR.
+       * lisp/progmodes/xref.el (xref-collect-matches): Drop the
+       workaround.
+
+2015-06-02  Glenn Morris  <address@hidden>
+
+       * configure.ac (emacs_config_features): Add X toolkit and scroll-bars.
+
+       * configure.ac (emacs_config_features): Add Cairo.
+
+       * configure.ac [HAVE_GTK3]: Remove USE_CAIRO that gets reset later.
+
+2015-06-02  Michael Albinus  <address@hidden>
+
+       Ensure, that autorevert works for remote files in file-notify-tests.el
+       * test/automated/file-notify-tests.el (file-notify--test-desc):
+       New defvar.
+       (file-notify--test-remote-enabled)
+       (file-notify-test00-availability, file-notify-test01-add-watch)
+       (file-notify-test02-events): Use it.
+       (file-notify--test-event-test): Check proper descriptor.
+       (file-notify-test03-autorevert): Ensure, that
+       `visited-file-modtime' has changed.
+       (Bug#20392)
+
+2015-06-02  Nicolas Petton  <address@hidden>
+
+       Add a pcase pattern for maps and `map-let' based on it
+       * lisp/emacs-lisp/map.el (map-let): New macro.
+       (map--make-pcase-bindings, map--make-pcase-patterns): New functions.
+       * test/automated/map-tests.el: New test for `map-let'.
+
+2015-06-02  Dmitry Gutov  <address@hidden>
+
+       Reuse rgrep mechanics in xref-find-regexp
+       * lisp/progmodes/grep.el (rgrep-default-command):
+       Extract from `rgrep'.
+       * lisp/progmodes/xref.el (xref-collect-references): Split from
+       `xref-collect-matches'.  Only handle the case of symbol search.
+       (xref-collect-matches): Instead of Semantic Symref, use
+       `rgrep-default-command', to take advantage of its directory and
+       file ignore settings.
+       (xref--collect-match): Remove the last argument, leaving the
+       regexp construction up to the caller.
+       * lisp/progmodes/elisp-mode.el (elisp--xref-find-matches):
+       Change to take the xref-collect- function to use as an argument.
+       (elisp-xref-find): Update accordingly.
+       * lisp/progmodes/etags.el (etags--xref-find-matches)
+       (etags-xref-find): Same.
+
+       Move xref-elisp-location to elisp-mode.el
+       * lisp/progmodes/xref.el (xref-elisp-location)
+       (xref-make-elisp-location, xref-location-marker): Remove here.
+       (xref--xref): Don't limit the type of the location slot.
+       * lisp/progmodes/elisp-mode.el (xref-elisp-location):
+       Define as a cl-struct here.
+       (xref-location-marker): Move here.
+
+2015-06-02  Eli Zaretskii  <address@hidden>
+
+       Minor tweaks for .gitignore
+       * .gitignore: Don't ignore versioned *.html and *.ps files.  Don't
+       ignore admin/notes/tags that might be ignored as TAGS on
+       case-insensitive filesystems.  (Bug#20710)
+
+2015-06-02  Paul Eggert  <address@hidden>
+
+       Generate curved quotes in ert doc
+       * lisp/emacs-lisp/ert.el (ert--print-test-for-ewoc)
+       (ert-results-mode-menu)
+       (ert-results-pop-to-backtrace-for-test-at-point)
+       (ert-results-pop-to-messages-for-test-at-point)
+       (ert-results-pop-to-should-forms-for-test-at-point)
+       (ert-describe-test):
+       Quote ‘like this’, not `like this', when generating doc strings
+       and the like.
+       * test/automated/ert-x-tests.el (ert-test-describe-test):
+       Allow quoting ‘like this’.
+
+2015-06-02  Nicolas Richard  <address@hidden>
+
+       Add test for previous commit
+       * test/automated/replace-tests.el: New file.
+       (query-replace--split-string-tests): Add test for previous commit.
+
+       Avoid confusion in query-replace history when replacing NUL chars
+       * lisp/replace.el (query-replace--split-string): New function.
+       (query-replace-read-from): Rely on the 'separator' property
+       instead of searching for the NUL character (Bug#20690).
+
+2015-06-02  Glenn Morris  <address@hidden>
+
+       Merge from origin/emacs-24
+       8b5f2f4 * doc/emacs/emacs.texi: Update the ISBN of the Emacs manual.
+
+       * admin/gitmerge.el (gitmerge-commit-message):
+       Exclude "skipped" messages from ChangeLog.
+
+2015-06-01  Michael Albinus  <address@hidden>
+
+       Sync with Tramp repository
+       * lisp/net/tramp.el (tramp-message): Dump connection buffer error
+       messages.
+       (tramp-handle-make-auto-save-file-name): When calling
+       `make-auto-save-file-name' internally, make sure it uses Unix-like
+       behavior, not Windows-like behavior.
+       * lisp/net/tramp-sh.el (tramp-set-file-uid-gid): Add a timeout for
+       the local case, because "chown" might fail on w32.
+       * lisp/net/trampver.el (tramp-repository-get-version): Don't run
+       for XEmacs.
+
+2015-06-01  Eli Zaretskii  <address@hidden>
+
+       MS-Windows followup for batch stdout/stderr output changes
+       * lisp/international/mule-cmds.el (set-locale-environment): In
+       batch mode, use console codepages for keyboard and terminal
+       encoding.  (Bug#20545)
+
+       Update .gitattributes for DOS EOL files
+       * .gitattributes: Use "whitespace=cr-at-eol" for files with DOS
+       CRLF end-of-line format.
+
+       NS equivalents of xterm.c and w32term.c changes
+       * src/nsterm.m (ns_maybe_dumpglyphs_background): Force redraw of
+       glyph string background also when the font in use claims
+       preposterously large global height value.  Helps to remove
+       artifacts left from previous displays when glyphless characters
+       are displayed as hex code in a box.
+       (x_new_font): Call get_font_ascent_descent to obtain a reasonable
+       value for FRAME_LINE_HEIGHT, even when a font claims very large
+       value for its height.
+
+2015-06-01  Paul Eggert  <address@hidden>
+
+       Avoid grave accent quoting in stderr diagnostics
+       A few Emacs diagnostics go directly to stderr, and so can't easily
+       contain curved quotes (as non-UTF-8 locales might mishandle them).
+       Instead of bothering to add support for this rarity, reword the
+       diagnostics so that they don't use grave accent to quote.
+       * src/alloc.c (mark_memory): Fix comment.
+       * src/buffer.c (init_buffer):
+       * src/dispnew.c (init_display):
+       * src/emacs.c (main, sort_args):
+       * src/lread.c (dir_warning):
+       * src/term.c (init_tty):
+       * src/unexmacosx.c (unexec):
+       * src/xfns.c (select_visual):
+       * src/xterm.c (cvt_string_to_pixel, x_io_error_quitter):
+       Reword stderr diagnostics to avoid quoting `like this'.
+       * src/unexmacosx.c: Include errno.h.
+       * src/xfns.c (select_visual): Encode value for locale.
+
+2015-05-31  Paul Eggert  <address@hidden>
+
+       Treat batch stdout/stderr like standard display
+       Calls like (print FOO) could generate improperly encoded or
+       hard-to-read output if FOO contains characters outside the system
+       locale.  Fix this by treating batch stdout and stderr like
+       interactive standard display, when it comes to transliterating and
+       encoding characters (Bug#20545).
+       * doc/emacs/mule.texi (Communication Coding):
+       * doc/lispref/display.texi (Active Display Table):
+       * doc/lispref/nonascii.texi (Locales):
+       * etc/NEWS:
+       * src/coding.c (syms_of_coding):
+       * src/dispnew.c (syms_of_display):
+       Document this.
+       * src/print.c: Include disptab.h.
+       (printchar_to_stream): New function, with much of the guts of the
+       old Fexternal_debugging_output, except this one also uses the
+       standard display table.
+       (printchar, strout, Fexternal_debugging_output): Use it.
+
+2015-05-31  Glenn Morris  <address@hidden>
+
+       * src/emacs.c (syms_of_emacs) <system-configuration-features>: Doc fix.
+
+2015-05-31  Paul Eggert  <address@hidden>
+
+       Remove unused DEFSYMs
+       Remove DEFSYMs that aren't used at the C level.  Also:
+       * src/decompress.c (Qzlib_dll):
+       * src/font.c (Qunicode_sip):
+       * src/frame.c (Qtip_frame):
+       * src/ftfont.c (Qserif):
+       * src/gnutls.c (Qgnutls_dll):
+       * src/xml.c (Qlibxml2_dll):
+       Move from here ...
+       * src/w32fns.c (syms_of_w32fns): ... to here,
+       as these are used only on MS-Windows.
+
+2015-05-31  Michael Albinus  <address@hidden>
+
+       Use another default value for tramp-histfile-override
+       * lisp/net/tramp-sh.el (tramp-histfile-override):
+       Use ".tramp_history" as default.
+       Fixes: debbugs:#20446
+
+2015-05-29  Nicolas Petton  <address@hidden>
+
+       * doc/emacs/emacs.texi: Update the ISBN of the Emacs manual.
+
+2015-05-16  Nicolas Petton  <address@hidden>
+
+       * etc/NEWS: Add an entry about map.el
+
+       Improve the docstring of functions in map.el
+       Since a map is not a data structure but a concept, adding information
+       about the possible types of maps can be useful information.
+       * lisp/emacs-lisp/map.el: Add documentation about the type of MAP to
+       each public function.
+
+2015-04-29  Nicolas Petton  <address@hidden>
+
+       Faster implementation of map-empty-p
+       * lisp/emacs-lisp/map.el (map-empty-p): Faster implementation using
+       specific tests depending on the type of the map.
+
+       * lisp/emacs-lisp/map.el: Better docstrings.
+
+2015-04-25  Artur Malabarba  <address@hidden>
+
+       * lisp/emacs-lisp/map.el (map-pairs): Dump redundant lambda
+
+2015-04-25  Nicolas Petton  <address@hidden>
+
+       * lisp/emacs-lisp/map.el (map--elt-list): Better docstring.
+
+       * lisp/emacs-lisp/map.el (map--elt-list): Minor refactoring.
+
+       Fix a false negative in `map-elt' with alists and values being nil
+       * lisp/emacs-lisp/map.el (map-elt): If map is an alist and key is
+       found but its associated value is nil, do not return the default
+       value.
+       * test/automated/map-tests.el: Add a regression test.
+
+2015-04-24  Nicolas Petton  <address@hidden>
+
+       * lisp/emacs-lisp/map.el (map--dispatch): Improve the docstring.
+
+       Do not signal an error when trying to delete a key from an array
+       * lisp/emacs-lisp/map.el (map-delete): When map is an array, check if
+       the key is present to avoid signaling an error.
+       * test/automated/map-tests.el: Add a test for deleting non-existing
+       keys from maps.
+
+       * lisp/emacs-lisp/map.el: Better docstring.
+
+       Minor improvement in map-elt.
+       * lisp/emacs-lisp/map.el (map-elt): Do not use `ignore-errors' when
+       doing a lookup in arrays, but check the boundaries of the array
+       instead.
+       * test/automated/map-tests.el: Adds a test for `map-elt' with arrays
+       and a negative integer as key.
+
+2015-04-21  Nicolas Petton  <address@hidden>
+
+       * test/automated/map-tests.el: Refactoring of test methods.
+
+       * test/automated/map-tests.el: Renamed from map-test.el.
+
+2015-04-18  Nicolas Petton  <address@hidden>
+
+       * lisp/emacs-lisp/map.el (map-into): Better error message.
+
+       * lisp/emacs-lisp/map.el: Removes byte-compilation warnings.
+
+       Throw an error when converting a map into an unknown map type
+       * lisp/emacs-lisp/map.el (map-into): Throw an error if type is not 
valid.
+       * test/automated/map-test.el: Add a regression test.
+
+       New library map.el similar to seq.el but for mapping data structures.
+       * test/automated/map-test.el: New file.
+       * lisp/emacs-lisp/map.el: New file.
+
 2015-05-30  Dmitry Gutov  <address@hidden>
 
        Make sure there's no explicit tag name
@@ -48,8 +3223,6 @@
        * 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:
@@ -361,16 +3534,8 @@
 
 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
@@ -1690,10 +4855,6 @@
        (vc-git-resolve-when-done): Update to honor the new variable.
        (Bug#20292)
 
-2015-05-16  Eli Zaretskii  <address@hidden>
-
-       Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
-
 2015-05-16  Artur Malabarba  <address@hidden>
 
        * lisp/emacs-lisp/tabulated-list.el: Don't error on nil header-string
@@ -2806,8 +5967,6 @@
 
 2015-05-02  K. Handa  <address@hidden>
 
-       Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
-
        * cmds.c (internal_self_insert): When we insert spaces for
        padding, set point before the padding spaces, not after them.
 
@@ -3102,10 +6261,6 @@
        (rcirc-next-active-buffer): when there is no new activity, use
        `rcirc-bury-buffers' to hide all RCIRC buffers
 
-2015-04-29  Michael Albinus  <address@hidden>
-
-       Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
-
 2015-04-29  Krzysztof Jurewicz  <address@hidden>  (tiny change)
 
        Fix DBUS query result parsing for secrets-search-items
@@ -4727,10 +7882,6 @@
        `intangible' since that property is not used any more.
        (gnus-article-treat-body-boundary): Use gnus-hidden-properties.
 
-2015-04-09  Jay Belanger  <address@hidden>
-
-       Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
-
 2015-04-09  Dmitry Gutov  <address@hidden>
 
        Use the VC root in `log-edit-listfun'
@@ -4922,8 +8073,6 @@
 
 2015-04-08  Michael Albinus  <address@hidden>
 
-       Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
-
        Fix nasty scoping bug in tramp-cache.el
        * lisp/net/tramp-cache.el (tramp-flush-file-property): Fix nasty 
scoping bug.
 
@@ -5019,6 +8168,9 @@
        sh
        git commit -am"[this commit message]"
 
+This file records repository revisions from
+commit 9d56a21e6a696ad19ac65c4b405aeca44785884a (exclusive) to
+commit 2cf501ce1b77e6e409871eef7b9d31a08e73cfc0 (inclusive).
 See ChangeLog.1 for earlier changes.
 
 ;; Local Variables:
diff --git a/INSTALL b/INSTALL
index ebd36e7..7a41505 100644
--- a/INSTALL
+++ b/INSTALL
@@ -275,12 +275,13 @@ To disable individual types of image support in Emacs for 
some reason,
 even though configure finds the libraries, you can configure with one
 or more of these options:
 
-  --without-xpm        for XPM image support
-  --without-jpeg       for JPEG image support
-  --without-tiff       for TIFF image support
-  --without-gif        for GIF image support
-  --without-png        for PNG image support
-  --without-rsvg       for SVG image support
+  --without-xpm          for XPM image support
+  --without-jpeg         for JPEG image support
+  --without-tiff         for TIFF image support
+  --without-gif          for GIF image support
+  --without-png          for PNG image support
+  --without-rsvg         for SVG image support
+  --without-imagemagick  for Imagemagick support
 
 Use --without-toolkit-scroll-bars to disable Motif or Xaw3d scroll bars.
 
diff --git a/Makefile.in b/Makefile.in
index a2258f2..3cfbe57 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -290,7 +290,7 @@ SUBDIR = $(NTDIR) lib lib-src src lisp
 
 # The subdir makefiles created by config.status.
 SUBDIR_MAKEFILES_IN = @SUBDIR_MAKEFILES_IN@
-SUBDIR_MAKEFILES = `echo $(SUBDIR_MAKEFILES_IN:.in=) | sed 's|$(srcdir)/||g'`
+SUBDIR_MAKEFILES = $(patsubst ${srcdir}/%,%,${SUBDIR_MAKEFILES_IN:.in=})
 
 # Subdirectories to install, and where they'll go.  lib-src's and nt's
 # makefiles know how to install them, so we don't do that here.
@@ -492,18 +492,17 @@ write_subdir=if [ -f "$${subdir}/subdirs.el" ]; \
 install-arch-dep: src install-arch-indep install-etcdoc install-$(NTDIR)
        umask 022; ${MKDIR_P} "$(DESTDIR)${bindir}"
        $(MAKE) -C lib-src install
-       if test "${ns_self_contained}" = "no"; then \
-         ${INSTALL_PROGRAM} $(INSTALL_STRIP) src/emacs${EXEEXT} 
"$(DESTDIR)${bindir}/$(EMACSFULL)" || exit 1 ; \
-         chmod 1755 "$(DESTDIR)${bindir}/$(EMACSFULL)" || true; \
-         if test "x${NO_BIN_LINK}" = x; then \
-           rm -f "$(DESTDIR)${bindir}/$(EMACS)" ; \
-           cd "$(DESTDIR)${bindir}" && $(LN_S_FILEONLY) $(EMACSFULL) $(EMACS); 
\
-         fi; \
-       else \
-         subdir=${ns_appresdir}/site-lisp; \
-         ${write_subdir} || exit 1; \
-         rm -rf ${ns_appresdir}/share; \
-       fi
+ifeq (${ns_self_contained},no)
+       ${INSTALL_PROGRAM} $(INSTALL_STRIP) src/emacs${EXEEXT} 
"$(DESTDIR)${bindir}/$(EMACSFULL)"
+       -chmod 755 "$(DESTDIR)${bindir}/$(EMACSFULL)"
+ifndef NO_BIN_LINK
+       rm -f "$(DESTDIR)${bindir}/$(EMACS)"
+       cd "$(DESTDIR)${bindir}" && $(LN_S_FILEONLY) $(EMACSFULL) $(EMACS)
+endif
+else
+       subdir=${ns_appresdir}/site-lisp && ${write_subdir}
+       rm -rf ${ns_appresdir}/share
+endif
 
 ### Windows-specific install target for installing programs produced
 ### in nt/, and its Posix do-nothing shadow.
@@ -1116,19 +1115,21 @@ unchanged-history-files:
        x=$$(git diff-files --name-only $(CHANGELOG_N) $(emacslog)) && \
          test -z "$$x"
 
+# Regular expression that matches the newest commit covered by a ChangeLog.
+new_commit_regexp = ^commit [0123456789abcdef]* (inclusive)
+
 # Copy newer commit messages to the start of the ChangeLog history file,
 # and consider them to be older.
 change-history-nocommit: master-branch-is-current unchanged-history-files
        -rm -f ChangeLog.tmp
        $(MAKE) ChangeLog CHANGELOG=ChangeLog.tmp
-       (sed '/^See ChangeLog.[0-9]* for earlier/,$$d' <ChangeLog.tmp && cat 
$(CHANGELOG_N)) \
-         >$(CHANGELOG_N).tmp
+       sed '/^This file records repository revisions/,$$d' \
+         ChangeLog.tmp >$(CHANGELOG_N).tmp
+       new_commit_line=`grep '$(new_commit_regexp)' ChangeLog.tmp` && \
+       sed 's/$(new_commit_regexp).*/'"$$new_commit_line/" \
+         $(CHANGELOG_N) >>$(CHANGELOG_N).tmp
        rm ChangeLog.tmp
-       new_origin=$$(git log --pretty=format:%H HEAD^!) && \
-       sed 's/^\(gen_origin=\).*/\1'"$$new_origin/" \
-         < $(emacslog) > $(emacslog).tmp && chmod +x $(emacslog).tmp
        mv $(CHANGELOG_N).tmp $(CHANGELOG_N)
-       mv $(emacslog).tmp $(emacslog)
 
 change-history: change-history-nocommit
        $(MAKE) address@hidden
diff --git a/admin/admin.el b/admin/admin.el
index 93e9124..267f2c4 100644
--- a/admin/admin.el
+++ b/admin/admin.el
@@ -38,14 +38,12 @@ Optional argument DATE is the release date, default today."
                                          emacs-minor-version))
                     (read-string "Release date: "
                                  (progn (require 'add-log)
-                                        (let ((add-log-time-zone-rule t))
-                                          (funcall add-log-time-format))))))
+                                         (funcall add-log-time-format nil 
t)))))
   (setq root (expand-file-name root))
   (unless (file-exists-p (expand-file-name "src/emacs.c" root))
     (user-error "%s doesn't seem to be the root of an Emacs source tree" root))
   (require 'add-log)
-  (or date (setq date (let ((add-log-time-zone-rule t))
-                       (funcall add-log-time-format))))
+  (or date (setq date (funcall add-log-time-format nil t)))
   (let* ((logs (process-lines "find" root "-name" "ChangeLog"))
         (entry (format "%s  %s  <%s>\n\n\t* Version %s released.\n\n"
                        date
diff --git a/admin/charsets/cp51932.awk b/admin/charsets/cp51932.awk
index f59e91c..df1f8cd 100644
--- a/admin/charsets/cp51932.awk
+++ b/admin/charsets/cp51932.awk
@@ -31,7 +31,7 @@
 # already been mapped to 1 or 3.
 
 BEGIN {
-  print ";;; cp51932.el -- translation table for CP51932. -*- no-byte-compile: 
t -*-";
+  print ";;; cp51932.el -- translation table for CP51932";
   print ";;; Automatically generated from CP932-2BYTE.map";
   print "(let ((map";
   printf "       '(;JISEXT<->UNICODE";
diff --git a/admin/charsets/eucjp-ms.awk b/admin/charsets/eucjp-ms.awk
index f17222d..59c6388 100644
--- a/admin/charsets/eucjp-ms.awk
+++ b/admin/charsets/eucjp-ms.awk
@@ -38,7 +38,7 @@ BEGIN {
   JISX0208_FROM2 = "/xf5/xa1";
   JISX0212_FROM = "/x8f/xf3/xf3";
 
-  print ";;; eucjp-ms.el -- translation table for eucJP-ms. -*- 
no-byte-compile: t -*-";
+  print ";;; eucjp-ms.el -- translation table for eucJP-ms";
   print ";;; Automatically generated from 
/usr/share/i18n/charmaps/EUC-JP-MS.gz";
   print "(let ((map";
   print "       '(;JISEXT<->UNICODE";
diff --git a/admin/gitmerge.el b/admin/gitmerge.el
index c6a3446..c8cf2dc 100644
--- a/admin/gitmerge.el
+++ b/admin/gitmerge.el
@@ -314,6 +314,9 @@ 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
+    ;; We do not insert "; " for non-skipped messages,
+    ;; because the date of those entries is helpful in figuring out
+    ;; when things got merged, since git does not track that.
     (insert (if skip "; " "")
            "Merge from " branch "\n\n"
            (if skip
diff --git a/admin/merge-gnulib b/admin/merge-gnulib
index e7910a6..963c3a0 100755
--- a/admin/merge-gnulib
+++ b/admin/merge-gnulib
@@ -37,20 +37,20 @@ GNULIB_MODULES='
   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
+  sys_time time time_r time_rz timegm timer-time timespec-add timespec-sub
   unsetenv update-copyright utimens
   vla warnings
 '
 
 GNULIB_TOOL_FLAGS='
   --avoid=close --avoid=dup
-  --avoid=fchdir --avoid=fstat
+  --avoid=fchdir --avoid=flexmember --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=save-cwd --avoid=select --avoid=setenv --avoid=sigprocmask
   --avoid=stdarg --avoid=stdbool
-  --avoid=threadlib
+  --avoid=threadlib --avoid=unsetenv
   --conditional-dependencies --import --no-changelog --no-vc-files
   --makefile-name=gnulib.mk
 '
diff --git a/admin/unidata/BidiBrackets.txt b/admin/unidata/BidiBrackets.txt
index 2a0cc0c..bfd83cd 100644
--- a/admin/unidata/BidiBrackets.txt
+++ b/admin/unidata/BidiBrackets.txt
@@ -1,12 +1,12 @@
-# BidiBrackets-7.0.0.txt
-# Date: 2014-01-21, 02:30:00 GMT [AG, LI, KW]
+# BidiBrackets-8.0.0.txt
+# Date: 2015-01-20, 19:00:00 GMT [AG, LI, KW]
 #
 # Bidi_Paired_Bracket and Bidi_Paired_Bracket_Type Properties
 # 
 # This file is a normative contributory data file in the Unicode
 # Character Database.
 #
-# Copyright (c) 1991-2014 Unicode, Inc.
+# Copyright (c) 1991-2015 Unicode, Inc.
 # For terms of use, see http://www.unicode.org/terms_of_use.html
 #
 # Bidi_Paired_Bracket is a normative property of type Miscellaneous,
diff --git a/admin/unidata/BidiMirroring.txt b/admin/unidata/BidiMirroring.txt
index b1f7386..fbc60f1 100644
--- a/admin/unidata/BidiMirroring.txt
+++ b/admin/unidata/BidiMirroring.txt
@@ -1,19 +1,19 @@
-# BidiMirroring-7.0.0.txt
-# Date: 2013-12-17, 00:00:00 GMT [KW, LI]
+# BidiMirroring-8.0.0.txt
+# Date: 2015-01-20, 18:30:00 GMT [KW, LI]
 #
 # Bidi_Mirroring_Glyph Property
 # 
 # This file is an informative contributory data file in the
 # Unicode Character Database.
 #
-# Copyright (c) 1991-2014 Unicode, Inc.
+# Copyright (c) 1991-2015 Unicode, Inc.
 # For terms of use, see http://www.unicode.org/terms_of_use.html
 #
 # This data file lists characters that have the Bidi_Mirrored=Yes property
 # value, for which there is another Unicode character that typically has a 
glyph
 # that is the mirror image of the original character's glyph.
 #
-# The repertoire covered by the file is Unicode 7.0.0.
+# The repertoire covered by the file is Unicode 8.0.0.
 # 
 # The file contains a list of lines with mappings from one code point
 # to another one for character-based mirroring.
@@ -42,7 +42,7 @@
 # 
 # This file was originally created by Markus Scherer.
 # Extended for Unicode 3.2, 4.0, 4.1, 5.0, 5.1, 5.2, and 6.0 by Ken Whistler,
-# and for Unicode 6.1, 6.2, 6.3, and 7.0 by Ken Whistler and Laurentiu Iancu.
+# and for subsequent versions by Ken Whistler and Laurentiu Iancu.
 # 
 # ############################################################
 #
diff --git a/admin/unidata/Blocks.txt b/admin/unidata/Blocks.txt
new file mode 100644
index 0000000..0a4a580
--- /dev/null
+++ b/admin/unidata/Blocks.txt
@@ -0,0 +1,298 @@
+# Blocks-8.0.0.txt
+# Date: 2014-11-10, 23:04:00 GMT [KW]
+#
+# Unicode Character Database
+# Copyright (c) 1991-2014 Unicode, Inc.
+# For terms of use, see http://www.unicode.org/terms_of_use.html
+# For documentation, see http://www.unicode.org/reports/tr44/
+#
+# Format:
+# Start Code..End Code; Block Name
+
+# ================================================
+
+# Note:   When comparing block names, casing, whitespace, hyphens,
+#         and underbars are ignored.
+#         For example, "Latin Extended-A" and "latin extended a" are 
equivalent.
+#         For more information on the comparison of property values, 
+#            see UAX #44: http://www.unicode.org/reports/tr44/
+#
+#  All block ranges start with a value where (cp MOD 16) = 0,
+#  and end with a value where (cp MOD 16) = 15. In other words,
+#  the last hexadecimal digit of the start of range is ...0 
+#  and the last hexadecimal digit of the end of range is ...F.
+#  This constraint on block ranges guarantees that allocations
+#  are done in terms of whole columns, and that code chart display
+#  never involves splitting columns in the charts.
+#
+#  All code points not explicitly listed for Block
+#  have the value No_Block.
+
+# Property:    Block
+#
+# @missing: 0000..10FFFF; No_Block
+
+0000..007F; Basic Latin
+0080..00FF; Latin-1 Supplement
+0100..017F; Latin Extended-A
+0180..024F; Latin Extended-B
+0250..02AF; IPA Extensions
+02B0..02FF; Spacing Modifier Letters
+0300..036F; Combining Diacritical Marks
+0370..03FF; Greek and Coptic
+0400..04FF; Cyrillic
+0500..052F; Cyrillic Supplement
+0530..058F; Armenian
+0590..05FF; Hebrew
+0600..06FF; Arabic
+0700..074F; Syriac
+0750..077F; Arabic Supplement
+0780..07BF; Thaana
+07C0..07FF; NKo
+0800..083F; Samaritan
+0840..085F; Mandaic
+08A0..08FF; Arabic Extended-A
+0900..097F; Devanagari
+0980..09FF; Bengali
+0A00..0A7F; Gurmukhi
+0A80..0AFF; Gujarati
+0B00..0B7F; Oriya
+0B80..0BFF; Tamil
+0C00..0C7F; Telugu
+0C80..0CFF; Kannada
+0D00..0D7F; Malayalam
+0D80..0DFF; Sinhala
+0E00..0E7F; Thai
+0E80..0EFF; Lao
+0F00..0FFF; Tibetan
+1000..109F; Myanmar
+10A0..10FF; Georgian
+1100..11FF; Hangul Jamo
+1200..137F; Ethiopic
+1380..139F; Ethiopic Supplement
+13A0..13FF; Cherokee
+1400..167F; Unified Canadian Aboriginal Syllabics
+1680..169F; Ogham
+16A0..16FF; Runic
+1700..171F; Tagalog
+1720..173F; Hanunoo
+1740..175F; Buhid
+1760..177F; Tagbanwa
+1780..17FF; Khmer
+1800..18AF; Mongolian
+18B0..18FF; Unified Canadian Aboriginal Syllabics Extended
+1900..194F; Limbu
+1950..197F; Tai Le
+1980..19DF; New Tai Lue
+19E0..19FF; Khmer Symbols
+1A00..1A1F; Buginese
+1A20..1AAF; Tai Tham
+1AB0..1AFF; Combining Diacritical Marks Extended
+1B00..1B7F; Balinese
+1B80..1BBF; Sundanese
+1BC0..1BFF; Batak
+1C00..1C4F; Lepcha
+1C50..1C7F; Ol Chiki
+1CC0..1CCF; Sundanese Supplement
+1CD0..1CFF; Vedic Extensions
+1D00..1D7F; Phonetic Extensions
+1D80..1DBF; Phonetic Extensions Supplement
+1DC0..1DFF; Combining Diacritical Marks Supplement
+1E00..1EFF; Latin Extended Additional
+1F00..1FFF; Greek Extended
+2000..206F; General Punctuation
+2070..209F; Superscripts and Subscripts
+20A0..20CF; Currency Symbols
+20D0..20FF; Combining Diacritical Marks for Symbols
+2100..214F; Letterlike Symbols
+2150..218F; Number Forms
+2190..21FF; Arrows
+2200..22FF; Mathematical Operators
+2300..23FF; Miscellaneous Technical
+2400..243F; Control Pictures
+2440..245F; Optical Character Recognition
+2460..24FF; Enclosed Alphanumerics
+2500..257F; Box Drawing
+2580..259F; Block Elements
+25A0..25FF; Geometric Shapes
+2600..26FF; Miscellaneous Symbols
+2700..27BF; Dingbats
+27C0..27EF; Miscellaneous Mathematical Symbols-A
+27F0..27FF; Supplemental Arrows-A
+2800..28FF; Braille Patterns
+2900..297F; Supplemental Arrows-B
+2980..29FF; Miscellaneous Mathematical Symbols-B
+2A00..2AFF; Supplemental Mathematical Operators
+2B00..2BFF; Miscellaneous Symbols and Arrows
+2C00..2C5F; Glagolitic
+2C60..2C7F; Latin Extended-C
+2C80..2CFF; Coptic
+2D00..2D2F; Georgian Supplement
+2D30..2D7F; Tifinagh
+2D80..2DDF; Ethiopic Extended
+2DE0..2DFF; Cyrillic Extended-A
+2E00..2E7F; Supplemental Punctuation
+2E80..2EFF; CJK Radicals Supplement
+2F00..2FDF; Kangxi Radicals
+2FF0..2FFF; Ideographic Description Characters
+3000..303F; CJK Symbols and Punctuation
+3040..309F; Hiragana
+30A0..30FF; Katakana
+3100..312F; Bopomofo
+3130..318F; Hangul Compatibility Jamo
+3190..319F; Kanbun
+31A0..31BF; Bopomofo Extended
+31C0..31EF; CJK Strokes
+31F0..31FF; Katakana Phonetic Extensions
+3200..32FF; Enclosed CJK Letters and Months
+3300..33FF; CJK Compatibility
+3400..4DBF; CJK Unified Ideographs Extension A
+4DC0..4DFF; Yijing Hexagram Symbols
+4E00..9FFF; CJK Unified Ideographs
+A000..A48F; Yi Syllables
+A490..A4CF; Yi Radicals
+A4D0..A4FF; Lisu
+A500..A63F; Vai
+A640..A69F; Cyrillic Extended-B
+A6A0..A6FF; Bamum
+A700..A71F; Modifier Tone Letters
+A720..A7FF; Latin Extended-D
+A800..A82F; Syloti Nagri
+A830..A83F; Common Indic Number Forms
+A840..A87F; Phags-pa
+A880..A8DF; Saurashtra
+A8E0..A8FF; Devanagari Extended
+A900..A92F; Kayah Li
+A930..A95F; Rejang
+A960..A97F; Hangul Jamo Extended-A
+A980..A9DF; Javanese
+A9E0..A9FF; Myanmar Extended-B
+AA00..AA5F; Cham
+AA60..AA7F; Myanmar Extended-A
+AA80..AADF; Tai Viet
+AAE0..AAFF; Meetei Mayek Extensions
+AB00..AB2F; Ethiopic Extended-A
+AB30..AB6F; Latin Extended-E
+AB70..ABBF; Cherokee Supplement
+ABC0..ABFF; Meetei Mayek
+AC00..D7AF; Hangul Syllables
+D7B0..D7FF; Hangul Jamo Extended-B
+D800..DB7F; High Surrogates
+DB80..DBFF; High Private Use Surrogates
+DC00..DFFF; Low Surrogates
+E000..F8FF; Private Use Area
+F900..FAFF; CJK Compatibility Ideographs
+FB00..FB4F; Alphabetic Presentation Forms
+FB50..FDFF; Arabic Presentation Forms-A
+FE00..FE0F; Variation Selectors
+FE10..FE1F; Vertical Forms
+FE20..FE2F; Combining Half Marks
+FE30..FE4F; CJK Compatibility Forms
+FE50..FE6F; Small Form Variants
+FE70..FEFF; Arabic Presentation Forms-B
+FF00..FFEF; Halfwidth and Fullwidth Forms
+FFF0..FFFF; Specials
+10000..1007F; Linear B Syllabary
+10080..100FF; Linear B Ideograms
+10100..1013F; Aegean Numbers
+10140..1018F; Ancient Greek Numbers
+10190..101CF; Ancient Symbols
+101D0..101FF; Phaistos Disc
+10280..1029F; Lycian
+102A0..102DF; Carian
+102E0..102FF; Coptic Epact Numbers
+10300..1032F; Old Italic
+10330..1034F; Gothic
+10350..1037F; Old Permic
+10380..1039F; Ugaritic
+103A0..103DF; Old Persian
+10400..1044F; Deseret
+10450..1047F; Shavian
+10480..104AF; Osmanya
+10500..1052F; Elbasan
+10530..1056F; Caucasian Albanian
+10600..1077F; Linear A
+10800..1083F; Cypriot Syllabary
+10840..1085F; Imperial Aramaic
+10860..1087F; Palmyrene
+10880..108AF; Nabataean
+108E0..108FF; Hatran
+10900..1091F; Phoenician
+10920..1093F; Lydian
+10980..1099F; Meroitic Hieroglyphs
+109A0..109FF; Meroitic Cursive
+10A00..10A5F; Kharoshthi
+10A60..10A7F; Old South Arabian
+10A80..10A9F; Old North Arabian
+10AC0..10AFF; Manichaean
+10B00..10B3F; Avestan
+10B40..10B5F; Inscriptional Parthian
+10B60..10B7F; Inscriptional Pahlavi
+10B80..10BAF; Psalter Pahlavi
+10C00..10C4F; Old Turkic
+10C80..10CFF; Old Hungarian
+10E60..10E7F; Rumi Numeral Symbols
+11000..1107F; Brahmi
+11080..110CF; Kaithi
+110D0..110FF; Sora Sompeng
+11100..1114F; Chakma
+11150..1117F; Mahajani
+11180..111DF; Sharada
+111E0..111FF; Sinhala Archaic Numbers
+11200..1124F; Khojki
+11280..112AF; Multani
+112B0..112FF; Khudawadi
+11300..1137F; Grantha
+11480..114DF; Tirhuta
+11580..115FF; Siddham
+11600..1165F; Modi
+11680..116CF; Takri
+11700..1173F; Ahom
+118A0..118FF; Warang Citi
+11AC0..11AFF; Pau Cin Hau
+12000..123FF; Cuneiform
+12400..1247F; Cuneiform Numbers and Punctuation
+12480..1254F; Early Dynastic Cuneiform
+13000..1342F; Egyptian Hieroglyphs
+14400..1467F; Anatolian Hieroglyphs
+16800..16A3F; Bamum Supplement
+16A40..16A6F; Mro
+16AD0..16AFF; Bassa Vah
+16B00..16B8F; Pahawh Hmong
+16F00..16F9F; Miao
+1B000..1B0FF; Kana Supplement
+1BC00..1BC9F; Duployan
+1BCA0..1BCAF; Shorthand Format Controls
+1D000..1D0FF; Byzantine Musical Symbols
+1D100..1D1FF; Musical Symbols
+1D200..1D24F; Ancient Greek Musical Notation
+1D300..1D35F; Tai Xuan Jing Symbols
+1D360..1D37F; Counting Rod Numerals
+1D400..1D7FF; Mathematical Alphanumeric Symbols
+1D800..1DAAF; Sutton SignWriting
+1E800..1E8DF; Mende Kikakui
+1EE00..1EEFF; Arabic Mathematical Alphabetic Symbols
+1F000..1F02F; Mahjong Tiles
+1F030..1F09F; Domino Tiles
+1F0A0..1F0FF; Playing Cards
+1F100..1F1FF; Enclosed Alphanumeric Supplement
+1F200..1F2FF; Enclosed Ideographic Supplement
+1F300..1F5FF; Miscellaneous Symbols and Pictographs
+1F600..1F64F; Emoticons
+1F650..1F67F; Ornamental Dingbats
+1F680..1F6FF; Transport and Map Symbols
+1F700..1F77F; Alchemical Symbols
+1F780..1F7FF; Geometric Shapes Extended
+1F800..1F8FF; Supplemental Arrows-C
+1F900..1F9FF; Supplemental Symbols and Pictographs
+20000..2A6DF; CJK Unified Ideographs Extension B
+2A700..2B73F; CJK Unified Ideographs Extension C
+2B740..2B81F; CJK Unified Ideographs Extension D
+2B820..2CEAF; CJK Unified Ideographs Extension E
+2F800..2FA1F; CJK Compatibility Ideographs Supplement
+E0000..E007F; Tags
+E0100..E01EF; Variation Selectors Supplement
+F0000..FFFFF; Supplementary Private Use Area-A
+100000..10FFFF; Supplementary Private Use Area-B
+
+# EOF
diff --git a/admin/unidata/Makefile.in b/admin/unidata/Makefile.in
index 6c81d32..954e9fa 100644
--- a/admin/unidata/Makefile.in
+++ b/admin/unidata/Makefile.in
@@ -23,6 +23,8 @@
 
 SHELL = @SHELL@
 
+AWK = @AWK@
+
 srcdir = @srcdir@
 top_srcdir = @top_srcdir@
 top_builddir = @top_builddir@
@@ -51,7 +53,7 @@ am__v_at_1 =
 
 .PHONY: all unifiles
 
-all: ${top_srcdir}/src/macuvs.h unifiles
+all: ${top_srcdir}/src/macuvs.h unifiles ${unidir}/charscript.el
 
 ## Specify .elc as an order-only prereq so as to not needlessly rebuild
 ## target just because the .elc is missing.
@@ -94,6 +96,16 @@ unifiles: ${unidir}/charprop.el
          [ -f $(unidir)/$$f ] || exec $(MAKE) PHONY_EXTRAS=$< $<; \
        done
 
+
+.PHONY: charscript.el
+charscript.el: ${unidir}/charscript.el
+
+blocks = ${srcdir}/blocks.awk
+
+${unidir}/charscript.el: ${srcdir}/Blocks.txt ${blocks}
+       $(AM_V_GEN)$(AWK) -f ${blocks} < $< > $@
+
+
 .PHONY: clean bootstrap-clean distclean maintainer-clean extraclean
 
 clean:
@@ -110,7 +122,7 @@ maintainer-clean: distclean
 ## change and it slows down bootstrap (a tiny bit).
 ## Cf leim/ja-dic (which is much slower).
 extraclean:
-       rm -f ${top_srcdir}/src/macuvs.h
+       rm -f ${top_srcdir}/src/macuvs.h ${unidir}/charscript.el*
   ifneq (,$(wildcard $(unidir)/charprop.el))
        cd $(unidir) && \
          rm -f `sed -n 's/^;; FILE: //p' < charprop.el` charprop.el
diff --git a/admin/unidata/README b/admin/unidata/README
index e0d0e00..8ad0a12 100644
--- a/admin/unidata/README
+++ b/admin/unidata/README
@@ -16,3 +16,7 @@ http://www.unicode.org/ivd/data/2014-05-16/IVD_Sequences.txt
 UnicodeData.txt
 http://www.unicode.org/Public/UNIDATA/UnicodeData.txt
 2014-03-10
+
+Blocks.txt
+http://www.unicode.org/Public/8.0.0/ucd/Blocks.txt
+2014-11-10
diff --git a/admin/unidata/UnicodeData.txt b/admin/unidata/UnicodeData.txt
index 31c8a7e..aa0e914 100644
--- a/admin/unidata/UnicodeData.txt
+++ b/admin/unidata/UnicodeData.txt
@@ -667,7 +667,7 @@
 029A;LATIN SMALL LETTER CLOSED OPEN E;Ll;0;L;;;;;N;LATIN SMALL LETTER CLOSED 
EPSILON;;;;
 029B;LATIN LETTER SMALL CAPITAL G WITH HOOK;Ll;0;L;;;;;N;LATIN LETTER SMALL 
CAPITAL G HOOK;;;;
 029C;LATIN LETTER SMALL CAPITAL H;Ll;0;L;;;;;N;;;;;
-029D;LATIN SMALL LETTER J WITH CROSSED-TAIL;Ll;0;L;;;;;N;LATIN SMALL LETTER 
CROSSED-TAIL J;;;;
+029D;LATIN SMALL LETTER J WITH CROSSED-TAIL;Ll;0;L;;;;;N;LATIN SMALL LETTER 
CROSSED-TAIL J;;A7B2;;A7B2
 029E;LATIN SMALL LETTER TURNED K;Ll;0;L;;;;;N;;;A7B0;;A7B0
 029F;LATIN LETTER SMALL CAPITAL L;Ll;0;L;;;;;N;;;;;
 02A0;LATIN SMALL LETTER Q WITH HOOK;Ll;0;L;;;;;N;LATIN SMALL LETTER Q HOOK;;;;
@@ -2091,6 +2091,9 @@
 08B0;ARABIC LETTER GAF WITH INVERTED STROKE;Lo;0;AL;;;;;N;;;;;
 08B1;ARABIC LETTER STRAIGHT WAW;Lo;0;AL;;;;;N;;;;;
 08B2;ARABIC LETTER ZAIN WITH INVERTED V ABOVE;Lo;0;AL;;;;;N;;;;;
+08B3;ARABIC LETTER AIN WITH THREE DOTS BELOW;Lo;0;AL;;;;;N;;;;;
+08B4;ARABIC LETTER KAF WITH DOT BELOW;Lo;0;AL;;;;;N;;;;;
+08E3;ARABIC TURNED DAMMA BELOW;Mn;220;NSM;;;;;N;;;;;
 08E4;ARABIC CURLY FATHA;Mn;230;NSM;;;;;N;;;;;
 08E5;ARABIC CURLY DAMMA;Mn;230;NSM;;;;;N;;;;;
 08E6;ARABIC CURLY KASRA;Mn;220;NSM;;;;;N;;;;;
@@ -2503,6 +2506,7 @@
 0AEF;GUJARATI DIGIT NINE;Nd;0;L;;9;9;9;N;;;;;
 0AF0;GUJARATI ABBREVIATION SIGN;Po;0;L;;;;;N;;;;;
 0AF1;GUJARATI RUPEE SIGN;Sc;0;ET;;;;;N;;;;;
+0AF9;GUJARATI LETTER ZHA;Lo;0;L;;;;;N;;;;;
 0B01;ORIYA SIGN CANDRABINDU;Mn;0;NSM;;;;;N;;;;;
 0B02;ORIYA SIGN ANUSVARA;Mc;0;L;;;;;N;;;;;
 0B03;ORIYA SIGN VISARGA;Mc;0;L;;;;;N;;;;;
@@ -2738,6 +2742,7 @@
 0C56;TELUGU AI LENGTH MARK;Mn;91;NSM;;;;;N;;;;;
 0C58;TELUGU LETTER TSA;Lo;0;L;;;;;N;;;;;
 0C59;TELUGU LETTER DZA;Lo;0;L;;;;;N;;;;;
+0C5A;TELUGU LETTER RRRA;Lo;0;L;;;;;N;;;;;
 0C60;TELUGU LETTER VOCALIC RR;Lo;0;L;;;;;N;;;;;
 0C61;TELUGU LETTER VOCALIC LL;Lo;0;L;;;;;N;;;;;
 0C62;TELUGU VOWEL SIGN VOCALIC L;Mn;0;NSM;;;;;N;;;;;
@@ -2919,6 +2924,7 @@
 0D4D;MALAYALAM SIGN VIRAMA;Mn;9;NSM;;;;;N;;;;;
 0D4E;MALAYALAM LETTER DOT REPH;Lo;0;L;;;;;N;;;;;
 0D57;MALAYALAM AU LENGTH MARK;Mc;0;L;;;;;N;;;;;
+0D5F;MALAYALAM LETTER ARCHAIC II;Lo;0;L;;;;;N;;;;;
 0D60;MALAYALAM LETTER VOCALIC RR;Lo;0;L;;;;;N;;;;;
 0D61;MALAYALAM LETTER VOCALIC LL;Lo;0;L;;;;;N;;;;;
 0D62;MALAYALAM VOWEL SIGN VOCALIC L;Mn;0;NSM;;;;;N;;;;;
@@ -4289,91 +4295,98 @@
 1397;ETHIOPIC TONAL MARK HIDET;So;0;ON;;;;;N;;;;;
 1398;ETHIOPIC TONAL MARK DERET-HIDET;So;0;ON;;;;;N;;;;;
 1399;ETHIOPIC TONAL MARK KURT;So;0;ON;;;;;N;;;;;
-13A0;CHEROKEE LETTER A;Lo;0;L;;;;;N;;;;;
-13A1;CHEROKEE LETTER E;Lo;0;L;;;;;N;;;;;
-13A2;CHEROKEE LETTER I;Lo;0;L;;;;;N;;;;;
-13A3;CHEROKEE LETTER O;Lo;0;L;;;;;N;;;;;
-13A4;CHEROKEE LETTER U;Lo;0;L;;;;;N;;;;;
-13A5;CHEROKEE LETTER V;Lo;0;L;;;;;N;;;;;
-13A6;CHEROKEE LETTER GA;Lo;0;L;;;;;N;;;;;
-13A7;CHEROKEE LETTER KA;Lo;0;L;;;;;N;;;;;
-13A8;CHEROKEE LETTER GE;Lo;0;L;;;;;N;;;;;
-13A9;CHEROKEE LETTER GI;Lo;0;L;;;;;N;;;;;
-13AA;CHEROKEE LETTER GO;Lo;0;L;;;;;N;;;;;
-13AB;CHEROKEE LETTER GU;Lo;0;L;;;;;N;;;;;
-13AC;CHEROKEE LETTER GV;Lo;0;L;;;;;N;;;;;
-13AD;CHEROKEE LETTER HA;Lo;0;L;;;;;N;;;;;
-13AE;CHEROKEE LETTER HE;Lo;0;L;;;;;N;;;;;
-13AF;CHEROKEE LETTER HI;Lo;0;L;;;;;N;;;;;
-13B0;CHEROKEE LETTER HO;Lo;0;L;;;;;N;;;;;
-13B1;CHEROKEE LETTER HU;Lo;0;L;;;;;N;;;;;
-13B2;CHEROKEE LETTER HV;Lo;0;L;;;;;N;;;;;
-13B3;CHEROKEE LETTER LA;Lo;0;L;;;;;N;;;;;
-13B4;CHEROKEE LETTER LE;Lo;0;L;;;;;N;;;;;
-13B5;CHEROKEE LETTER LI;Lo;0;L;;;;;N;;;;;
-13B6;CHEROKEE LETTER LO;Lo;0;L;;;;;N;;;;;
-13B7;CHEROKEE LETTER LU;Lo;0;L;;;;;N;;;;;
-13B8;CHEROKEE LETTER LV;Lo;0;L;;;;;N;;;;;
-13B9;CHEROKEE LETTER MA;Lo;0;L;;;;;N;;;;;
-13BA;CHEROKEE LETTER ME;Lo;0;L;;;;;N;;;;;
-13BB;CHEROKEE LETTER MI;Lo;0;L;;;;;N;;;;;
-13BC;CHEROKEE LETTER MO;Lo;0;L;;;;;N;;;;;
-13BD;CHEROKEE LETTER MU;Lo;0;L;;;;;N;;;;;
-13BE;CHEROKEE LETTER NA;Lo;0;L;;;;;N;;;;;
-13BF;CHEROKEE LETTER HNA;Lo;0;L;;;;;N;;;;;
-13C0;CHEROKEE LETTER NAH;Lo;0;L;;;;;N;;;;;
-13C1;CHEROKEE LETTER NE;Lo;0;L;;;;;N;;;;;
-13C2;CHEROKEE LETTER NI;Lo;0;L;;;;;N;;;;;
-13C3;CHEROKEE LETTER NO;Lo;0;L;;;;;N;;;;;
-13C4;CHEROKEE LETTER NU;Lo;0;L;;;;;N;;;;;
-13C5;CHEROKEE LETTER NV;Lo;0;L;;;;;N;;;;;
-13C6;CHEROKEE LETTER QUA;Lo;0;L;;;;;N;;;;;
-13C7;CHEROKEE LETTER QUE;Lo;0;L;;;;;N;;;;;
-13C8;CHEROKEE LETTER QUI;Lo;0;L;;;;;N;;;;;
-13C9;CHEROKEE LETTER QUO;Lo;0;L;;;;;N;;;;;
-13CA;CHEROKEE LETTER QUU;Lo;0;L;;;;;N;;;;;
-13CB;CHEROKEE LETTER QUV;Lo;0;L;;;;;N;;;;;
-13CC;CHEROKEE LETTER SA;Lo;0;L;;;;;N;;;;;
-13CD;CHEROKEE LETTER S;Lo;0;L;;;;;N;;;;;
-13CE;CHEROKEE LETTER SE;Lo;0;L;;;;;N;;;;;
-13CF;CHEROKEE LETTER SI;Lo;0;L;;;;;N;;;;;
-13D0;CHEROKEE LETTER SO;Lo;0;L;;;;;N;;;;;
-13D1;CHEROKEE LETTER SU;Lo;0;L;;;;;N;;;;;
-13D2;CHEROKEE LETTER SV;Lo;0;L;;;;;N;;;;;
-13D3;CHEROKEE LETTER DA;Lo;0;L;;;;;N;;;;;
-13D4;CHEROKEE LETTER TA;Lo;0;L;;;;;N;;;;;
-13D5;CHEROKEE LETTER DE;Lo;0;L;;;;;N;;;;;
-13D6;CHEROKEE LETTER TE;Lo;0;L;;;;;N;;;;;
-13D7;CHEROKEE LETTER DI;Lo;0;L;;;;;N;;;;;
-13D8;CHEROKEE LETTER TI;Lo;0;L;;;;;N;;;;;
-13D9;CHEROKEE LETTER DO;Lo;0;L;;;;;N;;;;;
-13DA;CHEROKEE LETTER DU;Lo;0;L;;;;;N;;;;;
-13DB;CHEROKEE LETTER DV;Lo;0;L;;;;;N;;;;;
-13DC;CHEROKEE LETTER DLA;Lo;0;L;;;;;N;;;;;
-13DD;CHEROKEE LETTER TLA;Lo;0;L;;;;;N;;;;;
-13DE;CHEROKEE LETTER TLE;Lo;0;L;;;;;N;;;;;
-13DF;CHEROKEE LETTER TLI;Lo;0;L;;;;;N;;;;;
-13E0;CHEROKEE LETTER TLO;Lo;0;L;;;;;N;;;;;
-13E1;CHEROKEE LETTER TLU;Lo;0;L;;;;;N;;;;;
-13E2;CHEROKEE LETTER TLV;Lo;0;L;;;;;N;;;;;
-13E3;CHEROKEE LETTER TSA;Lo;0;L;;;;;N;;;;;
-13E4;CHEROKEE LETTER TSE;Lo;0;L;;;;;N;;;;;
-13E5;CHEROKEE LETTER TSI;Lo;0;L;;;;;N;;;;;
-13E6;CHEROKEE LETTER TSO;Lo;0;L;;;;;N;;;;;
-13E7;CHEROKEE LETTER TSU;Lo;0;L;;;;;N;;;;;
-13E8;CHEROKEE LETTER TSV;Lo;0;L;;;;;N;;;;;
-13E9;CHEROKEE LETTER WA;Lo;0;L;;;;;N;;;;;
-13EA;CHEROKEE LETTER WE;Lo;0;L;;;;;N;;;;;
-13EB;CHEROKEE LETTER WI;Lo;0;L;;;;;N;;;;;
-13EC;CHEROKEE LETTER WO;Lo;0;L;;;;;N;;;;;
-13ED;CHEROKEE LETTER WU;Lo;0;L;;;;;N;;;;;
-13EE;CHEROKEE LETTER WV;Lo;0;L;;;;;N;;;;;
-13EF;CHEROKEE LETTER YA;Lo;0;L;;;;;N;;;;;
-13F0;CHEROKEE LETTER YE;Lo;0;L;;;;;N;;;;;
-13F1;CHEROKEE LETTER YI;Lo;0;L;;;;;N;;;;;
-13F2;CHEROKEE LETTER YO;Lo;0;L;;;;;N;;;;;
-13F3;CHEROKEE LETTER YU;Lo;0;L;;;;;N;;;;;
-13F4;CHEROKEE LETTER YV;Lo;0;L;;;;;N;;;;;
+13A0;CHEROKEE LETTER A;Lu;0;L;;;;;N;;;;AB70;
+13A1;CHEROKEE LETTER E;Lu;0;L;;;;;N;;;;AB71;
+13A2;CHEROKEE LETTER I;Lu;0;L;;;;;N;;;;AB72;
+13A3;CHEROKEE LETTER O;Lu;0;L;;;;;N;;;;AB73;
+13A4;CHEROKEE LETTER U;Lu;0;L;;;;;N;;;;AB74;
+13A5;CHEROKEE LETTER V;Lu;0;L;;;;;N;;;;AB75;
+13A6;CHEROKEE LETTER GA;Lu;0;L;;;;;N;;;;AB76;
+13A7;CHEROKEE LETTER KA;Lu;0;L;;;;;N;;;;AB77;
+13A8;CHEROKEE LETTER GE;Lu;0;L;;;;;N;;;;AB78;
+13A9;CHEROKEE LETTER GI;Lu;0;L;;;;;N;;;;AB79;
+13AA;CHEROKEE LETTER GO;Lu;0;L;;;;;N;;;;AB7A;
+13AB;CHEROKEE LETTER GU;Lu;0;L;;;;;N;;;;AB7B;
+13AC;CHEROKEE LETTER GV;Lu;0;L;;;;;N;;;;AB7C;
+13AD;CHEROKEE LETTER HA;Lu;0;L;;;;;N;;;;AB7D;
+13AE;CHEROKEE LETTER HE;Lu;0;L;;;;;N;;;;AB7E;
+13AF;CHEROKEE LETTER HI;Lu;0;L;;;;;N;;;;AB7F;
+13B0;CHEROKEE LETTER HO;Lu;0;L;;;;;N;;;;AB80;
+13B1;CHEROKEE LETTER HU;Lu;0;L;;;;;N;;;;AB81;
+13B2;CHEROKEE LETTER HV;Lu;0;L;;;;;N;;;;AB82;
+13B3;CHEROKEE LETTER LA;Lu;0;L;;;;;N;;;;AB83;
+13B4;CHEROKEE LETTER LE;Lu;0;L;;;;;N;;;;AB84;
+13B5;CHEROKEE LETTER LI;Lu;0;L;;;;;N;;;;AB85;
+13B6;CHEROKEE LETTER LO;Lu;0;L;;;;;N;;;;AB86;
+13B7;CHEROKEE LETTER LU;Lu;0;L;;;;;N;;;;AB87;
+13B8;CHEROKEE LETTER LV;Lu;0;L;;;;;N;;;;AB88;
+13B9;CHEROKEE LETTER MA;Lu;0;L;;;;;N;;;;AB89;
+13BA;CHEROKEE LETTER ME;Lu;0;L;;;;;N;;;;AB8A;
+13BB;CHEROKEE LETTER MI;Lu;0;L;;;;;N;;;;AB8B;
+13BC;CHEROKEE LETTER MO;Lu;0;L;;;;;N;;;;AB8C;
+13BD;CHEROKEE LETTER MU;Lu;0;L;;;;;N;;;;AB8D;
+13BE;CHEROKEE LETTER NA;Lu;0;L;;;;;N;;;;AB8E;
+13BF;CHEROKEE LETTER HNA;Lu;0;L;;;;;N;;;;AB8F;
+13C0;CHEROKEE LETTER NAH;Lu;0;L;;;;;N;;;;AB90;
+13C1;CHEROKEE LETTER NE;Lu;0;L;;;;;N;;;;AB91;
+13C2;CHEROKEE LETTER NI;Lu;0;L;;;;;N;;;;AB92;
+13C3;CHEROKEE LETTER NO;Lu;0;L;;;;;N;;;;AB93;
+13C4;CHEROKEE LETTER NU;Lu;0;L;;;;;N;;;;AB94;
+13C5;CHEROKEE LETTER NV;Lu;0;L;;;;;N;;;;AB95;
+13C6;CHEROKEE LETTER QUA;Lu;0;L;;;;;N;;;;AB96;
+13C7;CHEROKEE LETTER QUE;Lu;0;L;;;;;N;;;;AB97;
+13C8;CHEROKEE LETTER QUI;Lu;0;L;;;;;N;;;;AB98;
+13C9;CHEROKEE LETTER QUO;Lu;0;L;;;;;N;;;;AB99;
+13CA;CHEROKEE LETTER QUU;Lu;0;L;;;;;N;;;;AB9A;
+13CB;CHEROKEE LETTER QUV;Lu;0;L;;;;;N;;;;AB9B;
+13CC;CHEROKEE LETTER SA;Lu;0;L;;;;;N;;;;AB9C;
+13CD;CHEROKEE LETTER S;Lu;0;L;;;;;N;;;;AB9D;
+13CE;CHEROKEE LETTER SE;Lu;0;L;;;;;N;;;;AB9E;
+13CF;CHEROKEE LETTER SI;Lu;0;L;;;;;N;;;;AB9F;
+13D0;CHEROKEE LETTER SO;Lu;0;L;;;;;N;;;;ABA0;
+13D1;CHEROKEE LETTER SU;Lu;0;L;;;;;N;;;;ABA1;
+13D2;CHEROKEE LETTER SV;Lu;0;L;;;;;N;;;;ABA2;
+13D3;CHEROKEE LETTER DA;Lu;0;L;;;;;N;;;;ABA3;
+13D4;CHEROKEE LETTER TA;Lu;0;L;;;;;N;;;;ABA4;
+13D5;CHEROKEE LETTER DE;Lu;0;L;;;;;N;;;;ABA5;
+13D6;CHEROKEE LETTER TE;Lu;0;L;;;;;N;;;;ABA6;
+13D7;CHEROKEE LETTER DI;Lu;0;L;;;;;N;;;;ABA7;
+13D8;CHEROKEE LETTER TI;Lu;0;L;;;;;N;;;;ABA8;
+13D9;CHEROKEE LETTER DO;Lu;0;L;;;;;N;;;;ABA9;
+13DA;CHEROKEE LETTER DU;Lu;0;L;;;;;N;;;;ABAA;
+13DB;CHEROKEE LETTER DV;Lu;0;L;;;;;N;;;;ABAB;
+13DC;CHEROKEE LETTER DLA;Lu;0;L;;;;;N;;;;ABAC;
+13DD;CHEROKEE LETTER TLA;Lu;0;L;;;;;N;;;;ABAD;
+13DE;CHEROKEE LETTER TLE;Lu;0;L;;;;;N;;;;ABAE;
+13DF;CHEROKEE LETTER TLI;Lu;0;L;;;;;N;;;;ABAF;
+13E0;CHEROKEE LETTER TLO;Lu;0;L;;;;;N;;;;ABB0;
+13E1;CHEROKEE LETTER TLU;Lu;0;L;;;;;N;;;;ABB1;
+13E2;CHEROKEE LETTER TLV;Lu;0;L;;;;;N;;;;ABB2;
+13E3;CHEROKEE LETTER TSA;Lu;0;L;;;;;N;;;;ABB3;
+13E4;CHEROKEE LETTER TSE;Lu;0;L;;;;;N;;;;ABB4;
+13E5;CHEROKEE LETTER TSI;Lu;0;L;;;;;N;;;;ABB5;
+13E6;CHEROKEE LETTER TSO;Lu;0;L;;;;;N;;;;ABB6;
+13E7;CHEROKEE LETTER TSU;Lu;0;L;;;;;N;;;;ABB7;
+13E8;CHEROKEE LETTER TSV;Lu;0;L;;;;;N;;;;ABB8;
+13E9;CHEROKEE LETTER WA;Lu;0;L;;;;;N;;;;ABB9;
+13EA;CHEROKEE LETTER WE;Lu;0;L;;;;;N;;;;ABBA;
+13EB;CHEROKEE LETTER WI;Lu;0;L;;;;;N;;;;ABBB;
+13EC;CHEROKEE LETTER WO;Lu;0;L;;;;;N;;;;ABBC;
+13ED;CHEROKEE LETTER WU;Lu;0;L;;;;;N;;;;ABBD;
+13EE;CHEROKEE LETTER WV;Lu;0;L;;;;;N;;;;ABBE;
+13EF;CHEROKEE LETTER YA;Lu;0;L;;;;;N;;;;ABBF;
+13F0;CHEROKEE LETTER YE;Lu;0;L;;;;;N;;;;13F8;
+13F1;CHEROKEE LETTER YI;Lu;0;L;;;;;N;;;;13F9;
+13F2;CHEROKEE LETTER YO;Lu;0;L;;;;;N;;;;13FA;
+13F3;CHEROKEE LETTER YU;Lu;0;L;;;;;N;;;;13FB;
+13F4;CHEROKEE LETTER YV;Lu;0;L;;;;;N;;;;13FC;
+13F5;CHEROKEE LETTER MV;Lu;0;L;;;;;N;;;;13FD;
+13F8;CHEROKEE SMALL LETTER YE;Ll;0;L;;;;;N;;;13F0;;13F0
+13F9;CHEROKEE SMALL LETTER YI;Ll;0;L;;;;;N;;;13F1;;13F1
+13FA;CHEROKEE SMALL LETTER YO;Ll;0;L;;;;;N;;;13F2;;13F2
+13FB;CHEROKEE SMALL LETTER YU;Ll;0;L;;;;;N;;;13F3;;13F3
+13FC;CHEROKEE SMALL LETTER YV;Ll;0;L;;;;;N;;;13F4;;13F4
+13FD;CHEROKEE SMALL LETTER MV;Ll;0;L;;;;;N;;;13F5;;13F5
 1400;CANADIAN SYLLABICS HYPHEN;Pd;0;ON;;;;;N;;;;;
 1401;CANADIAN SYLLABICS E;Lo;0;L;;;;;N;;;;;
 1402;CANADIAN SYLLABICS AAI;Lo;0;L;;;;;N;;;;;
@@ -5700,23 +5713,23 @@
 19A9;NEW TAI LUE LETTER LOW XVA;Lo;0;L;;;;;N;;;;;
 19AA;NEW TAI LUE LETTER HIGH SUA;Lo;0;L;;;;;N;;;;;
 19AB;NEW TAI LUE LETTER LOW SUA;Lo;0;L;;;;;N;;;;;
-19B0;NEW TAI LUE VOWEL SIGN VOWEL SHORTENER;Mc;0;L;;;;;N;;;;;
-19B1;NEW TAI LUE VOWEL SIGN AA;Mc;0;L;;;;;N;;;;;
-19B2;NEW TAI LUE VOWEL SIGN II;Mc;0;L;;;;;N;;;;;
-19B3;NEW TAI LUE VOWEL SIGN U;Mc;0;L;;;;;N;;;;;
-19B4;NEW TAI LUE VOWEL SIGN UU;Mc;0;L;;;;;N;;;;;
-19B5;NEW TAI LUE VOWEL SIGN E;Mc;0;L;;;;;N;;;;;
-19B6;NEW TAI LUE VOWEL SIGN AE;Mc;0;L;;;;;N;;;;;
-19B7;NEW TAI LUE VOWEL SIGN O;Mc;0;L;;;;;N;;;;;
-19B8;NEW TAI LUE VOWEL SIGN OA;Mc;0;L;;;;;N;;;;;
-19B9;NEW TAI LUE VOWEL SIGN UE;Mc;0;L;;;;;N;;;;;
-19BA;NEW TAI LUE VOWEL SIGN AY;Mc;0;L;;;;;N;;;;;
-19BB;NEW TAI LUE VOWEL SIGN AAY;Mc;0;L;;;;;N;;;;;
-19BC;NEW TAI LUE VOWEL SIGN UY;Mc;0;L;;;;;N;;;;;
-19BD;NEW TAI LUE VOWEL SIGN OY;Mc;0;L;;;;;N;;;;;
-19BE;NEW TAI LUE VOWEL SIGN OAY;Mc;0;L;;;;;N;;;;;
-19BF;NEW TAI LUE VOWEL SIGN UEY;Mc;0;L;;;;;N;;;;;
-19C0;NEW TAI LUE VOWEL SIGN IY;Mc;0;L;;;;;N;;;;;
+19B0;NEW TAI LUE VOWEL SIGN VOWEL SHORTENER;Lo;0;L;;;;;N;;;;;
+19B1;NEW TAI LUE VOWEL SIGN AA;Lo;0;L;;;;;N;;;;;
+19B2;NEW TAI LUE VOWEL SIGN II;Lo;0;L;;;;;N;;;;;
+19B3;NEW TAI LUE VOWEL SIGN U;Lo;0;L;;;;;N;;;;;
+19B4;NEW TAI LUE VOWEL SIGN UU;Lo;0;L;;;;;N;;;;;
+19B5;NEW TAI LUE VOWEL SIGN E;Lo;0;L;;;;;N;;;;;
+19B6;NEW TAI LUE VOWEL SIGN AE;Lo;0;L;;;;;N;;;;;
+19B7;NEW TAI LUE VOWEL SIGN O;Lo;0;L;;;;;N;;;;;
+19B8;NEW TAI LUE VOWEL SIGN OA;Lo;0;L;;;;;N;;;;;
+19B9;NEW TAI LUE VOWEL SIGN UE;Lo;0;L;;;;;N;;;;;
+19BA;NEW TAI LUE VOWEL SIGN AY;Lo;0;L;;;;;N;;;;;
+19BB;NEW TAI LUE VOWEL SIGN AAY;Lo;0;L;;;;;N;;;;;
+19BC;NEW TAI LUE VOWEL SIGN UY;Lo;0;L;;;;;N;;;;;
+19BD;NEW TAI LUE VOWEL SIGN OY;Lo;0;L;;;;;N;;;;;
+19BE;NEW TAI LUE VOWEL SIGN OAY;Lo;0;L;;;;;N;;;;;
+19BF;NEW TAI LUE VOWEL SIGN UEY;Lo;0;L;;;;;N;;;;;
+19C0;NEW TAI LUE VOWEL SIGN IY;Lo;0;L;;;;;N;;;;;
 19C1;NEW TAI LUE LETTER FINAL V;Lo;0;L;;;;;N;;;;;
 19C2;NEW TAI LUE LETTER FINAL NG;Lo;0;L;;;;;N;;;;;
 19C3;NEW TAI LUE LETTER FINAL N;Lo;0;L;;;;;N;;;;;
@@ -5724,8 +5737,8 @@
 19C5;NEW TAI LUE LETTER FINAL K;Lo;0;L;;;;;N;;;;;
 19C6;NEW TAI LUE LETTER FINAL D;Lo;0;L;;;;;N;;;;;
 19C7;NEW TAI LUE LETTER FINAL B;Lo;0;L;;;;;N;;;;;
-19C8;NEW TAI LUE TONE MARK-1;Mc;0;L;;;;;N;;;;;
-19C9;NEW TAI LUE TONE MARK-2;Mc;0;L;;;;;N;;;;;
+19C8;NEW TAI LUE TONE MARK-1;Lo;0;L;;;;;N;;;;;
+19C9;NEW TAI LUE TONE MARK-2;Lo;0;L;;;;;N;;;;;
 19D0;NEW TAI LUE DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;;
 19D1;NEW TAI LUE DIGIT ONE;Nd;0;L;;1;1;1;N;;;;;
 19D2;NEW TAI LUE DIGIT TWO;Nd;0;L;;2;2;2;N;;;;;
@@ -7277,6 +7290,7 @@
 20BB;NORDIC MARK SIGN;Sc;0;ET;;;;;N;;;;;
 20BC;MANAT SIGN;Sc;0;ET;;;;;N;;;;;
 20BD;RUBLE SIGN;Sc;0;ET;;;;;N;;;;;
+20BE;LARI SIGN;Sc;0;ET;;;;;N;;;;;
 20D0;COMBINING LEFT HARPOON ABOVE;Mn;230;NSM;;;;;N;NON-SPACING LEFT HARPOON 
ABOVE;;;;
 20D1;COMBINING RIGHT HARPOON ABOVE;Mn;230;NSM;;;;;N;NON-SPACING RIGHT HARPOON 
ABOVE;;;;
 20D2;COMBINING LONG VERTICAL LINE OVERLAY;Mn;1;NSM;;;;;N;NON-SPACING LONG 
VERTICAL BAR OVERLAY;;;;
@@ -7448,6 +7462,8 @@
 2187;ROMAN NUMERAL FIFTY THOUSAND;Nl;0;L;;;;50000;N;;;;;
 2188;ROMAN NUMERAL ONE HUNDRED THOUSAND;Nl;0;L;;;;100000;N;;;;;
 2189;VULGAR FRACTION ZERO THIRDS;No;0;ON;<fraction> 0030 2044 0033;;;0;N;;;;;
+218A;TURNED DIGIT TWO;So;0;ON;;;;;N;;;;;
+218B;TURNED DIGIT THREE;So;0;ON;;;;;N;;;;;
 2190;LEFTWARDS ARROW;Sm;0;ON;;;;;N;LEFT ARROW;;;;
 2191;UPWARDS ARROW;Sm;0;ON;;;;;N;UP ARROW;;;;
 2192;RIGHTWARDS ARROW;Sm;0;ON;;;;;N;RIGHT ARROW;;;;
@@ -10015,6 +10031,10 @@
 2BCF;ROTATED WHITE FOUR POINTED CUSP;So;0;ON;;;;;N;;;;;
 2BD0;SQUARE POSITION INDICATOR;So;0;ON;;;;;N;;;;;
 2BD1;UNCERTAINTY SIGN;So;0;ON;;;;;N;;;;;
+2BEC;LEFTWARDS TWO-HEADED ARROW WITH TRIANGLE ARROWHEADS;So;0;ON;;;;;N;;;;;
+2BED;UPWARDS TWO-HEADED ARROW WITH TRIANGLE ARROWHEADS;So;0;ON;;;;;N;;;;;
+2BEE;RIGHTWARDS TWO-HEADED ARROW WITH TRIANGLE ARROWHEADS;So;0;ON;;;;;N;;;;;
+2BEF;DOWNWARDS TWO-HEADED ARROW WITH TRIANGLE ARROWHEADS;So;0;ON;;;;;N;;;;;
 2C00;GLAGOLITIC CAPITAL LETTER AZU;Lu;0;L;;;;;N;;;;2C30;
 2C01;GLAGOLITIC CAPITAL LETTER BUKY;Lu;0;L;;;;;N;;;;2C31;
 2C02;GLAGOLITIC CAPITAL LETTER VEDE;Lu;0;L;;;;;N;;;;2C32;
@@ -11942,7 +11962,7 @@
 4DFE;HEXAGRAM FOR AFTER COMPLETION;So;0;ON;;;;;N;;;;;
 4DFF;HEXAGRAM FOR BEFORE COMPLETION;So;0;ON;;;;;N;;;;;
 4E00;<CJK Ideograph, First>;Lo;0;L;;;;;N;;;;;
-9FCC;<CJK Ideograph, Last>;Lo;0;L;;;;;N;;;;;
+9FD5;<CJK Ideograph, Last>;Lo;0;L;;;;;N;;;;;
 A000;YI SYLLABLE IT;Lo;0;L;;;;;N;;;;;
 A001;YI SYLLABLE IX;Lo;0;L;;;;;N;;;;;
 A002;YI SYLLABLE I;Lo;0;L;;;;;N;;;;;
@@ -13605,6 +13625,7 @@ A69A;CYRILLIC CAPITAL LETTER CROSSED 
O;Lu;0;L;;;;;N;;;;A69B;
 A69B;CYRILLIC SMALL LETTER CROSSED O;Ll;0;L;;;;;N;;;A69A;;A69A
 A69C;MODIFIER LETTER CYRILLIC HARD SIGN;Lm;0;L;<super> 044A;;;;N;;;;;
 A69D;MODIFIER LETTER CYRILLIC SOFT SIGN;Lm;0;L;<super> 044C;;;;N;;;;;
+A69E;COMBINING CYRILLIC LETTER EF;Mn;230;NSM;;;;;N;;;;;
 A69F;COMBINING CYRILLIC LETTER IOTIFIED E;Mn;230;NSM;;;;;N;;;;;
 A6A0;BAMUM LETTER A;Lo;0;L;;;;;N;;;;;
 A6A1;BAMUM LETTER KA;Lo;0;L;;;;;N;;;;;
@@ -13837,6 +13858,7 @@ A78B;LATIN CAPITAL LETTER SALTILLO;Lu;0;L;;;;;N;;;;A78C;
 A78C;LATIN SMALL LETTER SALTILLO;Ll;0;L;;;;;N;;;A78B;;A78B
 A78D;LATIN CAPITAL LETTER TURNED H;Lu;0;L;;;;;N;;;;0265;
 A78E;LATIN SMALL LETTER L WITH RETROFLEX HOOK AND BELT;Ll;0;L;;;;;N;;;;;
+A78F;LATIN LETTER SINOLOGICAL DOT;Lo;0;L;;;;;N;;;;;
 A790;LATIN CAPITAL LETTER N WITH DESCENDER;Lu;0;L;;;;;N;;;;A791;
 A791;LATIN SMALL LETTER N WITH DESCENDER;Ll;0;L;;;;;N;;;A790;;A790
 A792;LATIN CAPITAL LETTER C WITH BAR;Lu;0;L;;;;;N;;;;A793;
@@ -13869,6 +13891,12 @@ A7AC;LATIN CAPITAL LETTER SCRIPT 
G;Lu;0;L;;;;;N;;;;0261;
 A7AD;LATIN CAPITAL LETTER L WITH BELT;Lu;0;L;;;;;N;;;;026C;
 A7B0;LATIN CAPITAL LETTER TURNED K;Lu;0;L;;;;;N;;;;029E;
 A7B1;LATIN CAPITAL LETTER TURNED T;Lu;0;L;;;;;N;;;;0287;
+A7B2;LATIN CAPITAL LETTER J WITH CROSSED-TAIL;Lu;0;L;;;;;N;;;;029D;
+A7B3;LATIN CAPITAL LETTER CHI;Lu;0;L;;;;;N;;;;AB53;
+A7B4;LATIN CAPITAL LETTER BETA;Lu;0;L;;;;;N;;;;A7B5;
+A7B5;LATIN SMALL LETTER BETA;Ll;0;L;;;;;N;;;A7B4;;A7B4
+A7B6;LATIN CAPITAL LETTER OMEGA;Lu;0;L;;;;;N;;;;A7B7;
+A7B7;LATIN SMALL LETTER OMEGA;Ll;0;L;;;;;N;;;A7B6;;A7B6
 A7F7;LATIN EPIGRAPHIC LETTER SIDEWAYS I;Lo;0;L;;;;;N;;;;;
 A7F8;MODIFIER LETTER CAPITAL H WITH STROKE;Lm;0;L;<super> 0126;;;;N;;;;;
 A7F9;MODIFIER LETTER SMALL LIGATURE OE;Lm;0;L;<super> 0153;;;;N;;;;;
@@ -14097,6 +14125,8 @@ A8F8;DEVANAGARI SIGN PUSHPIKA;Po;0;L;;;;;N;;;;;
 A8F9;DEVANAGARI GAP FILLER;Po;0;L;;;;;N;;;;;
 A8FA;DEVANAGARI CARET;Po;0;L;;;;;N;;;;;
 A8FB;DEVANAGARI HEADSTROKE;Lo;0;L;;;;;N;;;;;
+A8FC;DEVANAGARI SIGN SIDDHAM;Po;0;L;;;;;N;;;;;
+A8FD;DEVANAGARI JAIN OM;Lo;0;L;;;;;N;;;;;
 A900;KAYAH LI DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;;
 A901;KAYAH LI DIGIT ONE;Nd;0;L;;1;1;1;N;;;;;
 A902;KAYAH LI DIGIT TWO;Nd;0;L;;2;2;2;N;;;;;
@@ -14610,7 +14640,7 @@ AB4F;LATIN SMALL LETTER U BAR WITH SHORT RIGHT 
LEG;Ll;0;L;;;;;N;;;;;
 AB50;LATIN SMALL LETTER UI;Ll;0;L;;;;;N;;;;;
 AB51;LATIN SMALL LETTER TURNED UI;Ll;0;L;;;;;N;;;;;
 AB52;LATIN SMALL LETTER U WITH LEFT HOOK;Ll;0;L;;;;;N;;;;;
-AB53;LATIN SMALL LETTER CHI;Ll;0;L;;;;;N;;;;;
+AB53;LATIN SMALL LETTER CHI;Ll;0;L;;;;;N;;;A7B3;;A7B3
 AB54;LATIN SMALL LETTER CHI WITH LOW RIGHT RING;Ll;0;L;;;;;N;;;;;
 AB55;LATIN SMALL LETTER CHI WITH LOW LEFT SERIF;Ll;0;L;;;;;N;;;;;
 AB56;LATIN SMALL LETTER X WITH LOW RIGHT RING;Ll;0;L;;;;;N;;;;;
@@ -14623,8 +14653,92 @@ AB5C;MODIFIER LETTER SMALL HENG;Lm;0;L;<super> 
A727;;;;N;;;;;
 AB5D;MODIFIER LETTER SMALL L WITH INVERTED LAZY S;Lm;0;L;<super> AB37;;;;N;;;;;
 AB5E;MODIFIER LETTER SMALL L WITH MIDDLE TILDE;Lm;0;L;<super> 026B;;;;N;;;;;
 AB5F;MODIFIER LETTER SMALL U WITH LEFT HOOK;Lm;0;L;<super> AB52;;;;N;;;;;
+AB60;LATIN SMALL LETTER SAKHA YAT;Ll;0;L;;;;;N;;;;;
+AB61;LATIN SMALL LETTER IOTIFIED E;Ll;0;L;;;;;N;;;;;
+AB62;LATIN SMALL LETTER OPEN OE;Ll;0;L;;;;;N;;;;;
+AB63;LATIN SMALL LETTER UO;Ll;0;L;;;;;N;;;;;
 AB64;LATIN SMALL LETTER INVERTED ALPHA;Ll;0;L;;;;;N;;;;;
 AB65;GREEK LETTER SMALL CAPITAL OMEGA;Ll;0;L;;;;;N;;;;;
+AB70;CHEROKEE SMALL LETTER A;Ll;0;L;;;;;N;;;13A0;;13A0
+AB71;CHEROKEE SMALL LETTER E;Ll;0;L;;;;;N;;;13A1;;13A1
+AB72;CHEROKEE SMALL LETTER I;Ll;0;L;;;;;N;;;13A2;;13A2
+AB73;CHEROKEE SMALL LETTER O;Ll;0;L;;;;;N;;;13A3;;13A3
+AB74;CHEROKEE SMALL LETTER U;Ll;0;L;;;;;N;;;13A4;;13A4
+AB75;CHEROKEE SMALL LETTER V;Ll;0;L;;;;;N;;;13A5;;13A5
+AB76;CHEROKEE SMALL LETTER GA;Ll;0;L;;;;;N;;;13A6;;13A6
+AB77;CHEROKEE SMALL LETTER KA;Ll;0;L;;;;;N;;;13A7;;13A7
+AB78;CHEROKEE SMALL LETTER GE;Ll;0;L;;;;;N;;;13A8;;13A8
+AB79;CHEROKEE SMALL LETTER GI;Ll;0;L;;;;;N;;;13A9;;13A9
+AB7A;CHEROKEE SMALL LETTER GO;Ll;0;L;;;;;N;;;13AA;;13AA
+AB7B;CHEROKEE SMALL LETTER GU;Ll;0;L;;;;;N;;;13AB;;13AB
+AB7C;CHEROKEE SMALL LETTER GV;Ll;0;L;;;;;N;;;13AC;;13AC
+AB7D;CHEROKEE SMALL LETTER HA;Ll;0;L;;;;;N;;;13AD;;13AD
+AB7E;CHEROKEE SMALL LETTER HE;Ll;0;L;;;;;N;;;13AE;;13AE
+AB7F;CHEROKEE SMALL LETTER HI;Ll;0;L;;;;;N;;;13AF;;13AF
+AB80;CHEROKEE SMALL LETTER HO;Ll;0;L;;;;;N;;;13B0;;13B0
+AB81;CHEROKEE SMALL LETTER HU;Ll;0;L;;;;;N;;;13B1;;13B1
+AB82;CHEROKEE SMALL LETTER HV;Ll;0;L;;;;;N;;;13B2;;13B2
+AB83;CHEROKEE SMALL LETTER LA;Ll;0;L;;;;;N;;;13B3;;13B3
+AB84;CHEROKEE SMALL LETTER LE;Ll;0;L;;;;;N;;;13B4;;13B4
+AB85;CHEROKEE SMALL LETTER LI;Ll;0;L;;;;;N;;;13B5;;13B5
+AB86;CHEROKEE SMALL LETTER LO;Ll;0;L;;;;;N;;;13B6;;13B6
+AB87;CHEROKEE SMALL LETTER LU;Ll;0;L;;;;;N;;;13B7;;13B7
+AB88;CHEROKEE SMALL LETTER LV;Ll;0;L;;;;;N;;;13B8;;13B8
+AB89;CHEROKEE SMALL LETTER MA;Ll;0;L;;;;;N;;;13B9;;13B9
+AB8A;CHEROKEE SMALL LETTER ME;Ll;0;L;;;;;N;;;13BA;;13BA
+AB8B;CHEROKEE SMALL LETTER MI;Ll;0;L;;;;;N;;;13BB;;13BB
+AB8C;CHEROKEE SMALL LETTER MO;Ll;0;L;;;;;N;;;13BC;;13BC
+AB8D;CHEROKEE SMALL LETTER MU;Ll;0;L;;;;;N;;;13BD;;13BD
+AB8E;CHEROKEE SMALL LETTER NA;Ll;0;L;;;;;N;;;13BE;;13BE
+AB8F;CHEROKEE SMALL LETTER HNA;Ll;0;L;;;;;N;;;13BF;;13BF
+AB90;CHEROKEE SMALL LETTER NAH;Ll;0;L;;;;;N;;;13C0;;13C0
+AB91;CHEROKEE SMALL LETTER NE;Ll;0;L;;;;;N;;;13C1;;13C1
+AB92;CHEROKEE SMALL LETTER NI;Ll;0;L;;;;;N;;;13C2;;13C2
+AB93;CHEROKEE SMALL LETTER NO;Ll;0;L;;;;;N;;;13C3;;13C3
+AB94;CHEROKEE SMALL LETTER NU;Ll;0;L;;;;;N;;;13C4;;13C4
+AB95;CHEROKEE SMALL LETTER NV;Ll;0;L;;;;;N;;;13C5;;13C5
+AB96;CHEROKEE SMALL LETTER QUA;Ll;0;L;;;;;N;;;13C6;;13C6
+AB97;CHEROKEE SMALL LETTER QUE;Ll;0;L;;;;;N;;;13C7;;13C7
+AB98;CHEROKEE SMALL LETTER QUI;Ll;0;L;;;;;N;;;13C8;;13C8
+AB99;CHEROKEE SMALL LETTER QUO;Ll;0;L;;;;;N;;;13C9;;13C9
+AB9A;CHEROKEE SMALL LETTER QUU;Ll;0;L;;;;;N;;;13CA;;13CA
+AB9B;CHEROKEE SMALL LETTER QUV;Ll;0;L;;;;;N;;;13CB;;13CB
+AB9C;CHEROKEE SMALL LETTER SA;Ll;0;L;;;;;N;;;13CC;;13CC
+AB9D;CHEROKEE SMALL LETTER S;Ll;0;L;;;;;N;;;13CD;;13CD
+AB9E;CHEROKEE SMALL LETTER SE;Ll;0;L;;;;;N;;;13CE;;13CE
+AB9F;CHEROKEE SMALL LETTER SI;Ll;0;L;;;;;N;;;13CF;;13CF
+ABA0;CHEROKEE SMALL LETTER SO;Ll;0;L;;;;;N;;;13D0;;13D0
+ABA1;CHEROKEE SMALL LETTER SU;Ll;0;L;;;;;N;;;13D1;;13D1
+ABA2;CHEROKEE SMALL LETTER SV;Ll;0;L;;;;;N;;;13D2;;13D2
+ABA3;CHEROKEE SMALL LETTER DA;Ll;0;L;;;;;N;;;13D3;;13D3
+ABA4;CHEROKEE SMALL LETTER TA;Ll;0;L;;;;;N;;;13D4;;13D4
+ABA5;CHEROKEE SMALL LETTER DE;Ll;0;L;;;;;N;;;13D5;;13D5
+ABA6;CHEROKEE SMALL LETTER TE;Ll;0;L;;;;;N;;;13D6;;13D6
+ABA7;CHEROKEE SMALL LETTER DI;Ll;0;L;;;;;N;;;13D7;;13D7
+ABA8;CHEROKEE SMALL LETTER TI;Ll;0;L;;;;;N;;;13D8;;13D8
+ABA9;CHEROKEE SMALL LETTER DO;Ll;0;L;;;;;N;;;13D9;;13D9
+ABAA;CHEROKEE SMALL LETTER DU;Ll;0;L;;;;;N;;;13DA;;13DA
+ABAB;CHEROKEE SMALL LETTER DV;Ll;0;L;;;;;N;;;13DB;;13DB
+ABAC;CHEROKEE SMALL LETTER DLA;Ll;0;L;;;;;N;;;13DC;;13DC
+ABAD;CHEROKEE SMALL LETTER TLA;Ll;0;L;;;;;N;;;13DD;;13DD
+ABAE;CHEROKEE SMALL LETTER TLE;Ll;0;L;;;;;N;;;13DE;;13DE
+ABAF;CHEROKEE SMALL LETTER TLI;Ll;0;L;;;;;N;;;13DF;;13DF
+ABB0;CHEROKEE SMALL LETTER TLO;Ll;0;L;;;;;N;;;13E0;;13E0
+ABB1;CHEROKEE SMALL LETTER TLU;Ll;0;L;;;;;N;;;13E1;;13E1
+ABB2;CHEROKEE SMALL LETTER TLV;Ll;0;L;;;;;N;;;13E2;;13E2
+ABB3;CHEROKEE SMALL LETTER TSA;Ll;0;L;;;;;N;;;13E3;;13E3
+ABB4;CHEROKEE SMALL LETTER TSE;Ll;0;L;;;;;N;;;13E4;;13E4
+ABB5;CHEROKEE SMALL LETTER TSI;Ll;0;L;;;;;N;;;13E5;;13E5
+ABB6;CHEROKEE SMALL LETTER TSO;Ll;0;L;;;;;N;;;13E6;;13E6
+ABB7;CHEROKEE SMALL LETTER TSU;Ll;0;L;;;;;N;;;13E7;;13E7
+ABB8;CHEROKEE SMALL LETTER TSV;Ll;0;L;;;;;N;;;13E8;;13E8
+ABB9;CHEROKEE SMALL LETTER WA;Ll;0;L;;;;;N;;;13E9;;13E9
+ABBA;CHEROKEE SMALL LETTER WE;Ll;0;L;;;;;N;;;13EA;;13EA
+ABBB;CHEROKEE SMALL LETTER WI;Ll;0;L;;;;;N;;;13EB;;13EB
+ABBC;CHEROKEE SMALL LETTER WO;Ll;0;L;;;;;N;;;13EC;;13EC
+ABBD;CHEROKEE SMALL LETTER WU;Ll;0;L;;;;;N;;;13ED;;13ED
+ABBE;CHEROKEE SMALL LETTER WV;Ll;0;L;;;;;N;;;13EE;;13EE
+ABBF;CHEROKEE SMALL LETTER YA;Ll;0;L;;;;;N;;;13EF;;13EF
 ABC0;MEETEI MAYEK LETTER KOK;Lo;0;L;;;;;N;;;;;
 ABC1;MEETEI MAYEK LETTER SAM;Lo;0;L;;;;;N;;;;;
 ABC2;MEETEI MAYEK LETTER LAI;Lo;0;L;;;;;N;;;;;
@@ -15944,6 +16058,8 @@ FE2A;COMBINING TILDE RIGHT HALF 
BELOW;Mn;220;NSM;;;;;N;;;;;
 FE2B;COMBINING MACRON LEFT HALF BELOW;Mn;220;NSM;;;;;N;;;;;
 FE2C;COMBINING MACRON RIGHT HALF BELOW;Mn;220;NSM;;;;;N;;;;;
 FE2D;COMBINING CONJOINING MACRON BELOW;Mn;220;NSM;;;;;N;;;;;
+FE2E;COMBINING CYRILLIC TITLO LEFT HALF;Mn;230;NSM;;;;;N;;;;;
+FE2F;COMBINING CYRILLIC TITLO RIGHT HALF;Mn;230;NSM;;;;;N;;;;;
 FE30;PRESENTATION FORM FOR VERTICAL TWO DOT LEADER;Po;0;ON;<vertical> 
2025;;;;N;GLYPH FOR VERTICAL TWO DOT LEADER;;;;
 FE31;PRESENTATION FORM FOR VERTICAL EM DASH;Pd;0;ON;<vertical> 2014;;;;N;GLYPH 
FOR VERTICAL EM DASH;;;;
 FE32;PRESENTATION FORM FOR VERTICAL EN DASH;Pd;0;ON;<vertical> 2013;;;;N;GLYPH 
FOR VERTICAL EN DASH;;;;
@@ -17830,6 +17946,32 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;;
 108AD;NABATAEAN NUMBER TEN;No;0;R;;;;10;N;;;;;
 108AE;NABATAEAN NUMBER TWENTY;No;0;R;;;;20;N;;;;;
 108AF;NABATAEAN NUMBER ONE HUNDRED;No;0;R;;;;100;N;;;;;
+108E0;HATRAN LETTER ALEPH;Lo;0;R;;;;;N;;;;;
+108E1;HATRAN LETTER BETH;Lo;0;R;;;;;N;;;;;
+108E2;HATRAN LETTER GIMEL;Lo;0;R;;;;;N;;;;;
+108E3;HATRAN LETTER DALETH-RESH;Lo;0;R;;;;;N;;;;;
+108E4;HATRAN LETTER HE;Lo;0;R;;;;;N;;;;;
+108E5;HATRAN LETTER WAW;Lo;0;R;;;;;N;;;;;
+108E6;HATRAN LETTER ZAYN;Lo;0;R;;;;;N;;;;;
+108E7;HATRAN LETTER HETH;Lo;0;R;;;;;N;;;;;
+108E8;HATRAN LETTER TETH;Lo;0;R;;;;;N;;;;;
+108E9;HATRAN LETTER YODH;Lo;0;R;;;;;N;;;;;
+108EA;HATRAN LETTER KAPH;Lo;0;R;;;;;N;;;;;
+108EB;HATRAN LETTER LAMEDH;Lo;0;R;;;;;N;;;;;
+108EC;HATRAN LETTER MEM;Lo;0;R;;;;;N;;;;;
+108ED;HATRAN LETTER NUN;Lo;0;R;;;;;N;;;;;
+108EE;HATRAN LETTER SAMEKH;Lo;0;R;;;;;N;;;;;
+108EF;HATRAN LETTER AYN;Lo;0;R;;;;;N;;;;;
+108F0;HATRAN LETTER PE;Lo;0;R;;;;;N;;;;;
+108F1;HATRAN LETTER SADHE;Lo;0;R;;;;;N;;;;;
+108F2;HATRAN LETTER QOPH;Lo;0;R;;;;;N;;;;;
+108F4;HATRAN LETTER SHIN;Lo;0;R;;;;;N;;;;;
+108F5;HATRAN LETTER TAW;Lo;0;R;;;;;N;;;;;
+108FB;HATRAN NUMBER ONE;No;0;R;;;;1;N;;;;;
+108FC;HATRAN NUMBER FIVE;No;0;R;;;;5;N;;;;;
+108FD;HATRAN NUMBER TEN;No;0;R;;;;10;N;;;;;
+108FE;HATRAN NUMBER TWENTY;No;0;R;;;;20;N;;;;;
+108FF;HATRAN NUMBER ONE HUNDRED;No;0;R;;;;100;N;;;;;
 10900;PHOENICIAN LETTER ALF;Lo;0;R;;;;;N;;;;;
 10901;PHOENICIAN LETTER BET;Lo;0;R;;;;;N;;;;;
 10902;PHOENICIAN LETTER GAML;Lo;0;R;;;;;N;;;;;
@@ -17942,8 +18084,72 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;;
 109B5;MEROITIC CURSIVE LETTER TE;Lo;0;R;;;;;N;;;;;
 109B6;MEROITIC CURSIVE LETTER TO;Lo;0;R;;;;;N;;;;;
 109B7;MEROITIC CURSIVE LETTER DA;Lo;0;R;;;;;N;;;;;
+109BC;MEROITIC CURSIVE FRACTION ELEVEN TWELFTHS;No;0;R;;;;11/12;N;;;;;
+109BD;MEROITIC CURSIVE FRACTION ONE HALF;No;0;R;;;;1/2;N;;;;;
 109BE;MEROITIC CURSIVE LOGOGRAM RMT;Lo;0;R;;;;;N;;;;;
 109BF;MEROITIC CURSIVE LOGOGRAM IMN;Lo;0;R;;;;;N;;;;;
+109C0;MEROITIC CURSIVE NUMBER ONE;No;0;R;;;;1;N;;;;;
+109C1;MEROITIC CURSIVE NUMBER TWO;No;0;R;;;;2;N;;;;;
+109C2;MEROITIC CURSIVE NUMBER THREE;No;0;R;;;;3;N;;;;;
+109C3;MEROITIC CURSIVE NUMBER FOUR;No;0;R;;;;4;N;;;;;
+109C4;MEROITIC CURSIVE NUMBER FIVE;No;0;R;;;;5;N;;;;;
+109C5;MEROITIC CURSIVE NUMBER SIX;No;0;R;;;;6;N;;;;;
+109C6;MEROITIC CURSIVE NUMBER SEVEN;No;0;R;;;;7;N;;;;;
+109C7;MEROITIC CURSIVE NUMBER EIGHT;No;0;R;;;;8;N;;;;;
+109C8;MEROITIC CURSIVE NUMBER NINE;No;0;R;;;;9;N;;;;;
+109C9;MEROITIC CURSIVE NUMBER TEN;No;0;R;;;;10;N;;;;;
+109CA;MEROITIC CURSIVE NUMBER TWENTY;No;0;R;;;;20;N;;;;;
+109CB;MEROITIC CURSIVE NUMBER THIRTY;No;0;R;;;;30;N;;;;;
+109CC;MEROITIC CURSIVE NUMBER FORTY;No;0;R;;;;40;N;;;;;
+109CD;MEROITIC CURSIVE NUMBER FIFTY;No;0;R;;;;50;N;;;;;
+109CE;MEROITIC CURSIVE NUMBER SIXTY;No;0;R;;;;60;N;;;;;
+109CF;MEROITIC CURSIVE NUMBER SEVENTY;No;0;R;;;;70;N;;;;;
+109D2;MEROITIC CURSIVE NUMBER ONE HUNDRED;No;0;R;;;;100;N;;;;;
+109D3;MEROITIC CURSIVE NUMBER TWO HUNDRED;No;0;R;;;;200;N;;;;;
+109D4;MEROITIC CURSIVE NUMBER THREE HUNDRED;No;0;R;;;;300;N;;;;;
+109D5;MEROITIC CURSIVE NUMBER FOUR HUNDRED;No;0;R;;;;400;N;;;;;
+109D6;MEROITIC CURSIVE NUMBER FIVE HUNDRED;No;0;R;;;;500;N;;;;;
+109D7;MEROITIC CURSIVE NUMBER SIX HUNDRED;No;0;R;;;;600;N;;;;;
+109D8;MEROITIC CURSIVE NUMBER SEVEN HUNDRED;No;0;R;;;;700;N;;;;;
+109D9;MEROITIC CURSIVE NUMBER EIGHT HUNDRED;No;0;R;;;;800;N;;;;;
+109DA;MEROITIC CURSIVE NUMBER NINE HUNDRED;No;0;R;;;;900;N;;;;;
+109DB;MEROITIC CURSIVE NUMBER ONE THOUSAND;No;0;R;;;;1000;N;;;;;
+109DC;MEROITIC CURSIVE NUMBER TWO THOUSAND;No;0;R;;;;2000;N;;;;;
+109DD;MEROITIC CURSIVE NUMBER THREE THOUSAND;No;0;R;;;;3000;N;;;;;
+109DE;MEROITIC CURSIVE NUMBER FOUR THOUSAND;No;0;R;;;;4000;N;;;;;
+109DF;MEROITIC CURSIVE NUMBER FIVE THOUSAND;No;0;R;;;;5000;N;;;;;
+109E0;MEROITIC CURSIVE NUMBER SIX THOUSAND;No;0;R;;;;6000;N;;;;;
+109E1;MEROITIC CURSIVE NUMBER SEVEN THOUSAND;No;0;R;;;;7000;N;;;;;
+109E2;MEROITIC CURSIVE NUMBER EIGHT THOUSAND;No;0;R;;;;8000;N;;;;;
+109E3;MEROITIC CURSIVE NUMBER NINE THOUSAND;No;0;R;;;;9000;N;;;;;
+109E4;MEROITIC CURSIVE NUMBER TEN THOUSAND;No;0;R;;;;10000;N;;;;;
+109E5;MEROITIC CURSIVE NUMBER TWENTY THOUSAND;No;0;R;;;;20000;N;;;;;
+109E6;MEROITIC CURSIVE NUMBER THIRTY THOUSAND;No;0;R;;;;30000;N;;;;;
+109E7;MEROITIC CURSIVE NUMBER FORTY THOUSAND;No;0;R;;;;40000;N;;;;;
+109E8;MEROITIC CURSIVE NUMBER FIFTY THOUSAND;No;0;R;;;;50000;N;;;;;
+109E9;MEROITIC CURSIVE NUMBER SIXTY THOUSAND;No;0;R;;;;60000;N;;;;;
+109EA;MEROITIC CURSIVE NUMBER SEVENTY THOUSAND;No;0;R;;;;70000;N;;;;;
+109EB;MEROITIC CURSIVE NUMBER EIGHTY THOUSAND;No;0;R;;;;80000;N;;;;;
+109EC;MEROITIC CURSIVE NUMBER NINETY THOUSAND;No;0;R;;;;90000;N;;;;;
+109ED;MEROITIC CURSIVE NUMBER ONE HUNDRED THOUSAND;No;0;R;;;;100000;N;;;;;
+109EE;MEROITIC CURSIVE NUMBER TWO HUNDRED THOUSAND;No;0;R;;;;200000;N;;;;;
+109EF;MEROITIC CURSIVE NUMBER THREE HUNDRED THOUSAND;No;0;R;;;;300000;N;;;;;
+109F0;MEROITIC CURSIVE NUMBER FOUR HUNDRED THOUSAND;No;0;R;;;;400000;N;;;;;
+109F1;MEROITIC CURSIVE NUMBER FIVE HUNDRED THOUSAND;No;0;R;;;;500000;N;;;;;
+109F2;MEROITIC CURSIVE NUMBER SIX HUNDRED THOUSAND;No;0;R;;;;600000;N;;;;;
+109F3;MEROITIC CURSIVE NUMBER SEVEN HUNDRED THOUSAND;No;0;R;;;;700000;N;;;;;
+109F4;MEROITIC CURSIVE NUMBER EIGHT HUNDRED THOUSAND;No;0;R;;;;800000;N;;;;;
+109F5;MEROITIC CURSIVE NUMBER NINE HUNDRED THOUSAND;No;0;R;;;;900000;N;;;;;
+109F6;MEROITIC CURSIVE FRACTION ONE TWELFTH;No;0;R;;;;1/12;N;;;;;
+109F7;MEROITIC CURSIVE FRACTION TWO TWELFTHS;No;0;R;;;;2/12;N;;;;;
+109F8;MEROITIC CURSIVE FRACTION THREE TWELFTHS;No;0;R;;;;3/12;N;;;;;
+109F9;MEROITIC CURSIVE FRACTION FOUR TWELFTHS;No;0;R;;;;4/12;N;;;;;
+109FA;MEROITIC CURSIVE FRACTION FIVE TWELFTHS;No;0;R;;;;5/12;N;;;;;
+109FB;MEROITIC CURSIVE FRACTION SIX TWELFTHS;No;0;R;;;;6/12;N;;;;;
+109FC;MEROITIC CURSIVE FRACTION SEVEN TWELFTHS;No;0;R;;;;7/12;N;;;;;
+109FD;MEROITIC CURSIVE FRACTION EIGHT TWELFTHS;No;0;R;;;;8/12;N;;;;;
+109FE;MEROITIC CURSIVE FRACTION NINE TWELFTHS;No;0;R;;;;9/12;N;;;;;
+109FF;MEROITIC CURSIVE FRACTION TEN TWELFTHS;No;0;R;;;;10/12;N;;;;;
 10A00;KHAROSHTHI LETTER A;Lo;0;R;;;;;N;;;;;
 10A01;KHAROSHTHI VOWEL SIGN I;Mn;0;NSM;;;;;N;;;;;
 10A02;KHAROSHTHI VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;;
@@ -18344,6 +18550,114 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;;
 10C46;OLD TURKIC LETTER YENISEI AET;Lo;0;R;;;;;N;;;;;
 10C47;OLD TURKIC LETTER ORKHON OT;Lo;0;R;;;;;N;;;;;
 10C48;OLD TURKIC LETTER ORKHON BASH;Lo;0;R;;;;;N;;;;;
+10C80;OLD HUNGARIAN CAPITAL LETTER A;Lu;0;R;;;;;N;;;;10CC0;
+10C81;OLD HUNGARIAN CAPITAL LETTER AA;Lu;0;R;;;;;N;;;;10CC1;
+10C82;OLD HUNGARIAN CAPITAL LETTER EB;Lu;0;R;;;;;N;;;;10CC2;
+10C83;OLD HUNGARIAN CAPITAL LETTER AMB;Lu;0;R;;;;;N;;;;10CC3;
+10C84;OLD HUNGARIAN CAPITAL LETTER EC;Lu;0;R;;;;;N;;;;10CC4;
+10C85;OLD HUNGARIAN CAPITAL LETTER ENC;Lu;0;R;;;;;N;;;;10CC5;
+10C86;OLD HUNGARIAN CAPITAL LETTER ECS;Lu;0;R;;;;;N;;;;10CC6;
+10C87;OLD HUNGARIAN CAPITAL LETTER ED;Lu;0;R;;;;;N;;;;10CC7;
+10C88;OLD HUNGARIAN CAPITAL LETTER AND;Lu;0;R;;;;;N;;;;10CC8;
+10C89;OLD HUNGARIAN CAPITAL LETTER E;Lu;0;R;;;;;N;;;;10CC9;
+10C8A;OLD HUNGARIAN CAPITAL LETTER CLOSE E;Lu;0;R;;;;;N;;;;10CCA;
+10C8B;OLD HUNGARIAN CAPITAL LETTER EE;Lu;0;R;;;;;N;;;;10CCB;
+10C8C;OLD HUNGARIAN CAPITAL LETTER EF;Lu;0;R;;;;;N;;;;10CCC;
+10C8D;OLD HUNGARIAN CAPITAL LETTER EG;Lu;0;R;;;;;N;;;;10CCD;
+10C8E;OLD HUNGARIAN CAPITAL LETTER EGY;Lu;0;R;;;;;N;;;;10CCE;
+10C8F;OLD HUNGARIAN CAPITAL LETTER EH;Lu;0;R;;;;;N;;;;10CCF;
+10C90;OLD HUNGARIAN CAPITAL LETTER I;Lu;0;R;;;;;N;;;;10CD0;
+10C91;OLD HUNGARIAN CAPITAL LETTER II;Lu;0;R;;;;;N;;;;10CD1;
+10C92;OLD HUNGARIAN CAPITAL LETTER EJ;Lu;0;R;;;;;N;;;;10CD2;
+10C93;OLD HUNGARIAN CAPITAL LETTER EK;Lu;0;R;;;;;N;;;;10CD3;
+10C94;OLD HUNGARIAN CAPITAL LETTER AK;Lu;0;R;;;;;N;;;;10CD4;
+10C95;OLD HUNGARIAN CAPITAL LETTER UNK;Lu;0;R;;;;;N;;;;10CD5;
+10C96;OLD HUNGARIAN CAPITAL LETTER EL;Lu;0;R;;;;;N;;;;10CD6;
+10C97;OLD HUNGARIAN CAPITAL LETTER ELY;Lu;0;R;;;;;N;;;;10CD7;
+10C98;OLD HUNGARIAN CAPITAL LETTER EM;Lu;0;R;;;;;N;;;;10CD8;
+10C99;OLD HUNGARIAN CAPITAL LETTER EN;Lu;0;R;;;;;N;;;;10CD9;
+10C9A;OLD HUNGARIAN CAPITAL LETTER ENY;Lu;0;R;;;;;N;;;;10CDA;
+10C9B;OLD HUNGARIAN CAPITAL LETTER O;Lu;0;R;;;;;N;;;;10CDB;
+10C9C;OLD HUNGARIAN CAPITAL LETTER OO;Lu;0;R;;;;;N;;;;10CDC;
+10C9D;OLD HUNGARIAN CAPITAL LETTER NIKOLSBURG OE;Lu;0;R;;;;;N;;;;10CDD;
+10C9E;OLD HUNGARIAN CAPITAL LETTER RUDIMENTA OE;Lu;0;R;;;;;N;;;;10CDE;
+10C9F;OLD HUNGARIAN CAPITAL LETTER OEE;Lu;0;R;;;;;N;;;;10CDF;
+10CA0;OLD HUNGARIAN CAPITAL LETTER EP;Lu;0;R;;;;;N;;;;10CE0;
+10CA1;OLD HUNGARIAN CAPITAL LETTER EMP;Lu;0;R;;;;;N;;;;10CE1;
+10CA2;OLD HUNGARIAN CAPITAL LETTER ER;Lu;0;R;;;;;N;;;;10CE2;
+10CA3;OLD HUNGARIAN CAPITAL LETTER SHORT ER;Lu;0;R;;;;;N;;;;10CE3;
+10CA4;OLD HUNGARIAN CAPITAL LETTER ES;Lu;0;R;;;;;N;;;;10CE4;
+10CA5;OLD HUNGARIAN CAPITAL LETTER ESZ;Lu;0;R;;;;;N;;;;10CE5;
+10CA6;OLD HUNGARIAN CAPITAL LETTER ET;Lu;0;R;;;;;N;;;;10CE6;
+10CA7;OLD HUNGARIAN CAPITAL LETTER ENT;Lu;0;R;;;;;N;;;;10CE7;
+10CA8;OLD HUNGARIAN CAPITAL LETTER ETY;Lu;0;R;;;;;N;;;;10CE8;
+10CA9;OLD HUNGARIAN CAPITAL LETTER ECH;Lu;0;R;;;;;N;;;;10CE9;
+10CAA;OLD HUNGARIAN CAPITAL LETTER U;Lu;0;R;;;;;N;;;;10CEA;
+10CAB;OLD HUNGARIAN CAPITAL LETTER UU;Lu;0;R;;;;;N;;;;10CEB;
+10CAC;OLD HUNGARIAN CAPITAL LETTER NIKOLSBURG UE;Lu;0;R;;;;;N;;;;10CEC;
+10CAD;OLD HUNGARIAN CAPITAL LETTER RUDIMENTA UE;Lu;0;R;;;;;N;;;;10CED;
+10CAE;OLD HUNGARIAN CAPITAL LETTER EV;Lu;0;R;;;;;N;;;;10CEE;
+10CAF;OLD HUNGARIAN CAPITAL LETTER EZ;Lu;0;R;;;;;N;;;;10CEF;
+10CB0;OLD HUNGARIAN CAPITAL LETTER EZS;Lu;0;R;;;;;N;;;;10CF0;
+10CB1;OLD HUNGARIAN CAPITAL LETTER ENT-SHAPED SIGN;Lu;0;R;;;;;N;;;;10CF1;
+10CB2;OLD HUNGARIAN CAPITAL LETTER US;Lu;0;R;;;;;N;;;;10CF2;
+10CC0;OLD HUNGARIAN SMALL LETTER A;Ll;0;R;;;;;N;;;10C80;;10C80
+10CC1;OLD HUNGARIAN SMALL LETTER AA;Ll;0;R;;;;;N;;;10C81;;10C81
+10CC2;OLD HUNGARIAN SMALL LETTER EB;Ll;0;R;;;;;N;;;10C82;;10C82
+10CC3;OLD HUNGARIAN SMALL LETTER AMB;Ll;0;R;;;;;N;;;10C83;;10C83
+10CC4;OLD HUNGARIAN SMALL LETTER EC;Ll;0;R;;;;;N;;;10C84;;10C84
+10CC5;OLD HUNGARIAN SMALL LETTER ENC;Ll;0;R;;;;;N;;;10C85;;10C85
+10CC6;OLD HUNGARIAN SMALL LETTER ECS;Ll;0;R;;;;;N;;;10C86;;10C86
+10CC7;OLD HUNGARIAN SMALL LETTER ED;Ll;0;R;;;;;N;;;10C87;;10C87
+10CC8;OLD HUNGARIAN SMALL LETTER AND;Ll;0;R;;;;;N;;;10C88;;10C88
+10CC9;OLD HUNGARIAN SMALL LETTER E;Ll;0;R;;;;;N;;;10C89;;10C89
+10CCA;OLD HUNGARIAN SMALL LETTER CLOSE E;Ll;0;R;;;;;N;;;10C8A;;10C8A
+10CCB;OLD HUNGARIAN SMALL LETTER EE;Ll;0;R;;;;;N;;;10C8B;;10C8B
+10CCC;OLD HUNGARIAN SMALL LETTER EF;Ll;0;R;;;;;N;;;10C8C;;10C8C
+10CCD;OLD HUNGARIAN SMALL LETTER EG;Ll;0;R;;;;;N;;;10C8D;;10C8D
+10CCE;OLD HUNGARIAN SMALL LETTER EGY;Ll;0;R;;;;;N;;;10C8E;;10C8E
+10CCF;OLD HUNGARIAN SMALL LETTER EH;Ll;0;R;;;;;N;;;10C8F;;10C8F
+10CD0;OLD HUNGARIAN SMALL LETTER I;Ll;0;R;;;;;N;;;10C90;;10C90
+10CD1;OLD HUNGARIAN SMALL LETTER II;Ll;0;R;;;;;N;;;10C91;;10C91
+10CD2;OLD HUNGARIAN SMALL LETTER EJ;Ll;0;R;;;;;N;;;10C92;;10C92
+10CD3;OLD HUNGARIAN SMALL LETTER EK;Ll;0;R;;;;;N;;;10C93;;10C93
+10CD4;OLD HUNGARIAN SMALL LETTER AK;Ll;0;R;;;;;N;;;10C94;;10C94
+10CD5;OLD HUNGARIAN SMALL LETTER UNK;Ll;0;R;;;;;N;;;10C95;;10C95
+10CD6;OLD HUNGARIAN SMALL LETTER EL;Ll;0;R;;;;;N;;;10C96;;10C96
+10CD7;OLD HUNGARIAN SMALL LETTER ELY;Ll;0;R;;;;;N;;;10C97;;10C97
+10CD8;OLD HUNGARIAN SMALL LETTER EM;Ll;0;R;;;;;N;;;10C98;;10C98
+10CD9;OLD HUNGARIAN SMALL LETTER EN;Ll;0;R;;;;;N;;;10C99;;10C99
+10CDA;OLD HUNGARIAN SMALL LETTER ENY;Ll;0;R;;;;;N;;;10C9A;;10C9A
+10CDB;OLD HUNGARIAN SMALL LETTER O;Ll;0;R;;;;;N;;;10C9B;;10C9B
+10CDC;OLD HUNGARIAN SMALL LETTER OO;Ll;0;R;;;;;N;;;10C9C;;10C9C
+10CDD;OLD HUNGARIAN SMALL LETTER NIKOLSBURG OE;Ll;0;R;;;;;N;;;10C9D;;10C9D
+10CDE;OLD HUNGARIAN SMALL LETTER RUDIMENTA OE;Ll;0;R;;;;;N;;;10C9E;;10C9E
+10CDF;OLD HUNGARIAN SMALL LETTER OEE;Ll;0;R;;;;;N;;;10C9F;;10C9F
+10CE0;OLD HUNGARIAN SMALL LETTER EP;Ll;0;R;;;;;N;;;10CA0;;10CA0
+10CE1;OLD HUNGARIAN SMALL LETTER EMP;Ll;0;R;;;;;N;;;10CA1;;10CA1
+10CE2;OLD HUNGARIAN SMALL LETTER ER;Ll;0;R;;;;;N;;;10CA2;;10CA2
+10CE3;OLD HUNGARIAN SMALL LETTER SHORT ER;Ll;0;R;;;;;N;;;10CA3;;10CA3
+10CE4;OLD HUNGARIAN SMALL LETTER ES;Ll;0;R;;;;;N;;;10CA4;;10CA4
+10CE5;OLD HUNGARIAN SMALL LETTER ESZ;Ll;0;R;;;;;N;;;10CA5;;10CA5
+10CE6;OLD HUNGARIAN SMALL LETTER ET;Ll;0;R;;;;;N;;;10CA6;;10CA6
+10CE7;OLD HUNGARIAN SMALL LETTER ENT;Ll;0;R;;;;;N;;;10CA7;;10CA7
+10CE8;OLD HUNGARIAN SMALL LETTER ETY;Ll;0;R;;;;;N;;;10CA8;;10CA8
+10CE9;OLD HUNGARIAN SMALL LETTER ECH;Ll;0;R;;;;;N;;;10CA9;;10CA9
+10CEA;OLD HUNGARIAN SMALL LETTER U;Ll;0;R;;;;;N;;;10CAA;;10CAA
+10CEB;OLD HUNGARIAN SMALL LETTER UU;Ll;0;R;;;;;N;;;10CAB;;10CAB
+10CEC;OLD HUNGARIAN SMALL LETTER NIKOLSBURG UE;Ll;0;R;;;;;N;;;10CAC;;10CAC
+10CED;OLD HUNGARIAN SMALL LETTER RUDIMENTA UE;Ll;0;R;;;;;N;;;10CAD;;10CAD
+10CEE;OLD HUNGARIAN SMALL LETTER EV;Ll;0;R;;;;;N;;;10CAE;;10CAE
+10CEF;OLD HUNGARIAN SMALL LETTER EZ;Ll;0;R;;;;;N;;;10CAF;;10CAF
+10CF0;OLD HUNGARIAN SMALL LETTER EZS;Ll;0;R;;;;;N;;;10CB0;;10CB0
+10CF1;OLD HUNGARIAN SMALL LETTER ENT-SHAPED SIGN;Ll;0;R;;;;;N;;;10CB1;;10CB1
+10CF2;OLD HUNGARIAN SMALL LETTER US;Ll;0;R;;;;;N;;;10CB2;;10CB2
+10CFA;OLD HUNGARIAN NUMBER ONE;No;0;R;;;;1;N;;;;;
+10CFB;OLD HUNGARIAN NUMBER FIVE;No;0;R;;;;5;N;;;;;
+10CFC;OLD HUNGARIAN NUMBER TEN;No;0;R;;;;10;N;;;;;
+10CFD;OLD HUNGARIAN NUMBER FIFTY;No;0;R;;;;50;N;;;;;
+10CFE;OLD HUNGARIAN NUMBER ONE HUNDRED;No;0;R;;;;100;N;;;;;
+10CFF;OLD HUNGARIAN NUMBER ONE THOUSAND;No;0;R;;;;1000;N;;;;;
 10E60;RUMI DIGIT ONE;No;0;AN;;;1;1;N;;;;;
 10E61;RUMI DIGIT TWO;No;0;AN;;;2;2;N;;;;;
 10E62;RUMI DIGIT THREE;No;0;AN;;;3;3;N;;;;;
@@ -18764,6 +19078,10 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;;
 111C6;SHARADA DOUBLE DANDA;Po;0;L;;;;;N;;;;;
 111C7;SHARADA ABBREVIATION SIGN;Po;0;L;;;;;N;;;;;
 111C8;SHARADA SEPARATOR;Po;0;L;;;;;N;;;;;
+111C9;SHARADA SANDHI MARK;Po;0;L;;;;;N;;;;;
+111CA;SHARADA SIGN NUKTA;Mn;7;NSM;;;;;N;;;;;
+111CB;SHARADA VOWEL MODIFIER MARK;Mn;0;NSM;;;;;N;;;;;
+111CC;SHARADA EXTRA SHORT VOWEL MARK;Mn;0;NSM;;;;;N;;;;;
 111CD;SHARADA SUTRA MARK;Po;0;L;;;;;N;;;;;
 111D0;SHARADA DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;;
 111D1;SHARADA DIGIT ONE;Nd;0;L;;1;1;1;N;;;;;
@@ -18776,6 +19094,11 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;;
 111D8;SHARADA DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;;
 111D9;SHARADA DIGIT NINE;Nd;0;L;;9;9;9;N;;;;;
 111DA;SHARADA EKAM;Lo;0;L;;;;;N;;;;;
+111DB;SHARADA SIGN SIDDHAM;Po;0;L;;;;;N;;;;;
+111DC;SHARADA HEADSTROKE;Lo;0;L;;;;;N;;;;;
+111DD;SHARADA CONTINUATION SIGN;Po;0;L;;;;;N;;;;;
+111DE;SHARADA SECTION MARK-1;Po;0;L;;;;;N;;;;;
+111DF;SHARADA SECTION MARK-2;Po;0;L;;;;;N;;;;;
 111E1;SINHALA ARCHAIC DIGIT ONE;No;0;L;;;;1;N;;;;;
 111E2;SINHALA ARCHAIC DIGIT TWO;No;0;L;;;;2;N;;;;;
 111E3;SINHALA ARCHAIC DIGIT THREE;No;0;L;;;;3;N;;;;;
@@ -18857,6 +19180,44 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;;
 1123B;KHOJKI SECTION MARK;Po;0;L;;;;;N;;;;;
 1123C;KHOJKI DOUBLE SECTION MARK;Po;0;L;;;;;N;;;;;
 1123D;KHOJKI ABBREVIATION SIGN;Po;0;L;;;;;N;;;;;
+11280;MULTANI LETTER A;Lo;0;L;;;;;N;;;;;
+11281;MULTANI LETTER I;Lo;0;L;;;;;N;;;;;
+11282;MULTANI LETTER U;Lo;0;L;;;;;N;;;;;
+11283;MULTANI LETTER E;Lo;0;L;;;;;N;;;;;
+11284;MULTANI LETTER KA;Lo;0;L;;;;;N;;;;;
+11285;MULTANI LETTER KHA;Lo;0;L;;;;;N;;;;;
+11286;MULTANI LETTER GA;Lo;0;L;;;;;N;;;;;
+11288;MULTANI LETTER GHA;Lo;0;L;;;;;N;;;;;
+1128A;MULTANI LETTER CA;Lo;0;L;;;;;N;;;;;
+1128B;MULTANI LETTER CHA;Lo;0;L;;;;;N;;;;;
+1128C;MULTANI LETTER JA;Lo;0;L;;;;;N;;;;;
+1128D;MULTANI LETTER JJA;Lo;0;L;;;;;N;;;;;
+1128F;MULTANI LETTER NYA;Lo;0;L;;;;;N;;;;;
+11290;MULTANI LETTER TTA;Lo;0;L;;;;;N;;;;;
+11291;MULTANI LETTER TTHA;Lo;0;L;;;;;N;;;;;
+11292;MULTANI LETTER DDA;Lo;0;L;;;;;N;;;;;
+11293;MULTANI LETTER DDDA;Lo;0;L;;;;;N;;;;;
+11294;MULTANI LETTER DDHA;Lo;0;L;;;;;N;;;;;
+11295;MULTANI LETTER NNA;Lo;0;L;;;;;N;;;;;
+11296;MULTANI LETTER TA;Lo;0;L;;;;;N;;;;;
+11297;MULTANI LETTER THA;Lo;0;L;;;;;N;;;;;
+11298;MULTANI LETTER DA;Lo;0;L;;;;;N;;;;;
+11299;MULTANI LETTER DHA;Lo;0;L;;;;;N;;;;;
+1129A;MULTANI LETTER NA;Lo;0;L;;;;;N;;;;;
+1129B;MULTANI LETTER PA;Lo;0;L;;;;;N;;;;;
+1129C;MULTANI LETTER PHA;Lo;0;L;;;;;N;;;;;
+1129D;MULTANI LETTER BA;Lo;0;L;;;;;N;;;;;
+1129F;MULTANI LETTER BHA;Lo;0;L;;;;;N;;;;;
+112A0;MULTANI LETTER MA;Lo;0;L;;;;;N;;;;;
+112A1;MULTANI LETTER YA;Lo;0;L;;;;;N;;;;;
+112A2;MULTANI LETTER RA;Lo;0;L;;;;;N;;;;;
+112A3;MULTANI LETTER LA;Lo;0;L;;;;;N;;;;;
+112A4;MULTANI LETTER VA;Lo;0;L;;;;;N;;;;;
+112A5;MULTANI LETTER SA;Lo;0;L;;;;;N;;;;;
+112A6;MULTANI LETTER HA;Lo;0;L;;;;;N;;;;;
+112A7;MULTANI LETTER RRA;Lo;0;L;;;;;N;;;;;
+112A8;MULTANI LETTER RHA;Lo;0;L;;;;;N;;;;;
+112A9;MULTANI SECTION MARK;Po;0;L;;;;;N;;;;;
 112B0;KHUDAWADI LETTER A;Lo;0;L;;;;;N;;;;;
 112B1;KHUDAWADI LETTER AA;Lo;0;L;;;;;N;;;;;
 112B2;KHUDAWADI LETTER I;Lo;0;L;;;;;N;;;;;
@@ -18926,6 +19287,7 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;;
 112F7;KHUDAWADI DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;;
 112F8;KHUDAWADI DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;;
 112F9;KHUDAWADI DIGIT NINE;Nd;0;L;;9;9;9;N;;;;;
+11300;GRANTHA SIGN COMBINING ANUSVARA ABOVE;Mn;0;NSM;;;;;N;;;;;
 11301;GRANTHA SIGN CANDRABINDU;Mn;0;NSM;;;;;N;;;;;
 11302;GRANTHA SIGN ANUSVARA;Mc;0;L;;;;;N;;;;;
 11303;GRANTHA SIGN VISARGA;Mc;0;L;;;;;N;;;;;
@@ -18989,6 +19351,7 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;;
 1134B;GRANTHA VOWEL SIGN OO;Mc;0;L;11347 1133E;;;;N;;;;;
 1134C;GRANTHA VOWEL SIGN AU;Mc;0;L;11347 11357;;;;N;;;;;
 1134D;GRANTHA SIGN VIRAMA;Mc;9;L;;;;;N;;;;;
+11350;GRANTHA OM;Lo;0;L;;;;;N;;;;;
 11357;GRANTHA AU LENGTH MARK;Mc;0;L;;;;;N;;;;;
 1135D;GRANTHA SIGN PLUTA;Lo;0;L;;;;;N;;;;;
 1135E;GRANTHA LETTER VEDIC ANUSVARA;Lo;0;L;;;;;N;;;;;
@@ -19163,6 +19526,26 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;;
 115C7;SIDDHAM REPETITION MARK-2;Po;0;L;;;;;N;;;;;
 115C8;SIDDHAM REPETITION MARK-3;Po;0;L;;;;;N;;;;;
 115C9;SIDDHAM END OF TEXT MARK;Po;0;L;;;;;N;;;;;
+115CA;SIDDHAM SECTION MARK WITH TRIDENT AND U-SHAPED 
ORNAMENTS;Po;0;L;;;;;N;;;;;
+115CB;SIDDHAM SECTION MARK WITH TRIDENT AND DOTTED CRESCENTS;Po;0;L;;;;;N;;;;;
+115CC;SIDDHAM SECTION MARK WITH RAYS AND DOTTED CRESCENTS;Po;0;L;;;;;N;;;;;
+115CD;SIDDHAM SECTION MARK WITH RAYS AND DOTTED DOUBLE 
CRESCENTS;Po;0;L;;;;;N;;;;;
+115CE;SIDDHAM SECTION MARK WITH RAYS AND DOTTED TRIPLE 
CRESCENTS;Po;0;L;;;;;N;;;;;
+115CF;SIDDHAM SECTION MARK DOUBLE RING;Po;0;L;;;;;N;;;;;
+115D0;SIDDHAM SECTION MARK DOUBLE RING WITH RAYS;Po;0;L;;;;;N;;;;;
+115D1;SIDDHAM SECTION MARK WITH DOUBLE CRESCENTS;Po;0;L;;;;;N;;;;;
+115D2;SIDDHAM SECTION MARK WITH TRIPLE CRESCENTS;Po;0;L;;;;;N;;;;;
+115D3;SIDDHAM SECTION MARK WITH QUADRUPLE CRESCENTS;Po;0;L;;;;;N;;;;;
+115D4;SIDDHAM SECTION MARK WITH SEPTUPLE CRESCENTS;Po;0;L;;;;;N;;;;;
+115D5;SIDDHAM SECTION MARK WITH CIRCLES AND RAYS;Po;0;L;;;;;N;;;;;
+115D6;SIDDHAM SECTION MARK WITH CIRCLES AND TWO ENCLOSURES;Po;0;L;;;;;N;;;;;
+115D7;SIDDHAM SECTION MARK WITH CIRCLES AND FOUR ENCLOSURES;Po;0;L;;;;;N;;;;;
+115D8;SIDDHAM LETTER THREE-CIRCLE ALTERNATE I;Lo;0;L;;;;;N;;;;;
+115D9;SIDDHAM LETTER TWO-CIRCLE ALTERNATE I;Lo;0;L;;;;;N;;;;;
+115DA;SIDDHAM LETTER TWO-CIRCLE ALTERNATE II;Lo;0;L;;;;;N;;;;;
+115DB;SIDDHAM LETTER ALTERNATE U;Lo;0;L;;;;;N;;;;;
+115DC;SIDDHAM VOWEL SIGN ALTERNATE U;Mn;0;NSM;;;;;N;;;;;
+115DD;SIDDHAM VOWEL SIGN ALTERNATE UU;Mn;0;NSM;;;;;N;;;;;
 11600;MODI LETTER A;Lo;0;L;;;;;N;;;;;
 11601;MODI LETTER AA;Lo;0;L;;;;;N;;;;;
 11602;MODI LETTER I;Lo;0;L;;;;;N;;;;;
@@ -19308,6 +19691,63 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;;
 116C7;TAKRI DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;;
 116C8;TAKRI DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;;
 116C9;TAKRI DIGIT NINE;Nd;0;L;;9;9;9;N;;;;;
+11700;AHOM LETTER KA;Lo;0;L;;;;;N;;;;;
+11701;AHOM LETTER KHA;Lo;0;L;;;;;N;;;;;
+11702;AHOM LETTER NGA;Lo;0;L;;;;;N;;;;;
+11703;AHOM LETTER NA;Lo;0;L;;;;;N;;;;;
+11704;AHOM LETTER TA;Lo;0;L;;;;;N;;;;;
+11705;AHOM LETTER ALTERNATE TA;Lo;0;L;;;;;N;;;;;
+11706;AHOM LETTER PA;Lo;0;L;;;;;N;;;;;
+11707;AHOM LETTER PHA;Lo;0;L;;;;;N;;;;;
+11708;AHOM LETTER BA;Lo;0;L;;;;;N;;;;;
+11709;AHOM LETTER MA;Lo;0;L;;;;;N;;;;;
+1170A;AHOM LETTER JA;Lo;0;L;;;;;N;;;;;
+1170B;AHOM LETTER CHA;Lo;0;L;;;;;N;;;;;
+1170C;AHOM LETTER THA;Lo;0;L;;;;;N;;;;;
+1170D;AHOM LETTER RA;Lo;0;L;;;;;N;;;;;
+1170E;AHOM LETTER LA;Lo;0;L;;;;;N;;;;;
+1170F;AHOM LETTER SA;Lo;0;L;;;;;N;;;;;
+11710;AHOM LETTER NYA;Lo;0;L;;;;;N;;;;;
+11711;AHOM LETTER HA;Lo;0;L;;;;;N;;;;;
+11712;AHOM LETTER A;Lo;0;L;;;;;N;;;;;
+11713;AHOM LETTER DA;Lo;0;L;;;;;N;;;;;
+11714;AHOM LETTER DHA;Lo;0;L;;;;;N;;;;;
+11715;AHOM LETTER GA;Lo;0;L;;;;;N;;;;;
+11716;AHOM LETTER ALTERNATE GA;Lo;0;L;;;;;N;;;;;
+11717;AHOM LETTER GHA;Lo;0;L;;;;;N;;;;;
+11718;AHOM LETTER BHA;Lo;0;L;;;;;N;;;;;
+11719;AHOM LETTER JHA;Lo;0;L;;;;;N;;;;;
+1171D;AHOM CONSONANT SIGN MEDIAL LA;Mn;0;NSM;;;;;N;;;;;
+1171E;AHOM CONSONANT SIGN MEDIAL RA;Mn;0;NSM;;;;;N;;;;;
+1171F;AHOM CONSONANT SIGN MEDIAL LIGATING RA;Mn;0;NSM;;;;;N;;;;;
+11720;AHOM VOWEL SIGN A;Mc;0;L;;;;;N;;;;;
+11721;AHOM VOWEL SIGN AA;Mc;0;L;;;;;N;;;;;
+11722;AHOM VOWEL SIGN I;Mn;0;NSM;;;;;N;;;;;
+11723;AHOM VOWEL SIGN II;Mn;0;NSM;;;;;N;;;;;
+11724;AHOM VOWEL SIGN U;Mn;0;NSM;;;;;N;;;;;
+11725;AHOM VOWEL SIGN UU;Mn;0;NSM;;;;;N;;;;;
+11726;AHOM VOWEL SIGN E;Mc;0;L;;;;;N;;;;;
+11727;AHOM VOWEL SIGN AW;Mn;0;NSM;;;;;N;;;;;
+11728;AHOM VOWEL SIGN O;Mn;0;NSM;;;;;N;;;;;
+11729;AHOM VOWEL SIGN AI;Mn;0;NSM;;;;;N;;;;;
+1172A;AHOM VOWEL SIGN AM;Mn;0;NSM;;;;;N;;;;;
+1172B;AHOM SIGN KILLER;Mn;9;NSM;;;;;N;;;;;
+11730;AHOM DIGIT ZERO;Nd;0;L;;0;0;0;N;;;;;
+11731;AHOM DIGIT ONE;Nd;0;L;;1;1;1;N;;;;;
+11732;AHOM DIGIT TWO;Nd;0;L;;2;2;2;N;;;;;
+11733;AHOM DIGIT THREE;Nd;0;L;;3;3;3;N;;;;;
+11734;AHOM DIGIT FOUR;Nd;0;L;;4;4;4;N;;;;;
+11735;AHOM DIGIT FIVE;Nd;0;L;;5;5;5;N;;;;;
+11736;AHOM DIGIT SIX;Nd;0;L;;6;6;6;N;;;;;
+11737;AHOM DIGIT SEVEN;Nd;0;L;;7;7;7;N;;;;;
+11738;AHOM DIGIT EIGHT;Nd;0;L;;8;8;8;N;;;;;
+11739;AHOM DIGIT NINE;Nd;0;L;;9;9;9;N;;;;;
+1173A;AHOM NUMBER TEN;No;0;L;;;;10;N;;;;;
+1173B;AHOM NUMBER TWENTY;No;0;L;;;;20;N;;;;;
+1173C;AHOM SIGN SMALL SECTION;Po;0;L;;;;;N;;;;;
+1173D;AHOM SIGN SECTION;Po;0;L;;;;;N;;;;;
+1173E;AHOM SIGN RULAI;Po;0;L;;;;;N;;;;;
+1173F;AHOM SYMBOL VI;So;0;L;;;;;N;;;;;
 118A0;WARANG CITI CAPITAL LETTER NGAA;Lu;0;L;;;;;N;;;;118C0;
 118A1;WARANG CITI CAPITAL LETTER A;Lu;0;L;;;;;N;;;;118C1;
 118A2;WARANG CITI CAPITAL LETTER WI;Lu;0;L;;;;;N;;;;118C2;
@@ -20370,6 +20810,7 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;;
 12396;CUNEIFORM SIGN SAG TIMES IGI GUNU;Lo;0;L;;;;;N;;;;;
 12397;CUNEIFORM SIGN TI2;Lo;0;L;;;;;N;;;;;
 12398;CUNEIFORM SIGN UM TIMES ME;Lo;0;L;;;;;N;;;;;
+12399;CUNEIFORM SIGN U U;Lo;0;L;;;;;N;;;;;
 12400;CUNEIFORM NUMERIC SIGN TWO ASH;Nl;0;L;;;;2;N;;;;;
 12401;CUNEIFORM NUMERIC SIGN THREE ASH;Nl;0;L;;;;3;N;;;;;
 12402;CUNEIFORM NUMERIC SIGN FOUR ASH;Nl;0;L;;;;4;N;;;;;
@@ -20486,6 +20927,202 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;;
 12472;CUNEIFORM PUNCTUATION SIGN DIAGONAL COLON;Po;0;L;;;;;N;;;;;
 12473;CUNEIFORM PUNCTUATION SIGN DIAGONAL TRICOLON;Po;0;L;;;;;N;;;;;
 12474;CUNEIFORM PUNCTUATION SIGN DIAGONAL QUADCOLON;Po;0;L;;;;;N;;;;;
+12480;CUNEIFORM SIGN AB TIMES NUN TENU;Lo;0;L;;;;;N;;;;;
+12481;CUNEIFORM SIGN AB TIMES SHU2;Lo;0;L;;;;;N;;;;;
+12482;CUNEIFORM SIGN AD TIMES ESH2;Lo;0;L;;;;;N;;;;;
+12483;CUNEIFORM SIGN BAD TIMES DISH TENU;Lo;0;L;;;;;N;;;;;
+12484;CUNEIFORM SIGN BAHAR2 TIMES AB2;Lo;0;L;;;;;N;;;;;
+12485;CUNEIFORM SIGN BAHAR2 TIMES NI;Lo;0;L;;;;;N;;;;;
+12486;CUNEIFORM SIGN BAHAR2 TIMES ZA;Lo;0;L;;;;;N;;;;;
+12487;CUNEIFORM SIGN BU OVER BU TIMES NA2;Lo;0;L;;;;;N;;;;;
+12488;CUNEIFORM SIGN DA TIMES TAK4;Lo;0;L;;;;;N;;;;;
+12489;CUNEIFORM SIGN DAG TIMES KUR;Lo;0;L;;;;;N;;;;;
+1248A;CUNEIFORM SIGN DIM TIMES IGI;Lo;0;L;;;;;N;;;;;
+1248B;CUNEIFORM SIGN DIM TIMES U U U;Lo;0;L;;;;;N;;;;;
+1248C;CUNEIFORM SIGN DIM2 TIMES UD;Lo;0;L;;;;;N;;;;;
+1248D;CUNEIFORM SIGN DUG TIMES ANSHE;Lo;0;L;;;;;N;;;;;
+1248E;CUNEIFORM SIGN DUG TIMES ASH;Lo;0;L;;;;;N;;;;;
+1248F;CUNEIFORM SIGN DUG TIMES ASH AT LEFT;Lo;0;L;;;;;N;;;;;
+12490;CUNEIFORM SIGN DUG TIMES DIN;Lo;0;L;;;;;N;;;;;
+12491;CUNEIFORM SIGN DUG TIMES DUN;Lo;0;L;;;;;N;;;;;
+12492;CUNEIFORM SIGN DUG TIMES ERIN2;Lo;0;L;;;;;N;;;;;
+12493;CUNEIFORM SIGN DUG TIMES GA;Lo;0;L;;;;;N;;;;;
+12494;CUNEIFORM SIGN DUG TIMES GI;Lo;0;L;;;;;N;;;;;
+12495;CUNEIFORM SIGN DUG TIMES GIR2 GUNU;Lo;0;L;;;;;N;;;;;
+12496;CUNEIFORM SIGN DUG TIMES GISH;Lo;0;L;;;;;N;;;;;
+12497;CUNEIFORM SIGN DUG TIMES HA;Lo;0;L;;;;;N;;;;;
+12498;CUNEIFORM SIGN DUG TIMES HI;Lo;0;L;;;;;N;;;;;
+12499;CUNEIFORM SIGN DUG TIMES IGI GUNU;Lo;0;L;;;;;N;;;;;
+1249A;CUNEIFORM SIGN DUG TIMES KASKAL;Lo;0;L;;;;;N;;;;;
+1249B;CUNEIFORM SIGN DUG TIMES KUR;Lo;0;L;;;;;N;;;;;
+1249C;CUNEIFORM SIGN DUG TIMES KUSHU2;Lo;0;L;;;;;N;;;;;
+1249D;CUNEIFORM SIGN DUG TIMES KUSHU2 PLUS KASKAL;Lo;0;L;;;;;N;;;;;
+1249E;CUNEIFORM SIGN DUG TIMES LAK-020;Lo;0;L;;;;;N;;;;;
+1249F;CUNEIFORM SIGN DUG TIMES LAM;Lo;0;L;;;;;N;;;;;
+124A0;CUNEIFORM SIGN DUG TIMES LAM TIMES KUR;Lo;0;L;;;;;N;;;;;
+124A1;CUNEIFORM SIGN DUG TIMES LUH PLUS GISH;Lo;0;L;;;;;N;;;;;
+124A2;CUNEIFORM SIGN DUG TIMES MASH;Lo;0;L;;;;;N;;;;;
+124A3;CUNEIFORM SIGN DUG TIMES MES;Lo;0;L;;;;;N;;;;;
+124A4;CUNEIFORM SIGN DUG TIMES MI;Lo;0;L;;;;;N;;;;;
+124A5;CUNEIFORM SIGN DUG TIMES NI;Lo;0;L;;;;;N;;;;;
+124A6;CUNEIFORM SIGN DUG TIMES PI;Lo;0;L;;;;;N;;;;;
+124A7;CUNEIFORM SIGN DUG TIMES SHE;Lo;0;L;;;;;N;;;;;
+124A8;CUNEIFORM SIGN DUG TIMES SI GUNU;Lo;0;L;;;;;N;;;;;
+124A9;CUNEIFORM SIGN E2 TIMES KUR;Lo;0;L;;;;;N;;;;;
+124AA;CUNEIFORM SIGN E2 TIMES PAP;Lo;0;L;;;;;N;;;;;
+124AB;CUNEIFORM SIGN ERIN2 X;Lo;0;L;;;;;N;;;;;
+124AC;CUNEIFORM SIGN ESH2 CROSSING ESH2;Lo;0;L;;;;;N;;;;;
+124AD;CUNEIFORM SIGN EZEN SHESHIG TIMES ASH;Lo;0;L;;;;;N;;;;;
+124AE;CUNEIFORM SIGN EZEN SHESHIG TIMES HI;Lo;0;L;;;;;N;;;;;
+124AF;CUNEIFORM SIGN EZEN SHESHIG TIMES IGI GUNU;Lo;0;L;;;;;N;;;;;
+124B0;CUNEIFORM SIGN EZEN SHESHIG TIMES LA;Lo;0;L;;;;;N;;;;;
+124B1;CUNEIFORM SIGN EZEN SHESHIG TIMES LAL;Lo;0;L;;;;;N;;;;;
+124B2;CUNEIFORM SIGN EZEN SHESHIG TIMES ME;Lo;0;L;;;;;N;;;;;
+124B3;CUNEIFORM SIGN EZEN SHESHIG TIMES MES;Lo;0;L;;;;;N;;;;;
+124B4;CUNEIFORM SIGN EZEN SHESHIG TIMES SU;Lo;0;L;;;;;N;;;;;
+124B5;CUNEIFORM SIGN EZEN TIMES SU;Lo;0;L;;;;;N;;;;;
+124B6;CUNEIFORM SIGN GA2 TIMES BAHAR2;Lo;0;L;;;;;N;;;;;
+124B7;CUNEIFORM SIGN GA2 TIMES DIM GUNU;Lo;0;L;;;;;N;;;;;
+124B8;CUNEIFORM SIGN GA2 TIMES DUG TIMES IGI GUNU;Lo;0;L;;;;;N;;;;;
+124B9;CUNEIFORM SIGN GA2 TIMES DUG TIMES KASKAL;Lo;0;L;;;;;N;;;;;
+124BA;CUNEIFORM SIGN GA2 TIMES EREN;Lo;0;L;;;;;N;;;;;
+124BB;CUNEIFORM SIGN GA2 TIMES GA;Lo;0;L;;;;;N;;;;;
+124BC;CUNEIFORM SIGN GA2 TIMES GAR PLUS DI;Lo;0;L;;;;;N;;;;;
+124BD;CUNEIFORM SIGN GA2 TIMES GAR PLUS NE;Lo;0;L;;;;;N;;;;;
+124BE;CUNEIFORM SIGN GA2 TIMES HA PLUS A;Lo;0;L;;;;;N;;;;;
+124BF;CUNEIFORM SIGN GA2 TIMES KUSHU2 PLUS KASKAL;Lo;0;L;;;;;N;;;;;
+124C0;CUNEIFORM SIGN GA2 TIMES LAM;Lo;0;L;;;;;N;;;;;
+124C1;CUNEIFORM SIGN GA2 TIMES LAM TIMES KUR;Lo;0;L;;;;;N;;;;;
+124C2;CUNEIFORM SIGN GA2 TIMES LUH;Lo;0;L;;;;;N;;;;;
+124C3;CUNEIFORM SIGN GA2 TIMES MUSH;Lo;0;L;;;;;N;;;;;
+124C4;CUNEIFORM SIGN GA2 TIMES NE;Lo;0;L;;;;;N;;;;;
+124C5;CUNEIFORM SIGN GA2 TIMES NE PLUS E2;Lo;0;L;;;;;N;;;;;
+124C6;CUNEIFORM SIGN GA2 TIMES NE PLUS GI;Lo;0;L;;;;;N;;;;;
+124C7;CUNEIFORM SIGN GA2 TIMES SHIM;Lo;0;L;;;;;N;;;;;
+124C8;CUNEIFORM SIGN GA2 TIMES ZIZ2;Lo;0;L;;;;;N;;;;;
+124C9;CUNEIFORM SIGN GABA ROTATED NINETY DEGREES;Lo;0;L;;;;;N;;;;;
+124CA;CUNEIFORM SIGN GESHTIN TIMES U;Lo;0;L;;;;;N;;;;;
+124CB;CUNEIFORM SIGN GISH TIMES GISH CROSSING GISH;Lo;0;L;;;;;N;;;;;
+124CC;CUNEIFORM SIGN GU2 TIMES IGI GUNU;Lo;0;L;;;;;N;;;;;
+124CD;CUNEIFORM SIGN GUD PLUS GISH TIMES TAK4;Lo;0;L;;;;;N;;;;;
+124CE;CUNEIFORM SIGN HA TENU GUNU;Lo;0;L;;;;;N;;;;;
+124CF;CUNEIFORM SIGN HI TIMES ASH OVER HI TIMES ASH;Lo;0;L;;;;;N;;;;;
+124D0;CUNEIFORM SIGN KA TIMES BU;Lo;0;L;;;;;N;;;;;
+124D1;CUNEIFORM SIGN KA TIMES KA;Lo;0;L;;;;;N;;;;;
+124D2;CUNEIFORM SIGN KA TIMES U U U;Lo;0;L;;;;;N;;;;;
+124D3;CUNEIFORM SIGN KA TIMES UR;Lo;0;L;;;;;N;;;;;
+124D4;CUNEIFORM SIGN LAGAB TIMES ZU OVER ZU;Lo;0;L;;;;;N;;;;;
+124D5;CUNEIFORM SIGN LAK-003;Lo;0;L;;;;;N;;;;;
+124D6;CUNEIFORM SIGN LAK-021;Lo;0;L;;;;;N;;;;;
+124D7;CUNEIFORM SIGN LAK-025;Lo;0;L;;;;;N;;;;;
+124D8;CUNEIFORM SIGN LAK-030;Lo;0;L;;;;;N;;;;;
+124D9;CUNEIFORM SIGN LAK-050;Lo;0;L;;;;;N;;;;;
+124DA;CUNEIFORM SIGN LAK-051;Lo;0;L;;;;;N;;;;;
+124DB;CUNEIFORM SIGN LAK-062;Lo;0;L;;;;;N;;;;;
+124DC;CUNEIFORM SIGN LAK-079 OVER LAK-079 GUNU;Lo;0;L;;;;;N;;;;;
+124DD;CUNEIFORM SIGN LAK-080;Lo;0;L;;;;;N;;;;;
+124DE;CUNEIFORM SIGN LAK-081 OVER LAK-081;Lo;0;L;;;;;N;;;;;
+124DF;CUNEIFORM SIGN LAK-092;Lo;0;L;;;;;N;;;;;
+124E0;CUNEIFORM SIGN LAK-130;Lo;0;L;;;;;N;;;;;
+124E1;CUNEIFORM SIGN LAK-142;Lo;0;L;;;;;N;;;;;
+124E2;CUNEIFORM SIGN LAK-210;Lo;0;L;;;;;N;;;;;
+124E3;CUNEIFORM SIGN LAK-219;Lo;0;L;;;;;N;;;;;
+124E4;CUNEIFORM SIGN LAK-220;Lo;0;L;;;;;N;;;;;
+124E5;CUNEIFORM SIGN LAK-225;Lo;0;L;;;;;N;;;;;
+124E6;CUNEIFORM SIGN LAK-228;Lo;0;L;;;;;N;;;;;
+124E7;CUNEIFORM SIGN LAK-238;Lo;0;L;;;;;N;;;;;
+124E8;CUNEIFORM SIGN LAK-265;Lo;0;L;;;;;N;;;;;
+124E9;CUNEIFORM SIGN LAK-266;Lo;0;L;;;;;N;;;;;
+124EA;CUNEIFORM SIGN LAK-343;Lo;0;L;;;;;N;;;;;
+124EB;CUNEIFORM SIGN LAK-347;Lo;0;L;;;;;N;;;;;
+124EC;CUNEIFORM SIGN LAK-348;Lo;0;L;;;;;N;;;;;
+124ED;CUNEIFORM SIGN LAK-383;Lo;0;L;;;;;N;;;;;
+124EE;CUNEIFORM SIGN LAK-384;Lo;0;L;;;;;N;;;;;
+124EF;CUNEIFORM SIGN LAK-390;Lo;0;L;;;;;N;;;;;
+124F0;CUNEIFORM SIGN LAK-441;Lo;0;L;;;;;N;;;;;
+124F1;CUNEIFORM SIGN LAK-449;Lo;0;L;;;;;N;;;;;
+124F2;CUNEIFORM SIGN LAK-449 TIMES GU;Lo;0;L;;;;;N;;;;;
+124F3;CUNEIFORM SIGN LAK-449 TIMES IGI;Lo;0;L;;;;;N;;;;;
+124F4;CUNEIFORM SIGN LAK-449 TIMES PAP PLUS LU3;Lo;0;L;;;;;N;;;;;
+124F5;CUNEIFORM SIGN LAK-449 TIMES PAP PLUS PAP PLUS LU3;Lo;0;L;;;;;N;;;;;
+124F6;CUNEIFORM SIGN LAK-449 TIMES U2 PLUS BA;Lo;0;L;;;;;N;;;;;
+124F7;CUNEIFORM SIGN LAK-450;Lo;0;L;;;;;N;;;;;
+124F8;CUNEIFORM SIGN LAK-457;Lo;0;L;;;;;N;;;;;
+124F9;CUNEIFORM SIGN LAK-470;Lo;0;L;;;;;N;;;;;
+124FA;CUNEIFORM SIGN LAK-483;Lo;0;L;;;;;N;;;;;
+124FB;CUNEIFORM SIGN LAK-490;Lo;0;L;;;;;N;;;;;
+124FC;CUNEIFORM SIGN LAK-492;Lo;0;L;;;;;N;;;;;
+124FD;CUNEIFORM SIGN LAK-493;Lo;0;L;;;;;N;;;;;
+124FE;CUNEIFORM SIGN LAK-495;Lo;0;L;;;;;N;;;;;
+124FF;CUNEIFORM SIGN LAK-550;Lo;0;L;;;;;N;;;;;
+12500;CUNEIFORM SIGN LAK-608;Lo;0;L;;;;;N;;;;;
+12501;CUNEIFORM SIGN LAK-617;Lo;0;L;;;;;N;;;;;
+12502;CUNEIFORM SIGN LAK-617 TIMES ASH;Lo;0;L;;;;;N;;;;;
+12503;CUNEIFORM SIGN LAK-617 TIMES BAD;Lo;0;L;;;;;N;;;;;
+12504;CUNEIFORM SIGN LAK-617 TIMES DUN3 GUNU GUNU;Lo;0;L;;;;;N;;;;;
+12505;CUNEIFORM SIGN LAK-617 TIMES KU3;Lo;0;L;;;;;N;;;;;
+12506;CUNEIFORM SIGN LAK-617 TIMES LA;Lo;0;L;;;;;N;;;;;
+12507;CUNEIFORM SIGN LAK-617 TIMES TAR;Lo;0;L;;;;;N;;;;;
+12508;CUNEIFORM SIGN LAK-617 TIMES TE;Lo;0;L;;;;;N;;;;;
+12509;CUNEIFORM SIGN LAK-617 TIMES U2;Lo;0;L;;;;;N;;;;;
+1250A;CUNEIFORM SIGN LAK-617 TIMES UD;Lo;0;L;;;;;N;;;;;
+1250B;CUNEIFORM SIGN LAK-617 TIMES URUDA;Lo;0;L;;;;;N;;;;;
+1250C;CUNEIFORM SIGN LAK-636;Lo;0;L;;;;;N;;;;;
+1250D;CUNEIFORM SIGN LAK-648;Lo;0;L;;;;;N;;;;;
+1250E;CUNEIFORM SIGN LAK-648 TIMES DUB;Lo;0;L;;;;;N;;;;;
+1250F;CUNEIFORM SIGN LAK-648 TIMES GA;Lo;0;L;;;;;N;;;;;
+12510;CUNEIFORM SIGN LAK-648 TIMES IGI;Lo;0;L;;;;;N;;;;;
+12511;CUNEIFORM SIGN LAK-648 TIMES IGI GUNU;Lo;0;L;;;;;N;;;;;
+12512;CUNEIFORM SIGN LAK-648 TIMES NI;Lo;0;L;;;;;N;;;;;
+12513;CUNEIFORM SIGN LAK-648 TIMES PAP PLUS PAP PLUS LU3;Lo;0;L;;;;;N;;;;;
+12514;CUNEIFORM SIGN LAK-648 TIMES SHESH PLUS KI;Lo;0;L;;;;;N;;;;;
+12515;CUNEIFORM SIGN LAK-648 TIMES UD;Lo;0;L;;;;;N;;;;;
+12516;CUNEIFORM SIGN LAK-648 TIMES URUDA;Lo;0;L;;;;;N;;;;;
+12517;CUNEIFORM SIGN LAK-724;Lo;0;L;;;;;N;;;;;
+12518;CUNEIFORM SIGN LAK-749;Lo;0;L;;;;;N;;;;;
+12519;CUNEIFORM SIGN LU2 GUNU TIMES ASH;Lo;0;L;;;;;N;;;;;
+1251A;CUNEIFORM SIGN LU2 TIMES DISH;Lo;0;L;;;;;N;;;;;
+1251B;CUNEIFORM SIGN LU2 TIMES HAL;Lo;0;L;;;;;N;;;;;
+1251C;CUNEIFORM SIGN LU2 TIMES PAP;Lo;0;L;;;;;N;;;;;
+1251D;CUNEIFORM SIGN LU2 TIMES PAP PLUS PAP PLUS LU3;Lo;0;L;;;;;N;;;;;
+1251E;CUNEIFORM SIGN LU2 TIMES TAK4;Lo;0;L;;;;;N;;;;;
+1251F;CUNEIFORM SIGN MI PLUS ZA7;Lo;0;L;;;;;N;;;;;
+12520;CUNEIFORM SIGN MUSH OVER MUSH TIMES GA;Lo;0;L;;;;;N;;;;;
+12521;CUNEIFORM SIGN MUSH OVER MUSH TIMES KAK;Lo;0;L;;;;;N;;;;;
+12522;CUNEIFORM SIGN NINDA2 TIMES DIM GUNU;Lo;0;L;;;;;N;;;;;
+12523;CUNEIFORM SIGN NINDA2 TIMES GISH;Lo;0;L;;;;;N;;;;;
+12524;CUNEIFORM SIGN NINDA2 TIMES GUL;Lo;0;L;;;;;N;;;;;
+12525;CUNEIFORM SIGN NINDA2 TIMES HI;Lo;0;L;;;;;N;;;;;
+12526;CUNEIFORM SIGN NINDA2 TIMES KESH2;Lo;0;L;;;;;N;;;;;
+12527;CUNEIFORM SIGN NINDA2 TIMES LAK-050;Lo;0;L;;;;;N;;;;;
+12528;CUNEIFORM SIGN NINDA2 TIMES MASH;Lo;0;L;;;;;N;;;;;
+12529;CUNEIFORM SIGN NINDA2 TIMES PAP PLUS PAP;Lo;0;L;;;;;N;;;;;
+1252A;CUNEIFORM SIGN NINDA2 TIMES U;Lo;0;L;;;;;N;;;;;
+1252B;CUNEIFORM SIGN NINDA2 TIMES U PLUS U;Lo;0;L;;;;;N;;;;;
+1252C;CUNEIFORM SIGN NINDA2 TIMES URUDA;Lo;0;L;;;;;N;;;;;
+1252D;CUNEIFORM SIGN SAG GUNU TIMES HA;Lo;0;L;;;;;N;;;;;
+1252E;CUNEIFORM SIGN SAG TIMES EN;Lo;0;L;;;;;N;;;;;
+1252F;CUNEIFORM SIGN SAG TIMES SHE AT LEFT;Lo;0;L;;;;;N;;;;;
+12530;CUNEIFORM SIGN SAG TIMES TAK4;Lo;0;L;;;;;N;;;;;
+12531;CUNEIFORM SIGN SHA6 TENU;Lo;0;L;;;;;N;;;;;
+12532;CUNEIFORM SIGN SHE OVER SHE;Lo;0;L;;;;;N;;;;;
+12533;CUNEIFORM SIGN SHE PLUS HUB2;Lo;0;L;;;;;N;;;;;
+12534;CUNEIFORM SIGN SHE PLUS NAM2;Lo;0;L;;;;;N;;;;;
+12535;CUNEIFORM SIGN SHE PLUS SAR;Lo;0;L;;;;;N;;;;;
+12536;CUNEIFORM SIGN SHU2 PLUS DUG TIMES NI;Lo;0;L;;;;;N;;;;;
+12537;CUNEIFORM SIGN SHU2 PLUS E2 TIMES AN;Lo;0;L;;;;;N;;;;;
+12538;CUNEIFORM SIGN SI TIMES TAK4;Lo;0;L;;;;;N;;;;;
+12539;CUNEIFORM SIGN TAK4 PLUS SAG;Lo;0;L;;;;;N;;;;;
+1253A;CUNEIFORM SIGN TUM TIMES GAN2 TENU;Lo;0;L;;;;;N;;;;;
+1253B;CUNEIFORM SIGN TUM TIMES THREE DISH;Lo;0;L;;;;;N;;;;;
+1253C;CUNEIFORM SIGN UR2 INVERTED;Lo;0;L;;;;;N;;;;;
+1253D;CUNEIFORM SIGN UR2 TIMES UD;Lo;0;L;;;;;N;;;;;
+1253E;CUNEIFORM SIGN URU TIMES DARA3;Lo;0;L;;;;;N;;;;;
+1253F;CUNEIFORM SIGN URU TIMES LAK-668;Lo;0;L;;;;;N;;;;;
+12540;CUNEIFORM SIGN URU TIMES LU3;Lo;0;L;;;;;N;;;;;
+12541;CUNEIFORM SIGN ZA7;Lo;0;L;;;;;N;;;;;
+12542;CUNEIFORM SIGN ZU OVER ZU PLUS SAR;Lo;0;L;;;;;N;;;;;
+12543;CUNEIFORM SIGN ZU5 TIMES THREE DISH TENU;Lo;0;L;;;;;N;;;;;
 13000;EGYPTIAN HIEROGLYPH A001;Lo;0;L;;;;;N;;;;;
 13001;EGYPTIAN HIEROGLYPH A002;Lo;0;L;;;;;N;;;;;
 13002;EGYPTIAN HIEROGLYPH A003;Lo;0;L;;;;;N;;;;;
@@ -21557,6 +22194,589 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;;
 1342C;EGYPTIAN HIEROGLYPH AA030;Lo;0;L;;;;;N;;;;;
 1342D;EGYPTIAN HIEROGLYPH AA031;Lo;0;L;;;;;N;;;;;
 1342E;EGYPTIAN HIEROGLYPH AA032;Lo;0;L;;;;;N;;;;;
+14400;ANATOLIAN HIEROGLYPH A001;Lo;0;L;;;;;N;;;;;
+14401;ANATOLIAN HIEROGLYPH A002;Lo;0;L;;;;;N;;;;;
+14402;ANATOLIAN HIEROGLYPH A003;Lo;0;L;;;;;N;;;;;
+14403;ANATOLIAN HIEROGLYPH A004;Lo;0;L;;;;;N;;;;;
+14404;ANATOLIAN HIEROGLYPH A005;Lo;0;L;;;;;N;;;;;
+14405;ANATOLIAN HIEROGLYPH A006;Lo;0;L;;;;;N;;;;;
+14406;ANATOLIAN HIEROGLYPH A007;Lo;0;L;;;;;N;;;;;
+14407;ANATOLIAN HIEROGLYPH A008;Lo;0;L;;;;;N;;;;;
+14408;ANATOLIAN HIEROGLYPH A009;Lo;0;L;;;;;N;;;;;
+14409;ANATOLIAN HIEROGLYPH A010;Lo;0;L;;;;;N;;;;;
+1440A;ANATOLIAN HIEROGLYPH A010A;Lo;0;L;;;;;N;;;;;
+1440B;ANATOLIAN HIEROGLYPH A011;Lo;0;L;;;;;N;;;;;
+1440C;ANATOLIAN HIEROGLYPH A012;Lo;0;L;;;;;N;;;;;
+1440D;ANATOLIAN HIEROGLYPH A013;Lo;0;L;;;;;N;;;;;
+1440E;ANATOLIAN HIEROGLYPH A014;Lo;0;L;;;;;N;;;;;
+1440F;ANATOLIAN HIEROGLYPH A015;Lo;0;L;;;;;N;;;;;
+14410;ANATOLIAN HIEROGLYPH A016;Lo;0;L;;;;;N;;;;;
+14411;ANATOLIAN HIEROGLYPH A017;Lo;0;L;;;;;N;;;;;
+14412;ANATOLIAN HIEROGLYPH A018;Lo;0;L;;;;;N;;;;;
+14413;ANATOLIAN HIEROGLYPH A019;Lo;0;L;;;;;N;;;;;
+14414;ANATOLIAN HIEROGLYPH A020;Lo;0;L;;;;;N;;;;;
+14415;ANATOLIAN HIEROGLYPH A021;Lo;0;L;;;;;N;;;;;
+14416;ANATOLIAN HIEROGLYPH A022;Lo;0;L;;;;;N;;;;;
+14417;ANATOLIAN HIEROGLYPH A023;Lo;0;L;;;;;N;;;;;
+14418;ANATOLIAN HIEROGLYPH A024;Lo;0;L;;;;;N;;;;;
+14419;ANATOLIAN HIEROGLYPH A025;Lo;0;L;;;;;N;;;;;
+1441A;ANATOLIAN HIEROGLYPH A026;Lo;0;L;;;;;N;;;;;
+1441B;ANATOLIAN HIEROGLYPH A026A;Lo;0;L;;;;;N;;;;;
+1441C;ANATOLIAN HIEROGLYPH A027;Lo;0;L;;;;;N;;;;;
+1441D;ANATOLIAN HIEROGLYPH A028;Lo;0;L;;;;;N;;;;;
+1441E;ANATOLIAN HIEROGLYPH A029;Lo;0;L;;;;;N;;;;;
+1441F;ANATOLIAN HIEROGLYPH A030;Lo;0;L;;;;;N;;;;;
+14420;ANATOLIAN HIEROGLYPH A031;Lo;0;L;;;;;N;;;;;
+14421;ANATOLIAN HIEROGLYPH A032;Lo;0;L;;;;;N;;;;;
+14422;ANATOLIAN HIEROGLYPH A033;Lo;0;L;;;;;N;;;;;
+14423;ANATOLIAN HIEROGLYPH A034;Lo;0;L;;;;;N;;;;;
+14424;ANATOLIAN HIEROGLYPH A035;Lo;0;L;;;;;N;;;;;
+14425;ANATOLIAN HIEROGLYPH A036;Lo;0;L;;;;;N;;;;;
+14426;ANATOLIAN HIEROGLYPH A037;Lo;0;L;;;;;N;;;;;
+14427;ANATOLIAN HIEROGLYPH A038;Lo;0;L;;;;;N;;;;;
+14428;ANATOLIAN HIEROGLYPH A039;Lo;0;L;;;;;N;;;;;
+14429;ANATOLIAN HIEROGLYPH A039A;Lo;0;L;;;;;N;;;;;
+1442A;ANATOLIAN HIEROGLYPH A040;Lo;0;L;;;;;N;;;;;
+1442B;ANATOLIAN HIEROGLYPH A041;Lo;0;L;;;;;N;;;;;
+1442C;ANATOLIAN HIEROGLYPH A041A;Lo;0;L;;;;;N;;;;;
+1442D;ANATOLIAN HIEROGLYPH A042;Lo;0;L;;;;;N;;;;;
+1442E;ANATOLIAN HIEROGLYPH A043;Lo;0;L;;;;;N;;;;;
+1442F;ANATOLIAN HIEROGLYPH A044;Lo;0;L;;;;;N;;;;;
+14430;ANATOLIAN HIEROGLYPH A045;Lo;0;L;;;;;N;;;;;
+14431;ANATOLIAN HIEROGLYPH A045A;Lo;0;L;;;;;N;;;;;
+14432;ANATOLIAN HIEROGLYPH A046;Lo;0;L;;;;;N;;;;;
+14433;ANATOLIAN HIEROGLYPH A046A;Lo;0;L;;;;;N;;;;;
+14434;ANATOLIAN HIEROGLYPH A046B;Lo;0;L;;;;;N;;;;;
+14435;ANATOLIAN HIEROGLYPH A047;Lo;0;L;;;;;N;;;;;
+14436;ANATOLIAN HIEROGLYPH A048;Lo;0;L;;;;;N;;;;;
+14437;ANATOLIAN HIEROGLYPH A049;Lo;0;L;;;;;N;;;;;
+14438;ANATOLIAN HIEROGLYPH A050;Lo;0;L;;;;;N;;;;;
+14439;ANATOLIAN HIEROGLYPH A051;Lo;0;L;;;;;N;;;;;
+1443A;ANATOLIAN HIEROGLYPH A052;Lo;0;L;;;;;N;;;;;
+1443B;ANATOLIAN HIEROGLYPH A053;Lo;0;L;;;;;N;;;;;
+1443C;ANATOLIAN HIEROGLYPH A054;Lo;0;L;;;;;N;;;;;
+1443D;ANATOLIAN HIEROGLYPH A055;Lo;0;L;;;;;N;;;;;
+1443E;ANATOLIAN HIEROGLYPH A056;Lo;0;L;;;;;N;;;;;
+1443F;ANATOLIAN HIEROGLYPH A057;Lo;0;L;;;;;N;;;;;
+14440;ANATOLIAN HIEROGLYPH A058;Lo;0;L;;;;;N;;;;;
+14441;ANATOLIAN HIEROGLYPH A059;Lo;0;L;;;;;N;;;;;
+14442;ANATOLIAN HIEROGLYPH A060;Lo;0;L;;;;;N;;;;;
+14443;ANATOLIAN HIEROGLYPH A061;Lo;0;L;;;;;N;;;;;
+14444;ANATOLIAN HIEROGLYPH A062;Lo;0;L;;;;;N;;;;;
+14445;ANATOLIAN HIEROGLYPH A063;Lo;0;L;;;;;N;;;;;
+14446;ANATOLIAN HIEROGLYPH A064;Lo;0;L;;;;;N;;;;;
+14447;ANATOLIAN HIEROGLYPH A065;Lo;0;L;;;;;N;;;;;
+14448;ANATOLIAN HIEROGLYPH A066;Lo;0;L;;;;;N;;;;;
+14449;ANATOLIAN HIEROGLYPH A066A;Lo;0;L;;;;;N;;;;;
+1444A;ANATOLIAN HIEROGLYPH A066B;Lo;0;L;;;;;N;;;;;
+1444B;ANATOLIAN HIEROGLYPH A066C;Lo;0;L;;;;;N;;;;;
+1444C;ANATOLIAN HIEROGLYPH A067;Lo;0;L;;;;;N;;;;;
+1444D;ANATOLIAN HIEROGLYPH A068;Lo;0;L;;;;;N;;;;;
+1444E;ANATOLIAN HIEROGLYPH A069;Lo;0;L;;;;;N;;;;;
+1444F;ANATOLIAN HIEROGLYPH A070;Lo;0;L;;;;;N;;;;;
+14450;ANATOLIAN HIEROGLYPH A071;Lo;0;L;;;;;N;;;;;
+14451;ANATOLIAN HIEROGLYPH A072;Lo;0;L;;;;;N;;;;;
+14452;ANATOLIAN HIEROGLYPH A073;Lo;0;L;;;;;N;;;;;
+14453;ANATOLIAN HIEROGLYPH A074;Lo;0;L;;;;;N;;;;;
+14454;ANATOLIAN HIEROGLYPH A075;Lo;0;L;;;;;N;;;;;
+14455;ANATOLIAN HIEROGLYPH A076;Lo;0;L;;;;;N;;;;;
+14456;ANATOLIAN HIEROGLYPH A077;Lo;0;L;;;;;N;;;;;
+14457;ANATOLIAN HIEROGLYPH A078;Lo;0;L;;;;;N;;;;;
+14458;ANATOLIAN HIEROGLYPH A079;Lo;0;L;;;;;N;;;;;
+14459;ANATOLIAN HIEROGLYPH A080;Lo;0;L;;;;;N;;;;;
+1445A;ANATOLIAN HIEROGLYPH A081;Lo;0;L;;;;;N;;;;;
+1445B;ANATOLIAN HIEROGLYPH A082;Lo;0;L;;;;;N;;;;;
+1445C;ANATOLIAN HIEROGLYPH A083;Lo;0;L;;;;;N;;;;;
+1445D;ANATOLIAN HIEROGLYPH A084;Lo;0;L;;;;;N;;;;;
+1445E;ANATOLIAN HIEROGLYPH A085;Lo;0;L;;;;;N;;;;;
+1445F;ANATOLIAN HIEROGLYPH A086;Lo;0;L;;;;;N;;;;;
+14460;ANATOLIAN HIEROGLYPH A087;Lo;0;L;;;;;N;;;;;
+14461;ANATOLIAN HIEROGLYPH A088;Lo;0;L;;;;;N;;;;;
+14462;ANATOLIAN HIEROGLYPH A089;Lo;0;L;;;;;N;;;;;
+14463;ANATOLIAN HIEROGLYPH A090;Lo;0;L;;;;;N;;;;;
+14464;ANATOLIAN HIEROGLYPH A091;Lo;0;L;;;;;N;;;;;
+14465;ANATOLIAN HIEROGLYPH A092;Lo;0;L;;;;;N;;;;;
+14466;ANATOLIAN HIEROGLYPH A093;Lo;0;L;;;;;N;;;;;
+14467;ANATOLIAN HIEROGLYPH A094;Lo;0;L;;;;;N;;;;;
+14468;ANATOLIAN HIEROGLYPH A095;Lo;0;L;;;;;N;;;;;
+14469;ANATOLIAN HIEROGLYPH A096;Lo;0;L;;;;;N;;;;;
+1446A;ANATOLIAN HIEROGLYPH A097;Lo;0;L;;;;;N;;;;;
+1446B;ANATOLIAN HIEROGLYPH A097A;Lo;0;L;;;;;N;;;;;
+1446C;ANATOLIAN HIEROGLYPH A098;Lo;0;L;;;;;N;;;;;
+1446D;ANATOLIAN HIEROGLYPH A098A;Lo;0;L;;;;;N;;;;;
+1446E;ANATOLIAN HIEROGLYPH A099;Lo;0;L;;;;;N;;;;;
+1446F;ANATOLIAN HIEROGLYPH A100;Lo;0;L;;;;;N;;;;;
+14470;ANATOLIAN HIEROGLYPH A100A;Lo;0;L;;;;;N;;;;;
+14471;ANATOLIAN HIEROGLYPH A101;Lo;0;L;;;;;N;;;;;
+14472;ANATOLIAN HIEROGLYPH A101A;Lo;0;L;;;;;N;;;;;
+14473;ANATOLIAN HIEROGLYPH A102;Lo;0;L;;;;;N;;;;;
+14474;ANATOLIAN HIEROGLYPH A102A;Lo;0;L;;;;;N;;;;;
+14475;ANATOLIAN HIEROGLYPH A103;Lo;0;L;;;;;N;;;;;
+14476;ANATOLIAN HIEROGLYPH A104;Lo;0;L;;;;;N;;;;;
+14477;ANATOLIAN HIEROGLYPH A104A;Lo;0;L;;;;;N;;;;;
+14478;ANATOLIAN HIEROGLYPH A104B;Lo;0;L;;;;;N;;;;;
+14479;ANATOLIAN HIEROGLYPH A104C;Lo;0;L;;;;;N;;;;;
+1447A;ANATOLIAN HIEROGLYPH A105;Lo;0;L;;;;;N;;;;;
+1447B;ANATOLIAN HIEROGLYPH A105A;Lo;0;L;;;;;N;;;;;
+1447C;ANATOLIAN HIEROGLYPH A105B;Lo;0;L;;;;;N;;;;;
+1447D;ANATOLIAN HIEROGLYPH A106;Lo;0;L;;;;;N;;;;;
+1447E;ANATOLIAN HIEROGLYPH A107;Lo;0;L;;;;;N;;;;;
+1447F;ANATOLIAN HIEROGLYPH A107A;Lo;0;L;;;;;N;;;;;
+14480;ANATOLIAN HIEROGLYPH A107B;Lo;0;L;;;;;N;;;;;
+14481;ANATOLIAN HIEROGLYPH A107C;Lo;0;L;;;;;N;;;;;
+14482;ANATOLIAN HIEROGLYPH A108;Lo;0;L;;;;;N;;;;;
+14483;ANATOLIAN HIEROGLYPH A109;Lo;0;L;;;;;N;;;;;
+14484;ANATOLIAN HIEROGLYPH A110;Lo;0;L;;;;;N;;;;;
+14485;ANATOLIAN HIEROGLYPH A110A;Lo;0;L;;;;;N;;;;;
+14486;ANATOLIAN HIEROGLYPH A110B;Lo;0;L;;;;;N;;;;;
+14487;ANATOLIAN HIEROGLYPH A111;Lo;0;L;;;;;N;;;;;
+14488;ANATOLIAN HIEROGLYPH A112;Lo;0;L;;;;;N;;;;;
+14489;ANATOLIAN HIEROGLYPH A113;Lo;0;L;;;;;N;;;;;
+1448A;ANATOLIAN HIEROGLYPH A114;Lo;0;L;;;;;N;;;;;
+1448B;ANATOLIAN HIEROGLYPH A115;Lo;0;L;;;;;N;;;;;
+1448C;ANATOLIAN HIEROGLYPH A115A;Lo;0;L;;;;;N;;;;;
+1448D;ANATOLIAN HIEROGLYPH A116;Lo;0;L;;;;;N;;;;;
+1448E;ANATOLIAN HIEROGLYPH A117;Lo;0;L;;;;;N;;;;;
+1448F;ANATOLIAN HIEROGLYPH A118;Lo;0;L;;;;;N;;;;;
+14490;ANATOLIAN HIEROGLYPH A119;Lo;0;L;;;;;N;;;;;
+14491;ANATOLIAN HIEROGLYPH A120;Lo;0;L;;;;;N;;;;;
+14492;ANATOLIAN HIEROGLYPH A121;Lo;0;L;;;;;N;;;;;
+14493;ANATOLIAN HIEROGLYPH A122;Lo;0;L;;;;;N;;;;;
+14494;ANATOLIAN HIEROGLYPH A123;Lo;0;L;;;;;N;;;;;
+14495;ANATOLIAN HIEROGLYPH A124;Lo;0;L;;;;;N;;;;;
+14496;ANATOLIAN HIEROGLYPH A125;Lo;0;L;;;;;N;;;;;
+14497;ANATOLIAN HIEROGLYPH A125A;Lo;0;L;;;;;N;;;;;
+14498;ANATOLIAN HIEROGLYPH A126;Lo;0;L;;;;;N;;;;;
+14499;ANATOLIAN HIEROGLYPH A127;Lo;0;L;;;;;N;;;;;
+1449A;ANATOLIAN HIEROGLYPH A128;Lo;0;L;;;;;N;;;;;
+1449B;ANATOLIAN HIEROGLYPH A129;Lo;0;L;;;;;N;;;;;
+1449C;ANATOLIAN HIEROGLYPH A130;Lo;0;L;;;;;N;;;;;
+1449D;ANATOLIAN HIEROGLYPH A131;Lo;0;L;;;;;N;;;;;
+1449E;ANATOLIAN HIEROGLYPH A132;Lo;0;L;;;;;N;;;;;
+1449F;ANATOLIAN HIEROGLYPH A133;Lo;0;L;;;;;N;;;;;
+144A0;ANATOLIAN HIEROGLYPH A134;Lo;0;L;;;;;N;;;;;
+144A1;ANATOLIAN HIEROGLYPH A135;Lo;0;L;;;;;N;;;;;
+144A2;ANATOLIAN HIEROGLYPH A135A;Lo;0;L;;;;;N;;;;;
+144A3;ANATOLIAN HIEROGLYPH A136;Lo;0;L;;;;;N;;;;;
+144A4;ANATOLIAN HIEROGLYPH A137;Lo;0;L;;;;;N;;;;;
+144A5;ANATOLIAN HIEROGLYPH A138;Lo;0;L;;;;;N;;;;;
+144A6;ANATOLIAN HIEROGLYPH A139;Lo;0;L;;;;;N;;;;;
+144A7;ANATOLIAN HIEROGLYPH A140;Lo;0;L;;;;;N;;;;;
+144A8;ANATOLIAN HIEROGLYPH A141;Lo;0;L;;;;;N;;;;;
+144A9;ANATOLIAN HIEROGLYPH A142;Lo;0;L;;;;;N;;;;;
+144AA;ANATOLIAN HIEROGLYPH A143;Lo;0;L;;;;;N;;;;;
+144AB;ANATOLIAN HIEROGLYPH A144;Lo;0;L;;;;;N;;;;;
+144AC;ANATOLIAN HIEROGLYPH A145;Lo;0;L;;;;;N;;;;;
+144AD;ANATOLIAN HIEROGLYPH A146;Lo;0;L;;;;;N;;;;;
+144AE;ANATOLIAN HIEROGLYPH A147;Lo;0;L;;;;;N;;;;;
+144AF;ANATOLIAN HIEROGLYPH A148;Lo;0;L;;;;;N;;;;;
+144B0;ANATOLIAN HIEROGLYPH A149;Lo;0;L;;;;;N;;;;;
+144B1;ANATOLIAN HIEROGLYPH A150;Lo;0;L;;;;;N;;;;;
+144B2;ANATOLIAN HIEROGLYPH A151;Lo;0;L;;;;;N;;;;;
+144B3;ANATOLIAN HIEROGLYPH A152;Lo;0;L;;;;;N;;;;;
+144B4;ANATOLIAN HIEROGLYPH A153;Lo;0;L;;;;;N;;;;;
+144B5;ANATOLIAN HIEROGLYPH A154;Lo;0;L;;;;;N;;;;;
+144B6;ANATOLIAN HIEROGLYPH A155;Lo;0;L;;;;;N;;;;;
+144B7;ANATOLIAN HIEROGLYPH A156;Lo;0;L;;;;;N;;;;;
+144B8;ANATOLIAN HIEROGLYPH A157;Lo;0;L;;;;;N;;;;;
+144B9;ANATOLIAN HIEROGLYPH A158;Lo;0;L;;;;;N;;;;;
+144BA;ANATOLIAN HIEROGLYPH A159;Lo;0;L;;;;;N;;;;;
+144BB;ANATOLIAN HIEROGLYPH A160;Lo;0;L;;;;;N;;;;;
+144BC;ANATOLIAN HIEROGLYPH A161;Lo;0;L;;;;;N;;;;;
+144BD;ANATOLIAN HIEROGLYPH A162;Lo;0;L;;;;;N;;;;;
+144BE;ANATOLIAN HIEROGLYPH A163;Lo;0;L;;;;;N;;;;;
+144BF;ANATOLIAN HIEROGLYPH A164;Lo;0;L;;;;;N;;;;;
+144C0;ANATOLIAN HIEROGLYPH A165;Lo;0;L;;;;;N;;;;;
+144C1;ANATOLIAN HIEROGLYPH A166;Lo;0;L;;;;;N;;;;;
+144C2;ANATOLIAN HIEROGLYPH A167;Lo;0;L;;;;;N;;;;;
+144C3;ANATOLIAN HIEROGLYPH A168;Lo;0;L;;;;;N;;;;;
+144C4;ANATOLIAN HIEROGLYPH A169;Lo;0;L;;;;;N;;;;;
+144C5;ANATOLIAN HIEROGLYPH A170;Lo;0;L;;;;;N;;;;;
+144C6;ANATOLIAN HIEROGLYPH A171;Lo;0;L;;;;;N;;;;;
+144C7;ANATOLIAN HIEROGLYPH A172;Lo;0;L;;;;;N;;;;;
+144C8;ANATOLIAN HIEROGLYPH A173;Lo;0;L;;;;;N;;;;;
+144C9;ANATOLIAN HIEROGLYPH A174;Lo;0;L;;;;;N;;;;;
+144CA;ANATOLIAN HIEROGLYPH A175;Lo;0;L;;;;;N;;;;;
+144CB;ANATOLIAN HIEROGLYPH A176;Lo;0;L;;;;;N;;;;;
+144CC;ANATOLIAN HIEROGLYPH A177;Lo;0;L;;;;;N;;;;;
+144CD;ANATOLIAN HIEROGLYPH A178;Lo;0;L;;;;;N;;;;;
+144CE;ANATOLIAN HIEROGLYPH A179;Lo;0;L;;;;;N;;;;;
+144CF;ANATOLIAN HIEROGLYPH A180;Lo;0;L;;;;;N;;;;;
+144D0;ANATOLIAN HIEROGLYPH A181;Lo;0;L;;;;;N;;;;;
+144D1;ANATOLIAN HIEROGLYPH A182;Lo;0;L;;;;;N;;;;;
+144D2;ANATOLIAN HIEROGLYPH A183;Lo;0;L;;;;;N;;;;;
+144D3;ANATOLIAN HIEROGLYPH A184;Lo;0;L;;;;;N;;;;;
+144D4;ANATOLIAN HIEROGLYPH A185;Lo;0;L;;;;;N;;;;;
+144D5;ANATOLIAN HIEROGLYPH A186;Lo;0;L;;;;;N;;;;;
+144D6;ANATOLIAN HIEROGLYPH A187;Lo;0;L;;;;;N;;;;;
+144D7;ANATOLIAN HIEROGLYPH A188;Lo;0;L;;;;;N;;;;;
+144D8;ANATOLIAN HIEROGLYPH A189;Lo;0;L;;;;;N;;;;;
+144D9;ANATOLIAN HIEROGLYPH A190;Lo;0;L;;;;;N;;;;;
+144DA;ANATOLIAN HIEROGLYPH A191;Lo;0;L;;;;;N;;;;;
+144DB;ANATOLIAN HIEROGLYPH A192;Lo;0;L;;;;;N;;;;;
+144DC;ANATOLIAN HIEROGLYPH A193;Lo;0;L;;;;;N;;;;;
+144DD;ANATOLIAN HIEROGLYPH A194;Lo;0;L;;;;;N;;;;;
+144DE;ANATOLIAN HIEROGLYPH A195;Lo;0;L;;;;;N;;;;;
+144DF;ANATOLIAN HIEROGLYPH A196;Lo;0;L;;;;;N;;;;;
+144E0;ANATOLIAN HIEROGLYPH A197;Lo;0;L;;;;;N;;;;;
+144E1;ANATOLIAN HIEROGLYPH A198;Lo;0;L;;;;;N;;;;;
+144E2;ANATOLIAN HIEROGLYPH A199;Lo;0;L;;;;;N;;;;;
+144E3;ANATOLIAN HIEROGLYPH A200;Lo;0;L;;;;;N;;;;;
+144E4;ANATOLIAN HIEROGLYPH A201;Lo;0;L;;;;;N;;;;;
+144E5;ANATOLIAN HIEROGLYPH A202;Lo;0;L;;;;;N;;;;;
+144E6;ANATOLIAN HIEROGLYPH A202A;Lo;0;L;;;;;N;;;;;
+144E7;ANATOLIAN HIEROGLYPH A202B;Lo;0;L;;;;;N;;;;;
+144E8;ANATOLIAN HIEROGLYPH A203;Lo;0;L;;;;;N;;;;;
+144E9;ANATOLIAN HIEROGLYPH A204;Lo;0;L;;;;;N;;;;;
+144EA;ANATOLIAN HIEROGLYPH A205;Lo;0;L;;;;;N;;;;;
+144EB;ANATOLIAN HIEROGLYPH A206;Lo;0;L;;;;;N;;;;;
+144EC;ANATOLIAN HIEROGLYPH A207;Lo;0;L;;;;;N;;;;;
+144ED;ANATOLIAN HIEROGLYPH A207A;Lo;0;L;;;;;N;;;;;
+144EE;ANATOLIAN HIEROGLYPH A208;Lo;0;L;;;;;N;;;;;
+144EF;ANATOLIAN HIEROGLYPH A209;Lo;0;L;;;;;N;;;;;
+144F0;ANATOLIAN HIEROGLYPH A209A;Lo;0;L;;;;;N;;;;;
+144F1;ANATOLIAN HIEROGLYPH A210;Lo;0;L;;;;;N;;;;;
+144F2;ANATOLIAN HIEROGLYPH A211;Lo;0;L;;;;;N;;;;;
+144F3;ANATOLIAN HIEROGLYPH A212;Lo;0;L;;;;;N;;;;;
+144F4;ANATOLIAN HIEROGLYPH A213;Lo;0;L;;;;;N;;;;;
+144F5;ANATOLIAN HIEROGLYPH A214;Lo;0;L;;;;;N;;;;;
+144F6;ANATOLIAN HIEROGLYPH A215;Lo;0;L;;;;;N;;;;;
+144F7;ANATOLIAN HIEROGLYPH A215A;Lo;0;L;;;;;N;;;;;
+144F8;ANATOLIAN HIEROGLYPH A216;Lo;0;L;;;;;N;;;;;
+144F9;ANATOLIAN HIEROGLYPH A216A;Lo;0;L;;;;;N;;;;;
+144FA;ANATOLIAN HIEROGLYPH A217;Lo;0;L;;;;;N;;;;;
+144FB;ANATOLIAN HIEROGLYPH A218;Lo;0;L;;;;;N;;;;;
+144FC;ANATOLIAN HIEROGLYPH A219;Lo;0;L;;;;;N;;;;;
+144FD;ANATOLIAN HIEROGLYPH A220;Lo;0;L;;;;;N;;;;;
+144FE;ANATOLIAN HIEROGLYPH A221;Lo;0;L;;;;;N;;;;;
+144FF;ANATOLIAN HIEROGLYPH A222;Lo;0;L;;;;;N;;;;;
+14500;ANATOLIAN HIEROGLYPH A223;Lo;0;L;;;;;N;;;;;
+14501;ANATOLIAN HIEROGLYPH A224;Lo;0;L;;;;;N;;;;;
+14502;ANATOLIAN HIEROGLYPH A225;Lo;0;L;;;;;N;;;;;
+14503;ANATOLIAN HIEROGLYPH A226;Lo;0;L;;;;;N;;;;;
+14504;ANATOLIAN HIEROGLYPH A227;Lo;0;L;;;;;N;;;;;
+14505;ANATOLIAN HIEROGLYPH A227A;Lo;0;L;;;;;N;;;;;
+14506;ANATOLIAN HIEROGLYPH A228;Lo;0;L;;;;;N;;;;;
+14507;ANATOLIAN HIEROGLYPH A229;Lo;0;L;;;;;N;;;;;
+14508;ANATOLIAN HIEROGLYPH A230;Lo;0;L;;;;;N;;;;;
+14509;ANATOLIAN HIEROGLYPH A231;Lo;0;L;;;;;N;;;;;
+1450A;ANATOLIAN HIEROGLYPH A232;Lo;0;L;;;;;N;;;;;
+1450B;ANATOLIAN HIEROGLYPH A233;Lo;0;L;;;;;N;;;;;
+1450C;ANATOLIAN HIEROGLYPH A234;Lo;0;L;;;;;N;;;;;
+1450D;ANATOLIAN HIEROGLYPH A235;Lo;0;L;;;;;N;;;;;
+1450E;ANATOLIAN HIEROGLYPH A236;Lo;0;L;;;;;N;;;;;
+1450F;ANATOLIAN HIEROGLYPH A237;Lo;0;L;;;;;N;;;;;
+14510;ANATOLIAN HIEROGLYPH A238;Lo;0;L;;;;;N;;;;;
+14511;ANATOLIAN HIEROGLYPH A239;Lo;0;L;;;;;N;;;;;
+14512;ANATOLIAN HIEROGLYPH A240;Lo;0;L;;;;;N;;;;;
+14513;ANATOLIAN HIEROGLYPH A241;Lo;0;L;;;;;N;;;;;
+14514;ANATOLIAN HIEROGLYPH A242;Lo;0;L;;;;;N;;;;;
+14515;ANATOLIAN HIEROGLYPH A243;Lo;0;L;;;;;N;;;;;
+14516;ANATOLIAN HIEROGLYPH A244;Lo;0;L;;;;;N;;;;;
+14517;ANATOLIAN HIEROGLYPH A245;Lo;0;L;;;;;N;;;;;
+14518;ANATOLIAN HIEROGLYPH A246;Lo;0;L;;;;;N;;;;;
+14519;ANATOLIAN HIEROGLYPH A247;Lo;0;L;;;;;N;;;;;
+1451A;ANATOLIAN HIEROGLYPH A248;Lo;0;L;;;;;N;;;;;
+1451B;ANATOLIAN HIEROGLYPH A249;Lo;0;L;;;;;N;;;;;
+1451C;ANATOLIAN HIEROGLYPH A250;Lo;0;L;;;;;N;;;;;
+1451D;ANATOLIAN HIEROGLYPH A251;Lo;0;L;;;;;N;;;;;
+1451E;ANATOLIAN HIEROGLYPH A252;Lo;0;L;;;;;N;;;;;
+1451F;ANATOLIAN HIEROGLYPH A253;Lo;0;L;;;;;N;;;;;
+14520;ANATOLIAN HIEROGLYPH A254;Lo;0;L;;;;;N;;;;;
+14521;ANATOLIAN HIEROGLYPH A255;Lo;0;L;;;;;N;;;;;
+14522;ANATOLIAN HIEROGLYPH A256;Lo;0;L;;;;;N;;;;;
+14523;ANATOLIAN HIEROGLYPH A257;Lo;0;L;;;;;N;;;;;
+14524;ANATOLIAN HIEROGLYPH A258;Lo;0;L;;;;;N;;;;;
+14525;ANATOLIAN HIEROGLYPH A259;Lo;0;L;;;;;N;;;;;
+14526;ANATOLIAN HIEROGLYPH A260;Lo;0;L;;;;;N;;;;;
+14527;ANATOLIAN HIEROGLYPH A261;Lo;0;L;;;;;N;;;;;
+14528;ANATOLIAN HIEROGLYPH A262;Lo;0;L;;;;;N;;;;;
+14529;ANATOLIAN HIEROGLYPH A263;Lo;0;L;;;;;N;;;;;
+1452A;ANATOLIAN HIEROGLYPH A264;Lo;0;L;;;;;N;;;;;
+1452B;ANATOLIAN HIEROGLYPH A265;Lo;0;L;;;;;N;;;;;
+1452C;ANATOLIAN HIEROGLYPH A266;Lo;0;L;;;;;N;;;;;
+1452D;ANATOLIAN HIEROGLYPH A267;Lo;0;L;;;;;N;;;;;
+1452E;ANATOLIAN HIEROGLYPH A267A;Lo;0;L;;;;;N;;;;;
+1452F;ANATOLIAN HIEROGLYPH A268;Lo;0;L;;;;;N;;;;;
+14530;ANATOLIAN HIEROGLYPH A269;Lo;0;L;;;;;N;;;;;
+14531;ANATOLIAN HIEROGLYPH A270;Lo;0;L;;;;;N;;;;;
+14532;ANATOLIAN HIEROGLYPH A271;Lo;0;L;;;;;N;;;;;
+14533;ANATOLIAN HIEROGLYPH A272;Lo;0;L;;;;;N;;;;;
+14534;ANATOLIAN HIEROGLYPH A273;Lo;0;L;;;;;N;;;;;
+14535;ANATOLIAN HIEROGLYPH A274;Lo;0;L;;;;;N;;;;;
+14536;ANATOLIAN HIEROGLYPH A275;Lo;0;L;;;;;N;;;;;
+14537;ANATOLIAN HIEROGLYPH A276;Lo;0;L;;;;;N;;;;;
+14538;ANATOLIAN HIEROGLYPH A277;Lo;0;L;;;;;N;;;;;
+14539;ANATOLIAN HIEROGLYPH A278;Lo;0;L;;;;;N;;;;;
+1453A;ANATOLIAN HIEROGLYPH A279;Lo;0;L;;;;;N;;;;;
+1453B;ANATOLIAN HIEROGLYPH A280;Lo;0;L;;;;;N;;;;;
+1453C;ANATOLIAN HIEROGLYPH A281;Lo;0;L;;;;;N;;;;;
+1453D;ANATOLIAN HIEROGLYPH A282;Lo;0;L;;;;;N;;;;;
+1453E;ANATOLIAN HIEROGLYPH A283;Lo;0;L;;;;;N;;;;;
+1453F;ANATOLIAN HIEROGLYPH A284;Lo;0;L;;;;;N;;;;;
+14540;ANATOLIAN HIEROGLYPH A285;Lo;0;L;;;;;N;;;;;
+14541;ANATOLIAN HIEROGLYPH A286;Lo;0;L;;;;;N;;;;;
+14542;ANATOLIAN HIEROGLYPH A287;Lo;0;L;;;;;N;;;;;
+14543;ANATOLIAN HIEROGLYPH A288;Lo;0;L;;;;;N;;;;;
+14544;ANATOLIAN HIEROGLYPH A289;Lo;0;L;;;;;N;;;;;
+14545;ANATOLIAN HIEROGLYPH A289A;Lo;0;L;;;;;N;;;;;
+14546;ANATOLIAN HIEROGLYPH A290;Lo;0;L;;;;;N;;;;;
+14547;ANATOLIAN HIEROGLYPH A291;Lo;0;L;;;;;N;;;;;
+14548;ANATOLIAN HIEROGLYPH A292;Lo;0;L;;;;;N;;;;;
+14549;ANATOLIAN HIEROGLYPH A293;Lo;0;L;;;;;N;;;;;
+1454A;ANATOLIAN HIEROGLYPH A294;Lo;0;L;;;;;N;;;;;
+1454B;ANATOLIAN HIEROGLYPH A294A;Lo;0;L;;;;;N;;;;;
+1454C;ANATOLIAN HIEROGLYPH A295;Lo;0;L;;;;;N;;;;;
+1454D;ANATOLIAN HIEROGLYPH A296;Lo;0;L;;;;;N;;;;;
+1454E;ANATOLIAN HIEROGLYPH A297;Lo;0;L;;;;;N;;;;;
+1454F;ANATOLIAN HIEROGLYPH A298;Lo;0;L;;;;;N;;;;;
+14550;ANATOLIAN HIEROGLYPH A299;Lo;0;L;;;;;N;;;;;
+14551;ANATOLIAN HIEROGLYPH A299A;Lo;0;L;;;;;N;;;;;
+14552;ANATOLIAN HIEROGLYPH A300;Lo;0;L;;;;;N;;;;;
+14553;ANATOLIAN HIEROGLYPH A301;Lo;0;L;;;;;N;;;;;
+14554;ANATOLIAN HIEROGLYPH A302;Lo;0;L;;;;;N;;;;;
+14555;ANATOLIAN HIEROGLYPH A303;Lo;0;L;;;;;N;;;;;
+14556;ANATOLIAN HIEROGLYPH A304;Lo;0;L;;;;;N;;;;;
+14557;ANATOLIAN HIEROGLYPH A305;Lo;0;L;;;;;N;;;;;
+14558;ANATOLIAN HIEROGLYPH A306;Lo;0;L;;;;;N;;;;;
+14559;ANATOLIAN HIEROGLYPH A307;Lo;0;L;;;;;N;;;;;
+1455A;ANATOLIAN HIEROGLYPH A308;Lo;0;L;;;;;N;;;;;
+1455B;ANATOLIAN HIEROGLYPH A309;Lo;0;L;;;;;N;;;;;
+1455C;ANATOLIAN HIEROGLYPH A309A;Lo;0;L;;;;;N;;;;;
+1455D;ANATOLIAN HIEROGLYPH A310;Lo;0;L;;;;;N;;;;;
+1455E;ANATOLIAN HIEROGLYPH A311;Lo;0;L;;;;;N;;;;;
+1455F;ANATOLIAN HIEROGLYPH A312;Lo;0;L;;;;;N;;;;;
+14560;ANATOLIAN HIEROGLYPH A313;Lo;0;L;;;;;N;;;;;
+14561;ANATOLIAN HIEROGLYPH A314;Lo;0;L;;;;;N;;;;;
+14562;ANATOLIAN HIEROGLYPH A315;Lo;0;L;;;;;N;;;;;
+14563;ANATOLIAN HIEROGLYPH A316;Lo;0;L;;;;;N;;;;;
+14564;ANATOLIAN HIEROGLYPH A317;Lo;0;L;;;;;N;;;;;
+14565;ANATOLIAN HIEROGLYPH A318;Lo;0;L;;;;;N;;;;;
+14566;ANATOLIAN HIEROGLYPH A319;Lo;0;L;;;;;N;;;;;
+14567;ANATOLIAN HIEROGLYPH A320;Lo;0;L;;;;;N;;;;;
+14568;ANATOLIAN HIEROGLYPH A321;Lo;0;L;;;;;N;;;;;
+14569;ANATOLIAN HIEROGLYPH A322;Lo;0;L;;;;;N;;;;;
+1456A;ANATOLIAN HIEROGLYPH A323;Lo;0;L;;;;;N;;;;;
+1456B;ANATOLIAN HIEROGLYPH A324;Lo;0;L;;;;;N;;;;;
+1456C;ANATOLIAN HIEROGLYPH A325;Lo;0;L;;;;;N;;;;;
+1456D;ANATOLIAN HIEROGLYPH A326;Lo;0;L;;;;;N;;;;;
+1456E;ANATOLIAN HIEROGLYPH A327;Lo;0;L;;;;;N;;;;;
+1456F;ANATOLIAN HIEROGLYPH A328;Lo;0;L;;;;;N;;;;;
+14570;ANATOLIAN HIEROGLYPH A329;Lo;0;L;;;;;N;;;;;
+14571;ANATOLIAN HIEROGLYPH A329A;Lo;0;L;;;;;N;;;;;
+14572;ANATOLIAN HIEROGLYPH A330;Lo;0;L;;;;;N;;;;;
+14573;ANATOLIAN HIEROGLYPH A331;Lo;0;L;;;;;N;;;;;
+14574;ANATOLIAN HIEROGLYPH A332A;Lo;0;L;;;;;N;;;;;
+14575;ANATOLIAN HIEROGLYPH A332B;Lo;0;L;;;;;N;;;;;
+14576;ANATOLIAN HIEROGLYPH A332C;Lo;0;L;;;;;N;;;;;
+14577;ANATOLIAN HIEROGLYPH A333;Lo;0;L;;;;;N;;;;;
+14578;ANATOLIAN HIEROGLYPH A334;Lo;0;L;;;;;N;;;;;
+14579;ANATOLIAN HIEROGLYPH A335;Lo;0;L;;;;;N;;;;;
+1457A;ANATOLIAN HIEROGLYPH A336;Lo;0;L;;;;;N;;;;;
+1457B;ANATOLIAN HIEROGLYPH A336A;Lo;0;L;;;;;N;;;;;
+1457C;ANATOLIAN HIEROGLYPH A336B;Lo;0;L;;;;;N;;;;;
+1457D;ANATOLIAN HIEROGLYPH A336C;Lo;0;L;;;;;N;;;;;
+1457E;ANATOLIAN HIEROGLYPH A337;Lo;0;L;;;;;N;;;;;
+1457F;ANATOLIAN HIEROGLYPH A338;Lo;0;L;;;;;N;;;;;
+14580;ANATOLIAN HIEROGLYPH A339;Lo;0;L;;;;;N;;;;;
+14581;ANATOLIAN HIEROGLYPH A340;Lo;0;L;;;;;N;;;;;
+14582;ANATOLIAN HIEROGLYPH A341;Lo;0;L;;;;;N;;;;;
+14583;ANATOLIAN HIEROGLYPH A342;Lo;0;L;;;;;N;;;;;
+14584;ANATOLIAN HIEROGLYPH A343;Lo;0;L;;;;;N;;;;;
+14585;ANATOLIAN HIEROGLYPH A344;Lo;0;L;;;;;N;;;;;
+14586;ANATOLIAN HIEROGLYPH A345;Lo;0;L;;;;;N;;;;;
+14587;ANATOLIAN HIEROGLYPH A346;Lo;0;L;;;;;N;;;;;
+14588;ANATOLIAN HIEROGLYPH A347;Lo;0;L;;;;;N;;;;;
+14589;ANATOLIAN HIEROGLYPH A348;Lo;0;L;;;;;N;;;;;
+1458A;ANATOLIAN HIEROGLYPH A349;Lo;0;L;;;;;N;;;;;
+1458B;ANATOLIAN HIEROGLYPH A350;Lo;0;L;;;;;N;;;;;
+1458C;ANATOLIAN HIEROGLYPH A351;Lo;0;L;;;;;N;;;;;
+1458D;ANATOLIAN HIEROGLYPH A352;Lo;0;L;;;;;N;;;;;
+1458E;ANATOLIAN HIEROGLYPH A353;Lo;0;L;;;;;N;;;;;
+1458F;ANATOLIAN HIEROGLYPH A354;Lo;0;L;;;;;N;;;;;
+14590;ANATOLIAN HIEROGLYPH A355;Lo;0;L;;;;;N;;;;;
+14591;ANATOLIAN HIEROGLYPH A356;Lo;0;L;;;;;N;;;;;
+14592;ANATOLIAN HIEROGLYPH A357;Lo;0;L;;;;;N;;;;;
+14593;ANATOLIAN HIEROGLYPH A358;Lo;0;L;;;;;N;;;;;
+14594;ANATOLIAN HIEROGLYPH A359;Lo;0;L;;;;;N;;;;;
+14595;ANATOLIAN HIEROGLYPH A359A;Lo;0;L;;;;;N;;;;;
+14596;ANATOLIAN HIEROGLYPH A360;Lo;0;L;;;;;N;;;;;
+14597;ANATOLIAN HIEROGLYPH A361;Lo;0;L;;;;;N;;;;;
+14598;ANATOLIAN HIEROGLYPH A362;Lo;0;L;;;;;N;;;;;
+14599;ANATOLIAN HIEROGLYPH A363;Lo;0;L;;;;;N;;;;;
+1459A;ANATOLIAN HIEROGLYPH A364;Lo;0;L;;;;;N;;;;;
+1459B;ANATOLIAN HIEROGLYPH A364A;Lo;0;L;;;;;N;;;;;
+1459C;ANATOLIAN HIEROGLYPH A365;Lo;0;L;;;;;N;;;;;
+1459D;ANATOLIAN HIEROGLYPH A366;Lo;0;L;;;;;N;;;;;
+1459E;ANATOLIAN HIEROGLYPH A367;Lo;0;L;;;;;N;;;;;
+1459F;ANATOLIAN HIEROGLYPH A368;Lo;0;L;;;;;N;;;;;
+145A0;ANATOLIAN HIEROGLYPH A368A;Lo;0;L;;;;;N;;;;;
+145A1;ANATOLIAN HIEROGLYPH A369;Lo;0;L;;;;;N;;;;;
+145A2;ANATOLIAN HIEROGLYPH A370;Lo;0;L;;;;;N;;;;;
+145A3;ANATOLIAN HIEROGLYPH A371;Lo;0;L;;;;;N;;;;;
+145A4;ANATOLIAN HIEROGLYPH A371A;Lo;0;L;;;;;N;;;;;
+145A5;ANATOLIAN HIEROGLYPH A372;Lo;0;L;;;;;N;;;;;
+145A6;ANATOLIAN HIEROGLYPH A373;Lo;0;L;;;;;N;;;;;
+145A7;ANATOLIAN HIEROGLYPH A374;Lo;0;L;;;;;N;;;;;
+145A8;ANATOLIAN HIEROGLYPH A375;Lo;0;L;;;;;N;;;;;
+145A9;ANATOLIAN HIEROGLYPH A376;Lo;0;L;;;;;N;;;;;
+145AA;ANATOLIAN HIEROGLYPH A377;Lo;0;L;;;;;N;;;;;
+145AB;ANATOLIAN HIEROGLYPH A378;Lo;0;L;;;;;N;;;;;
+145AC;ANATOLIAN HIEROGLYPH A379;Lo;0;L;;;;;N;;;;;
+145AD;ANATOLIAN HIEROGLYPH A380;Lo;0;L;;;;;N;;;;;
+145AE;ANATOLIAN HIEROGLYPH A381;Lo;0;L;;;;;N;;;;;
+145AF;ANATOLIAN HIEROGLYPH A381A;Lo;0;L;;;;;N;;;;;
+145B0;ANATOLIAN HIEROGLYPH A382;Lo;0;L;;;;;N;;;;;
+145B1;ANATOLIAN HIEROGLYPH A383 RA OR RI;Lo;0;L;;;;;N;;;;;
+145B2;ANATOLIAN HIEROGLYPH A383A;Lo;0;L;;;;;N;;;;;
+145B3;ANATOLIAN HIEROGLYPH A384;Lo;0;L;;;;;N;;;;;
+145B4;ANATOLIAN HIEROGLYPH A385;Lo;0;L;;;;;N;;;;;
+145B5;ANATOLIAN HIEROGLYPH A386;Lo;0;L;;;;;N;;;;;
+145B6;ANATOLIAN HIEROGLYPH A386A;Lo;0;L;;;;;N;;;;;
+145B7;ANATOLIAN HIEROGLYPH A387;Lo;0;L;;;;;N;;;;;
+145B8;ANATOLIAN HIEROGLYPH A388;Lo;0;L;;;;;N;;;;;
+145B9;ANATOLIAN HIEROGLYPH A389;Lo;0;L;;;;;N;;;;;
+145BA;ANATOLIAN HIEROGLYPH A390;Lo;0;L;;;;;N;;;;;
+145BB;ANATOLIAN HIEROGLYPH A391;Lo;0;L;;;;;N;;;;;
+145BC;ANATOLIAN HIEROGLYPH A392;Lo;0;L;;;;;N;;;;;
+145BD;ANATOLIAN HIEROGLYPH A393 EIGHT;Lo;0;L;;;;;N;;;;;
+145BE;ANATOLIAN HIEROGLYPH A394;Lo;0;L;;;;;N;;;;;
+145BF;ANATOLIAN HIEROGLYPH A395;Lo;0;L;;;;;N;;;;;
+145C0;ANATOLIAN HIEROGLYPH A396;Lo;0;L;;;;;N;;;;;
+145C1;ANATOLIAN HIEROGLYPH A397;Lo;0;L;;;;;N;;;;;
+145C2;ANATOLIAN HIEROGLYPH A398;Lo;0;L;;;;;N;;;;;
+145C3;ANATOLIAN HIEROGLYPH A399;Lo;0;L;;;;;N;;;;;
+145C4;ANATOLIAN HIEROGLYPH A400;Lo;0;L;;;;;N;;;;;
+145C5;ANATOLIAN HIEROGLYPH A401;Lo;0;L;;;;;N;;;;;
+145C6;ANATOLIAN HIEROGLYPH A402;Lo;0;L;;;;;N;;;;;
+145C7;ANATOLIAN HIEROGLYPH A403;Lo;0;L;;;;;N;;;;;
+145C8;ANATOLIAN HIEROGLYPH A404;Lo;0;L;;;;;N;;;;;
+145C9;ANATOLIAN HIEROGLYPH A405;Lo;0;L;;;;;N;;;;;
+145CA;ANATOLIAN HIEROGLYPH A406;Lo;0;L;;;;;N;;;;;
+145CB;ANATOLIAN HIEROGLYPH A407;Lo;0;L;;;;;N;;;;;
+145CC;ANATOLIAN HIEROGLYPH A408;Lo;0;L;;;;;N;;;;;
+145CD;ANATOLIAN HIEROGLYPH A409;Lo;0;L;;;;;N;;;;;
+145CE;ANATOLIAN HIEROGLYPH A410 BEGIN LOGOGRAM MARK;Lo;0;L;;;;;N;;;;;
+145CF;ANATOLIAN HIEROGLYPH A410A END LOGOGRAM MARK;Lo;0;L;;;;;N;;;;;
+145D0;ANATOLIAN HIEROGLYPH A411;Lo;0;L;;;;;N;;;;;
+145D1;ANATOLIAN HIEROGLYPH A412;Lo;0;L;;;;;N;;;;;
+145D2;ANATOLIAN HIEROGLYPH A413;Lo;0;L;;;;;N;;;;;
+145D3;ANATOLIAN HIEROGLYPH A414;Lo;0;L;;;;;N;;;;;
+145D4;ANATOLIAN HIEROGLYPH A415;Lo;0;L;;;;;N;;;;;
+145D5;ANATOLIAN HIEROGLYPH A416;Lo;0;L;;;;;N;;;;;
+145D6;ANATOLIAN HIEROGLYPH A417;Lo;0;L;;;;;N;;;;;
+145D7;ANATOLIAN HIEROGLYPH A418;Lo;0;L;;;;;N;;;;;
+145D8;ANATOLIAN HIEROGLYPH A419;Lo;0;L;;;;;N;;;;;
+145D9;ANATOLIAN HIEROGLYPH A420;Lo;0;L;;;;;N;;;;;
+145DA;ANATOLIAN HIEROGLYPH A421;Lo;0;L;;;;;N;;;;;
+145DB;ANATOLIAN HIEROGLYPH A422;Lo;0;L;;;;;N;;;;;
+145DC;ANATOLIAN HIEROGLYPH A423;Lo;0;L;;;;;N;;;;;
+145DD;ANATOLIAN HIEROGLYPH A424;Lo;0;L;;;;;N;;;;;
+145DE;ANATOLIAN HIEROGLYPH A425;Lo;0;L;;;;;N;;;;;
+145DF;ANATOLIAN HIEROGLYPH A426;Lo;0;L;;;;;N;;;;;
+145E0;ANATOLIAN HIEROGLYPH A427;Lo;0;L;;;;;N;;;;;
+145E1;ANATOLIAN HIEROGLYPH A428;Lo;0;L;;;;;N;;;;;
+145E2;ANATOLIAN HIEROGLYPH A429;Lo;0;L;;;;;N;;;;;
+145E3;ANATOLIAN HIEROGLYPH A430;Lo;0;L;;;;;N;;;;;
+145E4;ANATOLIAN HIEROGLYPH A431;Lo;0;L;;;;;N;;;;;
+145E5;ANATOLIAN HIEROGLYPH A432;Lo;0;L;;;;;N;;;;;
+145E6;ANATOLIAN HIEROGLYPH A433;Lo;0;L;;;;;N;;;;;
+145E7;ANATOLIAN HIEROGLYPH A434;Lo;0;L;;;;;N;;;;;
+145E8;ANATOLIAN HIEROGLYPH A435;Lo;0;L;;;;;N;;;;;
+145E9;ANATOLIAN HIEROGLYPH A436;Lo;0;L;;;;;N;;;;;
+145EA;ANATOLIAN HIEROGLYPH A437;Lo;0;L;;;;;N;;;;;
+145EB;ANATOLIAN HIEROGLYPH A438;Lo;0;L;;;;;N;;;;;
+145EC;ANATOLIAN HIEROGLYPH A439;Lo;0;L;;;;;N;;;;;
+145ED;ANATOLIAN HIEROGLYPH A440;Lo;0;L;;;;;N;;;;;
+145EE;ANATOLIAN HIEROGLYPH A441;Lo;0;L;;;;;N;;;;;
+145EF;ANATOLIAN HIEROGLYPH A442;Lo;0;L;;;;;N;;;;;
+145F0;ANATOLIAN HIEROGLYPH A443;Lo;0;L;;;;;N;;;;;
+145F1;ANATOLIAN HIEROGLYPH A444;Lo;0;L;;;;;N;;;;;
+145F2;ANATOLIAN HIEROGLYPH A445;Lo;0;L;;;;;N;;;;;
+145F3;ANATOLIAN HIEROGLYPH A446;Lo;0;L;;;;;N;;;;;
+145F4;ANATOLIAN HIEROGLYPH A447;Lo;0;L;;;;;N;;;;;
+145F5;ANATOLIAN HIEROGLYPH A448;Lo;0;L;;;;;N;;;;;
+145F6;ANATOLIAN HIEROGLYPH A449;Lo;0;L;;;;;N;;;;;
+145F7;ANATOLIAN HIEROGLYPH A450;Lo;0;L;;;;;N;;;;;
+145F8;ANATOLIAN HIEROGLYPH A450A;Lo;0;L;;;;;N;;;;;
+145F9;ANATOLIAN HIEROGLYPH A451;Lo;0;L;;;;;N;;;;;
+145FA;ANATOLIAN HIEROGLYPH A452;Lo;0;L;;;;;N;;;;;
+145FB;ANATOLIAN HIEROGLYPH A453;Lo;0;L;;;;;N;;;;;
+145FC;ANATOLIAN HIEROGLYPH A454;Lo;0;L;;;;;N;;;;;
+145FD;ANATOLIAN HIEROGLYPH A455;Lo;0;L;;;;;N;;;;;
+145FE;ANATOLIAN HIEROGLYPH A456;Lo;0;L;;;;;N;;;;;
+145FF;ANATOLIAN HIEROGLYPH A457;Lo;0;L;;;;;N;;;;;
+14600;ANATOLIAN HIEROGLYPH A457A;Lo;0;L;;;;;N;;;;;
+14601;ANATOLIAN HIEROGLYPH A458;Lo;0;L;;;;;N;;;;;
+14602;ANATOLIAN HIEROGLYPH A459;Lo;0;L;;;;;N;;;;;
+14603;ANATOLIAN HIEROGLYPH A460;Lo;0;L;;;;;N;;;;;
+14604;ANATOLIAN HIEROGLYPH A461;Lo;0;L;;;;;N;;;;;
+14605;ANATOLIAN HIEROGLYPH A462;Lo;0;L;;;;;N;;;;;
+14606;ANATOLIAN HIEROGLYPH A463;Lo;0;L;;;;;N;;;;;
+14607;ANATOLIAN HIEROGLYPH A464;Lo;0;L;;;;;N;;;;;
+14608;ANATOLIAN HIEROGLYPH A465;Lo;0;L;;;;;N;;;;;
+14609;ANATOLIAN HIEROGLYPH A466;Lo;0;L;;;;;N;;;;;
+1460A;ANATOLIAN HIEROGLYPH A467;Lo;0;L;;;;;N;;;;;
+1460B;ANATOLIAN HIEROGLYPH A468;Lo;0;L;;;;;N;;;;;
+1460C;ANATOLIAN HIEROGLYPH A469;Lo;0;L;;;;;N;;;;;
+1460D;ANATOLIAN HIEROGLYPH A470;Lo;0;L;;;;;N;;;;;
+1460E;ANATOLIAN HIEROGLYPH A471;Lo;0;L;;;;;N;;;;;
+1460F;ANATOLIAN HIEROGLYPH A472;Lo;0;L;;;;;N;;;;;
+14610;ANATOLIAN HIEROGLYPH A473;Lo;0;L;;;;;N;;;;;
+14611;ANATOLIAN HIEROGLYPH A474;Lo;0;L;;;;;N;;;;;
+14612;ANATOLIAN HIEROGLYPH A475;Lo;0;L;;;;;N;;;;;
+14613;ANATOLIAN HIEROGLYPH A476;Lo;0;L;;;;;N;;;;;
+14614;ANATOLIAN HIEROGLYPH A477;Lo;0;L;;;;;N;;;;;
+14615;ANATOLIAN HIEROGLYPH A478;Lo;0;L;;;;;N;;;;;
+14616;ANATOLIAN HIEROGLYPH A479;Lo;0;L;;;;;N;;;;;
+14617;ANATOLIAN HIEROGLYPH A480;Lo;0;L;;;;;N;;;;;
+14618;ANATOLIAN HIEROGLYPH A481;Lo;0;L;;;;;N;;;;;
+14619;ANATOLIAN HIEROGLYPH A482;Lo;0;L;;;;;N;;;;;
+1461A;ANATOLIAN HIEROGLYPH A483;Lo;0;L;;;;;N;;;;;
+1461B;ANATOLIAN HIEROGLYPH A484;Lo;0;L;;;;;N;;;;;
+1461C;ANATOLIAN HIEROGLYPH A485;Lo;0;L;;;;;N;;;;;
+1461D;ANATOLIAN HIEROGLYPH A486;Lo;0;L;;;;;N;;;;;
+1461E;ANATOLIAN HIEROGLYPH A487;Lo;0;L;;;;;N;;;;;
+1461F;ANATOLIAN HIEROGLYPH A488;Lo;0;L;;;;;N;;;;;
+14620;ANATOLIAN HIEROGLYPH A489;Lo;0;L;;;;;N;;;;;
+14621;ANATOLIAN HIEROGLYPH A490;Lo;0;L;;;;;N;;;;;
+14622;ANATOLIAN HIEROGLYPH A491;Lo;0;L;;;;;N;;;;;
+14623;ANATOLIAN HIEROGLYPH A492;Lo;0;L;;;;;N;;;;;
+14624;ANATOLIAN HIEROGLYPH A493;Lo;0;L;;;;;N;;;;;
+14625;ANATOLIAN HIEROGLYPH A494;Lo;0;L;;;;;N;;;;;
+14626;ANATOLIAN HIEROGLYPH A495;Lo;0;L;;;;;N;;;;;
+14627;ANATOLIAN HIEROGLYPH A496;Lo;0;L;;;;;N;;;;;
+14628;ANATOLIAN HIEROGLYPH A497;Lo;0;L;;;;;N;;;;;
+14629;ANATOLIAN HIEROGLYPH A501;Lo;0;L;;;;;N;;;;;
+1462A;ANATOLIAN HIEROGLYPH A502;Lo;0;L;;;;;N;;;;;
+1462B;ANATOLIAN HIEROGLYPH A503;Lo;0;L;;;;;N;;;;;
+1462C;ANATOLIAN HIEROGLYPH A504;Lo;0;L;;;;;N;;;;;
+1462D;ANATOLIAN HIEROGLYPH A505;Lo;0;L;;;;;N;;;;;
+1462E;ANATOLIAN HIEROGLYPH A506;Lo;0;L;;;;;N;;;;;
+1462F;ANATOLIAN HIEROGLYPH A507;Lo;0;L;;;;;N;;;;;
+14630;ANATOLIAN HIEROGLYPH A508;Lo;0;L;;;;;N;;;;;
+14631;ANATOLIAN HIEROGLYPH A509;Lo;0;L;;;;;N;;;;;
+14632;ANATOLIAN HIEROGLYPH A510;Lo;0;L;;;;;N;;;;;
+14633;ANATOLIAN HIEROGLYPH A511;Lo;0;L;;;;;N;;;;;
+14634;ANATOLIAN HIEROGLYPH A512;Lo;0;L;;;;;N;;;;;
+14635;ANATOLIAN HIEROGLYPH A513;Lo;0;L;;;;;N;;;;;
+14636;ANATOLIAN HIEROGLYPH A514;Lo;0;L;;;;;N;;;;;
+14637;ANATOLIAN HIEROGLYPH A515;Lo;0;L;;;;;N;;;;;
+14638;ANATOLIAN HIEROGLYPH A516;Lo;0;L;;;;;N;;;;;
+14639;ANATOLIAN HIEROGLYPH A517;Lo;0;L;;;;;N;;;;;
+1463A;ANATOLIAN HIEROGLYPH A518;Lo;0;L;;;;;N;;;;;
+1463B;ANATOLIAN HIEROGLYPH A519;Lo;0;L;;;;;N;;;;;
+1463C;ANATOLIAN HIEROGLYPH A520;Lo;0;L;;;;;N;;;;;
+1463D;ANATOLIAN HIEROGLYPH A521;Lo;0;L;;;;;N;;;;;
+1463E;ANATOLIAN HIEROGLYPH A522;Lo;0;L;;;;;N;;;;;
+1463F;ANATOLIAN HIEROGLYPH A523;Lo;0;L;;;;;N;;;;;
+14640;ANATOLIAN HIEROGLYPH A524;Lo;0;L;;;;;N;;;;;
+14641;ANATOLIAN HIEROGLYPH A525;Lo;0;L;;;;;N;;;;;
+14642;ANATOLIAN HIEROGLYPH A526;Lo;0;L;;;;;N;;;;;
+14643;ANATOLIAN HIEROGLYPH A527;Lo;0;L;;;;;N;;;;;
+14644;ANATOLIAN HIEROGLYPH A528;Lo;0;L;;;;;N;;;;;
+14645;ANATOLIAN HIEROGLYPH A529;Lo;0;L;;;;;N;;;;;
+14646;ANATOLIAN HIEROGLYPH A530;Lo;0;L;;;;;N;;;;;
 16800;BAMUM LETTER PHASE-A NGKUE MFON;Lo;0;L;;;;;N;;;;;
 16801;BAMUM LETTER PHASE-A GBIEE FON;Lo;0;L;;;;;N;;;;;
 16802;BAMUM LETTER PHASE-A PON MFON PIPAEMGBIEE;Lo;0;L;;;;;N;;;;;
@@ -23080,6 +24300,17 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;;
 1D1DB;MUSICAL SYMBOL SCANDICUS FLEXUS;So;0;L;;;;;N;;;;;
 1D1DC;MUSICAL SYMBOL TORCULUS RESUPINUS;So;0;L;;;;;N;;;;;
 1D1DD;MUSICAL SYMBOL PES SUBPUNCTIS;So;0;L;;;;;N;;;;;
+1D1DE;MUSICAL SYMBOL KIEVAN C CLEF;So;0;L;;;;;N;;;;;
+1D1DF;MUSICAL SYMBOL KIEVAN END OF PIECE;So;0;L;;;;;N;;;;;
+1D1E0;MUSICAL SYMBOL KIEVAN FINAL NOTE;So;0;L;;;;;N;;;;;
+1D1E1;MUSICAL SYMBOL KIEVAN RECITATIVE MARK;So;0;L;;;;;N;;;;;
+1D1E2;MUSICAL SYMBOL KIEVAN WHOLE NOTE;So;0;L;;;;;N;;;;;
+1D1E3;MUSICAL SYMBOL KIEVAN HALF NOTE;So;0;L;;;;;N;;;;;
+1D1E4;MUSICAL SYMBOL KIEVAN QUARTER NOTE STEM DOWN;So;0;L;;;;;N;;;;;
+1D1E5;MUSICAL SYMBOL KIEVAN QUARTER NOTE STEM UP;So;0;L;;;;;N;;;;;
+1D1E6;MUSICAL SYMBOL KIEVAN EIGHTH NOTE STEM DOWN;So;0;L;;;;;N;;;;;
+1D1E7;MUSICAL SYMBOL KIEVAN EIGHTH NOTE STEM UP;So;0;L;;;;;N;;;;;
+1D1E8;MUSICAL SYMBOL KIEVAN FLAT SIGN;So;0;L;;;;;N;;;;;
 1D200;GREEK VOCAL NOTATION SYMBOL-1;So;0;ON;;;;;N;;;;;
 1D201;GREEK VOCAL NOTATION SYMBOL-2;So;0;ON;;;;;N;;;;;
 1D202;GREEK VOCAL NOTATION SYMBOL-3;So;0;ON;;;;;N;;;;;
@@ -24251,6 +25482,678 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;;
 1D7FD;MATHEMATICAL MONOSPACE DIGIT SEVEN;Nd;0;EN;<font> 0037;7;7;7;N;;;;;
 1D7FE;MATHEMATICAL MONOSPACE DIGIT EIGHT;Nd;0;EN;<font> 0038;8;8;8;N;;;;;
 1D7FF;MATHEMATICAL MONOSPACE DIGIT NINE;Nd;0;EN;<font> 0039;9;9;9;N;;;;;
+1D800;SIGNWRITING HAND-FIST INDEX;So;0;L;;;;;N;;;;;
+1D801;SIGNWRITING HAND-CIRCLE INDEX;So;0;L;;;;;N;;;;;
+1D802;SIGNWRITING HAND-CUP INDEX;So;0;L;;;;;N;;;;;
+1D803;SIGNWRITING HAND-OVAL INDEX;So;0;L;;;;;N;;;;;
+1D804;SIGNWRITING HAND-HINGE INDEX;So;0;L;;;;;N;;;;;
+1D805;SIGNWRITING HAND-ANGLE INDEX;So;0;L;;;;;N;;;;;
+1D806;SIGNWRITING HAND-FIST INDEX BENT;So;0;L;;;;;N;;;;;
+1D807;SIGNWRITING HAND-CIRCLE INDEX BENT;So;0;L;;;;;N;;;;;
+1D808;SIGNWRITING HAND-FIST THUMB UNDER INDEX BENT;So;0;L;;;;;N;;;;;
+1D809;SIGNWRITING HAND-FIST INDEX RAISED KNUCKLE;So;0;L;;;;;N;;;;;
+1D80A;SIGNWRITING HAND-FIST INDEX CUPPED;So;0;L;;;;;N;;;;;
+1D80B;SIGNWRITING HAND-FIST INDEX HINGED;So;0;L;;;;;N;;;;;
+1D80C;SIGNWRITING HAND-FIST INDEX HINGED LOW;So;0;L;;;;;N;;;;;
+1D80D;SIGNWRITING HAND-CIRCLE INDEX HINGE;So;0;L;;;;;N;;;;;
+1D80E;SIGNWRITING HAND-FIST INDEX MIDDLE;So;0;L;;;;;N;;;;;
+1D80F;SIGNWRITING HAND-CIRCLE INDEX MIDDLE;So;0;L;;;;;N;;;;;
+1D810;SIGNWRITING HAND-FIST INDEX MIDDLE BENT;So;0;L;;;;;N;;;;;
+1D811;SIGNWRITING HAND-FIST INDEX MIDDLE RAISED KNUCKLES;So;0;L;;;;;N;;;;;
+1D812;SIGNWRITING HAND-FIST INDEX MIDDLE HINGED;So;0;L;;;;;N;;;;;
+1D813;SIGNWRITING HAND-FIST INDEX UP MIDDLE HINGED;So;0;L;;;;;N;;;;;
+1D814;SIGNWRITING HAND-FIST INDEX HINGED MIDDLE UP;So;0;L;;;;;N;;;;;
+1D815;SIGNWRITING HAND-FIST INDEX MIDDLE CONJOINED;So;0;L;;;;;N;;;;;
+1D816;SIGNWRITING HAND-FIST INDEX MIDDLE CONJOINED INDEX BENT;So;0;L;;;;;N;;;;;
+1D817;SIGNWRITING HAND-FIST INDEX MIDDLE CONJOINED MIDDLE 
BENT;So;0;L;;;;;N;;;;;
+1D818;SIGNWRITING HAND-FIST INDEX MIDDLE CONJOINED CUPPED;So;0;L;;;;;N;;;;;
+1D819;SIGNWRITING HAND-FIST INDEX MIDDLE CONJOINED HINGED;So;0;L;;;;;N;;;;;
+1D81A;SIGNWRITING HAND-FIST INDEX MIDDLE CROSSED;So;0;L;;;;;N;;;;;
+1D81B;SIGNWRITING HAND-CIRCLE INDEX MIDDLE CROSSED;So;0;L;;;;;N;;;;;
+1D81C;SIGNWRITING HAND-FIST MIDDLE BENT OVER INDEX;So;0;L;;;;;N;;;;;
+1D81D;SIGNWRITING HAND-FIST INDEX BENT OVER MIDDLE;So;0;L;;;;;N;;;;;
+1D81E;SIGNWRITING HAND-FIST INDEX MIDDLE THUMB;So;0;L;;;;;N;;;;;
+1D81F;SIGNWRITING HAND-CIRCLE INDEX MIDDLE THUMB;So;0;L;;;;;N;;;;;
+1D820;SIGNWRITING HAND-FIST INDEX MIDDLE STRAIGHT THUMB BENT;So;0;L;;;;;N;;;;;
+1D821;SIGNWRITING HAND-FIST INDEX MIDDLE BENT THUMB STRAIGHT;So;0;L;;;;;N;;;;;
+1D822;SIGNWRITING HAND-FIST INDEX MIDDLE THUMB BENT;So;0;L;;;;;N;;;;;
+1D823;SIGNWRITING HAND-FIST INDEX MIDDLE HINGED SPREAD THUMB 
SIDE;So;0;L;;;;;N;;;;;
+1D824;SIGNWRITING HAND-FIST INDEX UP MIDDLE HINGED THUMB SIDE;So;0;L;;;;;N;;;;;
+1D825;SIGNWRITING HAND-FIST INDEX UP MIDDLE HINGED THUMB 
CONJOINED;So;0;L;;;;;N;;;;;
+1D826;SIGNWRITING HAND-FIST INDEX HINGED MIDDLE UP THUMB SIDE;So;0;L;;;;;N;;;;;
+1D827;SIGNWRITING HAND-FIST INDEX MIDDLE UP SPREAD THUMB 
FORWARD;So;0;L;;;;;N;;;;;
+1D828;SIGNWRITING HAND-FIST INDEX MIDDLE THUMB CUPPED;So;0;L;;;;;N;;;;;
+1D829;SIGNWRITING HAND-FIST INDEX MIDDLE THUMB CIRCLED;So;0;L;;;;;N;;;;;
+1D82A;SIGNWRITING HAND-FIST INDEX MIDDLE THUMB HOOKED;So;0;L;;;;;N;;;;;
+1D82B;SIGNWRITING HAND-FIST INDEX MIDDLE THUMB HINGED;So;0;L;;;;;N;;;;;
+1D82C;SIGNWRITING HAND-FIST THUMB BETWEEN INDEX MIDDLE 
STRAIGHT;So;0;L;;;;;N;;;;;
+1D82D;SIGNWRITING HAND-FIST INDEX MIDDLE CONJOINED THUMB SIDE;So;0;L;;;;;N;;;;;
+1D82E;SIGNWRITING HAND-FIST INDEX MIDDLE CONJOINED THUMB SIDE 
CONJOINED;So;0;L;;;;;N;;;;;
+1D82F;SIGNWRITING HAND-FIST INDEX MIDDLE CONJOINED THUMB SIDE 
BENT;So;0;L;;;;;N;;;;;
+1D830;SIGNWRITING HAND-FIST MIDDLE THUMB HOOKED INDEX UP;So;0;L;;;;;N;;;;;
+1D831;SIGNWRITING HAND-FIST INDEX THUMB HOOKED MIDDLE UP;So;0;L;;;;;N;;;;;
+1D832;SIGNWRITING HAND-FIST INDEX MIDDLE CONJOINED HINGED THUMB 
SIDE;So;0;L;;;;;N;;;;;
+1D833;SIGNWRITING HAND-FIST INDEX MIDDLE CROSSED THUMB SIDE;So;0;L;;;;;N;;;;;
+1D834;SIGNWRITING HAND-FIST INDEX MIDDLE CONJOINED THUMB 
FORWARD;So;0;L;;;;;N;;;;;
+1D835;SIGNWRITING HAND-FIST INDEX MIDDLE CONJOINED CUPPED THUMB 
FORWARD;So;0;L;;;;;N;;;;;
+1D836;SIGNWRITING HAND-FIST MIDDLE THUMB CUPPED INDEX UP;So;0;L;;;;;N;;;;;
+1D837;SIGNWRITING HAND-FIST INDEX THUMB CUPPED MIDDLE UP;So;0;L;;;;;N;;;;;
+1D838;SIGNWRITING HAND-FIST MIDDLE THUMB CIRCLED INDEX UP;So;0;L;;;;;N;;;;;
+1D839;SIGNWRITING HAND-FIST MIDDLE THUMB CIRCLED INDEX HINGED;So;0;L;;;;;N;;;;;
+1D83A;SIGNWRITING HAND-FIST INDEX THUMB ANGLED OUT MIDDLE UP;So;0;L;;;;;N;;;;;
+1D83B;SIGNWRITING HAND-FIST INDEX THUMB ANGLED IN MIDDLE UP;So;0;L;;;;;N;;;;;
+1D83C;SIGNWRITING HAND-FIST INDEX THUMB CIRCLED MIDDLE UP;So;0;L;;;;;N;;;;;
+1D83D;SIGNWRITING HAND-FIST INDEX MIDDLE THUMB CONJOINED 
HINGED;So;0;L;;;;;N;;;;;
+1D83E;SIGNWRITING HAND-FIST INDEX MIDDLE THUMB ANGLED OUT;So;0;L;;;;;N;;;;;
+1D83F;SIGNWRITING HAND-FIST INDEX MIDDLE THUMB ANGLED;So;0;L;;;;;N;;;;;
+1D840;SIGNWRITING HAND-FIST MIDDLE THUMB ANGLED OUT INDEX UP;So;0;L;;;;;N;;;;;
+1D841;SIGNWRITING HAND-FIST MIDDLE THUMB ANGLED OUT INDEX 
CROSSED;So;0;L;;;;;N;;;;;
+1D842;SIGNWRITING HAND-FIST MIDDLE THUMB ANGLED INDEX UP;So;0;L;;;;;N;;;;;
+1D843;SIGNWRITING HAND-FIST INDEX THUMB HOOKED MIDDLE HINGED;So;0;L;;;;;N;;;;;
+1D844;SIGNWRITING HAND-FLAT FOUR FINGERS;So;0;L;;;;;N;;;;;
+1D845;SIGNWRITING HAND-FLAT FOUR FINGERS BENT;So;0;L;;;;;N;;;;;
+1D846;SIGNWRITING HAND-FLAT FOUR FINGERS HINGED;So;0;L;;;;;N;;;;;
+1D847;SIGNWRITING HAND-FLAT FOUR FINGERS CONJOINED;So;0;L;;;;;N;;;;;
+1D848;SIGNWRITING HAND-FLAT FOUR FINGERS CONJOINED SPLIT;So;0;L;;;;;N;;;;;
+1D849;SIGNWRITING HAND-CLAW FOUR FINGERS CONJOINED;So;0;L;;;;;N;;;;;
+1D84A;SIGNWRITING HAND-FIST FOUR FINGERS CONJOINED BENT;So;0;L;;;;;N;;;;;
+1D84B;SIGNWRITING HAND-HINGE FOUR FINGERS CONJOINED;So;0;L;;;;;N;;;;;
+1D84C;SIGNWRITING HAND-FLAT FIVE FINGERS SPREAD;So;0;L;;;;;N;;;;;
+1D84D;SIGNWRITING HAND-FLAT HEEL FIVE FINGERS SPREAD;So;0;L;;;;;N;;;;;
+1D84E;SIGNWRITING HAND-FLAT FIVE FINGERS SPREAD FOUR BENT;So;0;L;;;;;N;;;;;
+1D84F;SIGNWRITING HAND-FLAT HEEL FIVE FINGERS SPREAD FOUR 
BENT;So;0;L;;;;;N;;;;;
+1D850;SIGNWRITING HAND-FLAT FIVE FINGERS SPREAD BENT;So;0;L;;;;;N;;;;;
+1D851;SIGNWRITING HAND-FLAT HEEL FIVE FINGERS SPREAD BENT;So;0;L;;;;;N;;;;;
+1D852;SIGNWRITING HAND-FLAT FIVE FINGERS SPREAD THUMB FORWARD;So;0;L;;;;;N;;;;;
+1D853;SIGNWRITING HAND-CUP FIVE FINGERS SPREAD;So;0;L;;;;;N;;;;;
+1D854;SIGNWRITING HAND-CUP FIVE FINGERS SPREAD OPEN;So;0;L;;;;;N;;;;;
+1D855;SIGNWRITING HAND-HINGE FIVE FINGERS SPREAD OPEN;So;0;L;;;;;N;;;;;
+1D856;SIGNWRITING HAND-OVAL FIVE FINGERS SPREAD;So;0;L;;;;;N;;;;;
+1D857;SIGNWRITING HAND-FLAT FIVE FINGERS SPREAD HINGED;So;0;L;;;;;N;;;;;
+1D858;SIGNWRITING HAND-FLAT FIVE FINGERS SPREAD HINGED THUMB 
SIDE;So;0;L;;;;;N;;;;;
+1D859;SIGNWRITING HAND-FLAT FIVE FINGERS SPREAD HINGED NO 
THUMB;So;0;L;;;;;N;;;;;
+1D85A;SIGNWRITING HAND-FLAT;So;0;L;;;;;N;;;;;
+1D85B;SIGNWRITING HAND-FLAT BETWEEN PALM FACINGS;So;0;L;;;;;N;;;;;
+1D85C;SIGNWRITING HAND-FLAT HEEL;So;0;L;;;;;N;;;;;
+1D85D;SIGNWRITING HAND-FLAT THUMB SIDE;So;0;L;;;;;N;;;;;
+1D85E;SIGNWRITING HAND-FLAT HEEL THUMB SIDE;So;0;L;;;;;N;;;;;
+1D85F;SIGNWRITING HAND-FLAT THUMB BENT;So;0;L;;;;;N;;;;;
+1D860;SIGNWRITING HAND-FLAT THUMB FORWARD;So;0;L;;;;;N;;;;;
+1D861;SIGNWRITING HAND-FLAT SPLIT INDEX THUMB SIDE;So;0;L;;;;;N;;;;;
+1D862;SIGNWRITING HAND-FLAT SPLIT CENTRE;So;0;L;;;;;N;;;;;
+1D863;SIGNWRITING HAND-FLAT SPLIT CENTRE THUMB SIDE;So;0;L;;;;;N;;;;;
+1D864;SIGNWRITING HAND-FLAT SPLIT CENTRE THUMB SIDE BENT;So;0;L;;;;;N;;;;;
+1D865;SIGNWRITING HAND-FLAT SPLIT LITTLE;So;0;L;;;;;N;;;;;
+1D866;SIGNWRITING HAND-CLAW;So;0;L;;;;;N;;;;;
+1D867;SIGNWRITING HAND-CLAW THUMB SIDE;So;0;L;;;;;N;;;;;
+1D868;SIGNWRITING HAND-CLAW NO THUMB;So;0;L;;;;;N;;;;;
+1D869;SIGNWRITING HAND-CLAW THUMB FORWARD;So;0;L;;;;;N;;;;;
+1D86A;SIGNWRITING HAND-HOOK CURLICUE;So;0;L;;;;;N;;;;;
+1D86B;SIGNWRITING HAND-HOOK;So;0;L;;;;;N;;;;;
+1D86C;SIGNWRITING HAND-CUP OPEN;So;0;L;;;;;N;;;;;
+1D86D;SIGNWRITING HAND-CUP;So;0;L;;;;;N;;;;;
+1D86E;SIGNWRITING HAND-CUP OPEN THUMB SIDE;So;0;L;;;;;N;;;;;
+1D86F;SIGNWRITING HAND-CUP THUMB SIDE;So;0;L;;;;;N;;;;;
+1D870;SIGNWRITING HAND-CUP OPEN NO THUMB;So;0;L;;;;;N;;;;;
+1D871;SIGNWRITING HAND-CUP NO THUMB;So;0;L;;;;;N;;;;;
+1D872;SIGNWRITING HAND-CUP OPEN THUMB FORWARD;So;0;L;;;;;N;;;;;
+1D873;SIGNWRITING HAND-CUP THUMB FORWARD;So;0;L;;;;;N;;;;;
+1D874;SIGNWRITING HAND-CURLICUE OPEN;So;0;L;;;;;N;;;;;
+1D875;SIGNWRITING HAND-CURLICUE;So;0;L;;;;;N;;;;;
+1D876;SIGNWRITING HAND-CIRCLE;So;0;L;;;;;N;;;;;
+1D877;SIGNWRITING HAND-OVAL;So;0;L;;;;;N;;;;;
+1D878;SIGNWRITING HAND-OVAL THUMB SIDE;So;0;L;;;;;N;;;;;
+1D879;SIGNWRITING HAND-OVAL NO THUMB;So;0;L;;;;;N;;;;;
+1D87A;SIGNWRITING HAND-OVAL THUMB FORWARD;So;0;L;;;;;N;;;;;
+1D87B;SIGNWRITING HAND-HINGE OPEN;So;0;L;;;;;N;;;;;
+1D87C;SIGNWRITING HAND-HINGE OPEN THUMB FORWARD;So;0;L;;;;;N;;;;;
+1D87D;SIGNWRITING HAND-HINGE;So;0;L;;;;;N;;;;;
+1D87E;SIGNWRITING HAND-HINGE SMALL;So;0;L;;;;;N;;;;;
+1D87F;SIGNWRITING HAND-HINGE OPEN THUMB SIDE;So;0;L;;;;;N;;;;;
+1D880;SIGNWRITING HAND-HINGE THUMB SIDE;So;0;L;;;;;N;;;;;
+1D881;SIGNWRITING HAND-HINGE OPEN NO THUMB;So;0;L;;;;;N;;;;;
+1D882;SIGNWRITING HAND-HINGE NO THUMB;So;0;L;;;;;N;;;;;
+1D883;SIGNWRITING HAND-HINGE THUMB SIDE TOUCHING INDEX;So;0;L;;;;;N;;;;;
+1D884;SIGNWRITING HAND-HINGE THUMB BETWEEN MIDDLE RING;So;0;L;;;;;N;;;;;
+1D885;SIGNWRITING HAND-ANGLE;So;0;L;;;;;N;;;;;
+1D886;SIGNWRITING HAND-FIST INDEX MIDDLE RING;So;0;L;;;;;N;;;;;
+1D887;SIGNWRITING HAND-CIRCLE INDEX MIDDLE RING;So;0;L;;;;;N;;;;;
+1D888;SIGNWRITING HAND-HINGE INDEX MIDDLE RING;So;0;L;;;;;N;;;;;
+1D889;SIGNWRITING HAND-ANGLE INDEX MIDDLE RING;So;0;L;;;;;N;;;;;
+1D88A;SIGNWRITING HAND-HINGE LITTLE;So;0;L;;;;;N;;;;;
+1D88B;SIGNWRITING HAND-FIST INDEX MIDDLE RING BENT;So;0;L;;;;;N;;;;;
+1D88C;SIGNWRITING HAND-FIST INDEX MIDDLE RING CONJOINED;So;0;L;;;;;N;;;;;
+1D88D;SIGNWRITING HAND-HINGE INDEX MIDDLE RING CONJOINED;So;0;L;;;;;N;;;;;
+1D88E;SIGNWRITING HAND-FIST LITTLE DOWN;So;0;L;;;;;N;;;;;
+1D88F;SIGNWRITING HAND-FIST LITTLE DOWN RIPPLE STRAIGHT;So;0;L;;;;;N;;;;;
+1D890;SIGNWRITING HAND-FIST LITTLE DOWN RIPPLE CURVED;So;0;L;;;;;N;;;;;
+1D891;SIGNWRITING HAND-FIST LITTLE DOWN OTHERS CIRCLED;So;0;L;;;;;N;;;;;
+1D892;SIGNWRITING HAND-FIST LITTLE UP;So;0;L;;;;;N;;;;;
+1D893;SIGNWRITING HAND-FIST THUMB UNDER LITTLE UP;So;0;L;;;;;N;;;;;
+1D894;SIGNWRITING HAND-CIRCLE LITTLE UP;So;0;L;;;;;N;;;;;
+1D895;SIGNWRITING HAND-OVAL LITTLE UP;So;0;L;;;;;N;;;;;
+1D896;SIGNWRITING HAND-ANGLE LITTLE UP;So;0;L;;;;;N;;;;;
+1D897;SIGNWRITING HAND-FIST LITTLE RAISED KNUCKLE;So;0;L;;;;;N;;;;;
+1D898;SIGNWRITING HAND-FIST LITTLE BENT;So;0;L;;;;;N;;;;;
+1D899;SIGNWRITING HAND-FIST LITTLE TOUCHES THUMB;So;0;L;;;;;N;;;;;
+1D89A;SIGNWRITING HAND-FIST LITTLE THUMB;So;0;L;;;;;N;;;;;
+1D89B;SIGNWRITING HAND-HINGE LITTLE THUMB;So;0;L;;;;;N;;;;;
+1D89C;SIGNWRITING HAND-FIST LITTLE INDEX THUMB;So;0;L;;;;;N;;;;;
+1D89D;SIGNWRITING HAND-HINGE LITTLE INDEX THUMB;So;0;L;;;;;N;;;;;
+1D89E;SIGNWRITING HAND-ANGLE LITTLE INDEX THUMB INDEX THUMB 
OUT;So;0;L;;;;;N;;;;;
+1D89F;SIGNWRITING HAND-ANGLE LITTLE INDEX THUMB INDEX THUMB;So;0;L;;;;;N;;;;;
+1D8A0;SIGNWRITING HAND-FIST LITTLE INDEX;So;0;L;;;;;N;;;;;
+1D8A1;SIGNWRITING HAND-CIRCLE LITTLE INDEX;So;0;L;;;;;N;;;;;
+1D8A2;SIGNWRITING HAND-HINGE LITTLE INDEX;So;0;L;;;;;N;;;;;
+1D8A3;SIGNWRITING HAND-ANGLE LITTLE INDEX;So;0;L;;;;;N;;;;;
+1D8A4;SIGNWRITING HAND-FIST INDEX MIDDLE LITTLE;So;0;L;;;;;N;;;;;
+1D8A5;SIGNWRITING HAND-CIRCLE INDEX MIDDLE LITTLE;So;0;L;;;;;N;;;;;
+1D8A6;SIGNWRITING HAND-HINGE INDEX MIDDLE LITTLE;So;0;L;;;;;N;;;;;
+1D8A7;SIGNWRITING HAND-HINGE RING;So;0;L;;;;;N;;;;;
+1D8A8;SIGNWRITING HAND-ANGLE INDEX MIDDLE LITTLE;So;0;L;;;;;N;;;;;
+1D8A9;SIGNWRITING HAND-FIST INDEX MIDDLE CROSS LITTLE;So;0;L;;;;;N;;;;;
+1D8AA;SIGNWRITING HAND-CIRCLE INDEX MIDDLE CROSS LITTLE;So;0;L;;;;;N;;;;;
+1D8AB;SIGNWRITING HAND-FIST RING DOWN;So;0;L;;;;;N;;;;;
+1D8AC;SIGNWRITING HAND-HINGE RING DOWN INDEX THUMB HOOK 
MIDDLE;So;0;L;;;;;N;;;;;
+1D8AD;SIGNWRITING HAND-ANGLE RING DOWN MIDDLE THUMB INDEX 
CROSS;So;0;L;;;;;N;;;;;
+1D8AE;SIGNWRITING HAND-FIST RING UP;So;0;L;;;;;N;;;;;
+1D8AF;SIGNWRITING HAND-FIST RING RAISED KNUCKLE;So;0;L;;;;;N;;;;;
+1D8B0;SIGNWRITING HAND-FIST RING LITTLE;So;0;L;;;;;N;;;;;
+1D8B1;SIGNWRITING HAND-CIRCLE RING LITTLE;So;0;L;;;;;N;;;;;
+1D8B2;SIGNWRITING HAND-OVAL RING LITTLE;So;0;L;;;;;N;;;;;
+1D8B3;SIGNWRITING HAND-ANGLE RING LITTLE;So;0;L;;;;;N;;;;;
+1D8B4;SIGNWRITING HAND-FIST RING MIDDLE;So;0;L;;;;;N;;;;;
+1D8B5;SIGNWRITING HAND-FIST RING MIDDLE CONJOINED;So;0;L;;;;;N;;;;;
+1D8B6;SIGNWRITING HAND-FIST RING MIDDLE RAISED KNUCKLES;So;0;L;;;;;N;;;;;
+1D8B7;SIGNWRITING HAND-FIST RING INDEX;So;0;L;;;;;N;;;;;
+1D8B8;SIGNWRITING HAND-FIST RING THUMB;So;0;L;;;;;N;;;;;
+1D8B9;SIGNWRITING HAND-HOOK RING THUMB;So;0;L;;;;;N;;;;;
+1D8BA;SIGNWRITING HAND-FIST INDEX RING LITTLE;So;0;L;;;;;N;;;;;
+1D8BB;SIGNWRITING HAND-CIRCLE INDEX RING LITTLE;So;0;L;;;;;N;;;;;
+1D8BC;SIGNWRITING HAND-CURLICUE INDEX RING LITTLE ON;So;0;L;;;;;N;;;;;
+1D8BD;SIGNWRITING HAND-HOOK INDEX RING LITTLE OUT;So;0;L;;;;;N;;;;;
+1D8BE;SIGNWRITING HAND-HOOK INDEX RING LITTLE IN;So;0;L;;;;;N;;;;;
+1D8BF;SIGNWRITING HAND-HOOK INDEX RING LITTLE UNDER;So;0;L;;;;;N;;;;;
+1D8C0;SIGNWRITING HAND-CUP INDEX RING LITTLE;So;0;L;;;;;N;;;;;
+1D8C1;SIGNWRITING HAND-HINGE INDEX RING LITTLE;So;0;L;;;;;N;;;;;
+1D8C2;SIGNWRITING HAND-ANGLE INDEX RING LITTLE OUT;So;0;L;;;;;N;;;;;
+1D8C3;SIGNWRITING HAND-ANGLE INDEX RING LITTLE;So;0;L;;;;;N;;;;;
+1D8C4;SIGNWRITING HAND-FIST MIDDLE DOWN;So;0;L;;;;;N;;;;;
+1D8C5;SIGNWRITING HAND-HINGE MIDDLE;So;0;L;;;;;N;;;;;
+1D8C6;SIGNWRITING HAND-FIST MIDDLE UP;So;0;L;;;;;N;;;;;
+1D8C7;SIGNWRITING HAND-CIRCLE MIDDLE UP;So;0;L;;;;;N;;;;;
+1D8C8;SIGNWRITING HAND-FIST MIDDLE RAISED KNUCKLE;So;0;L;;;;;N;;;;;
+1D8C9;SIGNWRITING HAND-FIST MIDDLE UP THUMB SIDE;So;0;L;;;;;N;;;;;
+1D8CA;SIGNWRITING HAND-HOOK MIDDLE THUMB;So;0;L;;;;;N;;;;;
+1D8CB;SIGNWRITING HAND-FIST MIDDLE THUMB LITTLE;So;0;L;;;;;N;;;;;
+1D8CC;SIGNWRITING HAND-FIST MIDDLE LITTLE;So;0;L;;;;;N;;;;;
+1D8CD;SIGNWRITING HAND-FIST MIDDLE RING LITTLE;So;0;L;;;;;N;;;;;
+1D8CE;SIGNWRITING HAND-CIRCLE MIDDLE RING LITTLE;So;0;L;;;;;N;;;;;
+1D8CF;SIGNWRITING HAND-CURLICUE MIDDLE RING LITTLE ON;So;0;L;;;;;N;;;;;
+1D8D0;SIGNWRITING HAND-CUP MIDDLE RING LITTLE;So;0;L;;;;;N;;;;;
+1D8D1;SIGNWRITING HAND-HINGE MIDDLE RING LITTLE;So;0;L;;;;;N;;;;;
+1D8D2;SIGNWRITING HAND-ANGLE MIDDLE RING LITTLE OUT;So;0;L;;;;;N;;;;;
+1D8D3;SIGNWRITING HAND-ANGLE MIDDLE RING LITTLE IN;So;0;L;;;;;N;;;;;
+1D8D4;SIGNWRITING HAND-ANGLE MIDDLE RING LITTLE;So;0;L;;;;;N;;;;;
+1D8D5;SIGNWRITING HAND-CIRCLE MIDDLE RING LITTLE BENT;So;0;L;;;;;N;;;;;
+1D8D6;SIGNWRITING HAND-CLAW MIDDLE RING LITTLE CONJOINED;So;0;L;;;;;N;;;;;
+1D8D7;SIGNWRITING HAND-CLAW MIDDLE RING LITTLE CONJOINED SIDE;So;0;L;;;;;N;;;;;
+1D8D8;SIGNWRITING HAND-HOOK MIDDLE RING LITTLE CONJOINED OUT;So;0;L;;;;;N;;;;;
+1D8D9;SIGNWRITING HAND-HOOK MIDDLE RING LITTLE CONJOINED IN;So;0;L;;;;;N;;;;;
+1D8DA;SIGNWRITING HAND-HOOK MIDDLE RING LITTLE CONJOINED;So;0;L;;;;;N;;;;;
+1D8DB;SIGNWRITING HAND-HINGE INDEX HINGED;So;0;L;;;;;N;;;;;
+1D8DC;SIGNWRITING HAND-FIST INDEX THUMB SIDE;So;0;L;;;;;N;;;;;
+1D8DD;SIGNWRITING HAND-HINGE INDEX THUMB SIDE;So;0;L;;;;;N;;;;;
+1D8DE;SIGNWRITING HAND-FIST INDEX THUMB SIDE THUMB DIAGONAL;So;0;L;;;;;N;;;;;
+1D8DF;SIGNWRITING HAND-FIST INDEX THUMB SIDE THUMB CONJOINED;So;0;L;;;;;N;;;;;
+1D8E0;SIGNWRITING HAND-FIST INDEX THUMB SIDE THUMB BENT;So;0;L;;;;;N;;;;;
+1D8E1;SIGNWRITING HAND-FIST INDEX THUMB SIDE INDEX BENT;So;0;L;;;;;N;;;;;
+1D8E2;SIGNWRITING HAND-FIST INDEX THUMB SIDE BOTH BENT;So;0;L;;;;;N;;;;;
+1D8E3;SIGNWRITING HAND-FIST INDEX THUMB SIDE INDEX HINGE;So;0;L;;;;;N;;;;;
+1D8E4;SIGNWRITING HAND-FIST INDEX THUMB FORWARD INDEX 
STRAIGHT;So;0;L;;;;;N;;;;;
+1D8E5;SIGNWRITING HAND-FIST INDEX THUMB FORWARD INDEX BENT;So;0;L;;;;;N;;;;;
+1D8E6;SIGNWRITING HAND-FIST INDEX THUMB HOOK;So;0;L;;;;;N;;;;;
+1D8E7;SIGNWRITING HAND-FIST INDEX THUMB CURLICUE;So;0;L;;;;;N;;;;;
+1D8E8;SIGNWRITING HAND-FIST INDEX THUMB CURVE THUMB INSIDE;So;0;L;;;;;N;;;;;
+1D8E9;SIGNWRITING HAND-CLAW INDEX THUMB CURVE THUMB INSIDE;So;0;L;;;;;N;;;;;
+1D8EA;SIGNWRITING HAND-FIST INDEX THUMB CURVE THUMB UNDER;So;0;L;;;;;N;;;;;
+1D8EB;SIGNWRITING HAND-FIST INDEX THUMB CIRCLE;So;0;L;;;;;N;;;;;
+1D8EC;SIGNWRITING HAND-CUP INDEX THUMB;So;0;L;;;;;N;;;;;
+1D8ED;SIGNWRITING HAND-CUP INDEX THUMB OPEN;So;0;L;;;;;N;;;;;
+1D8EE;SIGNWRITING HAND-HINGE INDEX THUMB OPEN;So;0;L;;;;;N;;;;;
+1D8EF;SIGNWRITING HAND-HINGE INDEX THUMB LARGE;So;0;L;;;;;N;;;;;
+1D8F0;SIGNWRITING HAND-HINGE INDEX THUMB;So;0;L;;;;;N;;;;;
+1D8F1;SIGNWRITING HAND-HINGE INDEX THUMB SMALL;So;0;L;;;;;N;;;;;
+1D8F2;SIGNWRITING HAND-ANGLE INDEX THUMB OUT;So;0;L;;;;;N;;;;;
+1D8F3;SIGNWRITING HAND-ANGLE INDEX THUMB IN;So;0;L;;;;;N;;;;;
+1D8F4;SIGNWRITING HAND-ANGLE INDEX THUMB;So;0;L;;;;;N;;;;;
+1D8F5;SIGNWRITING HAND-FIST THUMB;So;0;L;;;;;N;;;;;
+1D8F6;SIGNWRITING HAND-FIST THUMB HEEL;So;0;L;;;;;N;;;;;
+1D8F7;SIGNWRITING HAND-FIST THUMB SIDE DIAGONAL;So;0;L;;;;;N;;;;;
+1D8F8;SIGNWRITING HAND-FIST THUMB SIDE CONJOINED;So;0;L;;;;;N;;;;;
+1D8F9;SIGNWRITING HAND-FIST THUMB SIDE BENT;So;0;L;;;;;N;;;;;
+1D8FA;SIGNWRITING HAND-FIST THUMB FORWARD;So;0;L;;;;;N;;;;;
+1D8FB;SIGNWRITING HAND-FIST THUMB BETWEEN INDEX MIDDLE;So;0;L;;;;;N;;;;;
+1D8FC;SIGNWRITING HAND-FIST THUMB BETWEEN MIDDLE RING;So;0;L;;;;;N;;;;;
+1D8FD;SIGNWRITING HAND-FIST THUMB BETWEEN RING LITTLE;So;0;L;;;;;N;;;;;
+1D8FE;SIGNWRITING HAND-FIST THUMB UNDER TWO FINGERS;So;0;L;;;;;N;;;;;
+1D8FF;SIGNWRITING HAND-FIST THUMB OVER TWO FINGERS;So;0;L;;;;;N;;;;;
+1D900;SIGNWRITING HAND-FIST THUMB UNDER THREE FINGERS;So;0;L;;;;;N;;;;;
+1D901;SIGNWRITING HAND-FIST THUMB UNDER FOUR FINGERS;So;0;L;;;;;N;;;;;
+1D902;SIGNWRITING HAND-FIST THUMB OVER FOUR RAISED KNUCKLES;So;0;L;;;;;N;;;;;
+1D903;SIGNWRITING HAND-FIST;So;0;L;;;;;N;;;;;
+1D904;SIGNWRITING HAND-FIST HEEL;So;0;L;;;;;N;;;;;
+1D905;SIGNWRITING TOUCH SINGLE;So;0;L;;;;;N;;;;;
+1D906;SIGNWRITING TOUCH MULTIPLE;So;0;L;;;;;N;;;;;
+1D907;SIGNWRITING TOUCH BETWEEN;So;0;L;;;;;N;;;;;
+1D908;SIGNWRITING GRASP SINGLE;So;0;L;;;;;N;;;;;
+1D909;SIGNWRITING GRASP MULTIPLE;So;0;L;;;;;N;;;;;
+1D90A;SIGNWRITING GRASP BETWEEN;So;0;L;;;;;N;;;;;
+1D90B;SIGNWRITING STRIKE SINGLE;So;0;L;;;;;N;;;;;
+1D90C;SIGNWRITING STRIKE MULTIPLE;So;0;L;;;;;N;;;;;
+1D90D;SIGNWRITING STRIKE BETWEEN;So;0;L;;;;;N;;;;;
+1D90E;SIGNWRITING BRUSH SINGLE;So;0;L;;;;;N;;;;;
+1D90F;SIGNWRITING BRUSH MULTIPLE;So;0;L;;;;;N;;;;;
+1D910;SIGNWRITING BRUSH BETWEEN;So;0;L;;;;;N;;;;;
+1D911;SIGNWRITING RUB SINGLE;So;0;L;;;;;N;;;;;
+1D912;SIGNWRITING RUB MULTIPLE;So;0;L;;;;;N;;;;;
+1D913;SIGNWRITING RUB BETWEEN;So;0;L;;;;;N;;;;;
+1D914;SIGNWRITING SURFACE SYMBOLS;So;0;L;;;;;N;;;;;
+1D915;SIGNWRITING SURFACE BETWEEN;So;0;L;;;;;N;;;;;
+1D916;SIGNWRITING SQUEEZE LARGE SINGLE;So;0;L;;;;;N;;;;;
+1D917;SIGNWRITING SQUEEZE SMALL SINGLE;So;0;L;;;;;N;;;;;
+1D918;SIGNWRITING SQUEEZE LARGE MULTIPLE;So;0;L;;;;;N;;;;;
+1D919;SIGNWRITING SQUEEZE SMALL MULTIPLE;So;0;L;;;;;N;;;;;
+1D91A;SIGNWRITING SQUEEZE SEQUENTIAL;So;0;L;;;;;N;;;;;
+1D91B;SIGNWRITING FLICK LARGE SINGLE;So;0;L;;;;;N;;;;;
+1D91C;SIGNWRITING FLICK SMALL SINGLE;So;0;L;;;;;N;;;;;
+1D91D;SIGNWRITING FLICK LARGE MULTIPLE;So;0;L;;;;;N;;;;;
+1D91E;SIGNWRITING FLICK SMALL MULTIPLE;So;0;L;;;;;N;;;;;
+1D91F;SIGNWRITING FLICK SEQUENTIAL;So;0;L;;;;;N;;;;;
+1D920;SIGNWRITING SQUEEZE FLICK ALTERNATING;So;0;L;;;;;N;;;;;
+1D921;SIGNWRITING MOVEMENT-HINGE UP DOWN LARGE;So;0;L;;;;;N;;;;;
+1D922;SIGNWRITING MOVEMENT-HINGE UP DOWN SMALL;So;0;L;;;;;N;;;;;
+1D923;SIGNWRITING MOVEMENT-HINGE UP SEQUENTIAL;So;0;L;;;;;N;;;;;
+1D924;SIGNWRITING MOVEMENT-HINGE DOWN SEQUENTIAL;So;0;L;;;;;N;;;;;
+1D925;SIGNWRITING MOVEMENT-HINGE UP DOWN ALTERNATING LARGE;So;0;L;;;;;N;;;;;
+1D926;SIGNWRITING MOVEMENT-HINGE UP DOWN ALTERNATING SMALL;So;0;L;;;;;N;;;;;
+1D927;SIGNWRITING MOVEMENT-HINGE SIDE TO SIDE SCISSORS;So;0;L;;;;;N;;;;;
+1D928;SIGNWRITING MOVEMENT-WALLPLANE FINGER CONTACT;So;0;L;;;;;N;;;;;
+1D929;SIGNWRITING MOVEMENT-FLOORPLANE FINGER CONTACT;So;0;L;;;;;N;;;;;
+1D92A;SIGNWRITING MOVEMENT-WALLPLANE SINGLE STRAIGHT SMALL;So;0;L;;;;;N;;;;;
+1D92B;SIGNWRITING MOVEMENT-WALLPLANE SINGLE STRAIGHT MEDIUM;So;0;L;;;;;N;;;;;
+1D92C;SIGNWRITING MOVEMENT-WALLPLANE SINGLE STRAIGHT LARGE;So;0;L;;;;;N;;;;;
+1D92D;SIGNWRITING MOVEMENT-WALLPLANE SINGLE STRAIGHT LARGEST;So;0;L;;;;;N;;;;;
+1D92E;SIGNWRITING MOVEMENT-WALLPLANE SINGLE WRIST FLEX;So;0;L;;;;;N;;;;;
+1D92F;SIGNWRITING MOVEMENT-WALLPLANE DOUBLE STRAIGHT;So;0;L;;;;;N;;;;;
+1D930;SIGNWRITING MOVEMENT-WALLPLANE DOUBLE WRIST FLEX;So;0;L;;;;;N;;;;;
+1D931;SIGNWRITING MOVEMENT-WALLPLANE DOUBLE ALTERNATING;So;0;L;;;;;N;;;;;
+1D932;SIGNWRITING MOVEMENT-WALLPLANE DOUBLE ALTERNATING WRIST 
FLEX;So;0;L;;;;;N;;;;;
+1D933;SIGNWRITING MOVEMENT-WALLPLANE CROSS;So;0;L;;;;;N;;;;;
+1D934;SIGNWRITING MOVEMENT-WALLPLANE TRIPLE STRAIGHT MOVEMENT;So;0;L;;;;;N;;;;;
+1D935;SIGNWRITING MOVEMENT-WALLPLANE TRIPLE WRIST FLEX;So;0;L;;;;;N;;;;;
+1D936;SIGNWRITING MOVEMENT-WALLPLANE TRIPLE ALTERNATING;So;0;L;;;;;N;;;;;
+1D937;SIGNWRITING MOVEMENT-WALLPLANE TRIPLE ALTERNATING WRIST 
FLEX;So;0;L;;;;;N;;;;;
+1D938;SIGNWRITING MOVEMENT-WALLPLANE BEND SMALL;So;0;L;;;;;N;;;;;
+1D939;SIGNWRITING MOVEMENT-WALLPLANE BEND MEDIUM;So;0;L;;;;;N;;;;;
+1D93A;SIGNWRITING MOVEMENT-WALLPLANE BEND LARGE;So;0;L;;;;;N;;;;;
+1D93B;SIGNWRITING MOVEMENT-WALLPLANE CORNER SMALL;So;0;L;;;;;N;;;;;
+1D93C;SIGNWRITING MOVEMENT-WALLPLANE CORNER MEDIUM;So;0;L;;;;;N;;;;;
+1D93D;SIGNWRITING MOVEMENT-WALLPLANE CORNER LARGE;So;0;L;;;;;N;;;;;
+1D93E;SIGNWRITING MOVEMENT-WALLPLANE CORNER ROTATION;So;0;L;;;;;N;;;;;
+1D93F;SIGNWRITING MOVEMENT-WALLPLANE CHECK SMALL;So;0;L;;;;;N;;;;;
+1D940;SIGNWRITING MOVEMENT-WALLPLANE CHECK MEDIUM;So;0;L;;;;;N;;;;;
+1D941;SIGNWRITING MOVEMENT-WALLPLANE CHECK LARGE;So;0;L;;;;;N;;;;;
+1D942;SIGNWRITING MOVEMENT-WALLPLANE BOX SMALL;So;0;L;;;;;N;;;;;
+1D943;SIGNWRITING MOVEMENT-WALLPLANE BOX MEDIUM;So;0;L;;;;;N;;;;;
+1D944;SIGNWRITING MOVEMENT-WALLPLANE BOX LARGE;So;0;L;;;;;N;;;;;
+1D945;SIGNWRITING MOVEMENT-WALLPLANE ZIGZAG SMALL;So;0;L;;;;;N;;;;;
+1D946;SIGNWRITING MOVEMENT-WALLPLANE ZIGZAG MEDIUM;So;0;L;;;;;N;;;;;
+1D947;SIGNWRITING MOVEMENT-WALLPLANE ZIGZAG LARGE;So;0;L;;;;;N;;;;;
+1D948;SIGNWRITING MOVEMENT-WALLPLANE PEAKS SMALL;So;0;L;;;;;N;;;;;
+1D949;SIGNWRITING MOVEMENT-WALLPLANE PEAKS MEDIUM;So;0;L;;;;;N;;;;;
+1D94A;SIGNWRITING MOVEMENT-WALLPLANE PEAKS LARGE;So;0;L;;;;;N;;;;;
+1D94B;SIGNWRITING TRAVEL-WALLPLANE ROTATION-WALLPLANE SINGLE;So;0;L;;;;;N;;;;;
+1D94C;SIGNWRITING TRAVEL-WALLPLANE ROTATION-WALLPLANE DOUBLE;So;0;L;;;;;N;;;;;
+1D94D;SIGNWRITING TRAVEL-WALLPLANE ROTATION-WALLPLANE 
ALTERNATING;So;0;L;;;;;N;;;;;
+1D94E;SIGNWRITING TRAVEL-WALLPLANE ROTATION-FLOORPLANE SINGLE;So;0;L;;;;;N;;;;;
+1D94F;SIGNWRITING TRAVEL-WALLPLANE ROTATION-FLOORPLANE DOUBLE;So;0;L;;;;;N;;;;;
+1D950;SIGNWRITING TRAVEL-WALLPLANE ROTATION-FLOORPLANE 
ALTERNATING;So;0;L;;;;;N;;;;;
+1D951;SIGNWRITING TRAVEL-WALLPLANE SHAKING;So;0;L;;;;;N;;;;;
+1D952;SIGNWRITING TRAVEL-WALLPLANE ARM SPIRAL SINGLE;So;0;L;;;;;N;;;;;
+1D953;SIGNWRITING TRAVEL-WALLPLANE ARM SPIRAL DOUBLE;So;0;L;;;;;N;;;;;
+1D954;SIGNWRITING TRAVEL-WALLPLANE ARM SPIRAL TRIPLE;So;0;L;;;;;N;;;;;
+1D955;SIGNWRITING MOVEMENT-DIAGONAL AWAY SMALL;So;0;L;;;;;N;;;;;
+1D956;SIGNWRITING MOVEMENT-DIAGONAL AWAY MEDIUM;So;0;L;;;;;N;;;;;
+1D957;SIGNWRITING MOVEMENT-DIAGONAL AWAY LARGE;So;0;L;;;;;N;;;;;
+1D958;SIGNWRITING MOVEMENT-DIAGONAL AWAY LARGEST;So;0;L;;;;;N;;;;;
+1D959;SIGNWRITING MOVEMENT-DIAGONAL TOWARDS SMALL;So;0;L;;;;;N;;;;;
+1D95A;SIGNWRITING MOVEMENT-DIAGONAL TOWARDS MEDIUM;So;0;L;;;;;N;;;;;
+1D95B;SIGNWRITING MOVEMENT-DIAGONAL TOWARDS LARGE;So;0;L;;;;;N;;;;;
+1D95C;SIGNWRITING MOVEMENT-DIAGONAL TOWARDS LARGEST;So;0;L;;;;;N;;;;;
+1D95D;SIGNWRITING MOVEMENT-DIAGONAL BETWEEN AWAY SMALL;So;0;L;;;;;N;;;;;
+1D95E;SIGNWRITING MOVEMENT-DIAGONAL BETWEEN AWAY MEDIUM;So;0;L;;;;;N;;;;;
+1D95F;SIGNWRITING MOVEMENT-DIAGONAL BETWEEN AWAY LARGE;So;0;L;;;;;N;;;;;
+1D960;SIGNWRITING MOVEMENT-DIAGONAL BETWEEN AWAY LARGEST;So;0;L;;;;;N;;;;;
+1D961;SIGNWRITING MOVEMENT-DIAGONAL BETWEEN TOWARDS SMALL;So;0;L;;;;;N;;;;;
+1D962;SIGNWRITING MOVEMENT-DIAGONAL BETWEEN TOWARDS MEDIUM;So;0;L;;;;;N;;;;;
+1D963;SIGNWRITING MOVEMENT-DIAGONAL BETWEEN TOWARDS LARGE;So;0;L;;;;;N;;;;;
+1D964;SIGNWRITING MOVEMENT-DIAGONAL BETWEEN TOWARDS LARGEST;So;0;L;;;;;N;;;;;
+1D965;SIGNWRITING MOVEMENT-FLOORPLANE SINGLE STRAIGHT SMALL;So;0;L;;;;;N;;;;;
+1D966;SIGNWRITING MOVEMENT-FLOORPLANE SINGLE STRAIGHT MEDIUM;So;0;L;;;;;N;;;;;
+1D967;SIGNWRITING MOVEMENT-FLOORPLANE SINGLE STRAIGHT LARGE;So;0;L;;;;;N;;;;;
+1D968;SIGNWRITING MOVEMENT-FLOORPLANE SINGLE STRAIGHT LARGEST;So;0;L;;;;;N;;;;;
+1D969;SIGNWRITING MOVEMENT-FLOORPLANE SINGLE WRIST FLEX;So;0;L;;;;;N;;;;;
+1D96A;SIGNWRITING MOVEMENT-FLOORPLANE DOUBLE STRAIGHT;So;0;L;;;;;N;;;;;
+1D96B;SIGNWRITING MOVEMENT-FLOORPLANE DOUBLE WRIST FLEX;So;0;L;;;;;N;;;;;
+1D96C;SIGNWRITING MOVEMENT-FLOORPLANE DOUBLE ALTERNATING;So;0;L;;;;;N;;;;;
+1D96D;SIGNWRITING MOVEMENT-FLOORPLANE DOUBLE ALTERNATING WRIST 
FLEX;So;0;L;;;;;N;;;;;
+1D96E;SIGNWRITING MOVEMENT-FLOORPLANE CROSS;So;0;L;;;;;N;;;;;
+1D96F;SIGNWRITING MOVEMENT-FLOORPLANE TRIPLE STRAIGHT 
MOVEMENT;So;0;L;;;;;N;;;;;
+1D970;SIGNWRITING MOVEMENT-FLOORPLANE TRIPLE WRIST FLEX;So;0;L;;;;;N;;;;;
+1D971;SIGNWRITING MOVEMENT-FLOORPLANE TRIPLE ALTERNATING 
MOVEMENT;So;0;L;;;;;N;;;;;
+1D972;SIGNWRITING MOVEMENT-FLOORPLANE TRIPLE ALTERNATING WRIST 
FLEX;So;0;L;;;;;N;;;;;
+1D973;SIGNWRITING MOVEMENT-FLOORPLANE BEND;So;0;L;;;;;N;;;;;
+1D974;SIGNWRITING MOVEMENT-FLOORPLANE CORNER SMALL;So;0;L;;;;;N;;;;;
+1D975;SIGNWRITING MOVEMENT-FLOORPLANE CORNER MEDIUM;So;0;L;;;;;N;;;;;
+1D976;SIGNWRITING MOVEMENT-FLOORPLANE CORNER LARGE;So;0;L;;;;;N;;;;;
+1D977;SIGNWRITING MOVEMENT-FLOORPLANE CHECK;So;0;L;;;;;N;;;;;
+1D978;SIGNWRITING MOVEMENT-FLOORPLANE BOX SMALL;So;0;L;;;;;N;;;;;
+1D979;SIGNWRITING MOVEMENT-FLOORPLANE BOX MEDIUM;So;0;L;;;;;N;;;;;
+1D97A;SIGNWRITING MOVEMENT-FLOORPLANE BOX LARGE;So;0;L;;;;;N;;;;;
+1D97B;SIGNWRITING MOVEMENT-FLOORPLANE ZIGZAG SMALL;So;0;L;;;;;N;;;;;
+1D97C;SIGNWRITING MOVEMENT-FLOORPLANE ZIGZAG MEDIUM;So;0;L;;;;;N;;;;;
+1D97D;SIGNWRITING MOVEMENT-FLOORPLANE ZIGZAG LARGE;So;0;L;;;;;N;;;;;
+1D97E;SIGNWRITING MOVEMENT-FLOORPLANE PEAKS SMALL;So;0;L;;;;;N;;;;;
+1D97F;SIGNWRITING MOVEMENT-FLOORPLANE PEAKS MEDIUM;So;0;L;;;;;N;;;;;
+1D980;SIGNWRITING MOVEMENT-FLOORPLANE PEAKS LARGE;So;0;L;;;;;N;;;;;
+1D981;SIGNWRITING TRAVEL-FLOORPLANE ROTATION-FLOORPLANE 
SINGLE;So;0;L;;;;;N;;;;;
+1D982;SIGNWRITING TRAVEL-FLOORPLANE ROTATION-FLOORPLANE 
DOUBLE;So;0;L;;;;;N;;;;;
+1D983;SIGNWRITING TRAVEL-FLOORPLANE ROTATION-FLOORPLANE 
ALTERNATING;So;0;L;;;;;N;;;;;
+1D984;SIGNWRITING TRAVEL-FLOORPLANE ROTATION-WALLPLANE SINGLE;So;0;L;;;;;N;;;;;
+1D985;SIGNWRITING TRAVEL-FLOORPLANE ROTATION-WALLPLANE DOUBLE;So;0;L;;;;;N;;;;;
+1D986;SIGNWRITING TRAVEL-FLOORPLANE ROTATION-WALLPLANE 
ALTERNATING;So;0;L;;;;;N;;;;;
+1D987;SIGNWRITING TRAVEL-FLOORPLANE SHAKING;So;0;L;;;;;N;;;;;
+1D988;SIGNWRITING MOVEMENT-WALLPLANE CURVE QUARTER SMALL;So;0;L;;;;;N;;;;;
+1D989;SIGNWRITING MOVEMENT-WALLPLANE CURVE QUARTER MEDIUM;So;0;L;;;;;N;;;;;
+1D98A;SIGNWRITING MOVEMENT-WALLPLANE CURVE QUARTER LARGE;So;0;L;;;;;N;;;;;
+1D98B;SIGNWRITING MOVEMENT-WALLPLANE CURVE QUARTER LARGEST;So;0;L;;;;;N;;;;;
+1D98C;SIGNWRITING MOVEMENT-WALLPLANE CURVE HALF-CIRCLE SMALL;So;0;L;;;;;N;;;;;
+1D98D;SIGNWRITING MOVEMENT-WALLPLANE CURVE HALF-CIRCLE MEDIUM;So;0;L;;;;;N;;;;;
+1D98E;SIGNWRITING MOVEMENT-WALLPLANE CURVE HALF-CIRCLE LARGE;So;0;L;;;;;N;;;;;
+1D98F;SIGNWRITING MOVEMENT-WALLPLANE CURVE HALF-CIRCLE 
LARGEST;So;0;L;;;;;N;;;;;
+1D990;SIGNWRITING MOVEMENT-WALLPLANE CURVE THREE-QUARTER CIRCLE 
SMALL;So;0;L;;;;;N;;;;;
+1D991;SIGNWRITING MOVEMENT-WALLPLANE CURVE THREE-QUARTER CIRCLE 
MEDIUM;So;0;L;;;;;N;;;;;
+1D992;SIGNWRITING MOVEMENT-WALLPLANE HUMP SMALL;So;0;L;;;;;N;;;;;
+1D993;SIGNWRITING MOVEMENT-WALLPLANE HUMP MEDIUM;So;0;L;;;;;N;;;;;
+1D994;SIGNWRITING MOVEMENT-WALLPLANE HUMP LARGE;So;0;L;;;;;N;;;;;
+1D995;SIGNWRITING MOVEMENT-WALLPLANE LOOP SMALL;So;0;L;;;;;N;;;;;
+1D996;SIGNWRITING MOVEMENT-WALLPLANE LOOP MEDIUM;So;0;L;;;;;N;;;;;
+1D997;SIGNWRITING MOVEMENT-WALLPLANE LOOP LARGE;So;0;L;;;;;N;;;;;
+1D998;SIGNWRITING MOVEMENT-WALLPLANE LOOP SMALL DOUBLE;So;0;L;;;;;N;;;;;
+1D999;SIGNWRITING MOVEMENT-WALLPLANE WAVE CURVE DOUBLE SMALL;So;0;L;;;;;N;;;;;
+1D99A;SIGNWRITING MOVEMENT-WALLPLANE WAVE CURVE DOUBLE MEDIUM;So;0;L;;;;;N;;;;;
+1D99B;SIGNWRITING MOVEMENT-WALLPLANE WAVE CURVE DOUBLE LARGE;So;0;L;;;;;N;;;;;
+1D99C;SIGNWRITING MOVEMENT-WALLPLANE WAVE CURVE TRIPLE SMALL;So;0;L;;;;;N;;;;;
+1D99D;SIGNWRITING MOVEMENT-WALLPLANE WAVE CURVE TRIPLE MEDIUM;So;0;L;;;;;N;;;;;
+1D99E;SIGNWRITING MOVEMENT-WALLPLANE WAVE CURVE TRIPLE LARGE;So;0;L;;;;;N;;;;;
+1D99F;SIGNWRITING MOVEMENT-WALLPLANE CURVE THEN STRAIGHT;So;0;L;;;;;N;;;;;
+1D9A0;SIGNWRITING MOVEMENT-WALLPLANE CURVED CROSS SMALL;So;0;L;;;;;N;;;;;
+1D9A1;SIGNWRITING MOVEMENT-WALLPLANE CURVED CROSS MEDIUM;So;0;L;;;;;N;;;;;
+1D9A2;SIGNWRITING ROTATION-WALLPLANE SINGLE;So;0;L;;;;;N;;;;;
+1D9A3;SIGNWRITING ROTATION-WALLPLANE DOUBLE;So;0;L;;;;;N;;;;;
+1D9A4;SIGNWRITING ROTATION-WALLPLANE ALTERNATE;So;0;L;;;;;N;;;;;
+1D9A5;SIGNWRITING MOVEMENT-WALLPLANE SHAKING;So;0;L;;;;;N;;;;;
+1D9A6;SIGNWRITING MOVEMENT-WALLPLANE CURVE HITTING FRONT WALL;So;0;L;;;;;N;;;;;
+1D9A7;SIGNWRITING MOVEMENT-WALLPLANE HUMP HITTING FRONT WALL;So;0;L;;;;;N;;;;;
+1D9A8;SIGNWRITING MOVEMENT-WALLPLANE LOOP HITTING FRONT WALL;So;0;L;;;;;N;;;;;
+1D9A9;SIGNWRITING MOVEMENT-WALLPLANE WAVE HITTING FRONT WALL;So;0;L;;;;;N;;;;;
+1D9AA;SIGNWRITING ROTATION-WALLPLANE SINGLE HITTING FRONT 
WALL;So;0;L;;;;;N;;;;;
+1D9AB;SIGNWRITING ROTATION-WALLPLANE DOUBLE HITTING FRONT 
WALL;So;0;L;;;;;N;;;;;
+1D9AC;SIGNWRITING ROTATION-WALLPLANE ALTERNATING HITTING FRONT 
WALL;So;0;L;;;;;N;;;;;
+1D9AD;SIGNWRITING MOVEMENT-WALLPLANE CURVE HITTING CHEST;So;0;L;;;;;N;;;;;
+1D9AE;SIGNWRITING MOVEMENT-WALLPLANE HUMP HITTING CHEST;So;0;L;;;;;N;;;;;
+1D9AF;SIGNWRITING MOVEMENT-WALLPLANE LOOP HITTING CHEST;So;0;L;;;;;N;;;;;
+1D9B0;SIGNWRITING MOVEMENT-WALLPLANE WAVE HITTING CHEST;So;0;L;;;;;N;;;;;
+1D9B1;SIGNWRITING ROTATION-WALLPLANE SINGLE HITTING CHEST;So;0;L;;;;;N;;;;;
+1D9B2;SIGNWRITING ROTATION-WALLPLANE DOUBLE HITTING CHEST;So;0;L;;;;;N;;;;;
+1D9B3;SIGNWRITING ROTATION-WALLPLANE ALTERNATING HITTING 
CHEST;So;0;L;;;;;N;;;;;
+1D9B4;SIGNWRITING MOVEMENT-WALLPLANE WAVE DIAGONAL PATH SMALL;So;0;L;;;;;N;;;;;
+1D9B5;SIGNWRITING MOVEMENT-WALLPLANE WAVE DIAGONAL PATH 
MEDIUM;So;0;L;;;;;N;;;;;
+1D9B6;SIGNWRITING MOVEMENT-WALLPLANE WAVE DIAGONAL PATH LARGE;So;0;L;;;;;N;;;;;
+1D9B7;SIGNWRITING MOVEMENT-FLOORPLANE CURVE HITTING CEILING 
SMALL;So;0;L;;;;;N;;;;;
+1D9B8;SIGNWRITING MOVEMENT-FLOORPLANE CURVE HITTING CEILING 
LARGE;So;0;L;;;;;N;;;;;
+1D9B9;SIGNWRITING MOVEMENT-FLOORPLANE HUMP HITTING CEILING SMALL 
DOUBLE;So;0;L;;;;;N;;;;;
+1D9BA;SIGNWRITING MOVEMENT-FLOORPLANE HUMP HITTING CEILING LARGE 
DOUBLE;So;0;L;;;;;N;;;;;
+1D9BB;SIGNWRITING MOVEMENT-FLOORPLANE HUMP HITTING CEILING SMALL 
TRIPLE;So;0;L;;;;;N;;;;;
+1D9BC;SIGNWRITING MOVEMENT-FLOORPLANE HUMP HITTING CEILING LARGE 
TRIPLE;So;0;L;;;;;N;;;;;
+1D9BD;SIGNWRITING MOVEMENT-FLOORPLANE LOOP HITTING CEILING SMALL 
SINGLE;So;0;L;;;;;N;;;;;
+1D9BE;SIGNWRITING MOVEMENT-FLOORPLANE LOOP HITTING CEILING LARGE 
SINGLE;So;0;L;;;;;N;;;;;
+1D9BF;SIGNWRITING MOVEMENT-FLOORPLANE LOOP HITTING CEILING SMALL 
DOUBLE;So;0;L;;;;;N;;;;;
+1D9C0;SIGNWRITING MOVEMENT-FLOORPLANE LOOP HITTING CEILING LARGE 
DOUBLE;So;0;L;;;;;N;;;;;
+1D9C1;SIGNWRITING MOVEMENT-FLOORPLANE WAVE HITTING CEILING 
SMALL;So;0;L;;;;;N;;;;;
+1D9C2;SIGNWRITING MOVEMENT-FLOORPLANE WAVE HITTING CEILING 
LARGE;So;0;L;;;;;N;;;;;
+1D9C3;SIGNWRITING ROTATION-FLOORPLANE SINGLE HITTING CEILING;So;0;L;;;;;N;;;;;
+1D9C4;SIGNWRITING ROTATION-FLOORPLANE DOUBLE HITTING CEILING;So;0;L;;;;;N;;;;;
+1D9C5;SIGNWRITING ROTATION-FLOORPLANE ALTERNATING HITTING 
CEILING;So;0;L;;;;;N;;;;;
+1D9C6;SIGNWRITING MOVEMENT-FLOORPLANE CURVE HITTING FLOOR 
SMALL;So;0;L;;;;;N;;;;;
+1D9C7;SIGNWRITING MOVEMENT-FLOORPLANE CURVE HITTING FLOOR 
LARGE;So;0;L;;;;;N;;;;;
+1D9C8;SIGNWRITING MOVEMENT-FLOORPLANE HUMP HITTING FLOOR SMALL 
DOUBLE;So;0;L;;;;;N;;;;;
+1D9C9;SIGNWRITING MOVEMENT-FLOORPLANE HUMP HITTING FLOOR LARGE 
DOUBLE;So;0;L;;;;;N;;;;;
+1D9CA;SIGNWRITING MOVEMENT-FLOORPLANE HUMP HITTING FLOOR TRIPLE SMALL 
TRIPLE;So;0;L;;;;;N;;;;;
+1D9CB;SIGNWRITING MOVEMENT-FLOORPLANE HUMP HITTING FLOOR TRIPLE LARGE 
TRIPLE;So;0;L;;;;;N;;;;;
+1D9CC;SIGNWRITING MOVEMENT-FLOORPLANE LOOP HITTING FLOOR SMALL 
SINGLE;So;0;L;;;;;N;;;;;
+1D9CD;SIGNWRITING MOVEMENT-FLOORPLANE LOOP HITTING FLOOR LARGE 
SINGLE;So;0;L;;;;;N;;;;;
+1D9CE;SIGNWRITING MOVEMENT-FLOORPLANE LOOP HITTING FLOOR SMALL 
DOUBLE;So;0;L;;;;;N;;;;;
+1D9CF;SIGNWRITING MOVEMENT-FLOORPLANE LOOP HITTING FLOOR LARGE 
DOUBLE;So;0;L;;;;;N;;;;;
+1D9D0;SIGNWRITING MOVEMENT-FLOORPLANE WAVE HITTING FLOOR 
SMALL;So;0;L;;;;;N;;;;;
+1D9D1;SIGNWRITING MOVEMENT-FLOORPLANE WAVE HITTING FLOOR 
LARGE;So;0;L;;;;;N;;;;;
+1D9D2;SIGNWRITING ROTATION-FLOORPLANE SINGLE HITTING FLOOR;So;0;L;;;;;N;;;;;
+1D9D3;SIGNWRITING ROTATION-FLOORPLANE DOUBLE HITTING FLOOR;So;0;L;;;;;N;;;;;
+1D9D4;SIGNWRITING ROTATION-FLOORPLANE ALTERNATING HITTING 
FLOOR;So;0;L;;;;;N;;;;;
+1D9D5;SIGNWRITING MOVEMENT-FLOORPLANE CURVE SMALL;So;0;L;;;;;N;;;;;
+1D9D6;SIGNWRITING MOVEMENT-FLOORPLANE CURVE MEDIUM;So;0;L;;;;;N;;;;;
+1D9D7;SIGNWRITING MOVEMENT-FLOORPLANE CURVE LARGE;So;0;L;;;;;N;;;;;
+1D9D8;SIGNWRITING MOVEMENT-FLOORPLANE CURVE LARGEST;So;0;L;;;;;N;;;;;
+1D9D9;SIGNWRITING MOVEMENT-FLOORPLANE CURVE COMBINED;So;0;L;;;;;N;;;;;
+1D9DA;SIGNWRITING MOVEMENT-FLOORPLANE HUMP SMALL;So;0;L;;;;;N;;;;;
+1D9DB;SIGNWRITING MOVEMENT-FLOORPLANE LOOP SMALL;So;0;L;;;;;N;;;;;
+1D9DC;SIGNWRITING MOVEMENT-FLOORPLANE WAVE SNAKE;So;0;L;;;;;N;;;;;
+1D9DD;SIGNWRITING MOVEMENT-FLOORPLANE WAVE SMALL;So;0;L;;;;;N;;;;;
+1D9DE;SIGNWRITING MOVEMENT-FLOORPLANE WAVE LARGE;So;0;L;;;;;N;;;;;
+1D9DF;SIGNWRITING ROTATION-FLOORPLANE SINGLE;So;0;L;;;;;N;;;;;
+1D9E0;SIGNWRITING ROTATION-FLOORPLANE DOUBLE;So;0;L;;;;;N;;;;;
+1D9E1;SIGNWRITING ROTATION-FLOORPLANE ALTERNATING;So;0;L;;;;;N;;;;;
+1D9E2;SIGNWRITING MOVEMENT-FLOORPLANE SHAKING PARALLEL;So;0;L;;;;;N;;;;;
+1D9E3;SIGNWRITING MOVEMENT-WALLPLANE ARM CIRCLE SMALL SINGLE;So;0;L;;;;;N;;;;;
+1D9E4;SIGNWRITING MOVEMENT-WALLPLANE ARM CIRCLE MEDIUM SINGLE;So;0;L;;;;;N;;;;;
+1D9E5;SIGNWRITING MOVEMENT-WALLPLANE ARM CIRCLE SMALL DOUBLE;So;0;L;;;;;N;;;;;
+1D9E6;SIGNWRITING MOVEMENT-WALLPLANE ARM CIRCLE MEDIUM DOUBLE;So;0;L;;;;;N;;;;;
+1D9E7;SIGNWRITING MOVEMENT-FLOORPLANE ARM CIRCLE HITTING WALL SMALL 
SINGLE;So;0;L;;;;;N;;;;;
+1D9E8;SIGNWRITING MOVEMENT-FLOORPLANE ARM CIRCLE HITTING WALL MEDIUM 
SINGLE;So;0;L;;;;;N;;;;;
+1D9E9;SIGNWRITING MOVEMENT-FLOORPLANE ARM CIRCLE HITTING WALL LARGE 
SINGLE;So;0;L;;;;;N;;;;;
+1D9EA;SIGNWRITING MOVEMENT-FLOORPLANE ARM CIRCLE HITTING WALL SMALL 
DOUBLE;So;0;L;;;;;N;;;;;
+1D9EB;SIGNWRITING MOVEMENT-FLOORPLANE ARM CIRCLE HITTING WALL MEDIUM 
DOUBLE;So;0;L;;;;;N;;;;;
+1D9EC;SIGNWRITING MOVEMENT-FLOORPLANE ARM CIRCLE HITTING WALL LARGE 
DOUBLE;So;0;L;;;;;N;;;;;
+1D9ED;SIGNWRITING MOVEMENT-WALLPLANE WRIST CIRCLE FRONT 
SINGLE;So;0;L;;;;;N;;;;;
+1D9EE;SIGNWRITING MOVEMENT-WALLPLANE WRIST CIRCLE FRONT 
DOUBLE;So;0;L;;;;;N;;;;;
+1D9EF;SIGNWRITING MOVEMENT-FLOORPLANE WRIST CIRCLE HITTING WALL 
SINGLE;So;0;L;;;;;N;;;;;
+1D9F0;SIGNWRITING MOVEMENT-FLOORPLANE WRIST CIRCLE HITTING WALL 
DOUBLE;So;0;L;;;;;N;;;;;
+1D9F1;SIGNWRITING MOVEMENT-WALLPLANE FINGER CIRCLES SINGLE;So;0;L;;;;;N;;;;;
+1D9F2;SIGNWRITING MOVEMENT-WALLPLANE FINGER CIRCLES DOUBLE;So;0;L;;;;;N;;;;;
+1D9F3;SIGNWRITING MOVEMENT-FLOORPLANE FINGER CIRCLES HITTING WALL 
SINGLE;So;0;L;;;;;N;;;;;
+1D9F4;SIGNWRITING MOVEMENT-FLOORPLANE FINGER CIRCLES HITTING WALL 
DOUBLE;So;0;L;;;;;N;;;;;
+1D9F5;SIGNWRITING DYNAMIC ARROWHEAD SMALL;So;0;L;;;;;N;;;;;
+1D9F6;SIGNWRITING DYNAMIC ARROWHEAD LARGE;So;0;L;;;;;N;;;;;
+1D9F7;SIGNWRITING DYNAMIC FAST;So;0;L;;;;;N;;;;;
+1D9F8;SIGNWRITING DYNAMIC SLOW;So;0;L;;;;;N;;;;;
+1D9F9;SIGNWRITING DYNAMIC TENSE;So;0;L;;;;;N;;;;;
+1D9FA;SIGNWRITING DYNAMIC RELAXED;So;0;L;;;;;N;;;;;
+1D9FB;SIGNWRITING DYNAMIC SIMULTANEOUS;So;0;L;;;;;N;;;;;
+1D9FC;SIGNWRITING DYNAMIC SIMULTANEOUS ALTERNATING;So;0;L;;;;;N;;;;;
+1D9FD;SIGNWRITING DYNAMIC EVERY OTHER TIME;So;0;L;;;;;N;;;;;
+1D9FE;SIGNWRITING DYNAMIC GRADUAL;So;0;L;;;;;N;;;;;
+1D9FF;SIGNWRITING HEAD;So;0;L;;;;;N;;;;;
+1DA00;SIGNWRITING HEAD RIM;Mn;0;NSM;;;;;N;;;;;
+1DA01;SIGNWRITING HEAD MOVEMENT-WALLPLANE STRAIGHT;Mn;0;NSM;;;;;N;;;;;
+1DA02;SIGNWRITING HEAD MOVEMENT-WALLPLANE TILT;Mn;0;NSM;;;;;N;;;;;
+1DA03;SIGNWRITING HEAD MOVEMENT-FLOORPLANE STRAIGHT;Mn;0;NSM;;;;;N;;;;;
+1DA04;SIGNWRITING HEAD MOVEMENT-WALLPLANE CURVE;Mn;0;NSM;;;;;N;;;;;
+1DA05;SIGNWRITING HEAD MOVEMENT-FLOORPLANE CURVE;Mn;0;NSM;;;;;N;;;;;
+1DA06;SIGNWRITING HEAD MOVEMENT CIRCLE;Mn;0;NSM;;;;;N;;;;;
+1DA07;SIGNWRITING FACE DIRECTION POSITION NOSE FORWARD 
TILTING;Mn;0;NSM;;;;;N;;;;;
+1DA08;SIGNWRITING FACE DIRECTION POSITION NOSE UP OR DOWN;Mn;0;NSM;;;;;N;;;;;
+1DA09;SIGNWRITING FACE DIRECTION POSITION NOSE UP OR DOWN 
TILTING;Mn;0;NSM;;;;;N;;;;;
+1DA0A;SIGNWRITING EYEBROWS STRAIGHT UP;Mn;0;NSM;;;;;N;;;;;
+1DA0B;SIGNWRITING EYEBROWS STRAIGHT NEUTRAL;Mn;0;NSM;;;;;N;;;;;
+1DA0C;SIGNWRITING EYEBROWS STRAIGHT DOWN;Mn;0;NSM;;;;;N;;;;;
+1DA0D;SIGNWRITING DREAMY EYEBROWS NEUTRAL DOWN;Mn;0;NSM;;;;;N;;;;;
+1DA0E;SIGNWRITING DREAMY EYEBROWS DOWN NEUTRAL;Mn;0;NSM;;;;;N;;;;;
+1DA0F;SIGNWRITING DREAMY EYEBROWS UP NEUTRAL;Mn;0;NSM;;;;;N;;;;;
+1DA10;SIGNWRITING DREAMY EYEBROWS NEUTRAL UP;Mn;0;NSM;;;;;N;;;;;
+1DA11;SIGNWRITING FOREHEAD NEUTRAL;Mn;0;NSM;;;;;N;;;;;
+1DA12;SIGNWRITING FOREHEAD CONTACT;Mn;0;NSM;;;;;N;;;;;
+1DA13;SIGNWRITING FOREHEAD WRINKLED;Mn;0;NSM;;;;;N;;;;;
+1DA14;SIGNWRITING EYES OPEN;Mn;0;NSM;;;;;N;;;;;
+1DA15;SIGNWRITING EYES SQUEEZED;Mn;0;NSM;;;;;N;;;;;
+1DA16;SIGNWRITING EYES CLOSED;Mn;0;NSM;;;;;N;;;;;
+1DA17;SIGNWRITING EYE BLINK SINGLE;Mn;0;NSM;;;;;N;;;;;
+1DA18;SIGNWRITING EYE BLINK MULTIPLE;Mn;0;NSM;;;;;N;;;;;
+1DA19;SIGNWRITING EYES HALF OPEN;Mn;0;NSM;;;;;N;;;;;
+1DA1A;SIGNWRITING EYES WIDE OPEN;Mn;0;NSM;;;;;N;;;;;
+1DA1B;SIGNWRITING EYES HALF CLOSED;Mn;0;NSM;;;;;N;;;;;
+1DA1C;SIGNWRITING EYES WIDENING MOVEMENT;Mn;0;NSM;;;;;N;;;;;
+1DA1D;SIGNWRITING EYE WINK;Mn;0;NSM;;;;;N;;;;;
+1DA1E;SIGNWRITING EYELASHES UP;Mn;0;NSM;;;;;N;;;;;
+1DA1F;SIGNWRITING EYELASHES DOWN;Mn;0;NSM;;;;;N;;;;;
+1DA20;SIGNWRITING EYELASHES FLUTTERING;Mn;0;NSM;;;;;N;;;;;
+1DA21;SIGNWRITING EYEGAZE-WALLPLANE STRAIGHT;Mn;0;NSM;;;;;N;;;;;
+1DA22;SIGNWRITING EYEGAZE-WALLPLANE STRAIGHT DOUBLE;Mn;0;NSM;;;;;N;;;;;
+1DA23;SIGNWRITING EYEGAZE-WALLPLANE STRAIGHT ALTERNATING;Mn;0;NSM;;;;;N;;;;;
+1DA24;SIGNWRITING EYEGAZE-FLOORPLANE STRAIGHT;Mn;0;NSM;;;;;N;;;;;
+1DA25;SIGNWRITING EYEGAZE-FLOORPLANE STRAIGHT DOUBLE;Mn;0;NSM;;;;;N;;;;;
+1DA26;SIGNWRITING EYEGAZE-FLOORPLANE STRAIGHT ALTERNATING;Mn;0;NSM;;;;;N;;;;;
+1DA27;SIGNWRITING EYEGAZE-WALLPLANE CURVED;Mn;0;NSM;;;;;N;;;;;
+1DA28;SIGNWRITING EYEGAZE-FLOORPLANE CURVED;Mn;0;NSM;;;;;N;;;;;
+1DA29;SIGNWRITING EYEGAZE-WALLPLANE CIRCLING;Mn;0;NSM;;;;;N;;;;;
+1DA2A;SIGNWRITING CHEEKS PUFFED;Mn;0;NSM;;;;;N;;;;;
+1DA2B;SIGNWRITING CHEEKS NEUTRAL;Mn;0;NSM;;;;;N;;;;;
+1DA2C;SIGNWRITING CHEEKS SUCKED;Mn;0;NSM;;;;;N;;;;;
+1DA2D;SIGNWRITING TENSE CHEEKS HIGH;Mn;0;NSM;;;;;N;;;;;
+1DA2E;SIGNWRITING TENSE CHEEKS MIDDLE;Mn;0;NSM;;;;;N;;;;;
+1DA2F;SIGNWRITING TENSE CHEEKS LOW;Mn;0;NSM;;;;;N;;;;;
+1DA30;SIGNWRITING EARS;Mn;0;NSM;;;;;N;;;;;
+1DA31;SIGNWRITING NOSE NEUTRAL;Mn;0;NSM;;;;;N;;;;;
+1DA32;SIGNWRITING NOSE CONTACT;Mn;0;NSM;;;;;N;;;;;
+1DA33;SIGNWRITING NOSE WRINKLES;Mn;0;NSM;;;;;N;;;;;
+1DA34;SIGNWRITING NOSE WIGGLES;Mn;0;NSM;;;;;N;;;;;
+1DA35;SIGNWRITING AIR BLOWING OUT;Mn;0;NSM;;;;;N;;;;;
+1DA36;SIGNWRITING AIR SUCKING IN;Mn;0;NSM;;;;;N;;;;;
+1DA37;SIGNWRITING AIR BLOW SMALL ROTATIONS;So;0;L;;;;;N;;;;;
+1DA38;SIGNWRITING AIR SUCK SMALL ROTATIONS;So;0;L;;;;;N;;;;;
+1DA39;SIGNWRITING BREATH INHALE;So;0;L;;;;;N;;;;;
+1DA3A;SIGNWRITING BREATH EXHALE;So;0;L;;;;;N;;;;;
+1DA3B;SIGNWRITING MOUTH CLOSED NEUTRAL;Mn;0;NSM;;;;;N;;;;;
+1DA3C;SIGNWRITING MOUTH CLOSED FORWARD;Mn;0;NSM;;;;;N;;;;;
+1DA3D;SIGNWRITING MOUTH CLOSED CONTACT;Mn;0;NSM;;;;;N;;;;;
+1DA3E;SIGNWRITING MOUTH SMILE;Mn;0;NSM;;;;;N;;;;;
+1DA3F;SIGNWRITING MOUTH SMILE WRINKLED;Mn;0;NSM;;;;;N;;;;;
+1DA40;SIGNWRITING MOUTH SMILE OPEN;Mn;0;NSM;;;;;N;;;;;
+1DA41;SIGNWRITING MOUTH FROWN;Mn;0;NSM;;;;;N;;;;;
+1DA42;SIGNWRITING MOUTH FROWN WRINKLED;Mn;0;NSM;;;;;N;;;;;
+1DA43;SIGNWRITING MOUTH FROWN OPEN;Mn;0;NSM;;;;;N;;;;;
+1DA44;SIGNWRITING MOUTH OPEN CIRCLE;Mn;0;NSM;;;;;N;;;;;
+1DA45;SIGNWRITING MOUTH OPEN FORWARD;Mn;0;NSM;;;;;N;;;;;
+1DA46;SIGNWRITING MOUTH OPEN WRINKLED;Mn;0;NSM;;;;;N;;;;;
+1DA47;SIGNWRITING MOUTH OPEN OVAL;Mn;0;NSM;;;;;N;;;;;
+1DA48;SIGNWRITING MOUTH OPEN OVAL WRINKLED;Mn;0;NSM;;;;;N;;;;;
+1DA49;SIGNWRITING MOUTH OPEN OVAL YAWN;Mn;0;NSM;;;;;N;;;;;
+1DA4A;SIGNWRITING MOUTH OPEN RECTANGLE;Mn;0;NSM;;;;;N;;;;;
+1DA4B;SIGNWRITING MOUTH OPEN RECTANGLE WRINKLED;Mn;0;NSM;;;;;N;;;;;
+1DA4C;SIGNWRITING MOUTH OPEN RECTANGLE YAWN;Mn;0;NSM;;;;;N;;;;;
+1DA4D;SIGNWRITING MOUTH KISS;Mn;0;NSM;;;;;N;;;;;
+1DA4E;SIGNWRITING MOUTH KISS FORWARD;Mn;0;NSM;;;;;N;;;;;
+1DA4F;SIGNWRITING MOUTH KISS WRINKLED;Mn;0;NSM;;;;;N;;;;;
+1DA50;SIGNWRITING MOUTH TENSE;Mn;0;NSM;;;;;N;;;;;
+1DA51;SIGNWRITING MOUTH TENSE FORWARD;Mn;0;NSM;;;;;N;;;;;
+1DA52;SIGNWRITING MOUTH TENSE SUCKED;Mn;0;NSM;;;;;N;;;;;
+1DA53;SIGNWRITING LIPS PRESSED TOGETHER;Mn;0;NSM;;;;;N;;;;;
+1DA54;SIGNWRITING LIP LOWER OVER UPPER;Mn;0;NSM;;;;;N;;;;;
+1DA55;SIGNWRITING LIP UPPER OVER LOWER;Mn;0;NSM;;;;;N;;;;;
+1DA56;SIGNWRITING MOUTH CORNERS;Mn;0;NSM;;;;;N;;;;;
+1DA57;SIGNWRITING MOUTH WRINKLES SINGLE;Mn;0;NSM;;;;;N;;;;;
+1DA58;SIGNWRITING MOUTH WRINKLES DOUBLE;Mn;0;NSM;;;;;N;;;;;
+1DA59;SIGNWRITING TONGUE STICKING OUT FAR;Mn;0;NSM;;;;;N;;;;;
+1DA5A;SIGNWRITING TONGUE LICKING LIPS;Mn;0;NSM;;;;;N;;;;;
+1DA5B;SIGNWRITING TONGUE TIP BETWEEN LIPS;Mn;0;NSM;;;;;N;;;;;
+1DA5C;SIGNWRITING TONGUE TIP TOUCHING INSIDE MOUTH;Mn;0;NSM;;;;;N;;;;;
+1DA5D;SIGNWRITING TONGUE INSIDE MOUTH RELAXED;Mn;0;NSM;;;;;N;;;;;
+1DA5E;SIGNWRITING TONGUE MOVES AGAINST CHEEK;Mn;0;NSM;;;;;N;;;;;
+1DA5F;SIGNWRITING TONGUE CENTRE STICKING OUT;Mn;0;NSM;;;;;N;;;;;
+1DA60;SIGNWRITING TONGUE CENTRE INSIDE MOUTH;Mn;0;NSM;;;;;N;;;;;
+1DA61;SIGNWRITING TEETH;Mn;0;NSM;;;;;N;;;;;
+1DA62;SIGNWRITING TEETH MOVEMENT;Mn;0;NSM;;;;;N;;;;;
+1DA63;SIGNWRITING TEETH ON TONGUE;Mn;0;NSM;;;;;N;;;;;
+1DA64;SIGNWRITING TEETH ON TONGUE MOVEMENT;Mn;0;NSM;;;;;N;;;;;
+1DA65;SIGNWRITING TEETH ON LIPS;Mn;0;NSM;;;;;N;;;;;
+1DA66;SIGNWRITING TEETH ON LIPS MOVEMENT;Mn;0;NSM;;;;;N;;;;;
+1DA67;SIGNWRITING TEETH BITE LIPS;Mn;0;NSM;;;;;N;;;;;
+1DA68;SIGNWRITING MOVEMENT-WALLPLANE JAW;Mn;0;NSM;;;;;N;;;;;
+1DA69;SIGNWRITING MOVEMENT-FLOORPLANE JAW;Mn;0;NSM;;;;;N;;;;;
+1DA6A;SIGNWRITING NECK;Mn;0;NSM;;;;;N;;;;;
+1DA6B;SIGNWRITING HAIR;Mn;0;NSM;;;;;N;;;;;
+1DA6C;SIGNWRITING EXCITEMENT;Mn;0;NSM;;;;;N;;;;;
+1DA6D;SIGNWRITING SHOULDER HIP SPINE;So;0;L;;;;;N;;;;;
+1DA6E;SIGNWRITING SHOULDER HIP POSITIONS;So;0;L;;;;;N;;;;;
+1DA6F;SIGNWRITING WALLPLANE SHOULDER HIP MOVE;So;0;L;;;;;N;;;;;
+1DA70;SIGNWRITING FLOORPLANE SHOULDER HIP MOVE;So;0;L;;;;;N;;;;;
+1DA71;SIGNWRITING SHOULDER TILTING FROM WAIST;So;0;L;;;;;N;;;;;
+1DA72;SIGNWRITING TORSO-WALLPLANE STRAIGHT STRETCH;So;0;L;;;;;N;;;;;
+1DA73;SIGNWRITING TORSO-WALLPLANE CURVED BEND;So;0;L;;;;;N;;;;;
+1DA74;SIGNWRITING TORSO-FLOORPLANE TWISTING;So;0;L;;;;;N;;;;;
+1DA75;SIGNWRITING UPPER BODY TILTING FROM HIP JOINTS;Mn;0;NSM;;;;;N;;;;;
+1DA76;SIGNWRITING LIMB COMBINATION;So;0;L;;;;;N;;;;;
+1DA77;SIGNWRITING LIMB LENGTH-1;So;0;L;;;;;N;;;;;
+1DA78;SIGNWRITING LIMB LENGTH-2;So;0;L;;;;;N;;;;;
+1DA79;SIGNWRITING LIMB LENGTH-3;So;0;L;;;;;N;;;;;
+1DA7A;SIGNWRITING LIMB LENGTH-4;So;0;L;;;;;N;;;;;
+1DA7B;SIGNWRITING LIMB LENGTH-5;So;0;L;;;;;N;;;;;
+1DA7C;SIGNWRITING LIMB LENGTH-6;So;0;L;;;;;N;;;;;
+1DA7D;SIGNWRITING LIMB LENGTH-7;So;0;L;;;;;N;;;;;
+1DA7E;SIGNWRITING FINGER;So;0;L;;;;;N;;;;;
+1DA7F;SIGNWRITING LOCATION-WALLPLANE SPACE;So;0;L;;;;;N;;;;;
+1DA80;SIGNWRITING LOCATION-FLOORPLANE SPACE;So;0;L;;;;;N;;;;;
+1DA81;SIGNWRITING LOCATION HEIGHT;So;0;L;;;;;N;;;;;
+1DA82;SIGNWRITING LOCATION WIDTH;So;0;L;;;;;N;;;;;
+1DA83;SIGNWRITING LOCATION DEPTH;So;0;L;;;;;N;;;;;
+1DA84;SIGNWRITING LOCATION HEAD NECK;Mn;0;NSM;;;;;N;;;;;
+1DA85;SIGNWRITING LOCATION TORSO;So;0;L;;;;;N;;;;;
+1DA86;SIGNWRITING LOCATION LIMBS DIGITS;So;0;L;;;;;N;;;;;
+1DA87;SIGNWRITING COMMA;Po;0;L;;;;;N;;;;;
+1DA88;SIGNWRITING FULL STOP;Po;0;L;;;;;N;;;;;
+1DA89;SIGNWRITING SEMICOLON;Po;0;L;;;;;N;;;;;
+1DA8A;SIGNWRITING COLON;Po;0;L;;;;;N;;;;;
+1DA8B;SIGNWRITING PARENTHESIS;Po;0;L;;;;;N;;;;;
+1DA9B;SIGNWRITING FILL MODIFIER-2;Mn;0;NSM;;;;;N;;;;;
+1DA9C;SIGNWRITING FILL MODIFIER-3;Mn;0;NSM;;;;;N;;;;;
+1DA9D;SIGNWRITING FILL MODIFIER-4;Mn;0;NSM;;;;;N;;;;;
+1DA9E;SIGNWRITING FILL MODIFIER-5;Mn;0;NSM;;;;;N;;;;;
+1DA9F;SIGNWRITING FILL MODIFIER-6;Mn;0;NSM;;;;;N;;;;;
+1DAA1;SIGNWRITING ROTATION MODIFIER-2;Mn;0;NSM;;;;;N;;;;;
+1DAA2;SIGNWRITING ROTATION MODIFIER-3;Mn;0;NSM;;;;;N;;;;;
+1DAA3;SIGNWRITING ROTATION MODIFIER-4;Mn;0;NSM;;;;;N;;;;;
+1DAA4;SIGNWRITING ROTATION MODIFIER-5;Mn;0;NSM;;;;;N;;;;;
+1DAA5;SIGNWRITING ROTATION MODIFIER-6;Mn;0;NSM;;;;;N;;;;;
+1DAA6;SIGNWRITING ROTATION MODIFIER-7;Mn;0;NSM;;;;;N;;;;;
+1DAA7;SIGNWRITING ROTATION MODIFIER-8;Mn;0;NSM;;;;;N;;;;;
+1DAA8;SIGNWRITING ROTATION MODIFIER-9;Mn;0;NSM;;;;;N;;;;;
+1DAA9;SIGNWRITING ROTATION MODIFIER-10;Mn;0;NSM;;;;;N;;;;;
+1DAAA;SIGNWRITING ROTATION MODIFIER-11;Mn;0;NSM;;;;;N;;;;;
+1DAAB;SIGNWRITING ROTATION MODIFIER-12;Mn;0;NSM;;;;;N;;;;;
+1DAAC;SIGNWRITING ROTATION MODIFIER-13;Mn;0;NSM;;;;;N;;;;;
+1DAAD;SIGNWRITING ROTATION MODIFIER-14;Mn;0;NSM;;;;;N;;;;;
+1DAAE;SIGNWRITING ROTATION MODIFIER-15;Mn;0;NSM;;;;;N;;;;;
+1DAAF;SIGNWRITING ROTATION MODIFIER-16;Mn;0;NSM;;;;;N;;;;;
 1E800;MENDE KIKAKUI SYLLABLE M001 KI;Lo;0;R;;;;;N;;;;;
 1E801;MENDE KIKAKUI SYLLABLE M002 KA;Lo;0;R;;;;;N;;;;;
 1E802;MENDE KIKAKUI SYLLABLE M003 KU;Lo;0;R;;;;;N;;;;;
@@ -25108,6 +27011,9 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;;
 1F32A;CLOUD WITH TORNADO;So;0;ON;;;;;N;;;;;
 1F32B;FOG;So;0;ON;;;;;N;;;;;
 1F32C;WIND BLOWING FACE;So;0;ON;;;;;N;;;;;
+1F32D;HOT DOG;So;0;ON;;;;;N;;;;;
+1F32E;TACO;So;0;ON;;;;;N;;;;;
+1F32F;BURRITO;So;0;ON;;;;;N;;;;;
 1F330;CHESTNUT;So;0;ON;;;;;N;;;;;
 1F331;SEEDLING;So;0;ON;;;;;N;;;;;
 1F332;EVERGREEN TREE;So;0;ON;;;;;N;;;;;
@@ -25186,6 +27092,8 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;;
 1F37B;CLINKING BEER MUGS;So;0;ON;;;;;N;;;;;
 1F37C;BABY BOTTLE;So;0;ON;;;;;N;;;;;
 1F37D;FORK AND KNIFE WITH PLATE;So;0;ON;;;;;N;;;;;
+1F37E;BOTTLE WITH POPPING CORK;So;0;ON;;;;;N;;;;;
+1F37F;POPCORN;So;0;ON;;;;;N;;;;;
 1F380;RIBBON;So;0;ON;;;;;N;;;;;
 1F381;WRAPPED PRESENT;So;0;ON;;;;;N;;;;;
 1F382;BIRTHDAY CAKE;So;0;ON;;;;;N;;;;;
@@ -25265,6 +27173,11 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;;
 1F3CC;GOLFER;So;0;ON;;;;;N;;;;;
 1F3CD;RACING MOTORCYCLE;So;0;ON;;;;;N;;;;;
 1F3CE;RACING CAR;So;0;ON;;;;;N;;;;;
+1F3CF;CRICKET BAT AND BALL;So;0;ON;;;;;N;;;;;
+1F3D0;VOLLEYBALL;So;0;ON;;;;;N;;;;;
+1F3D1;FIELD HOCKEY STICK AND BALL;So;0;ON;;;;;N;;;;;
+1F3D2;ICE HOCKEY STICK AND PUCK;So;0;ON;;;;;N;;;;;
+1F3D3;TABLE TENNIS PADDLE AND BALL;So;0;ON;;;;;N;;;;;
 1F3D4;SNOW CAPPED MOUNTAIN;So;0;ON;;;;;N;;;;;
 1F3D5;CAMPING;So;0;ON;;;;;N;;;;;
 1F3D6;BEACH WITH UMBRELLA;So;0;ON;;;;;N;;;;;
@@ -25301,6 +27214,14 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;;
 1F3F5;ROSETTE;So;0;ON;;;;;N;;;;;
 1F3F6;BLACK ROSETTE;So;0;ON;;;;;N;;;;;
 1F3F7;LABEL;So;0;ON;;;;;N;;;;;
+1F3F8;BADMINTON RACQUET AND SHUTTLECOCK;So;0;ON;;;;;N;;;;;
+1F3F9;BOW AND ARROW;So;0;ON;;;;;N;;;;;
+1F3FA;AMPHORA;So;0;ON;;;;;N;;;;;
+1F3FB;EMOJI MODIFIER FITZPATRICK TYPE-1-2;Sk;0;ON;;;;;N;;;;;
+1F3FC;EMOJI MODIFIER FITZPATRICK TYPE-3;Sk;0;ON;;;;;N;;;;;
+1F3FD;EMOJI MODIFIER FITZPATRICK TYPE-4;Sk;0;ON;;;;;N;;;;;
+1F3FE;EMOJI MODIFIER FITZPATRICK TYPE-5;Sk;0;ON;;;;;N;;;;;
+1F3FF;EMOJI MODIFIER FITZPATRICK TYPE-6;Sk;0;ON;;;;;N;;;;;
 1F400;RAT;So;0;ON;;;;;N;;;;;
 1F401;MOUSE;So;0;ON;;;;;N;;;;;
 1F402;OX;So;0;ON;;;;;N;;;;;
@@ -25556,6 +27477,7 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;;
 1F4FC;VIDEOCASSETTE;So;0;ON;;;;;N;;;;;
 1F4FD;FILM PROJECTOR;So;0;ON;;;;;N;;;;;
 1F4FE;PORTABLE STEREO;So;0;ON;;;;;N;;;;;
+1F4FF;PRAYER BEADS;So;0;ON;;;;;N;;;;;
 1F500;TWISTED RIGHTWARDS ARROWS;So;0;ON;;;;;N;;;;;
 1F501;CLOCKWISE RIGHTWARDS AND LEFTWARDS OPEN CIRCLE ARROWS;So;0;ON;;;;;N;;;;;
 1F502;CLOCKWISE RIGHTWARDS AND LEFTWARDS OPEN CIRCLE ARROWS WITH CIRCLED ONE 
OVERLAY;So;0;ON;;;;;N;;;;;
@@ -25631,6 +27553,11 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;;
 1F548;CELTIC CROSS;So;0;ON;;;;;N;;;;;
 1F549;OM SYMBOL;So;0;ON;;;;;N;;;;;
 1F54A;DOVE OF PEACE;So;0;ON;;;;;N;;;;;
+1F54B;KAABA;So;0;ON;;;;;N;;;;;
+1F54C;MOSQUE;So;0;ON;;;;;N;;;;;
+1F54D;SYNAGOGUE;So;0;ON;;;;;N;;;;;
+1F54E;MENORAH WITH NINE BRANCHES;So;0;ON;;;;;N;;;;;
+1F54F;BOWL OF HYGIEIA;So;0;ON;;;;;N;;;;;
 1F550;CLOCK FACE ONE OCLOCK;So;0;ON;;;;;N;;;;;
 1F551;CLOCK FACE TWO OCLOCK;So;0;ON;;;;;N;;;;;
 1F552;CLOCK FACE THREE OCLOCK;So;0;ON;;;;;N;;;;;
@@ -25872,6 +27799,8 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;;
 1F640;WEARY CAT FACE;So;0;ON;;;;;N;;;;;
 1F641;SLIGHTLY FROWNING FACE;So;0;ON;;;;;N;;;;;
 1F642;SLIGHTLY SMILING FACE;So;0;ON;;;;;N;;;;;
+1F643;UPSIDE-DOWN FACE;So;0;ON;;;;;N;;;;;
+1F644;FACE WITH ROLLING EYES;So;0;ON;;;;;N;;;;;
 1F645;FACE WITH NO GOOD GESTURE;So;0;ON;;;;;N;;;;;
 1F646;FACE WITH OK GESTURE;So;0;ON;;;;;N;;;;;
 1F647;PERSON BOWING DEEPLY;So;0;ON;;;;;N;;;;;
@@ -26011,6 +27940,7 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;;
 1F6CD;SHOPPING BAGS;So;0;ON;;;;;N;;;;;
 1F6CE;BELLHOP BELL;So;0;ON;;;;;N;;;;;
 1F6CF;BED;So;0;ON;;;;;N;;;;;
+1F6D0;PLACE OF WORSHIP;So;0;ON;;;;;N;;;;;
 1F6E0;HAMMER AND WRENCH;So;0;ON;;;;;N;;;;;
 1F6E1;SHIELD;So;0;ON;;;;;N;;;;;
 1F6E2;OIL DRUM;So;0;ON;;;;;N;;;;;
@@ -26377,12 +28307,29 @@ FFFD;REPLACEMENT CHARACTER;So;0;ON;;;;;N;;;;;
 1F8AB;RIGHTWARDS FRONT-TILTED SHADOWED WHITE ARROW;So;0;ON;;;;;N;;;;;
 1F8AC;WHITE ARROW SHAFT WIDTH ONE;So;0;ON;;;;;N;;;;;
 1F8AD;WHITE ARROW SHAFT WIDTH TWO THIRDS;So;0;ON;;;;;N;;;;;
+1F910;ZIPPER-MOUTH FACE;So;0;ON;;;;;N;;;;;
+1F911;MONEY-MOUTH FACE;So;0;ON;;;;;N;;;;;
+1F912;FACE WITH THERMOMETER;So;0;ON;;;;;N;;;;;
+1F913;NERD FACE;So;0;ON;;;;;N;;;;;
+1F914;THINKING FACE;So;0;ON;;;;;N;;;;;
+1F915;FACE WITH HEAD-BANDAGE;So;0;ON;;;;;N;;;;;
+1F916;ROBOT FACE;So;0;ON;;;;;N;;;;;
+1F917;HUGGING FACE;So;0;ON;;;;;N;;;;;
+1F918;SIGN OF THE HORNS;So;0;ON;;;;;N;;;;;
+1F980;CRAB;So;0;ON;;;;;N;;;;;
+1F981;LION FACE;So;0;ON;;;;;N;;;;;
+1F982;SCORPION;So;0;ON;;;;;N;;;;;
+1F983;TURKEY;So;0;ON;;;;;N;;;;;
+1F984;UNICORN FACE;So;0;ON;;;;;N;;;;;
+1F9C0;CHEESE WEDGE;So;0;ON;;;;;N;;;;;
 20000;<CJK Ideograph Extension B, First>;Lo;0;L;;;;;N;;;;;
 2A6D6;<CJK Ideograph Extension B, Last>;Lo;0;L;;;;;N;;;;;
 2A700;<CJK Ideograph Extension C, First>;Lo;0;L;;;;;N;;;;;
 2B734;<CJK Ideograph Extension C, Last>;Lo;0;L;;;;;N;;;;;
 2B740;<CJK Ideograph Extension D, First>;Lo;0;L;;;;;N;;;;;
 2B81D;<CJK Ideograph Extension D, Last>;Lo;0;L;;;;;N;;;;;
+2B820;<CJK Ideograph Extension E, First>;Lo;0;L;;;;;N;;;;;
+2CEA1;<CJK Ideograph Extension E, Last>;Lo;0;L;;;;;N;;;;;
 2F800;CJK COMPATIBILITY IDEOGRAPH-2F800;Lo;0;L;4E3D;;;;N;;;;;
 2F801;CJK COMPATIBILITY IDEOGRAPH-2F801;Lo;0;L;4E38;;;;N;;;;;
 2F802;CJK COMPATIBILITY IDEOGRAPH-2F802;Lo;0;L;4E41;;;;N;;;;;
diff --git a/admin/unidata/blocks.awk b/admin/unidata/blocks.awk
new file mode 100755
index 0000000..892ac58
--- /dev/null
+++ b/admin/unidata/blocks.awk
@@ -0,0 +1,225 @@
+#!/usr/bin/awk -f
+
+## Copyright (C) 2015 Free Software Foundation, Inc.
+
+## Author: Glenn Morris <address@hidden>
+
+## This file is part of GNU Emacs.
+
+## GNU Emacs is free software: you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 3 of the License, or
+## (at your option) any later version.
+
+## GNU Emacs is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+
+## You should have received a copy of the GNU General Public License
+## along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+### Commentary:
+
+## This script takes as input Unicode's Blocks.txt
+## (http://www.unicode.org/Public/UNIDATA/Blocks.txt)
+## and produces output for Emacs's lisp/international/charscript.el.
+
+## It lumps together all the blocks belonging to the same language.
+## E.g., "Basic Latin", "Latin-1 Supplement", "Latin Extended-A",
+## etc. are all lumped together under "latin".
+
+## The Unicode blocks actually extend past some of these ranges with
+## undefined codepoints.
+
+## For additional details, see <http://debbugs.gnu.org/20789#11>.
+
+## Things to do after installing a new version of Blocks.txt:
+## Check the output against the old output.
+## Adjust the alias array, and the name2alias function for any new
+## entries, if necessary.
+## Check fix_start (and fix_end) to see if entries need adding/removing.
+## Review the hard-coded splits at the end of the main body.
+
+### Code:
+
+BEGIN {
+    ## Hard-coded names.  See name2alias for the rest.
+    alias["ipa extensions"] = "phonetic"
+    alias["letterlike symbols"] = "symbol"
+    alias["number forms"] = "symbol"
+    alias["miscellaneous technical"] = "symbol"
+    alias["control pictures"] = "symbol"
+    alias["optical character recognition"] = "symbol"
+    alias["enclosed alphanumerics"] = "symbol"
+    alias["box drawing"] = "symbol"
+    alias["block elements"] = "symbol"
+    alias["miscellaneous symbols"] = "symbol"
+    alias["cjk strokes"] = "cjk-misc"
+    alias["cjk symbols and punctuation"] = "cjk-misc"
+    alias["halfwidth and fullwidth forms"] = "cjk-misc"
+    alias["common indic number forms"] = "north-indic-number"
+
+    tohex["a"] = 10
+    tohex["b"] = 11
+    tohex["c"] = 12
+    tohex["d"] = 13
+    tohex["e"] = 14
+    tohex["f"] = 15
+
+    fix_start["0080"] = "00A0"
+    ## Define fix_end here if you need it.
+}
+
+## From admin/charsets/.
+## With gawk's --non-decimal-data switch we wouldn't need this.
+function decode_hex(str   , n, len, i, c) {
+  n = 0
+  len = length(str)
+  for (i = 1; i <= len; i++)
+    {
+      c = substr (str, i, 1)
+      if (c >= "0" && c <= "9")
+       n = n * 16 + (c - "0")
+      else
+       n = n * 16 + tohex[tolower(c)]
+    }
+  return n
+}
+
+function name2alias(name   , w, w2) {
+    name = tolower(name)
+    if (alias[name]) return alias[name]
+    else if (name ~ /for symbols/) return "symbol"
+    else if (name ~ /latin|combining .* marks|spacing modifier|tone 
letters|alphabetic presentation/) return "latin"
+    else if (name ~ /cjk|yijing|enclosed ideograph|kangxi/) return "han"
+    else if (name ~ /arabic/) return "arabic"
+    else if (name ~ /^greek/) return "greek"
+    else if (name ~ /^coptic/) return "coptic"
+    else if (name ~ /cuneiform number/) return 
"cuneiform-numbers-and-punctuation"
+    else if (name ~ /cuneiform/) return "cuneiform"
+    else if (name ~ /mathematical alphanumeric symbol/) return "mathematical"
+    else if (name ~ 
/punctuation|mathematical|arrows|currency|superscript|small form 
variants|geometric|dingbats|enclosed|alchemical|pictograph|emoticon|transport/) 
return "symbol"
+    else if (name ~ /canadian aboriginal/) return "canadian-aboriginal"
+    else if (name ~ /katakana|hiragana/) return "kana"
+    else if (name ~ /myanmar/) return "burmese"
+    else if (name ~ /hangul/) return "hangul"
+    else if (name ~ /khmer/) return "khmer"
+    else if (name ~ /braille/) return "braille"
+    else if (name ~ /^yi /) return "yi"
+    else if (name ~ /surrogates|private use|variation selectors/) return 0
+    else if (name ~/^(specials|tags)$/) return 0
+    else if (name ~ /linear b/) return "linear-b"
+    else if (name ~ /aramaic/) return "aramaic"
+    else if (name ~ /rumi num/) return "rumi-number"
+    else if (name ~ /duployan|shorthand/) return "duployan-shorthand"
+    else if (name ~ /sutton signwriting/) return "sutton-sign-writing"
+
+    sub(/ (extended|extensions|supplement).*/, "", name)
+    sub(/numbers/, "number", name)
+    sub(/numerals/, "numeral", name)
+    sub(/symbols/, "symbol", name)
+    sub(/forms$/, "form", name)
+    sub(/tiles$/, "tile", name)
+    sub(/^new /, "", name)
+    sub(/ (characters|hieroglyphs|cursive)$/, "", name)
+    gsub(/ /, "-", name)
+
+    return name
+}
+
+/^[0-9A-F]/ {
+    sep = index($1, "..")
+    len = length($1)
+    s = substr($1,1,sep-1)
+    e = substr($1,sep+2,len-sep-2)
+    $1 = ""
+    sub(/^ */, "", $0)
+    i++
+    start[i] = fix_start[s] ? fix_start[s] : s
+    end[i] = fix_end[e] ? fix_end[e]: e
+    name[i] = $0
+
+    alt[i] = name2alias(name[i])
+
+    if (!alt[i])
+    {
+        i--
+        next
+    }
+
+    ## Combine adjacent ranges with the same name.
+    if (alt[i] == alt[i-1] && decode_hex(start[i]) == 1 + decode_hex(end[i-1]))
+    {
+        end[i-1] = end[i]
+        name[i-1] = (name[i-1] ", " name[i])
+        i--
+    }
+
+    ## Some hard-coded splits.
+    if (start[i] == "0370")
+    {
+        end[i] = "03E1"
+        i++
+        start[i] = "03E2"
+        end[i] = "03EF"
+        alt[i] = "coptic"
+        i++
+        start[i] = "03F0"
+        end[i] = "03FF"
+        alt[i] = "greek"
+    }
+    else if (start[i] == "FB00")
+    {
+        end[i] = "FB06"
+        i++
+        start[i] = "FB13"
+        end[i] = "FB17"
+        alt[i] = "armenian"
+        i++
+        start[i] = "FB1D"
+        end[i] = "FB4F"
+        alt[i] = "hebrew"
+    }
+    else if (start[i] == "FF00")
+    {
+        end[i] = "FF60"
+        i++
+        start[i] = "FF61"
+        end[i] = "FF9F"
+        alt[i] = "kana"
+        i++
+        start[i] = "FFA0"
+        end[i] = "FFDF"
+        alt[i] = "hangul"
+        i++
+        start[i] = "FFE0"
+        end[i] = "FFEF"
+        alt[i] = "cjk-misc"
+    }
+}
+
+END {
+    print ";;; charscript.el --- character script table"
+    print ";;; Automatically generated from admin/unidata/Blocks.txt"
+    print "(let (script-list)"
+    print "  (dolist (elt '("
+
+    for (j=1;j<=i;j++)
+    {
+        printf("    (#x%s #x%s %s)", start[j], end[j], alt[j])
+        ## Fuzz to decide whether worth printing original name as a comment.
+        if (name[j] && alt[j] != tolower(name[j]) && alt[j] !~ /-/)
+            printf(" ; %s", name[j])
+        printf("\n")
+    }
+
+    print "    ))"
+    print "    (set-char-table-range char-script-table"
+    print "                      (cons (car elt) (nth 1 elt)) (nth 2 elt))"
+    print "    (or (memq (nth 2 elt) script-list)"
+    print "    (setq script-list (cons (nth 2 elt) script-list))))"
+    print "  (set-char-table-extra-slot char-script-table 0 (nreverse 
script-list)))"
+    print ""
+    print "(provide 'charscript)"
+}
diff --git a/admin/update_autogen b/admin/update_autogen
index 27d5303..23e1d40 100755
--- a/admin/update_autogen
+++ b/admin/update_autogen
@@ -94,7 +94,7 @@ changelog_flag=
 ldefs_in=lisp/loaddefs.el
 ldefs_out=lisp/ldefs-boot.el
 changelog_n=$(sed -n 's/CHANGELOG_HISTORY_INDEX_MAX *= *//p' Makefile.in)
-changelog_files="ChangeLog.$changelog_n build-aux/gitlog-to-emacslog"
+changelog_files="ChangeLog.$changelog_n"
 sources="configure.ac lib/Makefile.am"
 ## Files to copy into autogendir.
 ## Everything:
diff --git a/build-aux/gitlog-to-changelog b/build-aux/gitlog-to-changelog
index 9abb693..0cab1bf 100755
--- a/build-aux/gitlog-to-changelog
+++ b/build-aux/gitlog-to-changelog
@@ -3,7 +3,7 @@ eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}'
     if 0;
 # Convert git log output to ChangeLog format.
 
-my $VERSION = '2015-05-19 01:37'; # UTC
+my $VERSION = '2015-06-11 01:03'; # UTC
 # The definition above must lie within the first 8 lines in order
 # for the Emacs time-stamp write hook (at end) to update it.
 # If you change this file with Emacs, please let the write hook
@@ -270,6 +270,7 @@ sub git_dir_option($)
   my $prev_multi_paragraph;
   my $prev_date_line = '';
   my @prev_coauthors = ();
+  my @skipshas = ();
   while (1)
     {
       defined (my $in = <PIPE>)
@@ -290,6 +291,21 @@ sub git_dir_option($)
       $sha =~ /^[0-9a-fA-F]{40}$/
         or die "$ME:$.: invalid SHA1: $sha\n";
 
+      my $skipflag = 0;
+      if (@skipshas)
+        {
+          foreach(@skipshas)
+            {
+              if ($sha =~ /^$_/)
+                {
+                  $skipflag = 1;
+                  ## Perhaps only warn if a pattern matches more than once?
+                  warn "$ME: warning: skipping $sha due to $_\n";
+                  last;
+                }
+            }
+        }
+
       # If this commit's log requires any transformation, do it now.
       my $code = $amend_code->{$sha};
       if (defined $code)
@@ -348,9 +364,30 @@ sub git_dir_option($)
           while ($line[$#line] =~ /^\s*$/) { pop @line; }
         }
 
+      # Handle Emacs gitmerge.el "skipped" commits.
+      # Yes, this should be controlled by an option.  So sue me.
+      if ( grep /^(; )?Merge from /, @line )
+      {
+          my $found = 0;
+          foreach (@line)
+          {
+              if (grep /^The following commit.*skipped:$/, $_)
+              {
+                  $found = 1;
+                  ## Reset at each merge to reduce chance of false matches.
+                  @skipshas = ();
+                  next;
+              }
+              if ($found && $_ =~ /^([0-9a-fA-F]{7,}) [^ ]/)
+              {
+                  push ( @skipshas, $1 );
+              }
+          }
+      }
+
       # Ignore commits that match the --ignore-matching pattern, if specified.
-      if (! (defined $ignore_matching
-             && @line && $line[0] =~ /$ignore_matching/))
+      if (! ($skipflag || (defined $ignore_matching
+             && @line && $line[0] =~ /$ignore_matching/)))
         {
           if (defined $ignore_line && @line)
             {
diff --git a/build-aux/gitlog-to-emacslog b/build-aux/gitlog-to-emacslog
index e687708..4fec4de 100755
--- a/build-aux/gitlog-to-emacslog
+++ b/build-aux/gitlog-to-emacslog
@@ -23,7 +23,8 @@ LC_ALL=C
 export LC_ALL
 
 # The newest revision that should not appear in the generated ChangeLog.
-gen_origin=0700eb152da4c57419a391161107b48d81abdeb2
+gen_origin=
+
 force=
 output=ChangeLog
 nmax=2
@@ -45,6 +46,22 @@ if [ ! -f ChangeLog.$nmax ]; then
     exit 1
 fi
 
+# If not specified in the command line, get gen_origin from the existing
+# ChangeLog file.
+[ "$gen_origin" ] || {
+    gen_origin_line=`
+      grep -E '^commit [0-9a-f]+ [(]inclusive[)]' ChangeLog.$nmax
+    ` || {
+       echo "ChangeLog.$nmax lacks a 'commit ... (inclusive)' line" >&2
+       exit 1
+    }
+    set $gen_origin_line
+    gen_origin=$2
+}
+
+# Get the new value for gen_origin from the latest version in the repository.
+new_origin=`git log --pretty=format:%H 'HEAD^!'` || exit
+
 if [ -f "$output" ]; then
     [ ! "$force" ] && echo "$output exists" >&2 && exit 1
     rm -f "$output" || exit 1
@@ -57,9 +74,12 @@ test -d .git || {
 }
 
 # Use Gnulib's packaged ChangeLog generator.
-./build-aux/gitlog-to-changelog --ignore-matching='^; ' \
+# Maybe we should skip all "Merge branch 'master'" messages.
+# See eg the cairo-related ones.
+./build-aux/gitlog-to-changelog \
+    --ignore-matching="^; |^Merge branch 'master' of 
git\.(savannah|sv)\.gnu\.org:/srv/git/emacs$" \
   --ignore-line='^; ' --format='%B' \
-  "$gen_origin.." >"ChangeLog.tmp" || exit
+  "$gen_origin..$new_origin" >"ChangeLog.tmp" || exit
 
 if test -s "ChangeLog.tmp"; then
 
@@ -90,10 +110,13 @@ if test -s "ChangeLog.tmp"; then
     year_range=$start_year-$end_year
   fi
 
-  # Append a proper copyright notice.
+  # Update gen_origin and append a proper copyright notice.
   sed -n '
     1i\
 
+    /^This file records repository revisions/p
+    s/^commit [0-9a-f]* (exclusive)/commit '"$gen_origin"' (exclusive)/p
+    s/^commit [0-9a-f]* (inclusive)/commit '"$new_origin"' (inclusive)/p
     /^See ChangeLog.[0-9]* for earlier/,${
        s/ChangeLog\.[0-9]*/ChangeLog.'$nmax'/
        s/\(Copyright[ (C)]*\)[0-9]*-[0-9]*/\1'"$year_range"'/
diff --git a/build-aux/update-copyright b/build-aux/update-copyright
index 4eb4b93..8cc36e2 100755
--- a/build-aux/update-copyright
+++ b/build-aux/update-copyright
@@ -124,7 +124,7 @@ use strict;
 use warnings;
 
 my $copyright_re = 'Copyright';
-my $circle_c_re = '(?:\([cC]\)|@copyright{}|\\\\\(co|&copy;)';
+my $circle_c_re = '(?:\([cC]\)|@copyright\{}|\\\\\(co|&copy;)';
 my $holder = $ENV{UPDATE_COPYRIGHT_HOLDER};
 $holder ||= 'Free Software Foundation, Inc.';
 my $prefix_max = 5;
diff --git a/build-aux/update-subdirs b/build-aux/update-subdirs
index d544b22..f0ce039 100755
--- a/build-aux/update-subdirs
+++ b/build-aux/update-subdirs
@@ -47,6 +47,7 @@ else
 ;; Local" "Variables:
 ;; version-control: never
 ;; no-byte-compile: t
+;; no-update-autoloads: t
 ;; End:" > subdirs.el~
   if cmp "subdirs.el" "subdirs.el~" >/dev/null 2>&1; then
     rm subdirs.el~
diff --git a/configure.ac b/configure.ac
index d1a12e6..f291a60 100644
--- a/configure.ac
+++ b/configure.ac
@@ -341,7 +341,9 @@ OPTION_DEFAULT_ON([m17n-flt],[don't use m17n-flt for text 
shaping])
 OPTION_DEFAULT_ON([toolkit-scroll-bars],[don't use Motif or Xaw3d scroll bars])
 OPTION_DEFAULT_ON([xaw3d],[don't use Xaw3d])
 OPTION_DEFAULT_ON([xim],[don't use X11 XIM])
-OPTION_DEFAULT_OFF([ns],[use NeXTstep (Cocoa or GNUstep) windowing system])
+AC_ARG_WITH([ns],[AS_HELP_STRING([--with-ns],
+[use Nextstep (OS X Cocoa or GNUstep) windowing system.
+On by default on Mac OS X.])],[],[with_ns=maybe])
 OPTION_DEFAULT_OFF([w32], [use native MS Windows GUI in a Cygwin build])
 
 OPTION_DEFAULT_ON([gpm],[don't use -lgpm for mouse support on a GNU/Linux 
console])
@@ -1749,6 +1751,7 @@ else
   fi
 fi
 
+test "${with_ns}" = maybe && test "${opsys}" != darwin && with_ns=no
 HAVE_NS=no
 NS_GNUSTEP_CONFIG=no
 NS_IMPL_COCOA=no
@@ -1819,8 +1822,9 @@ fail;
   CFLAGS="$CFLAGS $GNU_OBJC_CFLAGS"
 
   AC_CHECK_HEADER([AppKit/AppKit.h], [HAVE_NS=yes],
-                 [AC_MSG_ERROR(['--with-ns' was specified, but the include
-  files are missing or cannot be compiled.])])
+                 [AC_MSG_ERROR([The include files (AppKit/AppKit.h etc) that
+are required for a Nextstep build are missing or cannot be compiled.
+Either fix this, or re-configure with the option '--without-ns'.])])
 
   macfont_file=""
   if test "${NS_IMPL_COCOA}" = "yes"; then
@@ -2411,7 +2415,6 @@ if test "${opsys}" != "mingw32"; then
        AC_DEFINE(HAVE_GTK3, 1, [Define to 1 if using GTK 3 or later.])
        GTK_OBJ=emacsgtkfixed.o
        gtk_term_header=gtkutil.h
-       USE_CAIRO=yes
        USE_GTK_TOOLKIT="GTK3"
        if test "x$ac_enable_gtk_deprecation_warnings" = x; then
         AC_DEFINE([GDK_DISABLE_DEPRECATION_WARNINGS], [1],
@@ -2710,7 +2713,7 @@ NOTIFY_SUMMARY=no
 
 dnl FIXME?  Don't auto-detect on NS, but do allow someone to specify
 dnl a particular library.  This doesn't make much sense?
-if test "${with_ns}" = yes && test ${with_file_notification} = yes; then
+if test "${HAVE_ns}" = yes && test ${with_file_notification} = yes; then
   with_file_notification=no
 fi
 
@@ -4036,7 +4039,7 @@ AC_SUBST(KRB4LIB)
 
 AC_CHECK_HEADERS(valgrind/valgrind.h)
 
-AC_CHECK_FUNCS_ONCE(tzalloc tzset)
+AC_CHECK_FUNCS_ONCE(tzset)
 
 ok_so_far=yes
 AC_CHECK_FUNC(socket, , ok_so_far=no)
@@ -4437,14 +4440,17 @@ case $opsys in
     ;;
 
   sol2* )
-    dnl On SysVr4, grantpt(3) forks a subprocess, so keep sigchld_handler()
+    dnl On SysVr4, grantpt(3) forks a subprocess, so do not use
+    dnl O_CLOEXEC when opening the pty, and keep the SIGCHLD handler
     dnl from intercepting that death.  If any child but grantpt's should die
     dnl within, it should be caught after sigrelse(2).
+    AC_DEFINE(PTY_OPEN, [fd = open (pty_name, O_RDWR | O_NONBLOCK)])
     AC_DEFINE(PTY_TTY_NAME_SPRINTF, [{ char *ptsname (int), *ptyname; int 
grantpt_result; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, 
SIGCHLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); grantpt_result = grantpt 
(fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (grantpt_result == -1 || 
unlockpt (fd) == -1 || !(ptyname = ptsname (fd))) { emacs_close (fd); return 
-1; } snprintf (pty_name, PTY_NAME_SIZE, "%s", ptyname); }])
     ;;
 
   unixware )
     dnl Comments are as per sol2*.
+    AC_DEFINE(PTY_OPEN, [fd = open (pty_name, O_RDWR | O_NONBLOCK)])
     AC_DEFINE(PTY_TTY_NAME_SPRINTF, [{ char *ptsname (int), *ptyname; int 
grantpt_result; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, 
SIGCHLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); grantpt_result = grantpt 
(fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (grantpt_result == -1) 
fatal("could not grant slave pty"); if (unlockpt(fd) == -1) fatal("could not 
unlock slave pty"); if (!(ptyname = ptsname(fd))) fatal ("could not enable 
slave pty"); snprintf (pty_name, P [...]
     ;;
 esac
@@ -4457,7 +4463,7 @@ case $opsys in
     AC_DEFINE(FIRST_PTY_LETTER, ['z'])
     AC_DEFINE(PTY_NAME_SPRINTF, [strcpy (pty_name, "/dev/ptmx");])
     dnl Push various streams modules onto a PTY channel.  Used in process.c.
-    AC_DEFINE(SETUP_SLAVE_PTY, [if (ioctl (xforkin, I_PUSH, "ptem") == -1) 
fatal ("ioctl I_PUSH ptem"); if (ioctl (xforkin, I_PUSH, "ldterm") == -1) fatal 
("ioctl I_PUSH ldterm"); if (ioctl (xforkin, I_PUSH, "ttcompat") == -1) fatal 
("ioctl I_PUSH ttcompat");], [How to set up a slave PTY, if needed.])
+    AC_DEFINE(SETUP_SLAVE_PTY, [if (ioctl (forkin, I_PUSH, "ptem") == -1) 
fatal ("ioctl I_PUSH ptem"); if (ioctl (forkin, I_PUSH, "ldterm") == -1) fatal 
("ioctl I_PUSH ldterm"); if (ioctl (forkin, I_PUSH, "ttcompat") == -1) fatal 
("ioctl I_PUSH ttcompat");], [How to set up a slave PTY, if needed.])
     ;;
 esac
 
@@ -4590,9 +4596,7 @@ if test $emacs_cv_func_sigsetjmp = yes; then
 fi
 
 # We need all of these features to handle C stack overflows.
-if test "$ac_cv_header_sys_resource_h" = "yes" &&
-   test "$ac_cv_func_getrlimit" = "yes" &&
-   test "$emacs_cv_func_sigsetjmp" = "yes" &&
+if test "$emacs_cv_func_sigsetjmp" = "yes" &&
    test "$emacs_cv_alternate_stack" = yes; then
   AC_DEFINE([HAVE_STACK_OVERFLOW_HANDLING], 1,
     [Define to 1 if C stack overflow can be handled in some cases.])
@@ -5185,15 +5189,26 @@ fi
 
 optsep=
 emacs_config_features=
-for opt in XAW3D XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS \
+for opt in XAW3D XPM JPEG TIFF GIF PNG RSVG CAIRO IMAGEMAGICK SOUND GPM DBUS \
   GCONF GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT \
-  LIBOTF XFT ZLIB; do
+  LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS X_TOOLKIT X11 NS; do
 
     case $opt in
       NOTIFY|ACL) eval val=\${${opt}_SUMMARY} ;;
+      CAIRO|TOOLKIT_SCROLL_BARS|X_TOOLKIT) eval val=\${USE_$opt} ;;
       *) eval val=\${HAVE_$opt} ;;
     esac
-    test x"$val" = xno && continue
+    case x$val in
+      xno|xnone|x) continue ;;
+    esac
+    case $opt in
+      X_TOOLKIT)
+        case $val in
+          GTK*|LUCID|MOTIF) opt=$val ;;
+          *) continue ;;
+        esac
+      ;;
+    esac
     AS_VAR_APPEND([emacs_config_features], ["$optsep$opt"])
     optsep=' '
 done
diff --git a/doc/emacs/arevert-xtra.texi b/doc/emacs/arevert-xtra.texi
index 32b5463..9d35610 100644
--- a/doc/emacs/arevert-xtra.texi
+++ b/doc/emacs/arevert-xtra.texi
@@ -47,9 +47,10 @@ explained in the corresponding sections.
 @subsection Auto Reverting the Buffer Menu
 
 If auto-reverting of non-file buffers is enabled, the Buffer Menu
-automatically reverts every @code{auto-revert-interval} seconds,
-whether there is a need for it or not.  (It would probably take longer
-to check whether there is a need than to actually revert.)
+(@pxref{Several Buffers}) automatically reverts every
address@hidden seconds, whether there is a need for it or
+not.  (It would probably take longer to check whether there is a need
+than to actually revert.)
 
 If the Buffer Menu inappropriately gets marked modified, just revert
 it manually using @kbd{g} and auto-reverting will resume.  However, if
diff --git a/doc/emacs/basic.texi b/doc/emacs/basic.texi
index cc9602e..0a43910 100644
--- a/doc/emacs/basic.texi
+++ b/doc/emacs/basic.texi
@@ -104,10 +104,22 @@ the letters @kbd{a} to @kbd{f} serve as part of a 
character code,
 just like digits.  Case is ignored.
 
 @findex insert-char
address@hidden C-x 8 RET
address@hidden C-x 8
 @cindex Unicode characters, inserting
 @cindex insert Unicode character
 @cindex characters, inserting by name or code-point
address@hidden curly quotes
address@hidden curved quotes
+  A few common Unicode characters can be inserted via a command
+starting with @kbd{C-x 8}.  For example, @kbd{C-x 8 [} inserts @t{‘}
+which is Unicode code-point @code{U+2018} LEFT SINGLE QUOTATION MARK,
+sometimes called a left single ``curved quote'' or ``curly quote''.
+Similarly, @kbd{C-x 8 ]}, @kbd{C-x 8 @{} and @kbd{C-x 8 @}} insert the
+curved quotes @t{’}, @t{“} and @t{”}, respectively.  Also, a working
+Alt key acts like @kbd{C-x 8}; e.g., @kbd{A-[} acts like @kbd{C-x 8 [}
+and inserts @t{‘}.  To see which characters have @kbd{C-x 8}
+shorthands, type @kbd{C-x 8 C-h}.
+
   Alternatively, you can use the command @kbd{C-x 8 @key{RET}}
 (@code{insert-char}).  This prompts for the Unicode name or code-point
 of a character, using the minibuffer.  If you enter a name, the
@@ -116,16 +128,7 @@ code-point, it should be as a hexadecimal number (the 
convention for
 Unicode), or a number with a specified radix, e.g., @code{#o23072}
 (octal); @xref{Integer Basics,,, elisp, The Emacs Lisp Reference
 Manual}.  The command then inserts the corresponding character into
-the buffer.  For example, both of the following insert the infinity
-sign (Unicode code-point @code{U+221E}):
-
address@hidden
address@hidden 8 @key{RET} infinity @key{RET}}
address@hidden 8 @key{RET} 221e @key{RET}}
address@hidden example
-
-  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}).
+the buffer.
 
   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’}
@@ -133,6 +136,20 @@ using single quotation marks.  Similarly, typing a 
quotation @t{``like
 this''} using double grave accent and apostrophe converts it to a form
 @t{“like this”} using double quotation marks.  @xref{Quotation Marks}.
 
+  For example, the following all insert the same character:
+
address@hidden
address@hidden 8 @key{RET} left single quotation mark @key{RET}}
address@hidden 8 @key{RET} left sin @key{TAB} @key{RET}}
address@hidden 8 @key{RET} 2018 @key{RET}}
address@hidden 8 [}
address@hidden  @r{(if the Alt key works)}
address@hidden    @r{(in Electric Quote mode)}
address@hidden example
+
+  A numeric argument to @kbd{C-q} or @kbd{C-x 8 ...} specifies
+how many copies of the character to insert (@pxref{Arguments}).
+
 @node Moving Point
 @section Changing the Location of Point
 
diff --git a/doc/emacs/buffers.texi b/doc/emacs/buffers.texi
index 25b13d6..c217c09 100644
--- a/doc/emacs/buffers.texi
+++ b/doc/emacs/buffers.texi
@@ -226,10 +226,10 @@ Scroll through buffer @var{buffer}.  @xref{View Mode}.
 @cindex read-only buffer
   A buffer can be @dfn{read-only}, which means that commands to change
 its contents are not allowed.  The mode line indicates read-only
-buffers with @samp{%%} or @samp{%*} near the left margin.  Read-only
-buffers are usually made by subsystems such as Dired and Rmail that
-have special commands to operate on the text; also by visiting a file
-whose access control says you cannot write it.
+buffers with @samp{%%} or @samp{%*} near the left margin.  @xref{Mode
+Line}.  Read-only buffers are usually made by subsystems such as Dired
+and Rmail that have special commands to operate on the text; also by
+visiting a file whose access control says you cannot write it.
 
 @findex read-only-mode
 @vindex view-read-only
@@ -349,7 +349,7 @@ the Customization buffer to set the variable 
@code{midnight-mode} to
 @table @kbd
 @item M-x buffer-menu
 Begin editing a buffer listing all Emacs buffers.
address@hidden M-x buffer-menu-other-window.
address@hidden M-x buffer-menu-other-window
 Similar, but do it in another window.
 @end table
 
@@ -520,7 +520,7 @@ the @var{n}-th column (@code{tabulated-list-sort}).
 @findex Buffer-menu-toggle-files-only
 @kindex T @r{(Buffer Menu)}
 Delete, or reinsert, lines for non-file buffers
address@hidden).  This command toggles the
+(@code{Buffer-menu-toggle-files-only}).  This command toggles the
 inclusion of such buffers in the buffer list.
 @end table
 
diff --git a/doc/emacs/calendar.texi b/doc/emacs/calendar.texi
index 03a484b..6b21dda 100644
--- a/doc/emacs/calendar.texi
+++ b/doc/emacs/calendar.texi
@@ -206,7 +206,7 @@ Move point to today's date (@code{calendar-goto-today}).
   @kbd{g d} (@code{calendar-goto-date}) prompts for a year, a month, and a day
 of the month, and then moves to that date.  Because the calendar includes all
 dates from the beginning of the current era, you must type the year in its
-entirety; that is, type @samp{1990}, not @samp{90}.
+entirety; that is, type @samp{2010}, not @samp{10}.
 
 @kindex g D @r{(Calendar mode)}
 @findex calendar-goto-day-of-year
@@ -919,46 +919,95 @@ years, and then displays the list of yahrzeit dates.
 
   The Emacs diary keeps track of appointments or other events on a daily
 basis, in conjunction with the calendar.  To use the diary feature, you
-must first create a @dfn{diary file} containing a list of events and
+must first create a diary file containing a list of events and
 their dates.  Then Emacs can automatically pick out and display the
 events for today, for the immediate future, or for any specified
 date.
 
-  The name of the diary file is specified by the variable
address@hidden; @file{~/diary} is the default.  Here's an example
-showing what that file looks like:
+  Although you probably will start by creating a diary manually, Emacs
+provides a number of commands to let you view, add, and change diary
+entries.
+
address@hidden
+* Format of Diary File::   Entering events in your diary.
+* Displaying the Diary::   Viewing diary entries and associated calendar dates.
+* Date Formats::           Various ways you can specify dates.
+* Adding to Diary::        Commands to create diary entries.
+* Special Diary Entries::  Anniversaries, blocks of dates, cyclic entries, etc.
address@hidden menu
+
address@hidden Format of Diary File
address@hidden The Diary File
address@hidden diary file
+
address@hidden diary-file
+  Your @dfn{diary file} is a file that records events associated with
+particular dates.  The name of the diary file is specified by the
+variable @code{diary-file}.  The default is @file{~/.emacs.d/diary},
+though for compatibility with older versions Emacs will use
address@hidden/diary} if it exists.
address@hidden
address@hidden I don't think this is relevant any more.  The utility doesn't 
seem
address@hidden to be part of the default install on GNU/Linux machines these 
days.
address@hidden When I tried it with my basic diary file, it just died with an 
error.
+The @code{calendar} utility program supports a subset of the format
+allowed by the Emacs diary facilities, so you can use that utility to
+view the diary file, with reasonable results aside from the entries it
+cannot understand.
address@hidden ignore
+
+  Each entry in the diary file describes one event and consists of one
+or more lines.  An entry always begins with a date specification at the
+left margin.  The rest of the entry is simply text to describe the
+event.  If the entry has more than one line, then the lines after the
+first must begin with whitespace to indicate they continue a previous
+entry.  Lines that do not begin with valid dates and do not continue a
+preceding entry are ignored.  Here's an example:
 
 @example
-12/22/2012  Twentieth wedding anniversary!!
-&1/1.       Happy New Year!
+12/22/2015  Twentieth wedding anniversary!
 10/22       Ruth's birthday.
 * 21, *:    Payday
 Tuesday--weekly meeting with grad students at 10am
          Supowit, Shen, Bitner, and Kapoor to attend.
 1/13/89     Friday the thirteenth!!
-&thu 4pm    squash game with Lloyd.
+thu 4pm     squash game with Lloyd.
 mar 16      Dad's birthday
-April 15, 2013 Income tax due.
-&* 15       time cards due.
+April 15, 2016 Income tax due.
+* 15        time cards due.
 @end example
 
 @noindent
-This format is essentially the same as the one used by the separate
address@hidden utility that is present on some Unix systems.  This
-example uses extra spaces to align the event descriptions of most of
-the entries.  Such formatting is purely a matter of taste.
+This example uses extra spaces to align the event descriptions of most
+of the entries.  Such formatting is purely a matter of taste.
 
-  Although you probably will start by creating a diary manually, Emacs
-provides a number of commands to let you view, add, and change diary
-entries.
+  You can also use a format where the first line of a diary entry
+consists only of the date or day name (with no following blanks or
+punctuation).  For example:
 
address@hidden
-* Displaying the Diary::   Viewing diary entries and associated calendar dates.
-* Format of Diary File::   Entering events in your diary.
-* Date Formats::           Various ways you can specify dates.
-* Adding to Diary::        Commands to create diary entries.
-* Special Diary Entries::  Anniversaries, blocks of dates, cyclic entries, etc.
address@hidden menu
address@hidden
+02/11/2012
+      Bill B. visits Princeton today
+      2pm Cognitive Studies Committee meeting
+      2:30-5:30 Liz at Lawrenceville
+      4:00pm Dentist appt
+      7:30pm Dinner at George's
+      8:00-10:00pm concert
address@hidden example
+
address@hidden
+This entry will have a different appearance if you use the simple diary
+display
address@hidden
+(@pxref{Diary Display,,, emacs-xtra, Specialized Emacs Features}).
address@hidden iftex
address@hidden
+(@pxref{Diary Display}).
address@hidden ifnottex
+The simple diary display omits the date line at the beginning; only the
+continuation lines appear.  This style of entry looks neater when you
+display just a single day's entries, but can cause confusion if you ask
+for more than one day's entries.
 
 @node Displaying the Diary
 @subsection Displaying the Diary
@@ -990,9 +1039,9 @@ Mail yourself email reminders about upcoming diary entries.
 @kindex d @r{(Calendar mode)}
 @findex diary-view-entries
 @vindex calendar-view-diary-initially-flag
-  Displaying the diary entries with @kbd{d} shows in a separate window
+  Displaying the diary entries with @kbd{d} shows in a separate buffer
 the diary entries for the selected date in the calendar.  The mode line
-of the new window shows the date of the diary entries.  Holidays are
+of the new buffer shows the date of the diary entries.  Holidays are
 shown either in the buffer or in the mode line, depending on the display
 method you choose
 @iftex
@@ -1032,6 +1081,15 @@ turns off holiday marks (@pxref{Holidays}).  If the 
variable
 @code{calendar-mark-diary-entries-flag} is address@hidden, creating or
 updating the calendar marks diary dates automatically.
 
address@hidden diary-nonmarking-symbol
+  To prevent an individual diary entry from being marked in the
+calendar, insert the string that @code{diary-nonmarking-symbol}
+specifies (the default is @samp{&}) at the beginning of the entry,
+before the date.  This has no effect on display of the entry in the
+diary buffer; it only affects marks on dates in the calendar.
+Nonmarking entries can be useful for generic entries that would
+otherwise mark many different dates.
+
 @kindex s @r{(Calendar mode)}
 @findex diary-show-all-entries
   To see the full diary file, rather than just some of the entries, use
@@ -1061,65 +1119,6 @@ diary-mail-entries}.  A prefix argument specifies how 
many days
 (starting with today) to check; otherwise, the variable
 @code{diary-mail-days} says how many days.
 
address@hidden Format of Diary File
address@hidden The Diary File
address@hidden diary file
-
address@hidden diary-file
-  Your @dfn{diary file} is a file that records events associated with
-particular dates.  The name of the diary file is specified by the
-variable @code{diary-file}; @file{~/diary} is the default.  The
address@hidden utility program supports a subset of the format allowed
-by the Emacs diary facilities, so you can use that utility to view the
-diary file, with reasonable results aside from the entries it cannot
-understand.
-
-  Each entry in the diary file describes one event and consists of one
-or more lines.  An entry always begins with a date specification at the
-left margin.  The rest of the entry is simply text to describe the
-event.  If the entry has more than one line, then the lines after the
-first must begin with whitespace to indicate they continue a previous
-entry.  Lines that do not begin with valid dates and do not continue a
-preceding entry are ignored.
-
-  You can also use a format where the first line of a diary entry
-consists only of the date or day name (with no following blanks or
-punctuation).  For example:
-
address@hidden
-02/11/2012
-      Bill B. visits Princeton today
-      2pm Cognitive Studies Committee meeting
-      2:30-5:30 Liz at Lawrenceville
-      4:00pm Dentist appt
-      7:30pm Dinner at George's
-      8:00-10:00pm concert
address@hidden example
-
address@hidden
-This entry will have a different appearance if you use the simple diary
-display
address@hidden
-(@pxref{Diary Display,,, emacs-xtra, Specialized Emacs Features}).
address@hidden iftex
address@hidden
-(@pxref{Diary Display}).
address@hidden ifnottex
-The simple diary display omits the date line at the beginning; only the
-continuation lines appear.  This style of entry looks neater when you
-display just a single day's entries, but can cause confusion if you ask
-for more than one day's entries.
-
address@hidden diary-nonmarking-symbol
-  You can inhibit the marking of certain diary entries in the calendar
-window; to do this, insert the string that
address@hidden specifies (default @samp{&}) at the
-beginning of the entry, before the date.  This
-has no effect on display of the entry in the diary window; it only
-affects marks on dates in the calendar window.  Nonmarking entries are
-especially useful for generic entries that would otherwise mark many
-different dates.
-
 @node Date Formats
 @subsection Date Formats
 
@@ -1271,12 +1270,12 @@ entry.  The entry looks like this:
 
 @findex diary-anniversary
 @example
-%%(diary-anniversary 10 31 1948) Arthur's birthday
+%%(diary-anniversary 10 31 1988) Arthur's birthday
 @end example
 
 @noindent
-This entry applies to October 31 in any year after 1948; @samp{10 31
-1948} specifies the date.  (If you are using the European or ISO
+This entry applies to October 31 in any year after 1988; @samp{10 31
+1988} specifies the date.  (If you are using the European or ISO
 calendar style, the input order of month, day and year is different.)
 The reason this expression requires a beginning year is that advanced
 diary functions can use it to calculate the number of elapsed years.
diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi
index 53bea52..601a40b 100644
--- a/doc/emacs/display.texi
+++ b/doc/emacs/display.texi
@@ -699,8 +699,9 @@ terminals.
 This face is used for the prompt strings displayed in the minibuffer.
 By default, Emacs automatically adds this face to the value of
 @code{minibuffer-prompt-properties}, which is a list of text
-properties used to display the prompt text.  (This variable takes
-effect when you enter the minibuffer.)
+properties (@pxref{Text Properties,,, elisp, the Emacs Lisp Reference
+Manual}) used to display the prompt text.  (This variable takes effect
+when you enter the minibuffer.)
 @item fringe
 @cindex @code{fringe} face
 The face for the fringes to the left and right of windows on graphic
@@ -1079,10 +1080,11 @@ end''.  If the line's direction is right-to-left 
(@pxref{Bidirectional
 Editing}), the meanings of the curving arrows in the fringes are
 swapped.
 
-  The fringes indicate line truncation with short horizontal arrows
-meaning ``there's more text on this line which is scrolled
-horizontally out of view''.  Clicking the mouse on one of the arrows
-scrolls the display horizontally in the direction of the arrow.
+  The fringes indicate line truncation (@pxref{Line Truncation}) with
+short horizontal arrows meaning ``there's more text on this line which
+is scrolled horizontally out of view''.  Clicking the mouse on one of
+the arrows scrolls the display horizontally in the direction of the
+arrow.
 
   The fringes can also indicate other things, such as buffer
 boundaries (@pxref{Displaying Boundaries}), and where a program you
@@ -1110,13 +1112,14 @@ how the buffer boundaries and window scrolling is 
indicated in the
 fringes.  If the value is @code{left} or @code{right}, both angle and
 arrow bitmaps are displayed in the left or right fringe, respectively.
 
-  If value is an alist, each element @code{(@var{indicator} .
address@hidden)} specifies the position of one of the indicators.
-The @var{indicator} must be one of @code{top}, @code{bottom},
address@hidden, @code{down}, or @code{t} which specifies the default
-position for the indicators not present in the alist.
-The @var{position} is one of @code{left}, @code{right}, or @code{nil}
-which specifies not to show this indicator.
+  If value is an alist (@pxref{Association Lists,,, elisp, the Emacs
+Lisp Reference Manual}), each element @code{(@var{indicator} .
address@hidden)} specifies the position of one of the indicators.  The
address@hidden must be one of @code{top}, @code{bottom}, @code{up},
address@hidden, or @code{t} which specifies the default position for the
+indicators not present in the alist.  The @var{position} is one of
address@hidden, @code{right}, or @code{nil} which specifies not to show
+this indicator.
 
   For example, @code{((top . left) (t . right))} places the top angle
 bitmap in left fringe, the bottom angle bitmap in right fringe, and
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi
index 713bf8b..5f53f9b 100644
--- a/doc/emacs/emacs.texi
+++ b/doc/emacs/emacs.texi
@@ -961,8 +961,8 @@ Conversion To and From Other Calendars
 
 The Diary
 
-* Displaying the Diary::   Viewing diary entries and associated calendar dates.
 * Format of Diary File::   Entering events in your diary.
+* Displaying the Diary::   Viewing diary entries and associated calendar dates.
 * Date Formats::           Various ways you can specify dates.
 * Adding to Diary::        Commands to create diary entries.
 * Special Diary Entries::  Anniversaries, blocks of dates, cyclic entries, etc.
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi
index 3a281d2..6ff59b4 100644
--- a/doc/emacs/files.texi
+++ b/doc/emacs/files.texi
@@ -1476,9 +1476,9 @@ unified format to context format.  When the mark is 
active, convert
 only the text within the region.
 
 @item C-c C-w
address@hidden diff-refine-hunk
-Refine the current hunk so that it disregards changes in whitespace
-(@code{diff-refine-hunk}).
address@hidden diff-ignore-whitespace-hunk
+Re-diff the current hunk, disregarding changes in whitespace
+(@code{diff-ignore-whitespace-hunk}).
 
 @item C-x 4 A
 @findex diff-add-change-log-entries-other-window
@@ -1745,7 +1745,8 @@ owner, are supported only for some of the archive formats.
 and repack archives.  However, you don't need these programs to look
 at the archive table of contents, only to extract or manipulate the
 subfiles in the archive.  Details of the program names and their
-options can be set in the @samp{Archive} Customize group.
+options can be set in the @samp{Archive} Customize group
+(@pxref{Customization Groups}).
 
 @node Remote Files
 @section Remote Files
@@ -1945,6 +1946,7 @@ opened files.  @kbd{M-x recentf-save-list} saves the 
current
 @code{recent-file-list} to a file, and @kbd{M-x recentf-edit-list}
 edits it.
 
address@hidden FIXME partial-completion-mode (complete.el) is obsolete.
   The @kbd{M-x ffap} command generalizes @code{find-file} with more
 powerful heuristic defaults (@pxref{FFAP}), often based on the text at
 point.  Partial Completion mode offers other features extending
@@ -1986,8 +1988,8 @@ address@hidden  With @kbd{f} (@code{image-next-frame}) 
and @kbd{b}
 (@code{image-previous-frame}) you can step through the individual
 frames.  Both commands accept a numeric prefix to step through several
 frames at once.  You can go to a specific frame with @kbd{F}
-(@code{image-goto-frame}).  Typing @kbd{a +}
-(@code{image-increase-speed}) increases the speed of the animation,
+(@code{image-goto-frame}).  Frames are indexed from 1.  Typing @kbd{a
++} (@code{image-increase-speed}) increases the speed of the animation,
 @kbd{a -} (@code{image-decrease-speed}) decreases it, and @kbd{a r}
 (@code{image-reverse-speed}) reverses it.  The command @kbd{a 0}
 (@code{image-reset-speed}) resets the speed to the original value.
diff --git a/doc/emacs/fixit.texi b/doc/emacs/fixit.texi
index 9c3f36a..953b22f 100644
--- a/doc/emacs/fixit.texi
+++ b/doc/emacs/fixit.texi
@@ -78,6 +78,7 @@ the undo command.
 previous undo commands, use @kbd{M-x undo-only}.  This is like
 @code{undo}, but will not redo changes you have just undone.
 
address@hidden What about @kbd{M-x revert-buffer}? --xfq
   If you notice that a buffer has been modified accidentally, the
 easiest way to recover is to type @kbd{C-/} repeatedly until the stars
 disappear from the front of the mode line (@pxref{Mode Line}).
@@ -403,10 +404,17 @@ mode in the current buffer.  To enable Flyspell mode in 
all text mode
 buffers, add @code{flyspell-mode} to @code{text-mode-hook}.
 @xref{Hooks}.
 
address@hidden flyspell-correct-word
address@hidden flyspell-auto-correct-word
address@hidden flyspell-correct-word-before-point
   When Flyspell mode highlights a word as misspelled, you can click on
-it with @kbd{Mouse-2} to display a menu of possible corrections and
-actions.  You can also correct the word by editing it manually in any
-way you like.
+it with @kbd{Mouse-2} (@code{flyspell-correct-word}) to display a menu
+of possible corrections and actions.  In addition, @kbd{C-.} or
address@hidden@address@hidden (@code{flyspell-auto-correct-word}) will
+propose various successive corrections for the word at point, and
address@hidden $} (@code{flyspell-correct-word-before-point}) will pop up a
+menu of possible corrections.  Of course, you can always correct the
+misspelled word by editing it manually in any way you like.
 
 @findex flyspell-prog-mode
   Flyspell Prog mode works just like ordinary Flyspell mode, except
diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi
index f401c8f..2ae7300 100644
--- a/doc/emacs/frames.texi
+++ b/doc/emacs/frames.texi
@@ -54,6 +54,7 @@ for doing so on MS-DOS).  Menus are supported on all text 
terminals.
 * Multiple Displays::   How one Emacs instance can talk to several displays.
 * Frame Parameters::    Changing the colors and other modes of frames.
 * Scroll Bars::         How to enable and disable scroll bars; how to use them.
+* Window Dividers::     Window separators that can be dragged with the mouse.
 * Drag and Drop::       Using drag and drop to open files and insert text.
 * Menu Bars::           Enabling and disabling the menu bar.
 * Tool Bars::           Enabling and disabling the tool bar.
@@ -411,8 +412,8 @@ Select a Dired buffer for directory @var{directory} in 
another frame.
 This runs @code{dired-other-frame}.  @xref{Dired}.
 @item C-x 5 m
 Start composing a mail message in another frame.  This runs
address@hidden  It is the other-frame variant of @kbd{C-x m}.
address@hidden Mail}.
address@hidden  It is the other-frame variant of
address@hidden m}.  @xref{Sending Mail}.
 @item C-x 5 .
 Find a tag in the current tag table in another frame.  This runs
 @code{find-tag-other-frame}, the multiple-frame variant of @kbd{M-.}.
@@ -443,7 +444,7 @@ error if there is only one frame.
 @item C-z
 @kindex C-z @r{(X windows)}
 @findex suspend-frame
-Minimize (or ``iconify) the selected Emacs frame
+Minimize (or ``iconify'') the selected Emacs frame
 (@code{suspend-frame}).  @xref{Exiting}.
 
 @item C-x 5 o
@@ -573,7 +574,7 @@ the following form:
 @end example
 
 @noindent
-Within this format, any of the elements in braces may be omitted.
+Within this format, any of the elements in brackets may be omitted.
 Here, @var{fontname} is the @dfn{family name} of the font, such as
 @samp{Monospace} or @samp{DejaVu Sans Mono}; @var{fontsize} is the
 @dfn{point size} of the font (one @dfn{printer's point} is about 1/72
@@ -703,7 +704,10 @@ The font width---normally @samp{normal}, @samp{condensed},
 other values.
 @item style
 An optional additional style name.  Usually it is empty---most XLFDs
-have two hyphens in a row at this point.
+have two hyphens in a row at this point.  The style name can also
+specify a two-letter ISO-639 language name, like @samp{ja} or
address@hidden; some fonts that support CJK scripts have that spelled out
+in the style name part.
 @item pixels
 The font height, in pixels.
 @item height
@@ -998,6 +1002,35 @@ or disable horizontal scroll bars (@pxref{Resources}).  
To control the
 scroll bar height, change the @code{scroll-bar-height} frame parameter
 (@pxref{Frame Parameters,,, elisp, The Emacs Lisp Reference Manual}).
 
address@hidden Window Dividers
address@hidden Window Dividers
address@hidden Window Divider mode
address@hidden mode, Window Divider
+
+  On graphical displays, you can use @dfn{window dividers} in order to
+separate windows visually.  Window dividers are bars that can be dragged
+with the mouse, thus allowing to easily resize adjacent windows.
+
address@hidden window-divider-mode
+  To toggle the display of window dividers, use the command @kbd{M-x
+window-divider-mode}.
+
address@hidden window-divider-default-places
+  To customize where dividers should appear, use the option
address@hidden  Its value should be either
address@hidden (to show dividers only on the bottom of windows),
address@hidden (to show dividers only on the right of windows), or
address@hidden (to show them on the bottom and on the right).
+
address@hidden window-divider-default-bottom-width
address@hidden window-divider-default-right-width
+  To adjust the width of window dividers displayed by this mode
+customize the options @code{window-divider-default-bottom-width} and
address@hidden
+
+   For more details about window dividers see @ref{Window Dividers,,
+Window Dividers, elisp, The Emacs Lisp Reference Manual}.
+
 @node Drag and Drop
 @section Drag and Drop
 @cindex drag and drop
diff --git a/doc/emacs/help.texi b/doc/emacs/help.texi
index d8e84c1..5129c1c 100644
--- a/doc/emacs/help.texi
+++ b/doc/emacs/help.texi
@@ -122,7 +122,8 @@ Display the name and documentation of the command that 
@var{key} runs
 Display a description of your last 300 keystrokes
 (@code{view-lossage}).
 @item C-h m
-Display documentation of the current major mode (@code{describe-mode}).
+Display documentation of the current major mode and minor modes
+(@code{describe-mode}).
 @item C-h n
 Display news of recent Emacs changes (@code{view-emacs-news}).
 @item C-h p
@@ -358,8 +359,11 @@ view, describe, default.
 @end quotation
 
 @vindex apropos-do-all
-  If the variable @code{apropos-do-all} is address@hidden, the apropos
-commands always behave as if they had been given a prefix argument.
+  If the variable @code{apropos-do-all} is address@hidden, most
+apropos commands behave as if they had been given a prefix argument.
+There is one exception: @code{apropos-variable} without a prefix
+argument will always search for all variables, no matter what the
+value of @code{apropos-do-all} is.
 
 @vindex apropos-sort-by-scores
 @cindex apropos search results, order by score
diff --git a/doc/emacs/killing.texi b/doc/emacs/killing.texi
index 4b90bf4..7581f34 100644
--- a/doc/emacs/killing.texi
+++ b/doc/emacs/killing.texi
@@ -105,9 +105,9 @@ indentation following it (@code{delete-indentation}).
 (@code{delete-backward-char}), @key{delete}
 (@code{delete-forward-char}), and @kbd{C-d} (@code{delete-char}).
 @xref{Erasing}.  With a numeric argument, they delete the specified
-number of characters.  If the numeric argument is omitted or one, they
-delete all the text in the region if it is active (@pxref{Using
-Region}).
+number of characters.  If the numeric argument is omitted or one,
address@hidden and @key{delete} delete all the text in the region if it is
+active (@pxref{Using Region}).
 
 @kindex M-\
 @findex delete-horizontal-space
diff --git a/doc/emacs/mule.texi b/doc/emacs/mule.texi
index 80b1384..5a166d1 100644
--- a/doc/emacs/mule.texi
+++ b/doc/emacs/mule.texi
@@ -136,8 +136,11 @@ displayed on your terminal, they appear as @samp{?} or as 
hollow boxes
   Keyboards, even in the countries where these character sets are
 used, generally don't have keys for all the characters in them.  You
 can insert characters that your keyboard does not support, using
address@hidden (@code{quoted-insert}) or @kbd{C-x 8 @key{RET}}
-(@code{insert-char}).  @xref{Inserting Text}.  Emacs also supports
address@hidden 8 @key{RET}} (@code{insert-char}).  @xref{Inserting Text}.
+Shorthands are available for some common characters; for example, you
+can insert a left single quotation mark @t{‘} by typing @kbd{C-x 8
+[}, or in Electric Quote mode often by simply typing @kbd{`}.
address@hidden Marks}.  Emacs also supports
 various @dfn{input methods}, typically one for each script or
 language, which make it easier to type characters in the script.
 @xref{Input Methods}.
diff --git a/doc/emacs/package.texi b/doc/emacs/package.texi
index e464666..68913d8 100644
--- a/doc/emacs/package.texi
+++ b/doc/emacs/package.texi
@@ -30,9 +30,7 @@ third parties.  @xref{Package Installation}.
 
   For information about turning an Emacs Lisp program into an
 installable package, @xref{Packaging,,,elisp, The Emacs Lisp Reference
-Manual}.  For information about finding third-party packages and other
-Emacs Lisp extensions, @xref{Packages that do not come with
-Emacs,,,efaq, GNU Emacs FAQ}.
+Manual}.
 
 @menu
 * Package Menu::         Buffer for viewing and managing packages.
diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi
index b69146a..3562f8a 100644
--- a/doc/emacs/search.texi
+++ b/doc/emacs/search.texi
@@ -511,8 +511,8 @@ the search string must exactly match a whole word.  In an 
incremental
 word search, the matching is more lax: while you are typing the search
 string, its first and last words need not match whole words.  This is
 so that the matching can proceed incrementally as you type.  This
-additional laxity does not apply to the lazy highlight, which always
-matches whole words.
+additional laxity does not apply to the lazy highlight
+(@pxref{Incremental Search}), which always matches whole words.
 
 @node Symbol Search
 @section Symbol Search
@@ -898,10 +898,10 @@ a conflict, you can use a ``shy'' group.
 @item \(?: @dots{} \)
 @cindex shy group, in regexp
 specifies a ``shy'' group that does not record the matched substring;
-you can't refer back to it with @address@hidden  This is useful
-in mechanically combining regular expressions, so that you
-can add groups for syntactic purposes without interfering with
-the numbering of the groups that are meant to be referred to.
+you can't refer back to it with @address@hidden (see below).  This is
+useful in mechanically combining regular expressions, so that you can
+add groups for syntactic purposes without interfering with the
+numbering of the groups that are meant to be referred to.
 
 @item address@hidden
 @cindex back reference, in regexp
diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi
index d891cc1..5a13f20 100644
--- a/doc/emacs/text.texi
+++ b/doc/emacs/text.texi
@@ -410,6 +410,8 @@ beginning of a line.
 @cindex Quotation marks
 @cindex Electric Quote mode
 @cindex mode, Electric Quote
address@hidden curly quotes
address@hidden curved quotes
 @findex 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
@@ -443,7 +445,8 @@ variables.
 @kbd{M-x 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}).
+inactive, you can type @kbd{C-x 8 [} for @t{‘}, @kbd{C-x 8 ]} for
address@hidden, @kbd{C-x 8 @{} for @t{“}, and @kbd{C-x 8 @}} for @t{”}.
 @xref{Inserting Text}.
 
 @node Filling
diff --git a/doc/emacs/trouble.texi b/doc/emacs/trouble.texi
index 42022cd..fc01a97 100644
--- a/doc/emacs/trouble.texi
+++ b/doc/emacs/trouble.texi
@@ -486,10 +486,6 @@ file contains a list of particularly well-known issues 
that have been
 encountered in compiling, installing and running Emacs.  Often, there
 are suggestions for workarounds and solutions.
 
address@hidden
-Some additional user-level problems can be found in @ref{Bugs and
-problems, , Bugs and problems, efaq, GNU Emacs FAQ}.
-
 @cindex bug tracker
 @item
 The GNU Bug Tracker at @url{http://debbugs.gnu.org}.  Emacs bugs are
diff --git a/doc/emacs/windows.texi b/doc/emacs/windows.texi
index 98bc532..24cc946 100644
--- a/doc/emacs/windows.texi
+++ b/doc/emacs/windows.texi
@@ -223,10 +223,11 @@ Visit file @var{filename} and select its buffer in 
another window
 Select a Dired buffer for directory @var{directory} in another window
 (@code{dired-other-window}).  @xref{Dired}.
 
address@hidden mail-other-window
address@hidden Don't index @kbd{C-x 4 m} and @code{compose-mail-other-window}
address@hidden here, they are indexed in sending.texi, in the "Sending Mail" 
node.
 @item C-x 4 m
 Start composing a mail message, similar to @kbd{C-x m} (@pxref{Sending
-Mail}), but in another window (@code{mail-other-window}).
+Mail}), but in another window (@code{compose-mail-other-window}).
 
 @findex find-tag-other-window
 @item C-x 4 .
@@ -238,8 +239,10 @@ window (@code{find-file-read-only-other-window}).  
@xref{Visiting}.
 @end table
 
 @node Change Window
address@hidden Deleting and Rearranging Windows
address@hidden Deleting and Resizing Windows
 
address@hidden delete window
address@hidden deleting windows
 @table @kbd
 @item C-x 0
 Delete the selected window (@code{delete-window}).
@@ -285,6 +288,8 @@ selected window.
 whole frame.  (This command cannot be used while the minibuffer window
 is active; attempting to do so signals an error.)
 
address@hidden resize window
address@hidden resizing windows
 @kindex C-x ^
 @findex enlarge-window
 @kindex C-x @}
@@ -310,6 +315,10 @@ signal an error if you attempt to reduce the width of any 
window below
 a certain minimum number of columns, specified by the variable
 @code{window-min-width} (the default is 10).
 
+  Mouse clicks on the mode line (@pxref{Mode Line Mouse}) or on window
+dividers (@pxref{Window Dividers}) provide another way to change window
+heights and to split or delete windows.
+
 @kindex C-x -
 @findex shrink-window-if-larger-than-buffer
   @kbd{C-x -} (@code{shrink-window-if-larger-than-buffer}) reduces the
@@ -322,9 +331,6 @@ lines to other windows in the frame.
   You can also use @kbd{C-x +} (@code{balance-windows}) to even out the
 heights of all the windows in the selected frame.
 
-  Mouse clicks on the mode line provide another way to change window
-heights and to delete windows.  @xref{Mode Line Mouse}.
-
 @node Displaying Buffers
 @section Displaying a Buffer in a Window
 
diff --git a/doc/lispintro/emacs-lisp-intro.texi 
b/doc/lispintro/emacs-lisp-intro.texi
index 83d6022..183e68f 100644
--- a/doc/lispintro/emacs-lisp-intro.texi
+++ b/doc/lispintro/emacs-lisp-intro.texi
@@ -1947,10 +1947,12 @@ The value produced by evaluating this expression is 
@code{"abcdef"}.
 A function such as @code{substring} uses both a string and numbers as
 arguments.  The function returns a part of the string, a substring of
 the first argument.  This function takes three arguments.  Its first
-argument is the string of characters, the second and third arguments are
-numbers that indicate the beginning and end of the substring.  The
-numbers are a count of the number of characters (including spaces and
-punctuation) from the beginning of the string.
+argument is the string of characters, the second and third arguments
+are numbers that indicate the beginning (inclusive) and end
+(exclusive) of the substring.  The numbers are a count of the number
+of characters (including spaces and punctuation) from the beginning of
+the string. Note that the characters in a string are numbered from
+zero, not one.
 
 @need 800
 For example, if you evaluate the following:
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 357a3c3..9e9f8e3 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -3284,7 +3284,7 @@ field.
 
 @defun set-fontset-font name character font-spec &optional frame add
 This function modifies the existing fontset @var{name} to use the font
-matching with @var{font-spec} for the character @var{character}.
+matching with @var{font-spec} for the specified @var{character}.
 
 If @var{name} is @code{nil}, this function modifies the fontset of the
 selected frame or that of @var{frame} if @var{frame} is not
@@ -3293,10 +3293,10 @@ selected frame or that of @var{frame} if @var{frame} is 
not
 If @var{name} is @code{t}, this function modifies the default
 fontset, whose short name is @samp{fontset-default}.
 
address@hidden may be a cons; @code{(@var{from} . @var{to})}, where
address@hidden and @var{to} are character codepoints.  In that case, use
address@hidden for all characters in the range @var{from} and @var{to}
-(inclusive).
+In addition to specifying a single codepoint, @var{character} may be a
+cons @code{(@var{from} . @var{to})}, where @var{from} and @var{to} are
+character codepoints.  In that case, use @var{font-spec} for all the
+characters in the range @var{from} and @var{to} (inclusive).
 
 @var{character} may be a charset.  In that case, use
 @var{font-spec} for all character in the charsets.
@@ -3419,6 +3419,15 @@ The charset registry and encoding of the font, such as
 @item :script
 The script that the font must support (a symbol).
 
address@hidden :lang
+The language that the font should support.  The value should be a
+symbol whose name is a two-letter ISO-639 language name.  On X, the
+value is matched against the ``Additional Style'' field of the XLFD
+name of a font, if it is non-empty.  On MS-Windows, fonts matching the
+spec are required to support codepages needed for the language.
+Currently, only a small set of CJK languages is supported with this
+property: @samp{ja}, @samp{ko}, and @samp{zh}.
+
 @item :otf
 @cindex OpenType font
 The font must be an OpenType font that supports these OpenType
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi
index ddf81f3..79b5172 100644
--- a/doc/lispref/frames.texi
+++ b/doc/lispref/frames.texi
@@ -2018,6 +2018,19 @@ The value of @code{track-mouse} is that of the last form 
in @var{body}.
 You should design @var{body} to return when it sees the up-event that
 indicates the release of the button, or whatever kind of event means
 it is time to stop tracking.
+
+The @code{track-mouse} form causes Emacs to generate mouse motion
+events by binding the variable @code{mouse-tracking} to a
address@hidden value.  If that variable has the special value
address@hidden, it additionally instructs the display engine to
+refrain from changing the shape of the mouse pointer.  This is
+desirable in Lisp programs that require mouse dragging across large
+portions of Emacs display, which might otherwise cause the mouse
+pointer to change its shape according to the display portion it hovers
+on (@pxref{Pointer Shape}).  Therefore, Lisp programs that need the
+mouse pointer to retain its original shape during dragging should bind
address@hidden to the value @code{dragging} at the beginning of
+their @var{body}.
 @end defspec
 
 The usual purpose of tracking mouse motion is to indicate on the screen
diff --git a/doc/lispref/hash.texi b/doc/lispref/hash.texi
index 98da321..9d60cc3 100644
--- a/doc/lispref/hash.texi
+++ b/doc/lispref/hash.texi
@@ -149,14 +149,6 @@ of the nominal size.  The default for @var{threshold} is 
0.8.
 @end table
 @end defun
 
address@hidden makehash &optional test
-This is equivalent to @code{make-hash-table}, but with a different style
-argument list.  The argument @var{test} specifies the method
-of key lookup.
-
-This function is obsolete.  Use @code{make-hash-table} instead.
address@hidden defun
-
 You can also create a new hash table using the printed representation
 for hash tables.  The Lisp reader can read this printed
 representation, provided each element in the specified hash table has
diff --git a/doc/lispref/help.texi b/doc/lispref/help.texi
index ce29f3f..fde985d 100644
--- a/doc/lispref/help.texi
+++ b/doc/lispref/help.texi
@@ -319,10 +319,22 @@ specifies @var{mapvar}'s value as the keymap for any 
following
 @address@hidden sequences in this documentation string.
 
 @item `
-(grave accent) stands for a left single quotation mark (@samp{‘}).
+(grave accent) stands for a left quote, and alters the interpretation
+of the next unmatched apostrophe.
 
 @item '
-(apostrophe) stands for a right single quotation mark (@samp{’}) if
+(apostrophe) stands for a right quote if preceded by grave accent and
+there are no intervening apostrophes.  Otherwise, apostrophe stands
+for itself.
+
address@hidden ‘
+(left single quotation mark) stands for a left quote.
+
address@hidden ’
+(right single quotation mark) stands for a right quote.
+
address@hidden '
+(apostrophe) stands for a right quote if
 preceded by grave accent and there are no intervening apostrophes.
 Otherwise, apostrophe stands for itself.
 
@@ -335,6 +347,19 @@ and @samp{\=\=} puts @samp{\=} into the output.
 @strong{Please note:} Each @samp{\} must be doubled when written in a
 string in Emacs Lisp.
 
address@hidden help-quote-translation
address@hidden curved quotes
+The value of this variable specifies the style
address@hidden uses when generating left and right
+quotes.  If the variable's value is @code{?‘} (U+2018 LEFT SINGLE
+QUOTATION MARK), the style is @t{‘like this’} with curved single
+quotes.  If the value is @code{?'} (apostrophe), the style is @t{'like
+this'} with apostrophes.  If the value is @code{?`} (grave accent),
+the style is @t{`like this'} with grave accent and apostrophe.  The
+default value @code{nil} means to use curved single quotes if
+displayable, and grave accent and apostrophe otherwise.
address@hidden defvar
+
 @defun substitute-command-keys string
 This function scans @var{string} for the above special sequences and
 replaces them by what they stand for, returning the result as a string.
diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi
index 362c3a4..8781cd6 100644
--- a/doc/lispref/nonascii.texi
+++ b/doc/lispref/nonascii.texi
@@ -474,32 +474,36 @@ inside @samp{<..>} brackets, but the tag names in Emacs 
do not include
 the brackets; e.g., Unicode specifies @samp{<small>} where Emacs uses
 @samp{small}.  }; the other elements are characters that give the
 compatibility decomposition sequence of this character.  For
-unassigned codepoints, the value is the character itself.
+characters that don't have decomposition sequences, and for unassigned
+codepoints, the value is a list with a single member, the character
+itself.
 
 @item decimal-digit-value
 Corresponds to the Unicode @code{Numeric_Value} property for
 characters whose @code{Numeric_Type} is @samp{Decimal}.  The value is
-an integer.  For unassigned codepoints, the value is
address@hidden, which means @acronym{NaN}, or ``not-a-number''.
+an integer, or @code{nil} if the character has no decimal digit value.
+For unassigned codepoints, the value is @code{nil}, which means
address@hidden, or ``not-a-number''.
 
 @item digit-value
 Corresponds to the Unicode @code{Numeric_Value} property for
 characters whose @code{Numeric_Type} is @samp{Digit}.  The value is an
-integer.  Examples of such characters include compatibility
-subscript and superscript digits, for which the value is the
-corresponding number.  For unassigned codepoints, the value is
address@hidden, which means @acronym{NaN}.
+integer.  Examples of such characters include compatibility subscript
+and superscript digits, for which the value is the corresponding
+number.  For characters that don't have any numeric value, and for
+unassigned codepoints, the value is @code{nil}, which means
address@hidden
 
 @item numeric-value
 Corresponds to the Unicode @code{Numeric_Value} property for
 characters whose @code{Numeric_Type} is @samp{Numeric}.  The value of
-this property is a number.  Examples of
-characters that have this property include fractions, subscripts,
-superscripts, Roman numerals, currency numerators, and encircled
-numbers.  For example, the value of this property for the character
address@hidden (@sc{vulgar fraction one fifth}) is @code{0.2}.  For
-unassigned codepoints, the value is @code{nil}, which means
address@hidden
+this property is a number.  Examples of characters that have this
+property include fractions, subscripts, superscripts, Roman numerals,
+currency numerators, and encircled numbers.  For example, the value of
+this property for the character @code{U+2155} (@sc{vulgar fraction one
+fifth}) is @code{0.2}.  For characters that don't have any numeric
+value, and for unassigned codepoints, the value is @code{nil}, which
+means @acronym{NaN}.
 
 @cindex mirroring of characters
 @item mirrored
@@ -545,7 +549,8 @@ value for this property, the value is @code{nil}.
 
 @item iso-10646-comment
 Corresponds to the Unicode @code{ISO_Comment} property.  The value is
-a string.  For unassigned codepoints, the value is an empty string.
+either a string or @code{nil}.  For unassigned codepoints, the value
+is @code{nil}.
 
 @item uppercase
 Corresponds to the Unicode @code{Simple_Uppercase_Mapping} property.
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi
index 0c39be9..4b5a1b4 100644
--- a/doc/lispref/os.texi
+++ b/doc/lispref/os.texi
@@ -1234,7 +1234,7 @@ three-element lists, with omitted @var{microsec} and 
@var{picosec}
 components defaulting to zero.
 
 @cindex time value
-  Function arguments, e.g., the @var{time-value} argument to
+  Function arguments, e.g., the @var{time} argument to
 @code{current-time-string}, accept a more-general @dfn{time value}
 format, which can be a list of integers as above, or a single number
 for seconds since the epoch, or @code{nil} for the current time.  You
@@ -1244,7 +1244,7 @@ of integers using @code{seconds-to-time}, and into other 
forms using
 @code{decode-time} and @code{float-time}.  These functions are
 described in the following sections.
 
address@hidden current-time-string &optional time-value
address@hidden current-time-string &optional time zone
 This function returns the current time and date as a human-readable
 string.  The format does not vary for the initial part of the string,
 which contains the day of week, month, day of month, and time of day
@@ -1255,8 +1255,9 @@ characters from the beginning of the string rather than 
from the end,
 as the year might not have exactly four digits, and additional
 information may some day be added at the end.
 
-The argument @var{time-value}, if given, specifies a time to format,
-instead of the current time.
+The argument @var{time}, if given, specifies a time to format,
+instead of the current time.  The optional argument @var{zone}
+defaults to the current time zone rule.
 
 @example
 @group
@@ -1275,9 +1276,9 @@ multiple of 1000, but this may change as 
higher-resolution clocks
 become available.
 @end defun
 
address@hidden float-time &optional time-value
address@hidden float-time &optional time
 This function returns the current time as a floating-point number of
-seconds since the epoch.  The optional argument @var{time-value}, if
+seconds since the epoch.  The optional argument @var{time}, if
 given, specifies a time to convert instead of the current time.
 
 @emph{Warning}: Since the result is floating point, it may not be
@@ -1286,14 +1287,14 @@ exact.  Do not use this function if precise time stamps 
are required.
 @code{time-to-seconds} is an alias for this function.
 @end defun
 
address@hidden seconds-to-time time-value
address@hidden seconds-to-time time
 This function converts a time value to list-of-integer form.
-For example, if @var{time-value} is a number, @code{(time-to-seconds
-(seconds-to-time @var{time-value}))} equals the number unless overflow
+For example, if @var{time} is a number, @code{(time-to-seconds
+(seconds-to-time @var{time}))} equals the number unless overflow
 or rounding errors occur.
 @end defun
 
address@hidden current-time-zone &optional time-value
address@hidden current-time-zone &optional time zone
 @cindex time zone, current
 This function returns a list describing the time zone that the user is
 in.
@@ -1309,15 +1310,27 @@ adjustment, then the value is constant through time.
 If the operating system doesn't supply all the information necessary to
 compute the value, the unknown elements of the list are @code{nil}.
 
-The argument @var{time-value}, if given, specifies a time value to
-analyze instead of the current time.
+The argument @var{time}, if given, specifies a time value to
+analyze instead of the current time.  The optional argument @var{zone}
+defaults to the current time zone rule.
 @end defun
 
-The current time zone is determined by the @env{TZ} environment
address@hidden TZ, environment variable
+The default time zone is determined by the @env{TZ} environment
 variable.  @xref{System Environment}.  For example, you can tell Emacs
-to use universal time with @code{(setenv "TZ" "UTC0")}.  If @env{TZ}
-is not in the environment, Emacs uses a platform-dependent default
-time zone.
+to default to universal time with @code{(setenv "TZ" "UTC0")}.  If
address@hidden is not in the environment, Emacs uses system wall clock time,
+which is a platform-dependent default time zone.
+
address@hidden time zone rule
+Functions that convert to and from local time accept an optional
address@hidden zone rule} argument, which specifies the conversion's time
+zone and daylight saving time history.  If the time zone rule is
+omitted or @code{nil}, the conversion uses Emacs's default time zone.
+If it is @code{t}, the conversion uses Universal Time.  If it is
address@hidden, the conversion uses the system wall clock time.  If it is
+a string, the conversion uses the time zone rule equivalent to setting
address@hidden to that string.
 
 @node Time Conversion
 @section Time Conversion
@@ -1340,13 +1353,14 @@ count the number of years since the year 1 B.C., and do 
not skip zero
 as traditional Gregorian years do; for example, the year number
 @minus{}37 represents the Gregorian year 38 address@hidden
 
address@hidden decode-time &optional time-value
address@hidden decode-time &optional time zone
 This function converts a time value into calendrical information.  If
-you don't specify @var{time-value}, it decodes the current time.  The return
+you don't specify @var{time}, it decodes the current time, and similarly
address@hidden defaults to the current time zone rule.  The return
 value is a list of nine elements, as follows:
 
 @example
-(@var{seconds} @var{minutes} @var{hour} @var{day} @var{month} @var{year} 
@var{dow} @var{dst} @var{zone})
+(@var{seconds} @var{minutes} @var{hour} @var{day} @var{month} @var{year} 
@var{dow} @var{dst} @var{utcoff})
 @end example
 
 Here is what the elements mean:
@@ -1370,13 +1384,13 @@ The day of week, as an integer between 0 and 6, where 0 
stands for
 Sunday.
 @item dst
 @code{t} if daylight saving time is effect, otherwise @code{nil}.
address@hidden zone
-An integer indicating the time zone, as the number of seconds east of
-Greenwich.
address@hidden utcoff
+An integer indicating the UTC offset in seconds, i.e., the number of
+seconds east of Greenwich.
 @end table
 
 @strong{Common Lisp Note:} Common Lisp has different meanings for
address@hidden and @var{zone}.
address@hidden and @var{utcoff}.
 @end defun
 
 @defun encode-time seconds minutes hour day month year &optional zone
@@ -1389,12 +1403,11 @@ Year numbers less than 100 are not treated specially.  
If you want them
 to stand for years above 1900, or years above 2000, you must alter them
 yourself before you call @code{encode-time}.
 
-The optional argument @var{zone} defaults to the current time zone and
-its daylight saving time rules.  If specified, it can be either a list
-(as you would get from @code{current-time-zone}), a string as in the
address@hidden environment variable, @code{t} for Universal Time, or an
-integer (as you would get from @code{decode-time}).  The specified
-zone is used without any further alteration for daylight saving time.
+The optional argument @var{zone} defaults to the current time zone rule.
+In addition to the usual time zone rule values, it can also be a list
+(as you would get from @code{current-time-zone}) or an integer (as
+from @code{decode-time}), applied without any further alteration for
+daylight saving time.
 
 If you pass more than seven arguments to @code{encode-time}, the first
 six are used as @var{seconds} through @var{year}, the last argument is
@@ -1430,11 +1443,12 @@ This function parses the time-string @var{string} and 
returns the
 corresponding time value.
 @end defun
 
address@hidden format-time-string format-string &optional time-value universal
address@hidden format-time-string format-string &optional time zone
 
-This function converts @var{time-value} (or the current time, if
address@hidden is omitted) to a string according to
address@hidden  The argument
+This function converts @var{time} (or the current time, if
address@hidden is omitted) to a string according to
address@hidden  The conversion uses the time zone rule @var{zone}
+(or the current time zone rule, if omitted).  The argument
 @var{format-string} may contain @samp{%}-sequences which say to
 substitute parts of the time.  Here is a table of what the
 @samp{%}-sequences mean:
diff --git a/doc/lispref/sequences.texi b/doc/lispref/sequences.texi
index 72976b1..eb15228 100644
--- a/doc/lispref/sequences.texi
+++ b/doc/lispref/sequences.texi
@@ -790,6 +790,40 @@ of type @var{type}.  @var{type} can be one of the 
following symbols:
 @end example
 @end defun
 
address@hidden seq-min sequence
+  This function returns the smallest element of
address@hidden @var{sequence} must be a sequence of numbers or
+markers.
+
address@hidden
address@hidden
+(seq-min [3 1 2])
address@hidden 1
address@hidden group
address@hidden
+(seq-min "Hello")
address@hidden 72
address@hidden group
address@hidden example
address@hidden defun
+
address@hidden seq-max sequence
+  This function returns the largest element of
address@hidden @var{sequence} must be a sequence of numbers or
+markers.
+
address@hidden
address@hidden
+(seq-max [1 3 2])
address@hidden 3
address@hidden group
address@hidden
+(seq-max "Hello")
address@hidden 111
address@hidden group
address@hidden example
address@hidden defun
+
 @defmac seq-doseq (var sequence) address@hidden
 @cindex sequence iteration
   This macro is like @code{dolist}, except that @var{sequence} can be a list,
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi
index d4b6950..acf7234 100644
--- a/doc/lispref/text.texi
+++ b/doc/lispref/text.texi
@@ -3509,10 +3509,12 @@ of the text.
 @cindex sticky text properties
 @cindex inheritance, text property
 
-  Self-inserting characters normally take on the same properties as the
-preceding character.  This is called @dfn{inheritance} of properties.
+  Self-inserting characters, the ones that get inserted into a buffer
+when the user types them (@pxref{Commands for Insertion}), normally
+take on the same properties as the preceding character.  This is
+called @dfn{inheritance} of properties.
 
-  A Lisp program can do insertion with inheritance or without,
+  By contrast, a Lisp program can do insertion with inheritance or without,
 depending on the choice of insertion primitive.  The ordinary text
 insertion functions, such as @code{insert}, do not inherit any
 properties.  They insert text with precisely the properties of the
diff --git a/doc/lispref/tips.texi b/doc/lispref/tips.texi
index 798b670..7107bb4 100644
--- a/doc/lispref/tips.texi
+++ b/doc/lispref/tips.texi
@@ -657,19 +657,25 @@ starting double-quote is not part of the string!
 
 @anchor{Docstring hyperlinks}
 @item
address@hidden curly quotes
address@hidden curved quotes
 When a documentation string refers to a Lisp symbol, write it as it
 would be printed (which usually means in lower case), surrounding
-it with curved single quotes (@samp{‘} and @samp{’}).  There are
+it with curved single quotes (@t{‘} and @t{’}).  There are
 two exceptions: write @code{t} and @code{nil} without surrounding
-punctuation.  For example: @samp{CODE can be ‘lambda’, nil, or t.}
+punctuation.  For example: @samp{CODE can be ‘lambda’, nil, or t}.
address@hidden Marks,,, emacs, The GNU Emacs Manual}, for how to
+enter curved single quotes.
 
 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
+which quotes symbols with grave accent @t{`} and apostrophe
address@hidden'}: @t{`like-this'} rather than @t{‘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}.
+accent and apostrophe were mirror images.
+
+Documentation using either convention is converted to the user's
+preferred format 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
diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi
index 27bc061..15491e5 100644
--- a/doc/lispref/variables.texi
+++ b/doc/lispref/variables.texi
@@ -1903,8 +1903,8 @@ the variable was first made obsolete (usually a version 
number
 string).
 
 The optional argument @var{access-type}, if address@hidden, should
-should specify the kind of access that will trigger obsolescence
-warnings; it can be either @code{get} or @code{set}.
+specify the kind of access that will trigger obsolescence warnings; it
+can be either @code{get} or @code{set}.
 @end defun
 
   You can make two variables synonyms and declare one obsolete at the
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index b2bc637..41f02aa 100644
--- a/doc/lispref/windows.texi
+++ b/doc/lispref/windows.texi
@@ -2301,6 +2301,23 @@ the function specified in @code{pop-up-frame-function}
 is added to the newly created frame's parameters.
 @end defun
 
address@hidden display-buffer-use-some-frame buffer alist
+This function tries to ``display'' @var{buffer} by trying to find a
+frame that meets a predicate (by default any frame other than the
+current frame).
+
+If @var{alist} has a address@hidden @code{`inhibit-switch-frame} entry,
+avoid raising the frame.
+
+If @var{alist} has a non-nil @code{frame-predicate} entry, its value is a
+function taking one argument (a frame), returning non-nil if the
+frame is a candidate; this function replaces the default predicate.
+
+If this function chooses a window on another frame, it makes that frame
+visible and, unless @var{alist} contains an @code{inhibit-switch-frame}
+entry (@pxref{Choosing Window Options}), raises that frame if necessary.
address@hidden defun
+
 @defun display-buffer-pop-up-window buffer alist
 This function tries to display @var{buffer} by splitting the largest
 or least recently-used window (typically one on the selected frame).
@@ -2547,6 +2564,21 @@ least that many columns.  If the value is @code{nil}, 
that means not
 to split this way.
 @end defopt
 
address@hidden even-window-sizes
+This variable, if non-nil, causes @code{display-buffer} to even window
+sizes whenever it reuses an existing window and that window is adjacent
+to the selected one.
+
+If its value is @code{width-only}, sizes are evened only if the reused
+window is on the left or right of the selected one and the selected
+window is wider than the reused one.  If its value is @code{height-only}
+sizes are evened only if the reused window is above or beneath the
+selected window and the selected window is higher than the reused one.
+Any other address@hidden value means to even sizes in any of these cases
+provided the selected window is larger than the reused one in the sense
+of their combination.
address@hidden defopt
+
 @defopt pop-up-frames
 If the value of this variable is address@hidden, that means
 @code{display-buffer} may display buffers by making new frames.  The
@@ -3690,7 +3722,7 @@ The coordinates are in the header line of @var{window}.
 The coordinates are in the divider separating @var{window} from a
 window on the right.
 
address@hidden right-divider
address@hidden bottom-divider
 The coordinates are in the divider separating @var{window} from a
 window beneath.
 
diff --git a/doc/misc/autotype.texi b/doc/misc/autotype.texi
index acc98ed..a147d4b 100644
--- a/doc/misc/autotype.texi
+++ b/doc/misc/autotype.texi
@@ -517,12 +517,6 @@ is only done with @kbd{M-x executable-set-magic}.  When 
this is
 called as a function, such as when Emacs puts a buffer in Shell script
 mode.  Otherwise you are always queried.
 
address@hidden executable-self-display
-  @kbd{M-x executable-self-display} adds a magic number to the buffer, which
-will turn it into a self displaying text file, when called as a Un*x command.
-The ``interpreter'' used is @code{executable-self-display} with argument
address@hidden
-
 @node Timestamps
 @chapter Maintaining Timestamps in Modified Files
 @cindex timestamps
diff --git a/doc/misc/cl.texi b/doc/misc/cl.texi
index d7b3f4a..1f38ca9 100644
--- a/doc/misc/cl.texi
+++ b/doc/misc/cl.texi
@@ -2877,14 +2877,8 @@ their names will not conflict with ``real'' variables in 
the user's
 code.
 
 (Internally, the variable @code{cl--gensym-counter} holds the counter
-used to generate names.  It is incremented after each use.  In Common
-Lisp this is initialized with 0, but this package initializes it with
-a random time-dependent value to avoid trouble when two files that
-each used @code{cl-gensym} in their compilation are loaded together.
-Uninterned symbols become interned when the compiler writes them out
-to a file and the Emacs loader loads them, so their names have to be
-treated a bit more carefully than in Common Lisp where uninterned
-symbols remain uninterned after loading.)
+used to generate names.  It is initialized with zero and incremented
+after each use.)
 @end defun
 
 @defun cl-gentemp &optional x
@@ -4543,10 +4537,7 @@ example, local @code{special} declarations, which are 
purely
 advisory in Emacs Lisp, do not rigorously obey the scoping rules
 set down in Steele's book.
 
-The variable @code{cl--gensym-counter} starts out with a pseudo-random
-value rather than with zero.  This is to cope with the fact that
-generated symbols become interned when they are written to and
-loaded back from a file.
+The variable @code{cl--gensym-counter} starts out with zero.
 
 The @code{cl-defstruct} facility is compatible, except that structures
 are of type @code{:type vector :named} by default rather than some
diff --git a/doc/misc/efaq-w32.texi b/doc/misc/efaq-w32.texi
index f8a188d..28cf680 100644
--- a/doc/misc/efaq-w32.texi
+++ b/doc/misc/efaq-w32.texi
@@ -159,26 +159,25 @@ instructions (requires DJGPP).
 @node Downloading
 @section Where can I download Emacs?
 
address@hidden precompiled binaries
address@hidden where to get Emacs binaries
-Pre-compiled versions are distributed from
address@hidden://ftpmirror.gnu.org/emacs/windows/, ftp.gnu.org mirrors}.
-Emacs binaries are distributed as zip files, digitally signed by the
-developer who built them.  Generally most users will want the file
address@hidden@value{EMACSVER}-bin-i686-pc-mingw.zip} for the 32-bit
-build, and @address@hidden
-for the 64-bit build.  The zip archive contains everything you need to
-get started.
-
address@hidden getting Emacs
 @cindex where to get sources
 @cindex Emacs source code
 @cindex source for Emacs
-The latest source is available from
address@hidden://ftpmirror.gnu.org/emacs/, ftp.gnu.org mirrors}.  It is
-distributed as a compressed tar file, digitally signed by the maintainer
-who made the release.
+You can download Emacs releases from
address@hidden://ftpmirror.gnu.org/emacs/, ftp.gnu.org mirrors}.  They
+are distributed as compressed tar files, digitally signed by the
+maintainer who made the release.
+
address@hidden precompiled binaries
address@hidden where to get Emacs binaries
+Pre-compiled binaries for MS Windows may be made available on a
+best-effort basis in the @file{windows} subdirectory of the above ftp
+site (as zip files digitally signed by the person who built them).
+See the @file{README} file in that directory for more information.
+Building Emacs from source yourself should be straightforward,
+following the instructions in @file{nt/INSTALL}, so we encourage you
+to give it a try.  @xref{Compiling}.
 
address@hidden getting Emacs
 @cindex latest development version of Emacs
 @cindex Emacs Development
 The development version of Emacs is available from
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi
index d801031..0afc7e4 100644
--- a/doc/misc/gnus.texi
+++ b/doc/misc/gnus.texi
@@ -14252,6 +14252,10 @@ If you need to tunnel via other systems to connect to 
the server, you
 can use this option, and customize @code{nnimap-shell-program} to be
 what you need.
 
address@hidden plain
+Non-encrypted and unsafe straight socket connection.
address@hidden will not be used even if it is available.
+
 @end table
 
 @item nnimap-authenticator
diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex
index 4b48564..f773c90 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-26.15}
+\def\texinfoversion{2015-07-01.07}
 %
 % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@@ -277,6 +277,7 @@
 % described on page 260 of The TeXbook.  It involves outputting two
 % marks for the sectioning macros, one before the section break, and
 % one after.  I won't pretend I can describe this better than DEK...
+%
 \def\domark{%
   \toks0=\expandafter{\lastchapterdefs}%
   \toks2=\expandafter{\lastsectiondefs}%
@@ -304,6 +305,7 @@
 % Avoid "undefined control sequence" errors.
 \def\lastchapterdefs{}
 \def\lastsectiondefs{}
+\def\lastsection{}
 \def\prevchapterdefs{}
 \def\prevsectiondefs{}
 \def\lastcolordefs{}
@@ -3195,8 +3197,15 @@ end
 \def\Eogonek{{\ecfont \char"86}}\def\macrocharE{E}
 \def\eogonek{{\ecfont \char"A6}}\def\macrochare{e}
 %
-% Use the ec* fonts (cm-super in outline format) for non-CM glyphs.
-\def\ecfont{%
+% Use the European Computer Modern fonts (cm-super in outline format)
+% for non-CM glyphs.  That is ec* for regular text and tc* for the text
+% companion symbols (LaTeX TS1 encoding).  Both are part of the ec
+% package and follow the same conventions.
+% 
+\def\ecfont{\etcfont{e}}
+\def\tcfont{\etcfont{t}}
+%
+\def\etcfont#1{%
   % We can't distinguish serif/sans and italic/slanted, but this
   % is used for crude hacks anyway (like adding French and German
   % quotes to documents typeset with CM, where we lose kerning), so
@@ -3205,14 +3214,14 @@ end
   \edef\nominalsize{\csname\curfontsize nominalsize\endcsname}%
   \ifmonospace
     % typewriter:
-    \font\thisecfont = ectt\ecsize \space at \nominalsize
+    \font\thisecfont = #1ctt\ecsize \space at \nominalsize
   \else
     \ifx\curfontstyle\bfstylename
       % bold:
-      \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize
+      \font\thisecfont = #1cb\ifusingit{i}{x}\ecsize \space at \nominalsize
     \else
       % regular:
-      \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize
+      \font\thisecfont = #1c\ifusingit{ti}{rm}\ecsize \space at \nominalsize
     \fi
   \fi
   \thisecfont
@@ -6873,7 +6882,7 @@ end
 % typesetting commands (@smallbook, font changes, etc.) have to be done
 % beforehand -- and a) we want @copying to be done first in the source
 % file; b) letting users define the frontmatter in as flexible order as
-% possible is very desirable.
+% possible is desirable.
 %
 \def\copying{\checkenv{}\begingroup\scanargctxt\docopying}
 address@hidden copying{\endgroup\def\copyingtext{#1}}
@@ -7441,6 +7450,12 @@ end
 %
 % \anythingelse will almost certainly be an error of some kind.
 
+\def\macrolineargctxt{% used for whole-line arguments without braces
+  \scanctxt
+  \catcode`\{=\other
+  \catcode`\}=\other
+}
+
 % \mbodybackslash is the definition of \ in @macro bodies.
 % It maps \foo\ => \csname macarg.foo\endcsname => #N
 % where N is the macro parameter number.
@@ -7514,12 +7529,14 @@ end
 % This makes use of the obscure feature that if the last token of a
 % <parameter list> is #, then the preceding argument is delimited by
 % an opening brace, and that opening brace is not consumed.
+% 
 \def\getargs#1{\getargsxxx#1{}}
 \def\getargsxxx#1#{\getmacname #1 \relax\getmacargs}
 \def\getmacname#1 #2\relax{\macname={#1}}
 \def\getmacargs#1{\def\argl{#1}}
 
-% For macro processing make @ a letter so that we can make Texinfo private 
macro names.
+% For macro processing make @ a letter so that we can make
+% private-to-Texinfo macro names.
 address@hidden
 \catcode address@hidden
 
@@ -7550,6 +7567,7 @@ end
 %
 % If you compile with TeX (not eTeX), and you have macros with 10 or more
 % arguments, no macro can have more than 256 arguments (else error).
+% 
 \def\parsemargdef#1;{%
   \paramno=0\def\paramlist{}%
   \let\hash\relax
@@ -7593,7 +7611,6 @@ end
 % These two commands read recursive and nonrecursive macro bodies.
 % (They're different since rec and nonrec macros end differently.)
 %
-
 \catcode address@hidden
 address@hidden macro%
 {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}%
@@ -7607,7 +7624,7 @@ end
 address@hidden@}%
 
 % This macro is expanded during the Texinfo macro expansion, not during its
-% definition.  It gets all the arguments values and assigns them to macros
+% definition.  It gets all the arguments' values and assigns them to macros
 % macarg.ARGNAME
 %
 % #1 is the macro name
@@ -7629,7 +7646,8 @@ end
   \fi
 }
 
-% 
+% Internal for address@hidden
+%  
 \def\getargvals@@{%
   \ifx\paramlist\nilm@
       % Some sanity check needed here that \argvaluelist is also empty.
@@ -7673,7 +7691,8 @@ end
 }
 
 % Replace arguments by their values in the macro body, and place the result
-% in macro address@hidden
+% in macro address@hidden
+% 
 address@hidden
   %  To do this we use the property that token registers that are \the'ed
   % within an \edef  expand only once. So we are going to place all argument
@@ -7697,8 +7716,9 @@ end
   address@hidden@tempc}%
   }
 
+% Define the named-macro outside of this group and then close this group. 
+% 
 address@hidden 
-  %% Define the named-macro outside of this group and then close this group. 
   \expandafter
   \endgroup
   \macargdeflist@
@@ -7735,14 +7755,17 @@ end
   \next
 }
 
-% Save the token stack pointer into macro #1
+% Save the token stack pointer into macro #1:
 address@hidden
-% Restore the token stack pointer from number in macro #1
address@hidden
-% newtoks that can be used non \outer .
+%
+% Restore the token stack pointer from number in macro #1:
+\def\texirestoretoksstackpoint#1{\expandafter\mathchardef
+  address@hidden
+% Variant \newtoks that can be used non-\outer:
 \def\texinonouternewtoks{\alloc@ 5\toks \toksdef address@hidden
 
-% Tailing missing arguments are set to empty
+% Tailing missing arguments are set to empty.
+% 
 address@hidden
   \ifx\paramlist\nilm@
     \let\next\macargexpandinbody@
@@ -7787,7 +7810,7 @@ end
         \noexpand\scanmacro{\temp}}%
     \or % 1
       \expandafter\xdef\csname\the\macname\endcsname{%
-         \bgroup\noexpand\macroargctxt
+         \bgroup
          \noexpand\braceorline
          \expandafter\noexpand\csname\the\macname xxx\endcsname}%
       \expandafter\xdef\csname\the\macname xxx\endcsname##1{%
@@ -7820,7 +7843,7 @@ end
         \noexpand\scanmacro{\temp}\egroup}%
     \or % 1
       \expandafter\xdef\csname\the\macname\endcsname{%
-         \bgroup\noexpand\macroargctxt
+         \bgroup
          \noexpand\braceorline
          \expandafter\noexpand\csname\the\macname xxx\endcsname}%
       \expandafter\xdef\csname\the\macname xxx\endcsname##1{%
@@ -7852,19 +7875,20 @@ end
     \fi
   \fi}
 
-\catcode address@hidden
+\catcode address@hidden % end private-to-Texinfo catcodes
 
 \def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}}
 
-% \braceorline decides whether the next nonwhitespace character is a
-% {.  If so it reads up to the closing }, if not, it reads the whole
-% line.  Whatever was read is then fed to the next control sequence
-% as an argument (by \parsebrace or \parsearg).
+% \braceorline MAC is used for a one-argument macro MAC.  It checks
+% whether the next non-whitespace character is a {.  It sets the context
+% for reading the argument (slightly different in the two cases).  Then,
+% to read the argument, in the whole-line case, it then calls the
+% regular \parsearg MAC; in the lbrace case, it just calls MAC itself.
 % 
 \def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx}
 \def\braceorlinexxx{%
-  \ifx\nchar\bgroup\else
-    \expandafter\parsearg
+  \ifx\nchar\bgroup\macroargctxt
+  \else\macrolineargctxt\expandafter\parsearg
   \fi \macnamexxx}
 
 
@@ -9020,17 +9044,17 @@ directory should work if nowhere else does.}
 \def\latonechardefs{%
   \gdef^^a0{\tie}
   \gdef^^a1{\exclamdown}
-  \gdef^^a2{\missingcharmsg{CENT SIGN}}
-  \gdef^^a3{{\pounds}}
-  \gdef^^a4{\missingcharmsg{CURRENCY SIGN}}
-  \gdef^^a5{\missingcharmsg{YEN SIGN}}
-  \gdef^^a6{\missingcharmsg{BROKEN BAR}}
+  \gdef^^a2{{\tcfont \char162}} % cent
+  \gdef^^a3{\pounds}
+  \gdef^^a4{{\tcfont \char164}} % currency
+  \gdef^^a5{{\tcfont \char165}} % yen
+  \gdef^^a6{{\tcfont \char166}} % broken bar
   \gdef^^a7{\S}
   \gdef^^a8{\"{}}
   \gdef^^a9{\copyright}
   \gdef^^aa{\ordf}
   \gdef^^ab{\guillemetleft}
-  \gdef^^ac{$\lnot$}
+  \gdef^^ac{\ensuremath\lnot}
   \gdef^^ad{\-}
   \gdef^^ae{\registeredsymbol}
   \gdef^^af{\={}}
@@ -9395,7 +9419,11 @@ directory should work if nowhere else does.}
 \def\utfeightchardefs{%
   \DeclareUnicodeCharacter{00A0}{\tie}
   \DeclareUnicodeCharacter{00A1}{\exclamdown}
+  \DeclareUnicodeCharacter{00A2}{{\tcfont \char162}}% 0242=cent
   \DeclareUnicodeCharacter{00A3}{\pounds}
+  \DeclareUnicodeCharacter{00A4}{{\tcfont \char164}}% 0244=currency
+  \DeclareUnicodeCharacter{00A5}{{\tcfont \char165}}% 0245=yen
+  \DeclareUnicodeCharacter{00A6}{{\tcfont \char166}}% 0246=brokenbar
   \DeclareUnicodeCharacter{00A7}{\S}
   \DeclareUnicodeCharacter{00A8}{\"{ }}
   \DeclareUnicodeCharacter{00A9}{\copyright}
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi
index ece851d..c9af6dd 100644
--- a/doc/misc/tramp.texi
+++ b/doc/misc/tramp.texi
@@ -217,7 +217,7 @@ Configuring @value{tramp} for use
 * Connection caching::          Reusing connection related information.
 * Predefined connection information::
                                 Setting own connection related information.
-* Remote Programs::             How @value{tramp} finds and uses programs on 
the remote host.
+* Remote programs::             How @value{tramp} finds and uses programs on 
the remote host.
 * Remote shell setup::          Remote shell setup hints.
 * Android shell setup::         Android shell setup hints.
 * Auto-save and Backup::        Auto-save and Backup.
@@ -524,6 +524,15 @@ can use to connect to remote hosts and transfer files
 If you don't know which method is right for you, see @xref{Default
 Method}.
 
address@hidden:} In the following description, setting of user options
+or variables is explained.  Not all of them are autoloaded by
address@hidden  All examples expect, that you have loaded
address@hidden first:
+
address@hidden
+(require 'tramp)
address@hidden lisp
+
 
 @menu
 * Connection types::            Types of connections made to remote hosts.
@@ -548,7 +557,7 @@ Method}.
 * Connection caching::          Reusing connection related information.
 * Predefined connection information::
                                 Setting own connection related information.
-* Remote Programs::             How @value{tramp} finds and uses programs on 
the remote host.
+* Remote programs::             How @value{tramp} finds and uses programs on 
the remote host.
 * Remote shell setup::          Remote shell setup hints.
 * Android shell setup::         Android shell setup hints.
 * Auto-save and Backup::        Auto-save and Backup.
@@ -622,7 +631,7 @@ it may require access to external commands to perform that 
task.
 @command{mimencode} (part of the @command{metamail} package) or
 @command{uuencode} on the remote host.  The first reliable command
 will be used.  The search path can be customized, see @ref{Remote
-Programs}.
+programs}.
 
 If both commands aren't available on the remote host, @value{tramp}
 transfers a small piece of Perl code to the remote host, and tries to
@@ -1726,10 +1735,10 @@ Using such persistent information can be disabled by 
setting
 @code{tramp-persistency-file-name} to @code{nil}.
 
 Once consequence of reusing connection related information is that
address@hidden needs to distinguish hosts.  If you, for example, run a
address@hidden needs to distinguish hosts.  If you, for example, run a
 local @code{sshd} on port 3001, which tunnels @command{ssh} to another
 host, you could access both @address@hidden, , localhost,}} and
address@hidden@trampfn{ssh, , localhost#3001,}}.  @var{tramp} would use the
address@hidden@trampfn{ssh, , localhost#3001,}}.  @value{tramp} would use the
 same host related information (like paths, Perl variants, etc) for
 both connections, although the information is valid only for one of
 them.
@@ -1748,10 +1757,11 @@ connection again.
 @node Predefined connection information
 @section Setting own connection related information
 
-Sometimes, @var{tramp} is not able to detect correct connection
-related information.  In such cases, you could tell @var{tramp} which
-value it has to take.  Since this could result in errors, it has to be
-used with care.
+Sometimes, method specific arguments in @code{tramp-methods} do not
+fit your needs.  Sometimes, @value{tramp} is not able to detect
+correct connection related information.  In such cases, you could tell
address@hidden which value it has to take.  Since this could result in
+errors, it has to be used with care.
 
 @vindex tramp-connection-properties
 Such settings can be performed via the list
@@ -1759,13 +1769,35 @@ Such settings can be performed via the list
 form @code{(@var{regexp} @var{property} @var{value})}.  @var{regexp}
 matches remote file names for which a property shall be predefined.
 It can be @code{nil}.  @var{property} is a string, and @var{value} the
-corresponding value.  @var{property} could be any property found in
-the file @code{tramp-persistency-file-name}.
+corresponding value.
 
-A special property is @code{"busybox"}.  This must be set, if the
-remote host runs a very restricted busybox as shell, which closes the
address@hidden could be any method specific parameter found in
address@hidden The parameter key in @code{tramp-methods} is a
+symbol name @code{tramp-<foo>}. In order to overwrite it,
address@hidden must be the string @samp{<foo>}.  If you, for example,
+want to change the remote shell to be used on a remote machine, you
+could apply
+
address@hidden
+(add-to-list 'tramp-connection-properties
+             (list (regexp-quote "@trampfn{ssh, user, 
randomhost.your.domain,}")
+                   "remote-shell" "/bin/ksh"))
+(add-to-list 'tramp-connection-properties
+             (list (regexp-quote "@trampfn{ssh, user, 
randomhost.your.domain,}")
+                   "remote-shell-login" '("-")))
address@hidden lisp
+
+This would overwrite the @code{tramp-remote-shell} and
address@hidden parameters in @code{tramp-methods}, to
+be used on that remote host.
+
address@hidden could also be any property found in the file
address@hidden
+
+A special property is @samp{busybox}.  This must be set, if the remote
+host runs a very restricted busybox as shell, which closes the
 connection at will.  Since there is no reliable test for this,
address@hidden must be indicated this way.  Example:
address@hidden must be indicated this way.  Example:
 
 @lisp
 (add-to-list 'tramp-connection-properties
@@ -1774,7 +1806,7 @@ connection at will.  Since there is no reliable test for 
this,
 @end lisp
 
 
address@hidden Remote Programs
address@hidden Remote programs
 @section How @value{tramp} finds and uses programs on the remote host
 
 @value{tramp} depends on a number of programs on the remote host in order to
@@ -1821,9 +1853,6 @@ To add a directory to the remote search path, you could 
use code such
 as:
 
 @lisp
address@hidden;; We load @value{tramp} to define the variable.}
-(require 'tramp)
address@hidden;; We have @command{perl} in "/usr/local/perl/bin"}
 (add-to-list 'tramp-remote-path "/usr/local/perl/bin")
 @end lisp
 
@@ -1892,7 +1921,7 @@ to be set correctly to recognize the shell prompt on the 
remote host.
 
 Note that @value{tramp} requires the match for @code{shell-prompt-pattern}
 to be at the end of the buffer.  Many people have something like the
-following as the value for the variable: @code{"^[^>$][>$] *"}.  Now
+following as the value for the variable: @samp{^[^>$][>$] *}.  Now
 suppose your shell prompt is @code{a <b> c $ }.  In this case,
 @value{tramp} recognizes the @code{>} character as the end of the prompt,
 but it is not at the end of the buffer.
@@ -2688,7 +2717,7 @@ this is welcome!
 When your program is not found in the default search path
 @value{tramp} sets on the remote host, you should either use an
 absolute path, or extend @code{tramp-remote-path} (see @ref{Remote
-Programs}):
+programs}):
 
 @lisp
 (add-to-list 'tramp-remote-path "~/bin")
@@ -2698,8 +2727,8 @@ Programs}):
 The environment for your program can be adapted by customizing
 @code{tramp-remote-process-environment}.  This variable is a list of
 strings.  It is structured like @code{process-environment}.  Each
-element is a string of the form @code{"ENVVARNAME=VALUE"}.  An entry
address@hidden"ENVVARNAME="} disables the corresponding environment variable,
+element is a string of the form @samp{ENVVARNAME=VALUE}.  An entry
address@hidden disables the corresponding environment variable,
 which might have been set in your init file like @file{~/.profile}.
 
 @noindent
@@ -3930,7 +3959,6 @@ Sometimes, it might be even necessary to step through 
@value{tramp}
 function call traces.  Such traces are enabled by the following code:
 
 @lisp
-(require 'tramp)
 (require 'trace)
 (dolist (elt (all-completions "tramp-" obarray 'functionp))
   (trace-function-background (intern elt)))
diff --git a/doc/misc/trampver.texi b/doc/misc/trampver.texi
index 119adbd..dccf317 100644
--- a/doc/misc/trampver.texi
+++ b/doc/misc/trampver.texi
@@ -8,7 +8,7 @@
 @c In the Tramp GIT, the version number is auto-frobbed from
 @c configure.ac, so you should edit that file and run
 @c "autoconf && ./configure" to change the version number.
address@hidden trampver 2.2.12-pre
address@hidden trampver 2.2.13-pre
 
 @c Other flags from configuration
 @set instprefix /usr/local
diff --git a/etc/DEBUG b/etc/DEBUG
index 52424d7..cc39e42 100644
--- a/etc/DEBUG
+++ b/etc/DEBUG
@@ -34,6 +34,13 @@ With GCC and higher optimization levels such as -O2, the
 essential.  The latter prevents GCC from using the same abort call for
 all assertions in a given function, rendering the stack backtrace
 useless for identifying the specific failed assertion.
+Some versions of GCC support recent versions of the DWARF standard for
+debugging info, but default to older versions; for example, they could
+support -gdwarf-4 compiler option (for DWARF v4), but default to
+version 2 of the DWARF standard.  For best results in debugging
+abilities, find out the highest version of DWARF your GCC can support,
+and use the corresponding -gdwarf-N switch instead of just -g (you
+will still need -g3, as in "-gdwarf-4 -g3").
 
 ** It is a good idea to run Emacs under GDB (or some other suitable
 debugger) *all the time*.  Then, when Emacs crashes, you will be able
@@ -47,8 +54,9 @@ kick in, provided that you run under GDB.
 
 ** Getting control to the debugger
 
-`Fsignal' is a very useful place to put a breakpoint in.
-All Lisp errors go through there.
+`Fsignal' is a very useful place to put a breakpoint in.  All Lisp
+errors go through there.  If you are only interested in errors that
+would fire the debugger, breaking at `maybe_call_debugger' is useful.
 
 It is useful, when debugging, to have a guaranteed way to return to
 the debugger at any time.  When using X, this is easy: type C-z at the
@@ -76,11 +84,22 @@ use the set command until the inferior process has been 
started.
 Put a breakpoint early in `main', or suspend the Emacs,
 to get an opportunity to do the set command.
 
+Another technique for get control to the debugger is to put a
+breakpoint in some rarely used function.  One such convenient function
+is Fredraw_display, which you can invoke at will interactively with
+"M-x redraw-display RET".
+
 When Emacs is running in a terminal, it is sometimes useful to use a separate
 terminal for the debug session.  This can be done by starting Emacs as usual,
 then attaching to it from gdb with the `attach' command which is explained in
 the node "Attach" of the GDB manual.
 
+On MS-Windows, you can start Emacs in its own separate terminal by
+setting the new-console option before running Emacs under GDB:
+
+  (gdb) set new-console 1
+  (gdb) run
+
 ** Examining Lisp object values.
 
 When you have a live process to debug, and it has not encountered a
@@ -120,6 +139,8 @@ type.  Here are these commands:
     xint xptr xwindow xmarker xoverlay xmiscfree xintfwd xboolfwd xobjfwd
     xbufobjfwd xkbobjfwd xbuflocal xbuffer xsymbol xstring xvector xframe
     xwinconfig xcompiled xcons xcar xcdr xsubr xprocess xfloat xscrollbar
+    xchartable xsubchartable xboolvector xhashtable xlist xcoding
+    xcharset xfontset xfont xbytecode
 
 Each one of them applies to a certain type or class of types.
 (Some of these types are not visible in Lisp, because they exist only
@@ -138,33 +159,32 @@ Here's an example using concepts explained in the node 
"Value History"
 of the GDB manual to print values associated with the variable
 called frame.  First, use these commands:
 
-    cd src
-    gdb emacs
-    b set_frame_buffer_list
-    r -q
+  cd src
+  gdb emacs
+  b set_frame_buffer_list
+  r -q
 
 Then Emacs hits the breakpoint:
 
-    (gdb) p frame
-    $1 = 139854428
-    (gdb) xpr
-    Lisp_Vectorlike
-    PVEC_FRAME
-    $2 = (struct frame *) 0x8560258
-    "address@hidden"
-    (gdb) p *$
-    $3 = {
-      size = 1073742931,
-      next = 0x85dfe58,
-      name = 140615219,
-      [...]
-    }
+  (gdb) p frame
+  $1 = 139854428
+  (gdb) xpr
+  Lisp_Vectorlike
+  PVEC_FRAME
+  $2 = (struct frame *) 0x8560258
+  "address@hidden"
+  (gdb) p *$
+  $3 = {
+    size = 1073742931,
+    next = 0x85dfe58,
+    name = 140615219,
+    [...]
+  }
 
 Now we can use `pr' to print the frame parameters:
 
-    (gdb) pp $->param_alist
-    ((background-mode . light) (display-type . color) [...])
-
+  (gdb) pp $->param_alist
+  ((background-mode . light) (display-type . color) [...])
 
 The Emacs C code heavily uses macros defined in lisp.h.  So suppose
 we want the address of the l-value expression near the bottom of
@@ -174,28 +194,28 @@ we want the address of the l-value expression near the 
bottom of
 
 XVECTOR is a macro, so GDB only knows about it if Emacs has been compiled with
 preprocessor macro information.  GCC provides this if you specify the options
-`-gdwarf-2' and `-g3'.  In this case, GDB can evaluate expressions like
-"p XVECTOR (this_command_keys)".
+`-gdwarf-N' (where N is 2 or higher) and `-g3'.  In this case, GDB can
+evaluate expressions like "p XVECTOR (this_command_keys)".
 
 When this information isn't available, you can use the xvector command in GDB
 to get the same result.  Here is how:
 
-    (gdb) p this_command_keys
-    $1 = 1078005760
-    (gdb) xvector
-    $2 = (struct Lisp_Vector *) 0x411000
-    0
-    (gdb) p $->contents[this_command_key_count]
-    $3 = 1077872640
-    (gdb) p &$
-    $4 = (int *) 0x411008
+  (gdb) p this_command_keys
+  $1 = 1078005760
+  (gdb) xvector
+  $2 = (struct Lisp_Vector *) 0x411000
+  0
+  (gdb) p $->contents[this_command_key_count]
+  $3 = 1077872640
+  (gdb) p &$
+  $4 = (int *) 0x411008
 
 Here's a related example of macros and the GDB `define' command.
 There are many Lisp vectors such as `recent_keys', which contains the
 last 300 keystrokes.  We can print this Lisp vector
 
-p recent_keys
-pr
+  p recent_keys
+  pr
 
 But this may be inconvenient, since `recent_keys' is much more verbose
 than `C-h l'.  We might want to print only the last 10 elements of
@@ -206,24 +226,24 @@ this vector.  `recent_keys' is updated in keyboard.c by 
the command
 So we define a GDB command `xvector-elts', so the last 10 keystrokes
 are printed by
 
-    xvector-elts recent_keys recent_keys_index 10
+  xvector-elts recent_keys recent_keys_index 10
 
 where you can define xvector-elts as follows:
 
-    define xvector-elts
-    set $i = 0
-    p $arg0
-    xvector
-    set $foo = $
-    while $i < $arg2
-    p $foo->contents[$arg1-($i++)]
-    pr
-    end
-    document xvector-elts
-    Prints a range of elements of a Lisp vector.
-    xvector-elts  v n i
-    prints `i' elements of the vector `v' ending at the index `n'.
-    end
+  define xvector-elts
+  set $i = 0
+  p $arg0
+  xvector
+  set $foo = $
+  while $i < $arg2
+  p $foo->contents[$arg1-($i++)]
+  pr
+  end
+  document xvector-elts
+  Prints a range of elements of a Lisp vector.
+  xvector-elts  v n i
+  prints `i' elements of the vector `v' ending at the index `n'.
+  end
 
 ** Getting Lisp-level backtrace information within GDB
 
@@ -259,7 +279,53 @@ and, assuming that "xtype" says that args[0] is a symbol:
 
    xsymbol
 
-** Debugging Emacs Redisplay problems
+** Debugging Emacs redisplay problems
+
+If you configured Emacs with --enable-checking='glyphs', you can use redisplay
+tracing facilities from a running Emacs session.
+
+The command "M-x trace-redisplay RET" will produce a trace of what redisplay
+does on the standard error stream.  This is very useful for understanding the
+code paths taken by the display engine under various conditions, especially if
+some redisplay optimizations produce wrong results.  (You know that redisplay
+optimizations might be involved if "M-x redraw-display RET", or even just
+typing "M-x", causes Emacs to correct the bad display.)  Since the cursor
+blinking feature triggers periodic redisplay cycles, we recommend disabling
+`blink-cursor-mode' before invoking `trace-redisplay', so that you have less
+clutter in the trace.  You can also have up to 30 last trace messages dumped to
+standard error by invoking the `dump-redisplay-history' command.
+
+To find the code paths which were taken by the display engine, search xdisp.c
+for the trace messages you see.
+
+The command `dump-glyph-matrix' is useful for producing on standard error
+stream a full dump of the selected window's glyph matrix.  See the function's
+doc string for more details.  If you are debugging redisplay issues in
+text-mode frames, you may find the command `dump-frame-glyph-matrix' useful.
+
+Other commands useful for debugging redisplay are `dump-glyph-row' and
+`dump-tool-bar-row'.
+
+If you run Emacs under GDB, you can print the contents of any glyph matrix by
+just calling that function with the matrix as its argument.  For example, the
+following command will print the contents of the current matrix of the window
+whose pointer is in `w':
+
+  (gdb) p dump_glyph_matrix (w->current_matrix, 2)
+
+(The second argument 2 tells dump_glyph_matrix to print the glyphs in
+a long form.)
+
+The Emacs display code includes special debugging code, but it is normally
+disabled.  Configuring Emacs with --enable-checking='yes,glyphs' enables it.
+
+Building Emacs like that activates many assertions which scrutinize
+display code operation more than Emacs does normally.  (To see the
+code which tests these assertions, look for calls to the `eassert'
+macros.)  Any assertion that is reported to fail should be investigated.
+
+When you debug display problems running emacs under X, you can use
+the `ff' command to flush all pending display updates to the screen.
 
 The src/.gdbinit file defines many useful commands for dumping redisplay
 related data structures in a terse and user-friendly format:
@@ -273,8 +339,53 @@ related data structures in a terse and user-friendly 
format:
  `pgrow' dumps all glyphs in current glyph_row `row'.
  `pcursor' dumps current output_cursor.
 
-The above commands also exist in a version with an `x' suffix which
-takes an object of the relevant type as argument.
+The above commands also exist in a version with an `x' suffix which takes an
+object of the relevant type as argument.  For example, `pgrowx' dumps all
+glyphs in its argument, which must be of type `struct glyph_row'.
+
+Since redisplay is performed by Emacs very frequently, you need to place your
+breakpoints cleverly to avoid hitting them all the time, when the issue you are
+debugging did not (yet) happen.  Here are some useful techniques for that:
+
+ . Put a breakpoint at `Fredraw_display' before running Emacs.  Then do
+   whatever is required to reproduce the bad display, and invoke "M-x
+   redraw-display".  The debugger will kick in, and you can set or enable
+   breakpoints in strategic places, knowing that the bad display will be
+   redrawn from scratch.
+
+ . For debugging incorrect cursor position, a good place to put a breakpoint is
+   in `set_cursor_from_row'.  The first time this function is called as part of
+   `redraw-display', Emacs is redrawing the minibuffer window, which is usually
+   not what you want; type "continue" to get to the call you want.  In general,
+   always make sure `set_cursor_from_row' is called for the right window and
+   buffer by examining the value of w->contents: it should be the buffer whose
+   display you are debugging.
+
+ . `set_cursor_from_row' is also a good place to look at the contents of a
+   screen line (a.k.a. "glyph row"), by means of the `pgrow' GDB command.  Of
+   course, you need first to make sure the cursor is on the screen line which
+   you want to investigate.  If you have set a breakpoint in `Fredraw_display',
+   as advised above, move cursor to that line before invoking `redraw-display'.
+
+ . If the problem happens only at some specific buffer position or for some
+   specific rarely-used character, you can make your breakpoints conditional on
+   those values.  The display engine maintains the buffer and string position
+   it is processing in the it->current member; for example, the buffer
+   character position is in it->current.pos.charpos.  Most redisplay functions
+   accept a pointer to a 'struct it' object as their argument, so you can make
+   conditional breakpoints in those functions, like this:
+
+    (gdb) break x_produce_glyphs if it->current.pos.charpos == 1234
+
+   For conditioning on the character being displayed, use it->c or
+   it->char_to_display.
+
+ . You can also make the breakpoints conditional on what object is being used
+   for producing glyphs for display.  The it->method member has the value
+   GET_FROM_BUFFER for displaying buffer contents, GET_FROM_STRING for
+   displaying a Lisp string (e.g., a `display' property or an overlay string),
+   GET_FROM_IMAGE for displaying an image, etc.  See `enum it_method' in
+   dispextern.h for the full list of values.
 
 ** Following longjmp call.
 
@@ -304,18 +415,18 @@ features available just for debugging Emacs:
 
 ** Debugging what happens while preloading and dumping Emacs
 
-Type `gdb temacs' and start it with `r -batch -l loadup dump'.
+Debugging `temacs' is useful when you want to establish whether a
+problem happens in an undumped Emacs.  To run `temacs' under a
+debugger, type "gdb temacs", then start it with `r -batch -l loadup'.
+
+If you need to debug what happens during dumping, start it with `r -batch -l
+loadup dump' instead.  For debugging the bootstrap dumping, use "loadup
+bootstrap" instead of "loadup dump".
 
 If temacs actually succeeds when running under GDB in this way, do not
 try to run the dumped Emacs, because it was dumped with the GDB
 breakpoints in it.
 
-** Debugging `temacs'
-
-Debugging `temacs' is useful when you want to establish whether a
-problem happens in an undumped Emacs.  To run `temacs' under a
-debugger, type "gdb temacs", then start it with `r -batch -l loadup'.
-
 ** If you encounter X protocol errors
 
 The X server normally reports protocol errors asynchronously,
@@ -469,8 +580,7 @@ Then, if Emacs becomes hopelessly wedged, you can create 
another
 window to do kill -9 in.  kill -ILL is often useful too, since that
 may make Emacs dump core or return to adb.
 
-
-** Debugging incorrect screen updating.
+** Debugging incorrect screen updating on a text terminal.
 
 To debug Emacs problems that update the screen wrong, it is useful
 to have a record of what input you typed and what Emacs sent to the
@@ -494,40 +604,6 @@ evaluate `(setq inverse-video t)' before you try the 
operation you think
 will cause too much redrawing.  This doesn't refresh the screen, so only
 newly drawn text is in inverse video.
 
-The Emacs display code includes special debugging code, but it is
-normally disabled.  You can enable it by building Emacs with the
-pre-processing symbol GLYPH_DEBUG defined.  Here's one easy way,
-suitable for Unix and GNU systems, to build such a debugging version:
-
-        MYCPPFLAGS='-DGLYPH_DEBUG=1' make
-
-Building Emacs like that activates many assertions which scrutinize
-display code operation more than Emacs does normally.  (To see the
-code which tests these assertions, look for calls to the `xassert'
-macros.)  Any assertion that is reported to fail should be investigated.
-
-Building with GLYPH_DEBUG defined also defines several helper
-functions which can help debugging display code.  One such function is
-`dump_glyph_matrix'.  If you run Emacs under GDB, you can print the
-contents of any glyph matrix by just calling that function with the
-matrix as its argument.  For example, the following command will print
-the contents of the current matrix of the window whose pointer is in `w':
-
-  (gdb) p dump_glyph_matrix (w->current_matrix, 2)
-
-(The second argument 2 tells dump_glyph_matrix to print the glyphs in
-a long form.)  You can dump the selected window's current glyph matrix
-interactively with "M-x dump-glyph-matrix RET"; see the documentation
-of this function for more details.
-
-Several more functions for debugging display code are available in
-Emacs compiled with GLYPH_DEBUG defined; type "C-h f dump- TAB" and
-"C-h f trace- TAB" to see the full list.
-
-When you debug display problems running emacs under X, you can use
-the `ff' command to flush all pending display updates to the screen.
-
-
 ** Debugging LessTif
 
 If you encounter bugs whereby Emacs built with LessTif grabs all mouse
@@ -550,7 +626,6 @@ You can arrange for GDB to run on one machine, with the 
Emacs display
 appearing on another.  Then, when the bug happens, you can go back to
 the machine where you started GDB and use the debugger from there.
 
-
 ** Debugging problems which happen in GC
 
 The array `last_marked' (defined on alloc.c) can be used to display up
@@ -629,6 +704,12 @@ directed to the xterm window you opened above.
 Similar arrangement is possible on a character terminal by using the
 `screen' package.
 
+On MS-Windows, you can start Emacs in its own separate terminal by
+setting the new-console option before running Emacs under GDB:
+
+  (gdb) set new-console 1
+  (gdb) run
+
 ** Running Emacs built with malloc debugging packages
 
 If Emacs exhibits bugs that seem to be related to use of memory
diff --git a/etc/NEWS b/etc/NEWS
index 57e63b1..6dbe6b3 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -29,6 +29,9 @@ otherwise leave it unmarked.
 
 ** Building Emacs now requires GNU make, version 3.81 or later.
 
+** New configure option --with-cairo.
+Maybe add text based on 
http://lists.gnu.org/archive/html/emacs-devel/2015-05/msg00689.html
+
 ** By default, Emacs no longer works on IRIX.  We expect that Emacs
 users are not affected by this, as SGI stopped supporting IRIX in
 December 2013.  If you are affected, please send a bug report.  You
@@ -81,6 +84,36 @@ command line when `initial-buffer-choice' is non-nil.
 
 * Changes in Emacs 25.1
 
+** New display-buffer action function display-buffer-use-some-frame
+This displays the buffer in an existing frame other than the current
+frame, and allows the caller to specify a frame predicate to exclude
+frames.
+
+** New doc command `describe-symbol'.  Works for functions, vars, faces, etc...
+
+** `isearch' and `query-replace' now perform character folding in matches.
+This is analogous to case-folding, but applies between Unicode
+characters and their ASCII counterparts. This means many characters
+will match entire groups of characters.
+
+For instance, the " will match all variants of unicode double quotes
+(like “ and ”), and the letter a will match all of its accented
+cousins, even those composed of multiple characters, as well as many
+other symbols like ℀, ℁, ⒜, and ⓐ.
+
+** New function `character-folded-regexp' can be used
+by searching commands to produce a a regexp matching anything that
+character-folds into STRING.
+
+** New command `checkdoc-package-keywords' checks if the
+current package keywords are recognized. Set the new option
+`checkdoc-package-keywords-flag' to non-nil to make
+`checkdoc-current-buffer' call this function automatically.
+
+** New function `checkdoc-file' checks for style errors.
+It's meant for use together with `compile':
+emacs -batch --eval "(checkdoc-file \"subr.el\")"
+
 ** New command `comment-line' bound to `C-x C-;'.
 
 ** New function `custom-prompt-customize-unsaved-options' checks for
@@ -248,10 +281,10 @@ performance improvements when pasting large amounts of 
text.
 ** Emacs now supports the latest version of the UBA.
 The Emacs implementation of the Unicode Bidirectional Algorithm (UBA)
 was updated to support all the latest additions and changes introduced
-in Unicode Standard versions 6.3 and 7.0, and a few changes suggested
-for Unicode 8.0.  This includes full support for directional isolates
-and the Bidirectional Parentheses Algorithm (BPA) specified by these
-Unicode standards.
+in Unicode Standard versions 6.3, 7.0, and the latest Unicode 8.0.
+This includes full support for directional isolates and the
+Bidirectional Parentheses Algorithm (BPA) specified by these Unicode
+standards.
 
 ** You can access `mouse-buffer-menu' (C-down-mouse-1) using C-f10.
 
@@ -261,6 +294,9 @@ Unicode standards.
 
 * Changes in Specialized Modes and Packages in Emacs 25.1
 
+** Prog mode has some support for multi-mode indentation.
+See `prog-indentation-context' and `prog-widen'.
+
 ** New `xterm-screen-extra-capabilities' config.
 
 ** The `save-place' variable is replaced by a `save-place-mode'.
@@ -304,7 +340,7 @@ always respect that.
 priority (as per `package-archive-priorities') only that one is
 listed. This can be configured with `package-menu-hide-low-priority'.
 
-*** `package-menu-hide-obsolete' now toggles the hiding of packages.
+*** `package-menu-toggle-hiding' now toggles the hiding of packages.
 This includes the above-mentioned low-priority packages, as well as
 available packages whose version is lower than the currently installed
 version (which were previously impossible to display).
@@ -369,6 +405,9 @@ If you need your objects to be named, do it by inheriting 
from `eieio-named'.
 *** New command `ido-bury-buffer-at-head' bound to C-S-b
 Bury the buffer at the head of `ido-matches', analogous to how C-k
 kills the buffer at head.
+*** A prefix argument to `ido-restrict-to-matches' will reverse its
+meaning, and the list is restricted to those elements that do not
+match the current input.
 
 ** Minibuffer
 
@@ -484,9 +523,17 @@ The seq library adds sequence manipulation functions and 
macros that
 complement basic functions provided by subr.el. All functions are
 prefixed with `seq-' and work on lists, strings and vectors.
 
+** map
+*** New map library:
+The map library provides map-manipulation functions that work on alists,
+hash-table and arrays.  All functions are prefixed with "map-".
+
 ** Calendar and diary
 
 +++
+*** The default `diary-file' is now located in .emacs.d.
+
++++
 *** New commands to insert diary entries with Chinese dates:
 `diary-chinese-insert-anniversary-entry' `diary-chinese-insert-entry'
 `diary-chinese-insert-monthly-entry', `diary-chinese-insert-yearly-entry'.
@@ -576,6 +623,9 @@ plist will contain a :peer element that has the output of
 
 *** New connection method "nc", which allows to access dumb busyboxes.
 
+*** Method-specific parameters can be overwritten now with variable
+`tramp-connection-properties'.
+
 ** SQL mode
 
 *** New user variable `sql-default-directory' enables remote
@@ -740,6 +790,8 @@ notifications, if Emacs is compiled with file notification 
support.
 ---
 *** gulp.el
 
+*** landmark.el (moved to elpa.gnu.org)
+
 +++
 ** The character classes [:graph:] and [:print:] in regular expressions
 no longer match every multibyte character.  Instead, Emacs now
@@ -751,6 +803,12 @@ use [:multibyte:] instead.
 
 * New Modes and Packages in Emacs 25.1
 
+** pinentry.el allows GnuPG passphrase to be prompted through the
+minibuffer instead of a graphical dialog, depending on whether the gpg
+command is called from Emacs (i.e., INSIDE_EMACS environment variable
+is set).  This feature requires newer versions of GnuPG (2.1.5 or
+later) and Pinentry (0.9.5 or later).
+
 ** cl-generic.el provides CLOS-style multiple-dispatch generic functions.
 
 ** scss-mode (a minor variant of css-mode)
@@ -766,8 +824,21 @@ a typographically-correct documents.
 
 * Incompatible Lisp Changes in Emacs 25.1
 
+** `:global' minor mode use `setq-default' rather than `setq'.
+This means that you can't use `make-local-variable' and expect them to
+"magically" become buffer-local.
+
 ** `inhibit-point-motion-hooks' now defaults to t and is obsolete.
 
++++
+** `track-mouse' no longer freezes the shape of the mouse pointer.
+The `track-mouse' form no longer refrains from changing the shape of
+the mouse pointer for the entire time the body of that form is
+executed.  Lisp programs that use `track-mouse' for dragging across
+large portions of the Emacs display, and want to avoid changes in the
+pointer shape during dragging, should bind the variable `track-mouse'
+to the special value `dragging' in the body of the form.
+
 ** 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.)
@@ -815,11 +886,16 @@ 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.
+** substitute-command-keys now replaces quotes.
+That is, it replaces left single quotation marks (‘) by left quotes
+and right single quotation marks (’) by right quotes.  It also
+replaces grave accents by left quotes, and apostrophes that match
+grave accents by right quotes.  As before, isolated apostrophes and
+characters preceded by \= are output as-is.  Left and right quotes are
+determined by new custom variable ‘help-quote-translation’.  ?‘ means
+quote ‘like this’, ?' means quote 'like this', ?` means quote `like
+this', and nil (default) means quote ‘like this’ if displayable and
+'like this' otherwise.
 
 +++
 ** The character classes [:alpha:] and [:alnum:] in regular expressions
@@ -831,9 +907,20 @@ word syntax, use `\sw' instead.
 ** The `diff' command uses the unified format now.  To restore the old
 behavior, set `diff-switches' to `-c'.
 
+** `grep-template' and `grep-find-template' values don't include the
+--color argument anymore.  It's added at the <C> place holder position
+dynamically.
+
+** `grep-template' and `grep-find-template' values don't include the
+--color argument anymore.  It's added at the <C> place holder position
+dynamically.  Any third-party code that changes these templates should
+be updated accordingly.
+
 
 * Lisp Changes in Emacs 25.1
 
+** New functions `filepos-to-bufferpos' and `bufferpos-to-filepos'.
+
 ** The default value of `load-read-function' is now `read'.
 
 ** New hook `pre-redisplay-functions', a bit easier to use than 
pre-redisplay-function.
@@ -867,7 +954,7 @@ evaluated (and should return a string) when the closure is 
built.
 
 ** define-inline provides a new way to define inlinable functions.
 
-** New function macroexpand-1 to perform a single step of macroexpansion.
+** New function `macroexpand-1' to perform a single step of macroexpansion.
 
 ** Some "x-*" were obsoleted:
 *** x-select-text is renamed gui-select-text.
@@ -877,6 +964,9 @@ evaluated (and should return a string) when the closure is 
built.
 *** x-get-selection-value is renamed to gui-get-primary-selection.
 *** x-set-selection is renamed to gui-set-selection
 
+** New function `string-greaterp', which return the opposite result of
+`string-lessp'.
+
 ** New function `alist-get', which is also a valid place (aka lvalue).
 
 ** New function `funcall-interactively', which works like `funcall'
@@ -921,12 +1011,23 @@ directory at point.
 ** 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.
+In the new Electric Quote mode, you can enter curved single quotes
+into documentation by typing ` and '.  Outside Electric Quote mode,
+you can enter them by typing ‘C-x 8 [’ and ‘C-x 8 ]’, or (if your Alt
+key works) by typing ‘A-[’ and ‘A-]’.
 
 +++
 ** Time-related changes:
 
+*** Time conversion functions now accept an optional ZONE argument
+that specifies the time zone rules for conversion.  ZONE is omitted or
+nil for Emacs local time, t for Universal Time, ‘wall’ for system wall
+clock time, or a string as in ‘set-time-zone-rule’ for a time zone
+rule.  The affected functions are ‘current-time-string’,
+‘current-time-zone’, ‘decode-time’, and ‘format-time-string’.  The
+function ‘encode-time’, which already accepted a simple time zone rule
+argument, has been extended to accept all the new forms.
+
 *** Time-related functions now consistently accept numbers
 (representing seconds since the epoch) and nil (representing the
 current time) as well as the usual list-of-integer representation.
@@ -1010,10 +1111,19 @@ windows without "fixing" it.  It's supported by 
`fit-window-to-buffer',
 `temp-buffer-resize-mode' and `display-buffer'.
 
 +++
+** New minor mode `window-divider-mode' and options
+`window-divider-default-places', `window-divider-default-bottom-width'
+and `window-divider-default-right-width'.
+
++++
 ** New option `switch-to-buffer-in-dedicated-window' allows to customize
 how `switch-to-buffer' proceeds interactively when the selected window
 is strongly dedicated to its buffer.
 
++++
+** The option `even-window-heights' has been renamed to
+`even-window-sizes' and now handles window widths as well.
+
 ** Tearoff menus and detachable toolbars for Gtk+ has been removed.
 Those features have been deprecated in Gtk+ for a long time.
 
@@ -1047,10 +1157,18 @@ of Windows starting with Windows 9X.
 ** The byte counts in etags-generated TAGS files are now the same on
 MS-Windows as they are on other platforms.
 
+---
+** On OS X, configure creates a Cocoa ("Nextstep") build by default.
+Pass '--without-ns' to configure to create an X11 build, the old default.
+
 ** OS X 10.5 or older is no longer supported.
 
 ** OS X on PowerPC is no longer supported.
 
+---
+** The new function 'w32-application-type' returns the type of an
+MS-Windows application given the name of its executable program file.
+
 
 ----------------------------------------------------------------------
 This file is part of GNU Emacs.
diff --git a/etc/tutorials/TUTORIAL.cn b/etc/tutorials/TUTORIAL.cn
index 8dc0294..5e187a4 100644
--- a/etc/tutorials/TUTORIAL.cn
+++ b/etc/tutorials/TUTORIAL.cn
@@ -268,7 +268,7 @@ Emacs 可以有多个“窗格”,每个窗格显示不同的文字。后面
 如果一行文字很长、超出了窗格的宽度,显示不下的部分会在紧邻的下一行继续
 显示。如果你使用的是图形界面,文本区域两边的狭窄区域(左右“边缘”)会出
 现小小的转弯箭头,表明这是某一行的接续显示。如果你使用的是文本终端,接
-续显示由屏幕最右边一列的一个反斜线来表示。
+续显示由屏幕最右边一列的一个反斜线(“\”)来表示。
 
 >> 输入文字,一直到屏幕的右边界,然后继续。
 你会看到一个接续行出现。
@@ -284,6 +284,17 @@ Emacs 可以有多个“窗格”,每个窗格显示不同的文字。后面
 
 >> 输入 <Return> 重新插入你刚才删除的换行符。
 
+<Return> 是一个特殊的键,因为按下这个键后,得到的可能不仅仅是一个换行
+符。根据周围文本的不同,Emacs 可能会在换行符之后插入一些空白字符,这样,
+当你在新的一行开始打字时,文本会自动与前一行对齐。我们把这个按下一个键
+时不只是插入其对应字符的特性叫做“电动”(electric)。
+
+>> 这是一个电动 <Return> 的例子。
+   在这一行的末尾输入 <Return>。
+
+可以看到,在插入换行符之后,Emacs 插入了空格,因此光标移动到了“在”这个
+字的下面。
+
 前面讲过,大部分的 Emacs 命令都可以指定重复次数,这其中也包括输入字符的
 命令。重复执行输入字符的命令实际上就是输入多个相同的字符。
 
diff --git a/etc/tutorials/TUTORIAL.ja b/etc/tutorials/TUTORIAL.ja
index c090027..f92350a 100644
--- a/etc/tutorials/TUTORIAL.ja
+++ b/etc/tutorials/TUTORIAL.ja
@@ -922,8 +922,8 @@ C-g 
$B$G$O:F5"JT=8%l%Y%k$+$i$OH4$1=P$;$^$;$s!#$3$l$O!"(BC-g $B$,:F5"JT=8%l%Y
 $B%kFb$G$N%3%^%s%I$d0z?t$r<h$j>C$9$N$K;H$o$l$F$$$k$+$i$G$9!#(B
 
 
-$B!v$b$C$H$b$C$H%X%k%W(B
-====================
address@hidden(B
+======================
 
 $B$3$NF~Lg%,%$%I$G$O(B Emacs 
$B$r;H$$;O$a$k$N$K==J,$J>pJs$rDs6!$7$?$D$b$j$G(B
 $B$9!#(BEmacs $B$K$O$"$^$j$K$bB?$/$N5!G=$,$"$k$N$G!"address@hidden@$9$k$N(B
diff --git a/leim/Makefile.in b/leim/Makefile.in
index 2ec03db..e30895f 100644
--- a/leim/Makefile.in
+++ b/leim/Makefile.in
@@ -29,6 +29,8 @@ address@hidden@
 # Where the generated files go.
 leimdir = ${srcdir}/../lisp/leim
 
+EXEEXT = @EXEEXT@
+
 # 'make' verbosity.
 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 
diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in
index 6b5d379..a175967 100644
--- a/lib-src/Makefile.in
+++ b/lib-src/Makefile.in
@@ -350,7 +350,7 @@ TAGS: etags${EXEEXT}
        etags *.[ch]
 
 ../lib/libgnu.a: $(config_h)
-       $(MAKE) -C ../lib libgnu.a
+       $(MAKE) -C ../lib all
 
 regex.o: $(srcdir)/../src/regex.c $(srcdir)/../src/regex.h $(config_h)
        $(AM_V_CC)$(CC) -c $(CPP_CFLAGS) $<
diff --git a/lib/acl-internal.c b/lib/acl-internal.c
index 1a2f8c4..1eaa671 100644
--- a/lib/acl-internal.c
+++ b/lib/acl-internal.c
@@ -115,6 +115,13 @@ acl_access_nontrivial (acl_t acl)
 #  endif
 }
 
+int
+acl_default_nontrivial (acl_t acl)
+{
+  /* acl is non-trivial if it is non-empty.  */
+  return (acl_entries (acl) > 0);
+}
+
 # endif
 
 #elif USE_ACL && HAVE_FACL && defined GETACL /* Solaris, Cygwin, not HP-UX */
diff --git a/lib/acl-internal.h b/lib/acl-internal.h
index 11fdea1..38a4ab2 100644
--- a/lib/acl-internal.h
+++ b/lib/acl-internal.h
@@ -127,10 +127,8 @@ rpl_acl_set_fd (int fd, acl_t acl)
 #   define acl_extended_file(name) (-1)
 #  endif
 
-/* Linux-specific */
-#  ifndef HAVE_ACL_FROM_MODE
-#   define HAVE_ACL_FROM_MODE false
-#   define acl_from_mode(mode) (NULL)
+#  if ! defined HAVE_ACL_FROM_MODE && ! defined HAVE_ACL_FROM_TEXT
+#   define acl_from_mode (NULL)
 #  endif
 
 /* Set to 0 if a file's mode is stored independently from the ACL.  */
@@ -157,6 +155,12 @@ extern int acl_extended_nontrivial (acl_t);
    Return 0 if it is trivial, i.e. equivalent to a simple stat() mode.
    Return -1 and set errno upon failure to determine it.  */
 extern int acl_access_nontrivial (acl_t);
+
+/* ACL is an ACL, from a file, stored as type ACL_TYPE_DEFAULT.
+   Return 1 if the given ACL is non-trivial.
+   Return 0 if it is trivial, i.e. equivalent to a simple stat() mode.
+   Return -1 and set errno upon failure to determine it.  */
+extern int acl_default_nontrivial (acl_t);
 #  endif
 
 # elif HAVE_FACL && defined GETACL /* Solaris, Cygwin, not HP-UX */
@@ -289,6 +293,10 @@ struct permission_context {
 
 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 *);
+void free_permission_context (struct permission_context *)
+#if ! (defined USE_ACL && (HAVE_ACL_GET_FILE || defined GETACL))
+    _GL_ATTRIBUTE_CONST
+#endif
+  ;
 
 _GL_INLINE_HEADER_END
diff --git a/lib/get-permissions.c b/lib/get-permissions.c
index ccee1f1..459513c 100644
--- a/lib/get-permissions.c
+++ b/lib/get-permissions.c
@@ -33,7 +33,7 @@ int
 get_permissions (const char *name, int desc, mode_t mode,
                 struct permission_context *ctx)
 {
-  memset (ctx, 0, sizeof(*ctx));
+  memset (ctx, 0, sizeof *ctx);
   ctx->mode = mode;
 
 #if USE_ACL && HAVE_ACL_GET_FILE
@@ -60,6 +60,12 @@ get_permissions (const char *name, int desc, mode_t mode,
        return -1;
     }
 
+# if HAVE_ACL_TYPE_NFS4  /* FreeBSD */
+
+  /* TODO (see set_permissions). */
+
+# endif
+
 #  else /* HAVE_ACL_TYPE_EXTENDED */
   /* Mac OS X */
 
@@ -215,38 +221,40 @@ get_permissions (const char *name, int desc, mode_t mode,
 
 #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;
+  {
+    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.  */
+    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;
+    ctx->aclv_count = ret;
 # endif
+  }
 
 #elif USE_ACL && HAVE_ACLX_GET && ACL_AIX_WIP /* AIX */
 
@@ -254,24 +262,27 @@ get_permissions (const char *name, int desc, mode_t mode,
 
 #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;
+  {
+    int ret;
+    if (desc != -1)
+      ret = fstatacl (desc, STX_NORMAL, &ctx->u.a, sizeof ctx->u);
+    else
+      ret = statacl ((char *) 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;
+  {
+    int 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
 
diff --git a/lib/gnulib.mk b/lib/gnulib.mk
index 95f2f8b..67c7e18 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=flexmember --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=setenv --avoid=sigprocmask --avoid=stdarg 
--avoid=stdbool --avoid=threadlib --avoid=unsetenv --makefile-name=gnu [...]
 
 
 MOSTLYCLEANFILES += core *.stackdump
@@ -44,8 +44,7 @@ HAVE_INCLUDE_NEXT = (__GNUC__ || 60000000 <= __DECC_VER)
 
 ## begin gnulib module acl-permissions
 
-libgnu_a_SOURCES += acl-errno-valid.c acl-internal.c \
-  get-permissions.c set-permissions.c
+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
 
@@ -656,6 +655,17 @@ EXTRA_libgnu_a_SOURCES += mktime.c
 
 ## end   gnulib module mktime
 
+## begin gnulib module mktime-internal
+
+if gl_GNULIB_ENABLED_5264294aa0a5557541b53c8c741f7f31
+
+endif
+EXTRA_DIST += mktime-internal.h mktime.c
+
+EXTRA_libgnu_a_SOURCES += mktime.c
+
+## end   gnulib module mktime-internal
+
 ## begin gnulib module openat-h
 
 if gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7
@@ -1590,10 +1600,12 @@ time.h: time.in.h $(top_builddir)/config.status 
$(CXXDEFS_H) $(ARG_NONNULL_H) $(
              -e 's/@''GNULIB_STRPTIME''@/$(GNULIB_STRPTIME)/g' \
              -e 's/@''GNULIB_TIMEGM''@/$(GNULIB_TIMEGM)/g' \
              -e 's/@''GNULIB_TIME_R''@/$(GNULIB_TIME_R)/g' \
+             -e 's/@''GNULIB_TIME_RZ''@/$(GNULIB_TIME_RZ)/g' \
              -e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \
              -e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \
              -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \
              -e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \
+             -e 's|@''HAVE_TIMEZONE_T''@|$(HAVE_TIMEZONE_T)|g' \
              -e 's|@''REPLACE_GMTIME''@|$(REPLACE_GMTIME)|g' \
              -e 's|@''REPLACE_LOCALTIME''@|$(REPLACE_LOCALTIME)|g' \
              -e 's|@''REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \
@@ -1625,6 +1637,24 @@ EXTRA_libgnu_a_SOURCES += time_r.c
 
 ## end   gnulib module time_r
 
+## begin gnulib module time_rz
+
+
+EXTRA_DIST += time-internal.h time_rz.c
+
+EXTRA_libgnu_a_SOURCES += time_rz.c
+
+## end   gnulib module time_rz
+
+## begin gnulib module timegm
+
+
+EXTRA_DIST += mktime-internal.h timegm.c
+
+EXTRA_libgnu_a_SOURCES += timegm.c
+
+## end   gnulib module timegm
+
 ## begin gnulib module timespec
 
 libgnu_a_SOURCES += timespec.c
@@ -1807,15 +1837,6 @@ EXTRA_DIST += unistd.in.h
 
 ## end   gnulib module unistd
 
-## begin gnulib module unsetenv
-
-
-EXTRA_DIST += unsetenv.c
-
-EXTRA_libgnu_a_SOURCES += unsetenv.c
-
-## end   gnulib module unsetenv
-
 ## begin gnulib module update-copyright
 
 
diff --git a/lib/readlinkat.c b/lib/readlinkat.c
index f4826f9..c91cf0e 100644
--- a/lib/readlinkat.c
+++ b/lib/readlinkat.c
@@ -18,7 +18,10 @@
 
 #include <config.h>
 
+#include <errno.h>
 #include <unistd.h>
+#include <string.h>
+#include <sys/stat.h>
 
 #if HAVE_READLINKAT
 
@@ -27,6 +30,21 @@
 ssize_t
 rpl_readlinkat (int fd, char const *file, char *buf, size_t len)
 {
+# if READLINK_TRAILING_SLASH_BUG
+  size_t file_len = strlen (file);
+  if (file_len && file[file_len - 1] == '/')
+    {
+      /* Even if FILE without the slash is a symlink to a directory,
+         both lstat() and stat() must resolve the trailing slash to
+         the directory rather than the symlink.  We can therefore
+         safely use stat() to distinguish between EINVAL and
+         ENOTDIR/ENOENT, avoiding extra overhead of rpl_lstat().  */
+      struct stat st;
+      if (stat (file, &st) == 0)
+        errno = EINVAL;
+      return -1;
+    }
+# endif /* READLINK_TRAILING_SLASH_BUG */
   return readlinkat (fd, file, buf, len);
 }
 
diff --git a/lib/set-permissions.c b/lib/set-permissions.c
index ba291f3..1aa5b49 100644
--- a/lib/set-permissions.c
+++ b/lib/set-permissions.c
@@ -25,6 +25,8 @@
 
 #if USE_ACL
 # if ! defined HAVE_ACL_FROM_MODE && defined HAVE_ACL_FROM_TEXT /* FreeBSD, 
IRIX, Tru64 */
+#  if HAVE_ACL_GET_FILE && !HAVE_ACL_TYPE_EXTENDED
+
 static acl_t
 acl_from_mode (mode_t mode)
 {
@@ -46,6 +48,7 @@ acl_from_mode (mode_t mode)
 
   return acl_from_text (acl_text);
 }
+#  endif
 # endif
 
 # if HAVE_FACL && defined GETACL /* Solaris, Cygwin, not HP-UX */
@@ -269,7 +272,7 @@ set_acls_from_mode (const char *name, int desc, mode_t 
mode, bool *must_chmod)
   }
 }
 
-#elif HAVE_GETACL /* HP-UX */
+# elif HAVE_GETACL /* HP-UX */
 static int
 context_acl_from_mode (struct permission_context *ctx, const char *name, int 
desc)
 {
@@ -285,13 +288,13 @@ context_acl_from_mode (struct permission_context *ctx, 
const char *name, int des
 
   ctx->entries[0].uid = statbuf.st_uid;
   ctx->entries[0].gid = ACL_NSGROUP;
-  ctx->entries[0].mode = (mode >> 6) & 7;
+  ctx->entries[0].mode = (ctx->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[1].mode = (ctx->mode >> 3) & 7;
   ctx->entries[2].uid = ACL_NSUSER;
   ctx->entries[2].gid = ACL_NSGROUP;
-  ctx->entries[2].mode = mode & 7;
+  ctx->entries[2].mode = ctx->mode & 7;
   ctx->count = 3;
   return 0;
 }
@@ -304,24 +307,24 @@ context_aclv_from_mode (struct permission_context *ctx)
 
   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[0].a_perm = (ctx->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[1].a_perm = (ctx->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[2].a_perm = (ctx->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_entries[3].a_perm = ctx->mode & 7;
   ctx->aclv_count = 4;
 
-  ret = aclsort (sizeof (entries) / sizeof (struct acl), 1, entries);
+  ret = aclsort (ctx->aclv_count, 1, ctx->aclv_entries);
   if (ret > 0)
     abort ();
   return ret;
 }
-#endif
+#  endif
 
 # elif HAVE_ACLX_GET && defined ACL_AIX_WIP /* AIX */
 static int
@@ -458,19 +461,19 @@ context_acl_from_mode (struct permission_context *ctx)
 
   ctx->entries[0].a_type = USER_OBJ;
   ctx->entries[0].a_id = 0; /* irrelevant */
-  ctx->entries[0].a_perm = (mode >> 6) & 7;
+  ctx->entries[0].a_perm = (ctx->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[1].a_perm = (ctx->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[2].a_perm = (ctx->mode >> 3) & 7;
   ctx->entries[3].a_type = OTHER_OBJ;
   ctx->entries[3].a_id = 0;
-  ctx->entries[3].a_perm = mode & 7;
+  ctx->entries[3].a_perm = ctx->mode & 7;
   ctx->count = 4;
 
-  ret = aclsort (sizeof (entries) / sizeof (struct acl), 1, entries);
+  ret = aclsort (ctx->count, 1, entries);
   if (ret > 0)
     abort ();
   return ret;
@@ -483,18 +486,18 @@ set_acls (struct permission_context *ctx, const char 
*name, int desc,
 {
   int ret = 0;
 
-#if HAVE_ACL_GET_FILE
+# 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
+#   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)
     {
@@ -527,7 +530,8 @@ set_acls (struct permission_context *ctx, const char *name, 
int desc,
              *acls_set = true;
              if (S_ISDIR(ctx->mode))
                {
-                 if (! from_mode && ctx->default_acl)
+                 if (! from_mode && ctx->default_acl &&
+                     acl_default_nontrivial (ctx->default_acl))
                    ret = acl_set_file (name, ACL_TYPE_DEFAULT,
                                        ctx->default_acl);
                  else
@@ -537,6 +541,15 @@ set_acls (struct permission_context *ctx, const char 
*name, int desc,
        }
     }
 
+# if HAVE_ACL_TYPE_NFS4  /* FreeBSD */
+
+  /* File systems either support POSIX ACLs (for example, ufs) or NFS4 ACLs
+     (for example, zfs). */
+
+  /* TODO: Implement setting ACLs once get_permissions() reads them. */
+
+# endif
+
 #  else /* HAVE_ACL_TYPE_EXTENDED */
   /* Mac OS X */
 
@@ -641,9 +654,9 @@ set_acls (struct permission_context *ctx, const char *name, 
int desc,
       else
        *acls_set = true;
     }
-# endif
+#  endif
 
-#elif HAVE_GETACL /* HP-UX */
+# elif HAVE_GETACL /* HP-UX */
 
   if (from_mode)
     ret = context_acl_from_mode (ctx, name, desc);
@@ -657,7 +670,7 @@ set_acls (struct permission_context *ctx, const char *name, 
int desc,
       if (ret < 0)
        {
          if ((errno == ENOSYS || errno == EOPNOTSUPP || errno == ENOTSUP)
-             && (from_mode || !acl_nontrivial (ctx->count, ctx->entries, 
&source_statbuf)))
+             && (from_mode || !acl_nontrivial (ctx->count, ctx->entries)))
            ret = 0;
        }
       else
@@ -699,7 +712,7 @@ set_acls (struct permission_context *ctx, const char *name, 
int desc,
       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);
+       ret = chacl ((char *) name, &ctx->u.a, ctx->u.a.acl_len);
       if (ret < 0)
        {
          if (errno == ENOSYS && from_mode)
@@ -730,7 +743,7 @@ set_acls (struct permission_context *ctx, const char *name, 
int desc,
 
   /* Nothing to do. */
 
-#endif
+# endif
 
   return ret;
 }
@@ -774,7 +787,7 @@ set_permissions (struct permission_context *ctx, const char 
*name, int desc)
 
   early_chmod = false;
 # else
-  /* All other plaforms */
+  /* All other platforms */
   /* 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).  */
@@ -801,10 +814,9 @@ set_permissions (struct permission_context *ctx, const 
char *name, int desc)
       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,
+        the permissions to ctx->mode. Due 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;
diff --git a/lib/stdio.in.h b/lib/stdio.in.h
index 759c94d..ec43874 100644
--- a/lib/stdio.in.h
+++ b/lib/stdio.in.h
@@ -723,11 +723,10 @@ _GL_WARN_ON_USE (getline, "getline is unportable - "
    so any use of gets warrants an unconditional warning; besides, C11
    removed it.  */
 #undef gets
-#if HAVE_RAW_DECL_GETS
+#if HAVE_RAW_DECL_GETS && !defined __cplusplus
 _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
 #endif
 
-
 #if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@
 struct obstack;
 /* Grow an obstack with formatted output.  Return the number of
diff --git a/lib/strftime.c b/lib/strftime.c
index 2426aae..d1ca346 100644
--- a/lib/strftime.c
+++ b/lib/strftime.c
@@ -30,6 +30,7 @@
 # else
 #  include "strftime.h"
 # endif
+# include "time-internal.h"
 #endif
 
 #include <ctype.h>
@@ -121,22 +122,11 @@ extern char *tzname[];
 
 
 #ifdef _LIBC
+# define mktime_z(tz, tm) mktime (tm)
 # define tzname __tzname
 # define tzset __tzset
 #endif
 
-#if !HAVE_TM_GMTOFF
-/* Portable standalone applications should supply a "time.h" that
-   declares a POSIX-compliant localtime_r, for the benefit of older
-   implementations that lack localtime_r or have a nonstandard one.
-   See the gnulib time_r module for one way to implement this.  */
-# undef __gmtime_r
-# undef __localtime_r
-# define __gmtime_r gmtime_r
-# define __localtime_r localtime_r
-#endif
-
-
 #ifndef FPRINTFTIME
 # define FPRINTFTIME 0
 #endif
@@ -385,12 +375,7 @@ iso_week_days (int yday, int wday)
 
 /* When compiling this file, GNU applications can #define my_strftime
    to a symbol (typically nstrftime) to get an extended strftime with
-   extra arguments UT and NS.  Emacs is a special case for now, but
-   this Emacs-specific code can be removed once Emacs's config.h
-   defines my_strftime.  */
-#if defined emacs && !defined my_strftime
-# define my_strftime nstrftime
-#endif
+   extra arguments TZ and NS.  */
 
 #if FPRINTFTIME
 # undef my_strftime
@@ -398,8 +383,9 @@ iso_week_days (int yday, int wday)
 #endif
 
 #ifdef my_strftime
-# define extra_args , ut, ns
-# define extra_args_spec , int ut, int ns
+# undef HAVE_TZSET
+# define extra_args , tz, ns
+# define extra_args_spec , timezone_t tz, int ns
 #else
 # if defined COMPILE_WIDE
 #  define my_strftime wcsftime
@@ -411,7 +397,7 @@ iso_week_days (int yday, int wday)
 # define extra_args
 # define extra_args_spec
 /* We don't have this information in general.  */
-# define ut 0
+# define tz 1
 # define ns 0
 #endif
 
@@ -455,6 +441,9 @@ strftime_case_ (bool upcase, STREAM_OR_CHAR_T *s,
 # define am_len STRLEN (a_month)
 # define ap_len STRLEN (ampm)
 #endif
+#if HAVE_TZNAME
+  char **tzname_vec = tzname;
+#endif
   const char *zone;
   size_t i = 0;
   STREAM_OR_CHAR_T *p = s;
@@ -483,20 +472,29 @@ strftime_case_ (bool upcase, STREAM_OR_CHAR_T *s,
   zone = (const char *) tp->tm_zone;
 #endif
 #if HAVE_TZNAME
-  if (ut)
+  if (!tz)
     {
       if (! (zone && *zone))
         zone = "GMT";
     }
   else
     {
+# if !HAVE_TM_ZONE
+      /* Infer the zone name from *TZ instead of from TZNAME.  */
+      tzname_vec = tz->tzname_copy;
+# endif
       /* POSIX.1 requires that local time zone information be used as
          though strftime called tzset.  */
 # if HAVE_TZSET
       tzset ();
 # endif
     }
+  /* The tzset() call might have changed the value.  */
+  if (!(zone && *zone) && tp->tm_isdst >= 0)
+    zone = tzname_vec[tp->tm_isdst != 0];
 #endif
+  if (! zone)
+    zone = "";
 
   if (hour12 > 12)
     hour12 -= 12;
@@ -1144,7 +1142,7 @@ strftime_case_ (bool upcase, STREAM_OR_CHAR_T *s,
             time_t t;
 
             ltm = *tp;
-            t = mktime (&ltm);
+            t = mktime_z (tz, &ltm);
 
             /* Generate string value for T using time_t arithmetic;
                this works even if sizeof (long) < sizeof (time_t).  */
@@ -1319,14 +1317,6 @@ strftime_case_ (bool upcase, STREAM_OR_CHAR_T *s,
               to_lowcase = true;
             }
 
-#if HAVE_TZNAME
-          /* The tzset() call might have changed the value.  */
-          if (!(zone && *zone) && tp->tm_isdst >= 0)
-            zone = tzname[tp->tm_isdst != 0];
-#endif
-          if (! zone)
-            zone = "";
-
 #ifdef COMPILE_WIDE
           {
             /* The zone string is always given in multibyte form.  We have
@@ -1366,7 +1356,7 @@ strftime_case_ (bool upcase, STREAM_OR_CHAR_T *s,
 #if HAVE_TM_GMTOFF
             diff = tp->tm_gmtoff;
 #else
-            if (ut)
+            if (!tz)
               diff = 0;
             else
               {
@@ -1375,7 +1365,7 @@ strftime_case_ (bool upcase, STREAM_OR_CHAR_T *s,
                 time_t lt;
 
                 ltm = *tp;
-                lt = mktime (&ltm);
+                lt = mktime_z (tz, &ltm);
 
                 if (lt == (time_t) -1)
                   {
@@ -1384,7 +1374,7 @@ strftime_case_ (bool upcase, STREAM_OR_CHAR_T *s,
                        occurred.  */
                     struct tm tm;
 
-                    if (! __localtime_r (&lt, &tm)
+                    if (! localtime_rz (tz, &lt, &tm)
                         || ((ltm.tm_sec ^ tm.tm_sec)
                             | (ltm.tm_min ^ tm.tm_min)
                             | (ltm.tm_hour ^ tm.tm_hour)
@@ -1394,7 +1384,7 @@ strftime_case_ (bool upcase, STREAM_OR_CHAR_T *s,
                       break;
                   }
 
-                if (! __gmtime_r (&lt, &gtm))
+                if (! localtime_rz (0, &lt, &gtm))
                   break;
 
                 diff = tm_diff (&ltm, &gtm);
@@ -1473,15 +1463,3 @@ my_strftime (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t 
maxsize)
 #if defined _LIBC && ! FPRINTFTIME
 libc_hidden_def (my_strftime)
 #endif
-
-
-#if defined emacs && ! FPRINTFTIME
-/* For Emacs we have a separate interface which corresponds to the normal
-   strftime function plus the ut argument, but without the ns argument.  */
-size_t
-emacs_strftimeu (char *s, size_t maxsize, const char *format,
-                 const struct tm *tp, int ut)
-{
-  return my_strftime (s, maxsize, format, tp, ut, 0);
-}
-#endif
diff --git a/lib/strftime.h b/lib/strftime.h
index 3967afc..2ce6cc5 100644
--- a/lib/strftime.h
+++ b/lib/strftime.h
@@ -23,11 +23,10 @@ extern "C" {
 
 /* Just like strftime, but with two more arguments:
    POSIX requires that strftime use the local timezone information.
-   When __UTC is nonzero and tm->tm_zone is NULL or the empty string,
-   use UTC instead.  Use __NS as the number of nanoseconds in the
-   %N directive.  */
+   Use the timezone __TZ instead.  Use __NS as the number of
+   nanoseconds in the %N directive.  */
 size_t nstrftime (char *, size_t, char const *, struct tm const *,
-                  int __utc, int __ns);
+                  timezone_t __tz, int __ns);
 
 #ifdef __cplusplus
 }
diff --git a/lib/time-internal.h b/lib/time-internal.h
new file mode 100644
index 0000000..6bf3f8d
--- /dev/null
+++ b/lib/time-internal.h
@@ -0,0 +1,49 @@
+/* Time internal interface
+
+   Copyright 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, 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.  */
+
+/* A time zone rule.  */
+struct tm_zone
+{
+  /* More abbreviations, should they be needed.  Their TZ_IS_SET
+     members are zero.  */
+  struct tm_zone *next;
+
+#if HAVE_TZNAME && !HAVE_TM_ZONE
+  /* Copies of recent strings taken from tzname[0] and tzname[1].
+     The copies are in ABBRS, so that they survive tzset.  Null if unknown.  */
+  char *tzname_copy[2];
+#endif
+
+  /* If nonzero, the rule represents the TZ environment variable set
+     to the first "abbreviation" (this may be the empty string).
+     Otherwise, it represents an unset TZ.  */
+  char tz_is_set;
+
+  /* A sequence of null-terminated strings packed next to each other.
+     The strings are followed by an extra null byte.  If TZ_IS_SET,
+     there must be at least one string and the first string (which is
+     actually a TZ environment value value) may be empty.  Otherwise
+     all strings must be nonempty.
+
+     Abbreviations are stored here because otherwise the values of
+     tm_zone and/or tzname would be dead after changing TZ and calling
+     tzset.  Abbreviations never move once allocated, and are live
+     until tzfree is called.  */
+  char abbrs[FLEXIBLE_ARRAY_MEMBER];
+};
diff --git a/lib/time.in.h b/lib/time.in.h
index 1a6b746..a90552c 100644
--- a/lib/time.in.h
+++ b/lib/time.in.h
@@ -22,11 +22,13 @@
 
 /* Don't get in the way of glibc when it includes time.h merely to
    declare a few standard symbols, rather than to declare all the
-   symbols.  Also, Solaris 8 <time.h> eventually includes itself
+   symbols.  (However, skip this for MinGW as it treats __need_time_t
+   incompatibly.)  Also, Solaris 8 <time.h> eventually includes itself
    recursively; if that is happening, just include the system <time.h>
    without adding our own declarations.  */
-#if (defined __need_time_t || defined __need_clock_t \
-     || defined __need_timespec \
+#if (((defined __need_time_t || defined __need_clock_t \
+       || defined __need_timespec)                     \
+      && !defined __MINGW32__)                         \
      || defined address@hidden@_TIME_H)
 
 # @INCLUDE_NEXT@ @NEXT_TIME_H@
@@ -231,6 +233,25 @@ _GL_CXXALIAS_SYS (strptime, char *, (char const *restrict 
__buf,
 _GL_CXXALIASWARN (strptime);
 # endif
 
+# if defined _GNU_SOURCE && @GNULIB_TIME_RZ@ && ! @HAVE_TIMEZONE_T@
+typedef struct tm_zone *timezone_t;
+_GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name));
+_GL_CXXALIAS_SYS (tzalloc, timezone_t, (char const *__name));
+_GL_FUNCDECL_SYS (tzfree, void, (timezone_t __tz));
+_GL_CXXALIAS_SYS (tzfree, void, (timezone_t __tz));
+_GL_FUNCDECL_SYS (localtime_rz, struct tm *,
+                  (timezone_t __tz, time_t const *restrict __timer,
+                   struct tm *restrict __result) _GL_ARG_NONNULL ((2, 3)));
+_GL_CXXALIAS_SYS (localtime_rz, struct tm *,
+                  (timezone_t __tz, time_t const *restrict __timer,
+                   struct tm *restrict __result));
+_GL_FUNCDECL_SYS (mktime_z, time_t,
+                  (timezone_t __tz, struct tm *restrict __result)
+                  _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_SYS (mktime_z, time_t,
+                  (timezone_t __tz, struct tm *restrict __result));
+# endif
+
 /* Convert TM to a time_t value, assuming UTC.  */
 # if @GNULIB_TIMEGM@
 #  if @REPLACE_TIMEGM@
diff --git a/lib/time_rz.c b/lib/time_rz.c
new file mode 100644
index 0000000..cbbe2c6
--- /dev/null
+++ b/lib/time_rz.c
@@ -0,0 +1,324 @@
+/* Time zone functions such as tzalloc and localtime_rz
+
+   Copyright 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, 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.  */
+
+/* Although this module is not thread-safe, any races should be fairly
+   rare and reasonably benign.  For complete thread-safety, use a C
+   library with a working timezone_t type, so that this module is not
+   needed.  */
+
+#include <config.h>
+
+#include <time.h>
+
+#include <errno.h>
+#include <stdbool.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "time-internal.h"
+
+#if !HAVE_TZSET
+static void tzset (void) { }
+#endif
+
+/* The approximate size to use for small allocation requests.  This is
+   the largest "small" request for the GNU C library malloc.  */
+enum { DEFAULT_MXFAST = 64 * sizeof (size_t) / 4 };
+
+/* Minimum size of the ABBRS member of struct abbr.  ABBRS is larger
+   only in the unlikely case where an abbreviation longer than this is
+   used.  */
+enum { ABBR_SIZE_MIN = DEFAULT_MXFAST - offsetof (struct tm_zone, abbrs) };
+
+static char const TZ[] = "TZ";
+
+/* Magic cookie timezone_t value, for local time.  It differs from
+   NULL and from all other timezone_t values.  Only the address
+   matters; the pointer is never dereferenced.  */
+static timezone_t const local_tz = (timezone_t) 1;
+
+#if HAVE_TM_ZONE || HAVE_TZNAME
+
+/* Return true if the values A and B differ according to the rules for
+   tm_isdst: A and B differ if one is zero and the other positive.  */
+static bool
+isdst_differ (int a, int b)
+{
+  return !a != !b && 0 <= a && 0 <= b;
+}
+
+/* Return true if A and B are equal.  */
+static int
+equal_tm (const struct tm *a, const struct tm *b)
+{
+  return ! ((a->tm_sec ^ b->tm_sec)
+            | (a->tm_min ^ b->tm_min)
+            | (a->tm_hour ^ b->tm_hour)
+            | (a->tm_mday ^ b->tm_mday)
+            | (a->tm_mon ^ b->tm_mon)
+            | (a->tm_year ^ b->tm_year)
+            | isdst_differ (a->tm_isdst, b->tm_isdst));
+}
+
+#endif
+
+/* Copy to ABBRS the abbreviation at ABBR with size ABBR_SIZE (this
+   includes its trailing null byte).  Append an extra null byte to
+   mark the end of ABBRS.  */
+static void
+extend_abbrs (char *abbrs, char const *abbr, size_t abbr_size)
+{
+  memcpy (abbrs, abbr, abbr_size);
+  abbrs[abbr_size] = '\0';
+}
+
+/* Return a newly allocated time zone for NAME, or NULL on failure.
+   As a special case, return a nonzero constant for wall clock time, a
+   constant that survives freeing.  */
+timezone_t
+tzalloc (char const *name)
+{
+  size_t name_size = name ? strlen (name) + 1 : 0;
+  size_t abbr_size = name_size < ABBR_SIZE_MIN ? ABBR_SIZE_MIN : name_size + 1;
+  timezone_t tz = malloc (offsetof (struct tm_zone, abbrs) + abbr_size);
+  if (tz)
+    {
+      tz->next = NULL;
+#if HAVE_TZNAME && !HAVE_TM_ZONE
+      tz->tzname_copy[0] = tz->tzname_copy[1] = NULL;
+#endif
+      tz->tz_is_set = !!name;
+      extend_abbrs (tz->abbrs, name, name_size);
+    }
+  return tz;
+}
+
+/* Save into TZ any nontrivial time zone abbreviation used by TM, and
+   update *TM (if HAVE_TM_ZONE) or *TZ (if !HAVE_TM_ZONE &&
+   HAVE_TZNAME) if they use the abbreviation.  Return true if
+   successful, false (setting errno) otherwise.  */
+static bool
+save_abbr (timezone_t tz, struct tm *tm)
+{
+#if HAVE_TM_ZONE || HAVE_TZNAME
+  char const *zone = NULL;
+  char *zone_copy = (char *) "";
+
+# if HAVE_TZNAME
+  int tzname_index = -1;
+# endif
+
+# if HAVE_TM_ZONE
+  zone = tm->tm_zone;
+# endif
+
+# if HAVE_TZNAME
+  if (! (zone && *zone) && 0 <= tm->tm_isdst)
+    {
+      tzname_index = tm->tm_isdst != 0;
+      zone = tzname[tzname_index];
+    }
+# endif
+
+  /* No need to replace null zones, or zones within the struct tm.  */
+  if (!zone || ((char *) tm <= zone && zone < (char *) (tm + 1)))
+    return true;
+
+  if (*zone)
+    {
+      zone_copy = tz->abbrs;
+
+      while (strcmp (zone_copy, zone) != 0)
+        {
+          if (! (*zone_copy || (zone_copy == tz->abbrs && tz->tz_is_set)))
+            {
+              size_t zone_size = strlen (zone) + 1;
+              if (zone_size < tz->abbrs + ABBR_SIZE_MIN - zone_copy)
+                extend_abbrs (zone_copy, zone, zone_size);
+              else
+                {
+                  tz = tz->next = tzalloc (zone);
+                  if (!tz)
+                    return false;
+                  tz->tz_is_set = 0;
+                  zone_copy = tz->abbrs;
+                }
+              break;
+            }
+
+          zone_copy += strlen (zone_copy) + 1;
+          if (!*zone_copy && tz->next)
+            {
+              tz = tz->next;
+              zone_copy = tz->abbrs;
+            }
+        }
+    }
+
+  /* Replace the zone name so that its lifetime matches that of TZ.  */
+# if HAVE_TM_ZONE
+  tm->tm_zone = zone_copy;
+# else
+  if (0 <= tzname_index)
+    tz->tzname_copy[tzname_index] = zone_copy;
+# endif
+#endif
+
+  return true;
+}
+
+/* Free a time zone.  */
+void
+tzfree (timezone_t tz)
+{
+  if (tz != local_tz)
+    while (tz)
+      {
+        timezone_t next = tz->next;
+        free (tz);
+        tz = next;
+      }
+}
+
+/* Get and set the TZ environment variable.  These functions can be
+   overridden by programs like Emacs that manage their own environment.  */
+
+#ifndef getenv_TZ
+static char *
+getenv_TZ (void)
+{
+  return getenv (TZ);
+}
+#endif
+
+#ifndef setenv_TZ
+static int
+setenv_TZ (char const *tz)
+{
+  return tz ? setenv (TZ, tz, 1) : unsetenv (TZ);
+}
+#endif
+
+/* Change the environment to match the specified timezone_t value.
+   Return true if successful, false (setting errno) otherwise.  */
+static bool
+change_env (timezone_t tz)
+{
+  if (setenv_TZ (tz->tz_is_set ? tz->abbrs : NULL) != 0)
+    return false;
+  tzset ();
+  return true;
+}
+
+/* Temporarily set the time zone to TZ, which must not be null.
+   Return LOCAL_TZ if the time zone setting is already correct.
+   Otherwise return a newly allocated time zone representing the old
+   setting, or NULL (setting errno) on failure.  */
+static timezone_t
+set_tz (timezone_t tz)
+{
+  char *env_tz = getenv_TZ ();
+  if (env_tz
+      ? tz->tz_is_set && strcmp (tz->abbrs, env_tz) == 0
+      : !tz->tz_is_set)
+    return local_tz;
+  else
+    {
+      timezone_t old_tz = tzalloc (env_tz);
+      if (!old_tz)
+        return old_tz;
+      if (! change_env (tz))
+        {
+          int saved_errno = errno;
+          tzfree (old_tz);
+          errno = saved_errno;
+          return NULL;
+        }
+      return old_tz;
+    }
+}
+
+/* Restore an old setting returned by set_tz.  It must not be null.
+   Return true (preserving errno) if successful, false (setting errno)
+   otherwise.  */
+static bool
+revert_tz (timezone_t tz)
+{
+  if (tz == local_tz)
+    return true;
+  else
+    {
+      int saved_errno = errno;
+      bool ok = change_env (tz);
+      if (!ok)
+        saved_errno = errno;
+      tzfree (tz);
+      errno = saved_errno;
+      return ok;
+    }
+}
+
+/* Use time zone TZ to compute localtime_r (T, TM).  */
+struct tm *
+localtime_rz (timezone_t tz, time_t const *t, struct tm *tm)
+{
+  if (!tz)
+    return gmtime_r (t, tm);
+  else
+    {
+      timezone_t old_tz = set_tz (tz);
+      if (old_tz)
+        {
+          tm = localtime_r (t, tm);
+          if (tm && !save_abbr (tz, tm))
+            tm = NULL;
+          if (revert_tz (old_tz))
+            return tm;
+        }
+      return NULL;
+    }
+}
+
+/* Use time zone TZ to compute mktime (TM).  */
+time_t
+mktime_z (timezone_t tz, struct tm *tm)
+{
+  if (!tz)
+    return timegm (tm);
+  else
+    {
+      timezone_t old_tz = set_tz (tz);
+      if (old_tz)
+        {
+          time_t t = mktime (tm);
+#if HAVE_TM_ZONE || HAVE_TZNAME
+          time_t badtime = -1;
+          struct tm tm_1;
+          if ((t != badtime
+               || (localtime_r (&t, &tm_1) && equal_tm (tm, &tm_1)))
+              && !save_abbr (tz, tm))
+            t = badtime;
+#endif
+          if (revert_tz (old_tz))
+            return t;
+        }
+      return -1;
+    }
+}
diff --git a/lib/timegm.c b/lib/timegm.c
new file mode 100644
index 0000000..11c485f
--- /dev/null
+++ b/lib/timegm.c
@@ -0,0 +1,38 @@
+/* Convert UTC calendar time to simple time.  Like mktime but assumes UTC.
+
+   Copyright (C) 1994, 1997, 2003-2004, 2006-2007, 2009-2015 Free Software
+   Foundation, Inc.  This file is part of the GNU C Library.
+
+   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, 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/>.  */
+
+#ifndef _LIBC
+# include <config.h>
+#endif
+
+#include <time.h>
+
+#ifndef _LIBC
+# undef __gmtime_r
+# define __gmtime_r gmtime_r
+# define __mktime_internal mktime_internal
+# include "mktime-internal.h"
+#endif
+
+time_t
+timegm (struct tm *tmp)
+{
+  static time_t gmtime_offset;
+  tmp->tm_isdst = 0;
+  return __mktime_internal (tmp, __gmtime_r, &gmtime_offset);
+}
diff --git a/lisp/Makefile.in b/lisp/Makefile.in
index 22d5ddc..8bcb2d6 100644
--- a/lisp/Makefile.in
+++ b/lisp/Makefile.in
@@ -23,6 +23,7 @@ srcdir = @srcdir@
 top_srcdir = @top_srcdir@
 lisp = $(srcdir)
 VPATH = $(srcdir)
+EXEEXT = @EXEEXT@
 
 # Empty for all systems except MinGW, where xargs needs an explicit
 # limitation.
@@ -41,6 +42,11 @@ am__v_GEN_ = $(address@hidden@)
 am__v_GEN_0 = @echo "  GEN     " $@;
 am__v_GEN_1 =
 
+AM_V_at = $(address@hidden@)
+am__v_at_ = $(address@hidden@)
+am__v_at_0 = @
+am__v_at_1 =
+
 # You can specify a different executable on the make command line,
 # e.g. "make EMACS=../src/emacs ...".
 
@@ -115,36 +121,18 @@ unexport EMACSDATA EMACSDOC EMACSPATH
 # Prevent any setting of EMACSLOADPATH in user environment causing problems.
 emacs = EMACSLOADPATH= '$(EMACS)' $(EMACSOPT)
 
-# Common command to find subdirectories
-setwins=for file in `find . -type d -print`; do \
-          case $$file in */.* ) ;; \
-               *) wins="$$wins$${wins:+ }$$file" ;; \
-          esac; \
-       done
-
-# Find all subdirectories except `obsolete' and `term'.
-setwins_almost=for file in `find ${srcdir} -type d -print`; do \
-          case $$file in ${srcdir}*/obsolete | ${srcdir}*/term ) ;; \
-            *) wins="$$wins$${wins:+ }$$file" ;; \
-          esac; \
-        done
-
-# Find all subdirectories except `obsolete', `term', and `leim' (and subdirs).
-# We don't want the leim files listed as packages, especially
-# since many share basenames with files in language/.
-setwins_finder=for file in `find ${srcdir} -type d -print`; do \
-          case $$file in ${srcdir}*/obsolete | ${srcdir}*/term | 
${srcdir}*/leim* ) ;; \
-            *) wins="$$wins$${wins:+ }$$file" ;; \
-          esac; \
-        done
-
-# Find all subdirectories in which we might want to create subdirs.el.
-setwins_for_subdirs=for file in `find ${srcdir} -type d -print`; do \
-          case $$file in \
-            ${srcdir}*/cedet* | ${srcdir}*/leim* ) ;; \
-            *) wins="$$wins$${wins:+ }$$file" ;; \
-          esac; \
-        done
+## Subdirectories, relative to builddir.
+SUBDIRS = $(sort $(shell find ${srcdir} -type d -print))
+## Subdirectories, relative to srcdir.
+SUBDIRS_REL = $(patsubst ${srcdir}%,.%,${SUBDIRS})
+## All subdirectories except 'obsolete' and 'term'.
+SUBDIRS_ALMOST = $(filter-out ${srcdir}/obsolete ${srcdir}/term,${SUBDIRS})
+## All subdirectories except 'obsolete', 'term', and 'leim' (and subdirs).
+## We don't want the leim files listed as packages, especially
+## since many share basenames with files in language/.
+SUBDIRS_FINDER = $(filter-out ${srcdir}/leim%,${SUBDIRS_ALMOST})
+## All subdirectories in which we might want to create subdirs.el.
+SUBDIRS_SUBDIRS = $(filter-out ${srcdir}/cedet% ${srcdir}/leim%,${SUBDIRS})
 
 # cus-load and finder-inf are not explicitly requested by anything, so
 # we add them here to make sure they get built.
@@ -170,21 +158,17 @@ PHONY_EXTRAS =
 custom-deps:
        $(AM_V_at)$(MAKE) PHONY_EXTRAS=$(lisp)/cus-load.el $(lisp)/cus-load.el
 $(lisp)/cus-load.el:
-       $(AM_V_GEN)$(setwins_almost); \
-       echo Directories: $$wins; \
-       $(emacs) -l cus-dep \
+       $(AM_V_GEN)$(emacs) -l cus-dep \
          --eval '(setq generated-custom-dependencies-file (unmsys--file-name 
"$(srcdir)/cus-load.el"))' \
-         -f custom-make-dependencies $$wins
+         -f custom-make-dependencies ${SUBDIRS_ALMOST}
 
 finder-data:
        $(AM_V_at)$(MAKE) PHONY_EXTRAS=$(lisp)/finder-inf.el \
          $(lisp)/finder-inf.el
 $(lisp)/finder-inf.el:
-       $(AM_V_GEN)$(setwins_finder); \
-       echo Directories: $$wins; \
-       $(emacs) -l finder \
+       $(AM_V_GEN)$(emacs) -l finder \
          --eval '(setq generated-finder-keywords-file (unmsys--file-name 
"$(srcdir)/finder-inf.el"))' \
-         -f finder-compile-keywords-make-dist $$wins
+         -f finder-compile-keywords-make-dist ${SUBDIRS_FINDER}
 
 # Use expand-file-name rather than $abs_scrdir so that Emacs does not
 # get confused when it compares file-names for equality.
@@ -194,21 +178,19 @@ $(lisp)/finder-inf.el:
 # and make this depend on leim.
 autoloads .PHONY: $(lisp)/loaddefs.el
 $(lisp)/loaddefs.el: $(LOADDEFS)
-       $(AM_V_GEN)$(setwins_almost); \
-       echo Directories: $$wins; \
-       $(emacs) -l autoload \
+       @echo Directories for loaddefs: ${SUBDIRS_ALMOST}
+       $(AM_V_GEN)$(emacs) -l autoload \
            --eval '(setq autoload-ensure-writable t)' \
            --eval '(setq autoload-builtin-package-versions t)' \
            --eval '(setq generated-autoload-file (expand-file-name 
(unmsys--file-name "$@")))' \
-           -f batch-update-autoloads $$wins
+           -f batch-update-autoloads ${SUBDIRS_ALMOST}
 
 # This is required by the bootstrap-emacs target in ../src/Makefile, so
 # we know that if we have an emacs executable, we also have a subdirs.el.
 $(lisp)/subdirs.el:
        $(AM_V_GEN)$(MAKE) update-subdirs
 update-subdirs:
-       $(AM_V_at)$(setwins_for_subdirs); \
-       for file in $$wins; do \
+       $(AM_V_at)for file in ${SUBDIRS_SUBDIRS}; do \
           $(srcdir)/../build-aux/update-subdirs $$file; \
        done;
 
@@ -307,8 +289,8 @@ compile-targets: $(TARGETS)
 # Compile all the Elisp files that need it.  Beware: it approximates
 # `no-byte-compile', so watch out for false-positives!
 compile-main: leim semantic compile-clean
-       @(cd $(lisp) && $(setwins); \
-       els=`echo "$$wins " | sed -e 's|/\./|/|g' -e 's|/\. | |g' -e 's| |/*.el 
|g'`; \
+       @(cd $(lisp) && \
+       els=`echo "${SUBDIRS_REL} " | sed -e 's|/\./|/|g' -e 's|/\. | |g' -e 
's| |/*.el |g'`; \
        for el in $$els; do \
          test -f $$el || continue; \
          test ! -f $${el}c && GREP_OPTIONS= grep '^;.*no-byte-compile: t' $$el 
> /dev/null && continue; \
@@ -321,8 +303,8 @@ compile-main: leim semantic compile-clean
 .PHONY: compile-clean
 # Erase left-over .elc files that do not have a corresponding .el file.
 compile-clean:
-       @cd $(lisp) && $(setwins); \
-       elcs=`echo "$$wins " | sed -e 's|/\./|/|g' -e 's|/\. | |g' -e 's| 
|/*.elc |g'`; \
+       @cd $(lisp) && \
+       elcs=`echo "${SUBDIRS_REL} " | sed -e 's|/\./|/|g' -e 's|/\. | |g' -e 
's| |/*.elc |g'`; \
        for el in `echo $$elcs | sed -e 's/\.elc/\.el/g'`; do \
          if test -f "$$el" || test ! -f "$${el}c"; then :; else \
            echo rm "$${el}c"; \
@@ -387,20 +369,8 @@ compile-one-process: $(LOADDEFS) compile-first
 # Update MH-E internal autoloads. These are not to be confused with
 # the autoloads for the MH-E entry points, which are already in loaddefs.el.
 MH_E_DIR = $(lisp)/mh-e
-## MH_E_SRC avoids a circular dependency warning for mh-loaddefs.el.
-MH_E_SRC = $(MH_E_DIR)/mh-acros.el $(MH_E_DIR)/mh-alias.el    \
-       $(MH_E_DIR)/mh-buffers.el  $(MH_E_DIR)/mh-compat.el   \
-       $(MH_E_DIR)/mh-comp.el     $(MH_E_DIR)/mh-e.el        \
-       $(MH_E_DIR)/mh-folder.el   $(MH_E_DIR)/mh-funcs.el    \
-       $(MH_E_DIR)/mh-gnus.el     $(MH_E_DIR)/mh-identity.el \
-       $(MH_E_DIR)/mh-inc.el      $(MH_E_DIR)/mh-junk.el     \
-       $(MH_E_DIR)/mh-letter.el   $(MH_E_DIR)/mh-limit.el    \
-       $(MH_E_DIR)/mh-mime.el     $(MH_E_DIR)/mh-print.el    \
-       $(MH_E_DIR)/mh-scan.el     $(MH_E_DIR)/mh-search.el   \
-       $(MH_E_DIR)/mh-seq.el      $(MH_E_DIR)/mh-show.el     \
-       $(MH_E_DIR)/mh-speed.el    $(MH_E_DIR)/mh-thread.el   \
-       $(MH_E_DIR)/mh-tool-bar.el $(MH_E_DIR)/mh-utils.el    \
-       $(MH_E_DIR)/mh-xface.el
+MH_E_SRC = $(sort $(wildcard ${MH_E_DIR}/mh*.el))
+MH_E_SRC := $(filter-out ${MH_E_DIR}/mh-loaddefs.el,${MH_E_SRC})
 
 .PHONY: mh-autoloads
 mh-autoloads: $(MH_E_DIR)/mh-loaddefs.el
@@ -414,12 +384,8 @@ $(MH_E_DIR)/mh-loaddefs.el: $(MH_E_SRC)
 # an own subdirectory. OTOH, it does not hurt to keep them in
 # lisp/net.
 TRAMP_DIR = $(lisp)/net
-TRAMP_SRC = $(TRAMP_DIR)/tramp.el    $(TRAMP_DIR)/tramp-adb.el \
-       $(TRAMP_DIR)/tramp-cache.el  $(TRAMP_DIR)/tramp-cmds.el \
-       $(TRAMP_DIR)/tramp-compat.el $(TRAMP_DIR)/tramp-ftp.el  \
-       $(TRAMP_DIR)/tramp-gvfs.el   $(TRAMP_DIR)/tramp-gw.el   \
-       $(TRAMP_DIR)/tramp-sh.el     $(TRAMP_DIR)/tramp-smb.el  \
-       $(TRAMP_DIR)/tramp-uu.el     $(TRAMP_DIR)/trampver.el
+TRAMP_SRC = $(sort $(wildcard ${TRAMP_DIR}/tramp*.el))
+TRAMP_SRC := $(filter-out ${TRAMP_DIR}/tramp-loaddefs.el,${TRAMP_SRC})
 
 $(TRAMP_DIR)/tramp-loaddefs.el: $(TRAMP_SRC)
        $(AM_V_GEN)$(emacs) -l autoload \
@@ -429,18 +395,9 @@ $(TRAMP_DIR)/tramp-loaddefs.el: $(TRAMP_SRC)
 
 CAL_DIR = $(lisp)/calendar
 ## Those files that may contain internal calendar autoload cookies.
-## Avoids circular dependency warning for *-loaddefs.el.
-CAL_SRC = $(CAL_DIR)/cal-bahai.el $(CAL_DIR)/cal-china.el  \
-       $(CAL_DIR)/cal-coptic.el  $(CAL_DIR)/cal-dst.el    \
-       $(CAL_DIR)/cal-french.el  $(CAL_DIR)/cal-hebrew.el \
-       $(CAL_DIR)/cal-html.el    $(CAL_DIR)/cal-islam.el  \
-       $(CAL_DIR)/cal-iso.el     $(CAL_DIR)/cal-julian.el \
-       $(CAL_DIR)/cal-mayan.el   $(CAL_DIR)/cal-menu.el   \
-       $(CAL_DIR)/cal-move.el    $(CAL_DIR)/cal-persia.el \
-       $(CAL_DIR)/cal-tex.el     $(CAL_DIR)/cal-x.el      \
-       $(CAL_DIR)/calendar.el    $(CAL_DIR)/diary-lib.el  \
-       $(CAL_DIR)/holidays.el    $(CAL_DIR)/lunar.el      \
-       $(CAL_DIR)/solar.el
+CAL_SRC = $(addprefix ${CAL_DIR}/,diary-lib.el holidays.el lunar.el solar.el)
+CAL_SRC := $(sort ${CAL_SRC} $(wildcard ${CAL_DIR}/cal*.el))
+CAL_SRC := $(filter-out ${CAL_DIR}/cal-loaddefs.el,${CAL_SRC})
 
 $(CAL_DIR)/cal-loaddefs.el: $(CAL_SRC)
        $(AM_V_GEN)$(emacs) -l autoload \
@@ -476,10 +433,11 @@ maintainer-clean: distclean bootstrap-clean
 check-declare:
        $(emacs) -l check-declare --eval '(check-declare-directory "$(lisp)")'
 
+## This finds a lot of duplicates between foo.el and obsolete/foo.el.
 check-defun-dups:
        sed -n -e '/^(defun /s/\(.\)(.*/\1/p' \
-               $$(find . -name '*.el' -print | grep -v 'loaddefs\.el') \
-           | sort | uniq -d
+         $$(find . -name '*.el' -print | \
+         grep -Ev '(loaddefs|ldefs-boot)\.el') | sort | uniq -d
 
 # Dependencies
 
diff --git a/lisp/allout.el b/lisp/allout.el
index dcdd35e..db87cb1 100644
--- a/lisp/allout.el
+++ b/lisp/allout.el
@@ -5589,9 +5589,9 @@ Defaults:
 
 LISTIFIED is a list representing each topic header and body:
 
- \`(depth prefix text)'
+ `(depth prefix text)'
 
-or \`(depth prefix text bullet-plus)'
+or `(depth prefix text bullet-plus)'
 
 If `bullet-plus' is specified, it is inserted just after the entire prefix."
   (setq listified (cdr listified))
diff --git a/lisp/apropos.el b/lisp/apropos.el
index 023ba4b..0a1bc7b 100644
--- a/lisp/apropos.el
+++ b/lisp/apropos.el
@@ -681,7 +681,8 @@ the output includes key-bindings of commands."
       (apropos-symbols-internal
        symbols apropos-do-all
        (concat
-        (format "Library `%s' provides: %s\nand requires: %s"
+        (format (substitute-command-keys
+                 "Library `%s' provides: %s\nand requires: %s")
                 file
                 (mapconcat 'apropos-library-button
                            (or provides '(nil)) " and ")
diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el
index 5f2fc8f..4df41b5 100644
--- a/lisp/arc-mode.el
+++ b/lisp/arc-mode.el
@@ -1841,8 +1841,8 @@ This doesn't recover lost files, it just undoes changes 
in the buffer itself."
       (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)))))
+      (setq p (archive-l-e (+ p 48) (if emacs-int-has-32bits 4 8))))
+    (setq p (+ p (point-min)))
     (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/autorevert.el b/lisp/autorevert.el
index 2ff7c01..0081419 100644
--- a/lisp/autorevert.el
+++ b/lisp/autorevert.el
@@ -615,64 +615,63 @@ no more reverts are possible until the next call of
 (defun auto-revert-handler ()
   "Revert current buffer, if appropriate.
 This is an internal function used by Auto-Revert Mode."
-  (when (or auto-revert-tail-mode (not (buffer-modified-p)))
-    (let* ((buffer (current-buffer)) size
-          ;; Tramp caches the file attributes.  Setting
-          ;; `remote-file-name-inhibit-cache' forces Tramp to reread
-          ;; the values.
-          (remote-file-name-inhibit-cache t)
-          (revert
-           (if buffer-file-name
-               (and (or auto-revert-remote-files
-                        (not (file-remote-p buffer-file-name)))
-                    (or (not auto-revert-use-notify)
-                        auto-revert-notify-modified-p)
-                    (if auto-revert-tail-mode
-                        (and (file-readable-p buffer-file-name)
-                             (/= auto-revert-tail-pos
-                                 (setq size
-                                       (nth 7 (file-attributes
-                                               buffer-file-name)))))
-                      (funcall (or buffer-stale-function
-                                    #'buffer-stale--default-function)
-                                t)))
-             (and (or auto-revert-mode
-                      global-auto-revert-non-file-buffers)
-                  (funcall (or buffer-stale-function
-                               #'buffer-stale--default-function)
-                           t))))
-          eob eoblist)
-      (setq auto-revert-notify-modified-p nil)
-      (when revert
-       (when (and auto-revert-verbose
-                  (not (eq revert 'fast)))
-         (message "Reverting buffer `%s'." (buffer-name)))
-       ;; If point (or a window point) is at the end of the buffer,
-       ;; we want to keep it at the end after reverting.  This allows
-       ;; to tail a file.
-       (when buffer-file-name
-         (setq eob (eobp))
-         (walk-windows
-          (lambda (window)
-            (and (eq (window-buffer window) buffer)
-                 (= (window-point window) (point-max))
-                 (push window eoblist)))
-          'no-mini t))
-       (if auto-revert-tail-mode
-           (auto-revert-tail-handler size)
-         ;; Bind buffer-read-only in case user has done C-x C-q,
-         ;; so as not to forget that.  This gives undesirable results
-         ;; when the file's mode changes, but that is less common.
-         (let ((buffer-read-only buffer-read-only))
-           (revert-buffer 'ignore-auto 'dont-ask 'preserve-modes)))
-       (when buffer-file-name
-         (when eob (goto-char (point-max)))
-         (dolist (window eoblist)
-           (set-window-point window (point-max)))))
-      ;; `preserve-modes' avoids changing the (minor) modes.  But we
-      ;; do want to reset the mode for VC, so we do it manually.
-      (when (or revert auto-revert-check-vc-info)
-       (vc-find-file-hook)))))
+  (let* ((buffer (current-buffer)) size
+         ;; Tramp caches the file attributes.  Setting
+         ;; `remote-file-name-inhibit-cache' forces Tramp to reread
+         ;; the values.
+         (remote-file-name-inhibit-cache t)
+         (revert
+          (if buffer-file-name
+              (and (or auto-revert-remote-files
+                       (not (file-remote-p buffer-file-name)))
+                   (or (not auto-revert-use-notify)
+                       auto-revert-notify-modified-p)
+                   (if auto-revert-tail-mode
+                       (and (file-readable-p buffer-file-name)
+                            (/= auto-revert-tail-pos
+                                (setq size
+                                      (nth 7 (file-attributes
+                                              buffer-file-name)))))
+                     (funcall (or buffer-stale-function
+                                  #'buffer-stale--default-function)
+                              t)))
+            (and (or auto-revert-mode
+                     global-auto-revert-non-file-buffers)
+                 (funcall (or buffer-stale-function
+                              #'buffer-stale--default-function)
+                          t))))
+         eob eoblist)
+    (setq auto-revert-notify-modified-p nil)
+    (when revert
+      (when (and auto-revert-verbose
+                 (not (eq revert 'fast)))
+        (message "Reverting buffer `%s'." (buffer-name)))
+      ;; If point (or a window point) is at the end of the buffer, we
+      ;; want to keep it at the end after reverting.  This allows to
+      ;; tail a file.
+      (when buffer-file-name
+        (setq eob (eobp))
+        (walk-windows
+         (lambda (window)
+           (and (eq (window-buffer window) buffer)
+                (= (window-point window) (point-max))
+                (push window eoblist)))
+         'no-mini t))
+      (if auto-revert-tail-mode
+          (auto-revert-tail-handler size)
+        ;; Bind buffer-read-only in case user has done C-x C-q, so as
+        ;; not to forget that.  This gives undesirable results when
+        ;; the file's mode changes, but that is less common.
+        (let ((buffer-read-only buffer-read-only))
+          (revert-buffer 'ignore-auto 'dont-ask 'preserve-modes)))
+      (when buffer-file-name
+        (when eob (goto-char (point-max)))
+        (dolist (window eoblist)
+          (set-window-point window (point-max)))))
+    ;; `preserve-modes' avoids changing the (minor) modes.  But we do
+    ;; want to reset the mode for VC, so we do it manually.
+    (when (or revert auto-revert-check-vc-info)
+      (vc-find-file-hook))))
 
 (defun auto-revert-tail-handler (size)
   (let ((modified (buffer-modified-p))
diff --git a/lisp/bindings.el b/lisp/bindings.el
index b658914..3672812 100644
--- a/lisp/bindings.el
+++ b/lisp/bindings.el
@@ -633,7 +633,7 @@ okay.  See `mode-line-format'.")
       ;; file-supersession should all be user-errors!
       `(beginning-of-line beginning-of-buffer end-of-line
        end-of-buffer end-of-file buffer-read-only
-       file-supersession
+       file-supersession mark-inactive
         user-error ;; That's the main one!
         ))
 
diff --git a/lisp/calc/calc-help.el b/lisp/calc/calc-help.el
index aace2a9..b2e7df1 100644
--- a/lisp/calc/calc-help.el
+++ b/lisp/calc/calc-help.el
@@ -364,25 +364,21 @@ C-w  Describe how there is no warranty for Calc."
          (error "Can't find `%s' in %s" thing where)))
     (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)
-             (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 (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)
-             (search-forward (or target thing) nil t))))
+    (let* ((string-target (or target thing))
+           (quoted (format "['`‘]%s['’]" (regexp-quote string-target)))
+           (bracketed (format "\\[%s\\]\\|(%s)\\|\\<The[ \n]%s"
+                              quoted quoted quoted)))
+      (or (let ((case-fold-search nil))
+            (or (re-search-forward bracketed nil t)
+                (and not-quoted
+                     (let ((case-fold-search t))
+                       (search-forward string-target nil t)))
+                (re-search-forward quoted nil t)
+                (search-forward string-target nil t)))
+          (let ((case-fold-search t))
+            (or (re-search-forward bracketed nil t)
+                (re-search-forward quoted nil t)
+                (search-forward string-target 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 60c6fb9..5d5f4ce 100644
--- a/lisp/calc/calc-misc.el
+++ b/lisp/calc/calc-misc.el
@@ -217,7 +217,7 @@ Calc user interface as before (either C-x * C or C-x * K; 
initially C-x * C).
 (defun calc-help ()
   (interactive)
   (let ((msgs
-        '("Press `h' for complete help; press `?' repeatedly for a summary"
+        '("Press ‘h’ for complete help; press ‘?’ repeatedly for a summary"
           "Letter keys: Negate; Precision; Yank; Why; Xtended cmd; Quit"
           "Letter keys: SHIFT + Undo, reDo; Inverse, Hyperbolic, Option"
           "Letter keys: SHIFT + sQrt; Sin, Cos, Tan; Exp, Ln, logB"
@@ -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/calc/calc-store.el b/lisp/calc/calc-store.el
index 11bf964..91b927a 100644
--- a/lisp/calc/calc-store.el
+++ b/lisp/calc/calc-store.el
@@ -609,7 +609,8 @@
 
 (defun calc-insert-permanent-variable (var)
   (goto-char (point-min))
-  (if (search-forward (concat "(setq " (symbol-name var) " '") nil t)
+  (if (let (case-fold-search)
+        (search-forward (concat "(setq " (symbol-name var) " '") nil t))
       (progn
        (setq calc-pv-pos (point-marker))
        (forward-line -1)
diff --git a/lisp/calendar/appt.el b/lisp/calendar/appt.el
index f143b2d..d5d8a40 100644
--- a/lisp/calendar/appt.el
+++ b/lisp/calendar/appt.el
@@ -511,13 +511,13 @@ The default is `appt-message-warning-time'."
   (interactive "sTime (hh:mm[am/pm]): \nsMessage: \n\
 sMinutes before the appointment to start warning: ")
   (unless (string-match appt-time-regexp time)
-    (error "Unacceptable time-string"))
+    (user-error "Unacceptable time-string"))
   (and (stringp warntime)
        (setq warntime (unless (string-equal warntime "")
                         (string-to-number warntime))))
   (and warntime
        (not (integerp warntime))
-       (error "Argument WARNTIME must be an integer, or nil"))
+       (user-error "Argument WARNTIME must be an integer, or nil"))
   (or appt-timer (appt-activate))
   (let ((time-msg (list (list (appt-convert-time time))
                         (concat time " " msg) t)))
diff --git a/lisp/calendar/cal-bahai.el b/lisp/calendar/cal-bahai.el
index 180e5f9..b68ba8a 100644
--- a/lisp/calendar/cal-bahai.el
+++ b/lisp/calendar/cal-bahai.el
@@ -42,7 +42,7 @@
 ;; Váhids.  A cycle of 19 Váhids (361 years) is called a Kullu-Shay,
 ;; which means "all things".
 
-;; The calendar was named the "Badí` calendar" by its author, the Báb.
+;; The calendar was named the "Badí‘ calendar" by its author, the Báb.
 ;; It uses a week of seven days, corresponding to the Gregorian week,
 ;; each of which has its own name, again patterned after the
 ;; attributes of God.
@@ -56,9 +56,9 @@
 (require 'calendar)
 
 (defconst calendar-bahai-month-name-array
-  ["Bahá" "Jalál" "Jamál" "`Azamat" "Núr" "Rahmat" "Kalimát" "Kamál"
-   "Asmá" "`Izzat" "Mashiyyat" "`Ilm" "Qudrat" "Qawl" "Masá'il"
-   "Sharaf" "Sultán" "Mulk" "`Alá"]
+  ["Bahá" "Jalál" "Jamál" "‘Aẓamat" "Núr" "Raḥmat" "Kalimát" "Kamál"
+   "Asmá’" "‘Izzat" "Mashíyyat" "‘Ilm" "Qudrat" "Qawl" "Masá’il"
+   "Sharaf" "Sulṭán" "Mulk" "‘Alá’"]
   "Array of the month names in the Bahá'í calendar.")
 
 (defconst calendar-bahai-epoch (calendar-absolute-from-gregorian '(3 21 1844))
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el
index 1612f48..fd2580e 100644
--- a/lisp/calendar/calendar.el
+++ b/lisp/calendar/calendar.el
@@ -566,7 +566,7 @@ See also `calendar-intermonth-header'."
                         'font-lock-face 'font-lock-function-name-face)))
   :version "23.1")
 
-(defcustom diary-file "~/diary"
+(defcustom diary-file (locate-user-emacs-file "diary" "diary")
   "Name of the file in which one's personal diary of dates is kept.
 
 The file's entries are lines beginning with any of the forms
@@ -653,6 +653,7 @@ documentation of these hooks for details.
 
 Diary files can contain directives to include the contents of other files; for
 details, see the documentation for the variable `diary-list-entries-hook'."
+  :version "25.1"                  ; ~/diary -> locate-user-emacs-file
   :type 'file
   :group 'diary)
 
@@ -1194,7 +1195,7 @@ return negative results."
   (let ((year (calendar-extract-year date))
         offset-years)
     (cond ((zerop year)
-           (error "There was no year zero"))
+           (user-error "There was no year zero"))
           ((> year 0)
            (setq offset-years (1- year))
            (+ (calendar-day-number date) ; days this year
@@ -1379,7 +1380,7 @@ Optional integers MON and YR are used instead of today's 
date."
   ;; stands, almost all other calendar functions (eg holidays) would
   ;; at best have unpredictable results for such dates.
   (if (< (+ month (* 12 (1- year))) 2)
-      (error "Months before January, 1 AD cannot be displayed"))
+      (user-error "Months before January, 1 AD cannot be displayed"))
   (setq displayed-month month
         displayed-year year)
   (erase-buffer)
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el
index d5bd26a..1cb13e4 100644
--- a/lisp/calendar/diary-lib.el
+++ b/lisp/calendar/diary-lib.el
@@ -1197,7 +1197,7 @@ ensure that all relevant variables are set.
 "
   (interactive "P")
   (if (string-equal diary-mail-addr "")
-      (error "You must set `diary-mail-addr' to use this command")
+      (user-error "You must set `diary-mail-addr' to use this command")
     (let ((diary-display-function 'diary-fancy-display))
       (diary-list-entries (calendar-current-date) (or ndays diary-mail-days)))
     (compose-mail diary-mail-addr
@@ -1969,7 +1969,7 @@ and %s by the ordinal ending of that number (that is, 
`st', `nd',
 An optional parameter MARK specifies a face or single-character
 string to use when highlighting the day in the calendar."
   (or (> n 0)
-      (error "Day count must be positive"))
+      (user-error "Day count must be positive"))
   (let* ((diff (- (calendar-absolute-from-gregorian date)
                   (calendar-absolute-from-gregorian
                    (diary-make-date month day year))))
diff --git a/lisp/calendar/icalendar.el b/lisp/calendar/icalendar.el
index da5d85e..3e2a2f8 100644
--- a/lisp/calendar/icalendar.el
+++ b/lisp/calendar/icalendar.el
@@ -618,13 +618,7 @@ FIXME: multiple comma-separated values should be allowed!"
         (when (and (> (length isodatetimestring) 15)
                    ;; UTC specifier present
                    (char-equal ?Z (aref isodatetimestring 15)))
-          ;; if not UTC add current-time-zone offset
-          ;; current-time-zone should be called with actual UTC time
-          ;; (daylight saving at that time may differ to current one)
-          (setq second (+ (car (current-time-zone
-                                (encode-time second minute hour day month year
-                                             0)))
-                          second)))
+          (setq zone t))
         ;; shift if necessary
         (if day-shift
             (let ((mdy (calendar-gregorian-from-absolute
diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el
index 7369ec2..962f425 100644
--- a/lisp/calendar/todo-mode.el
+++ b/lisp/calendar/todo-mode.el
@@ -672,7 +672,7 @@ corresponding todo file, displaying the corresponding 
category."
                                                      
todo-filtered-items-mode))))
                          (if (funcall todo-files-function)
                              (todo-read-file-name "Choose a todo file to 
visit: "
-                                                   nil t)
+                                                  nil t)
                            (user-error "There are no todo files")))
                         ((and (eq major-mode 'todo-archive-mode)
                               ;; Called noninteractively via todo-quit
@@ -732,7 +732,10 @@ corresponding todo file, displaying the corresponding 
category."
        (when (or (member file todo-visited)
                  (eq todo-show-first 'first))
          (unless (todo-check-file file) (throw 'end nil))
-         (set-window-buffer (selected-window)
+          ;; If todo-show is called from the minibuffer, don't visit
+          ;; the todo file there.
+         (set-window-buffer (if (minibufferp) (minibuffer-selected-window)
+                              (selected-window))
                             (set-buffer (find-file-noselect file 'nowarn)))
          (if (equal (file-name-extension (buffer-file-name)) "toda")
              (unless (derived-mode-p 'todo-archive-mode) (todo-archive-mode))
@@ -743,6 +746,11 @@ corresponding todo file, displaying the corresponding 
category."
            (setq todo-category-number (todo-category-number cat)))
          ;; If this is a new todo file, add its first category.
          (when (zerop (buffer-size))
+            ;; Don't confuse an erased buffer with a fresh buffer for
+            ;; adding a new todo file -- it might have been erased by
+            ;; mistake or due to a bug (e.g. Bug#20832).
+            (when (buffer-modified-p)
+              (error "Buffer is empty but modified, please report a bug"))
            (let (cat-added)
              (unwind-protect
                  (setq todo-category-number
diff --git a/lisp/cedet/ede.el b/lisp/cedet/ede.el
index 43660a8..9e92fc7 100644
--- a/lisp/cedet/ede.el
+++ b/lisp/cedet/ede.el
@@ -1517,6 +1517,22 @@ It does not apply the value to buffers."
   "Commit change to local variables in PROJ."
   nil)
 
+;;; Integration with project.el
+
+(defun project-try-ede (dir)
+  (let ((project-dir
+         (locate-dominating-file
+          dir
+          (lambda (dir)
+            (ede-directory-get-open-project dir 'ROOT)))))
+    (when project-dir
+      (ede-directory-get-open-project project-dir 'ROOT))))
+
+(cl-defmethod project-root ((project ede-project))
+  (ede-project-root-directory project))
+
+(add-hook 'project-find-functions #'project-try-ede)
+
 (provide 'ede)
 
 ;; Include this last because it depends on ede.
diff --git a/lisp/cedet/mode-local.el b/lisp/cedet/mode-local.el
index 3536333..3bdc3ea 100644
--- a/lisp/cedet/mode-local.el
+++ b/lisp/cedet/mode-local.el
@@ -598,16 +598,15 @@ 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)
@@ -630,9 +629,10 @@ 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 (substitute-command-keys "\n     ‘%s’ value is\n       ")
+                   symbol))
     (if (and value (symbolp value))
-        (princ (format "‘%s’" value))
+        (princ (format (substitute-command-keys "‘%s’") value))
       (let ((pt (point)))
         (pp value)
         (save-excursion
@@ -690,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 (substitute-command-keys "‘%s’\n") buffer-or-mode))
       )
      ((signal 'wrong-type-argument
               (list 'buffer-or-mode buffer-or-mode))))
@@ -700,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 (substitute-command-keys "\n- From ‘%s’\n") mode))
         (mode-local-print-bindings table))
       (setq mode (get-mode-local-parent mode)))))
 
diff --git a/lisp/cedet/semantic/symref/grep.el 
b/lisp/cedet/semantic/symref/grep.el
index 6325eb4..cea6d4f 100644
--- a/lisp/cedet/semantic/symref/grep.el
+++ b/lisp/cedet/semantic/symref/grep.el
@@ -125,7 +125,7 @@ GREPPATTERN is the pattern used by grep."
                greppattern
                filepattern
                rootdir)))
-    ;; For some reason, my default has no <D> in it.
+    ;; http://debbugs.gnu.org/20719
     (when (string-match "find \\(\\.\\)" cmd)
       (setq cmd (replace-match rootdir t t cmd 1)))
     ;;(message "New command: %s" cmd)
diff --git a/lisp/cedet/srecode/srt-mode.el b/lisp/cedet/srecode/srt-mode.el
index 79672ec..48f0555 100644
--- a/lisp/cedet/srecode/srt-mode.el
+++ b/lisp/cedet/srecode/srt-mode.el
@@ -258,9 +258,9 @@ we can tell font lock about them.")
            (when (class-abstract-p C)
              (throw 'skip nil))
 
-           (princ "`")
+           (princ (substitute-command-keys "‘"))
            (princ name)
-           (princ "'")
+           (princ (substitute-command-keys "’"))
            (when (slot-exists-p C 'key)
              (when key
                (princ " - Character Key: ")
diff --git a/lisp/character-fold.el b/lisp/character-fold.el
new file mode 100644
index 0000000..bf5ae59
--- /dev/null
+++ b/lisp/character-fold.el
@@ -0,0 +1,132 @@
+;;; character-fold.el --- match unicode to similar ASCII -*- lexical-binding: 
t; -*-
+
+;; Copyright (C) 2015 Free Software Foundation, Inc.
+
+;; Maintainer: address@hidden
+;; Keywords: matching
+
+;; 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:
+
+
+;;;###autoload
+(defvar character-fold-search t
+  "Non-nil if searches should fold similar characters.
+This means some characters will match entire groups of characters.
+For instance, \" will match all variants of double quotes, and
+the letter a will match all of its accented versions (and then
+some).")
+
+(defconst character-fold-table
+  (eval-when-compile
+    (let* ((equiv (make-char-table 'character-fold-table))
+           (table (unicode-property-table-internal 'decomposition))
+           (func (char-table-extra-slot table 1)))
+      ;; Ensure the table is populated.
+      (map-char-table
+       (lambda (i v) (when (consp i) (funcall func (car i) v table)))
+       table)
+
+      ;; Compile a list of all complex characters that each simple
+      ;; character should match.
+      (map-char-table
+       (lambda (i dec)
+         (when (consp dec)
+           ;; Discard a possible formatting tag.
+           (when (symbolp (car dec))
+             (setq dec (cdr dec)))
+           ;; Skip trivial cases like ?a decomposing to (?a).
+           (unless (or (and (eq i (car dec))
+                            (not  (cdr dec))))
+             (let ((d dec)
+                   (fold-decomp t)
+                   k found)
+               (while (and d (not found))
+                 (setq k (pop d))
+                 ;; Is k a number or letter, per unicode standard?
+                 (setq found (memq (get-char-code-property k 'general-category)
+                                   '(Lu Ll Lt Lm Lo Nd Nl No))))
+               (if found
+                   ;; Check if the decomposition has more than one letter,
+                   ;; because then we don't want the first letter to match
+                   ;; the decomposition.
+                   (dolist (k d)
+                     (when (and fold-decomp
+                                (memq (get-char-code-property k 
'general-category)
+                                      '(Lu Ll Lt Lm Lo Nd Nl No)))
+                       (setq fold-decomp nil)))
+                 ;; If there's no number or letter on the
+                 ;; decomposition, take the first character in it.
+                 (setq found (car-safe dec)))
+               ;; Finally, we only fold multi-char decomposition if at
+               ;; least one of the chars is non-spacing (combining).
+               (when fold-decomp
+                 (setq fold-decomp nil)
+                 (dolist (k dec)
+                   (when (and (not fold-decomp)
+                              (> (get-char-code-property k 
'canonical-combining-class) 0))
+                     (setq fold-decomp t))))
+               ;; Add i to the list of characters that k can
+               ;; represent. Also possibly add its decomposition, so we can
+               ;; match multi-char representations like (format "a%c" 769)
+               (when (and found (not (eq i k)))
+                 (let ((chars (cons (char-to-string i) (aref equiv k))))
+                   (aset equiv k
+                         (if fold-decomp
+                             (cons (apply #'string dec) chars)
+                           chars))))))))
+       table)
+
+      ;; Add some manual entries.
+      (dolist (it '((?\" """ "“" "”" "”" "„" "⹂" "〞" "‟" "‟" "❞" "❝" "❠" "“" 
"„" "〝" "〟" "🙷" "🙶" "🙸" "«" "»")
+                    (?' "❟" "❛" "❜" "‘" "’" "‚" "‛" "‚" "󠀢" "❮" "❯" "‹" "›")
+                    (?` "❛" "‘" "‛" "󠀢" "❮" "‹")
+                    (?\s "\t" "\r" "\n")))
+        (let ((idx (car it))
+              (chars (cdr it)))
+          (aset equiv idx (append chars (aref equiv idx)))))
+
+      ;; Convert the lists of characters we compiled into regexps.
+      (map-char-table
+       (lambda (i v) (let ((re (regexp-opt (cons (char-to-string i) v))))
+                  (if (consp i)
+                      (set-char-table-range equiv i re)
+                    (aset equiv i re))))
+       equiv)
+      equiv))
+  "Used for folding characters of the same group during search.")
+
+;;;###autoload
+(defun character-fold-to-regexp (string &optional lax)
+  "Return a regexp matching anything that character-folds into STRING.
+If `character-fold-search' is nil, `regexp-quote' string.
+Otherwise, any character in STRING that has an entry in
+`character-fold-table' is replaced with that entry (which is a
+regexp) and other characters are `regexp-quote'd.
+If LAX is non-nil, any single whitespace character is allowed to
+match any number of times."
+  (if character-fold-search
+      (apply #'concat
+        (mapcar (lambda (c) (let ((out (or (aref character-fold-table c)
+                                      (regexp-quote (string c)))))
+                         (if (and lax (memq c '(?\s ?\t ?\r ?\n )))
+                             (concat out "+")
+                           out)))
+                string))
+    (regexp-quote string)))
+
+;;; character-fold.el ends here
diff --git a/lisp/cmuscheme.el b/lisp/cmuscheme.el
index 5d72c56..7c5819d 100644
--- a/lisp/cmuscheme.el
+++ b/lisp/cmuscheme.el
@@ -37,7 +37,7 @@
 ;;
 ;; NOTE: MIT Cscheme, when invoked with the -emacs flag, has a special user
 ;; interface that communicates process state back to the superior emacs by
-;; outputting special control sequences. The gnumacs package, xscheme.el, has
+;; outputting special control sequences. The Emacs package, xscheme.el, has
 ;; lots and lots of special purpose code to read these control sequences, and
 ;; so is very tightly integrated with the cscheme process. The cscheme
 ;; interrupt handler and debugger read single character commands in cbreak
diff --git a/lisp/cus-dep.el b/lisp/cus-dep.el
index b8a9eb8..856c96d 100644
--- a/lisp/cus-dep.el
+++ b/lisp/cus-dep.el
@@ -60,7 +60,7 @@ Usage: emacs -batch -l ./cus-dep.el -f 
custom-make-dependencies DIRS"
       ;; Use up command-line-args-left else Emacs can try to open
       ;; the args as directories after we are done.
       (while (setq subdir (pop command-line-args-left))
-        (message "Directory %s" subdir)
+        (message "Scanning %s for custom" subdir)
         (let ((files (directory-files subdir nil "\\`[^=.].*\\.el\\'"))
               (default-directory
                 (file-name-as-directory (expand-file-name subdir)))
diff --git a/lisp/cus-start.el b/lisp/cus-start.el
index b4d2139..69dbf0d 100644
--- a/lisp/cus-start.el
+++ b/lisp/cus-start.el
@@ -181,6 +181,7 @@ Leaving \"Default\" unchecked is equivalent with specifying 
a default of
                               (repeat (directory :format "%v")))
             ;; coding.c
             (inhibit-eol-conversion mule boolean)
+            (enable-character-translation mule boolean)
             (eol-mnemonic-undecided mule string)
             ;; startup.el fiddles with the values.  IMO, would be
             ;; simpler to just use #ifdefs in coding.c.
@@ -219,7 +220,16 @@ Leaving \"Default\" unchecked is equivalent with 
specifying a default of
             (visible-bell display boolean)
             (no-redraw-on-reenter display boolean)
 
-            ;; dosfns.c
+            ;; doc.c
+            (help-quote-translation help
+                                    (choice
+                                     (character :tag "Quote with curved quotes"
+                                                 :value ?‘)
+                                     (character :tag "Quote 'like this'" 
:value ?\')
+                                     (character :tag "Quote `like this'" 
:value ?\`)
+                                     (const :tag "Quote with curved quotes if 
displayable, 'like this' otherwise" nil))
+                                    "25.1")
+             ;; dosfns.c
             (dos-display-scancodes display boolean)
             (dos-hyper-key keyboard integer)
             (dos-super-key keyboard integer)
diff --git a/lisp/cus-theme.el b/lisp/cus-theme.el
index 1321fbc..bc221e1 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 (substitute-command-keys " in ‘"))
       (help-insert-xref-button (file-name-nondirectory fn)
                               'help-theme-def fn)
-      (princ "’"))
+      (princ (substitute-command-keys "’")))
     (princ ".\n")
     (if (custom-theme-p theme)
        (progn
diff --git a/lisp/descr-text.el b/lisp/descr-text.el
index c8641ae..a0b9ddf 100644
--- a/lisp/descr-text.el
+++ b/lisp/descr-text.el
@@ -161,8 +161,11 @@ 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 (substitute-command-keys "Here is a ‘")
+               (format "%S" button-type)
+               (substitute-command-keys "’ button labeled ‘")
+               button-label
+               (substitute-command-keys "’.\n\n")))
       ;; Overlays
       (when overlays
        (newline)
@@ -738,8 +741,9 @@ relevant to POS."
                       (when face
                         (insert (propertize " " 'display '(space :align-to 5))
                                 "face: ")
-                        (insert (concat "‘" (symbol-name face) "’"))
-                        (insert "\n")))))
+                        (insert (substitute-command-keys "‘")
+                                (symbol-name face)
+                                (substitute-command-keys "’\n"))))))
               (insert "these terminal codes:\n")
               (dotimes (i (length disp-vector))
                 (insert (car (aref disp-vector i))
diff --git a/lisp/dired-x.el b/lisp/dired-x.el
index eebfa91..c90306a 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -1396,6 +1396,22 @@ Considers buffers closer to the car of `buffer-list' to 
be more recent."
 ;;     result))
 
 
+;; Needed if ls -lh is supported and also for GNU ls -ls.
+(defun dired-x--string-to-number (str)
+  "Like `string-to-number' but recognize a trailing unit prefix.
+For example, 2K is expanded to 2048.0.  The caller should make
+sure that a trailing letter in STR is one of BKkMGTPEZY."
+  (let* ((val (string-to-number str))
+         (u (unless (zerop val)
+              (aref str (1- (length str))))))
+    (when (and u (> u ?9))
+      (when (= u ?k)
+        (setq u ?K))
+      (let ((units '(?B ?K ?M ?G ?T ?P ?E ?Z ?Y)))
+        (while (and units (/= (pop units) u))
+          (setq val (* 1024.0 val)))))
+    val))
+
 ;; Does anyone use this? - lrd 6/29/93.
 ;; Apparently people do use it. - lrd 12/22/97.
 
@@ -1422,7 +1438,19 @@ For example, use
 
         (equal 0 size)
 
-to mark all zero length files."
+to mark all zero length files.
+
+There's an ambiguity when a single integer not followed by a unit
+prefix precedes the file mode: It is then parsed as inode number
+and not as block size (this always works for GNU coreutils ls).
+
+Another limitation is that the uid field is needed for the
+function to work correctly.  In particular, the field is not
+present for some values of `ls-lisp-emulation'.
+
+This function operates only on the buffer content and does not
+refer at all to the underlying file system.  Contrast this with
+`find-dired', which might be preferable for the task at hand."
   ;; Using sym="" instead of nil avoids the trap of
   ;; (string-match "foo" sym) into which a user would soon fall.
   ;; Give `equal' instead of `=' in the example, as this works on
@@ -1442,23 +1470,23 @@ to mark all zero length files."
         ;; to nil or the appropriate value, so they need not be initialized.
         ;; Moves point within the current line.
         (dired-move-to-filename)
-        (let (pos
-              (mode-len 10) ; length of mode string
-              ;; like in dired.el, but with subexpressions \1=inode, \2=s:
-              (dired-re-inode-size "\\s *\\([0-9]*\\)\\s *\\([0-9]*\\) ?"))
-          (beginning-of-line)
-          (forward-char 2)
-          (if (looking-at dired-re-inode-size)
-              (progn
-                (goto-char (match-end 0))
-                (setq inode (string-to-number
-                             (buffer-substring (match-beginning 1)
-                                               (match-end 1)))
-                      s (string-to-number
-                         (buffer-substring (match-beginning 2)
-                                           (match-end 2)))))
-            (setq inode nil
-                  s nil))
+        (let ((mode-len 10) ; length of mode string
+             ;; like in dired.el, but with subexpressions \1=inode, \2=s:
+             ;; GNU ls -hs suffixes the block count with a unit and
+             ;; prints it as a float, FreeBSD does neither.
+             (dired-re-inode-size "\\=\\s *\\([0-9]+\\s +\\)?\
+\\(?:\\([0-9]+\\(?:\\.[0-9]*\\)?[BkKMGTPEZY]?\\)? ?\\)"))
+         (beginning-of-line)
+         (forward-char 2)
+         (search-forward-regexp dired-re-inode-size nil t)
+          ;; XXX Might be a size not followed by a unit prefix.
+          ;; We could set s to inode if it were otherwise nil,
+          ;; with a similar reasoning as below for setting gid to uid,
+          ;; but it would be even more whimsical.
+         (setq inode (when (match-string 1)
+                       (string-to-number (match-string 1))))
+         (setq s (when (match-string 2)
+                   (dired-x--string-to-number (match-string 2))))
           (setq mode (buffer-substring (point) (+ mode-len (point))))
           (forward-char mode-len)
           ;; Skip any extended attributes marker ("." or "+").
@@ -1466,33 +1494,60 @@ to mark all zero length files."
               (forward-char 1))
           (setq nlink (read (current-buffer)))
           ;; Karsten Wenger <address@hidden> fixed uid.
-          (setq uid (buffer-substring (1+ (point))
-                                      (progn (forward-word 1) (point))))
-          (re-search-forward directory-listing-before-filename-regexp)
-          (goto-char (match-beginning 1))
-          (forward-char -1)
-          (setq size (string-to-number
-                      (buffer-substring (save-excursion
-                                          (backward-word 1)
-                                          (setq pos (point)))
+          ;; Another issue is that GNU ls -n right-justifies numerical
+          ;; UIDs and GIDs, while FreeBSD left-justifies them, so
+          ;; don't rely on a specific whitespace layout.  Both of them
+          ;; right-justify all other numbers, though.
+          ;; XXX Return a number if the uid or gid seems to be
+          ;; numerical?
+          (setq uid (buffer-substring (progn
+                                        (skip-chars-forward " \t")
+                                        (point))
+                                      (progn
+                                        (skip-chars-forward "^ \t")
                                         (point))))
-          (goto-char pos)
-          (backward-word 1)
-          ;; if no gid is displayed, gid will be set to uid
-          ;; but user will then not reference it anyway in PREDICATE.
-          (setq gid (buffer-substring (save-excursion
-                                        (forward-word 1) (point))
+         (dired-move-to-filename)
+          (save-excursion
+            (setq time
+                  ;; The regexp below tries to match from the last
+                  ;; digit of the size field through a space after the
+                  ;; date.  Also, dates may have different formats
+                  ;; depending on file age, so the date column need
+                  ;; not be aligned to the right.
+                  (buffer-substring (save-excursion
+                                      (skip-chars-backward " \t")
                                       (point))
-                time (buffer-substring (match-beginning 1)
-                                       (1- (dired-move-to-filename)))
-                name (buffer-substring (point)
-                                       (or
-                                        (dired-move-to-end-of-filename t)
-                                        (point)))
-                sym (if (looking-at-p " -> ")
-                        (buffer-substring (progn (forward-char 4) (point))
-                                          (line-end-position))
-                      ""))
+                                    (progn
+                                      (re-search-backward
+                                       
directory-listing-before-filename-regexp)
+                                      (skip-chars-forward "^ \t")
+                                      (1+ (point))))
+                  size (dired-x--string-to-number
+                        ;; We know that there's some kind of number
+                        ;; before point because the regexp search
+                        ;; above succeeded.  I don't think it's worth
+                        ;; doing an extra check for leading garbage.
+                        (buffer-substring (point)
+                                          (progn
+                                            (skip-chars-backward "^ \t")
+                                            (point))))
+                  ;; If no gid is displayed, gid will be set to uid
+                  ;; but the user will then not reference it anyway in
+                  ;; PREDICATE.
+                  gid (buffer-substring (progn
+                                          (skip-chars-backward " \t")
+                                          (point))
+                                        (progn
+                                          (skip-chars-backward "^ \t")
+                                          (point)))))
+         (setq name (buffer-substring (point)
+                                      (or
+                                       (dired-move-to-end-of-filename t)
+                                       (point)))
+               sym (if (looking-at " -> ")
+                       (buffer-substring (progn (forward-char 4) (point))
+                                         (line-end-position))
+                     ""))
           t)
         (eval predicate
               `((inode . ,inode)
diff --git a/lisp/dired.el b/lisp/dired.el
index e523b94..5593083 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -749,10 +749,16 @@ as an argument to `dired-goto-file'."
   "\"Edit\" directory DIRNAME--delete, rename, print, etc. some files in it.
 Optional second argument SWITCHES specifies the `ls' options used.
 \(Interactively, use a prefix argument to be able to specify SWITCHES.)
-Dired displays a list of files in DIRNAME (which may also have
-shell wildcards appended to select certain files).  If DIRNAME is a cons,
-its first element is taken as the directory name and the rest as an explicit
-list of files to make directory entries for.
+
+If DIRNAME is a string, Dired displays a list of files in DIRNAME (which
+may also have shell wildcards appended to select certain files).
+
+If DIRNAME is a cons, its first element is taken as the directory name
+and the rest as an explicit list of files to make directory entries for.
+In this case, SWITCHES are applied to each of the files separately, and
+therefore switches that control the order of the files in the produced
+listing have no effect.
+
 \\<dired-mode-map>\
 You can flag files for deletion with \\[dired-flag-file-deletion] and then
 delete them by typing \\[dired-do-flagged-delete].
@@ -4392,7 +4398,7 @@ instead.
 
 ;;;***
 
-;;;### (autoloads nil "dired-x" "dired-x.el" 
"d8d702a50887671b9128ba60bd9ebb8e")
+;;;### (autoloads nil "dired-x" "dired-x.el" 
"183a6677a0dfc9e853e24b05abda5490")
 ;;; Generated autoloads from dired-x.el
 
 (autoload 'dired-jump "dired-x" "\
diff --git a/lisp/elec-pair.el b/lisp/elec-pair.el
index db812c9..205ad7e 100644
--- a/lisp/elec-pair.el
+++ b/lisp/elec-pair.el
@@ -499,7 +499,7 @@ happened."
                   (not (funcall electric-pair-inhibit-predicate
                                 last-command-event))))
          (save-excursion (electric-pair--insert pair)))))
-      (t
+      (_
        (when (and (if (functionp electric-pair-open-newline-between-pairs)
                       (funcall electric-pair-open-newline-between-pairs)
                     electric-pair-open-newline-between-pairs)
diff --git a/lisp/electric.el b/lisp/electric.el
index 88b2835..ca05c8c 100644
--- a/lisp/electric.el
+++ b/lisp/electric.el
@@ -486,7 +486,7 @@ 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
+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’,
diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el
index 907f03b..1915d94 100644
--- a/lisp/emacs-lisp/advice.el
+++ b/lisp/emacs-lisp/advice.el
@@ -2412,14 +2412,14 @@ The assignment starts at position INDEX."
 ;; The mapping should work for any two argument lists.
 
 (defun ad-map-arglists (source-arglist target-arglist)
-  "Make `funcall/apply' form to map SOURCE-ARGLIST to TARGET-ARGLIST.
+  "Make ‘funcall/apply’ form to map SOURCE-ARGLIST to TARGET-ARGLIST.
 The arguments supplied to TARGET-ARGLIST will be taken from SOURCE-ARGLIST just
 as if they had been supplied to a function with TARGET-ARGLIST directly.
 Excess source arguments will be neglected, missing source arguments will be
-supplied as nil.  Returns a `funcall' or `apply' form with the second element
-being `function' which has to be replaced by an actual function argument.
-Example: `(ad-map-arglists '(a &rest args) '(w x y z))' will return
-         `(funcall ad--addoit-function a (car args) (car (cdr args)) (nth 2 
args))'."
+supplied as nil.  Returns a ‘funcall’ or ‘apply’ form with the second element
+being ‘function’ which has to be replaced by an actual function argument.
+Example: ‘(ad-map-arglists '(a &rest args) '(w x y z))’ will return
+         ‘(funcall ad--addoit-function a (car args) (car (cdr args)) (nth 2 
args))’."
   (let* ((parsed-source-arglist (ad-parse-arglist source-arglist))
         (source-reqopt-args (append (nth 0 parsed-source-arglist)
                                     (nth 1 parsed-source-arglist)))
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el
index a6fefeb..12d0a94 100644
--- a/lisp/emacs-lisp/autoload.el
+++ b/lisp/emacs-lisp/autoload.el
@@ -522,116 +522,132 @@ If OUTFILE is non-nil and FILE specifies a 
`generated-autoload-file'
 different from OUTFILE, then OUTBUF is ignored.
 
 Return non-nil if and only if FILE adds no autoloads to OUTFILE
-\(or OUTBUF if OUTFILE is nil)."
-  (catch 'done
-    (let (load-name
-          (print-length nil)
-         (print-level nil)
-          (print-readably t)           ; This does something in Lucid Emacs.
-          (float-output-format nil)
-          (visited (get-file-buffer file))
-          (otherbuf nil)
-          (absfile (expand-file-name file))
-          ;; nil until we found a cookie.
-          output-start)
-      (with-current-buffer (or visited
-                               ;; It is faster to avoid visiting the file.
-                               (autoload-find-file file))
-        ;; Obey the no-update-autoloads file local variable.
-        (unless no-update-autoloads
-         (or noninteractive (message "Generating autoloads for %s..." file))
-         (setq load-name
-               (if (stringp generated-autoload-load-name)
-                   generated-autoload-load-name
-                 (autoload-file-load-name absfile)))
-          ;; FIXME? Comparing file-names for equality with just equal
-          ;; is fragile, eg if one has an automounter prefix and one
-          ;; does not, but both refer to the same physical file.
-          (when (and outfile
-                     (not
-                     (if (memq system-type '(ms-dos windows-nt))
-                         (equal (downcase outfile)
-                                (downcase (autoload-generated-file)))
-                       (equal outfile (autoload-generated-file)))))
-            (setq otherbuf t))
-          (save-excursion
-            (save-restriction
-              (widen)
-              (when autoload-builtin-package-versions
-                (let ((version (lm-header "version"))
-                      package)
-                  (and version
-                       (setq version (ignore-errors (version-to-list version)))
-                       (setq package (or (lm-header "package")
-                                         (file-name-sans-extension
-                                          (file-name-nondirectory file))))
-                       (setq output-start (autoload--setup-output
-                                           otherbuf outbuf absfile load-name))
-                       (let ((standard-output (marker-buffer output-start))
-                             (print-quoted t))
-                          (princ `(push (purecopy
-                                             ',(cons (intern package) version))
-                                        package--builtin-versions))
-                         (princ "\n")))))
-
-              (goto-char (point-min))
-              (while (not (eobp))
-                (skip-chars-forward " \t\n\f")
-                (cond
-                 ((looking-at (regexp-quote generate-autoload-cookie))
-                  ;; If not done yet, figure out where to insert this text.
-                  (unless output-start
-                    (setq output-start (autoload--setup-output
-                                        otherbuf outbuf absfile load-name)))
-                  (autoload--print-cookie-text output-start load-name file))
-                 ((looking-at ";")
-                  ;; Don't read the comment.
-                  (forward-line 1))
-                 (t
-                  (forward-sexp 1)
-                  (forward-line 1))))))
-
-          (when output-start
-            (let ((secondary-autoloads-file-buf
-                   (if otherbuf (current-buffer))))
-              (with-current-buffer (marker-buffer output-start)
-                (save-excursion
-                  ;; Insert the section-header line which lists the file name
-                  ;; and which functions are in it, etc.
-                  (goto-char output-start)
-                  (let ((relfile (file-relative-name absfile)))
-                    (autoload-insert-section-header
-                     (marker-buffer output-start)
-                     () load-name relfile
-                     (if secondary-autoloads-file-buf
-                         ;; MD5 checksums are much better because they do not
-                         ;; change unless the file changes (so they'll be
-                         ;; equal on two different systems and will change
-                         ;; less often than time-stamps, thus leading to fewer
-                         ;; unneeded changes causing spurious conflicts), but
-                         ;; using time-stamps is a very useful optimization,
-                         ;; so we use time-stamps for the main autoloads file
-                         ;; (loaddefs.el) where we have special ways to
-                         ;; circumvent the "random change problem", and MD5
-                         ;; checksum in secondary autoload files where we do
-                         ;; not need the time-stamp optimization because it is
-                         ;; already provided by the primary autoloads file.
-                         (md5 secondary-autoloads-file-buf
-                              ;; We'd really want to just use
-                              ;; `emacs-internal' instead.
-                              nil nil 'emacs-mule-unix)
-                       (nth 5 (file-attributes relfile))))
-                    (insert ";;; Generated autoloads from " relfile "\n")))
-                (insert generate-autoload-section-trailer))))
-         (or noninteractive
-             (message "Generating autoloads for %s...done" file)))
-        (or visited
-            ;; We created this buffer, so we should kill it.
-            (kill-buffer (current-buffer))))
-      (or (not output-start)
-          ;; If the entries were added to some other buffer, then the file
-          ;; doesn't add entries to OUTFILE.
-          otherbuf))))
+\(or OUTBUF if OUTFILE is nil).  The actual return value is
+FILE's modification time."
+  ;; Include the file name in any error messages
+  (condition-case err
+      (let (load-name
+            (print-length nil)
+            (print-level nil)
+            (print-readably t)           ; This does something in Lucid Emacs.
+            (float-output-format nil)
+            (visited (get-file-buffer file))
+            (otherbuf nil)
+            (absfile (expand-file-name file))
+            ;; nil until we found a cookie.
+            output-start)
+        (when
+            (catch 'done
+              (with-current-buffer (or visited
+                                       ;; It is faster to avoid visiting the 
file.
+                                       (autoload-find-file file))
+                ;; Obey the no-update-autoloads file local variable.
+                (unless no-update-autoloads
+                  (or noninteractive (message "Generating autoloads for %s..." 
file))
+                  (setq load-name
+                        (if (stringp generated-autoload-load-name)
+                            generated-autoload-load-name
+                          (autoload-file-load-name absfile)))
+                  ;; FIXME? Comparing file-names for equality with just equal
+                  ;; is fragile, eg if one has an automounter prefix and one
+                  ;; does not, but both refer to the same physical file.
+                  (when (and outfile
+                             (not
+                              (if (memq system-type '(ms-dos windows-nt))
+                                  (equal (downcase outfile)
+                                         (downcase (autoload-generated-file)))
+                                (equal outfile (autoload-generated-file)))))
+                    (setq otherbuf t))
+                  (save-excursion
+                    (save-restriction
+                      (widen)
+                      (when autoload-builtin-package-versions
+                        (let ((version (lm-header "version"))
+                              package)
+                          (and version
+                               (setq version (ignore-errors (version-to-list 
version)))
+                               (setq package (or (lm-header "package")
+                                                 (file-name-sans-extension
+                                                  (file-name-nondirectory 
file))))
+                               (setq output-start (autoload--setup-output
+                                                   otherbuf outbuf absfile 
load-name))
+                               (let ((standard-output (marker-buffer 
output-start))
+                                     (print-quoted t))
+                                 (princ `(push (purecopy
+                                                ',(cons (intern package) 
version))
+                                               package--builtin-versions))
+                                 (princ "\n")))))
+
+                      (goto-char (point-min))
+                      (while (not (eobp))
+                        (skip-chars-forward " \t\n\f")
+                        (cond
+                         ((looking-at (regexp-quote generate-autoload-cookie))
+                          ;; If not done yet, figure out where to insert this 
text.
+                          (unless output-start
+                            (setq output-start (autoload--setup-output
+                                                otherbuf outbuf absfile 
load-name)))
+                          (autoload--print-cookie-text output-start load-name 
file))
+                         ((looking-at ";")
+                          ;; Don't read the comment.
+                          (forward-line 1))
+                         (t
+                          (forward-sexp 1)
+                          (forward-line 1))))))
+
+                  (when output-start
+                    (let ((secondary-autoloads-file-buf
+                           (if otherbuf (current-buffer))))
+                      (with-current-buffer (marker-buffer output-start)
+                        (save-excursion
+                          ;; Insert the section-header line which lists the 
file name
+                          ;; and which functions are in it, etc.
+                          (goto-char output-start)
+                          (let ((relfile (file-relative-name absfile)))
+                            (autoload-insert-section-header
+                             (marker-buffer output-start)
+                             () load-name relfile
+                             (if secondary-autoloads-file-buf
+                                 ;; MD5 checksums are much better because they 
do not
+                                 ;; change unless the file changes (so they'll 
be
+                                 ;; equal on two different systems and will 
change
+                                 ;; less often than time-stamps, thus leading 
to fewer
+                                 ;; unneeded changes causing spurious 
conflicts), but
+                                 ;; using time-stamps is a very useful 
optimization,
+                                 ;; so we use time-stamps for the main 
autoloads file
+                                 ;; (loaddefs.el) where we have special ways to
+                                 ;; circumvent the "random change problem", 
and MD5
+                                 ;; checksum in secondary autoload files where 
we do
+                                 ;; not need the time-stamp optimization 
because it is
+                                 ;; already provided by the primary autoloads 
file.
+                                 (md5 secondary-autoloads-file-buf
+                                      ;; We'd really want to just use
+                                      ;; `emacs-internal' instead.
+                                      nil nil 'emacs-mule-unix)
+                               (nth 5 (file-attributes relfile))))
+                            (insert ";;; Generated autoloads from " relfile 
"\n")))
+                        (insert generate-autoload-section-trailer))))
+                  (or noninteractive
+                      (message "Generating autoloads for %s...done" file)))
+                (or visited
+                    ;; We created this buffer, so we should kill it.
+                    (kill-buffer (current-buffer))))
+              (or (not output-start)
+                  ;; If the entries were added to some other buffer, then the 
file
+                  ;; doesn't add entries to OUTFILE.
+                  otherbuf))
+          (nth 5 (file-attributes absfile))))
+    (error
+     ;; Probably unbalanced parens in forward-sexp. In that case, the
+     ;; condition is scan-error, and the signal data includes point
+     ;; where the error was found; we'd like to convert that to
+     ;; line:col, but line-number-at-pos gets the wrong line in batch
+     ;; mode for some reason.
+     ;;
+     ;; At least this gets the file name in the error message; the
+     ;; developer can use goto-char to get to the error position.
+     (error "%s:0:0: error: %s: %s" file (car err) (cdr err)))
+    ))
 
 (defun autoload-save-buffers ()
   (while autoload-modified-buffers
@@ -757,7 +773,7 @@ write its autoloads into the specified file instead."
                                                  t files-re))
                               dirs)))
          (done ())
-        (this-time (current-time))
+        (last-time)
          ;; Files with no autoload cookies or whose autoloads go to other
          ;; files because of file-local autoload-generated-file settings.
         (no-autoloads nil)
@@ -782,14 +798,14 @@ write its autoloads into the specified file instead."
                   ;; There shouldn't be more than one such entry.
                   ;; Remove the obsolete section.
                   (autoload-remove-section (match-beginning 0))
-                  (let ((last-time (nth 4 form)))
-                    (dolist (file file)
-                      (let ((file-time (nth 5 (file-attributes file))))
-                        (when (and file-time
-                                   (not (time-less-p last-time file-time)))
-                          ;; file unchanged
-                          (push file no-autoloads)
-                          (setq files (delete file files)))))))
+                  (setq last-time (nth 4 form))
+                  (dolist (file file)
+                    (let ((file-time (nth 5 (file-attributes file))))
+                      (when (and file-time
+                                 (not (time-less-p last-time file-time)))
+                        ;; file unchanged
+                        (push file no-autoloads)
+                        (setq files (delete file files))))))
                  ((not (stringp file)))
                  ((or (not (file-exists-p file))
                        ;; Remove duplicates as well, just in case.
@@ -811,24 +827,28 @@ write its autoloads into the specified file instead."
             (push file done)
            (setq files (delete file files)))))
       ;; Elements remaining in FILES have no existing autoload sections yet.
-      (dolist (file files)
-        (cond
-         ((member (expand-file-name file) autoload-excludes) nil)
-         ;; Passing nil as second argument forces
-         ;; autoload-generate-file-autoloads to look for the right
-         ;; spot where to insert each autoloads section.
-         ((autoload-generate-file-autoloads file nil buffer-file-name)
-          (push file no-autoloads))))
-
-      (when no-autoloads
-       ;; Sort them for better readability.
-       (setq no-autoloads (sort no-autoloads 'string<))
-       ;; Add the `no-autoloads' section.
-       (goto-char (point-max))
-       (search-backward "\f" nil t)
-       (autoload-insert-section-header
-        (current-buffer) nil nil no-autoloads this-time)
-       (insert generate-autoload-section-trailer))
+      (let ((no-autoloads-time (or last-time '(0 0 0 0))) file-time)
+       (dolist (file files)
+         (cond
+          ((member (expand-file-name file) autoload-excludes) nil)
+          ;; Passing nil as second argument forces
+          ;; autoload-generate-file-autoloads to look for the right
+          ;; spot where to insert each autoloads section.
+          ((setq file-time
+                 (autoload-generate-file-autoloads file nil buffer-file-name))
+           (push file no-autoloads)
+           (if (time-less-p no-autoloads-time file-time)
+               (setq no-autoloads-time file-time)))))
+
+       (when no-autoloads
+         ;; Sort them for better readability.
+         (setq no-autoloads (sort no-autoloads 'string<))
+         ;; Add the `no-autoloads' section.
+         (goto-char (point-max))
+         (search-backward "\f" nil t)
+         (autoload-insert-section-header
+          (current-buffer) nil nil no-autoloads no-autoloads-time)
+         (insert generate-autoload-section-trailer)))
 
       (let ((version-control 'never))
        (save-buffer))
diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el
index 3014793..1a34fa7 100644
--- a/lisp/emacs-lisp/byte-opt.el
+++ b/lisp/emacs-lisp/byte-opt.el
@@ -292,7 +292,7 @@
               (format "Inlining closure %S failed" name))
              form))))
 
-      (t ;; Give up on inlining.
+      (_ ;; Give up on inlining.
        form))))
 
 ;; ((lambda ...) ...)
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index efd4389..197df3b 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -1417,7 +1417,7 @@ extra args."
                      (`(lambda ,args . ,_) args)
                      (`(closure ,_ ,args . ,_) args)
                      ((pred byte-code-function-p) (aref old 0))
-                     (t '(&rest def)))))
+                     (_ '(&rest def)))))
             (sig2 (byte-compile-arglist-signature arglist)))
         (unless (byte-compile-arglist-signatures-congruent-p sig1 sig2)
           (byte-compile-set-symbol-position name)
@@ -4416,7 +4416,7 @@ binding slots have been popped."
       ;; which is to call back byte-compile-file-form and then return nil.
       ;; Except that we can't just call byte-compile-file-form since it would
       ;; call us right back.
-      (t (byte-compile-keep-pending form)))))
+      (_ (byte-compile-keep-pending form)))))
 
 (byte-defop-compiler-1 with-no-warnings byte-compile-no-warnings)
 (defun byte-compile-no-warnings (form)
diff --git a/lisp/emacs-lisp/check-declare.el b/lisp/emacs-lisp/check-declare.el
index ecdb6d8..ea865f2 100644
--- a/lisp/emacs-lisp/check-declare.el
+++ b/lisp/emacs-lisp/check-declare.el
@@ -279,10 +279,8 @@ TYPE is a string giving the nature of the error.  Warning 
is displayed in
            entry))
         (warning-fill-prefix "    "))
     (display-warning 'check-declare
-                     (format "%s said `%s' was defined in %s: %s"
-                             (file-name-nondirectory file) fn
-                             (file-name-nondirectory fnfile)
-                             type)
+                     (format "said `%s' was defined in %s: %s"
+                             fn (file-name-nondirectory fnfile) type)
                      nil check-declare-warning-buffer)))
 
 (declare-function compilation-forget-errors "compile" ())
diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el
index 4761ac5..0b451ef 100644
--- a/lisp/emacs-lisp/checkdoc.el
+++ b/lisp/emacs-lisp/checkdoc.el
@@ -1,4 +1,4 @@
-;;; checkdoc.el --- check documentation strings for style requirements
+;;; checkdoc.el --- check documentation strings for style requirements  -*- 
lexical-binding:t -*-
 
 ;; Copyright (C) 1997-1998, 2001-2015 Free Software Foundation, Inc.
 
@@ -267,6 +267,11 @@ made in the style guide relating to order."
   :type 'boolean)
 ;;;###autoload(put 'checkdoc-arguments-in-order-flag 'safe-local-variable 
#'booleanp)
 
+(defcustom checkdoc-package-keywords-flag nil
+  "Non-nil means warn if this file's package keywords are not recognized.
+Currently, all recognized keywords must be on `finder-known-keywords'."
+  :type 'boolean)
+
 (define-obsolete-variable-alias 'checkdoc-style-hooks
   'checkdoc-style-functions "24.3")
 (defvar checkdoc-style-functions nil
@@ -315,6 +320,7 @@ This should be set in an Emacs Lisp file's local variables."
 
 ;;;###autoload
 (defun checkdoc-list-of-strings-p (obj)
+  "Return t when OBJ is a list of strings."
   ;; this is a function so it might be shared by checkdoc-proper-noun-list
   ;; and/or checkdoc-ispell-lisp-words in the future
   (and (listp obj)
@@ -866,11 +872,20 @@ otherwise stop after the first error."
        (checkdoc-start)
        (checkdoc-message-text)
        (checkdoc-rogue-spaces)
+        (when checkdoc-package-keywords-flag
+          (checkdoc-package-keywords))
        (not (called-interactively-p 'interactive))
        (if take-notes (checkdoc-show-diagnostics))
        (message "Checking buffer for style...Done."))))
 
 ;;;###autoload
+(defun checkdoc-file (file)
+  "Check FILE for document, comment, error style, and rogue spaces."
+  (with-current-buffer (find-file-noselect file)
+    (let ((checkdoc-diagnostic-buffer "*warn*"))
+      (checkdoc-current-buffer t))))
+
+;;;###autoload
 (defun checkdoc-start (&optional take-notes)
   "Start scanning the current buffer for documentation string style errors.
 Only documentation strings are checked.
@@ -2611,16 +2626,16 @@ function called to create the messages."
   "Store POINT and MSG as errors in the checkdoc diagnostic buffer."
   (setq checkdoc-pending-errors t)
   (let ((text (list "\n" (checkdoc-buffer-label) ":"
-                   (int-to-string
-                    (count-lines (point-min) (or point (point-min))))
-                   ": " msg)))
-    (with-current-buffer (get-buffer checkdoc-diagnostic-buffer)
-      (let ((inhibit-read-only t)
-            (pt (point-max)))
-        (goto-char pt)
-        (apply #'insert text)
-        (when noninteractive
-          (warn (buffer-substring pt (point-max))))))))
+                    (int-to-string
+                     (count-lines (point-min) (or point (point-min))))
+                    ": " msg)))
+    (if (string= checkdoc-diagnostic-buffer "*warn*")
+        (warn (apply #'concat text))
+      (with-current-buffer (get-buffer checkdoc-diagnostic-buffer)
+          (let ((inhibit-read-only t)
+                (pt (point-max)))
+            (goto-char pt)
+            (apply #'insert text))))))
 
 (defun checkdoc-show-diagnostics ()
   "Display the checkdoc diagnostic buffer in a temporary window."
@@ -2637,6 +2652,39 @@ function called to create the messages."
        (setq checkdoc-pending-errors nil)
        nil)))
 
+(defun checkdoc-get-keywords ()
+  "Return a list of package keywords for the current file."
+  (save-excursion
+    (goto-char (point-min))
+    (when (re-search-forward "^;; Keywords: \\(.*\\)$" nil t)
+      (split-string (match-string-no-properties 1) ", " t))))
+
+(defvar finder-known-keywords)
+
+;;;###autoload
+(defun checkdoc-package-keywords ()
+  "Find package keywords that aren't in `finder-known-keywords'."
+  (interactive)
+  (require 'finder)
+  (let ((unrecognized-keys
+         (cl-remove-if
+          (lambda (x) (assoc (intern-soft x) finder-known-keywords))
+          (checkdoc-get-keywords))))
+    (if unrecognized-keys
+        (let* ((checkdoc-autofix-flag 'never)
+               (checkdoc-generate-compile-warnings-flag t))
+          (save-excursion
+            (goto-char (point-min))
+            (re-search-forward "^;; Keywords: \\(.*\\)$" nil t)
+            (checkdoc-start-section "checkdoc-package-keywords")
+            (checkdoc-create-error
+             (concat "Unrecognized keywords: "
+                     (mapconcat #'identity unrecognized-keys ", "))
+             (match-beginning 1) (match-end 1)))
+          (checkdoc-show-diagnostics))
+      (when (called-interactively-p 'any)
+        (message "No Package Keyword Errors.")))))
+
 (custom-add-option 'emacs-lisp-mode-hook 'checkdoc-minor-mode)
 
 (provide 'checkdoc)
diff --git a/lisp/emacs-lisp/cl-extra.el b/lisp/emacs-lisp/cl-extra.el
index 0a6bc3a..38cc772 100644
--- a/lisp/emacs-lisp/cl-extra.el
+++ b/lisp/emacs-lisp/cl-extra.el
@@ -299,22 +299,21 @@ If so, return the true (non-nil) value returned by 
PREDICATE.
 ;;;###autoload
 (defun cl-gcd (&rest args)
   "Return the greatest common divisor of the arguments."
-  (let ((a (abs (or (pop args) 0))))
-    (while args
-      (let ((b (abs (pop args))))
-       (while (> b 0) (setq b (% a (setq a b))))))
-    a))
+  (let ((a (or (pop args) 0)))
+    (dolist (b args)
+      (while (/= b 0)
+        (setq b (% a (setq a b)))))
+    (abs a)))
 
 ;;;###autoload
 (defun cl-lcm (&rest args)
   "Return the least common multiple of the arguments."
   (if (memq 0 args)
       0
-    (let ((a (abs (or (pop args) 1))))
-      (while args
-       (let ((b (abs (pop args))))
-         (setq a (* (/ a (cl-gcd a b)) b))))
-      a)))
+    (let ((a (or (pop args) 1)))
+      (dolist (b args)
+        (setq a (* (/ a (cl-gcd a b)) b)))
+      (abs a))))
 
 ;;;###autoload
 (defun cl-isqrt (x)
@@ -431,7 +430,7 @@ Optional second arg STATE is a random-state object."
   ;; Inspired by "ran3" from Numerical Recipes.  Additive congruential method.
   (let ((vec (aref state 3)))
     (if (integerp vec)
-       (let ((i 0) (j (- 1357335 (% (abs vec) 1357333))) (k 1))
+       (let ((i 0) (j (- 1357335 (abs (% vec 1357333)))) (k 1))
          (aset state 3 (setq vec (make-vector 55 nil)))
          (aset vec 0 j)
          (while (> (setq i (% (+ i 21) 55)) 0)
@@ -689,6 +688,169 @@ including `cl-block' and `cl-eval-when'."
     (prog1 (cl-prettyprint form)
       (message ""))))
 
+;;; Integration into the online help system.
+
+(eval-when-compile (require 'cl-macs))  ;Explicitly, for cl--find-class.
+(require 'help-mode)
+
+;; FIXME: We could go crazy and add another entry so describe-symbol can be
+;; used with the slot names of CL structs (and/or EIEIO objects).
+(add-to-list 'describe-symbol-backends
+             `(nil ,#'cl-find-class ,(lambda (s _b _f) (cl-describe-type s))))
+
+(defconst cl--typedef-regexp
+  (concat "(" (regexp-opt '("defclass" "defstruct" "cl-defstruct"
+                            "cl-deftype" "deftype"))
+          "[ \t\r\n]+%s[ \t\r\n]+"))
+(with-eval-after-load 'find-func
+  (defvar find-function-regexp-alist)
+  (add-to-list 'find-function-regexp-alist
+               `(define-type . cl--typedef-regexp)))
+
+(define-button-type 'cl-help-type
+  :supertype 'help-function-def
+  'help-function #'cl-describe-type
+  'help-echo (purecopy "mouse-2, RET: describe this type"))
+
+(define-button-type 'cl-type-definition
+  :supertype 'help-function-def
+  'help-echo (purecopy "mouse-2, RET: find type definition"))
+
+(declare-function help-fns-short-filename "help-fns" (filename))
+
+;;;###autoload
+(defun cl-find-class (type) (cl--find-class type))
+
+;;;###autoload
+(defun cl-describe-type (type)
+  "Display the documentation for type TYPE (a symbol)."
+  (interactive
+   (let ((str (completing-read "Describe type: " obarray #'cl-find-class t)))
+     (if (<= (length str) 0)
+         (user-error "Abort!")
+       (list (intern str)))))
+  (help-setup-xref (list #'cl-describe-type type)
+                   (called-interactively-p 'interactive))
+  (save-excursion
+    (with-help-window (help-buffer)
+      (with-current-buffer standard-output
+        (let ((class (cl-find-class type)))
+          (if class
+              (cl--describe-class type class)
+            ;; FIXME: Describe other types (the built-in ones, or those from
+            ;; cl-deftype).
+            (user-error "Unknown type %S" type))))
+      (with-current-buffer standard-output
+        ;; Return the text we displayed.
+        (buffer-string)))))
+
+(defun cl--describe-class (type &optional class)
+  (unless class (setq class (cl--find-class type)))
+  (let ((location (find-lisp-object-file-name type 'define-type))
+        ;; FIXME: Add a `cl-class-of' or `cl-typeof' or somesuch.
+        (metatype (cl--class-name (symbol-value (aref class 0)))))
+    (insert (symbol-name type)
+            (substitute-command-keys " is a type (of kind ‘"))
+    (help-insert-xref-button (symbol-name metatype)
+                             'cl-help-type metatype)
+    (insert (substitute-command-keys "’)"))
+    (when location
+      (insert (substitute-command-keys " in ‘"))
+      (help-insert-xref-button
+       (help-fns-short-filename location)
+       'cl-type-definition type location 'define-type)
+      (insert (substitute-command-keys "’")))
+    (insert ".\n")
+
+    ;; Parents.
+    (let ((pl (cl--class-parents class))
+          cur)
+      (when pl
+        (insert " Inherits from ")
+        (while (setq cur (pop pl))
+          (setq cur (cl--class-name cur))
+          (insert (substitute-command-keys "‘"))
+          (help-insert-xref-button (symbol-name cur)
+                                   'cl-help-type cur)
+          (insert (substitute-command-keys (if pl "’, " "’"))))
+        (insert ".\n")))
+
+    ;; Children, if available.  ¡For EIEIO!
+    (let ((ch (condition-case nil
+                  (cl-struct-slot-value metatype 'children class)
+                (cl-struct-unknown-slot nil)))
+          cur)
+      (when ch
+        (insert " Children ")
+        (while (setq cur (pop ch))
+          (insert (substitute-command-keys "‘"))
+          (help-insert-xref-button (symbol-name cur)
+                                   'cl-help-type cur)
+          (insert (substitute-command-keys (if ch "’, " "’"))))
+        (insert ".\n")))
+
+    ;; Type's documentation.
+    (let ((doc (cl--class-docstring class)))
+      (when doc
+        (insert "\n" doc "\n\n")))
+
+    ;; Describe all the slots in this class.
+    (cl--describe-class-slots class)
+
+    ;; Describe all the methods specific to this class.
+    (let ((generics (cl--generic-all-functions type)))
+      (when generics
+        (insert (propertize "Specialized Methods:\n\n" 'face 'bold))
+        (dolist (generic generics)
+          (insert (substitute-command-keys "‘"))
+          (help-insert-xref-button (symbol-name generic)
+                                   'help-function generic)
+          (insert (substitute-command-keys "’"))
+          (pcase-dolist (`(,qualifiers ,args ,doc)
+                         (cl--generic-method-documentation generic type))
+            (insert (format " %s%S\n" qualifiers args)
+                    (or doc "")))
+          (insert "\n\n"))))))
+
+(defun cl--describe-class-slot (slot)
+  (insert
+   (concat
+    (propertize "Slot: " 'face 'bold)
+    (prin1-to-string (cl--slot-descriptor-name slot))
+    (unless (eq (cl--slot-descriptor-type slot) t)
+      (concat "    type = "
+              (prin1-to-string (cl--slot-descriptor-type slot))))
+    ;; FIXME: The default init form is treated differently for structs and for
+    ;; eieio objects: for structs, the default is nil, for eieio-objects
+    ;; it's a special "unbound" value.
+    (unless nil ;; (eq (cl--slot-descriptor-initform slot) eieio-unbound)
+      (concat "    default = "
+              (prin1-to-string (cl--slot-descriptor-initform slot))))
+    (when (alist-get :printer (cl--slot-descriptor-props slot))
+      (concat "    printer = "
+              (prin1-to-string
+               (alist-get :printer (cl--slot-descriptor-props slot)))))
+    (when (alist-get :documentation (cl--slot-descriptor-props slot))
+      (concat "\n  " (alist-get :documentation (cl--slot-descriptor-props 
slot))
+              "\n")))
+   "\n"))
+
+(defun cl--describe-class-slots (class)
+  "Print help description for the slots in CLASS.
+Outputs to the current buffer."
+  (let* ((slots (cl--class-slots class))
+         ;; FIXME: Add a `cl-class-of' or `cl-typeof' or somesuch.
+         (metatype (cl--class-name (symbol-value (aref class 0))))
+         ;; ¡For EIEIO!
+         (cslots (condition-case nil
+                     (cl-struct-slot-value metatype 'class-slots class)
+                   (cl-struct-unknown-slot nil))))
+    (insert (propertize "Instance Allocated Slots:\n\n"
+                       'face 'bold))
+    (mapc #'cl--describe-class-slot slots)
+    (when (> (length cslots) 0)
+      (insert (propertize "\nClass Allocated Slots:\n\n" 'face 'bold))
+      (mapc #'cl--describe-class-slot cslots))))
 
 
 (run-hooks 'cl-extra-load-hook)
diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el
index 96b86aa..619428d 100644
--- a/lisp/emacs-lisp/cl-generic.el
+++ b/lisp/emacs-lisp/cl-generic.el
@@ -95,6 +95,7 @@
 ;; usually be simplified, or even completely skipped.
 
 (eval-when-compile (require 'cl-lib))
+(eval-when-compile (require 'cl-macs))  ;For cl--find-class.
 (eval-when-compile (require 'pcase))
 
 (cl-defstruct (cl--generic-generalizer
@@ -161,18 +162,6 @@
       (defalias name (cl--generic-make-function generic)))
     generic))
 
-(defun cl--generic-setf-rewrite (name)
-  (let* ((setter (intern (format "cl-generic-setter--%s" name)))
-         (exp `(unless (eq ',setter (get ',name 'cl-generic-setter))
-                 ;; (when (get ',name 'gv-expander)
-                 ;;   (error "gv-expander conflicts with (setf %S)" ',name))
-                 (setf (get ',name 'cl-generic-setter) ',setter)
-                 (gv-define-setter ,name (val &rest args)
-                   (cons ',setter (cons val args))))))
-    ;; Make sure `setf' can be used right away, e.g. in the body of the method.
-    (eval exp t)
-    (cons setter exp)))
-
 ;;;###autoload
 (defmacro cl-defgeneric (name args &rest options-and-methods)
   "Create a generic function NAME.
@@ -210,12 +199,10 @@ BODY, if present, is used as the body of a default method.
     (when options-and-methods
       ;; Anything remaining is assumed to be a default method body.
       (push `(,args ,@options-and-methods) methods))
+    (when (eq 'setf (car-safe name))
+      (require 'gv)
+      (setq name (gv-setter (cadr name))))
     `(progn
-       ,(when (eq 'setf (car-safe name))
-          (pcase-let ((`(,setter . ,code) (cl--generic-setf-rewrite
-                                           (cadr name))))
-            (setq name setter)
-            code))
        ,@(mapcar (lambda (declaration)
                    (let ((f (cdr (assq (car declaration)
                                        defun-declarations-alist))))
@@ -364,18 +351,15 @@ which case this method will be invoked when the argument 
is `eql' to VAL.
              list                       ; arguments
              [ &optional stringp ]      ; documentation string
              def-body)))                ; part to be debugged
-  (let ((qualifiers nil)
-        (setfizer (if (eq 'setf (car-safe name))
-                      ;; Call it before we call cl--generic-lambda.
-                      (cl--generic-setf-rewrite (cadr name)))))
+  (let ((qualifiers nil))
     (while (not (listp args))
       (push args qualifiers)
       (setq args (pop body)))
+    (when (eq 'setf (car-safe name))
+      (require 'gv)
+      (setq name (gv-setter (cadr name))))
     (pcase-let* ((`(,uses-cnm . ,fun) (cl--generic-lambda args body)))
       `(progn
-         ,(when setfizer
-            (setq name (car setfizer))
-            (cdr setfizer))
          ,(and (get name 'byte-obsolete-info)
                (or (not (fboundp 'byte-compile-warning-enabled-p))
                    (byte-compile-warning-enabled-p 'obsolete))
@@ -688,7 +672,6 @@ The tags should be chosen according to the following rules:
   This is because the method-cache is only indexed with the first non-nil
   tag (by order of decreasing priority).")
 
-
 (cl-defgeneric cl-generic-combine-methods (generic methods)
   "Build the effective method made of METHODS.
 It should return a function that expects the same arguments as the methods, and
@@ -702,8 +685,7 @@ methods.")
 ;; Temporary definition to let the next defmethod succeed.
 (fset 'cl-generic-generalizers
       (lambda (_specializer) (list cl--generic-t-generalizer)))
-(fset 'cl-generic-combine-methods
-      #'cl--generic-standard-method-combination)
+(fset 'cl-generic-combine-methods #'cl--generic-standard-method-combination)
 
 (cl-defmethod cl-generic-generalizers (specializer)
   "Support for the catch-all t specializer."
@@ -876,13 +858,62 @@ 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 (substitute-command-keys " in ‘"))
                 (help-insert-xref-button (help-fns-short-filename file)
                                          'help-function-def met-name file
                                          'cl-defmethod)
-                (insert "’.\n")))
+                (insert (substitute-command-keys "’.\n"))))
             (insert "\n" (or (nth 2 info) "Undocumented") "\n\n")))))))
 
+(defun cl--generic-specializers-apply-to-type-p (specializers type)
+  "Return non-nil if a method with SPECIALIZERS applies to TYPE."
+  (let ((applies nil))
+    (dolist (specializer specializers)
+      (if (memq (car-safe specializer) '(subclass eieio--static))
+          (setq specializer (nth 1 specializer)))
+      ;; Don't include the methods that are "too generic", such as those
+      ;; applying to `eieio-default-superclass'.
+      (and (not (memq specializer '(t eieio-default-superclass)))
+           (or (equal type specializer)
+               (when (symbolp specializer)
+                 (let ((sclass (cl--find-class specializer))
+                       (tclass (cl--find-class type)))
+                   (when (and sclass tclass)
+                     (member specializer (cl--generic-class-parents 
tclass))))))
+           (setq applies t)))
+    applies))
+
+(defun cl--generic-all-functions (&optional type)
+  "Return a list of all generic functions.
+Optional TYPE argument returns only those functions that contain
+methods for TYPE."
+  (let ((l nil))
+    (mapatoms
+     (lambda (symbol)
+       (let ((generic (and (fboundp symbol) (cl--generic symbol))))
+         (and generic
+             (catch 'found
+               (if (null type) (throw 'found t))
+               (dolist (method (cl--generic-method-table generic))
+                 (if (cl--generic-specializers-apply-to-type-p
+                      (cl--generic-method-specializers method) type)
+                     (throw 'found t))))
+             (push symbol l)))))
+    l))
+
+(defun cl--generic-method-documentation (function type)
+  "Return info for all methods of FUNCTION (a symbol) applicable to TYPE.
+The value returned is a list of elements of the form
+\(QUALIFIERS ARGS DOC)."
+  (let ((generic (cl--generic function))
+        (docs ()))
+    (when generic
+      (dolist (method (cl--generic-method-table generic))
+        (when (cl--generic-specializers-apply-to-type-p
+               (cl--generic-method-specializers method) type)
+          (push (cl--generic-method-info method) docs))))
+    docs))
+
 ;;; Support for (head <val>) specializers.
 
 ;; For both the `eql' and the `head' specializers, the dispatch
@@ -958,19 +989,22 @@ Can only be used from within the lexical body of a 
primary or around method."
           (if (eq (symbol-function tag) :quick-object-witness-check)
               tag))))
 
+(defun cl--generic-class-parents (class)
+  (let ((parents ())
+        (classes (list class)))
+    ;; BFS precedence.  FIXME: Use a topological sort.
+    (while (let ((class (pop classes)))
+             (cl-pushnew (cl--class-name class) parents)
+             (setq classes
+                   (append classes
+                           (cl--class-parents class)))))
+    (nreverse parents)))
+
 (defun cl--generic-struct-specializers (tag)
   (and (symbolp tag) (boundp tag)
        (let ((class (symbol-value tag)))
          (when (cl-typep class 'cl-structure-class)
-           (let ((types ())
-                 (classes (list class)))
-             ;; BFS precedence.
-             (while (let ((class (pop classes)))
-                      (push (cl--class-name class) types)
-                      (setq classes
-                            (append classes
-                                    (cl--class-parents class)))))
-             (nreverse types))))))
+           (cl--generic-class-parents class)))))
 
 (defconst cl--generic-struct-generalizer
   (cl-generic-make-generalizer
diff --git a/lisp/emacs-lisp/cl-indent.el b/lisp/emacs-lisp/cl-indent.el
index 57da715..5134e50 100644
--- a/lisp/emacs-lisp/cl-indent.el
+++ b/lisp/emacs-lisp/cl-indent.el
@@ -839,6 +839,7 @@ 
optional\\|rest\\|key\\|allow-other-keys\\|aux\\|whole\\|body\\|environment\
 ;; In elisp, the else part of `if' is in an implicit progn, so indent
 ;; it more.
 (put 'if 'common-lisp-indent-function-for-elisp 2)
+(put 'with-output-to-string 'common-lisp-indent-function-for-elisp 0)
 
 
 ;(defun foo (x)
diff --git a/lisp/emacs-lisp/cl-lib.el b/lisp/emacs-lisp/cl-lib.el
index b6f3a79..2dd0519 100644
--- a/lisp/emacs-lisp/cl-lib.el
+++ b/lisp/emacs-lisp/cl-lib.el
@@ -249,16 +249,6 @@ so that they are registered at compile-time as well as 
run-time."
       `(progn ,@body))))           ; Avoid loading cl-macs.el for cl-eval-when.
 
 
-;;; Symbols.
-
-(defun cl--random-time ()
-  (let* ((time (copy-sequence (current-time-string))) (i (length time)) (v 0))
-    (while (>= (cl-decf i) 0) (setq v (+ (* v 3) (aref time i))))
-    v))
-
-(defvar cl--gensym-counter (* (logand (cl--random-time) 1023) 100))
-
-
 ;;; Numbers.
 
 (define-obsolete-function-alias 'cl-floatp-safe 'floatp "24.4")
@@ -298,6 +288,11 @@ If true return the decimal value of digit CHAR in RADIX."
   (let ((n (aref cl-digit-char-table char)))
     (and n (< n (or radix 10)) n)))
 
+(defun cl--random-time ()
+  (let* ((time (copy-sequence (current-time-string))) (i (length time)) (v 0))
+    (while (>= (cl-decf i) 0) (setq v (+ (* v 3) (aref time i))))
+    v))
+
 (defvar cl--random-state
   (vector 'cl--random-state-tag -1 30 (cl--random-time)))
 
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index 636c543..f5e1ffb 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -161,7 +161,7 @@ whether X is known at compile time, macroexpand it 
completely in
 
 ;;; Symbols.
 
-(defvar cl--gensym-counter)
+(defvar cl--gensym-counter 0)
 ;;;###autoload
 (defun cl-gensym (&optional prefix)
   "Generate a new uninterned symbol.
@@ -2722,20 +2722,16 @@ non-nil value, that slot cannot be set via `setf'.
          (push `(defalias ',copier #'copy-sequence) forms))
     (if constructor
        (push (list constructor
-                      (cons '&key (delq nil (copy-sequence slots))))
-                constrs))
-    (while constrs
-      (let* ((name (caar constrs))
-             (rest (cdr (pop constrs)))
-             (args (car rest))
-             (doc  (cadr rest))
-            (anames (cl--arglist-args args))
+                    (cons '&key (delq nil (copy-sequence slots))))
+              constrs))
+    (pcase-dolist (`(,cname ,args ,doc) constrs)
+      (let* ((anames (cl--arglist-args args))
             (make (cl-mapcar (function (lambda (s d) (if (memq s anames) s d)))
                            slots defaults)))
-       (push `(cl-defsubst ,name
+       (push `(cl-defsubst ,cname
                    (&cl-defs (nil ,@descs) ,@args)
-                 ,@(if (stringp doc) (list doc)
-                     (if (stringp docstring) (list docstring)))
+                 ,(if (stringp doc) (list doc)
+                    (format "Constructor for objects of type `%s'." name))
                  ,@(if (cl--safe-expr-p `(progn ,@(mapcar #'cl-second descs)))
                        '((declare (side-effect-free t))))
                  (,(or type #'vector) ,@make))
@@ -2859,6 +2855,8 @@ slots skipped by :initial-offset may appear in the list."
               descs)))
     (nreverse descs)))
 
+(define-error 'cl-struct-unknown-slot "struct %S has no slot %S")
+
 (defun cl-struct-slot-offset (struct-type slot-name)
   "Return the offset of slot SLOT-NAME in STRUCT-TYPE.
 The returned zero-based slot index is relative to the start of
@@ -2868,7 +2866,7 @@ does not contain SLOT-NAME."
   (declare (side-effect-free t) (pure t))
   (or (gethash slot-name
                (cl--class-index-table (cl--struct-get-class struct-type)))
-      (error "struct %s has no slot %s" struct-type slot-name)))
+      (signal 'cl-struct-unknown-slot (list struct-type slot-name))))
 
 (defvar byte-compile-function-environment)
 (defvar byte-compile-macro-environment)
diff --git a/lisp/emacs-lisp/cl-preloaded.el b/lisp/emacs-lisp/cl-preloaded.el
index ed0639b..03480b2 100644
--- a/lisp/emacs-lisp/cl-preloaded.el
+++ b/lisp/emacs-lisp/cl-preloaded.el
@@ -147,6 +147,7 @@
               ok)
             (error "Included struct %S has changed since compilation of %S"
                    parent name))))
+    (add-to-list 'current-load-list `(define-type . ,name))
     (cl--struct-register-child parent-class tag)
     (unless (eq named t)
       (eval `(defconst ,tag ',class) t)
@@ -195,7 +196,7 @@
                (:constructor nil)
                (:constructor cl--make-slot-descriptor
                 (name &optional initform type props))
-               (:copier cl--copy-slot-descriptor))
+               (:copier cl--copy-slot-descriptor-1))
   ;; FIXME: This is actually not used yet, for circularity reasons!
   "Descriptor of structure slot."
   name                                  ;Attribute name (symbol).
@@ -205,6 +206,11 @@
   ;;  :documentation, :protection, :custom, :label, :group, :printer.
   (props nil :type alist))
 
+(defun cl--copy-slot-descriptor (slot)
+  (let ((new (cl--copy-slot-descriptor-1 slot)))
+    (cl-callf copy-alist (cl--slot-descriptor-props new))
+    new))
+
 (cl-defstruct (cl--class
                (:constructor nil)
                (:copier nil))
diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el
index 77d6332..0e307fa 100644
--- a/lisp/emacs-lisp/debug.el
+++ b/lisp/emacs-lisp/debug.el
@@ -731,15 +731,11 @@ Complete list of commands:
             (buffer-substring (line-beginning-position 0)
                               (line-end-position 0)))))
 
-(declare-function help-xref-interned "help-mode"
-                  (symbol &optional buffer frame))
-
 (defun debug-help-follow (&optional pos)
   "Follow cross-reference at POS, defaulting to point.
 
 For the cross-reference format, see `help-make-xrefs'."
   (interactive "d")
-  (require 'help-mode)
   ;; Ideally we'd just do (call-interactively 'help-follow) except that this
   ;; assumes we're already in a *Help* buffer and reuses it, so it ends up
   ;; incorrectly "reusing" the *Backtrace* buffer to show the help info.
@@ -755,7 +751,7 @@ For the cross-reference format, see `help-make-xrefs'."
                                (progn (skip-syntax-forward "w_")
                                       (point)))))))
       (when (or (boundp sym) (fboundp sym) (facep sym))
-        (help-xref-interned sym)))))
+        (describe-symbol sym)))))
 
 ;; When you change this, you may also need to change the number of
 ;; frames that the debugger skips.
diff --git a/lisp/emacs-lisp/derived.el b/lisp/emacs-lisp/derived.el
index 52da4c9..ee137f1 100644
--- a/lisp/emacs-lisp/derived.el
+++ b/lisp/emacs-lisp/derived.el
@@ -331,8 +331,11 @@ which more-or-less shadow%s %s's corresponding table%s."
                        "\n\nThis mode "
                      (concat
                       "\n\nIn addition to any hooks its parent mode "
-                      (if (string-match (regexp-quote (format "`%s'" parent))
-                                        docstring) nil
+                      (if (string-match (format "[`‘]%s['’]"
+                                                 (regexp-quote
+                                                 (symbol-name parent)))
+                                        docstring)
+                           nil
                         (format "`%s' " parent))
                       "might have run,\nthis mode "))
                    (format "runs the hook `%s'" hook)
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
index bd95a60..eab22b6 100644
--- a/lisp/emacs-lisp/easy-mmode.el
+++ b/lisp/emacs-lisp/easy-mmode.el
@@ -180,7 +180,8 @@ For example, you could write
         (extra-args nil)
         (extra-keywords nil)
          (variable nil)          ;The PLACE where the state is stored.
-         (setter nil)            ;The function (if any) to set the mode var.
+         (setter `(setq ,mode))  ;The beginning of the exp to set the mode var.
+         (getter mode)           ;The exp to get the mode value.
          (modefun mode)          ;The minor mode function name we're defining.
         (require t)
         (after-hook nil)
@@ -195,7 +196,10 @@ For example, you could write
       (pcase keyw
        (`:init-value (setq init-value (pop body)))
        (`:lighter (setq lighter (purecopy (pop body))))
-       (`:global (setq globalp (pop body)))
+       (`:global (setq globalp (pop body))
+         (when (and globalp (symbolp mode))
+           (setq setter `(setq-default ,mode))
+           (setq getter `(default-value ',mode))))
        (`:extra-args (setq extra-args (pop body)))
        (`:set (setq set (list :set (pop body))))
        (`:initialize (setq initialize (list :initialize (pop body))))
@@ -208,16 +212,18 @@ For example, you could write
                        (or (symbolp tmp)
                            (functionp tmp))))
              ;; PLACE is not of the form (GET . SET).
-             (setq mode variable)
-           (setq mode (car variable))
-           (setq setter (cdr variable))))
+             (progn
+               (setq setter `(setf ,variable))
+               (setq getter variable))
+           (setq getter (car variable))
+           (setq setter `(funcall #',(cdr variable)))))
        (`:after-hook (setq after-hook (pop body)))
        (_ (push keyw extra-keywords) (push (pop body) extra-keywords))))
 
     (setq keymap-sym (if (and keymap (symbolp keymap)) keymap
                       (intern (concat mode-name "-map"))))
 
-    (unless set (setq set '(:set 'custom-set-minor-mode)))
+    (unless set (setq set '(:set #'custom-set-minor-mode)))
 
     (unless initialize
       (setq initialize '(:initialize 'custom-initialize-default)))
@@ -272,39 +278,30 @@ the mode if ARG is omitted or nil, and toggle it if ARG 
is `toggle'.
         ;; repeat-command still does the toggling correctly.
         (interactive (list (or current-prefix-arg 'toggle)))
         (let ((,last-message (current-message)))
-           (,@(if setter `(funcall #',setter)
-                (list (if (symbolp mode) 'setq 'setf) mode))
+           (,@setter
             (if (eq arg 'toggle)
-                (not ,mode)
+                (not ,getter)
               ;; A nil argument also means ON now.
               (> (prefix-numeric-value arg) 0)))
            ,@body
            ;; The on/off hooks are here for backward compatibility only.
-           (run-hooks ',hook (if ,mode ',hook-on ',hook-off))
+           (run-hooks ',hook (if ,getter ',hook-on ',hook-off))
            (if (called-interactively-p 'any)
                (progn
-                 ,(if (and globalp (symbolp mode))
-                     ;; Unnecessary but harmless if mode set buffer-locally
+                 ,(if (and globalp (not variable))
                       `(customize-mark-as-set ',mode))
                  ;; Avoid overwriting a message shown by the body,
                  ;; but do overwrite previous messages.
                  (unless (and (current-message)
                               (not (equal ,last-message
                                           (current-message))))
-                   (let ((local
-                         ,(if globalp
-                              (if (symbolp mode)
-                                  `(if (local-variable-p ',mode)
-                                       " in current buffer"
-                                     "")
-                                "")
-                            " in current buffer")))
+                   (let ((local ,(if globalp "" " in current buffer")))
                     (message ,(format "%s %%sabled%%s" pretty-name)
-                             (if ,mode "en" "dis") local)))))
+                             (if ,getter "en" "dis") local)))))
           ,@(when after-hook `(,after-hook)))
         (force-mode-line-update)
         ;; Return the new setting.
-        ,mode)
+        ,getter)
 
        ;; Autoloading a define-minor-mode autoloads everything
        ;; up-to-here.
@@ -325,15 +322,16 @@ No problems result if this variable is not bound.
                     (t (error "Invalid keymap %S" m))))
             ,(format "Keymap for `%s'." mode-name)))
 
-       ,(if (not (symbolp mode))
-            (if (or lighter keymap)
-                (error ":lighter and :keymap unsupported with mode expression 
%s" mode))
-          `(with-no-warnings
-             (add-minor-mode ',mode ',lighter
-                           ,(if keymap keymap-sym
-                                `(if (boundp ',keymap-sym) ,keymap-sym))
-                             nil
-                             ,(unless (eq mode modefun) `',modefun)))))))
+       ,(let ((modevar (pcase getter (`(default-value ',v) v) (_ getter))))
+          (if (not (symbolp modevar))
+              (if (or lighter keymap)
+                  (error ":lighter and :keymap unsupported with mode 
expression %S" getter))
+            `(with-no-warnings
+               (add-minor-mode ',modevar ',lighter
+                               ,(if keymap keymap-sym
+                                  `(if (boundp ',keymap-sym) ,keymap-sym))
+                               nil
+                               ,(unless (eq mode modefun) `',modefun))))))))
 
 ;;;
 ;;; make global minor mode
@@ -413,7 +411,7 @@ otherwise, disable it.  If called from Lisp, enable the 
mode if
 ARG is omitted or nil.
 
 %s is enabled in all buffers where
-\`%s' would do it.
+`%s' would do it.
 See `%s' for more information on %s."
                  pretty-name pretty-global-name
                  pretty-name turn-on mode pretty-name)
diff --git a/lisp/emacs-lisp/eieio-base.el b/lisp/emacs-lisp/eieio-base.el
index 2e28036..400bdb9 100644
--- a/lisp/emacs-lisp/eieio-base.el
+++ b/lisp/emacs-lisp/eieio-base.el
@@ -429,37 +429,28 @@ Optional argument COMMENT is a header line comment."
   "Save persistent object THIS to disk.
 Optional argument FILE overrides the file name specified in the object
 instance."
-  (save-excursion
-    (let ((b (set-buffer (get-buffer-create " *tmp object write*")))
-         (default-directory (file-name-directory (oref this file)))
-         (cfn (oref this file)))
-      (unwind-protect
-         (save-excursion
-           (erase-buffer)
-           (let ((standard-output (current-buffer)))
-             (oset this file
-                   (if file
-                       (eieio-persistent-path-relative this file)
-                     (file-name-nondirectory cfn)))
-             (object-write this (oref this file-header-line)))
-           (let ((backup-inhibited (not (oref this do-backups)))
-                 (cs (car (find-coding-systems-region
-                           (point-min) (point-max)))))
-             (unless (eq cs 'undecided)
-               (setq buffer-file-coding-system cs))
-             ;; Old way - write file.  Leaves message behind.
-             ;;(write-file cfn nil)
-
-             ;; New way - Avoid the vast quantities of error checking
-             ;; just so I can get at the special flags that disable
-             ;; displaying random messages.
-             (write-region (point-min) (point-max)
-                           cfn nil 1)
-             ))
-       ;; Restore :file, and kill the tmp buffer
-       (oset this file cfn)
-       (setq buffer-file-name nil)
-       (kill-buffer b)))))
+  (when file (setq file (expand-file-name file)))
+  (with-temp-buffer
+    (let* ((cfn (or file (oref this file)))
+           (default-directory (file-name-directory cfn)))
+      (cl-letf ((standard-output (current-buffer))
+                ((oref this file)       ;FIXME: Why change it?
+                 (if file
+                     ;; FIXME: Makes a name relative to (oref this file),
+                     ;; whereas I think it should be relative to cfn.
+                     (eieio-persistent-path-relative this file)
+                   (file-name-nondirectory cfn))))
+        (object-write this (oref this file-header-line)))
+      (let ((backup-inhibited (not (oref this do-backups)))
+            (coding-system-for-write 'utf-8-emacs))
+        ;; Old way - write file.  Leaves message behind.
+        ;;(write-file cfn nil)
+
+        ;; New way - Avoid the vast quantities of error checking
+        ;; just so I can get at the special flags that disable
+        ;; displaying random messages.
+        (write-region (point-min) (point-max) cfn nil 1)
+        ))))
 
 ;; Notes on the persistent object:
 ;; It should also set up some hooks to help it keep itself up to date.
diff --git a/lisp/emacs-lisp/eieio-compat.el b/lisp/emacs-lisp/eieio-compat.el
index 0283704..386ff2f 100644
--- a/lisp/emacs-lisp/eieio-compat.el
+++ b/lisp/emacs-lisp/eieio-compat.el
@@ -138,7 +138,7 @@ Summary:
   (cl-generic-make-generalizer
    ;; Give it a slightly higher priority than `subclass' so that the
    ;; interleaved list comes before subclass's non-interleaved list.
-   61 (lambda (name) `(and (symbolp ,name) (eieio--class-v ,name)))
+   61 (lambda (name) `(and (symbolp ,name) (cl--find-class ,name)))
    #'eieio--generic-static-symbol-specializers))
 (defconst eieio--generic-static-object-generalizer
   (cl-generic-make-generalizer
diff --git a/lisp/emacs-lisp/eieio-core.el b/lisp/emacs-lisp/eieio-core.el
index bf3f442..7fcf85c 100644
--- a/lisp/emacs-lisp/eieio-core.el
+++ b/lisp/emacs-lisp/eieio-core.el
@@ -126,23 +126,19 @@ Currently under control of this var:
 
 ;;; Important macros used internally in eieio.
 
-(defmacro eieio--class-v (class)        ;Use a macro, so it acts as a GV place.
-  "Internal: Return the class vector from the CLASS symbol."
-  (declare (debug t))
-  ;; No check: If eieio gets this far, it has probably been checked already.
-  `(get ,class 'eieio-class-definition))
+(require 'cl-macs)  ;For cl--find-class.
 
 (defsubst eieio--class-object (class)
   "Return the class object."
   (if (symbolp class)
       ;; Keep the symbol if class-v is nil, for better error messages.
-      (or (eieio--class-v class) class)
+      (or (cl--find-class class) class)
     class))
 
 (defun class-p (class)
   "Return non-nil if CLASS is a valid class vector.
 CLASS is a symbol."                     ;FIXME: Is it a vector or a symbol?
-  (and (symbolp class) (eieio--class-p (eieio--class-v class))))
+  (and (symbolp class) (eieio--class-p (cl--find-class class))))
 
 (defun eieio--class-print-name (class)
   "Return a printed representation of CLASS."
@@ -182,7 +178,7 @@ Return nil if that option doesn't exist."
 (defun class-abstract-p (class)
   "Return non-nil if CLASS is abstract.
 Abstract classes cannot be instantiated."
-  (eieio--class-option (eieio--class-v class) :abstract))
+  (eieio--class-option (cl--find-class class) :abstract))
 
 (defsubst eieio--class-method-invocation-order (class)
   "Return the invocation order of CLASS.
@@ -215,7 +211,7 @@ It creates an autoload function for CNAME's constructor."
   ;; simply not exist yet.  So instead we just don't store the list of parents
   ;; here in eieio-defclass-autoload at all, since it seems that they're just
   ;; not needed before the class is actually loaded.
-  (let* ((oldc (eieio--class-v cname))
+  (let* ((oldc (cl--find-class cname))
         (newc (eieio--class-make cname)))
     (if (eieio--class-p oldc)
        nil ;; Do nothing if we already have this class.
@@ -229,7 +225,7 @@ It creates an autoload function for CNAME's constructor."
       ;; do this first so that we can call defmethod for the accessor.
       ;; The vector will be updated by the following while loop and will not
       ;; need to be stored a second time.
-      (setf (eieio--class-v cname) newc)
+      (setf (cl--find-class cname) newc)
 
       ;; Create an autoload on top of our constructor function.
       (autoload cname filename doc nil nil)
@@ -265,6 +261,8 @@ It creates an autoload function for CNAME's constructor."
     (and (eieio-object-p obj)
          (object-of-class-p obj class))))
 
+(defvar eieio--known-slot-names nil)
+
 (defun eieio-defclass-internal (cname superclasses slots options)
   "Define CNAME as a new subclass of SUPERCLASSES.
 SLOTS are the slots residing in that class definition, and OPTIONS
@@ -276,7 +274,7 @@ See `defclass' for more information."
   (run-hooks 'eieio-hook)
   (setq eieio-hook nil)
 
-  (let* ((oldc (let ((c (eieio--class-v cname))) (if (eieio--class-p c) c)))
+  (let* ((oldc (let ((c (cl--find-class cname))) (if (eieio--class-p c) c)))
         (newc (or oldc
                    ;; Reuse `oldc' instead of creating a new one, so that
                    ;; existing references stay valid.  E.g. when
@@ -312,7 +310,7 @@ See `defclass' for more information."
          (dolist (p superclasses)
            (if (not (and p (symbolp p)))
                (error "Invalid parent class %S" p)
-              (let ((c (eieio--class-v p)))
+              (let ((c (cl--find-class p)))
                 (if (not (eieio--class-p c))
                    ;; bad class
                    (error "Given parent class %S is not a class" p)
@@ -371,7 +369,7 @@ See `defclass' for more information."
     ;; do this first so that we can call defmethod for the accessor.
     ;; The vector will be updated by the following while loop and will not
     ;; need to be stored a second time.
-    (setf (eieio--class-v cname) newc)
+    (setf (cl--find-class cname) newc)
 
     ;; Query each slot in the declaration list and mangle into the
     ;; class structure I have defined.
@@ -477,7 +475,7 @@ See `defclass' for more information."
         (put cname 'variable-documentation docstring)))
 
     ;; Save the file location where this class is defined.
-    (add-to-list 'current-load-list `(eieio-defclass . ,cname))
+    (add-to-list 'current-load-list `(define-type . ,cname))
 
     ;; We have a list of custom groups.  Store them into the options.
     (let ((g (eieio--class-option-assoc options :custom-groups)))
@@ -607,47 +605,48 @@ if default value is nil."
                               :key #'cl--slot-descriptor-name)))
          (cold (car (cl-member a (eieio--class-class-slots newc)
                                :key #'cl--slot-descriptor-name))))
-  (condition-case nil
-      (if (sequencep d) (setq d (copy-sequence d)))
-    ;; This copy can fail on a cons cell with a non-cons in the cdr.  Let's
-    ;; skip it if it doesn't work.
-    (error nil))
-  ;; (if (sequencep type) (setq type (copy-sequence type)))
-  ;; (if (sequencep cust) (setq cust (copy-sequence cust)))
-  ;; (if (sequencep custg) (setq custg (copy-sequence custg)))
-
-  ;; To prevent override information w/out specification of storage,
-  ;; we need to do this little hack.
-  (if cold (setq alloc :class))
-
-  (if (memq alloc '(nil :instance))
-      ;; In this case, we modify the INSTANCE version of a given slot.
-      (progn
-        ;; Only add this element if it is so-far unique
-        (if (not old)
-            (progn
-              (eieio--perform-slot-validation-for-default slot skipnil)
-              (push slot (eieio--class-slots newc))
-              )
-          ;; When defaultoverride is true, we are usually adding new local
-          ;; attributes which must override the default value of any slot
-          ;; passed in by one of the parent classes.
-          (when defaultoverride
-            (eieio--slot-override old slot skipnil)))
-        (when init
-          (cl-pushnew (cons init a) (eieio--class-initarg-tuples newc)
-                      :test #'equal)))
-
-    ;; CLASS ALLOCATED SLOTS
-    (if (not cold)
+    (cl-pushnew a eieio--known-slot-names)
+    (condition-case nil
+        (if (sequencep d) (setq d (copy-sequence d)))
+      ;; This copy can fail on a cons cell with a non-cons in the cdr.  Let's
+      ;; skip it if it doesn't work.
+      (error nil))
+    ;; (if (sequencep type) (setq type (copy-sequence type)))
+    ;; (if (sequencep cust) (setq cust (copy-sequence cust)))
+    ;; (if (sequencep custg) (setq custg (copy-sequence custg)))
+
+    ;; To prevent override information w/out specification of storage,
+    ;; we need to do this little hack.
+    (if cold (setq alloc :class))
+
+    (if (memq alloc '(nil :instance))
+        ;; In this case, we modify the INSTANCE version of a given slot.
         (progn
-          (eieio--perform-slot-validation-for-default slot skipnil)
-          ;; Here we have found a :class version of a slot.  This
-          ;; requires a very different approach.
-          (push slot (eieio--class-class-slots newc)))
-      (when defaultoverride
-        ;; There is a match, and we must override the old value.
-        (eieio--slot-override cold slot skipnil))))))
+          ;; Only add this element if it is so-far unique
+          (if (not old)
+              (progn
+                (eieio--perform-slot-validation-for-default slot skipnil)
+                (push slot (eieio--class-slots newc))
+                )
+            ;; When defaultoverride is true, we are usually adding new local
+            ;; attributes which must override the default value of any slot
+            ;; passed in by one of the parent classes.
+            (when defaultoverride
+              (eieio--slot-override old slot skipnil)))
+          (when init
+            (cl-pushnew (cons init a) (eieio--class-initarg-tuples newc)
+                        :test #'equal)))
+
+      ;; CLASS ALLOCATED SLOTS
+      (if (not cold)
+          (progn
+            (eieio--perform-slot-validation-for-default slot skipnil)
+            ;; Here we have found a :class version of a slot.  This
+            ;; requires a very different approach.
+            (push slot (eieio--class-class-slots newc)))
+        (when defaultoverride
+          ;; There is a match, and we must override the old value.
+          (eieio--slot-override cold slot skipnil))))))
 
 (defun eieio-copy-parents-into-subclass (newc)
   "Copy into NEWC the slots of PARENTS.
@@ -724,14 +723,23 @@ Argument FN is the function calling this verifier."
 
 
 ;;; Get/Set slots in an object.
-;;
+
 (defun eieio-oref (obj slot)
   "Return the value in OBJ at SLOT in the object vector."
+  (declare (compiler-macro
+            (lambda (exp)
+              (ignore obj)
+              (pcase slot
+                ((and (or `',name (and name (pred keywordp)))
+                      (guard (not (memq name eieio--known-slot-names))))
+                 (macroexp--warn-and-return
+                  (format "Unknown slot `%S'" name) exp 'compile-only))
+                (_ exp)))))
   (cl-check-type slot symbol)
   (cl-check-type obj (or eieio-object class))
   (let* ((class (cond ((symbolp obj)
                        (error "eieio-oref called on a class: %s" obj)
-                       (let ((c (eieio--class-v obj)))
+                       (let ((c (cl--find-class obj)))
                          (if (eieio--class-p c) (eieio-class-un-autoload obj))
                          c))
                       (t (eieio--object-class obj))))
@@ -757,7 +765,7 @@ Argument FN is the function calling this verifier."
 Fills in OBJ's SLOT with its default value."
   (cl-check-type obj (or eieio-object class))
   (cl-check-type slot symbol)
-  (let* ((cl (cond ((symbolp obj) (eieio--class-v obj))
+  (let* ((cl (cond ((symbolp obj) (cl--find-class obj))
                    (t (eieio--object-class obj))))
         (c (eieio--slot-name-index cl slot)))
     (if (not c)
@@ -964,7 +972,7 @@ If a consistent order does not exist, signal an error."
 
 (defun eieio--class-precedence-c3 (class)
   "Return all parents of CLASS in c3 order."
-  (let ((parents (eieio--class-parents (eieio--class-v class))))
+  (let ((parents (eieio--class-parents (cl--find-class class))))
     (eieio--c3-merge-lists
      (list class)
      (append
@@ -1084,14 +1092,14 @@ method invocation orders of the involved classes."
 
 (defconst eieio--generic-subclass-generalizer
   (cl-generic-make-generalizer
-   60 (lambda (name) `(and (symbolp ,name) (eieio--class-v ,name)))
+   60 (lambda (name) `(and (symbolp ,name) (cl--find-class ,name)))
    #'eieio--generic-subclass-specializers))
 
 (cl-defmethod cl-generic-generalizers ((_specializer (head subclass)))
   (list eieio--generic-subclass-generalizer))
 
 
-;;;### (autoloads nil "eieio-compat" "eieio-compat.el" 
"0609a7bdcd6f38876b7f5647047ddca9")
+;;;### (autoloads nil "eieio-compat" "eieio-compat.el" 
"ea8c7f24ed47c6b71ac37cbdae1c9931")
 ;;; Generated autoloads from eieio-compat.el
 
 (autoload 'eieio--defalias "eieio-compat" "\
diff --git a/lisp/emacs-lisp/eieio-opt.el b/lisp/emacs-lisp/eieio-opt.el
index 11d9984..9ecc594 100644
--- a/lisp/emacs-lisp/eieio-opt.el
+++ b/lisp/emacs-lisp/eieio-opt.el
@@ -31,7 +31,6 @@
 (require 'eieio)
 (require 'find-func)
 (require 'speedbar)
-(require 'help-mode)
 
 ;;; Code:
 ;;;###autoload
@@ -60,7 +59,7 @@ Argument PREFIX is the character prefix to use.
 Argument CH-PREFIX is another character prefix to display."
   (cl-check-type this-root class)
   (let ((myname (symbol-name this-root))
-       (chl (eieio--class-children (eieio--class-v this-root)))
+       (chl (eieio--class-children (cl--find-class this-root)))
        (fprefix (concat ch-prefix "  +--"))
        (mprefix (concat ch-prefix "  |  "))
        (lprefix (concat ch-prefix "     ")))
@@ -78,101 +77,7 @@ Argument CH-PREFIX is another character prefix to display."
 (declare-function help-fns-short-filename "help-fns" (filename))
 
 ;;;###autoload
-(defun eieio-help-class (class)
-  "Print help description for CLASS.
-If CLASS is actually an object, then also display current values of that 
object."
-  ;; Header line
-  (prin1 class)
-  (insert " is a"
-         (if (eieio--class-option (eieio--class-v class) :abstract)
-             "n abstract"
-           "")
-         " class")
-  (let ((location (find-lisp-object-file-name class 'eieio-defclass)))
-    (when location
-      (insert " in ‘")
-      (help-insert-xref-button
-       (help-fns-short-filename location)
-       'eieio-class-def class location 'eieio-defclass)
-      (insert "’")))
-  (insert ".\n")
-  ;; Parents
-  (let ((pl (eieio-class-parents class))
-       cur)
-    (when pl
-      (insert " Inherits from ")
-      (while (setq cur (pop pl))
-       (setq cur (eieio--class-name cur))
-       (insert "‘")
-       (help-insert-xref-button (symbol-name cur)
-                                'help-function cur)
-       (insert (if pl "’, " "’")))
-      (insert ".\n")))
-  ;; Children
-  (let ((ch (eieio-class-children class))
-       cur)
-    (when ch
-      (insert " Children ")
-      (while (setq cur (pop ch))
-       (insert "‘")
-       (help-insert-xref-button (symbol-name cur)
-                                'help-function cur)
-       (insert (if ch "’, " "’")))
-      (insert ".\n")))
-  ;; System documentation
-  (let ((doc (documentation-property class 'variable-documentation)))
-    (when doc
-      (insert "\n" doc "\n\n")))
-  ;; Describe all the slots in this class.
-  (eieio-help-class-slots class)
-  ;; Describe all the methods specific to this class.
-  (let ((generics (eieio-all-generic-functions class)))
-    (when generics
-      (insert (propertize "Specialized Methods:\n\n" 'face 'bold))
-      (dolist (generic generics)
-        (insert "‘")
-        (help-insert-xref-button (symbol-name generic) 'help-function generic)
-        (insert "’")
-       (pcase-dolist (`(,qualifiers ,args ,doc)
-                       (eieio-method-documentation generic class))
-          (insert (format " %s%S\n" qualifiers args)
-                  (or doc "")))
-       (insert "\n\n")))))
-
-(defun eieio--help-print-slot (slot)
-  (insert
-   (concat
-    (propertize "Slot: " 'face 'bold)
-    (prin1-to-string (cl--slot-descriptor-name slot))
-    (unless (eq (cl--slot-descriptor-type slot) t)
-      (concat "    type = "
-              (prin1-to-string (cl--slot-descriptor-type slot))))
-    (unless (eq (cl--slot-descriptor-initform slot) eieio-unbound)
-      (concat "    default = "
-              (prin1-to-string (cl--slot-descriptor-initform slot))))
-    (when (alist-get :printer (cl--slot-descriptor-props slot))
-      (concat "    printer = "
-              (prin1-to-string
-               (alist-get :printer (cl--slot-descriptor-props slot)))))
-    (when (alist-get :documentation (cl--slot-descriptor-props slot))
-      (concat "\n  " (alist-get :documentation (cl--slot-descriptor-props 
slot))
-              "\n")))
-   "\n"))
-
-(defun eieio-help-class-slots (class)
-  "Print help description for the slots in CLASS.
-Outputs to the current buffer."
-  (let* ((cv (eieio--class-v class))
-         (slots (eieio--class-slots cv))
-         (cslots (eieio--class-class-slots cv)))
-    (insert (propertize "Instance Allocated Slots:\n\n"
-                       'face 'bold))
-    (dotimes (i (length slots))
-      (eieio--help-print-slot (aref slots i)))
-    (when (> (length cslots) 0)
-      (insert (propertize "\nClass Allocated Slots:\n\n" 'face 'bold)))
-    (dotimes (i (length cslots))
-      (eieio--help-print-slot (aref cslots i)))))
+(define-obsolete-function-alias 'eieio-help-class 'cl--describe-class "25.1")
 
 (defun eieio-build-class-alist (&optional class instantiable-only buildlist)
   "Return an alist of all currently active classes for completion purposes.
@@ -181,7 +86,7 @@ If INSTANTIABLE-ONLY is non nil, only allow names of classes 
which
 are not abstract, otherwise allow all classes.
 Optional argument BUILDLIST is more list to attach and is used internally."
   (let* ((cc (or class 'eieio-default-superclass))
-        (sublst (eieio--class-children (eieio--class-v cc))))
+        (sublst (eieio--class-children (cl--find-class cc))))
     (unless (assoc (symbol-name cc) buildlist)
       (when (or (not instantiable-only) (not (class-abstract-p cc)))
         ;; FIXME: Completion tables don't need alists, and ede/generic.el needs
@@ -217,22 +122,13 @@ are not abstract."
 
 ;;; METHOD COMPLETION / DOC
 
-(define-button-type 'eieio-class-def
-  :supertype 'help-function-def
-  'help-echo (purecopy "mouse-2, RET: find class definition"))
-
-(defconst eieio--defclass-regexp "(defclass[ \t\r\n]+%s[ \t\r\n]+")
-(with-eval-after-load 'find-func
-  (defvar find-function-regexp-alist)
-  (add-to-list 'find-function-regexp-alist
-               `(eieio-defclass . eieio--defclass-regexp)))
 
 ;;;###autoload
 (defun eieio-help-constructor (ctr)
   "Describe CTR if it is a class constructor."
   (when (class-p ctr)
     (erase-buffer)
-    (let ((location (find-lisp-object-file-name ctr 'eieio-defclass))
+    (let ((location (find-lisp-object-file-name ctr 'define-type))
          (def (symbol-function ctr)))
       (goto-char (point-min))
       (prin1 ctr)
@@ -245,11 +141,11 @@ are not abstract."
        (setq location
              (find-lisp-object-file-name ctr def)))
       (when location
-       (insert " in ‘")
+       (insert (substitute-command-keys " in ‘"))
        (help-insert-xref-button
         (help-fns-short-filename location)
-        'eieio-class-def ctr location 'eieio-defclass)
-       (insert "’"))
+        'cl-type-definition ctr location 'define-type)
+       (insert (substitute-command-keys "’")))
       (insert ".\nCreates an object of class " (symbol-name ctr) ".")
       (goto-char (point-max))
       (if (autoloadp def)
@@ -259,50 +155,6 @@ are not abstract."
          (eieio-help-class ctr))
        ))))
 
-(defun eieio--specializers-apply-to-class-p (specializers class)
-  "Return non-nil if a method with SPECIALIZERS applies to CLASS."
-  (let ((applies nil))
-    (dolist (specializer specializers)
-      (if (memq (car-safe specializer) '(subclass eieio--static))
-          (setq specializer (nth 1 specializer)))
-      ;; Don't include the methods that are "too generic", such as those
-      ;; applying to `eieio-default-superclass'.
-      (and (not (memq specializer '(t eieio-default-superclass)))
-           (class-p specializer)
-           (child-of-class-p class specializer)
-           (setq applies t)))
-    applies))
-
-(defun eieio-all-generic-functions (&optional class)
-  "Return a list of all generic functions.
-Optional CLASS argument returns only those functions that contain
-methods for CLASS."
-  (let ((l nil))
-    (mapatoms
-     (lambda (symbol)
-       (let ((generic (and (fboundp symbol) (cl--generic symbol))))
-         (and generic
-             (catch 'found
-               (if (null class) (throw 'found t))
-               (dolist (method (cl--generic-method-table generic))
-                 (if (eieio--specializers-apply-to-class-p
-                      (cl--generic-method-specializers method) class)
-                     (throw 'found t))))
-             (push symbol l)))))
-    l))
-
-(defun eieio-method-documentation (generic class)
-  "Return info for all methods of GENERIC applicable to CLASS.
-The value returned is a list of elements of the form
-\(QUALIFIERS ARGS DOC)."
-  (let ((generic (cl--generic generic))
-        (docs ()))
-    (when generic
-      (dolist (method (cl--generic-method-table generic))
-        (when (eieio--specializers-apply-to-class-p
-               (cl--generic-method-specializers method) class)
-          (push (cl--generic-method-info method) docs))))
-    docs))
 
 ;;; METHOD STATS
 ;;
@@ -310,7 +162,7 @@ The value returned is a list of elements of the form
 (defun eieio-display-method-list ()
   "Display a list of all the methods and what features are used."
   (interactive)
-  (let* ((meth1 (eieio-all-generic-functions))
+  (let* ((meth1 (cl--generic-all-functions))
         (meth (sort meth1 (lambda (a b)
                             (string< (symbol-name a)
                                      (symbol-name b)))))
@@ -452,7 +304,7 @@ current expansion depth."
 (defun eieio-class-button (class depth)
   "Draw a speedbar button at the current point for CLASS at DEPTH."
   (cl-check-type class class)
-  (let ((subclasses (eieio--class-children (eieio--class-v class))))
+  (let ((subclasses (eieio--class-children (cl--find-class class))))
     (if subclasses
        (speedbar-make-tag-line 'angle ?+
                                'eieio-sb-expand
@@ -477,7 +329,7 @@ Argument INDENT is the depth of indentation."
         (speedbar-with-writable
           (save-excursion
             (end-of-line) (forward-char 1)
-            (let ((subclasses (eieio--class-children (eieio--class-v class))))
+            (let ((subclasses (eieio--class-children (cl--find-class class))))
               (while subclasses
                 (eieio-class-button (car subclasses) (1+ indent))
                 (setq subclasses (cdr subclasses)))))))
diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el
index 8387d81..84a68a8 100644
--- a/lisp/emacs-lisp/eieio.el
+++ b/lisp/emacs-lisp/eieio.el
@@ -142,6 +142,10 @@ and reference them using the function `class-option'."
             (alloc   (plist-get soptions :allocation))
             (label   (plist-get soptions :label)))
 
+        ;; Update eieio--known-slot-names already in case we compile code which
+        ;; uses this before the class is loaded.
+        (cl-pushnew sname eieio--known-slot-names)
+
        (if eieio-error-unsupported-class-tags
            (let ((tmp soptions))
              (while tmp
@@ -254,13 +258,12 @@ This method is obsolete."
               (if (not (stringp abs))
                   (setq abs (format "Class %s is abstract" name)))
               `(defun ,name (&rest _)
-                 ,(format "You cannot create a new object of type %S." name)
+                 ,(format "You cannot create a new object of type `%S'." name)
                  (error ,abs)))
 
           ;; Non-abstract classes need a constructor.
           `(defun ,name (&rest slots)
-             ,(format "Create a new object with name NAME of class type %S."
-                      name)
+             ,(format "Create a new object of class type `%S'." name)
              (declare (compiler-macro
                        (lambda (whole)
                          (if (not (stringp (car slots)))
@@ -435,7 +438,7 @@ The CLOS function `class-direct-superclasses' is aliased to 
this function."
   "Return child classes to CLASS.
 The CLOS function `class-direct-subclasses' is aliased to this function."
   (cl-check-type class class)
-  (eieio--class-children (eieio--class-v class)))
+  (eieio--class-children (cl--find-class class)))
 (define-obsolete-function-alias
   'class-children #'eieio-class-children "24.4")
 
@@ -566,7 +569,7 @@ OBJECT can be an instance or a class."
   "Return the class that SYMBOL represents.
 If there is no class, nil is returned if ERRORP is nil.
 If ERRORP is non-nil, `wrong-argument-type' is signaled."
-  (let ((class (eieio--class-v symbol)))
+  (let ((class (cl--find-class symbol)))
     (cond
      ((eieio--class-p class) class)
      (errorp (signal 'wrong-type-argument (list 'class-p symbol))))))
@@ -672,7 +675,7 @@ Its slots are automatically adopted by classes with no 
specified parents.
 This class is not stored in the `parent' slot of a class vector."
   :abstract t)
 
-(setq eieio-default-superclass (eieio--class-v 'eieio-default-superclass))
+(setq eieio-default-superclass (cl--find-class 'eieio-default-superclass))
 
 (defalias 'standard-class 'eieio-default-superclass)
 
@@ -862,7 +865,7 @@ this object."
     (princ comment)
     (princ "\n"))
   (let* ((cl (eieio-object-class this))
-        (cv (eieio--class-v cl)))
+        (cv (cl--find-class cl)))
     ;; Now output readable lisp to recreate this object
     ;; It should look like this:
     ;; (<constructor> <name> <slot> <slot> ... )
@@ -941,6 +944,8 @@ of `eq'."
   (error "EIEIO: `change-class' is unimplemented"))
 
 ;; Hook ourselves into help system for describing classes and methods.
+;; FIXME: This is not actually needed any more since we can click on the
+;; hyperlink from the constructor's docstring to see the type definition.
 (add-hook 'help-fns-describe-function-functions 'eieio-help-constructor)
 
 ;;; Interfacing with edebug
@@ -978,7 +983,7 @@ Optional argument GROUP is the sub-group of slots to 
display.
 
 ;;;***
 
-;;;### (autoloads nil "eieio-opt" "eieio-opt.el" 
"4b96541a14ecb2ac82ce5da7da79fd88")
+;;;### (autoloads nil "eieio-opt" "eieio-opt.el" 
"cb1aba7670b6a4b9c6f968c0ad6dc130")
 ;;; Generated autoloads from eieio-opt.el
 
 (autoload 'eieio-browse "eieio-opt" "\
@@ -988,11 +993,7 @@ variable `eieio-default-superclass'.
 
 \(fn &optional ROOT-CLASS)" t nil)
 
-(autoload 'eieio-help-class "eieio-opt" "\
-Print help description for CLASS.
-If CLASS is actually an object, then also display current values of that 
object.
-
-\(fn CLASS)" nil nil)
+(define-obsolete-function-alias 'eieio-help-class 'cl--describe-class "25.1")
 
 (autoload 'eieio-help-constructor "eieio-opt" "\
 Describe CTR if it is a class constructor.
diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el
index 0091cdb..032cdec 100644
--- a/lisp/emacs-lisp/eldoc.el
+++ b/lisp/emacs-lisp/eldoc.el
@@ -222,7 +222,7 @@ expression point is on."
            (memq eldoc-timer timer-idle-list)) ;FIXME: Why?
       (setq eldoc-timer
             (run-with-idle-timer
-            eldoc-idle-delay t
+            eldoc-idle-delay nil
             (lambda ()
                (when (or eldoc-mode
                          (and global-eldoc-mode
diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el
index 7ea13d4..cd23cd7 100644
--- a/lisp/emacs-lisp/find-func.el
+++ b/lisp/emacs-lisp/find-func.el
@@ -189,12 +189,15 @@ defined in C.")
 (declare-function ad-get-advice-info "advice" (function))
 
 (defun find-function-advised-original (func)
-  "Return the original function symbol of an advised function FUNC.
-If FUNC is not the symbol of an advised function, just returns FUNC."
+  "Return the original function definition of an advised function FUNC.
+If FUNC is not a symbol, return it.  Else, if it's not advised,
+return the symbol's function definition."
   (or (and (symbolp func)
-          (featurep 'advice)
-          (let ((ofunc (cdr (assq 'origname (ad-get-advice-info func)))))
-            (and (fboundp ofunc) ofunc)))
+           (featurep 'nadvice)
+           (let ((ofunc (advice--symbol-function func)))
+             (if (advice--p ofunc)
+                 (advice--cd*r ofunc)
+               ofunc)))
       func))
 
 (defun find-function-C-source (fun-or-var file type)
@@ -331,7 +334,7 @@ signal an error.
 If VERBOSE is non-nil, and FUNCTION is an alias, display a
 message about the whole chain of aliases."
   (let ((def (if (symbolp function)
-                 (symbol-function (find-function-advised-original function))))
+                 (find-function-advised-original function)))
         aliases)
     ;; FIXME for completeness, it might be nice to print something like:
     ;; foo (which is advised), which is an alias for bar (which is advised).
@@ -344,8 +347,8 @@ message about the whole chain of aliases."
                                             (symbol-name def)))
                           (format "`%s' is an alias for `%s'"
                                   function (symbol-name def)))))
-      (setq function (symbol-function (find-function-advised-original 
function))
-            def (symbol-function (find-function-advised-original function))))
+      (setq function (find-function-advised-original function)
+            def (find-function-advised-original function)))
     (if aliases
         (message "%s" aliases))
     (cons function
@@ -547,11 +550,11 @@ See also `find-function-recenter-line' and 
`find-function-after-hook'."
   (interactive (find-function-read 'defface))
   (find-function-do-it face 'defface 'switch-to-buffer))
 
-;;;###autoload
-(defun find-function-on-key (key)
+(defun find-function-on-key-do-it (key find-fn)
   "Find the function that KEY invokes.  KEY is a string.
-Set mark before moving, if the buffer already existed."
-  (interactive "kFind function on key: ")
+Set mark before moving, if the buffer already existed.
+
+FIND-FN is the function to call to navigate to the function."
   (let (defn)
     (save-excursion
       (let* ((event (and (eventp key) (aref key 0))) ; Null event OK below.
@@ -572,7 +575,28 @@ Set mark before moving, if the buffer already existed."
          (message "%s is unbound" key-desc)
        (if (consp defn)
            (message "%s runs %s" key-desc (prin1-to-string defn))
-         (find-function-other-window defn))))))
+         (funcall find-fn defn))))))
+
+;;;###autoload
+(defun find-function-on-key (key)
+  "Find the function that KEY invokes.  KEY is a string.
+Set mark before moving, if the buffer already existed."
+  (interactive "kFind function on key: ")
+  (find-function-on-key-do-it key #'find-function))
+
+;;;###autoload
+(defun find-function-on-key-other-window (key)
+  "Find, in the other window, the function that KEY invokes.
+See `find-function-on-key'."
+  (interactive "kFind function on key: ")
+  (find-function-on-key-do-it key #'find-function-other-window))
+
+;;;###autoload
+(defun find-function-on-key-other-frame (key)
+  "Find, in the other frame, the function that KEY invokes.
+See `find-function-on-key'."
+  (interactive "kFind function on key: ")
+  (find-function-on-key-do-it key #'find-function-other-frame))
 
 ;;;###autoload
 (defun find-function-at-point ()
@@ -597,6 +621,8 @@ Set mark before moving, if the buffer already existed."
   (define-key ctl-x-4-map "F" 'find-function-other-window)
   (define-key ctl-x-5-map "F" 'find-function-other-frame)
   (define-key ctl-x-map "K" 'find-function-on-key)
+  (define-key ctl-x-4-map "K" 'find-function-on-key-other-window)
+  (define-key ctl-x-5-map "K" 'find-function-on-key-other-frame)
   (define-key ctl-x-map "V" 'find-variable)
   (define-key ctl-x-4-map "V" 'find-variable-other-window)
   (define-key ctl-x-5-map "V" 'find-variable-other-frame))
diff --git a/lisp/emacs-lisp/generator.el b/lisp/emacs-lisp/generator.el
index 08e1b7c..123f64b 100644
--- a/lisp/emacs-lisp/generator.el
+++ b/lisp/emacs-lisp/generator.el
@@ -507,7 +507,7 @@ don't yield.")
         next-state)))
 
     ;; Process everything else by just evaluating the form normally.
-    (t (cps--make-atomic-state form next-state))))
+    (_ (cps--make-atomic-state form next-state))))
 
 (defun cps--make-catch-wrapper (tag-binding next-state)
   (lambda (form)
diff --git a/lisp/emacs-lisp/gv.el b/lisp/emacs-lisp/gv.el
index fae3bcb..e67888c 100644
--- a/lisp/emacs-lisp/gv.el
+++ b/lisp/emacs-lisp/gv.el
@@ -74,6 +74,8 @@
 ;; (defvar gv--macro-environment nil
 ;;   "Macro expanders for generalized variables.")
 
+(define-error 'gv-invalid-place "%S is not a valid place expression")
+
 ;;;###autoload
 (defun gv-get (place do)
   "Build the code that applies DO to PLACE.
@@ -84,8 +86,10 @@ and SETTER is a function which returns the code to set PLACE 
when called
 with a (not necessarily copyable) Elisp expression that returns the value to
 set it to.
 DO must return an Elisp expression."
-  (if (symbolp place)
-      (funcall do place (lambda (v) `(setq ,place ,v)))
+  (cond
+   ((symbolp place) (funcall do place (lambda (v) `(setq ,place ,v))))
+   ((not (consp place)) (signal 'gv-invalid-place (list place)))
+   (t
     (let* ((head (car place))
            (gf (function-get head 'gv-expander 'autoload)))
       (if gf (apply gf do (cdr place))
@@ -104,8 +108,19 @@ DO must return an Elisp expression."
           (if (eq me place)
               (if (and (symbolp head) (get head 'setf-method))
                   (error "Incompatible place needs recompilation: %S" head)
-                (error "%S is not a valid place expression" place))
-            (gv-get me do)))))))
+                (let* ((setter (gv-setter head)))
+                  (gv--defsetter head (lambda (&rest args) `(,setter ,@args))
+                                 do (cdr place))))
+            (gv-get me do))))))))
+
+(defun gv-setter (name)
+  ;; The name taken from Scheme's SRFI-17.  Actually, for SRFI-17, the argument
+  ;; could/should be a function value rather than a symbol.
+  "Return the symbol where the (setf NAME) function should be placed."
+  (if (get name 'gv-expander)
+      (error "gv-expander conflicts with (setf %S)" name))
+  ;; FIXME: This is wrong if `name' is uninterned (or interned elsewhere).
+  (intern (format "(setf %s)" name)))
 
 ;;;###autoload
 (defmacro gv-letplace (vars place &rest body)
@@ -158,8 +173,10 @@ arguments as NAME.  DO is a function as defined in 
`gv-get'."
 
 ;;;###autoload
 (or (assq 'gv-expander defun-declarations-alist)
-    (push `(gv-expander ,(apply-partially #'gv--defun-declaration 
'gv-expander))
-         defun-declarations-alist))
+    (let ((x `(gv-expander
+               ,(apply-partially #'gv--defun-declaration 'gv-expander))))
+      (push x macro-declarations-alist)
+      (push x defun-declarations-alist)))
 ;;;###autoload
 (or (assq 'gv-setter defun-declarations-alist)
     (push `(gv-setter ,(apply-partially #'gv--defun-declaration 'gv-setter))
@@ -282,9 +299,9 @@ The return value is the last VAL in the list.
 ;; containing a non-trivial `push' even before gv.el was loaded.
 ;;;###autoload
 (put 'gv-place 'edebug-form-spec 'edebug-match-form)
+
 ;; CL did the equivalent of:
 ;;(gv-define-macroexpand edebug-after (lambda (before index place) place))
-
 (put 'edebug-after 'gv-expander
      (lambda (do before index place)
        (gv-letplace (getter setter) place
@@ -460,6 +477,32 @@ The return value is the last VAL in the list.
              (funcall do `(funcall (car ,gv))
                       (lambda (v) `(funcall (cdr ,gv) ,v))))))))
 
+(defmacro gv-synthetic-place (getter setter)
+  "Special place described by its setter and getter.
+GETTER and SETTER (typically obtained via `gv-letplace') get and
+set that place.  I.e. This macro allows you to do the \"reverse\" of what
+`gv-letplace' does.
+This macro only makes sense when used in a place."
+  (declare (gv-expander funcall))
+  (ignore setter)
+  getter)
+
+(defmacro gv-delay-error (place)
+  "Special place which delays the `gv-invalid-place' error to run-time.
+It behaves just like PLACE except that in case PLACE is not a valid place,
+the `gv-invalid-place' error will only be signaled at run-time when (and if)
+we try to use the setter.
+This macro only makes sense when used in a place."
+  (declare
+   (gv-expander
+    (lambda (do)
+      (condition-case err
+          (gv-get place do)
+        (gv-invalid-place
+         ;; Delay the error until we try to use the setter.
+         (funcall do place (lambda (_) `(signal ',(car err) ',(cdr err)))))))))
+  place)
+
 ;;; Even more debatable extensions.
 
 (put 'cons 'gv-expander
diff --git a/lisp/let-alist.el b/lisp/emacs-lisp/let-alist.el
similarity index 96%
rename from lisp/let-alist.el
rename to lisp/emacs-lisp/let-alist.el
index 80b72d3..ca7a904 100644
--- a/lisp/let-alist.el
+++ b/lisp/emacs-lisp/let-alist.el
@@ -4,7 +4,7 @@
 
 ;; Author: Artur Malabarba <address@hidden>
 ;; Maintainer: Artur Malabarba <address@hidden>
-;; Version: 1.0.3
+;; Version: 1.0.4
 ;; Keywords: extensions lisp
 ;; Prefix: let-alist
 ;; Separator: -
@@ -72,9 +72,9 @@ symbol, and each cdr is the same symbol without the `.'."
         ;; Return the cons cell inside a list, so it can be appended
         ;; with other results in the clause below.
         (list (cons data (intern (replace-match "" nil nil name)))))))
-   ((not (listp data)) nil)
-   (t (apply #'append
-        (mapcar #'let-alist--deep-dot-search data)))))
+   ((not (consp data)) nil)
+   (t (append (let-alist--deep-dot-search (car data))
+              (let-alist--deep-dot-search (cdr data))))))
 
 (defun let-alist--access-sexp (symbol variable)
   "Return a sexp used to access SYMBOL inside VARIABLE."
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index ab01a10..8aa34c7 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -95,7 +95,7 @@
                             (regexp-opt
                              '("defun" "defmacro"
                                 ;; Elisp.
-                                "defun*" "defsubst"
+                                "defun*" "defsubst" "define-inline"
                                "define-advice" "defadvice" "define-skeleton"
                                "define-compilation-mode" "define-minor-mode"
                                "define-global-minor-mode"
@@ -230,7 +230,7 @@
          (throw 'found t))))))
 
 (let-when-compile
-    ((lisp-fdefs '("defmacro" "defsubst" "defun"))
+    ((lisp-fdefs '("defmacro" "defun"))
      (lisp-vdefs '("defvar"))
      (lisp-kw '("cond" "if" "while" "let" "let*" "progn" "prog1"
                 "prog2" "lambda" "unwind-protect" "condition-case"
@@ -240,7 +240,8 @@
      ;; Elisp constructs.  Now they are update dynamically
      ;; from obarray but they are also used for setting up
      ;; the keywords for Common Lisp.
-     (el-fdefs '("define-advice" "defadvice" "defalias"
+     (el-fdefs '("defsubst" "cl-defsubst" "define-inline"
+                 "define-advice" "defadvice" "defalias"
                  "define-derived-mode" "define-minor-mode"
                  "define-generic-mode" "define-global-minor-mode"
                  "define-globalized-minor-mode" "define-skeleton"
@@ -403,8 +404,8 @@
          ;; Words inside \\[] tend to be for `substitute-command-keys'.
          ("\\\\\\\\\\[\\(\\(?:\\sw\\|\\s_\\)+\\)\\]"
           (1 font-lock-constant-face prepend))
-         ;; Words inside ‘’ and `' tend to be symbol names.
-         ("[`‘]\\(\\(?:\\sw\\|\\s_\\)\\(?:\\sw\\|\\s_\\)+\\)['’]"
+         ;; Words inside ‘’ and '' 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 +453,8 @@
          ;; Erroneous structures.
          (,(concat "(" cl-errs-re "\\_>")
            (1 font-lock-warning-face))
-         ;; Words inside ‘’ and `' tend to be symbol names.
-         ("[`‘]\\(\\(?:\\sw\\|\\s_\\)\\(?:\\sw\\|\\s_\\)+\\)['’]"
+         ;; Words inside ‘’ and '' 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 05ffa8d..ffc6585 100644
--- a/lisp/emacs-lisp/macroexp.el
+++ b/lisp/emacs-lisp/macroexp.el
@@ -119,20 +119,28 @@ and also to avoid outputting the warning during normal 
execution."
   (member '(declare-function . byte-compile-macroexpand-declare-function)
           macroexpand-all-environment))
 
+(defvar macroexp--warned (make-hash-table :test #'equal :weakness 'key))
 
-(defun macroexp--warn-and-return (msg form)
+(defun macroexp--warn-and-return (msg form &optional compile-only)
   (let ((when-compiled (lambda () (byte-compile-log-warning msg t))))
     (cond
      ((null msg) form)
      ((macroexp--compiling-p)
-      `(progn
-         (macroexp--funcall-if-compiled ',when-compiled)
-         ,form))
+      (if (gethash form macroexp--warned)
+          ;; Already wrapped this exp with a warning: avoid inf-looping
+          ;; where we keep adding the same warning onto `form' because
+          ;; macroexpand-all gets right back to macroexpanding `form'.
+          form
+        (puthash form form macroexp--warned)
+        `(progn
+           (macroexp--funcall-if-compiled ',when-compiled)
+           ,form)))
      (t
-      (message "%s%s" (if (stringp load-file-name)
-                          (concat (file-relative-name load-file-name) ": ")
-                        "")
-               msg)
+      (unless compile-only
+        (message "%s%s" (if (stringp load-file-name)
+                            (concat (file-relative-name load-file-name) ": ")
+                          "")
+                 msg))
       form))))
 
 (defun macroexp--obsolete-warning (fun obsolescence-data type)
@@ -208,30 +216,30 @@ Assumes the caller has bound 
`macroexpand-all-environment'."
        (macroexp--cons
         'condition-case
         (macroexp--cons err
-                    (macroexp--cons (macroexp--expand-all body)
-                                (macroexp--all-clauses handlers 1)
-                                (cddr form))
-                    (cdr form))
+                        (macroexp--cons (macroexp--expand-all body)
+                                        (macroexp--all-clauses handlers 1)
+                                        (cddr form))
+                        (cdr form))
         form))
       (`(,(or `defvar `defconst) . ,_) (macroexp--all-forms form 2))
       (`(function ,(and f `(lambda . ,_)))
        (macroexp--cons 'function
-                   (macroexp--cons (macroexp--all-forms f 2)
-                               nil
-                               (cdr form))
-                   form))
+                       (macroexp--cons (macroexp--all-forms f 2)
+                                       nil
+                                       (cdr form))
+                       form))
       (`(,(or `function `quote) . ,_) form)
       (`(,(and fun (or `let `let*)) . ,(or `(,bindings . ,body) dontcare))
        (macroexp--cons fun
-                   (macroexp--cons (macroexp--all-clauses bindings 1)
-                               (macroexp--all-forms body)
-                               (cdr form))
-                   form))
+                       (macroexp--cons (macroexp--all-clauses bindings 1)
+                                       (macroexp--all-forms body)
+                                       (cdr form))
+                       form))
       (`(,(and fun `(lambda . ,_)) . ,args)
        ;; Embedded lambda in function position.
        (macroexp--cons (macroexp--all-forms fun 2)
-                   (macroexp--all-forms args)
-                   form))
+                       (macroexp--all-forms args)
+                       form))
       ;; The following few cases are for normal function calls that
       ;; are known to funcall one of their arguments.  The byte
       ;; compiler has traditionally handled these functions specially
@@ -284,7 +292,7 @@ Assumes the caller has bound `macroexpand-all-environment'."
                      (macroexp--expand-all newform)))
                (macroexp--expand-all newform))))))
 
-      (t form))))
+      (_ form))))
 
 ;;;###autoload
 (defun macroexpand-all (form &optional environment)
@@ -341,21 +349,44 @@ definitions to shadow the loaded ones for use in file 
byte-compilation."
    ((memq (car-safe then) '(if cond)) (macroexp-if `(not ,test) else then))
    (t `(if ,test ,then ,else))))
 
-(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
-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."
+(defmacro macroexp-let2 (test sym exp &rest body)
+  "Evaluate BODY with SYM bound to an expression for EXP's value.
+The intended usage is that BODY generates an expression that
+will refer to EXP's value multiple times, but will evaluate
+EXP only once.  As BODY generates that expression, it should
+use SYM to stand for the value of EXP.
+
+If EXP is a simple, safe expression, then SYM's value is EXP itself.
+Otherwise, SYM's value is a symbol which holds the value produced by
+evaluating EXP.  The return value incorporates the value of BODY, plus
+additional code to evaluate EXP once and save the result so SYM can
+refer to it.
+
+If BODY consists of multiple forms, they are all evaluated
+but only the last one's value matters.
+
+TEST is a predicate to determine whether EXP qualifies as simple and
+safe; if TEST is nil, only constant expressions qualify.
+
+Example:
+ (macroexp-let2 nil foo EXP
+   \\=`(* ,foo ,foo))
+generates an expression that evaluates EXP once,
+then returns the square of that value.
+You could do this with
+  (let ((foovar EXP))
+    (* foovar foovar))
+but using `macroexp-let2' produces more efficient code in
+cases where EXP is a constant."
   (declare (indent 3) (debug (sexp sexp form body)))
   (let ((bodysym (make-symbol "body"))
         (expsym (make-symbol "exp")))
     `(let* ((,expsym ,exp)
-            (,var (if (funcall #',(or test #'macroexp-const-p) ,expsym)
-                      ,expsym (make-symbol ,(symbol-name var))))
-            (,bodysym ,(macroexp-progn exps)))
-       (if (eq ,var ,expsym) ,bodysym
-         (macroexp-let* (list (list ,var ,expsym))
+            (,sym (if (funcall #',(or test #'macroexp-const-p) ,expsym)
+                      ,expsym (make-symbol ,(symbol-name sym))))
+            (,bodysym ,(macroexp-progn body)))
+       (if (eq ,sym ,expsym) ,bodysym
+         (macroexp-let* (list (list ,sym ,expsym))
                         ,bodysym)))))
 
 (defmacro macroexp-let2* (test bindings &rest body)
diff --git a/lisp/emacs-lisp/map.el b/lisp/emacs-lisp/map.el
new file mode 100644
index 0000000..5014571
--- /dev/null
+++ b/lisp/emacs-lisp/map.el
@@ -0,0 +1,371 @@
+;;; map.el --- Map manipulation functions  -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2015 Free Software Foundation, Inc.
+
+;; Author: Nicolas Petton <address@hidden>
+;; Keywords: convenience, map, hash-table, alist, array
+;; Version: 1.0
+;; Package: map
+
+;; Maintainer: address@hidden
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; map.el provides map-manipulation functions that work on alists,
+;; hash-table and arrays.  All functions are prefixed with "map-".
+;;
+;; Functions taking a predicate or iterating over a map using a
+;; function take the function as their first argument.  All other
+;; functions take the map as their first argument.
+
+;; TODO:
+;; - Add support for char-tables
+;; - Maybe add support for gv?
+;; - See if we can integrate text-properties
+;; - A macro similar to let-alist but working on any type of map could
+;;   be really useful
+
+;;; Code:
+
+(require 'seq)
+
+(pcase-defmacro map (&rest args)
+  "pcase pattern matching map elements.
+Matches if the object is a map (list, hash-table or array), and
+binds values from ARGS to their corresponding elements of the map.
+
+ARGS can be a list elements of the form (KEY PAT), in which case
+KEY in an unquoted form.
+
+ARGS can also be a list of symbols, which stands for ('SYMBOL
+SYMBOL)."
+  `(and (pred map-p)
+        ,@(map--make-pcase-bindings args)))
+
+(defmacro map-let (keys map &rest body)
+  "Bind the variables in KEYS to the elements of MAP then evaluate BODY.
+
+KEYS can be a list of symbols, in which case each element will be
+bound to the looked up value in MAP.
+
+KEYS can also be a list of (KEY VARNAME) pairs, in which case
+KEY is an unquoted form.
+
+MAP can be a list, hash-table or array."
+  (declare (indent 2) (debug t))
+  `(pcase-let ((,(map--make-pcase-patterns keys) ,map))
+     ,@body))
+
+(eval-when-compile
+  (defmacro map--dispatch (map-var &rest args)
+    "Evaluate one of the forms specified by ARGS based on the type of MAP.
+
+The following keyword types are meaningful: `:list',
+`:hash-table' and `:array'.
+
+An error is thrown if MAP is neither a list, hash-table nor array.
+
+Return RESULT if non-nil or the result of evaluation of the form."
+    (declare (debug t) (indent 1))
+    `(cond ((listp ,map-var) ,(plist-get args :list))
+           ((hash-table-p ,map-var) ,(plist-get args :hash-table))
+           ((arrayp ,map-var) ,(plist-get args :array))
+           (t (error "Unsupported map: %s" ,map-var)))))
+
+(defun map-elt (map key &optional default)
+  "Perform a lookup in MAP of KEY and return its associated value.
+If KEY is not found, return DEFAULT which defaults to nil.
+
+If MAP is a list, `eql' is used to lookup KEY.
+
+MAP can be a list, hash-table or array."
+  (declare
+   (gv-expander
+    (lambda (do)
+      (gv-letplace (mgetter msetter) `(gv-delay-error ,map)
+        (macroexp-let2* nil
+            ;; Eval them once and for all in the right order.
+            ((key key) (default default))
+          `(if (listp ,mgetter)
+               ;; Special case the alist case, since it can't be handled by the
+               ;; map--put function.
+               ,(gv-get `(alist-get ,key (gv-synthetic-place
+                                          ,mgetter ,msetter)
+                                    ,default)
+                        do)
+             ,(funcall do `(map-elt ,mgetter ,key ,default)
+                       (lambda (v) `(map--put ,mgetter ,key ,v)))))))))
+  (map--dispatch map
+    :list (alist-get key map default)
+    :hash-table (gethash key map default)
+    :array (if (and (>= key 0) (< key (seq-length map)))
+               (seq-elt map key)
+             default)))
+
+(defmacro map-put (map key value)
+  "In MAP, associate KEY with VALUE and return MAP.
+If KEY is already present in MAP, replace the associated value
+with VALUE.
+
+MAP can be a list, hash-table or array."
+  (macroexp-let2 nil map map
+    `(progn
+       (setf (map-elt ,map ,key) ,value)
+       ,map)))
+
+(defmacro map-delete (map key)
+  "In MAP, delete the key KEY if present and return MAP.
+If MAP is an array, store nil at the index KEY.
+
+MAP can be a list, hash-table or array."
+  (declare (debug t))
+  (gv-letplace (mgetter msetter) `(gv-delay-error ,map)
+    (macroexp-let2 nil key key
+      `(if (not (listp ,mgetter))
+           (map--delete ,mgetter ,key)
+         ;; The alist case is special, since it can't be handled by the
+         ;; map--delete function.
+         (setf (alist-get ,key (gv-synthetic-place ,mgetter ,msetter)
+                          nil t)
+               nil)
+         ,mgetter))))
+
+(defun map-nested-elt (map keys &optional default)
+  "Traverse MAP using KEYS and return the looked up value or DEFAULT if nil.
+
+Map can be a nested map composed of alists, hash-tables and arrays."
+  (or (seq-reduce (lambda (acc key)
+                    (when (map-p acc)
+                      (map-elt acc key)))
+                  keys
+                  map)
+      default))
+
+(defun map-keys (map)
+  "Return the list of keys in MAP.
+
+MAP can be a list, hash-table or array."
+  (map-apply (lambda (key _) key) map))
+
+(defun map-values (map)
+  "Return the list of values in MAP.
+
+MAP can be a list, hash-table or array."
+  (map-apply (lambda (_ value) value) map))
+
+(defun map-pairs (map)
+  "Return the elements of MAP as key/value association lists.
+
+MAP can be a list, hash-table or array."
+  (map-apply #'cons map))
+
+(defun map-length (map)
+  "Return the length of MAP.
+
+MAP can be a list, hash-table or array."
+  (length (map-keys map)))
+
+(defun map-copy (map)
+  "Return a copy of MAP.
+
+MAP can be a list, hash-table or array."
+  (map--dispatch map
+    :list (seq-copy map)
+    :hash-table (copy-hash-table map)
+    :array (seq-copy map)))
+
+(defun map-apply (function map)
+  "Apply FUNCTION to each element of MAP and return the result as a list.
+FUNCTION is called with two arguments, the key and the value.
+
+MAP can be a list, hash-table or array."
+  (funcall (map--dispatch map
+             :list #'map--apply-alist
+             :hash-table #'map--apply-hash-table
+             :array #'map--apply-array)
+           function
+           map))
+
+(defun map-keys-apply (function map)
+  "Return the result of applying FUNCTION to each key of MAP.
+
+MAP can be a list, hash-table or array."
+  (map-apply (lambda (key _)
+               (funcall function key))
+             map))
+
+(defun map-values-apply (function map)
+  "Return the result of applying FUNCTION to each value of MAP.
+
+MAP can be a list, hash-table or array."
+  (map-apply (lambda (_ val)
+               (funcall function val))
+             map))
+
+(defun map-filter (pred map)
+  "Return an alist of key/val pairs for which (PRED key val) is non-nil in MAP.
+
+MAP can be a list, hash-table or array."
+  (delq nil (map-apply (lambda (key val)
+                         (if (funcall pred key val)
+                             (cons key val)
+                           nil))
+                       map)))
+
+(defun map-remove (pred map)
+  "Return an alist of the key/val pairs for which (PRED key val) is nil in MAP.
+
+MAP can be a list, hash-table or array."
+  (map-filter (lambda (key val) (not (funcall pred key val)))
+              map))
+
+(defun map-p (map)
+  "Return non-nil if MAP is a map (list, hash-table or array)."
+  (or (listp map)
+      (hash-table-p map)
+      (arrayp map)))
+
+(defun map-empty-p (map)
+  "Return non-nil is MAP is empty.
+
+MAP can be a list, hash-table or array."
+  (map--dispatch map
+    :list (null map)
+    :array (seq-empty-p map)
+    :hash-table (zerop (hash-table-count map))))
+
+(defun map-contains-key-p (map key &optional testfn)
+  "Return non-nil if MAP contain the key KEY, nil otherwise.
+Equality is defined by TESTFN if non-nil or by `equal' if nil.
+
+MAP can be a list, hash-table or array."
+  (seq-contains-p (map-keys map) key testfn))
+
+(defun map-some-p (pred map)
+  "Return a key/value pair for which (PRED key val) is non-nil in MAP.
+
+MAP can be a list, hash-table or array."
+  (catch 'map--break
+    (map-apply (lambda (key value)
+                 (when (funcall pred key value)
+                   (throw 'map--break (cons key value))))
+               map)
+    nil))
+
+(defun map-every-p (pred map)
+  "Return non-nil if (PRED key val) is non-nil for all elements of the map MAP.
+
+MAP can be a list, hash-table or array."
+  (catch 'map--break
+    (map-apply (lambda (key value)
+                 (or (funcall pred key value)
+                     (throw 'map--break nil)))
+               map)
+    t))
+
+(defun map-merge (type &rest maps)
+  "Merge into a map of type TYPE all the key/value pairs in the maps MAPS.
+
+MAP can be a list, hash-table or array."
+  (let (result)
+    (while maps
+      (map-apply (lambda (key value)
+                   (setf (map-elt result key) value))
+                 (pop maps)))
+    (map-into result type)))
+
+(defun map-into (map type)
+  "Convert the map MAP into a map of type TYPE.
+
+TYPE can be one of the following symbols: list or hash-table.
+MAP can be a list, hash-table or array."
+  (pcase type
+    (`list (map-pairs map))
+    (`hash-table (map--into-hash-table map))
+    (_ (error "Not a map type name: %S" type))))
+
+(defun map--put (map key v)
+  (map--dispatch map
+    :list (let ((p (assoc key map)))
+            (if p (setcdr p v)
+              (error "No place to change the mapping for %S" key)))
+    :hash-table (puthash key v map)
+    :array (aset map key v)))
+
+(defun map--apply-alist (function map)
+  "Private function used to apply FUNCTION over MAP, MAP being an alist."
+  (seq-map (lambda (pair)
+             (funcall function
+                      (car pair)
+                      (cdr pair)))
+           map))
+
+(defun map--delete (map key)
+  (map--dispatch map
+    :list (error "No place to remove the mapping for %S" key)
+    :hash-table (remhash key map)
+    :array (and (>= key 0)
+                (<= key (seq-length map))
+                (aset map key nil)))
+  map)
+
+(defun map--apply-hash-table (function map)
+  "Private function used to apply FUNCTION over MAP, MAP being a hash-table."
+  (let (result)
+    (maphash (lambda (key value)
+               (push (funcall function key value) result))
+             map)
+    (nreverse result)))
+
+(defun map--apply-array (function map)
+  "Private function used to apply FUNCTION over MAP, MAP being an array."
+  (let ((index 0))
+    (seq-map (lambda (elt)
+               (prog1
+                   (funcall function index elt)
+                 (setq index (1+ index))))
+             map)))
+
+(defun map--into-hash-table (map)
+  "Convert MAP into a hash-table."
+  (let ((ht (make-hash-table :size (map-length map)
+                             :test 'equal)))
+    (map-apply (lambda (key value)
+                 (setf (map-elt ht key) value))
+               map)
+    ht))
+
+(defun map--make-pcase-bindings (args)
+  "Return a list of pcase bindings from ARGS to the elements of a map."
+  (seq-map (lambda (elt)
+             (if (consp elt)
+                 `(app (pcase--flip map-elt ,(car elt)) ,(cadr elt))
+               `(app (pcase--flip map-elt ',elt) ,elt)))
+           args))
+
+(defun map--make-pcase-patterns (args)
+  "Return a list of `(map ...)' pcase patterns built from ARGS."
+  (cons 'map
+        (seq-map (lambda (elt)
+                   (if (and (consp elt) (eq 'map (car elt)))
+                       (map--make-pcase-patterns elt)
+                     elt))
+                 args)))
+
+(provide 'map)
+;;; map.el ends here
diff --git a/lisp/emacs-lisp/nadvice.el b/lisp/emacs-lisp/nadvice.el
index faebe26..5a59a98 100644
--- a/lisp/emacs-lisp/nadvice.el
+++ b/lisp/emacs-lisp/nadvice.el
@@ -114,7 +114,7 @@ Each element has the form (WHERE BYTECODE STACK) where:
            (usage (help-split-fundoc origdoc function)))
       (setq usage (if (null usage)
                       (let ((arglist (help-function-arglist flist)))
-                        (format "%S" (help-make-usage function arglist)))
+                        (help--make-usage-docstring function arglist))
                     (setq origdoc (cdr usage)) (car usage)))
       (help-add-fundoc-usage (concat docstring origdoc) usage))))
 
@@ -522,8 +522,9 @@ of the piece of advice."
             (while
                 (progn
                   (funcall get-next-frame)
-                  (not (and (eq (nth 1 frame2) 'apply)
-                            (eq (nth 3 frame2) inneradvice)))))
+                  (and frame2
+                       (not (and (eq (nth 1 frame2) 'apply)
+                                 (eq (nth 3 frame2) inneradvice))))))
             (funcall get-next-frame)
             (funcall get-next-frame))))
       (- i origi 1))))
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 6fecd9a..aeb8c65 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -237,8 +237,8 @@ This variable has three possible values:
     archive: only criteria (a) is used;
     t: both criteria are used.
 
-This variable has no effect if `package-menu--hide-obsolete' is
-nil, so it can be toggled with \\<package-menu-mode-map> 
\\[package-menu-hide-obsolete]."
+This variable has no effect if `package-menu--hide-packages' is
+nil, so it can be toggled with \\<package-menu-mode-map> 
\\[package-menu-toggle-hiding]."
   :type '(choice (const :tag "Don't hide anything" nil)
                  (const :tag "Hide per package-archive-priorities"
                         archive)
@@ -960,6 +960,8 @@ is wrapped around any parts requiring it."
 
 (declare-function lm-header "lisp-mnt" (header))
 (declare-function lm-homepage "lisp-mnt" (&optional file))
+(declare-function lm-maintainer "lisp-mnt" (&optional file))
+(declare-function lm-authors "lisp-mnt" (&optional file))
 
 (defun package-buffer-info ()
   "Return a `package-desc' describing the package in the current buffer.
@@ -996,7 +998,9 @@ boundaries."
            (package--prepare-dependencies
             (package-read-from-string requires-str)))
        :kind 'single
-       :url homepage))))
+       :url homepage
+       :maintainer (lm-maintainer)
+       :authors (lm-authors)))))
 
 (defun package--read-pkg-desc (kind)
   "Read a `define-package' form in current buffer.
@@ -1119,9 +1123,12 @@ buffer is killed afterwards.  Return the last value in 
BODY."
   "Run BODY in a buffer containing the contents of FILE at LOCATION.
 If ASYNC is non-nil, and if it is possible, run BODY
 asynchronously.  If an error is encountered and ASYNC is a
-function, call it with no arguments (instead of executing BODY),
-otherwise propagate the error.  For description of the other
-arguments see `package--with-work-buffer'."
+function, call it with no arguments (instead of executing BODY).
+If it returns non-nil, or if it wasn't a function, propagate the
+error.
+
+For a description of the other arguments see
+`package--with-work-buffer'."
   (declare (indent 3) (debug t))
   (macroexp-let2* macroexp-copyable-p
       ((async-1 async)
@@ -1130,21 +1137,29 @@ arguments see `package--with-work-buffer'."
     `(if (or (not ,async-1)
              (not (string-match-p "\\`https?:" ,location-1)))
          (package--with-work-buffer ,location-1 ,file-1 ,@body)
-       (url-retrieve (concat ,location-1 ,file-1)
-                     (lambda (status)
-                       (if (eq (car status) :error)
-                           (if (functionp ,async-1)
-                               (funcall ,async-1)
-                             (signal (cdar status) (cddr status)))
-                         (goto-char (point-min))
-                         (unless (search-forward "\n\n" nil 'noerror)
-                           (error "Invalid url response in buffer %s"
-                             (current-buffer)))
-                         (delete-region (point-min) (point))
-                         ,@body)
-                       (kill-buffer (current-buffer)))
-                     nil
-                     'silent))))
+       ;; This `condition-case' is to catch connection errors.
+       (condition-case error-signal
+           (url-retrieve (concat ,location-1 ,file-1)
+                         ;; This is to catch execution errors.
+                         (lambda (status)
+                           (condition-case error-signal
+                               (progn
+                                 (when-let ((er (plist-get status :error)))
+                                   (error "Error retrieving: %s %S" (concat 
,location-1 ,file-1) er))
+                                 (goto-char (point-min))
+                                 (unless (search-forward "\n\n" nil 'noerror)
+                                   (error "Invalid url response in buffer %s"
+                                          (current-buffer)))
+                                 (delete-region (point-min) (point))
+                                 ,@body
+                                 (kill-buffer (current-buffer)))
+                             (error (when (if (functionp ,async-1) (funcall 
,async-1) t)
+                                      (signal (car error-signal) (cdr 
error-signal))))))
+                         nil
+                         'silent)
+         (error (when (if (functionp ,async-1) (funcall ,async-1) t)
+                  (message "Error contacting: %s" (concat ,location-1 ,file-1))
+                  (signal (car error-signal) (cdr error-signal))))))))
 
 (defun package--check-signature-content (content string &optional sig-file)
   "Check signature CONTENT against STRING.
@@ -1457,7 +1472,11 @@ similar to an entry in `package-alist'.  Save the cached 
copy to
              (when good-sigs
                (write-region (mapconcat #'epg-signature-to-string good-sigs 
"\n")
                              nil (concat local-file ".signed") nil 'silent))
-             (package--update-downloads-in-progress archive))))))))
+             (package--update-downloads-in-progress archive)
+             ;; If we got this far, either everything worked or we don't mind
+             ;; not signing, so tell `package--with-work-buffer-async' to not
+             ;; propagate errors.
+             nil)))))))
 
 (defun package--download-and-read-archives (&optional async)
   "Download descriptions of all `package-archives' and read them.
@@ -1474,7 +1493,8 @@ perform the downloads asynchronously."
          archive "archive-contents"
          ;; Called if the async download fails
          (when async
-           (lambda () (package--update-downloads-in-progress archive))))
+           ;; The t at the end means to propagate connection errors.
+           (lambda () (package--update-downloads-in-progress archive) t)))
       (error (message "Failed to download `%s' archive."
                (car archive))))))
 
@@ -1556,6 +1576,7 @@ SEEN is used internally to detect infinite recursion."
         ;; blocked via `package-load-list'.
         (let ((pkg-descs (cdr (assq next-pkg package-archive-contents)))
               (found nil)
+              (found-something nil)
               (problem nil))
           (while (and pkg-descs (not found))
             (let* ((pkg-desc (pop pkg-descs))
@@ -1563,26 +1584,29 @@ SEEN is used internally to detect infinite recursion."
                    (disabled (package-disabled-p next-pkg version)))
               (cond
                ((version-list-< version next-version)
-                (error
-                 "Need package `%s-%s', but only %s is available"
-                 next-pkg (package-version-join next-version)
-                 (package-version-join version)))
+                ;; pkg-descs is sorted by priority, not version, so
+                ;; don't error just yet.
+                (unless found-something
+                  (setq found-something (package-version-join version))))
                (disabled
                 (unless problem
                   (setq problem
                         (if (stringp disabled)
-                            (format "Package `%s' held at version %s, \
-but version %s required"
+                            (format "Package `%s' held at version %s, but 
version %s required"
                                     next-pkg disabled
                                     (package-version-join next-version))
                           (format "Required package '%s' is disabled"
                                   next-pkg)))))
                (t (setq found pkg-desc)))))
           (unless found
-            (if problem
-                (error "%s" problem)
-              (error "Package `%s-%s' is unavailable"
-                     next-pkg (package-version-join next-version))))
+            (cond
+             (problem (error "%s" problem))
+             (found-something
+              (error "Need package `%s-%s', but only %s is available"
+                     next-pkg (package-version-join next-version)
+                     found-something))
+             (t (error "Package `%s-%s' is unavailable"
+                       next-pkg (package-version-join next-version)))))
           (setq packages
                 (package-compute-transaction (cons found packages)
                                              (package-desc-reqs found)
@@ -1604,12 +1628,14 @@ Used to populate `package-selected-packages'."
              unless (memq name dep-list)
              collect name)))
 
-(defun package--save-selected-packages (value)
+(defun package--save-selected-packages (&optional value)
   "Set and save `package-selected-packages' to VALUE."
-  (let ((save-silently inhibit-message))
-    (customize-save-variable
-     'package-selected-packages
-     (setq package-selected-packages value))))
+  (when value
+    (setq package-selected-packages value))
+  (if after-init-time
+      (let ((save-silently inhibit-message))
+        (customize-save-variable 'package-selected-packages 
package-selected-packages))
+    (add-hook 'after-init-hook #'package--save-selected-packages)))
 
 (defun package--user-selected-p (pkg)
   "Return non-nil if PKG is a package was installed by the user.
@@ -1866,6 +1892,7 @@ to install it but still mark it as selected."
                                   package-archive-contents))
                     nil t))
            nil)))
+  (add-hook 'post-command-hook #'package-menu--post-refresh)
   (let ((name (if (package-desc-p pkg)
                   (package-desc-name pkg)
                 pkg)))
@@ -1888,10 +1915,8 @@ Otherwise return nil."
   (when str
     (when (string-match "\\`[ \t]*[$]Revision:[ \t]+" str)
       (setq str (substring str (match-end 0))))
-    (condition-case nil
-        (if (version-to-list str)
-            str)
-      (error nil))))
+    (ignore-errors
+      (if (version-to-list str) str))))
 
 (declare-function lm-homepage "lisp-mnt" (&optional file))
 
@@ -1935,7 +1960,8 @@ Downloads and installs required packages as needed."
 ;;;###autoload
 (defun package-install-file (file)
   "Install a package from a file.
-The file can either be a tar file or an Emacs Lisp file."
+The file can either be a tar file, an Emacs Lisp file, or a
+directory."
   (interactive "fPackage file name: ")
   (with-temp-buffer
     (if (file-directory-p file)
@@ -1979,12 +2005,31 @@ If some packages are not installed propose to install 
them."
   "Delete package PKG-DESC.
 
 Argument PKG-DESC is a full description of package as vector.
+Interactively, prompt the user for the package name and version.
+
 When package is used elsewhere as dependency of another package,
 refuse deleting it and return an error.
-If FORCE is non-nil package will be deleted even if it is used
-elsewhere.
+If prefix argument FORCE is non-nil, package will be deleted even
+if it is used elsewhere.
 If NOSAVE is non-nil, the package is not removed from
 `package-selected-packages'."
+  (interactive
+   (progn
+     ;; Initialize the package system to get the list of package
+     ;; symbols for completion.
+     (unless package--initialized
+       (package-initialize t))
+     (let* ((package-table
+             (mapcar
+              (lambda (p) (cons (package-desc-full-name p) p))
+              (delq nil
+                    (mapcar (lambda (p) (unless (package-built-in-p p) p))
+                            (apply #'append (mapcar #'cdr package-alist))))))
+            (package-name (completing-read "Delete package: "
+                                           (mapcar #'car package-table)
+                                           nil t)))
+       (list (cdr (assoc package-name package-table))
+             current-prefix-arg nil))))
   (let ((dir (package-desc-dir pkg-desc))
         (name (package-desc-name pkg-desc))
         pkg-used-elsewhere-by)
@@ -2011,6 +2056,7 @@ If NOSAVE is non-nil, the package is not removed from
                   (package-desc-full-name pkg-desc)
                   (package-desc-name pkg-used-elsewhere-by)))
           (t
+           (add-hook 'post-command-hook #'package-menu--post-refresh)
            (delete-directory dir t t)
            ;; Remove NAME-VERSION.signed file.
            (let ((signed-file (concat dir ".signed")))
@@ -2069,7 +2115,8 @@ will be deleted."
 (defun describe-package (package)
   "Display the full documentation of PACKAGE (a symbol)."
   (interactive
-   (let* ((guess (function-called-at-point)))
+   (let* ((guess (or (function-called-at-point)
+                     (symbol-at-point))))
      (require 'finder-inf nil t)
      ;; Load the package list if necessary (but don't activate them).
      (unless package--initialized
@@ -2085,7 +2132,8 @@ will be deleted."
                                    (format "Describe package (default %s): "
                                            guess)
                                  "Describe package: ")
-                               packages nil t nil nil guess)))
+                               packages nil t nil nil (when guess
+                                                        (symbol-name guess)))))
          (list (intern val))))))
   (if (not (or (package-desc-p package) (and package (symbolp package))))
       (message "No package specified")
@@ -2120,6 +2168,8 @@ will be deleted."
          (status (if desc (package-desc-status desc) "orphan"))
          (incompatible-reason (package--incompatible-p desc))
          (signed (if desc (package-desc-signed desc))))
+    (when (string= status "avail-obso")
+      (setq status "available obsolete"))
     (when incompatible-reason
       (setq status "incompatible"))
     (prin1 name)
@@ -2136,31 +2186,34 @@ will be deleted."
           (pkg-dir
            (insert (propertize (if (member status '("unsigned" "dependency"))
                                    "Installed"
-                                 (capitalize status)) ;FIXME: Why comment-face?
-                               'font-lock-face 'font-lock-comment-face))
-           (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)
+                                 (capitalize status))
+                               'font-lock-face 'font-lock-builtin-face))
+           (insert (substitute-command-keys " in ‘"))
+           (let ((dir (abbreviate-file-name
+                       (file-name-as-directory
+                        (if (file-in-directory-p pkg-dir package-user-dir)
+                            (file-relative-name pkg-dir package-user-dir)
+                          pkg-dir)))))
+             (help-insert-xref-button 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 (substitute-command-keys
+                        "’,\n             shadowing a ")
                        (propertize "built-in package"
                                    'font-lock-face 'font-lock-builtin-face))
-             (insert "’"))
+             (insert (substitute-command-keys "’")))
            (if signed
                (insert ".")
              (insert " (unsigned)."))
            (when (and (package-desc-p desc)
                       (not required-by)
-                      (package-installed-p desc))
+                      (member status '("unsigned" "installed")))
              (insert " ")
              (package-make-button "Delete"
                                   'action #'package-delete-button-action
                                   'package-desc desc)))
           (incompatible-reason
-           (insert (propertize "Incompatible" 'face font-lock-warning-face)
+           (insert (propertize "Incompatible" 'font-lock-face 
font-lock-warning-face)
                    " because it depends on ")
            (if (stringp incompatible-reason)
                (insert "Emacs " incompatible-reason ".")
@@ -2175,12 +2228,15 @@ will be deleted."
             'package-desc desc))
           (t (insert (capitalize status) ".")))
     (insert "\n")
-    (insert "    " (propertize "Archive" 'font-lock-face 'bold)
-            ": " (or archive "n/a") "\n")
+    (unless (and pkg-dir (not archive)) ; Installed pkgs don't have archive.
+      (insert "    " (propertize "Archive" 'font-lock-face 'bold)
+              ": " (or archive "n/a") "\n"))
     (and version
          (insert "    "
                  (propertize "Version" 'font-lock-face 'bold) ": "
                  (package-version-join version) "\n"))
+    (insert "    " (propertize "Summary" 'font-lock-face 'bold)
+            ": " (if desc (package-desc-summary desc)) "\n")
 
     (setq reqs (if desc (package-desc-reqs desc)))
     (when reqs
@@ -2215,8 +2271,6 @@ will be deleted."
             (help-insert-xref-button text 'help-package
                                      (package-desc-name pkg))))
         (insert "\n")))
-    (insert "    " (propertize "Summary" 'font-lock-face 'bold)
-            ": " (if desc (package-desc-summary desc)) "\n")
     (when homepage
       (insert "   " (propertize "Homepage" 'font-lock-face 'bold) ": ")
       (help-insert-xref-button homepage 'help-url homepage)
@@ -2246,7 +2300,7 @@ will be deleted."
                      (if (not ov) (format "%s" from)
                        (format "%s (%s)"
                                (make-text-button (package-version-join ov) nil
-                                                 'face 'link
+                                                 'font-lock-face 'link
                                                  'follow-link t
                                                  'action
                                                  (lambda (_button)
@@ -2321,7 +2375,7 @@ will be deleted."
                                 :background "light grey"
                                 :foreground "black")
                        'link)))
-    (apply 'insert-text-button button-text 'face button-face 'follow-link t
+    (apply 'insert-text-button button-text 'font-lock-face button-face 
'follow-link t
            props)))
 
 
@@ -2342,8 +2396,9 @@ will be deleted."
     (define-key map "~" 'package-menu-mark-obsolete-for-deletion)
     (define-key map "x" 'package-menu-execute)
     (define-key map "h" 'package-menu-quick-help)
+    (define-key map "H" #'package-menu-hide-package)
     (define-key map "?" 'package-menu-describe-package)
-    (define-key map "(" #'package-menu-hide-obsolete)
+    (define-key map "(" #'package-menu-toggle-hiding)
     (define-key map [menu-bar package-menu] (cons "Package" menu-map))
     (define-key menu-map [mq]
       '(menu-item "Quit" quit-window
@@ -2502,26 +2557,27 @@ of these dependencies, similar to the list returned by
         (cond
          ;; Installed obsolete packages are handled in the `dir'
          ;; clause above.  Here we handle available obsolete, which
-         ;; are displayed depending on `package-menu--hide-obsolete'.
+         ;; are displayed depending on `package-menu--hide-packages'.
          ((and ins (version-list-<= version ins-v)) "avail-obso")
          (t
           (if (memq name package-menu--new-package-list)
               "new" "available"))))))))
 
-(defvar package-menu--hide-obsolete t
+(defvar package-menu--hide-packages t
   "Whether available obsolete packages should be hidden.
-Can be toggled with \\<package-menu-mode-map> \\[package-menu-hide-obsolete].
+Can be toggled with \\<package-menu-mode-map> \\[package-menu-toggle-hiding].
 Installed obsolete packages are always displayed.")
 
-(defun package-menu-hide-obsolete ()
+(defun package-menu-toggle-hiding ()
   "Toggle visibility of obsolete available packages."
   (interactive)
   (unless (derived-mode-p 'package-menu-mode)
     (user-error "The current buffer is not a Package Menu"))
-  (setq package-menu--hide-obsolete
-        (not package-menu--hide-obsolete))
-  (message "%s available-obsolete packages" (if package-menu--hide-obsolete
-                                                "Hiding" "Displaying"))
+  (setq package-menu--hide-packages
+        (not package-menu--hide-packages))
+  (message "%s packages" (if package-menu--hide-packages
+                             "Hiding obsolete or unwanted"
+                           "Displaying all"))
   (revert-buffer nil 'no-confirm))
 
 (defun package--remove-hidden (pkg-list)
@@ -2531,8 +2587,8 @@ same name, sorted by decreasing 
`package-desc-priority-version'.
 Return a list of packages tied for the highest priority according
 to their archives."
   (when pkg-list
-    ;; Variable toggled with `package-menu-hide-obsolete'.
-    (if (not package-menu--hide-obsolete)
+    ;; Variable toggled with `package-menu-toggle-hiding'.
+    (if (not package-menu--hide-packages)
         pkg-list
       (let ((installed (cadr (assq (package-desc-name (car pkg-list))
                                    package-alist))))
@@ -2551,9 +2607,11 @@ to their archives."
                         (out))
                    (while pkg-list
                      (let ((p (pop pkg-list)))
-                       (if (>= (package-desc-priority p) max-priority)
+                       (let ((priority (package-desc-priority p)))
+                         (if (< priority max-priority)
+                             (setq pkg-list nil)
                            (push p out)
-                         (setq pkg-list nil))))
+                           (setq max-priority priority)))))
                    (nreverse out)))
                 (pkg-list
                  (list (car pkg-list))))))
@@ -2564,13 +2622,23 @@ to their archives."
                                                    ins-version))
                             filtered-by-priority))))))))
 
+(defcustom package-hidden-regexps nil
+  "List of regexps matching the name of packages to hide.
+If the name of a package matches any of these regexps it is
+omitted from the package menu.  To toggle this, type 
\\[package-menu-toggle-hiding].
+
+Values can be interactively added to this list by typing
+\\[package-menu-hide-package] on a package"
+  :type '(repeat (regexp :tag "Hide packages with name matching")))
+
 (defun package-menu--refresh (&optional packages keywords)
   "Re-populate the `tabulated-list-entries'.
 PACKAGES should be nil or t, which means to display all known packages.
 KEYWORDS should be nil or a list of keywords."
   ;; Construct list of (PKG-DESC . STATUS).
   (unless packages (setq packages t))
-  (let (info-list)
+  (let ((hidden-names (mapconcat #'identity package-hidden-regexps "\\|"))
+        info-list)
     ;; Installed packages:
     (dolist (elt package-alist)
       (let ((name (car elt)))
@@ -2593,7 +2661,13 @@ KEYWORDS should be nil or a list of keywords."
     ;; Available and disabled packages:
     (dolist (elt package-archive-contents)
       (let ((name (car elt)))
-        (when (or (eq packages t) (memq name packages))
+        ;; To be displayed it must be in PACKAGES;
+        (when (and (or (eq packages t) (memq name packages))
+                   ;; and we must either not be hiding anything,
+                   (or (not package-menu--hide-packages)
+                       (not package-hidden-regexps)
+                       ;; or just not hiding this specific package.
+                       (not (string-match hidden-names (symbol-name name)))))
           ;; Hide available-obsolete or low-priority packages.
           (dolist (pkg (package--remove-hidden (cdr elt)))
             (when (package--has-keyword-p pkg keywords)
@@ -2734,6 +2808,29 @@ This fetches the contents of each archive specified in
   (setq package-menu--new-package-list nil)
   (package-refresh-contents package-menu-async))
 
+(defun package-menu-hide-package ()
+  "Hide a package under point.
+If optional arg BUTTON is non-nil, describe its associated package."
+  (interactive)
+  (declare (interactive-only "change `package-hidden-regexps' instead."))
+  (let* ((name (when (derived-mode-p 'package-menu-mode)
+                 (concat "\\`" (regexp-quote (symbol-name (package-desc-name
+                                                           
(tabulated-list-get-id)))))))
+         (re (read-string "Hide packages matching regexp: " name)))
+    ;; Test if it is valid.
+    (string-match re "")
+    (push re package-hidden-regexps)
+    (customize-save-variable 'package-hidden-regexps package-hidden-regexps)
+    (package-menu--post-refresh)
+    (let ((hidden
+           (cl-remove-if-not (lambda (e) (string-match re (symbol-name (car 
e))))
+                             package-archive-contents)))
+      (message (substitute-command-keys
+                (concat "Hiding %s packages, type 
`\\[package-menu-toggle-hiding]'"
+                        " to toggle or `\\[customize-variable] RET 
package-hidden-regexps'"
+                        " to customize it"))
+        (length hidden)))))
+
 (defun package-menu-describe-package (&optional button)
   "Describe the current package.
 If optional arg BUTTON is non-nil, describe its associated package."
@@ -2784,7 +2881,8 @@ If optional arg BUTTON is non-nil, describe its 
associated package."
 (defvar package--quick-help-keys
   '(("install," "delete," "unmark," ("execute" . 1))
     ("next," "previous")
-    ("refresh-contents," "g-redisplay," "filter," "(-toggle-obsolete" "help")))
+    ("Hide-package," "(-toggle-hidden")
+    ("refresh-contents," "g-redisplay," "filter," "help")))
 
 (defun package--prettify-quick-help-key (desc)
   "Prettify DESC to be displayed as a help menu."
@@ -2793,9 +2891,8 @@ If optional arg BUTTON is non-nil, describe its 
associated package."
           (mapconcat #'package--prettify-quick-help-key desc "   ")
         (let ((place (cdr desc))
               (out (car desc)))
-          ;; (setq out (propertize out 'face 'paradox-comment-face))
           (add-text-properties place (1+ place)
-                               '(face (bold font-lock-function-name-face))
+                               '(face (bold font-lock-warning-face))
                                out)
           out))
     (package--prettify-quick-help-key (cons desc 0))))
@@ -2962,17 +3059,17 @@ objects removed."
           (redisplay 'force)
           ;; Don't mark as selected, `package-menu-execute' already
           ;; does that.
-          (package-install pkg 'dont-select)))
-    ;; Once there are no more packages to install, proceed to
-    ;; deletion.
-    (let ((package-menu--transaction-status ":Deleting"))
-      (force-mode-line-update)
-      (redisplay 'force)
-      (dolist (elt (package--sort-by-dependence delete-list))
-        (condition-case-unless-debug err
-            (let ((inhibit-message t))
-              (package-delete elt nil 'nosave))
-          (error (message (cadr err))))))))
+          (package-install pkg 'dont-select))))
+  (let ((package-menu--transaction-status ":Deleting"))
+    (force-mode-line-update)
+    (redisplay 'force)
+    (dolist (elt (package--sort-by-dependence delete-list))
+      (condition-case-unless-debug err
+          (let ((inhibit-message package-menu-async))
+            (package-delete elt nil 'nosave))
+        (error (message "Error trying to delete `%s': %S"
+                 (package-desc-full-name elt)
+                 err))))))
 
 (defun package--update-selected-packages (add remove)
   "Update the `package-selected-packages' list according to ADD and REMOVE.
@@ -3033,9 +3130,7 @@ Optional argument NOQUERY non-nil means do not ask the 
user to confirm."
                   (length removable)
                   "are no longer needed, type `M-x package-autoremove' to 
remove them")
               (message (replace-regexp-in-string "__" "ed" message-template)
-                "finished"))))
-        ;; This calls `package-menu--generate'.
-        (package-menu--post-refresh)))))
+                "finished"))))))))
 
 (defun package-menu--version-predicate (A B)
   (let ((vA (or (aref (cadr A) 1)  '(0)))
@@ -3109,15 +3204,30 @@ Store this list in `package-menu--new-package-list'."
       (if (= (length upgrades) 1) "it" "them"))))
 
 (defun package-menu--post-refresh ()
-  "Check for new packages, revert the *Packages* buffer, and check for 
upgrades.
-This function is called after `package-refresh-contents' and
-after `package-menu--perform-transaction'."
-  (package-menu--populate-new-package-list)
+  "If there's a *Packages* buffer, revert it and check for new packages and 
upgrades.
+Do nothing if there's no *Packages* buffer.
+
+This function is called after `package-refresh-contents' and it
+is added to `post-command-hook' by any function which alters the
+package database (`package-install' and `package-delete').  When
+run, it removes itself from `post-command-hook'."
+  (remove-hook 'post-command-hook #'package-menu--post-refresh)
   (let ((buf (get-buffer "*Packages*")))
     (when (buffer-live-p buf)
       (with-current-buffer buf
+        (package-menu--populate-new-package-list)
         (run-hooks 'tabulated-list-revert-hook)
-        (tabulated-list-print 'remember 'update)
+        (tabulated-list-print 'remember 'update)))))
+
+(defun package-menu--mark-or-notify-upgrades ()
+  "If there's a *Packages* buffer, check for upgrades and possibly mark them.
+Do nothing if there's no *Packages* buffer.  If there are
+upgrades, mark them if `package-menu--mark-upgrades-pending' is
+non-nil, otherwise just notify the user that there are upgrades.
+This function is called after `package-refresh-contents'."
+  (let ((buf (get-buffer "*Packages*")))
+    (when (buffer-live-p buf)
+      (with-current-buffer buf
         (if package-menu--mark-upgrades-pending
             (package-menu--mark-upgrades-1)
           (package-menu--find-and-notify-upgrades))))))
@@ -3136,6 +3246,8 @@ The list is displayed in a buffer named `*Packages*'."
   ;; Integrate the package-menu with updating the archives.
   (add-hook 'package--post-download-archives-hook
             #'package-menu--post-refresh)
+  (add-hook 'package--post-download-archives-hook
+            #'package-menu--mark-or-notify-upgrades 'append)
 
   ;; Generate the Package Menu.
   (let ((buf (get-buffer-create "*Packages*")))
diff --git a/lisp/emacs-lisp/pcase.el b/lisp/emacs-lisp/pcase.el
index ab82b7e..50a2507 100644
--- a/lisp/emacs-lisp/pcase.el
+++ b/lisp/emacs-lisp/pcase.el
@@ -112,11 +112,12 @@ CASES is a list of elements of the form (PATTERN CODE...).
 
 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 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
+  ATOM         is a shorthand for 'ATOM.
+                  ATOM can be a keyword, an integer, or a string.
   (pred FUN)   matches if FUN applied to the object returns non-nil.
   (guard BOOLEXP)      matches if BOOLEXP evaluates to non-nil.
   (let PAT EXP)        matches if EXP matches PAT.
@@ -163,7 +164,7 @@ Currently, the following patterns are provided this way:"
         expansion))))
 
 (declare-function help-fns--signature "help-fns"
-                  (function doc real-def real-function))
+                  (function doc real-def real-function raw))
 
 ;; FIXME: Obviously, this will collide with nadvice's use of
 ;; function-documentation if we happen to advise `pcase'.
@@ -183,7 +184,7 @@ Currently, the following patterns are provided this way:"
              (insert "\n\n-- ")
              (let* ((doc (documentation me 'raw)))
                (setq doc (help-fns--signature symbol doc me
-                                              (indirect-function me)))
+                                              (indirect-function me) t))
                (insert "\n" (or doc "Not documented.")))))))
       (let ((combined-doc (buffer-string)))
         (if ud (help-add-fundoc-usage combined-doc (car ud)) combined-doc)))))
@@ -638,7 +639,7 @@ MATCH is the pattern that needs to be matched, of the form:
     res))
 
 (defun pcase--self-quoting-p (upat)
-  (or (keywordp upat) (numberp upat) (stringp upat)))
+  (or (keywordp upat) (integerp upat) (stringp upat)))
 
 (defun pcase--app-subst-match (match sym fun nsym)
   (cond
@@ -770,7 +771,12 @@ Otherwise, it defers to REST which is a list of branches 
of the form
            (sym (car cdrpopmatches))
            (upat (cdr cdrpopmatches)))
       (cond
-       ((memq upat '(t _)) (pcase--u1 matches code vars rest))
+       ((memq upat '(t _))
+        (let ((code (pcase--u1 matches code vars rest)))
+          (if (eq upat '_) code
+            (macroexp--warn-and-return
+             "Pattern t is deprecated.  Use `_' instead"
+             code))))
        ((eq upat 'pcase--dontcare) :pcase--dontcare)
        ((memq (car-safe upat) '(guard pred))
         (if (eq (car upat) 'pred) (pcase--mark-used sym))
@@ -784,7 +790,7 @@ Otherwise, it defers to REST which is a list of branches of 
the form
                        (pcase--eval (cadr upat) vars))
                      (pcase--u1 matches code vars then-rest)
                      (pcase--u else-rest))))
-       ((symbolp upat)
+       ((and (symbolp upat) upat)
         (pcase--mark-used sym)
         (if (not (assq upat vars))
             (pcase--u1 matches code (cons (cons upat sym) vars) rest)
@@ -854,7 +860,7 @@ Otherwise, it defers to REST which is a list of branches of 
the form
                      (pcase--u rest))
                    vars
                    (list `((and . ,matches) ,code . ,vars))))
-       (t (error "Unknown internal pattern `%S'" upat)))))
+       (t (error "Unknown pattern `%S'" upat)))))
    (t (error "Incorrect MATCH %S" (car matches)))))
 
 (def-edebug-spec
@@ -870,9 +876,9 @@ QPAT can take the following forms:
   (QPAT1 . QPAT2)       matches if QPAT1 matches the car and QPAT2 the cdr.
   [QPAT1 QPAT2..QPATn]  matches a vector of length n and QPAT1..QPATn match
                            its 0..(n-1)th elements, respectively.
-  ,PAT                 matches if the pattern PAT matches.
-  STRING                matches if the object is `equal' to STRING.
-  ATOM                  matches if the object is `eq' to ATOM."
+  ,PAT                  matches if the pcase pattern PAT matches.
+  ATOM                  matches if the object is `equal' to ATOM.
+                          ATOM can be a symbol, an integer, or a string."
   (declare (debug (pcase-QPAT)))
   (cond
    ((eq (car-safe qpat) '\,) (cadr qpat))
@@ -888,7 +894,8 @@ QPAT can take the following forms:
     `(and (pred consp)
           (app car ,(list '\` (car qpat)))
           (app cdr ,(list '\` (cdr qpat)))))
-   ((or (stringp qpat) (integerp qpat) (symbolp qpat)) `',qpat)))
+   ((or (stringp qpat) (integerp qpat) (symbolp qpat)) `',qpat)
+   (t (error "Unknown QPAT: %S" qpat))))
 
 
 (provide 'pcase)
diff --git a/lisp/emacs-lisp/seq.el b/lisp/emacs-lisp/seq.el
index 0aa0f09..9eed36e 100644
--- a/lisp/emacs-lisp/seq.el
+++ b/lisp/emacs-lisp/seq.el
@@ -4,7 +4,7 @@
 
 ;; Author: Nicolas Petton <address@hidden>
 ;; Keywords: sequences
-;; Version: 1.7
+;; Version: 1.8
 ;; Package: seq
 
 ;; Maintainer: address@hidden
@@ -249,7 +249,7 @@ TYPE must be one of following symbols: vector, string or 
list.
     (`vector (apply #'vconcat seqs))
     (`string (apply #'concat seqs))
     (`list (apply #'append (append seqs '(nil))))
-    (t (error "Not a sequence type name: %S" type))))
+    (_ (error "Not a sequence type name: %S" type))))
 
 (defun seq-mapcat (function seq &optional type)
   "Concatenate the result of applying FUNCTION to each element of SEQ.
@@ -279,7 +279,7 @@ Equality is defined by TESTFN if non-nil or by `equal' if 
nil."
               '()))
 
 (defun seq-difference (seq1 seq2 &optional testfn)
-  "Return a list of th elements that appear in SEQ1 but not in SEQ2.
+  "Return a list of the elements that appear in SEQ1 but not in SEQ2.
 Equality is defined by TESTFN if non-nil or by `equal' if nil."
   (seq-reduce (lambda (acc elt)
                 (if (not (seq-contains-p seq2 elt testfn))
@@ -323,7 +323,17 @@ TYPE can be one of the following symbols: vector, string 
or list."
     (`vector (vconcat seq))
     (`string (concat seq))
     (`list (append seq nil))
-    (t (error "Not a sequence type name: %S" type))))
+    (_ (error "Not a sequence type name: %S" type))))
+
+(defun seq-min (seq)
+  "Return the smallest element of SEQ.
+SEQ must be a sequence of numbers or markers."
+  (apply #'min (seq-into seq 'list)))
+
+(defun seq-max (seq)
+    "Return the largest element of SEQ.
+SEQ must be a sequence of numbers or markers."
+  (apply #'max (seq-into seq 'list)))
 
 (defun seq--drop-list (list n)
   "Return a list from LIST without its first N elements.
@@ -379,7 +389,7 @@ This is an optimization for lists in `seq-take-while'."
                               ,(seq--elt-safe args (1+ index)))
                         bindings)
                   (setq rest-marker t)))
-          (t
+          (_
            (push `(app (pcase--flip seq--elt-safe ,index) ,name) bindings))))
       (setq index (1+ index)))
     bindings))
@@ -413,7 +423,7 @@ BINDINGS."
                           (seq-drop ,seq ,index))
                         bindings)
                   (setq rest-marker t)))
-          (t
+          (_
            (push `(,name (seq--elt-safe ,seq ,index)) bindings))))
       (setq index (1+ index)))
     bindings))
diff --git a/lisp/emacs-lisp/tabulated-list.el 
b/lisp/emacs-lisp/tabulated-list.el
index fb3045d..9119c3a 100644
--- a/lisp/emacs-lisp/tabulated-list.el
+++ b/lisp/emacs-lisp/tabulated-list.el
@@ -321,11 +321,11 @@ changing `tabulated-list-sort-key'."
         (sorter (tabulated-list--get-sorter))
        entry-id saved-pt saved-col window-line)
     (and remember-pos
+        (setq entry-id (tabulated-list-get-id))
+        (setq saved-col (current-column))
          (when (eq (window-buffer) (current-buffer))
            (setq window-line
-                 (count-screen-lines (window-start) (point))))
-        (setq entry-id (tabulated-list-get-id))
-        (setq saved-col (current-column)))
+                 (count-screen-lines (window-start) (point)))))
     ;; Sort the entries, if necessary.
     (when sorter
       (setq entries (sort entries sorter)))
@@ -347,7 +347,7 @@ changing `tabulated-list-sort-key'."
              (setq entry-id nil
                    saved-pt (point)))
         ;; If the buffer this empty, simply print each elt.
-        (if (eobp)
+        (if (or (not update) (eobp))
             (apply tabulated-list-printer elt)
           (while (let ((local-id (tabulated-list-get-id)))
                    ;; If we find id, then nothing to update.
diff --git a/lisp/emacs-lisp/warnings.el b/lisp/emacs-lisp/warnings.el
index 3ab4026..44a9876 100644
--- a/lisp/emacs-lisp/warnings.el
+++ b/lisp/emacs-lisp/warnings.el
@@ -224,87 +224,91 @@ See the `warnings' custom group for user customization 
features.
 
 See also `warning-series', `warning-prefix-function' and
 `warning-fill-prefix' for additional programming features."
-  (unless level
-    (setq level :warning))
-  (unless buffer-name
-    (setq buffer-name "*Warnings*"))
-  (if (assq level warning-level-aliases)
-      (setq level (cdr (assq level warning-level-aliases))))
-  (or (< (warning-numeric-level level)
-         (warning-numeric-level warning-minimum-log-level))
-      (warning-suppress-p type warning-suppress-log-types)
-      (let* ((typename (if (consp type) (car type) type))
-             (old (get-buffer buffer-name))
-            (buffer (or old (get-buffer-create buffer-name)))
-            (level-info (assq level warning-levels))
-            start end)
-       (with-current-buffer buffer
-          ;; If we created the buffer, disable undo.
-          (unless old
-            (special-mode)
-            (setq buffer-read-only t)
-            (setq buffer-undo-list t))
-         (goto-char (point-max))
-         (when (and warning-series (symbolp warning-series))
-           (setq warning-series
-                 (prog1 (point-marker)
-                   (unless (eq warning-series t)
-                     (funcall warning-series)))))
-          (let ((inhibit-read-only t))
-           (unless (bolp)
-             (newline))
-           (setq start (point))
-           (if warning-prefix-function
-               (setq level-info (funcall warning-prefix-function
-                                         level level-info)))
-           (insert (format (nth 1 level-info)
-                           (format warning-type-format typename))
-                   message)
-           (newline)
-           (when (and warning-fill-prefix (not (string-match "\n" message)))
-             (let ((fill-prefix warning-fill-prefix)
-                   (fill-column 78))
-               (fill-region start (point))))
-           (setq end (point)))
-         (when (and (markerp warning-series)
-                    (eq (marker-buffer warning-series) buffer))
-           (goto-char warning-series)))
-       (if (nth 2 level-info)
-           (funcall (nth 2 level-info)))
-       (cond (noninteractive
-              ;; Noninteractively, take the text we inserted
-              ;; in the warnings buffer and print it.
-              ;; Do this unconditionally, since there is no way
-              ;; to view logged messages unless we output them.
-              (with-current-buffer buffer
-                (save-excursion
-                  ;; Don't include the final newline in the arg
-                  ;; to `message', because it adds a newline.
-                  (goto-char end)
-                  (if (bolp)
-                      (forward-char -1))
-                  (message "%s" (buffer-substring start (point))))))
-             ((and (daemonp) (null after-init-time))
-              ;; Warnings assigned during daemon initialization go into
-              ;; the messages buffer.
-              (message "%s"
-                       (with-current-buffer buffer
-                         (save-excursion
-                           (goto-char end)
-                           (if (bolp)
-                               (forward-char -1))
-                           (buffer-substring start (point))))))
-             (t
-              ;; Interactively, decide whether the warning merits
-              ;; immediate display.
-              (or (< (warning-numeric-level level)
-                     (warning-numeric-level warning-minimum-level))
-                  (warning-suppress-p type warning-suppress-types)
-                  (let ((window (display-buffer buffer)))
-                    (when (and (markerp warning-series)
-                               (eq (marker-buffer warning-series) buffer))
-                      (set-window-start window warning-series))
-                    (sit-for 0))))))))
+  (if (not (or after-init-time noninteractive (daemonp)))
+      ;; Ensure warnings that happen early in the startup sequence
+      ;; are visible when startup completes (bug#20792).
+      (delay-warning type message level buffer-name)
+    (unless level
+      (setq level :warning))
+    (unless buffer-name
+      (setq buffer-name "*Warnings*"))
+    (if (assq level warning-level-aliases)
+       (setq level (cdr (assq level warning-level-aliases))))
+    (or (< (warning-numeric-level level)
+          (warning-numeric-level warning-minimum-log-level))
+       (warning-suppress-p type warning-suppress-log-types)
+       (let* ((typename (if (consp type) (car type) type))
+              (old (get-buffer buffer-name))
+              (buffer (or old (get-buffer-create buffer-name)))
+              (level-info (assq level warning-levels))
+              start end)
+         (with-current-buffer buffer
+           ;; If we created the buffer, disable undo.
+           (unless old
+             (special-mode)
+             (setq buffer-read-only t)
+             (setq buffer-undo-list t))
+           (goto-char (point-max))
+           (when (and warning-series (symbolp warning-series))
+             (setq warning-series
+                   (prog1 (point-marker)
+                     (unless (eq warning-series t)
+                       (funcall warning-series)))))
+           (let ((inhibit-read-only t))
+             (unless (bolp)
+               (newline))
+             (setq start (point))
+             (if warning-prefix-function
+                 (setq level-info (funcall warning-prefix-function
+                                           level level-info)))
+             (insert (format (nth 1 level-info)
+                             (format warning-type-format typename))
+                     message)
+             (newline)
+             (when (and warning-fill-prefix (not (string-match "\n" message)))
+               (let ((fill-prefix warning-fill-prefix)
+                     (fill-column 78))
+                 (fill-region start (point))))
+             (setq end (point)))
+           (when (and (markerp warning-series)
+                      (eq (marker-buffer warning-series) buffer))
+             (goto-char warning-series)))
+         (if (nth 2 level-info)
+             (funcall (nth 2 level-info)))
+         (cond (noninteractive
+                ;; Noninteractively, take the text we inserted
+                ;; in the warnings buffer and print it.
+                ;; Do this unconditionally, since there is no way
+                ;; to view logged messages unless we output them.
+                (with-current-buffer buffer
+                  (save-excursion
+                    ;; Don't include the final newline in the arg
+                    ;; to `message', because it adds a newline.
+                    (goto-char end)
+                    (if (bolp)
+                        (forward-char -1))
+                    (message "%s" (buffer-substring start (point))))))
+               ((and (daemonp) (null after-init-time))
+                ;; Warnings assigned during daemon initialization go into
+                ;; the messages buffer.
+                (message "%s"
+                         (with-current-buffer buffer
+                           (save-excursion
+                             (goto-char end)
+                             (if (bolp)
+                                 (forward-char -1))
+                             (buffer-substring start (point))))))
+               (t
+                ;; Interactively, decide whether the warning merits
+                ;; immediate display.
+                (or (< (warning-numeric-level level)
+                       (warning-numeric-level warning-minimum-level))
+                    (warning-suppress-p type warning-suppress-types)
+                    (let ((window (display-buffer buffer)))
+                      (when (and (markerp warning-series)
+                                 (eq (marker-buffer warning-series) buffer))
+                        (set-window-start window warning-series))
+                      (sit-for 0)))))))))
 
 ;; Use \\<special-mode-map> so that help-enable-auto-load can do its thing.
 ;; Any keymap that is defined will do.
diff --git a/lisp/epg-config.el b/lisp/epg-config.el
index 10f0dd3..db29513 100644
--- a/lisp/epg-config.el
+++ b/lisp/epg-config.el
@@ -51,6 +51,11 @@
   :group 'epg
   :type 'string)
 
+(defcustom epg-gpgconf-program "gpgconf"
+  "The `gpgconf' executable."
+  :group 'epg
+  :type 'string)
+
 (defcustom epg-gpg-home-directory nil
   "The directory which contains the configuration files of `epg-gpg-program'."
   :group 'epg
diff --git a/lisp/epg.el b/lisp/epg.el
index 6015048..7e3cec7 100644
--- a/lisp/epg.el
+++ b/lisp/epg.el
@@ -602,6 +602,20 @@ callback data (if any)."
       (setq process-environment
            (cons (concat "GPG_TTY=" terminal-name)
                  (cons "TERM=xterm" process-environment))))
+    ;; Start the Emacs Pinentry server if allow-emacs-pinentry is set
+    ;; in ~/.gnupg/gpg-agent.conf.
+    (when (and (fboundp 'pinentry-start)
+              (executable-find epg-gpgconf-program)
+              (with-temp-buffer
+                (when (= (call-process epg-gpgconf-program nil t nil
+                                       "--list-options" "gpg-agent")
+                         0)
+                  (goto-char (point-min))
+                  (re-search-forward "^allow-emacs-pinentry:.*:1$" nil t))))
+      (pinentry-start))
+    (setq process-environment
+         (cons (format "INSIDE_EMACS=%s,epg" emacs-version)
+               process-environment))
     ;; Record modified time of gpg-agent socket to restore the Emacs
     ;; frame on text terminal in `epg-wait-for-completion'.
     ;; See
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index a860951..460accd 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -1,4 +1,3 @@
-
 ;; erc.el --- An Emacs Internet Relay Chat client  -*- lexical-binding:t -*-
 
 ;; Copyright (C) 1997-2015 Free Software Foundation, Inc.
@@ -3260,7 +3259,7 @@ The lines are shown in a buffer named `*Occur*'.
 It serves as a menu to find any of the occurrences in this buffer.
 \\[describe-mode] in that buffer will explain how.
 
-If LINE contains upper case characters (excluding those preceded by `\'),
+If LINE contains upper case characters (excluding those preceded by ‘\\’),
 the matching is case-sensitive."
   (occur line)
   t)
@@ -4185,7 +4184,7 @@ See also `erc-display-error-notice'."
                                    ;; server's setting if we haven't
                                    ;; established a connection yet
                                    (- 9 (length erc-nick-uniquifier))))
-                               erc-nick-uniqifier)))
+                               erc-nick-uniquifier)))
       (erc-cmd-NICK newnick)
       (erc-display-error-notice
        nil
diff --git a/lisp/face-remap.el b/lisp/face-remap.el
index 93eec5b..3a8aba5 100644
--- a/lisp/face-remap.el
+++ b/lisp/face-remap.el
@@ -330,7 +330,7 @@ a top-level keymap, `text-scale-increase' or
               ((or ?+ ?=) inc)
               (?- (- inc))
               (?0 0)
-              (t inc))))
+              (_ inc))))
       (text-scale-increase step)
       ;; (unless (zerop step)
       (message "Use +,-,0 for further adjustment")
diff --git a/lisp/faces.el b/lisp/faces.el
index 4366c0b..511b354 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -753,7 +753,7 @@ is specified, `:italic' is ignored."
   (setq args (purecopy args))
   (let ((where (if (null frame) 0 frame))
        (spec args)
-       family foundry)
+       family foundry orig-family orig-foundry)
     ;; If we set the new-frame defaults, this face is modified outside Custom.
     (if (memq where '(0 t))
        (put (or (get face 'face-alias) face) 'face-modified t))
@@ -769,9 +769,16 @@ is specified, `:italic' is ignored."
     (when (or family foundry)
       (when (and (stringp family)
                 (string-match "\\([^-]*\\)-\\([^-]*\\)" family))
+        (setq orig-foundry foundry
+              orig-family family)
        (unless foundry
          (setq foundry (match-string 1 family)))
-       (setq family (match-string 2 family)))
+       (setq family (match-string 2 family))
+        ;; Reject bogus "families" that are all-digits -- those are some
+        ;; weird font names, like Foobar-12, that end in a number.
+        (when (string-match "\\`[0-9]*\\'" family)
+          (setq family orig-family)
+          (setq foundry orig-foundry)))
       (when (or (stringp family) (eq family 'unspecified))
        (internal-set-lisp-face-attribute face :family (purecopy family)
                                          where))
@@ -1428,10 +1435,12 @@ 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 (substitute-command-keys
+                              "\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 (substitute-command-keys
+                                          "  This face is obsolete%s; use ‘%s’ 
instead.\n")
                                         (if (stringp obsolete)
                                             (format " since %s" obsolete)
                                           "")
@@ -1449,12 +1458,13 @@ 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 (substitute-command-keys "Defined in ‘"))
                  (princ (file-name-nondirectory file-name))
-                 (princ "’")
+                 (princ (substitute-command-keys "’"))
                  ;; Make a hyperlink to the library.
                  (save-excursion
-                   (re-search-backward "‘\\([^‘’]+\\)’" nil t)
+                   (re-search-backward
+                     (substitute-command-keys "‘\\([^‘’]+\\)’") nil t)
                    (help-xref-button 1 'help-face-def f file-name))
                  (princ ".")
                  (terpri)
@@ -2496,7 +2506,7 @@ is used for the inner part while the first pixel 
line/column is
 drawn with the `window-divider-first-pixel' face and the last
 pixel line/column with the `window-divider-last-pixel' face."
   :version "24.4"
-  :group 'frames
+  :group 'window-divider
   :group 'basic-faces)
 
 (defface window-divider-first-pixel
@@ -2507,7 +2517,7 @@ line/column is drawn with the foreground of this face.  
If you do
 not want to accentuate the first pixel line/column, set this to
 the same as `window-divider' face."
   :version "24.4"
-  :group 'frames
+  :group 'window-divider
   :group 'basic-faces)
 
 (defface window-divider-last-pixel
@@ -2518,7 +2528,7 @@ line/column is drawn with the foreground of this face.  
If you do
 not want to accentuate the last pixel line/column, set this to
 the same as `window-divider' face."
   :version "24.4"
-  :group 'frames
+  :group 'window-divider
   :group 'basic-faces)
 
 (defface minibuffer-prompt
diff --git a/lisp/ffap.el b/lisp/ffap.el
index d78fd4c..81cba07 100644
--- a/lisp/ffap.el
+++ b/lisp/ffap.el
@@ -1086,16 +1086,25 @@ Assumes the buffer has not changed."
 (declare-function w3-view-this-url "ext:w3" (&optional no-show))
 
 (defun ffap-url-at-point ()
-  "Return URL from around point if it exists, or nil."
+  "Return URL from around point if it exists, or nil.
+
+Sets the variable `ffap-string-at-point-region' to the bounds of URL, if any."
   (when ffap-url-regexp
     (or (and (eq major-mode 'w3-mode) ; In a w3 buffer button?
             (w3-view-this-url t))
        (let ((thing-at-point-beginning-of-url-regexp ffap-url-regexp)
-             (thing-at-point-default-mail-uri-scheme ffap-foo-at-bar-prefix))
-         (thing-at-point-url-at-point ffap-lax-url
-                                      (if (use-region-p)
-                                          (cons (region-beginning)
-                                                (region-end))))))))
+             (thing-at-point-default-mail-uri-scheme ffap-foo-at-bar-prefix)
+              val)
+         (setq val (thing-at-point-url-at-point ffap-lax-url
+                                                 (if (use-region-p)
+                                                     (cons (region-beginning)
+                                                           (region-end)))))
+          (if val
+              (let ((bounds (thing-at-point-bounds-of-url-at-point
+                             ffap-lax-url)))
+                (setq ffap-string-at-point-region
+                      (list (car bounds) (cdr bounds)))))
+          val))))
 
 (defvar ffap-gopher-regexp
   "^.*\\<\\(Type\\|Name\\|Path\\|Host\\|Port\\) *= *\\(.*\\) *$"
@@ -1103,7 +1112,9 @@ Assumes the buffer has not changed."
 The two subexpressions are the KEY and VALUE.")
 
 (defun ffap-gopher-at-point ()
-  "If point is inside a gopher bookmark block, return its URL."
+  "If point is inside a gopher bookmark block, return its URL.
+
+Sets the variable `ffap-string-at-point-region' to the bounds of URL, if any."
   ;; `gopher-parse-bookmark' from gopher.el is not so robust
   (save-excursion
     (beginning-of-line)
@@ -1112,6 +1123,7 @@ The two subexpressions are the KEY and VALUE.")
          (while (and (looking-at ffap-gopher-regexp) (not (bobp)))
            (forward-line -1))
          (or (looking-at ffap-gopher-regexp) (forward-line 1))
+          (setq ffap-string-at-point-region (list (point) (point)))
          (let ((type "1") path host (port "70"))
            (while (looking-at ffap-gopher-regexp)
              (let ((var (intern
@@ -1122,6 +1134,7 @@ The two subexpressions are the KEY and VALUE.")
                                           (match-end 2))))
                (set var val)
                (forward-line 1)))
+            (setcdr ffap-string-at-point-region (point))
            (if (and path (string-match "^ftp:.*@" path))
                (concat "ftp://";
                        (substring path 4 (1- (match-end 0)))
diff --git a/lisp/files-x.el b/lisp/files-x.el
index 248c307..a130ffc 100644
--- a/lisp/files-x.el
+++ b/lisp/files-x.el
@@ -247,7 +247,14 @@ then this function adds the first line containing the 
string
 `Local Variables:' and the last line containing the string `End:'."
   (interactive
    (let ((variable (read-file-local-variable "Add file-local variable")))
+     ;; Error before reading value.
+     (if (equal variable 'lexical-binding)
+        (user-error "The `%s' variable must be set at the start of the file"
+                    variable))
      (list variable (read-file-local-variable-value variable) t)))
+  (if (equal variable 'lexical-binding)
+      (user-error "The `%s' variable must be set at the start of the file"
+                  variable))
   (modify-file-local-variable variable value 'add-or-replace interactive))
 
 ;;;###autoload
diff --git a/lisp/files.el b/lisp/files.el
index 6939f2b..a371344 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -1640,7 +1640,9 @@ killed."
   (unless (run-hook-with-args-until-failure 'kill-buffer-query-functions)
     (user-error "Aborted"))
   (and (buffer-modified-p) buffer-file-name
-       (not (yes-or-no-p "Kill and replace the buffer without saving it? "))
+       (not (yes-or-no-p
+             (format "Kill and replace buffer `%s' without saving it? "
+                     (buffer-name))))
        (user-error "Aborted"))
   (let ((obuf (current-buffer))
        (ofile buffer-file-name)
@@ -2610,7 +2612,7 @@ and `magic-mode-alist', which determines modes based on 
file contents.")
   "Alist mapping interpreter names to major modes.
 This is used for files whose first lines match `auto-mode-interpreter-regexp'.
 Each element looks like (REGEXP . MODE).
-If \\\\`REGEXP\\\\' matches the name (minus any directory part) of
+If REGEXP matches the entire name (minus any directory part) of
 the interpreter specified in the first line of a script, enable
 major mode MODE.
 
@@ -4844,9 +4846,9 @@ Before and after saving the buffer, this function runs
                    (file-exists-p buffer-file-name)
                    (> (file-nlinks buffer-file-name) 1)
                    (or dir-writable
-                       (error (concat (format
-                                       "Directory %s write-protected; " dir)
-                                      "cannot break hardlink when saving")))))
+                       (error (concat "Directory %s write-protected; "
+                                      "cannot break hardlink when saving")
+                              dir))))
          ;; Write temp name, then rename it.
          ;; This requires write access to the containing dir,
          ;; which is why we don't try it if we don't have that access.
@@ -5277,7 +5279,12 @@ Return nil if DIR is not an existing directory."
              dir  (file-truename dir))
        (let ((ls1 (split-string file "/" t))
              (ls2 (split-string dir  "/" t))
-             (root (if (string-match "\\`/" file) "/" ""))
+             (root
+               (cond
+                ;; A UNC on Windows systems, or a "super-root" on Apollo.
+                ((string-match "\\`//" file) "//")
+                ((string-match "\\`/" file) "/")
+                (t "")))
              (mismatch nil))
          (while (and ls1 ls2 (not mismatch))
            (if (string-equal (car ls1) (car ls2))
@@ -5417,6 +5424,7 @@ This function only handles buffers that are visiting 
files.
 Non-file buffers need a custom function"
   (and buffer-file-name
        (file-readable-p buffer-file-name)
+       (not (buffer-modified-p (current-buffer)))
        (not (verify-visited-file-modtime (current-buffer)))))
 
 (defvar buffer-stale-function #'buffer-stale--default-function
diff --git a/lisp/finder.el b/lisp/finder.el
index 306f2e2..715dd94 100644
--- a/lisp/finder.el
+++ b/lisp/finder.el
@@ -114,10 +114,6 @@ Each element has the form (KEYWORD . DESCRIPTION).")
     st)
   "Syntax table used while in `finder-mode'.")
 
-(defvar finder-font-lock-keywords
-  '(("[`‘]\\([^'`‘’]+\\)['’]" 1 font-lock-constant-face prepend))
-  "Font-lock keywords for Finder mode.")
-
 (defvar finder-headmark nil
   "Internal Finder mode variable, local in Finder buffer.")
 
@@ -197,7 +193,7 @@ from; the default is `load-path'."
        summary keywords package version entry desc)
     (dolist (d (or dirs load-path))
       (when (file-exists-p (directory-file-name d))
-       (message "Directory %s" d)
+       (message "Scanning %s for finder" d)
        (setq package-override
              (intern-soft
               (cdr-safe
diff --git a/lisp/frame.el b/lisp/frame.el
index 077687e..1177a00 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -1749,6 +1749,122 @@ left untouched.  FRAME nil or omitted means use the 
selected frame."
     'delete-frame-functions "22.1")
 
 
+;;; Window dividers.
+(defgroup window-divider nil
+  "Window dividers."
+  :version "25.1"
+  :group 'frames
+  :group 'windows)
+
+(defcustom window-divider-default-places 'right-only
+  "Default positions of window dividers.
+Possible values are `bottom-only' (dividers on the bottom of each
+window only), `right-only' (dividers on the right of each window
+only), and t (dividers on the bottom and on the right of each
+window).  The default is `right-only'.
+
+The value takes effect if and only if dividers are enabled by
+`window-divider-mode'.
+
+To position dividers on frames individually, use the frame
+parameters `bottom-divider-width' and `right-divider-width'."
+  :type '(choice (const :tag "Bottom only" bottom-only)
+                (const :tag "Right only" right-only)
+                (const :tag "Bottom and right" t))
+  :initialize 'custom-initialize-default
+  :set (lambda (symbol value)
+        (set-default symbol value)
+         (when window-divider-mode
+           (window-divider-mode-apply t)))
+  :version "25.1")
+
+(defun window-divider-width-valid-p (value)
+  "Return non-nil if VALUE is a positive number."
+  (and (numberp value) (> value 0)))
+
+(defcustom window-divider-default-bottom-width 6
+  "Default width of dividers on bottom of windows.
+The value must be a positive integer and takes effect when bottom
+dividers are displayed by `window-divider-mode'.
+
+To adjust bottom dividers for frames individually, use the frame
+parameter `bottom-divider-width'."
+  :type '(restricted-sexp
+          :tag "Default width of bottom dividers"
+          :match-alternatives (frame-window-divider-width-valid-p))
+  :initialize 'custom-initialize-default
+  :set (lambda (symbol value)
+        (set-default symbol value)
+         (when window-divider-mode
+           (window-divider-mode-apply t)))
+  :version "25.1")
+
+(defcustom window-divider-default-right-width 6
+  "Default width of dividers on the right of windows.
+The value must be a positive integer and takes effect when right
+dividers are displayed by `window-divider-mode'.
+
+To adjust right dividers for frames individually, use the frame
+parameter `right-divider-width'."
+  :type '(restricted-sexp
+          :tag "Default width of right dividers"
+          :match-alternatives (frame-window-divider-width-valid-p))
+  :initialize 'custom-initialize-default
+  :set (lambda (symbol value)
+        (set-default symbol value)
+         (when window-divider-mode
+          (window-divider-mode-apply t)))
+  :version "25.1")
+
+(defun window-divider-mode-apply (enable)
+  "Apply window divider places and widths to all frames.
+If ENABLE is nil, apply default places and widths.  Else reset
+all divider widths to zero."
+  (let ((bottom (if (and enable
+                         (memq window-divider-default-places
+                               '(bottom-only t)))
+                    window-divider-default-bottom-width
+                  0))
+        (right (if (and enable
+                        (memq window-divider-default-places
+                              '(right-only t)))
+                   window-divider-default-right-width
+                 0)))
+    (modify-all-frames-parameters
+     (list (cons 'bottom-divider-width bottom)
+           (cons 'right-divider-width right)))
+    (setq default-frame-alist
+          (assq-delete-all
+           'bottom-divider-width default-frame-alist))
+    (setq default-frame-alist
+          (assq-delete-all
+           'right-divider-width default-frame-alist))
+    (when (> bottom 0)
+      (setq default-frame-alist
+            (cons
+             (cons 'bottom-divider-width bottom)
+             default-frame-alist)))
+    (when (> right 0)
+      (setq default-frame-alist
+            (cons
+             (cons 'right-divider-width right)
+             default-frame-alist)))))
+
+(define-minor-mode window-divider-mode
+  "Display dividers between windows (Window Divider mode).
+With a prefix argument ARG, enable Window Divider mode if ARG is
+positive, and disable it otherwise.  If called from Lisp, enable
+the mode if ARG is omitted or nil.
+
+The option `window-divider-default-places' specifies on which
+side of a window dividers are displayed.  The options
+`window-divider-default-bottom-width' and
+`window-divider-default-right-width' specify their respective
+widths."
+  :group 'window-divider
+  :global t
+  (window-divider-mode-apply window-divider-mode))
+
 ;; Blinking cursor
 
 (defgroup cursor nil
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index 0ac9fb5..d83eadd 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/gnus-group.el b/lisp/gnus/gnus-group.el
index dbeada2..c6cc38f 100644
--- a/lisp/gnus/gnus-group.el
+++ b/lisp/gnus/gnus-group.el
@@ -1814,7 +1814,9 @@ already.  If INFO-UNCHANGED is non-nil, dribble buffer is 
not updated."
   "Get the name of the newsgroup on the current line."
   (let ((group (get-text-property (point-at-bol) 'gnus-group)))
     (when group
-      (symbol-name group))))
+      (if (stringp group)
+         group
+       (symbol-name group)))))
 
 (defun gnus-group-group-level ()
   "Get the level of the newsgroup on the current line."
diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el
index f73f216..0cb5960 100644
--- a/lisp/gnus/gnus-registry.el
+++ b/lisp/gnus/gnus-registry.el
@@ -881,7 +881,7 @@ FUNCTION should take two parameters, a mark symbol and the 
cell value."
 
 ;; FIXME: Why not merge gnus-registry--set/remove-mark and
 ;; gnus-registry-set-article-mark-internal?
-(defun gnus-registry--set/remove-mark (remove mark articles)
+(defun gnus-registry--set/remove-mark (mark remove articles)
   "Set/remove the MARK over process-marked ARTICLES."
   ;; If this is called and the user doesn't want the
   ;; registry enabled, we'll ask anyhow.
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el
index 208fd07..161a6b4 100644
--- a/lisp/gnus/nnimap.el
+++ b/lisp/gnus/nnimap.el
@@ -182,7 +182,7 @@ textual parts.")
          params)
     (format "%s" (nreverse params))))
 
-(deffoo nnimap-retrieve-headers (articles &optional group server fetch-old)
+(deffoo nnimap-retrieve-headers (articles &optional group server _fetch-old)
   (when group
     (setq group (nnimap-decode-gnus-group group)))
   (with-current-buffer nntp-server-buffer
@@ -235,6 +235,7 @@ textual parts.")
                                      t)
                   (match-string 1)))
        (setq lines nil)
+       (beginning-of-line)
        (setq size
              (and (re-search-forward "RFC822.SIZE \\([0-9]+\\)"
                                      (line-end-position)
@@ -330,6 +331,8 @@ textual parts.")
     (push (current-buffer) nnimap-process-buffers)
     (current-buffer)))
 
+(defvar auth-source-creation-prompts)
+
 (defun nnimap-credentials (address ports user)
   (let* ((auth-source-creation-prompts
           '((user  . "IMAP user at %h: ")
@@ -423,6 +426,7 @@ textual parts.")
               :return-list t
               :shell-command nnimap-shell-program
               :capability-command "1 CAPABILITY\r\n"
+               :always-query-capabilities t
               :end-of-command "\r\n"
               :success " OK "
               :starttls-function
@@ -584,7 +588,7 @@ textual parts.")
        (gnus-buffer-live-p nntp-server-buffer)
        (nnimap-find-connection nntp-server-buffer)))
 
-(deffoo nnimap-status-message (&optional server)
+(deffoo nnimap-status-message (&optional _server)
   nnimap-status-string)
 
 (deffoo nnimap-request-article (article &optional group server to-buffer)
@@ -803,7 +807,7 @@ textual parts.")
                     nil
                   group)
                 server))
-       articles active marks high low)
+       active)
     (with-current-buffer nntp-server-buffer
       (when result
        (when (or (not dont-check)
@@ -857,13 +861,13 @@ textual parts.")
          "211 %d %d %d %S\n" (1+ (- high low)) low high group))
        t))))
 
-(deffoo nnimap-request-create-group (group &optional server args)
+(deffoo nnimap-request-create-group (group &optional server _args)
   (setq group (nnimap-decode-gnus-group group))
   (when (nnimap-change-group nil server)
     (with-current-buffer (nnimap-buffer)
       (car (nnimap-command "CREATE %S" (utf7-encode group t))))))
 
-(deffoo nnimap-request-delete-group (group &optional force server)
+(deffoo nnimap-request-delete-group (group &optional _force server)
   (setq group (nnimap-decode-gnus-group group))
   (when (nnimap-change-group nil server)
     (with-current-buffer (nnimap-buffer)
@@ -908,11 +912,11 @@ textual parts.")
              articles)))
     (nreverse articles)))
 
-(deffoo nnimap-close-group (group &optional server)
+(deffoo nnimap-close-group (_group &optional _server)
   t)
 
 (deffoo nnimap-request-move-article (article group server accept-form
-                                            &optional last internal-move-group)
+                                            &optional _last 
internal-move-group)
   (setq group (nnimap-decode-gnus-group group))
   (when internal-move-group
     (setq internal-move-group (nnimap-decode-gnus-group internal-move-group)))
@@ -1143,7 +1147,7 @@ If LIMIT, first try to limit the search to the N last 
articles."
        (when sequence
          (nnimap-wait-for-response sequence))))))
 
-(deffoo nnimap-request-accept-article (group &optional server last)
+(deffoo nnimap-request-accept-article (group &optional server _last)
   (unless group
     ;; We're respooling.  Find out where mail splitting would place
     ;; this article.
@@ -1261,7 +1265,7 @@ If LIMIT, first try to limit the search to the N last 
articles."
     (goto-char (point-min))
     (while (search-forward "* LIST " nil t)
       (let ((flags (read (current-buffer)))
-           (separator (read (current-buffer)))
+           (_separator (read (current-buffer)))
            (group (buffer-substring-no-properties
                    (progn (skip-chars-forward " \"")
                           (point))
@@ -1271,7 +1275,8 @@ If LIMIT, first try to limit the search to the N last 
articles."
        (unless (member '%NoSelect flags)
          (push (utf7-decode (if (stringp group)
                                 group
-                              (format "%s" group)) t)
+                              (format "%s" group))
+                             t)
                groups))))
     (nreverse groups)))
 
@@ -1331,7 +1336,7 @@ If LIMIT, first try to limit the search to the N last 
articles."
                                    (or highest exists)))))))))
          t)))))
 
-(deffoo nnimap-request-newgroups (date &optional server)
+(deffoo nnimap-request-newgroups (_date &optional server)
   (when (nnimap-change-group nil server)
     (with-current-buffer nntp-server-buffer
       (erase-buffer)
@@ -1350,7 +1355,7 @@ If LIMIT, first try to limit the search to the N last 
articles."
       (setf (nnimap-group nnimap-object) nil)
       (setf (nnimap-initial-resync nnimap-object) 0)
       (let ((qresyncp (nnimap-capability "QRESYNC"))
-           params groups sequences active uidvalidity modseq group
+           params sequences active uidvalidity modseq group
            unexist)
        ;; Go through the infos and gather the data needed to know
        ;; what and how to request the data.
@@ -1664,7 +1669,7 @@ If LIMIT, first try to limit the search to the N last 
articles."
       (push (list group info active) nnimap-current-infos))))
 
 (defun nnimap-flags-to-marks (groups)
-  (let (data group totalp uidnext articles start-article mark permanent-flags
+  (let (data group uidnext articles start-article mark permanent-flags
             uidvalidity vanished highestmodseq)
     (dolist (elem groups)
       (setq group (car elem)
@@ -1755,7 +1760,7 @@ If LIMIT, first try to limit the search to the N last 
articles."
            (setq start (point))
            (goto-char end))
          (while (re-search-forward "^\\* [0-9]+ FETCH " start t)
-           (let ((p (point)))
+           (progn
              (setq elems (read (current-buffer)))
              (push (cons (cadr (memq 'UID elems))
                          (cadr (memq 'FLAGS elems)))
@@ -1773,7 +1778,7 @@ If LIMIT, first try to limit the search to the N last 
articles."
 (defun nnimap-find-process-buffer (buffer)
   (cadr (assoc buffer nnimap-connection-alist)))
 
-(deffoo nnimap-request-post (&optional server)
+(deffoo nnimap-request-post (&optional _server)
   (setq nnimap-status-string "Read-only server")
   nil)
 
@@ -2175,10 +2180,10 @@ Return the server's response to the SELECT or EXAMINE 
command."
          (forward-char (1+ bytes))
          (delete-region (line-beginning-position) (line-end-position)))))))
 
-(defun nnimap-dummy-active-number (group &optional server)
+(defun nnimap-dummy-active-number (_group &optional _server)
   1)
 
-(defun nnimap-save-mail-spec (group-art &optional server full-nov)
+(defun nnimap-save-mail-spec (group-art &optional _server _full-nov)
   (let (article)
     (goto-char (point-min))
     (if (not (re-search-forward "X-nnimap-article: \\([0-9]+\\)" nil t))
diff --git a/lisp/gnus/nnmaildir.el b/lisp/gnus/nnmaildir.el
index da3d546..097d4f8 100644
--- a/lisp/gnus/nnmaildir.el
+++ b/lisp/gnus/nnmaildir.el
@@ -333,29 +333,24 @@ by nnmaildir-request-article.")
 ;; given group, if non-nil, be the current group of the current server.  Then
 ;; return the group object for the current group.
 (defun nnmaildir--prepare (server group)
-  (let (x groups)
-    (catch 'return
-      (if (null server)
-         (unless (setq server nnmaildir--cur-server)
-           (throw 'return nil))
-       (unless (setq server (intern-soft server nnmaildir--servers))
+  (catch 'return
+    (if (null server)
+       (unless (setq server nnmaildir--cur-server)
          (throw 'return nil))
-       (setq server (symbol-value server)
-             nnmaildir--cur-server server))
-      (unless (setq groups (nnmaildir--srv-groups server))
+      (unless (setq server (intern-soft server nnmaildir--servers))
        (throw 'return nil))
-      (unless (nnmaildir--srv-method server)
-       (setq x (concat "nnmaildir:" (nnmaildir--srv-address server))
-             x (gnus-server-to-method x))
-       (unless x (throw 'return nil))
-       (setf (nnmaildir--srv-method server) x))
-      (if (null group)
-         (unless (setq group (nnmaildir--srv-curgrp server))
-           (throw 'return nil))
-       (unless (setq group (intern-soft group groups))
-         (throw 'return nil))
-       (setq group (symbol-value group)))
-      group)))
+      (setq server (symbol-value server)
+           nnmaildir--cur-server server))
+    (let ((groups (nnmaildir--srv-groups server)))
+      (when groups
+       (unless (nnmaildir--srv-method server)
+         (setf (nnmaildir--srv-method server)
+               (or (gnus-server-to-method
+                    (concat "nnmaildir:" (nnmaildir--srv-address server)))
+                   (throw 'return nil))))
+       (if (null group)
+           (nnmaildir--srv-curgrp server)
+         (symbol-value (intern-soft group groups)))))))
 
 (defun nnmaildir--tab-to-space (string)
   (let ((pos 0))
@@ -428,7 +423,7 @@ by nnmaildir-request-article.")
        (srv-dir (nnmaildir--srv-dir server))
        (storage-version 1) ;; [version article-number msgid [...nov...]]
        dir gname pgname msgdir prefix suffix file attr mtime novdir novfile
-       nov msgid nov-beg nov-mid nov-end field val old-extra num numdir
+       nov msgid nov-beg nov-mid nov-end field val old-extra num
        deactivate-mark)
     (catch 'return
       (setq gname (nnmaildir--grp-name group)
@@ -668,7 +663,7 @@ by nnmaildir-request-article.")
     "/" "\\057" 'literal)
    ":" "\\072" 'literal))
 
-(defun nnmaildir-request-type (group &optional article)
+(defun nnmaildir-request-type (_group &optional _article)
   'mail)
 
 (defun nnmaildir-status-message (&optional server)
@@ -768,7 +763,7 @@ by nnmaildir-request-article.")
     (if (> (aref a 1) (aref b 1)) (throw 'return nil))
     (string-lessp (aref a 2) (aref b 2))))
 
-(defun nnmaildir--scan (gname scan-msgs groups method srv-dir srv-ls)
+(defun nnmaildir--scan (gname scan-msgs groups _method srv-dir srv-ls)
   (catch 'return
     (let ((36h-ago (- (car (current-time)) 2))
          absdir nndir tdir ndir cdir nattr cattr isnew pgname read-only ls
@@ -883,6 +878,10 @@ by nnmaildir-request-article.")
        (setf (nnmaildir--grp-cur group) cattr)))
     t))
 
+(defvar nnmaildir-get-new-mail)
+(defvar nnmaildir-group-alist)
+(defvar nnmaildir-active-file)
+
 (defun nnmaildir-request-scan (&optional scan-group server)
   (let ((coding-system-for-write nnheader-file-coding-system)
        (buffer-file-coding-system nil)
@@ -890,7 +889,7 @@ by nnmaildir-request-article.")
        (nnmaildir-get-new-mail t)
        (nnmaildir-group-alist nil)
        (nnmaildir-active-file nil)
-       x srv-ls srv-dir method groups target-prefix group dirs grp-dir seen
+       x srv-ls srv-dir method groups target-prefix dirs seen
        deactivate-mark)
     (nnmaildir--prepare server nil)
     (setq srv-ls (nnmaildir--srv-ls nnmaildir--cur-server)
@@ -966,7 +965,7 @@ by nnmaildir-request-article.")
                (nnmaildir--srv-groups nnmaildir--cur-server))))
   t)
 
-(defun nnmaildir-request-newgroups (date &optional server)
+(defun nnmaildir-request-newgroups (_date &optional server)
   (nnmaildir-request-list server))
 
 (defun nnmaildir-retrieve-groups (groups &optional server)
@@ -995,9 +994,9 @@ by nnmaildir-request-article.")
                  (nnmaildir--srvgrp-dir
                   (nnmaildir--srv-dir nnmaildir--cur-server) gname)))
         (curdir-mtime (nth 5 (file-attributes curdir)))
-        pgname flist always-marks never-marks old-marks dotfile num dir
-        all-marks marks mark ranges markdir read end new-marks ls
-        old-mmth new-mmth mtime mark-sym existing missing deactivate-mark)
+        pgname flist always-marks never-marks old-marks dir
+        all-marks marks ranges markdir read ls
+        old-mmth new-mmth mtime existing missing deactivate-mark)
     (catch 'return
       (unless group
        (setf (nnmaildir--srv-error nnmaildir--cur-server)
@@ -1096,7 +1095,7 @@ by nnmaildir-request-article.")
       (setf (nnmaildir--grp-mmth group) new-mmth)
       info)))
 
-(defun nnmaildir-request-group (gname &optional server fast info)
+(defun nnmaildir-request-group (gname &optional server fast _info)
   (let ((group (nnmaildir--prepare server gname))
        deactivate-mark)
     (catch 'return
@@ -1119,7 +1118,7 @@ by nnmaildir-request-article.")
        (insert " " (gnus-replace-in-string gname " " "\\ " t) "\n")
        t))))
 
-(defun nnmaildir-request-create-group (gname &optional server args)
+(defun nnmaildir-request-create-group (gname &optional server _args)
   (nnmaildir--prepare server nil)
   (catch 'return
     (let ((target-prefix (nnmaildir--srv-target-prefix nnmaildir--cur-server))
@@ -1265,7 +1264,7 @@ by nnmaildir-request-article.")
 
 (defun nnmaildir-retrieve-headers (articles &optional gname server fetch-old)
   (let ((group (nnmaildir--prepare server gname))
-       srv-dir dir nlist mlist article num start stop nov nlist2 insert-nov
+       nlist mlist article num start stop nov insert-nov
        deactivate-mark)
     (setq insert-nov
          (lambda (article)
@@ -1290,9 +1289,7 @@ by nnmaildir-request-article.")
        (erase-buffer)
        (setq mlist (nnmaildir--grp-mlist group)
              nlist (nnmaildir--grp-nlist group)
-             gname (nnmaildir--grp-name group)
-             srv-dir (nnmaildir--srv-dir nnmaildir--cur-server)
-             dir (nnmaildir--srvgrp-dir srv-dir gname))
+             gname (nnmaildir--grp-name group))
        (cond
         ((null nlist))
         ((and fetch-old (not (numberp fetch-old)))
@@ -1363,7 +1360,7 @@ by nnmaildir-request-article.")
        (nnheader-insert-file-contents nnmaildir-article-file-name))
       (cons gname num-msgid))))
 
-(defun nnmaildir-request-post (&optional server)
+(defun nnmaildir-request-post (&optional _server)
   (let (message-required-mail-headers)
     (funcall message-send-mail-function)))
 
@@ -1405,7 +1402,7 @@ by nnmaildir-request-article.")
       t)))
 
 (defun nnmaildir-request-move-article (article gname server accept-form
-                                              &optional last move-is-internal)
+                                      &optional _last _move-is-internal)
   (let ((group (nnmaildir--prepare server gname))
        pgname suffix result nnmaildir--file deactivate-mark)
     (catch 'return
@@ -1442,7 +1439,7 @@ by nnmaildir-request-article.")
        (nnmaildir--expired-article group article))
       result)))
 
-(defun nnmaildir-request-accept-article (gname &optional server last)
+(defun nnmaildir-request-accept-article (gname &optional server _last)
   (let ((group (nnmaildir--prepare server gname))
        (coding-system-for-write nnheader-file-coding-system)
        (buffer-file-coding-system nil)
@@ -1546,7 +1543,7 @@ by nnmaildir-request-article.")
                    ga))
             group-art)))))
 
-(defun nnmaildir-active-number (gname)
+(defun nnmaildir-active-number (_gname)
   0)
 
 (declare-function gnus-group-mark-article-read "gnus-group" (group article))
@@ -1554,8 +1551,8 @@ by nnmaildir-request-article.")
 (defun nnmaildir-request-expire-articles (ranges &optional gname server force)
   (let ((no-force (not force))
        (group (nnmaildir--prepare server gname))
-       pgname time boundary bound-iter high low target dir nlist nlist2
-       stop article didnt nnmaildir--file nnmaildir-article-file-name
+       pgname time boundary bound-iter high low target dir nlist
+       didnt nnmaildir--file nnmaildir-article-file-name
        deactivate-mark)
     (catch 'return
       (unless group
@@ -1637,6 +1634,8 @@ by nnmaildir-request-article.")
        (erase-buffer))
       didnt)))
 
+(defvar nnmaildir--article)
+
 (defun nnmaildir-request-set-mark (gname actions &optional server)
   (let* ((group (nnmaildir--prepare server gname))
         (curdir (nnmaildir--cur
@@ -1646,27 +1645,30 @@ by nnmaildir-request-article.")
         (coding-system-for-write nnheader-file-coding-system)
         (buffer-file-coding-system nil)
         (file-coding-system-alist nil)
-        del-mark del-action add-action set-action marksdir nlist
-        ranges begin end article all-marks todo-marks mdir mfile
-        pgname ls permarkfile deactivate-mark)
-    (setq del-mark
+        marksdir nlist
+        ranges all-marks todo-marks mdir mfile
+        pgname ls permarkfile deactivate-mark
+        (del-mark
          (lambda (mark)
-           (let ((prefix (nnmaildir--art-prefix article))
-                 (suffix (nnmaildir--art-suffix article))
+           (let ((prefix (nnmaildir--art-prefix nnmaildir--article))
+                 (suffix (nnmaildir--art-suffix nnmaildir--article))
                  (flag (nnmaildir--mark-to-flag mark)))
              (when flag
                ;; If this mark corresponds to a flag, remove the flag from
                ;; the file name.
                (nnmaildir--article-set-flags
-                article (nnmaildir--remove-flag flag suffix) curdir))
+                nnmaildir--article (nnmaildir--remove-flag flag suffix)
+                curdir))
              ;; We still want to delete the hardlink in the marks dir if
              ;; present, regardless of whether this mark has a maildir flag or
              ;; not, to avoid getting out of sync.
              (setq mfile (nnmaildir--subdir marksdir (symbol-name mark))
                    mfile (concat mfile prefix))
-             (nnmaildir--unlink mfile)))
-         del-action (lambda (article) (mapcar del-mark todo-marks))
-         add-action
+             (nnmaildir--unlink mfile))))
+        (del-action (lambda (article)
+                      (let ((nnmaildir--article article))
+                        (mapcar del-mark todo-marks))))
+        (add-action
          (lambda (article)
            (mapcar
             (lambda (mark)
@@ -1695,13 +1697,14 @@ by nnmaildir-request-article.")
                         (rename-file permarkfilenew permarkfile 'replace)
                         (add-name-to-file permarkfile mfile)))
                      (t (signal (car err) (cdr err))))))))
-            todo-marks))
-         set-action (lambda (article)
+            todo-marks)))
+        (set-action (lambda (article)
                       (funcall add-action article)
-                      (mapcar (lambda (mark)
-                                (unless (memq mark todo-marks)
-                                  (funcall del-mark mark)))
-                              all-marks)))
+                      (let ((nnmaildir--article article))
+                        (mapcar (lambda (mark)
+                                  (unless (memq mark todo-marks)
+                                    (funcall del-mark mark)))
+                                all-marks)))))
     (catch 'return
       (unless group
        (setf (nnmaildir--srv-error nnmaildir--cur-server)
@@ -1728,7 +1731,7 @@ by nnmaildir-request-article.")
        (setq ranges (car action)
              todo-marks (caddr action))
        (dolist (mark todo-marks)
-         (add-to-list 'all-marks mark))
+         (pushnew mark all-marks :test #'equal))
        (if (numberp (cdr ranges)) (setq ranges (list ranges)))
        (nnmaildir--nlist-iterate nlist ranges
                                  (cond ((eq 'del (cadr action)) del-action)
@@ -1775,6 +1778,8 @@ by nnmaildir-request-article.")
       t)))
 
 (defun nnmaildir-close-server (&optional server)
+  (defvar flist) (defvar ls) (defvar dirs) (defvar dir)
+  (defvar files) (defvar file) (defvar x)
   (let (flist ls dirs dir files file x)
     (nnmaildir--prepare server nil)
     (when nnmaildir--cur-server
diff --git a/lisp/gnus/sieve-mode.el b/lisp/gnus/sieve-mode.el
index c8d4754..ffa50e6 100644
--- a/lisp/gnus/sieve-mode.el
+++ b/lisp/gnus/sieve-mode.el
@@ -140,7 +140,8 @@
           'sieve-action-commands-face)
      ;; test commands
      (cons (regexp-opt '("address" "allof" "anyof" "exists" "false"
-                        "true" "header" "not" "size" "envelope")
+                        "true" "header" "not" "size" "envelope"
+                         "body")
                        'words)
           'sieve-test-commands-face)
      (cons "\\Sw+:\\sw+"
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index 346e1e1..1c7a68a 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -32,6 +32,9 @@
 
 ;;; Code:
 
+(require 'cl-lib)
+(require 'help-mode)
+
 (defvar help-fns-describe-function-functions nil
   "List of functions to run in help buffer in `describe-function'.
 Those functions will be run after the header line and argument
@@ -306,7 +309,9 @@ suitable file is found, return nil."
             (when remapped
               (princ "Its keys are remapped to ")
               (princ (if (symbolp remapped)
-                        (concat "‘" (symbol-name remapped) "’")
+                        (concat (substitute-command-keys "‘")
+                                (symbol-name remapped)
+                                (substitute-command-keys "’"))
                       "an anonymous command"))
               (princ ".\n"))
 
@@ -340,20 +345,22 @@ suitable file is found, return nil."
       (insert "\nThis function has a compiler macro")
       (if (symbolp handler)
           (progn
-            (insert (format " ‘%s’" handler))
+            (insert (format (substitute-command-keys " ‘%s’") handler))
             (save-excursion
-              (re-search-backward "‘\\([^‘’]+\\)’" nil t)
+              (re-search-backward (substitute-command-keys "‘\\([^‘’]+\\)’")
+                                  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 (substitute-command-keys " in ‘%s’") lib))
             (save-excursion
-              (re-search-backward "‘\\([^‘’]+\\)’" nil t)
+              (re-search-backward (substitute-command-keys "‘\\([^‘’]+\\)’")
+                                  nil t)
               (help-xref-button 1 'help-function-cmacro function lib)))))
       (insert ".\n"))))
 
-(defun help-fns--signature (function doc real-def real-function)
+(defun help-fns--signature (function doc real-def real-function raw)
   "Insert usage at point and return docstring.  With highlighting."
   (if (keymapp function)
       doc                       ; If definition is a keymap, skip arglist note.
@@ -365,7 +372,7 @@ suitable file is found, return nil."
       (let* ((use (cond
                    ((and usage (not (listp advertised))) (car usage))
                    ((listp arglist)
-                    (format "%S" (help-make-usage function arglist)))
+                    (help--make-usage-docstring function arglist))
                    ((stringp arglist) arglist)
                    ;; Maybe the arglist is in the docstring of a symbol
                    ;; this one is aliased to.
@@ -379,13 +386,24 @@ suitable file is found, return nil."
                     (car usage))
                    ((or (stringp real-def)
                         (vectorp real-def))
-                    (format "\nMacro: %s" (format-kbd-macro real-def)))
+                    (format "\nMacro: %s"
+                            (help--docstring-quote
+                             (format-kbd-macro real-def))))
                    (t "[Missing arglist.  Please make a bug report.]")))
-             (high (help-highlight-arguments use doc)))
-        (let ((fill-begin (point)))
-          (insert (car high) "\n")
-          (fill-region fill-begin (point)))
-        (cdr high)))))
+             ;; Insert "`X", not "(\` X)", when documenting `X.
+             (use1 (replace-regexp-in-string
+                    "\\`(\\\\=\\\\\\\\=` \\([^\n ]*\\))\\'"
+                    "\\\\=`\\1" use t))
+             (high (if raw
+                       (cons use1 doc)
+                     (help-highlight-arguments (substitute-command-keys use1)
+                                               (substitute-command-keys 
doc)))))
+        (let ((fill-begin (point))
+              (high-usage (car high))
+              (high-doc (cdr high)))
+          (insert high-usage "\n")
+          (fill-region fill-begin (point))
+          high-doc)))))
 
 (defun help-fns--parent-mode (function)
   ;; If this is a derived mode, link to the parent.
@@ -393,13 +411,13 @@ suitable file is found, return nil."
                           (get function
                                'derived-mode-parent))))
     (when parent-mode
-      (insert "\nParent mode: ‘")
+      (insert (substitute-command-keys "\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 (substitute-command-keys "’.\n")))))
 
 (defun help-fns--obsolete (function)
   ;; Ignore lambda constructs, keyboard macros, etc.
@@ -415,7 +433,9 @@ 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 (substitute-command-keys
+                                  ";\nuse ‘%s’ instead.")
+                                 use))
                     (t "."))
               "\n"))))
 
@@ -451,7 +471,8 @@ 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 (substitute-command-keys
+                                   ";\nin Lisp code use ‘%s’ instead.")
                                   interactive-only))
                          (t "."))
                    "\n")))))
@@ -520,7 +541,8 @@ 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 (substitute-command-keys "an alias for ‘%s’")
+                          real-def))
                 ((autoloadp def)
                  (format "%s autoloaded %s"
                          (if (commandp def) "an interactive" "an")
@@ -554,21 +576,24 @@ 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 (substitute-command-keys
+                                       "alias for ‘\\([^‘’]+\\)’")
+                                      nil t)
              (help-xref-button 1 'help-function real-def)))))
 
       (when file-name
-       (princ " in ‘")
+       (princ (substitute-command-keys " 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 (substitute-command-keys "’"))
        ;; Make a hyperlink to the library.
        (with-current-buffer standard-output
          (save-excursion
-           (re-search-backward "‘\\([^‘’]+\\)’" nil t)
+           (re-search-backward (substitute-command-keys "‘\\([^‘’]+\\)’")
+                                nil t)
            (help-xref-button 1 'help-function-def function file-name))))
       (princ ".")
       (with-current-buffer (help-buffer)
@@ -576,23 +601,22 @@ FILE is the file where FUNCTION was probably defined."
                                  (point)))
       (terpri)(terpri)
 
-      (let* ((doc-raw (documentation function t))
-            ;; If the function is autoloaded, and its docstring has
-            ;; key substitution constructs, load the library.
-            (doc (progn
-                   (and (autoloadp real-def) doc-raw
-                        help-enable-auto-load
-                        (string-match "\\([^\\]=\\|[^=]\\|\\`\\)\\\\[[{<]"
-                                      doc-raw)
-                        (autoload-do-load real-def))
-                   (substitute-command-keys doc-raw))))
+      (let ((doc-raw (documentation function t)))
+
+       ;; If the function is autoloaded, and its docstring has
+       ;; key substitution constructs, load the library.
+       (and (autoloadp real-def) doc-raw
+            help-enable-auto-load
+            (string-match "\\([^\\]=\\|[^=]\\|\\`\\)\\\\[[{<]" doc-raw)
+            (autoload-do-load real-def))
 
         (help-fns--key-bindings function)
         (with-current-buffer standard-output
-          (setq doc (help-fns--signature function doc sig-key real-function))
-         (run-hook-with-args 'help-fns-describe-function-functions function)
-          (insert "\n"
-                  (or doc "Not documented.")))))))
+         (let ((doc (help-fns--signature function doc-raw sig-key
+                                          real-function nil)))
+           (run-hook-with-args 'help-fns-describe-function-functions function)
+           (insert "\n"
+                   (or doc "Not documented."))))))))
 
 ;; Add defaults to `help-fns-describe-function-functions'.
 (add-hook 'help-fns-describe-function-functions #'help-fns--obsolete)
@@ -702,14 +726,17 @@ it is displayed along with the global value."
 
              (if file-name
                  (progn
-                   (princ " is a variable defined in ‘")
+                   (princ (substitute-command-keys
+                            " is a variable defined in ‘"))
                    (princ (if (eq file-name 'C-source)
                               "C source code"
                             (file-name-nondirectory file-name)))
-                   (princ "’.\n")
+                   (princ (substitute-command-keys "’.\n"))
                    (with-current-buffer standard-output
                      (save-excursion
-                       (re-search-backward "‘\\([^‘’]+\\)’" nil t)
+                       (re-search-backward (substitute-command-keys
+                                             "‘\\([^‘’]+\\)’")
+                                            nil t)
                        (help-xref-button 1 'help-variable-def
                                          variable file-name)))
                    (if valvoid
@@ -839,7 +866,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"
+                (princ (format (substitute-command-keys
+                                "  This variable is an alias for ‘%s’.\n")
                                alias)))
 
               (when obsolete
@@ -848,7 +876,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."
+                            (use (format (substitute-command-keys
+                                           ";\n  use ‘%s’ instead.")
                                           (car obsolete)))
                             (t ".")))
                 (terpri))
@@ -879,14 +908,15 @@ if it is given a local binding.\n")))
                               ;; Otherwise, assume it was set directly.
                               (setq file (car file)
                                     dir-file nil)))
-                       (princ (if dir-file
-                                  "by the file\n  ‘"
-                                "for the directory\n  ‘"))
+                       (princ (substitute-command-keys
+                                (if dir-file
+                                    "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 (substitute-command-keys "’.\n"))))
                  (princ "  This variable's value is file-local.\n")))
 
              (when (memq variable ignored-local-variables)
@@ -900,8 +930,9 @@ variable.\n"))
                (princ "  This variable may be risky if used as a \
 file-local variable.\n")
                (when (assq variable safe-local-variable-values)
-                 (princ "  However, you have added it to \
-‘safe-local-variable-values’.\n")))
+                 (princ (substitute-command-keys
+                          "  However, you have added it to \
+‘safe-local-variable-values’.\n"))))
 
              (when safe-var
                 (setq extra-line t)
@@ -909,7 +940,8 @@ 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 (substitute-command-keys "‘%s’.\n")
+                                 safe-var))))
 
               (if extra-line (terpri))
              (princ "Documentation:\n")
@@ -939,36 +971,69 @@ file-local variable.\n")
              (buffer-string))))))))
 
 
+(defvar help-xref-stack-item)
+
 ;;;###autoload
-(defun describe-function-or-variable (symbol &optional buffer frame)
-  "Display the full documentation of the function or variable SYMBOL.
-If SYMBOL is a variable and has a buffer-local value in BUFFER or FRAME
-\(default to the current buffer and current frame), it is displayed along
-with the global value."
+(defun describe-symbol (symbol &optional buffer frame)
+  "Display the full documentation of SYMBOL.
+Will show the info of SYMBOL as a function, variable, and/or face."
   (interactive
-   (let* ((v-or-f (variable-at-point))
-          (found (symbolp v-or-f))
+   (let* ((v-or-f (symbol-at-point))
+          (found (cl-some (lambda (x) (funcall (nth 1 x) v-or-f))
+                          describe-symbol-backends))
           (v-or-f (if found v-or-f (function-called-at-point)))
           (found (or found v-or-f))
           (enable-recursive-minibuffers t)
-          val)
-     (setq val (completing-read (if found
+          (val (completing-read (if found
                                    (format
-                                        "Describe function or variable 
(default %s): " v-or-f)
-                                 "Describe function or variable: ")
+                                     "Describe symbol (default %s): " v-or-f)
+                                 "Describe symbol: ")
                                obarray
                                (lambda (vv)
-                                 (or (fboundp vv)
-                                     (get vv 'variable-documentation)
-                                     (and (boundp vv) (not (keywordp vv)))))
+                                  (cl-some (lambda (x) (funcall (nth 1 x) vv))
+                                           describe-symbol-backends))
                                t nil nil
-                               (if found (symbol-name v-or-f))))
+                               (if found (symbol-name v-or-f)))))
      (list (if (equal val "")
               v-or-f (intern val)))))
-  (if (not (symbolp symbol)) (message "You didn't specify a function or 
variable")
-    (unless (buffer-live-p buffer) (setq buffer (current-buffer)))
-    (unless (frame-live-p frame) (setq frame (selected-frame)))
-    (help-xref-interned symbol buffer frame)))
+  (if (not (symbolp symbol))
+      (user-error "You didn't specify a function or variable"))
+  (unless (buffer-live-p buffer) (setq buffer (current-buffer)))
+  (unless (frame-live-p frame) (setq frame (selected-frame)))
+  (with-current-buffer (help-buffer)
+    ;; Push the previous item on the stack before clobbering the output buffer.
+    (help-setup-xref nil nil)
+    (let* ((docs
+            (nreverse
+             (delq nil
+                   (mapcar (pcase-lambda (`(,name ,testfn ,descfn))
+                             (when (funcall testfn symbol)
+                               ;; Don't record the current entry in the stack.
+                               (setq help-xref-stack-item nil)
+                               (cons name
+                                     (funcall descfn symbol buffer frame))))
+                           describe-symbol-backends))))
+           (single (null (cdr docs))))
+      (while (cdr docs)
+        (goto-char (point-min))
+        (let ((inhibit-read-only t)
+              (name (caar docs))        ;Name of doc currently at BOB.
+              (doc (cdr (cadr docs))))  ;Doc to add at BOB.
+          (insert doc)
+          (delete-region (point) (progn (skip-chars-backward " \t\n") (point)))
+          (insert "\n\n"
+                  (eval-when-compile
+                    (propertize "\n" 'face '(:height 0.1 :inverse-video t)))
+                  "\n")
+          (when name
+            (insert (symbol-name symbol)
+                    " is also a " name "." "\n\n")))
+        (setq docs (cdr docs)))
+      (unless single
+        ;; Don't record the `describe-variable' item in the stack.
+        (setq help-xref-stack-item nil)
+        (help-setup-xref (list #'describe-symbol symbol) nil))
+      (goto-char (point-min)))))
 
 ;;;###autoload
 (defun describe-syntax (&optional buffer)
diff --git a/lisp/help-mode.el b/lisp/help-mode.el
index 3fc0ad2..e1fc9fd 100644
--- a/lisp/help-mode.el
+++ b/lisp/help-mode.el
@@ -30,6 +30,7 @@
 ;;; Code:
 
 (require 'button)
+(require 'cl-lib)
 (eval-when-compile (require 'easymenu))
 
 (defvar help-mode-map
@@ -148,7 +149,7 @@ The format is (FUNCTION ARGS...).")
 
 (define-button-type 'help-symbol
   :supertype 'help-xref
-  'help-function #'help-xref-interned
+  'help-function #'describe-symbol
   'help-echo (purecopy "mouse-2, RET: describe this symbol"))
 
 (define-button-type 'help-back
@@ -216,7 +217,8 @@ The format is (FUNCTION ARGS...).")
                         (goto-char (point-min))
                         (if (re-search-forward
                              (format "^[ \t]*(\\(cl-\\)?define-compiler-macro[ 
\t]+%s"
-                                     (regexp-quote (symbol-name fun))) nil t)
+                                     (regexp-quote (symbol-name fun)))
+                              nil t)
                             (forward-line 0)
                           (message "Unable to find location in file")))
                     (message "Unable to find file")))
@@ -322,7 +324,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
@@ -338,11 +340,11 @@ when help commands related to multilingual environment 
(e.g.,
 
 (defconst help-xref-info-regexp
   (purecopy
-   "\\<[Ii]nfo[ \t\n]+\\(node\\|anchor\\)[ \t\n]+[`‘]\\([^'’]+\\)['’]")
+   "\\<[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
@@ -385,6 +387,15 @@ it does not already exist."
        (error "Current buffer is not in Help mode"))
      (current-buffer))))
 
+(defvar describe-symbol-backends
+  `((nil ,#'fboundp ,(lambda (s _b _f) (describe-function s)))
+    ("face" ,#'facep ,(lambda (s _b _f) (describe-face s)))
+    (nil
+     ,(lambda (symbol)
+        (or (and (boundp symbol) (not (keywordp symbol)))
+            (get symbol 'variable-documentation)))
+     ,#'describe-variable)))
+
 ;;;###autoload
 (defun help-make-xrefs (&optional buffer)
   "Parse and hyperlink documentation cross-references in the given BUFFER.
@@ -487,28 +498,9 @@ that."
                             ;;       (pop-to-buffer (car location))
                             ;;         (goto-char (cdr location))))
                             (help-xref-button 8 'help-function-def sym))
-                           ((and
-                             (facep sym)
-                             (save-match-data (looking-at "[ \t\n]+face\\W")))
-                            (help-xref-button 8 'help-face sym))
-                           ((and (or (boundp sym)
-                                     (get sym 'variable-documentation))
-                                 (fboundp sym))
-                            ;; We can't intuit whether to use the
-                            ;; variable or function doc -- supply both.
-                            (help-xref-button 8 'help-symbol sym))
-                           ((and
-                             (or (boundp sym)
-                                 (get sym 'variable-documentation))
-                             (or
-                              (documentation-property
-                               sym 'variable-documentation)
-                              (documentation-property
-                               (indirect-variable sym)
-                               'variable-documentation)))
-                            (help-xref-button 8 'help-variable sym))
-                           ((fboundp sym)
-                            (help-xref-button 8 'help-function sym)))))))
+                           ((cl-some (lambda (x) (funcall (nth 1 x) sym))
+                                     describe-symbol-backends)
+                            (help-xref-button 8 'help-symbol sym)))))))
                 ;; An obvious case of a key substitution:
                 (save-excursion
                   (while (re-search-forward
@@ -624,58 +616,7 @@ See `help-make-xrefs'."
 ;; Additional functions for (re-)creating types of help buffers.
 
 ;;;###autoload
-(defun help-xref-interned (symbol &optional buffer frame)
-  "Follow a hyperlink which appeared to be an arbitrary interned SYMBOL.
-Both variable, function and face documentation are extracted into a single
-help buffer. If SYMBOL is a variable, include buffer-local value for optional
-BUFFER or FRAME."
-  (with-current-buffer (help-buffer)
-    ;; Push the previous item on the stack before clobbering the output buffer.
-    (help-setup-xref nil nil)
-    (let ((facedoc (when (facep symbol)
-                    ;; Don't record the current entry in the stack.
-                    (setq help-xref-stack-item nil)
-                    (describe-face symbol)))
-         (fdoc (when (fboundp symbol)
-                 ;; Don't record the current entry in the stack.
-                 (setq help-xref-stack-item nil)
-                 (describe-function symbol)))
-         (sdoc (when (or (boundp symbol)
-                         (get symbol 'variable-documentation))
-                 ;; Don't record the current entry in the stack.
-                 (setq help-xref-stack-item nil)
-                 (describe-variable symbol buffer frame))))
-      (cond
-       (sdoc
-       ;; We now have a help buffer on the variable.
-       ;; Insert the function and face text before it.
-       (when (or fdoc facedoc)
-         (goto-char (point-min))
-         (let ((inhibit-read-only t))
-           (when fdoc
-             (insert fdoc "\n\n")
-             (when facedoc
-               (insert (make-string 30 ?-) "\n\n" (symbol-name symbol)
-                       " is also a " "face." "\n\n")))
-           (when facedoc
-             (insert facedoc "\n\n"))
-           (insert (make-string 30 ?-) "\n\n" (symbol-name symbol)
-                   " is also a " "variable." "\n\n"))
-         ;; Don't record the `describe-variable' item in the stack.
-         (setq help-xref-stack-item nil)
-         (help-setup-xref (list #'help-xref-interned symbol) nil)))
-       (fdoc
-       ;; We now have a help buffer on the function.
-       ;; Insert face text before it.
-       (when facedoc
-         (goto-char (point-max))
-         (let ((inhibit-read-only t))
-           (insert "\n\n" (make-string 30 ?-) "\n\n" (symbol-name symbol)
-                   " is also a " "face." "\n\n" facedoc))
-         ;; Don't record the `describe-function' item in the stack.
-         (setq help-xref-stack-item nil)
-         (help-setup-xref (list #'help-xref-interned symbol) nil))))
-      (goto-char (point-min)))))
+(define-obsolete-function-alias 'help-xref-interned 'describe-symbol "25.1")
 
 
 ;; Navigation/hyperlinking with xrefs
@@ -774,7 +715,7 @@ Show all docs for that symbol as either a variable, 
function or face."
     (when (or (boundp sym)
              (get sym 'variable-documentation)
              (fboundp sym) (facep sym))
-      (help-do-xref pos #'help-xref-interned (list sym)))))
+      (help-do-xref pos #'describe-symbol (list sym)))))
 
 (defun help-mode-revert-buffer (_ignore-auto noconfirm)
   (when (or noconfirm (yes-or-no-p "Revert help buffer? "))
diff --git a/lisp/help.el b/lisp/help.el
index 1411c1a..46136d9 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -95,7 +95,7 @@
     (define-key map "k" 'describe-key)
     (define-key map "l" 'view-lossage)
     (define-key map "m" 'describe-mode)
-    (define-key map "o" 'describe-function-or-variable)
+    (define-key map "o" 'describe-symbol)
     (define-key map "n" 'view-emacs-news)
     (define-key map "p" 'finder-by-keyword)
     (define-key map "P" 'describe-package)
@@ -360,7 +360,7 @@ With argument, display info only for the selected version."
               (cons "NEWS"
                     (directory-files data-directory nil
                                      "^NEWS\\.[0-9][-0-9]*$" nil)))
-             (sort (delete-dups res) (lambda (a b) (string< b a)))))
+             (sort (delete-dups res) #'string>)))
           (current (car all-versions)))
       (setq version (completing-read
                     (format "Read NEWS for the version (default %s): " current)
@@ -964,12 +964,14 @@ 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 (substitute-command-keys " defined in ‘")
+                           (file-name-nondirectory file-name)
+                           (substitute-command-keys "’")))
            ;; Make a hyperlink to the library.
            (with-current-buffer standard-output
              (save-excursion
-               (re-search-backward "‘\\([^‘’]+\\)’" nil t)
+               (re-search-backward (substitute-command-keys "‘\\([^‘’]+\\)’")
+                                    nil t)
                (help-xref-button 1 'help-function-def mode file-name)))))
        (princ ":\n")
        (princ (documentation major-mode)))))
@@ -1161,8 +1163,8 @@ size of WINDOW."
                       (and (window-combined-p window t)
                            fit-window-to-buffer-horizontally)))
              (and (eq quit-cadr 'frame)
-                    fit-frame-to-buffer
-                    (eq window (frame-root-window window))))
+                   fit-frame-to-buffer
+                   (eq window (frame-root-window window))))
        (fit-window-to-buffer window height nil width nil t))))
 
 ;;; Help windows.
@@ -1349,6 +1351,11 @@ the help window if the current value of the user option
          (princ msg)))))
 
 
+(defun help--docstring-quote (string)
+  "Return a doc string that represents STRING.
+The result, when formatted by ‘substitute-command-keys’, should equal STRING."
+  (replace-regexp-in-string "['\\`]" "\\\\=\\&" string))
+
 ;; The following functions used to be in help-fns.el, which is not preloaded.
 ;; But for various reasons, they are more widely needed, so they were
 ;; moved to this file, which is preloaded.  http://debbugs.gnu.org/17001
@@ -1364,12 +1371,16 @@ DEF is the function whose usage we're looking for in 
DOCSTRING."
   ;; function's name in the doc string so we use `fn' as the anonymous
   ;; function name instead.
   (when (and docstring (string-match "\n\n(fn\\(\\( .*\\)?)\\)\\'" docstring))
-    (cons (format "(%s%s"
-                 ;; Replace `fn' with the actual function name.
-                 (if (symbolp def) def "anonymous")
-                 (match-string 1 docstring))
-         (unless (zerop (match-beginning 0))
-            (substring docstring 0 (match-beginning 0))))))
+    (let ((doc (unless (zerop (match-beginning 0))
+                (substring docstring 0 (match-beginning 0))))
+         (usage-tail (match-string 1 docstring)))
+      (cons (format "(%s%s"
+                   ;; Replace `fn' with the actual function name.
+                   (if (symbolp def)
+                       (help--docstring-quote (format "%S" def))
+                     'anonymous)
+                   usage-tail)
+           doc))))
 
 (defun help-add-fundoc-usage (docstring arglist)
   "Add the usage info to DOCSTRING.
@@ -1387,7 +1398,7 @@ ARGLIST can also be t or a string of the form \"(FUN ARG1 
ARG2 ...)\"."
            (if (and (stringp arglist)
                     (string-match "\\`([^ ]+\\(.*\\))\\'" arglist))
                (concat "(fn" (match-string 1 arglist) ")")
-             (format "%S" (help-make-usage 'fn arglist))))))
+             (help--make-usage-docstring 'fn arglist)))))
 
 (defun help-function-arglist (def &optional preserve-names)
   "Return a formal argument list for the function DEF.
@@ -1442,7 +1453,7 @@ the same names as used in the original source code, when 
possible."
     "[Arg list not available until function definition is loaded.]")
    (t t)))
 
-(defun help-make-usage (function arglist)
+(defun help--make-usage (function arglist)
   (cons (if (symbolp function) function 'anonymous)
        (mapcar (lambda (arg)
                  (if (not (symbolp arg)) arg
@@ -1454,6 +1465,11 @@ the same names as used in the original source code, when 
possible."
                        (t (intern (upcase name)))))))
                arglist)))
 
+(define-obsolete-function-alias 'help-make-usage 'help--make-usage "25.1")
+
+(defun help--make-usage-docstring (fn arglist)
+  (help--docstring-quote (format "%S" (help--make-usage fn arglist))))
+
 
 (provide 'help)
 
diff --git a/lisp/ido.el b/lisp/ido.el
index 5995fcd..1f12fbf 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -322,6 +322,7 @@
 ;;; Code:
 
 (defvar recentf-list)
+(require 'seq)
 
 ;;;; Options
 
@@ -3180,11 +3181,19 @@ for first matching file."
       (if (> i 0)
          (setq ido-cur-list (ido-chop ido-cur-list (nth i ido-matches)))))))
 
-(defun ido-restrict-to-matches ()
-  "Set current item list to the currently matched items."
-  (interactive)
+(defun ido-restrict-to-matches (&optional removep)
+  "Set current item list to the currently matched items.
+
+When argument REMOVEP is non-nil, the currently matched items are
+instead removed from the current item list."
+  (interactive "P")
   (when ido-matches
-    (setq ido-cur-list ido-matches
+    (setq ido-cur-list (if removep
+                           ;; An important feature is to preserve the
+                           ;; order of the elements.
+                           (seq-difference ido-cur-list ido-matches)
+                         ido-matches)
+          ido-matches ido-cur-list
          ido-text-init ""
          ido-rescan nil
          ido-exit 'keep)
diff --git a/lisp/info.el b/lisp/info.el
index 80428e7..48d9d19 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -1009,7 +1009,7 @@ REGEXP is a regular expression matching nodes or 
references.  Its first
 group should match `Node:' or `Ref:'.
 CASE-FOLD t means search for a case-insensitive match.
 If a match was found, value is a list (FOUND-ANCHOR POS MODE), where
-FOUND-ANCHOR is non-nil if a `Ref:' was matched, POS is the position
+FOUND-ANCHOR is non-nil if a `Ref:' was matched, POS is the file position
 where the match was found, and MODE is `major-mode' of the buffer in
 which the match was found."
   (let ((case-fold-search case-fold))
@@ -1020,7 +1020,7 @@ which the match was found."
       (beginning-of-line)
       (when (re-search-forward regexp nil t)
        (list (string-equal "Ref:" (match-string 1))
-             (+ (point-min) (read (current-buffer)))
+              (read (current-buffer))
              major-mode)))))
 
 (defun Info-find-in-tag-table (marker regexp &optional strict-case)
@@ -1029,7 +1029,7 @@ MARKER specifies the buffer and position to start 
searching at.
 REGEXP is a regular expression matching nodes or references.  Its first
 group should match `Node:' or `Ref:'.
 If a match was found, value is a list (FOUND-ANCHOR POS MODE), where
-FOUND-ANCHOR is non-nil if a `Ref:' was matched, POS is the position
+FOUND-ANCHOR is non-nil if a `Ref:' was matched, POS is the file position
 where the match was found, and MODE is `major-mode' of the buffer in
 which the match was found.
 This function tries to find a case-sensitive match first, then a
@@ -1115,6 +1115,10 @@ is non-nil)."
                  Info-current-file-completions nil
                  buffer-file-name nil)
            (erase-buffer)
+            ;; Erase any memory of the previous coding-system, so that
+            ;; info-insert-file-contents sets the buffer's encoding to
+            ;; what the Info file specifies.
+            (set-buffer-file-coding-system 'undecided t)
            (info-insert-file-contents filename nil)
            (setq default-directory (file-name-directory filename))
            (set-buffer-modified-p nil)
@@ -1187,15 +1191,18 @@ is non-nil)."
 
                  (when found
                    ;; FOUND is (ANCHOR POS MODE).
-                   (setq guesspos (nth 1 found))
+                   (let ((filepos (nth 1 found))) ;File position in bytes.
 
-                   ;; If this is an indirect file, determine which
-                   ;; file really holds this node and read it in.
-                   (unless (eq (nth 2 found) 'Info-mode)
-                     ;; Note that the current buffer must be the
-                     ;; *info* buffer on entry to
-                     ;; Info-read-subfile.  Thus the hackery above.
-                     (setq guesspos (Info-read-subfile guesspos)))
+                      ;; If this is an indirect file, determine which
+                      ;; file really holds this node and read it in.
+                      (unless (eq (nth 2 found) 'Info-mode)
+                        ;; Note that the current buffer must be the
+                        ;; *info* buffer on entry to
+                        ;; Info-read-subfile.  Thus the hackery above.
+                        (setq filepos (Info-read-subfile filepos)))
+
+                      (setq guesspos
+                            (filepos-to-bufferpos filepos 'approximate)))
 
                    ;; Handle anchor
                    (when (nth 0 found)
@@ -1203,8 +1210,7 @@ is non-nil)."
                      (throw 'foo t)))))
 
              ;; Else we may have a node, which we search for:
-             (goto-char (max (point-min)
-                             (- (byte-to-position guesspos) 1000)))
+             (goto-char (max (point-min) (- guesspos 1000)))
 
              ;; Now search from our advised position (or from beg of
              ;; buffer) to find the actual node.  First, check
@@ -1215,6 +1221,18 @@ is non-nil)."
                  (goto-char pos)
                  (throw 'foo t)))
 
+              ;; If the Texinfo source had an @ifnottex block of text
+              ;; before the Top node, makeinfo 5.0 and 5.1 mistakenly
+              ;; omitted that block's size from the starting position
+              ;; of the 1st subfile, which makes GUESSPOS overshoot
+              ;; the correct position by the length of that text.  So
+              ;; we try again with a larger slop.
+              (goto-char (max (point-min) (- guesspos 10000)))
+             (let ((pos (Info-find-node-in-buffer regexp strict-case)))
+               (when pos
+                 (goto-char pos)
+                 (throw 'foo t)))
+
               (when (string-match "\\([^.]+\\)\\." nodename)
                 (let (Info-point-loc)
                   (Info-find-node-2
@@ -1506,7 +1524,7 @@ is non-nil)."
 ;; Note that on entry to this function the current-buffer must be the
 ;; *info* buffer; not the info tags buffer.
 (defun Info-read-subfile (nodepos)
-  ;; NODEPOS is either a position (in the Info file as a whole,
+  ;; NODEPOS is either a position in bytes (in the Info file as a whole,
   ;; not relative to a subfile) or the name of a subfile.
   (let (lastfilepos
        lastfilename)
@@ -1523,7 +1541,7 @@ is non-nil)."
                        thisfilepos thisfilename)
                    (search-forward ": ")
                    (setq thisfilename  (buffer-substring beg (- (point) 2)))
-                   (setq thisfilepos (+ (point-min) (read (current-buffer))))
+                   (setq thisfilepos (read (current-buffer)))
                    ;; read in version 19 stops at the end of number.
                    ;; Advance to the next line.
                    (forward-line 1)
@@ -1551,10 +1569,13 @@ is non-nil)."
     (if (looking-at "\^_")
        (forward-char 1)
       (search-forward "\n\^_"))
-    ;; Don't add the length of the skipped summary segment to
-    ;; the value returned to `Info-find-node-2'.  (Bug#14125)
     (if (numberp nodepos)
-       (+ (- nodepos lastfilepos) (point-min)))))
+        ;; Our caller ('Info-find-node-2') wants the (zero-based) byte
+        ;; offset corresponding to NODEPOS, from the beginning of the
+        ;; subfile.  This is especially important if NODEPOS is for an
+        ;; anchor reference, because for those the position is all we
+        ;; have.
+       (+ (- nodepos lastfilepos) (bufferpos-to-filepos (point) 'exact)))))
 
 (defun Info-unescape-quotes (value)
   "Unescape double quotes and backslashes in VALUE."
@@ -2013,10 +2034,9 @@ If DIRECTION is `backward', search in the reverse 
direction."
                        (re-search-backward "\\(^.*\\): [0-9]+$")
                      (re-search-forward "\\(^.*\\): [0-9]+$"))
                    (goto-char (+ (match-end 1) 2))
-                   (setq list (cons (cons (+ (point-min)
-                                             (read (current-buffer)))
-                                          (match-string-no-properties 1))
-                                    list))
+                   (push (cons (read (current-buffer))
+                                (match-string-no-properties 1))
+                          list)
                    (goto-char (if backward
                                    (1- (match-beginning 0))
                                  (1+ (match-end 0)))))
@@ -3378,10 +3398,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
@@ -3707,7 +3727,7 @@ Build a menu of the possible matches."
     (insert "Finder Packages\n")
     (insert "***************\n\n")
     (insert
-     "The following packages match the keyword `" nodename "':\n\n")
+     "The following packages match the keyword ‘" nodename "’:\n\n")
     (insert "* Menu:\n\n")
     (let ((keywords
           (mapcar #'intern (if (string-match-p "," nodename)
@@ -3734,7 +3754,7 @@ Build a menu of the possible matches."
     (insert "Package Description\n")
     (insert "*******************\n\n")
     (insert
-     "Description of the package `" nodename "':\n\n")
+     "Description of the package ‘" nodename "’:\n\n")
     ;; This assumes that a file named package.el exists,
     ;; which is not always true.  E.g. for the nxml package,
     ;; there is no "nxml.el" (it's nxml-mode.el).
diff --git a/lisp/international/characters.el b/lisp/international/characters.el
index 247a10d..310384a 100644
--- a/lisp/international/characters.el
+++ b/lisp/international/characters.el
@@ -1163,221 +1163,11 @@ Setup char-width-table appropriate for non-CJK 
language environment."
 
 
 ;; Setting char-script-table.
-
-;; The data is compiled from Blocks.txt and Scripts.txt in the
-;; "Unicode Character Database", simplified to lump together all the
-;; blocks belonging to the same language.  E.g., "Basic Latin",
-;; "Latin-1 Supplement", "Latin Extended-A", etc. are all lumped
-;; together under "latin".
-;;
-;; The Unicode blocks actually extend past some of these ranges with
-;; undefined codepoints.
-(let ((script-list nil))
-  (dolist
-      (elt
-       '((#x0000 #x007F latin)
-        (#x00A0 #x024F latin)
-        (#x0250 #x02AF phonetic)       ; IPA Extensions
-        (#x02B0 #x036F latin)          ; Spacing Modifiers and Diacriticals
-        (#x0370 #x03E1 greek)
-        (#x03E2 #x03EF coptic)
-        (#x03F0 #x03F3 greek)
-        (#x0400 #x052F cyrillic)
-        (#x0530 #x058F armenian)
-        (#x0590 #x05FF hebrew)
-        (#x0600 #x06FF arabic)
-        (#x0700 #x074F syriac)
-        (#x0750 #x077F arabic)         ; Arabic Supplement
-        (#x0780 #x07BF thaana)
-        (#x07C0 #x07FF nko)
-        (#x0800 #x083F samaritan)
-        (#x0840 #x085F mandaic)
-        (#x08A0 #x08FF arabic)         ; Arabic Extended-A
-        (#x0900 #x097F devanagari)
-        (#x0980 #x09FF bengali)
-        (#x0A00 #x0A7F gurmukhi)
-        (#x0A80 #x0AFF gujarati)
-        (#x0B00 #x0B7F oriya)
-        (#x0B80 #x0BFF tamil)
-        (#x0C00 #x0C7F telugu)
-        (#x0C80 #x0CFF kannada)
-        (#x0D00 #x0D7F malayalam)
-        (#x0D80 #x0DFF sinhala)
-        (#x0E00 #x0E7F thai)
-        (#x0E80 #x0EFF lao)
-        (#x0F00 #x0FFF tibetan)
-        (#x1000 #x109F burmese)        ; Myanmar
-        (#x10A0 #x10FF georgian)
-        (#x1100 #x11FF hangul)
-        (#x1200 #x139F ethiopic)       ; Ethiopic and Ethiopic Supplement
-        (#x13A0 #x13FF cherokee)
-        (#x1400 #x167F canadian-aboriginal)
-        (#x1680 #x169F ogham)
-        (#x16A0 #x16FF runic)
-        (#x1700 #x171F tagalog)
-        (#x1720 #x173F hanunoo)
-        (#x1740 #x175F buhid)
-        (#x1760 #x177F tagbanwa)
-        (#x1780 #x17FF khmer)
-        (#x1800 #x18AF mongolian)
-        (#x18B0 #x18FF canadian-aboriginal) ; Canadian Aboriginal Syllabics 
Extended
-        (#x1900 #x194F limbu)
-        (#x1950 #x197F tai-le)
-        (#x1980 #x19DF tai-lue)        ; New Tai Lue
-        (#x19E0 #x19FF khmer)          ; Khmer Symbols
-        (#x1A00 #x1A00 buginese)
-        (#x1A20 #x1AAF tai-tham)
-        (#x1AB0 #x1AFF latin)          ; Combining Diacritical Marks Extended
-        (#x1B00 #x1B7F balinese)
-        (#x1B80 #x1BBF sundanese)
-        (#x1BC0 #x1BFF batak)
-        (#x1C00 #x1C4F lepcha)
-        (#x1C50 #x1C7F ol-chiki)
-        (#x1CC0 #x1CCF sundanese)
-        (#x1CD0 #x1CFF vedic)
-        (#x1D00 #x1DBF phonetic)       ; Phonetic Extensions & Supplement
-        (#x1DC0 #x1EFF latin)          ; Latin Extended Additional
-        (#x1F00 #x1FFF greek)          ; Greek Extended
-        (#x2000 #x27FF symbol)
-        (#x2800 #x28FF braille)
-        (#x2900 #x2BFF symbol)
-        (#x2C00 #x2C5F glagolitic)
-        (#x2C60 #x2C7F latin)          ; Latin Extended-C
-        (#x2C80 #x2CFF coptic)
-        (#x2D00 #x2D2F georgian)       ; Georgian Supplement
-        (#x2D30 #x2D7F tifinagh)
-        (#x2D80 #x2DDF ethiopic)       ; Ethiopic Extended
-        (#x2DE0 #x2DFF cyrillic)       ; Cyrillic Extended-A
-        (#x2E00 #x2E7F symbol)
-        (#x2E80 #x2FDF han)
-        (#x2FF0 #x2FFF ideographic-description)
-        (#x3000 #x303F cjk-misc)
-        (#x3040 #x30FF kana)           ; Hiragana and Katakana
-        (#x3100 #x312F bopomofo)
-        (#x3130 #x318F hangul)         ; Hangul Compatibility Jamo
-        (#x3190 #x319F kanbun)
-        (#x31A0 #x31BF bopomofo)       ; Bopomofo Extended
-        (#x31C0 #x31EF cjk-misc)       ; CJK Strokes
-        (#x31F0 #x31FF kana)           ; Katakana Phonetic Extensions
-        (#x3200 #x9FAF han)
-        (#xA000 #xA4CF yi)
-        (#xA4D0 #xA4FF lisu)
-        (#xA500 #xA63F vai)
-        (#xA640 #xA69F cyrillic)       ; Cyrillic Extended-B
-        (#xA6A0 #xA6FF bamum)
-        (#xA700 #xA7FF latin)
-        (#xA800 #xA82F syloti-nagri)
-        (#xA830 #xA83F north-indic-number)
-        (#xA840 #xA87F phags-pa)
-        (#xA880 #xA8DF saurashtra)
-        (#xA8E0 #xA8FF devanagari)     ; Devanagari Extended
-        (#xA900 #xA92F kayah-li)
-        (#xA930 #xA95F rejang)
-        (#xA960 #xA97F hangul)         ; Hangul Jamo Extended
-        (#xA980 #xA9DF javanese)
-        (#xA9E0 #xA9FF burmese)        ; Myanmar Extended-B
-        (#xAA00 #xAA5F cham)
-        (#xAA60 #xAA7F burmese)        ; Myanmar Extended-A
-        (#xAA80 #xAADF tai-viet)
-        (#xAAE0 #xAAFF meetei-mayek)   ; Meetei Mayek Extensions
-        (#xAB00 #xAB2F ethiopic)       ; Ethiopic Extended-A
-        (#xAB30 #xAB6F latin)          ; Latin Extended-E
-        (#xABC0 #xABFF meetei-mayek)
-        (#xAC00 #xD7FF hangul)
-        (#xF900 #xFAFF han)
-        (#xFB00 #xFB06 latin)          ; Latin ligatures
-        (#xFB13 #xFB17 armenian)       ; Armenian ligatures
-        (#xFB1D #xFB4F hebrew)         ; Alphabetic Presentation Forms
-        (#xFB50 #xFDFF arabic)         ; Arabic Presentation Forms-A
-        (#xFE20 #xFE2F latin)          ; Combining Half Marks
-        (#xFE30 #xFE4F han)
-        (#xFE70 #xFEFF arabic)         ; Arabic Presentation Forms-B
-        (#xFF00 #xFF5F cjk-misc)
-        (#xFF61 #xFF9F kana)
-        (#xFFE0 #xFFE6 cjk-misc)
-        (#x10000 #x100FF linear-b)
-        (#x10100 #x1013F aegean-number)
-        (#x10140 #x1018F ancient-greek-number)
-        (#x10190 #x101CF ancient-symbol)
-        (#x101D0 #x101FF phaistos-disc)
-        (#x10280 #x1029F lycian)
-        (#x102A0 #x102DF carian)
-        (#x102E0 #x102FF coptic)       ; Coptic Epact Numbers
-        (#x10300 #x1032F olt-italic)
-        (#x10330 #x1034F gothic)
-        (#x10350 #x1037F old-permic)
-        (#x10380 #x1039F ugaritic)
-        (#x103A0 #x103DF old-persian)
-        (#x10400 #x1044F deseret)
-        (#x10450 #x1047F shavian)
-        (#x10480 #x104AF osmanya)
-        (#x10500 #x1052F elbasan)
-        (#x10530 #x1056F caucasian-albanian)
-        (#x10600 #x106BF linear-a)
-        (#x10800 #x1083F cypriot-syllabary)
-        (#x10840 #x1085F aramaic)
-        (#x10860 #x1087F palmyrene)
-        (#x10880 #x108AF nabataean)
-        (#x10900 #x1091F phoenician)
-        (#x10920 #x1093F lydian)
-        (#x10980 #x109FF meroitic)
-        (#x10A00 #x10A5F kharoshthi)
-        (#x10A60 #x10A7F old-south-arabian)
-        (#x10A80 #x10A9F old-north-arabian)
-        (#x10AC0 #x10AFF manichaean)
-        (#x10B00 #x10B3F avestan)
-        (#x10B40 #x10B5F inscriptional-parthian)
-        (#x10B60 #x10B7F inscriptional-pahlavi)
-        (#x10B80 #x10BAF psalter-pahlavi)
-        (#x10C00 #x10C4F old-turkic)
-        (#x10E60 #x10E7F rumi-number)
-        (#x11000 #x1107F brahmi)
-        (#x11080 #x110CF kaithi)
-        (#x110D0 #x110FF sora-sompeng)
-        (#x11100 #x1114F chakma)
-        (#x11150 #x1117F mahajani)
-        (#x11180 #x111DF sharada)
-        (#x111E0 #x111FF sinhala-archaic-number)
-        (#x11200 #x1124F khojki)
-        (#x112B0 #x112FF khudawadi)
-        (#x11300 #x1137F grantha)
-        (#x11480 #x114DF tirhuta)
-        (#x11580 #x115FF siddham)
-        (#x11600 #x1165F modi)
-        (#x11680 #x116CF takri)
-        (#x118A0 #x118FF warang-citi)
-        (#x11AC0 #x11AFF pau-cin-hau)
-        (#x12000 #x123FF cuneiform)
-        (#x12400 #x1247F cuneiform-numbers-and-punctuation)
-        (#x13000 #x1342F egyptian)
-        (#x16800 #x16A3F bamum)
-        (#x16A40 #x16A6F mro)
-        (#x16AD0 #x16AFF bassa-vah)
-        (#x16B00 #x16B8F pahawh-hmong)
-        (#x16F00 #x16F9F miao)
-        (#x1B000 #x1B0FF kana)         ; Kana Supplement
-        (#x1BC00 #x1BCAF duployan-shorthand)
-        (#x1D000 #x1D0FF byzantine-musical-symbol)
-        (#x1D100 #x1D1FF musical-symbol)
-        (#x1D200 #x1D24F ancient-greek-musical-notation)
-        (#x1D300 #x1D35F tai-xuan-jing-symbol)
-        (#x1D360 #x1D37F counting-rod-numeral)
-        (#x1D400 #x1D7FF mathematical)
-        (#x1E800 #x1E8DF mende-kikakui)
-        (#x1EE00 #x1EEFF arabic)       ; Arabic Mathematical Alphabetic Symbols
-        (#x1F000 #x1F02F mahjong-tile)
-        (#x1F030 #x1F09F domino-tile)
-        (#x1F0A0 #x1F0FF playing-cards)
-        (#x1F100 #x1F1FF symbol)       ; Enclosed Alphanumeric Supplement
-        (#x1F200 #x1F2FF han)          ; Enclosed Ideographic Supplement
-        (#x1F300 #x1F8FF symbol)
-        (#x20000 #x2B81F han)
-        (#x2F800 #x2FFFF han)))
-    (set-char-table-range char-script-table
-                         (cons (car elt) (nth 1 elt)) (nth 2 elt))
-    (or (memq (nth 2 elt) script-list)
-       (setq script-list (cons (nth 2 elt) script-list))))
-  (set-char-table-extra-slot char-script-table 0 (nreverse script-list)))
+(if purify-flag
+    ;; While dumping, we can't use require, and international is not
+    ;; in load-path.
+    (load "international/charscript")
+  (require 'charscript))
 
 (map-charset-chars
  #'(lambda (range _ignore)
diff --git a/lisp/international/fontset.el b/lisp/international/fontset.el
index 06a47af..2d57955 100644
--- a/lisp/international/fontset.el
+++ b/lisp/international/fontset.el
@@ -198,7 +198,7 @@
        (phaistos-disc #x101D0)
        (lycian #x10280)
        (carian #x102A0)
-       (olt-italic #x10300)
+       (old-italic #x10300)
        (ugaritic #x10380)
        (old-permic #x10350)
        (old-persian #x103A0)
@@ -633,7 +633,7 @@
                    phaistos-disc
                    lycian
                    carian
-                   olt-italic
+                   old-italic
                    ugaritic
                    old-persian
                    deseret
@@ -693,6 +693,96 @@
      (cons (car math-subgroup) (nth 1 math-subgroup))
      (font-spec :registry "iso10646-1" :script (nth 2 math-subgroup))))
 
+  ;; Special setup for various symbols and punctuation characters
+  ;; covered well by Symbola, excluding those covered well by popular
+  ;; Unicode fonts.  We exclude the latter because users don't like us
+  ;; invading on their font setups where they have good support from
+  ;; other fonts.
+  (dolist (symbol-subgroup
+           '((#x2000 . #x2012) ;; General Punctuation
+             (#x2015 . #x2017)
+             #x201F
+             (#x2023 . #x202F)
+             (#x2031 . #x2038)
+             (#x203B . #x206F)
+             (#x2070 . #x209F) ;; Superscripts and Subscripts
+             (#x20B6 . #x20CF) ;; Currency Symbols
+             (#x2100 . #x2121) ;; Letterlike Symbols
+             (#x2123 . #x214F)
+             (#x2150 . #x215A) ;; Number Forms
+             (#x215F . #x218F)
+             (#x2194 . #x21FF) ;; Arrows
+             (#x2200 . #x2211) ;; Mathematical Operators
+             (#x2213 . #x2247)
+             (#x2249 . #x225F)
+             (#x2261 . #x2263)
+             (#x2266 . #x22FF)
+             (#x2300 . #x2301) ;; Miscellaneous Technical
+             (#x2303 . #x230F)
+             (#x2311 . #x231F)
+             (#x2322 . #x23FF)
+             (#x2400 . #x243F) ;; Control Pictures
+             (#x2440 . #x245F) ;; Optical Char Recognition
+             (#x2460 . #x24FF) ;; Enclosed Alphanumerics
+             (#x25A0 . #x25FF) ;; Geometric Shapes
+             (#x2600 . #x265F) ;; Miscellaneous Symbols
+             (#x2661 . #x2662)
+             #x2664
+             (#x2667 . #x2669)
+             (#x266C . #x26FF)
+             (#x2700 . #x27bF) ;; Dingbats
+             (#x27C0 . #x27EF) ;; Misc Mathematical Symbols-A
+             (#x27F0 . #x27FF) ;; Supplemental Arrows-A
+             (#x2900 . #x297F) ;; Supplemental Arrows-B
+             (#x2980 . #x29FF) ;; Misc Mathematical Symbols-B
+             (#x2A00 . #x2AFF) ;; Suppl. Math Operators
+             (#x2B00 . #x2BFF) ;; Misc Symbols and Arrows
+             (#x2E00 . #x2E7F) ;; Supplemental Punctuation
+             (#x4DC0 . #x4DFF) ;; Yijing Hexagram Symbols
+             (#xFE10 . #xFE1F) ;; Vertical Forms
+             (#x10100 . #x1013F)       ;; Aegean Numbers
+             (#x102E0 . #x102FF)       ;; Coptic Epact Numbers
+             (#x1D000 . #x1D0FF)       ;; Byzantine Musical Symbols
+             (#x1D200 . #x1D24F)       ;; Ancient Greek Musical Notation
+             (#x1F0A0 . #x1F0FF)       ;; Playing Cards
+             (#x1F100 . #x1F1FF)       ;; Enclosed Alphanumeric Suppl
+             (#x1F300 . #x1F5FF)       ;; Misc Symbols and Pictographs
+             (#x1F600 . #x1F64F)       ;; Emoticons
+             (#x1F650 . #x1F67F)       ;; Ornamental Dingbats
+             (#x1F680 . #x1F6FF)       ;; Transport and Map Symbols
+             (#x1F700 . #x1F77F)       ;; Alchemical Symbols
+             (#x1F780 . #x1F7FF)       ;; Geometric Shapes Extended
+             (#x1F800 . #x1F8FF)))     ;; Supplemental Arrows-C
+    (set-fontset-font "fontset-default" symbol-subgroup "Symbola" nil 
'prepend))
+  ;; Box Drawing and Block Elements
+  (set-fontset-font "fontset-default" '(#x2500 . #x259F)
+                    "FreeMono" nil 'prepend)
+
+  ;; Since standard-fontset-spec on X uses fixed-medium font, which
+  ;; gets mapped to a iso8859-1 variant, we would like to prefer its
+  ;; iso10646-1 variant for symbols, where the coverage is known to be
+  ;; good.
+  (dolist (symbol-subgroup
+                        '((#x2000 . #x206F)   ;; General Punctuation
+                          (#x2070 . #x209F)   ;; Superscripts and Subscripts
+                          (#x20A0 . #x20CF)   ;; Currency Symbols
+                          (#x2150 . #x218F)   ;; Number Forms
+                          (#x2190 . #x21FF)   ;; Arrows
+                          (#x2200 . #x22FF)   ;; Mathematical Operators
+                          (#x2300 . #x23FF)   ;; Miscellaneous Technical
+                          (#x2400 . #x243F)   ;; Control Pictures
+                          (#x2440 . #x245F)   ;; Optical Char Recognition
+                          (#x2460 . #x24FF)   ;; Enclosed Alphanumerics
+                           (#x2500 . #x257F)   ;; Box Drawing
+                           (#x2580 . #x259F)   ;; Block Elements
+                          (#x25A0 . #x25FF)   ;; Geometric Shapes
+                          (#x2600 . #x2689)   ;; Miscellaneous Symbols
+                          (#x2700 . #x27bF)   ;; Dingbats
+                          (#x27F5 . #x27FF))) ;; Supplemental Arrows-A
+    (set-fontset-font "fontset-default" symbol-subgroup
+                      "-*-fixed-medium-*-*-*-*-*-*-*-*-*-iso10646-1"
+                      nil 'prepend))
+
   ;; Append CJK fonts for characters other than han, kana, cjk-misc.
   ;; Append fonts for scripts whose name is also a charset name.
   (let* ((data (build-default-fontset-data))
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
index 474806d..59fc37d 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.
@@ -2519,6 +2519,9 @@ is returned.  Thus, for instance, if charset 
\"ISO8859-2\",
 ;; too, for setting things such as calendar holidays, ps-print paper
 ;; size, spelling dictionary.
 
+(declare-function w32-get-console-codepage "w32proc.c" ())
+(declare-function w32-get-console-output-codepage "w32proc.c" ())
+
 (defun locale-translate (locale)
   "Expand LOCALE according to `locale-translation-file-name', if possible.
 For example, translate \"swedish\" into \"sv_SE.ISO8859-1\"."
@@ -2600,7 +2603,18 @@ See also `locale-charset-language-names', 
`locale-language-names',
        (setq system-time-locale locale))
 
       (if (string-match "^[a-z][a-z]" locale)
-         (setq current-iso639-language (intern (match-string 0 locale)))))
+          ;; The value of 'current-iso639-language' is matched against
+          ;; the ':lang' property of font-spec objects when selecting
+          ;; and prioritizing available fonts for displaying
+          ;; characters; see fontset.c.
+         (setq current-iso639-language
+                ;; The call to 'downcase' is for w32, where the
+                ;; MS-Windows locale names are in caps, as in "ENU",
+                ;; the equivalent of the Posix "en_US".  Since the
+                ;; match mentioned above uses memq, and ':lang'
+                ;; properties have lower-case values, the letter-case
+                ;; must match exactly.
+                (intern (downcase (match-string 0 locale))))))
 
     (setq woman-locale
           (or system-messages-locale
@@ -2717,14 +2731,6 @@ See also `locale-charset-language-names', 
`locale-language-names',
        (set-terminal-coding-system 'utf-8)
        (set-keyboard-coding-system 'utf-8)))
 
-    ;; If curved quotes don't work, display straight ASCII approximations.
-    (unless frame
-      (dolist (char-repl '((?‘ . [?\']) (?’ . [?\']) (?“ . [?\"]) (?” . 
[?\"])))
-        (when (not (char-displayable-p (car char-repl)))
-          (or standard-display-table
-              (setq standard-display-table (make-display-table)))
-          (aset standard-display-table (car char-repl) (cdr char-repl)))))
-
     ;; Default to A4 paper if we're not in a C, POSIX or US locale.
     ;; (See comments in Flocale_info.)
     (unless frame
diff --git a/lisp/international/mule-util.el b/lisp/international/mule-util.el
index eae787b..f3aa70f 100644
--- a/lisp/international/mule-util.el
+++ b/lisp/international/mule-util.el
@@ -1,4 +1,4 @@
-;;; mule-util.el --- utility functions for multilingual environment (mule)
+;;; mule-util.el --- utility functions for multilingual environment (mule)  
-*- lexical-binding:t -*-
 
 ;; Copyright (C) 1997-1998, 2000-2015 Free Software Foundation, Inc.
 ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
@@ -30,8 +30,7 @@
 
 ;;; Code:
 
-;;; String manipulations while paying attention to multibyte
-;;; characters.
+;;; String manipulations while paying attention to multibyte characters.
 
 ;;;###autoload
 (defsubst string-to-list (string)
@@ -49,7 +48,6 @@
   (if (integerp obj)
       (aset string idx obj)
     (let ((len1 (length obj))
-         (len2 (length string))
          (i 0))
       (while (< i len1)
        (aset string (+ idx i) (aref obj i))
@@ -90,7 +88,6 @@ defaults to `truncate-string-ellipsis'."
     (setq ellipsis truncate-string-ellipsis))
   (let ((str-len (length str))
        (str-width (string-width str))
-       (ellipsis-len (if ellipsis (length ellipsis) 0))
        (ellipsis-width (if ellipsis (string-width ellipsis) 0))
        (idx 0)
        (column 0)
@@ -129,8 +126,8 @@ defaults to `truncate-string-ellipsis'."
              tail-padding ellipsis))))
 
 
-;;; Nested alist handler.  Nested alist is alist whose elements are
-;;; also nested alist.
+;;; Nested alist handler.
+;; Nested alist is alist whose elements are also nested alist.
 
 ;;;###autoload
 (defsubst nested-alist-p (obj)
@@ -313,6 +310,181 @@ per-character basis, this may not be accurate."
                                  (throw 'tag3 charset)))
                          charset-list)
                    nil)))))))))
+
+(defun filepos-to-bufferpos--dos (byte f)
+  (let ((eol-offset 0)
+        ;; Make sure we terminate, even if BYTE falls right in the middle
+        ;; of a CRLF or some other weird corner case.
+        (omin 0) (omax most-positive-fixnum)
+        pos lines)
+    (while
+        (progn
+          (setq pos (funcall f (- byte eol-offset)))
+          ;; Protect against accidental values of BYTE outside of the
+          ;; valid region.
+          (when (null pos)
+            (if (<= byte eol-offset)
+                (setq pos (point-min))
+              (setq pos (point-max))))
+          ;; Adjust POS for DOS EOL format.
+          (setq lines (1- (line-number-at-pos pos)))
+          (and (not (= lines eol-offset)) (> omax omin)))
+      (if (> lines eol-offset)
+          (setq omax (min (1- omax) lines)
+                eol-offset omax)
+        (setq omin (max (1+ omin) lines)
+              eol-offset omin)))
+    pos))
+
+;;;###autoload
+(defun filepos-to-bufferpos (byte &optional quality coding-system)
+  "Try to return the buffer position corresponding to a particular file 
position.
+The file position is given as a (0-based) BYTE count.
+The function presumes the file is encoded with CODING-SYSTEM, which defaults
+to `buffer-file-coding-system'.
+QUALITY can be:
+  `approximate', in which case we may cut some corners to avoid
+    excessive work.
+  `exact', in which case we may end up re-(en/de)coding a large
+    part of the file/buffer.
+  nil, in which case we may return nil rather than an approximation."
+  (unless coding-system (setq coding-system buffer-file-coding-system))
+  (let ((eol (coding-system-eol-type coding-system))
+        (type (coding-system-type coding-system))
+        (base (coding-system-base coding-system))
+        (pm (save-restriction (widen) (point-min))))
+    (and (eq type 'utf-8)
+         ;; Any post-read/pre-write conversions mean it's not really UTF-8.
+         (not (null (coding-system-get coding-system :post-read-conversion)))
+         (setq type 'not-utf-8))
+    (and (memq type '(charset raw-text undecided))
+         ;; The following are all of type 'charset', but they are
+         ;; actually variable-width encodings.
+         (not (memq base '(chinese-gbk chinese-gb18030 euc-tw euc-jis-2004
+                                       korean-iso-8bit chinese-iso-8bit
+                                       japanese-iso-8bit chinese-big5-hkscs
+                                       japanese-cp932 korean-cp949)))
+         (setq type 'single-byte))
+    (pcase type
+      (`utf-8
+       (when (coding-system-get coding-system :bom)
+         (setq byte (max 0 (- byte 3))))
+       (if (= eol 1)
+           (filepos-to-bufferpos--dos (+ pm byte) #'byte-to-position)
+         (byte-to-position (+ pm byte))))
+      (`single-byte
+       (if (= eol 1)
+           (filepos-to-bufferpos--dos (+ pm byte) #'identity)
+         (+ pm byte)))
+      ((and `utf-16
+            ;; FIXME: For utf-16, we could use the same approach as used for
+            ;; dos EOLs (counting the number of non-BMP chars instead of the
+            ;; number of lines).
+            (guard (not (eq quality 'exact))))
+       ;; Account for BOM, which is always 2 bytes in UTF-16.
+       (when (coding-system-get coding-system :bom)
+         (setq byte (max 0 (- byte 2))))
+       ;; In approximate mode, assume all characters are within the
+       ;; BMP, i.e. take up 2 bytes.
+       (setq byte (/ byte 2))
+       (if (= eol 1)
+           (filepos-to-bufferpos--dos (+ pm byte) #'identity)
+         (+ pm byte)))
+      (_
+       (pcase quality
+         (`approximate (byte-to-position (+ pm byte)))
+         (`exact
+          ;; Rather than assume that the file exists and still holds the right
+          ;; data, we reconstruct it based on the buffer's content.
+          (let ((buf (current-buffer)))
+            (with-temp-buffer
+              (set-buffer-multibyte nil)
+              (let ((tmp-buf (current-buffer)))
+                (with-current-buffer buf
+                  (save-restriction
+                    (widen)
+                    ;; Since encoding should always return more bytes than
+                    ;; there were chars, encoding all chars up to (+ byte pm)
+                    ;; guarantees the encoded result has at least `byte' bytes.
+                    (encode-coding-region pm (min (point-max) (+ pm byte))
+                                          coding-system tmp-buf)))
+                (+ pm (length
+                       (decode-coding-region (point-min)
+                                             (min (point-max) (+ pm byte))
+                                             coding-system t))))))))))))
+;;;###autoload
+(defun bufferpos-to-filepos (position &optional quality coding-system)
+  "Try to return the file byte corresponding to a particular buffer POSITION.
+Value is the file position given as a (0-based) byte count.
+The function presumes the file is encoded with CODING-SYSTEM, which defaults
+to `buffer-file-coding-system'.
+QUALITY can be:
+  `approximate', in which case we may cut some corners to avoid
+    excessive work.
+  `exact', in which case we may end up re-(en/de)coding a large
+    part of the file/buffer.
+  nil, in which case we may return nil rather than an approximation."
+  (unless coding-system (setq coding-system buffer-file-coding-system))
+  (let* ((eol (coding-system-eol-type coding-system))
+         (lineno (if (= eol 1) (1- (line-number-at-pos position)) 0))
+         (type (coding-system-type coding-system))
+         (base (coding-system-base coding-system))
+         byte)
+    (and (eq type 'utf-8)
+         ;; Any post-read/pre-write conversions mean it's not really UTF-8.
+         (not (null (coding-system-get coding-system :post-read-conversion)))
+         (setq type 'not-utf-8))
+    (and (memq type '(charset raw-text undecided))
+         ;; The following are all of type 'charset', but they are
+         ;; actually variable-width encodings.
+         (not (memq base '(chinese-gbk chinese-gb18030 euc-tw euc-jis-2004
+                                       korean-iso-8bit chinese-iso-8bit
+                                       japanese-iso-8bit chinese-big5-hkscs
+                                       japanese-cp932 korean-cp949)))
+         (setq type 'single-byte))
+    (pcase type
+      (`utf-8
+       (setq byte (position-bytes position))
+       (when (null byte)
+         (if (<= position 0)
+             (setq byte 1)
+           (setq byte (position-bytes (point-max)))))
+       (setq byte (1- byte))
+       (+ byte
+          ;; Account for BOM, if any.
+          (if (coding-system-get coding-system :bom) 3 0)
+          ;; Account for CR in CRLF pairs.
+          lineno))
+      (`single-byte
+       (+ position -1 lineno))
+      ((and `utf-16
+            ;; FIXME: For utf-16, we could use the same approach as used for
+            ;; dos EOLs (counting the number of non-BMP chars instead of the
+            ;; number of lines).
+            (guard (not (eq quality 'exact))))
+       ;; In approximate mode, assume all characters are within the
+       ;; BMP, i.e. each one takes up 2 bytes.
+       (+ (* (1- position) 2)
+          ;; Account for BOM, if any.
+          (if (coding-system-get coding-system :bom) 2 0)
+          ;; Account for CR in CRLF pairs.
+          lineno))
+      (_
+       (pcase quality
+         (`approximate (+ (position-bytes position) -1 lineno))
+         (`exact
+          ;; Rather than assume that the file exists and still holds the right
+          ;; data, we reconstruct its relevant portion.
+          (let ((buf (current-buffer)))
+            (with-temp-buffer
+              (set-buffer-multibyte nil)
+              (let ((tmp-buf (current-buffer)))
+                (with-current-buffer buf
+                  (save-restriction
+                    (widen)
+                    (encode-coding-region (point-min) (min (point-max) 
position)
+                                          coding-system tmp-buf)))
+                (1- (point-max)))))))))))
 
 (provide 'mule-util)
 
diff --git a/lisp/international/titdic-cnv.el b/lisp/international/titdic-cnv.el
index 12e0883..1186c71 100644
--- a/lisp/international/titdic-cnv.el
+++ b/lisp/international/titdic-cnv.el
@@ -562,9 +562,7 @@ To get complete usage, invoke \"emacs -batch -f 
batch-titdic-convert -h\"."
            (message "Converting %s to quail-package..." file)
            (titdic-convert file targetdir))
          (setq files (cdr files)))
-       (setq command-line-args-left (cdr command-line-args-left)))
-      (message "Byte-compile the created files by:")
-      (message "  %% emacs -batch -f batch-byte-compile XXX.el")))
+       (setq command-line-args-left (cdr command-line-args-left)))))
   (kill-emacs 0))
 
 
diff --git a/lisp/isearch.el b/lisp/isearch.el
index d1b92bd..8d4bf24 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -519,6 +519,7 @@ This is like `describe-bindings', but displays only Isearch 
keys."
     (define-key map "\M-sw" 'isearch-toggle-word)
     (define-key map "\M-s_" 'isearch-toggle-symbol)
     (define-key map "\M-s " 'isearch-toggle-lax-whitespace)
+    (define-key map "\M-s'" #'isearch-toggle-character-fold)
 
     (define-key map [?\M-%] 'isearch-query-replace)
     (define-key map [?\C-\M-%] 'isearch-query-replace-regexp)
@@ -834,6 +835,9 @@ See the command `isearch-forward-symbol' for more 
information."
 ;;                          isearch-forward-regexp isearch-backward-regexp)
 ;;  "List of commands for which isearch-mode does not recursive-edit.")
 
+(autoload 'character-fold-to-regexp "character-fold")
+(put 'character-fold-to-regexp 'isearch-message-prefix "char-fold ")
+(defvar character-fold-search)
 
 (defun isearch-mode (forward &optional regexp op-fun recursive-edit word)
   "Start Isearch minor mode.
@@ -858,7 +862,9 @@ convert the search string to a regexp used by regexp search 
functions."
   ;; Initialize global vars.
   (setq isearch-forward forward
        isearch-regexp regexp
-       isearch-word word
+       isearch-word (or word (and character-fold-search
+                                   (not regexp)
+                                   'character-fold-to-regexp))
        isearch-op-fun op-fun
        isearch-last-case-fold-search isearch-case-fold-search
        isearch-case-fold-search case-fold-search
@@ -1178,8 +1184,8 @@ nonincremental search instead via `isearch-edit-string'."
   (if (and search-nonincremental-instead
           (= 0 (length isearch-string)))
       (let ((isearch-nonincremental t))
-       (isearch-edit-string)))
-  (isearch-done)
+       (isearch-edit-string)) ;; this calls isearch-done as well
+    (isearch-done))
   (isearch-clean-overlays))
 
 (defun isearch-fail-pos (&optional msg)
@@ -1494,7 +1500,7 @@ Use `isearch-exit' to quit without signaling."
   "Toggle word searching on or off."
   ;; The status stack is left unchanged.
   (interactive)
-  (setq isearch-word (not isearch-word))
+  (setq isearch-word (if (eq isearch-word t) nil t))
   (if isearch-word (setq isearch-regexp nil))
   (setq isearch-success t isearch-adjusted t)
   (isearch-update))
@@ -1508,6 +1514,15 @@ Use `isearch-exit' to quit without signaling."
   (setq isearch-success t isearch-adjusted t)
   (isearch-update))
 
+(defun isearch-toggle-character-fold ()
+  "Toggle character folding in searching on or off."
+  (interactive)
+  (setq isearch-word (unless (eq isearch-word #'character-fold-to-regexp)
+                       #'character-fold-to-regexp))
+  (if isearch-word (setq isearch-regexp nil))
+  (setq isearch-success t isearch-adjusted t)
+  (isearch-update))
+
 (defun isearch-toggle-lax-whitespace ()
   "Toggle whitespace matching in searching on or off.
 In ordinary search, toggles the value of the variable
@@ -1751,16 +1766,8 @@ replacements from Isearch is `M-s w ... M-%'."
      (query-replace-read-to
       isearch-string
       (concat "Query replace"
-             (if (or delimited isearch-word)
-                 (let* ((symbol (or delimited isearch-word))
-                        (string (and symbol (symbolp symbol)
-                                     (get symbol 'isearch-message-prefix))))
-                   (if (stringp string)
-                       ;; Move space from the end to the beginning.
-                       (replace-regexp-in-string "\\(.*\\) \\'" " \\1" string)
-                     " word"))
-               "")
-             (if isearch-regexp " regexp" "")
+              (isearch--describe-word-mode (or delimited isearch-word) t)
+              (if isearch-regexp " regexp" "")
              (if backward " backward" "")
              (if (and transient-mark-mode mark-active) " in region" ""))
       isearch-regexp)
@@ -2506,6 +2513,21 @@ If there is no completion possible, say so and continue 
searching."
             (isearch-message-suffix c-q-hack)))
     (if c-q-hack m (let ((message-log-max nil)) (message "%s" m)))))
 
+(defun isearch--describe-word-mode (word-mode &optional space-before)
+  "Make a string for describing WORD-MODE.
+If SPACE-BEFORE is non-nil,  put a space before, instead of after,
+the word mode."
+  (let ((description
+         (cond ((and (symbolp word-mode)
+                     (get word-mode 'isearch-message-prefix))
+                (get word-mode 'isearch-message-prefix))
+               (word-mode "word ")
+               (t ""))))
+    (if space-before
+        ;; Move space from the end to the beginning.
+        (replace-regexp-in-string "\\(.*\\) \\'" " \\1" description)
+      description)))
+
 (defun isearch-message-prefix (&optional ellipsis nonincremental)
   ;; If about to search, and previous search regexp was invalid,
   ;; check that it still is.  If it is valid now,
@@ -2532,13 +2554,9 @@ If there is no completion possible, say so and continue 
searching."
                         (let ((np (cdr (assq 'isearch-message-prefix props))))
                           (if np (setq prefix (concat np prefix)))))
                       isearch-filter-predicate)
-                    prefix)
-                  (if isearch-word
-                      (or (and (symbolp isearch-word)
-                               (get isearch-word 'isearch-message-prefix))
-                          "word ")
-                    "")
-                  (if isearch-regexp "regexp " "")
+                     prefix)
+                   (isearch--describe-word-mode isearch-word)
+                   (if isearch-regexp "regexp " "")
                   (cond
                    (multi-isearch-file-list "multi-file ")
                    (multi-isearch-buffer-list "multi-buffer ")
diff --git a/lisp/kermit.el b/lisp/kermit.el
index e8a4ccd..d4a21f4 100644
--- a/lisp/kermit.el
+++ b/lisp/kermit.el
@@ -135,7 +135,7 @@ In this state, use LFD to send a line and end it with a 
carriage-return."
 (defun kermit-clean-on ()
   "Delete all null characters and ^M's from the kermit output.
 Note that another (perhaps better) way to do this is to use the
-command `kermit | tr -d '\\015''."
+command ‘kermit | tr -d '\\015'’."
   (interactive)
   (set-process-filter (get-buffer-process (current-buffer))
                      'kermit-clean-filter))
diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el
index 0559f4c..1bcd190 100644
--- a/lisp/ldefs-boot.el
+++ b/lisp/ldefs-boot.el
@@ -238,8 +238,8 @@ old-style time formats for entries are supported.
 
 ;;;***
 
-;;;### (autoloads nil "advice" "emacs-lisp/advice.el" (21853 45243
-;;;;;;  381515 341000))
+;;;### (autoloads nil "advice" "emacs-lisp/advice.el" (21895 57521
+;;;;;;  590301 332000))
 ;;; 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" (21855 576 477946 398000))
+;;;### (autoloads nil "allout" "allout.el" (21907 48688 645360 195000))
 ;;; Generated autoloads from allout.el
 (push (purecopy '(allout 2 3)) package--builtin-versions)
 
@@ -1015,8 +1015,8 @@ Used in `antlr-mode'.  Also a useful function in 
`java-mode-hook'.
 
 ;;;***
 
-;;;### (autoloads nil "appt" "calendar/appt.el" (21670 32330 885624
-;;;;;;  725000))
+;;;### (autoloads nil "appt" "calendar/appt.el" (21880 42526 275119
+;;;;;;  615000))
 ;;; Generated autoloads from calendar/appt.el
 
 (autoload 'appt-add "appt" "\
@@ -1037,8 +1037,7 @@ ARG is positive, otherwise off.
 
 ;;;***
 
-;;;### (autoloads nil "apropos" "apropos.el" (21670 32330 885624
-;;;;;;  725000))
+;;;### (autoloads nil "apropos" "apropos.el" (21905 6960 85493 11000))
 ;;; Generated autoloads from apropos.el
 
 (autoload 'apropos-read-pattern "apropos" "\
@@ -1153,8 +1152,8 @@ Returns list of symbols and documentation found.
 
 ;;;***
 
-;;;### (autoloads nil "arc-mode" "arc-mode.el" (21862 60209 608658
-;;;;;;  477000))
+;;;### (autoloads nil "arc-mode" "arc-mode.el" (21878 48426 204093
+;;;;;;  508000))
 ;;; Generated autoloads from arc-mode.el
 
 (autoload 'archive-mode "arc-mode" "\
@@ -1245,8 +1244,8 @@ Entering array mode calls the function `array-mode-hook'.
 
 ;;;***
 
-;;;### (autoloads nil "artist" "textmodes/artist.el" (21852 24382
-;;;;;;  57264 475000))
+;;;### (autoloads nil "artist" "textmodes/artist.el" (21906 58826
+;;;;;;  78640 200000))
 ;;; Generated autoloads from textmodes/artist.el
 (push (purecopy '(artist 1 2 6)) package--builtin-versions)
 
@@ -1604,8 +1603,8 @@ insert a template for the file depending on the mode of 
the buffer.
 
 ;;;***
 
-;;;### (autoloads nil "autoload" "emacs-lisp/autoload.el" (21853
-;;;;;;  45243 381515 341000))
+;;;### (autoloads nil "autoload" "emacs-lisp/autoload.el" (21906
+;;;;;;  58854 98640 200000))
 ;;; Generated autoloads from emacs-lisp/autoload.el
 
 (put 'generated-autoload-file 'safe-local-variable 'stringp)
@@ -2742,8 +2741,8 @@ Like `bug-reference-mode', but only buttonize in comments 
and strings.
 
 ;;;***
 
-;;;### (autoloads nil "bytecomp" "emacs-lisp/bytecomp.el" (21855
-;;;;;;  576 747949 136000))
+;;;### (autoloads nil "bytecomp" "emacs-lisp/bytecomp.el" (21888
+;;;;;;  49772 464181 796000))
 ;;; 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)
@@ -3007,8 +3006,8 @@ See the documentation for `calculator-mode' for more 
information.
 
 ;;;***
 
-;;;### (autoloads nil "calendar" "calendar/calendar.el" (21852 24381
-;;;;;;  457257 198000))
+;;;### (autoloads nil "calendar" "calendar/calendar.el" (21887 28943
+;;;;;;  471667 16000))
 ;;; Generated autoloads from calendar/calendar.el
 
 (autoload 'calendar "calendar" "\
@@ -3719,10 +3718,10 @@ Add the warnings that closure conversion would 
encounter.
 
 ;;;***
 
-;;;### (autoloads nil "cfengine" "progmodes/cfengine.el" (21695 35516
-;;;;;;  595262 313000))
+;;;### (autoloads nil "cfengine" "progmodes/cfengine.el" (21906 27825
+;;;;;;  297852 407000))
 ;;; Generated autoloads from progmodes/cfengine.el
-(push (purecopy '(cfengine 1 3)) package--builtin-versions)
+(push (purecopy '(cfengine 1 4)) package--builtin-versions)
 
 (autoload 'cfengine3-mode "cfengine" "\
 Major mode for editing CFEngine3 input.
@@ -3749,6 +3748,30 @@ Choose `cfengine2-mode' or `cfengine3-mode' by buffer 
contents.
 
 ;;;***
 
+;;;### (autoloads nil "character-fold" "character-fold.el" (21907
+;;;;;;  48688 653360 195000))
+;;; Generated autoloads from character-fold.el
+
+(defvar character-fold-search t "\
+Non-nil if searches should fold similar characters.
+This means some characters will match entire groups of characters.
+For instance, \" will match all variants of double quotes, and
+the letter a will match all of its accented versions (and then
+some).")
+
+(autoload 'character-fold-to-regexp "character-fold" "\
+Return a regexp matching anything that character-folds into STRING.
+If `character-fold-search' is nil, `regexp-quote' string.
+Otherwise, any character in STRING that has an entry in
+`character-fold-table' is replaced with that entry (which is a
+regexp) and other characters are `regexp-quote'd.
+If LAX is non-nil, any single whitespace character is allowed to
+match any number of times.
+
+\(fn STRING &optional LAX)" nil nil)
+
+;;;***
+
 ;;;### (autoloads nil "chart" "emacs-lisp/chart.el" (21841 54062
 ;;;;;;  162628 940000))
 ;;; Generated autoloads from emacs-lisp/chart.el
@@ -3757,7 +3780,7 @@ Choose `cfengine2-mode' or `cfengine3-mode' by buffer 
contents.
 ;;;***
 
 ;;;### (autoloads nil "check-declare" "emacs-lisp/check-declare.el"
-;;;;;;  (21855 576 747949 136000))
+;;;;;;  (21888 49792 712181 796000))
 ;;; Generated autoloads from emacs-lisp/check-declare.el
 
 (autoload 'check-declare-file "check-declare" "\
@@ -3774,8 +3797,8 @@ Returns non-nil if any false statements are found.
 
 ;;;***
 
-;;;### (autoloads nil "checkdoc" "emacs-lisp/checkdoc.el" (21862
-;;;;;;  60209 647465 565000))
+;;;### (autoloads nil "checkdoc" "emacs-lisp/checkdoc.el" (21880
+;;;;;;  42635 728365 616000))
 ;;; 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)
@@ -3788,7 +3811,7 @@ Returns non-nil if any false statements are found.
 (put 'checkdoc-symbol-words 'safe-local-variable #'checkdoc-list-of-strings-p)
 
 (autoload 'checkdoc-list-of-strings-p "checkdoc" "\
-
+Return t when OBJ is a list of strings.
 
 \(fn OBJ)" nil nil)
 (put 'checkdoc-proper-noun-regexp 'safe-local-variable 'stringp)
@@ -3839,6 +3862,11 @@ otherwise stop after the first error.
 
 \(fn &optional TAKE-NOTES)" t nil)
 
+(autoload 'checkdoc-file "checkdoc" "\
+Check FILE for document, comment, error style, and rogue spaces.
+
+\(fn FILE)" nil nil)
+
 (autoload 'checkdoc-start "checkdoc" "\
 Start scanning the current buffer for documentation string style errors.
 Only documentation strings are checked.
@@ -3973,6 +4001,11 @@ checking of documentation strings.
 
 \(fn &optional ARG)" t nil)
 
+(autoload 'checkdoc-package-keywords "checkdoc" "\
+Find package keywords that aren't in `finder-known-keywords'.
+
+\(fn)" t nil)
+
 ;;;***
 
 ;;;### (autoloads nil "china-util" "language/china-util.el" (21670
@@ -4053,8 +4086,8 @@ and runs the normal hook `command-history-hook'.
 
 ;;;***
 
-;;;### (autoloads nil "cl-indent" "emacs-lisp/cl-indent.el" (21855
-;;;;;;  576 767950 442000))
+;;;### (autoloads nil "cl-indent" "emacs-lisp/cl-indent.el" (21901
+;;;;;;  9907 369083 895000))
 ;;; Generated autoloads from emacs-lisp/cl-indent.el
 
 (autoload 'common-lisp-indent-function "cl-indent" "\
@@ -4137,8 +4170,8 @@ instead.
 
 ;;;***
 
-;;;### (autoloads nil "cl-lib" "emacs-lisp/cl-lib.el" (21843 55159
-;;;;;;  639401 629000))
+;;;### (autoloads nil "cl-lib" "emacs-lisp/cl-lib.el" (21903 51634
+;;;;;;  278370 580000))
 ;;; Generated autoloads from emacs-lisp/cl-lib.el
 (push (purecopy '(cl-lib 1 0)) package--builtin-versions)
 
@@ -4177,8 +4210,8 @@ For use inside Lisp programs, see also 
`c-macro-expansion'.
 
 ;;;***
 
-;;;### (autoloads nil "cmuscheme" "cmuscheme.el" (21670 32330 885624
-;;;;;;  725000))
+;;;### (autoloads nil "cmuscheme" "cmuscheme.el" (21887 31417 144735
+;;;;;;  656000))
 ;;; Generated autoloads from cmuscheme.el
 
 (autoload 'run-scheme "cmuscheme" "\
@@ -4318,8 +4351,8 @@ REGEXP-GROUP is the regular expression group in REGEXP to 
use.
 
 ;;;***
 
-;;;### (autoloads nil "compare-w" "vc/compare-w.el" (21855 577 527945
-;;;;;;  248000))
+;;;### (autoloads nil "compare-w" "vc/compare-w.el" (21872 61770
+;;;;;;  310089 300000))
 ;;; Generated autoloads from vc/compare-w.el
 
 (autoload 'compare-windows "compare-w" "\
@@ -4355,8 +4388,8 @@ on third call it again advances points to the next 
difference and so on.
 
 ;;;***
 
-;;;### (autoloads nil "compile" "progmodes/compile.el" (21850 34915
-;;;;;;  107315 406000))
+;;;### (autoloads nil "compile" "progmodes/compile.el" (21907 48688
+;;;;;;  769360 195000))
 ;;; Generated autoloads from progmodes/compile.el
 
 (defvar compilation-mode-hook nil "\
@@ -5445,8 +5478,8 @@ The format is suitable for use with `easy-menu-define'.
 
 ;;;***
 
-;;;### (autoloads nil "cus-theme" "cus-theme.el" (21862 60209 618658
-;;;;;;  448000))
+;;;### (autoloads nil "cus-theme" "cus-theme.el" (21891 60465 839679
+;;;;;;  523000))
 ;;; Generated autoloads from cus-theme.el
 
 (autoload 'customize-create-theme "cus-theme" "\
@@ -5889,8 +5922,8 @@ point regardless of any selection.
 
 ;;;***
 
-;;;### (autoloads nil "derived" "emacs-lisp/derived.el" (21703 29629
-;;;;;;  608890 826000))
+;;;### (autoloads nil "derived" "emacs-lisp/derived.el" (21887 19078
+;;;;;;  977447 760000))
 ;;; Generated autoloads from emacs-lisp/derived.el
 
 (autoload 'define-derived-mode "derived" "\
@@ -5958,8 +5991,8 @@ the first time the mode is used.
 
 ;;;***
 
-;;;### (autoloads nil "descr-text" "descr-text.el" (21862 60209 618658
-;;;;;;  448000))
+;;;### (autoloads nil "descr-text" "descr-text.el" (21891 60465 839679
+;;;;;;  523000))
 ;;; Generated autoloads from descr-text.el
 
 (autoload 'describe-text-properties "descr-text" "\
@@ -6250,8 +6283,8 @@ Deuglify broken Outlook (Express) articles and redisplay.
 
 ;;;***
 
-;;;### (autoloads nil "diary-lib" "calendar/diary-lib.el" (21855
-;;;;;;  576 517945 858000))
+;;;### (autoloads nil "diary-lib" "calendar/diary-lib.el" (21880
+;;;;;;  42532 420045 615000))
 ;;; Generated autoloads from calendar/diary-lib.el
 
 (autoload 'diary "diary-lib" "\
@@ -6385,7 +6418,7 @@ Optional arguments are passed to `dig-invoke'.
 
 ;;;***
 
-;;;### (autoloads nil "dired" "dired.el" (21855 576 727950 398000))
+;;;### (autoloads nil "dired" "dired.el" (21874 51372 526324 856000))
 ;;; Generated autoloads from dired.el
 
 (defvar dired-listing-switches (purecopy "-al") "\
@@ -6410,10 +6443,16 @@ The directory name must be absolute, but need not be 
fully expanded.")
 \"Edit\" directory DIRNAME--delete, rename, print, etc. some files in it.
 Optional second argument SWITCHES specifies the `ls' options used.
 \(Interactively, use a prefix argument to be able to specify SWITCHES.)
-Dired displays a list of files in DIRNAME (which may also have
-shell wildcards appended to select certain files).  If DIRNAME is a cons,
-its first element is taken as the directory name and the rest as an explicit
-list of files to make directory entries for.
+
+If DIRNAME is a string, Dired displays a list of files in DIRNAME (which
+may also have shell wildcards appended to select certain files).
+
+If DIRNAME is a cons, its first element is taken as the directory name
+and the rest as an explicit list of files to make directory entries for.
+In this case, SWITCHES are applied to each of the files separately, and
+therefore switches that control the order of the files in the produced
+listing have no effect.
+
 \\<dired-mode-map>You can flag files for deletion with 
\\[dired-flag-file-deletion] and then
 delete them by typing \\[dired-do-flagged-delete].
 Type \\[describe-mode] after entering Dired for more info.
@@ -6820,8 +6859,8 @@ Switch to *dungeon* buffer and start game.
 
 ;;;***
 
-;;;### (autoloads nil "easy-mmode" "emacs-lisp/easy-mmode.el" (21732
-;;;;;;  29888 498897 471000))
+;;;### (autoloads nil "easy-mmode" "emacs-lisp/easy-mmode.el" (21907
+;;;;;;  48688 657360 195000))
 ;;; Generated autoloads from emacs-lisp/easy-mmode.el
 
 (defalias 'easy-mmode-define-minor-mode 'define-minor-mode)
@@ -7938,8 +7977,8 @@ With optional NODE, goes to that node.
 
 ;;;***
 
-;;;### (autoloads nil "ediff-help" "vc/ediff-help.el" (21861 5946
-;;;;;;  771514 868000))
+;;;### (autoloads nil "ediff-help" "vc/ediff-help.el" (21870 54319
+;;;;;;  247944 919000))
 ;;; Generated autoloads from vc/ediff-help.el
 
 (autoload 'ediff-customize "ediff-help" "\
@@ -8086,8 +8125,8 @@ BUFFER is put back into its original major mode.
 
 ;;;***
 
-;;;### (autoloads nil "eieio" "emacs-lisp/eieio.el" (21862 60482
-;;;;;;  430808 412000))
+;;;### (autoloads nil "eieio" "emacs-lisp/eieio.el" (21891 60664
+;;;;;;  847679 523000))
 ;;; Generated autoloads from emacs-lisp/eieio.el
 (push (purecopy '(eieio 1 4)) package--builtin-versions)
 
@@ -8110,8 +8149,8 @@ It creates an autoload function for CNAME's constructor.
 
 ;;;***
 
-;;;### (autoloads nil "elec-pair" "elec-pair.el" (21811 32939 170488
-;;;;;;  968000))
+;;;### (autoloads nil "elec-pair" "elec-pair.el" (21888 48869 288181
+;;;;;;  796000))
 ;;; Generated autoloads from elec-pair.el
 
 (defvar electric-pair-text-pairs '((34 . 34)) "\
@@ -8691,7 +8730,7 @@ if ARG is omitted or nil.
 
 ;;;***
 
-;;;### (autoloads nil "epg" "epg.el" (21802 17960 412629 175000))
+;;;### (autoloads nil "epg" "epg.el" (21890 39605 414073 663000))
 ;;; Generated autoloads from epg.el
 (push (purecopy '(epg 1 0 0)) package--builtin-versions)
 
@@ -8723,7 +8762,7 @@ Look at CONFIG and try to expand GROUP.
 
 ;;;***
 
-;;;### (autoloads nil "erc" "erc/erc.el" (21862 60209 688658 322000))
+;;;### (autoloads nil "erc" "erc/erc.el" (21907 48688 693360 195000))
 ;;; Generated autoloads from erc/erc.el
 (push (purecopy '(erc 5 3)) package--builtin-versions)
 
@@ -9230,8 +9269,8 @@ Add a file to `erc-xdcc-files'.
 
 ;;;***
 
-;;;### (autoloads nil "ert" "emacs-lisp/ert.el" (21843 54898 597238
-;;;;;;  876000))
+;;;### (autoloads nil "ert" "emacs-lisp/ert.el" (21870 18240 719373
+;;;;;;  247000))
 ;;; Generated autoloads from emacs-lisp/ert.el
 
 (autoload 'ert-deftest "ert" "\
@@ -9360,8 +9399,8 @@ corresponding to a successful execution.
 
 ;;;***
 
-;;;### (autoloads nil "etags" "progmodes/etags.el" (21866 57262 677944
-;;;;;;  752000))
+;;;### (autoloads nil "etags" "progmodes/etags.el" (21907 48688 773360
+;;;;;;  195000))
 ;;; Generated autoloads from progmodes/etags.el
 
 (defvar tags-file-name nil "\
@@ -10039,8 +10078,8 @@ Display the bookmarks.
 
 ;;;***
 
-;;;### (autoloads nil "executable" "progmodes/executable.el" (21670
-;;;;;;  32331 385639 720000))
+;;;### (autoloads nil "executable" "progmodes/executable.el" (21880
+;;;;;;  39991 389803 616000))
 ;;; Generated autoloads from progmodes/executable.el
 
 (autoload 'executable-command-find-posix-p "executable" "\
@@ -10066,12 +10105,6 @@ executable.
 
 \(fn INTERPRETER &optional ARGUMENT NO-QUERY-FLAG INSERT-FLAG)" t nil)
 
-(autoload 'executable-self-display "executable" "\
-Turn a text file into a self-displaying Un*x command.
-The magic number of such a command displays all lines but itself.
-
-\(fn)" t nil)
-
 (autoload 'executable-make-buffer-file-executable-if-script-p "executable" "\
 Make file executable according to umask if not already executable.
 If file already has any execute bits set at all, do not change existing
@@ -10130,8 +10163,8 @@ This is used only in conjunction with 
`expand-add-abbrevs'.
 
 ;;;***
 
-;;;### (autoloads nil "f90" "progmodes/f90.el" (21862 60209 828658
-;;;;;;  75000))
+;;;### (autoloads nil "f90" "progmodes/f90.el" (21880 42136 781803
+;;;;;;  616000))
 ;;; Generated autoloads from progmodes/f90.el
 
 (autoload 'f90-mode "f90" "\
@@ -10198,8 +10231,8 @@ with no args, if that value is non-nil.
 
 ;;;***
 
-;;;### (autoloads nil "face-remap" "face-remap.el" (21855 576 807944
-;;;;;;  863000))
+;;;### (autoloads nil "face-remap" "face-remap.el" (21888 47150 706945
+;;;;;;  440000))
 ;;; Generated autoloads from face-remap.el
 
 (autoload 'face-remap-add-relative "face-remap" "\
@@ -10550,8 +10583,7 @@ Otherwise, signal a `file-notify-error'.
 
 ;;;***
 
-;;;### (autoloads nil "files-x" "files-x.el" (21670 32330 885624
-;;;;;;  725000))
+;;;### (autoloads nil "files-x" "files-x.el" (21880 40973 57803 616000))
 ;;; Generated autoloads from files-x.el
 
 (autoload 'add-file-local-variable "files-x" "\
@@ -10781,8 +10813,8 @@ Visit the file you click on in another window.
 
 ;;;***
 
-;;;### (autoloads nil "find-func" "emacs-lisp/find-func.el" (21700
-;;;;;;  53432 444919 658000))
+;;;### (autoloads nil "find-func" "emacs-lisp/find-func.el" (21895
+;;;;;;  57521 598301 332000))
 ;;; Generated autoloads from emacs-lisp/find-func.el
 
 (autoload 'find-library "find-func" "\
@@ -10923,6 +10955,18 @@ Set mark before moving, if the buffer already existed.
 
 \(fn KEY)" t nil)
 
+(autoload 'find-function-on-key-other-window "find-func" "\
+Find, in the other window, the function that KEY invokes.
+See `find-function-on-key'.
+
+\(fn KEY)" t nil)
+
+(autoload 'find-function-on-key-other-frame "find-func" "\
+Find, in the other frame, the function that KEY invokes.
+See `find-function-on-key'.
+
+\(fn KEY)" t nil)
+
 (autoload 'find-function-at-point "find-func" "\
 Find directly the function at point in the other window.
 
@@ -10961,7 +11005,7 @@ Change the filter on a `find-lisp-find-dired' buffer to 
REGEXP.
 
 ;;;***
 
-;;;### (autoloads nil "finder" "finder.el" (21862 60209 708661 34000))
+;;;### (autoloads nil "finder" "finder.el" (21874 386 410923 336000))
 ;;; Generated autoloads from finder.el
 (push (purecopy '(finder 1 0)) package--builtin-versions)
 
@@ -11021,8 +11065,8 @@ to get the effect of a C-q.
 
 ;;;***
 
-;;;### (autoloads nil "flymake" "progmodes/flymake.el" (21670 32331
-;;;;;;  385639 720000))
+;;;### (autoloads nil "flymake" "progmodes/flymake.el" (21907 48688
+;;;;;;  777360 195000))
 ;;; Generated autoloads from progmodes/flymake.el
 (push (purecopy '(flymake 0 3)) package--builtin-versions)
 
@@ -11945,8 +11989,8 @@ CLEAN is obsolete and ignored.
 
 ;;;***
 
-;;;### (autoloads nil "gnus-art" "gnus/gnus-art.el" (21864 15535
-;;;;;;  27945 734000))
+;;;### (autoloads nil "gnus-art" "gnus/gnus-art.el" (21870 54319
+;;;;;;  237944 669000))
 ;;; Generated autoloads from gnus/gnus-art.el
 
 (autoload 'gnus-article-prepare-display "gnus-art" "\
@@ -12697,8 +12741,8 @@ Retrieve MAIL-ADDRESS gravatar and returns it.
 
 ;;;***
 
-;;;### (autoloads nil "grep" "progmodes/grep.el" (21670 32331 385639
-;;;;;;  720000))
+;;;### (autoloads nil "grep" "progmodes/grep.el" (21903 51634 290370
+;;;;;;  580000))
 ;;; Generated autoloads from progmodes/grep.el
 
 (defvar grep-window-height nil "\
@@ -13291,8 +13335,8 @@ different regions.  With numeric argument ARG, behaves 
like
 
 ;;;***
 
-;;;### (autoloads nil "help-fns" "help-fns.el" (21862 60209 718658
-;;;;;;  824000))
+;;;### (autoloads nil "help-fns" "help-fns.el" (21891 60465 919679
+;;;;;;  523000))
 ;;; Generated autoloads from help-fns.el
 
 (autoload 'describe-function "help-fns" "\
@@ -13393,8 +13437,8 @@ gives the window that lists the options.")
 
 ;;;***
 
-;;;### (autoloads nil "help-mode" "help-mode.el" (21862 60209 718658
-;;;;;;  824000))
+;;;### (autoloads nil "help-mode" "help-mode.el" (21891 60465 919679
+;;;;;;  523000))
 ;;; Generated autoloads from help-mode.el
 
 (autoload 'help-mode "help-mode" "\
@@ -15594,8 +15638,8 @@ Convert old Emacs Devanagari characters to UCS.
 
 ;;;***
 
-;;;### (autoloads nil "inf-lisp" "progmodes/inf-lisp.el" (21670 32331
-;;;;;;  385639 720000))
+;;;### (autoloads nil "inf-lisp" "progmodes/inf-lisp.el" (21887 31404
+;;;;;;  272735 656000))
 ;;; Generated autoloads from progmodes/inf-lisp.el
 
 (autoload 'inferior-lisp "inf-lisp" "\
@@ -15613,7 +15657,7 @@ of `inferior-lisp-program').  Runs the hooks from
 
 ;;;***
 
-;;;### (autoloads nil "info" "info.el" (21862 60209 738095 873000))
+;;;### (autoloads nil "info" "info.el" (21887 28748 899667 16000))
 ;;; 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 
[...]
@@ -16906,10 +16950,10 @@ A major mode to edit GNU ld script files
 
 ;;;***
 
-;;;### (autoloads nil "let-alist" "let-alist.el" (21670 32331 385639
-;;;;;;  720000))
-;;; Generated autoloads from let-alist.el
-(push (purecopy '(let-alist 1 0 3)) package--builtin-versions)
+;;;### (autoloads nil "let-alist" "emacs-lisp/let-alist.el" (21890
+;;;;;;  39605 402073 663000))
+;;; Generated autoloads from emacs-lisp/let-alist.el
+(push (purecopy '(let-alist 1 0 4)) package--builtin-versions)
 
 (autoload 'let-alist "let-alist" "\
 Let-bind dotted symbols to their cdrs in ALIST and execute BODY.
@@ -17218,7 +17262,8 @@ for further customization of the printer command.
 
 ;;;***
 
-;;;### (autoloads nil "ls-lisp" "ls-lisp.el" (21855 577 57945 485000))
+;;;### (autoloads nil "ls-lisp" "ls-lisp.el" (21907 48688 729360
+;;;;;;  195000))
 ;;; Generated autoloads from ls-lisp.el
 
 (defvar ls-lisp-support-shell-wildcards t "\
@@ -17253,7 +17298,7 @@ A major mode to edit m4 macro files.
 
 ;;;***
 
-;;;### (autoloads nil "macros" "macros.el" (21670 32331 385639 720000))
+;;;### (autoloads nil "macros" "macros.el" (21887 28847 979667 16000))
 ;;; Generated autoloads from macros.el
 
 (autoload 'name-last-kbd-macro "macros" "\
@@ -17595,8 +17640,8 @@ The mail client is taken to be the handler of mailto 
URLs.
 
 ;;;***
 
-;;;### (autoloads nil "make-mode" "progmodes/make-mode.el" (21670
-;;;;;;  32331 385639 720000))
+;;;### (autoloads nil "make-mode" "progmodes/make-mode.el" (21907
+;;;;;;  48688 777360 195000))
 ;;; Generated autoloads from progmodes/make-mode.el
 
 (autoload 'makefile-mode "make-mode" "\
@@ -17781,6 +17826,13 @@ Default bookmark handler for Man buffers.
 
 ;;;***
 
+;;;### (autoloads nil "map" "emacs-lisp/map.el" (21895 57521 614301
+;;;;;;  332000))
+;;; Generated autoloads from emacs-lisp/map.el
+(push (purecopy '(map 1 0)) package--builtin-versions)
+
+;;;***
+
 ;;;### (autoloads nil "master" "master.el" (21670 32331 385639 720000))
 ;;; Generated autoloads from master.el
 (push (purecopy '(master 1 0 2)) package--builtin-versions)
@@ -18065,8 +18117,8 @@ redisplayed as output is inserted.
 
 ;;;***
 
-;;;### (autoloads nil "mh-comp" "mh-e/mh-comp.el" (21670 32331 385639
-;;;;;;  720000))
+;;;### (autoloads nil "mh-comp" "mh-e/mh-comp.el" (21895 57521 622301
+;;;;;;  332000))
 ;;; Generated autoloads from mh-e/mh-comp.el
 
 (autoload 'mh-smail "mh-comp" "\
@@ -18617,8 +18669,8 @@ body) or \"attachment\" (separate from the body).
 
 ;;;***
 
-;;;### (autoloads nil "mode-local" "cedet/mode-local.el" (21862 60209
-;;;;;;  618658 448000))
+;;;### (autoloads nil "mode-local" "cedet/mode-local.el" (21891 60465
+;;;;;;  823679 523000))
 ;;; Generated autoloads from cedet/mode-local.el
 
 (put 'define-overloadable-function 'doc-string-elt 3)
@@ -18685,8 +18737,8 @@ Convert NATO phonetic alphabet in region to ordinary 
ASCII text.
 
 ;;;***
 
-;;;### (autoloads nil "mouse-drag" "mouse-drag.el" (21670 32331 385639
-;;;;;;  720000))
+;;;### (autoloads nil "mouse-drag" "mouse-drag.el" (21906 58825 986640
+;;;;;;  200000))
 ;;; Generated autoloads from mouse-drag.el
 
 (autoload 'mouse-drag-throw "mouse-drag" "\
@@ -18911,8 +18963,8 @@ The default is 20.  If LIMIT is negative, do not limit 
the listing.
 
 ;;;***
 
-;;;### (autoloads nil "mule-util" "international/mule-util.el" (21670
-;;;;;;  32331 385639 720000))
+;;;### (autoloads nil "mule-util" "international/mule-util.el" (21893
+;;;;;;  15793 483985 415000))
 ;;; Generated autoloads from international/mule-util.el
 
 (defsubst string-to-list (string) "\
@@ -19041,6 +19093,20 @@ per-character basis, this may not be accurate.
 
 \(fn CHAR)" nil nil)
 
+(autoload 'filepos-to-bufferpos "mule-util" "\
+Try to return the buffer position corresponding to a particular file position.
+The file position is given as a (0-based) BYTE count.
+The function presumes the file is encoded with CODING-SYSTEM, which defaults
+to `buffer-file-coding-system'.
+QUALITY can be:
+  `approximate', in which case we may cut some corners to avoid
+    excessive work.
+  `exact', in which case we may end up re-(en/de)coding a large
+    part of the file/buffer.
+  nil, in which case we may return nil rather than an approximation.
+
+\(fn BYTE &optional QUALITY CODING-SYSTEM)" nil nil)
+
 ;;;***
 
 ;;;### (autoloads nil "net-utils" "net/net-utils.el" (21826 50071
@@ -19313,8 +19379,8 @@ running already.
 
 ;;;***
 
-;;;### (autoloads nil "newst-treeview" "net/newst-treeview.el" (21670
-;;;;;;  32331 385639 720000))
+;;;### (autoloads nil "newst-treeview" "net/newst-treeview.el" (21888
+;;;;;;  41565 443258 439000))
 ;;; Generated autoloads from net/newst-treeview.el
 
 (autoload 'newsticker-treeview "newst-treeview" "\
@@ -19511,8 +19577,8 @@ the variable `nxml-enabled-unicode-blocks'.
 
 ;;;***
 
-;;;### (autoloads nil "octave" "progmodes/octave.el" (21695 35516
-;;;;;;  595262 313000))
+;;;### (autoloads nil "octave" "progmodes/octave.el" (21888 47234
+;;;;;;  298945 440000))
 ;;; Generated autoloads from progmodes/octave.el
 
 (autoload 'octave-mode "octave" "\
@@ -20271,8 +20337,8 @@ See the command `outline-mode' for more information on 
this mode.
 
 ;;;***
 
-;;;### (autoloads nil "package" "emacs-lisp/package.el" (21865 36399
-;;;;;;  18126 278000))
+;;;### (autoloads nil "package" "emacs-lisp/package.el" (21907 48688
+;;;;;;  661360 195000))
 ;;; Generated autoloads from emacs-lisp/package.el
 (push (purecopy '(package 1 0 1)) package--builtin-versions)
 
@@ -20495,8 +20561,8 @@ Check if KEY is in the cache.
 
 ;;;***
 
-;;;### (autoloads nil "pcase" "emacs-lisp/pcase.el" (21862 60209
-;;;;;;  658658 512000))
+;;;### (autoloads nil "pcase" "emacs-lisp/pcase.el" (21888 49775
+;;;;;;  904181 796000))
 ;;; Generated autoloads from emacs-lisp/pcase.el
 
 (autoload 'pcase "pcase" "\
@@ -20505,11 +20571,12 @@ CASES is a list of elements of the form (PATTERN 
CODE...).
 
 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 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
+  ATOM         is a shorthand for 'ATOM.
+                  ATOM can be a keyword, an integer, or a string.
   (pred FUN)   matches if FUN applied to the object returns non-nil.
   (guard BOOLEXP)      matches if BOOLEXP evaluates to non-nil.
   (let PAT EXP)        matches if EXP matches PAT.
@@ -20890,8 +20957,8 @@ Global menu used by PCL-CVS.")
 
 ;;;***
 
-;;;### (autoloads nil "perl-mode" "progmodes/perl-mode.el" (21670
-;;;;;;  32331 385639 720000))
+;;;### (autoloads nil "perl-mode" "progmodes/perl-mode.el" (21887
+;;;;;;  19055 813447 760000))
 ;;; Generated autoloads from progmodes/perl-mode.el
 (put 'perl-indent-level 'safe-local-variable 'integerp)
 (put 'perl-continued-statement-offset 'safe-local-variable 'integerp)
@@ -21033,6 +21100,21 @@ they are not by default assigned to keys.
 
 ;;;***
 
+;;;### (autoloads nil "pinentry" "net/pinentry.el" (21890 39605 414073
+;;;;;;  663000))
+;;; Generated autoloads from net/pinentry.el
+(push (purecopy '(pinentry 0 1)) package--builtin-versions)
+
+(autoload 'pinentry-start "pinentry" "\
+Start a Pinentry service.
+
+Once the environment is properly set, subsequent invocations of
+the gpg command will interact with Emacs for passphrase input.
+
+\(fn)" t nil)
+
+;;;***
+
 ;;;### (autoloads nil "plstore" "gnus/plstore.el" (21786 29744 368212
 ;;;;;;  633000))
 ;;; Generated autoloads from gnus/plstore.el
@@ -22771,8 +22853,8 @@ This enforces rescanning the buffer on next use.
 
 ;;;***
 
-;;;### (autoloads nil "reftex-vars" "textmodes/reftex-vars.el" (21743
-;;;;;;  190 195328 729000))
+;;;### (autoloads nil "reftex-vars" "textmodes/reftex-vars.el" (21887
+;;;;;;  63409 948052 707000))
 ;;; Generated autoloads from textmodes/reftex-vars.el
 (put 'reftex-vref-is-default 'safe-local-variable (lambda (x) (or (stringp x) 
(symbolp x))))
 (put 'reftex-fref-is-default 'safe-local-variable (lambda (x) (or (stringp x) 
(symbolp x))))
@@ -23517,8 +23599,8 @@ Major mode for editing Ruby code.
 
 ;;;***
 
-;;;### (autoloads nil "ruler-mode" "ruler-mode.el" (21670 32331 885635
-;;;;;;  586000))
+;;;### (autoloads nil "ruler-mode" "ruler-mode.el" (21906 58826 62640
+;;;;;;  200000))
 ;;; Generated autoloads from ruler-mode.el
 (push (purecopy '(ruler-mode 1 6)) package--builtin-versions)
 
@@ -24377,14 +24459,14 @@ Like `mail' command, but display mail buffer in 
another frame.
 
 ;;;***
 
-;;;### (autoloads nil "seq" "emacs-lisp/seq.el" (21843 54898 597238
-;;;;;;  876000))
+;;;### (autoloads nil "seq" "emacs-lisp/seq.el" (21906 58825 966640
+;;;;;;  200000))
 ;;; Generated autoloads from emacs-lisp/seq.el
-(push (purecopy '(seq 1 7)) package--builtin-versions)
+(push (purecopy '(seq 1 8)) package--builtin-versions)
 
 ;;;***
 
-;;;### (autoloads nil "server" "server.el" (21857 42300 487735 894000))
+;;;### (autoloads nil "server" "server.el" (21906 27825 297852 407000))
 ;;; Generated autoloads from server.el
 
 (put 'server-host 'risky-local-variable t)
@@ -24561,8 +24643,8 @@ To work around that, do:
 
 ;;;***
 
-;;;### (autoloads nil "sh-script" "progmodes/sh-script.el" (21862
-;;;;;;  60209 888659 15000))
+;;;### (autoloads nil "sh-script" "progmodes/sh-script.el" (21880
+;;;;;;  3758 862057 0))
 ;;; Generated autoloads from progmodes/sh-script.el
 (push (purecopy '(sh-script 2 0 6)) package--builtin-versions)
 (put 'sh-shell 'safe-local-variable 'symbolp)
@@ -24714,7 +24796,7 @@ Set up file shadowing.
 
 ;;;***
 
-;;;### (autoloads nil "shell" "shell.el" (21678 26426 225333 737000))
+;;;### (autoloads nil "shell" "shell.el" (21896 48221 754207 816000))
 ;;; Generated autoloads from shell.el
 
 (defvar shell-dumb-shell-regexp (purecopy "cmd\\(proxy\\)?\\.exe") "\
@@ -25946,7 +26028,7 @@ Run vsql as an inferior process.
 ;;;***
 
 ;;;### (autoloads nil "srecode/srt-mode" "cedet/srecode/srt-mode.el"
-;;;;;;  (21670 32330 885624 725000))
+;;;;;;  (21891 60465 835679 523000))
 ;;; Generated autoloads from cedet/srecode/srt-mode.el
 
 (autoload 'srecode-template-mode "srecode/srt-mode" "\
@@ -27368,8 +27450,8 @@ Major mode to edit DocTeX files.
 
 ;;;***
 
-;;;### (autoloads nil "texinfmt" "textmodes/texinfmt.el" (21862 60209
-;;;;;;  928657 362000))
+;;;### (autoloads nil "texinfmt" "textmodes/texinfmt.el" (21907 48688
+;;;;;;  825360 195000))
 ;;; Generated autoloads from textmodes/texinfmt.el
 
 (autoload 'texinfo-format-buffer "texinfmt" "\
@@ -27521,8 +27603,8 @@ Compose Thai characters in the current buffer.
 
 ;;;***
 
-;;;### (autoloads nil "thingatpt" "thingatpt.el" (21670 32331 885635
-;;;;;;  586000))
+;;;### (autoloads nil "thingatpt" "thingatpt.el" (21882 2522 257758
+;;;;;;  815000))
 ;;; Generated autoloads from thingatpt.el
 
 (autoload 'forward-thing "thingatpt" "\
@@ -27761,7 +27843,7 @@ variable will be set to the representation.
 
 ;;;***
 
-;;;### (autoloads nil "time" "time.el" (21670 32331 885635 586000))
+;;;### (autoloads nil "time" "time.el" (21907 48688 857360 195000))
 ;;; Generated autoloads from time.el
 
 (defvar display-time-day-and-date nil "\
@@ -28079,7 +28161,7 @@ relative only to the time worked today, and not to past 
time.
 ;;;***
 
 ;;;### (autoloads nil "titdic-cnv" "international/titdic-cnv.el"
-;;;;;;  (21670 32331 385639 720000))
+;;;;;;  (21874 379 470923 336000))
 ;;; Generated autoloads from international/titdic-cnv.el
 
 (autoload 'titdic-convert "titdic-cnv" "\
@@ -28101,7 +28183,7 @@ To get complete usage, invoke \"emacs -batch -f 
batch-titdic-convert -h\".
 
 ;;;***
 
-;;;### (autoloads nil "tmm" "tmm.el" (21670 32331 885635 586000))
+;;;### (autoloads nil "tmm" "tmm.el" (21907 48688 873360 195000))
 ;;; Generated autoloads from tmm.el
  (define-key global-map "\M-`" 'tmm-menubar)
  (define-key global-map [menu-bar mouse-1] 'tmm-menubar-mouse)
@@ -28143,8 +28225,8 @@ Its value should be an event that has a binding in MENU.
 
 ;;;***
 
-;;;### (autoloads nil "todo-mode" "calendar/todo-mode.el" (21855
-;;;;;;  576 567563 758000))
+;;;### (autoloads nil "todo-mode" "calendar/todo-mode.el" (21893
+;;;;;;  15793 471985 415000))
 ;;; Generated autoloads from calendar/todo-mode.el
 
 (autoload 'todo-show "todo-mode" "\
@@ -28342,7 +28424,7 @@ the output buffer or changing the window configuration.
 
 ;;;***
 
-;;;### (autoloads nil "tramp" "net/tramp.el" (21865 36399 47685 802000))
+;;;### (autoloads nil "tramp" "net/tramp.el" (21869 33455 50802 161000))
 ;;; Generated autoloads from net/tramp.el
 
 (defvar tramp-mode t "\
@@ -29988,8 +30070,8 @@ case, and the process object in the asynchronous case.
 
 ;;;***
 
-;;;### (autoloads nil "vc-git" "vc/vc-git.el" (21850 34915 127238
-;;;;;;  802000))
+;;;### (autoloads nil "vc-git" "vc/vc-git.el" (21888 48854 948181
+;;;;;;  796000))
 ;;; Generated autoloads from vc/vc-git.el
  (defun vc-git-registered (file)
   "Return non-nil if FILE is registered with git."
@@ -30028,8 +30110,8 @@ Name of the monotone directory's format file.")
 
 ;;;***
 
-;;;### (autoloads nil "vc-rcs" "vc/vc-rcs.el" (21826 49714 91236
-;;;;;;  252000))
+;;;### (autoloads nil "vc-rcs" "vc/vc-rcs.el" (21896 48221 810207
+;;;;;;  816000))
 ;;; Generated autoloads from vc/vc-rcs.el
 
 (defvar vc-rcs-master-templates (purecopy '("%sRCS/%s,v" "%s%s,v" "%sRCS/%s")) 
"\
@@ -30075,8 +30157,8 @@ For a description of possible values, see 
`vc-check-master-templates'.")
 
 ;;;***
 
-;;;### (autoloads nil "vc-svn" "vc/vc-svn.el" (21744 21055 525326
-;;;;;;  515000))
+;;;### (autoloads nil "vc-svn" "vc/vc-svn.el" (21903 51634 294370
+;;;;;;  580000))
 ;;; Generated autoloads from vc/vc-svn.el
  (defun vc-svn-registered (f)
   (let ((admin-dir (cond ((and (eq system-type 'windows-nt)
@@ -30288,8 +30370,8 @@ Key bindings specific to `verilog-mode-map' are:
 
 ;;;***
 
-;;;### (autoloads nil "vhdl-mode" "progmodes/vhdl-mode.el" (21866
-;;;;;;  57262 717944 751000))
+;;;### (autoloads nil "vhdl-mode" "progmodes/vhdl-mode.el" (21907
+;;;;;;  48688 801360 195000))
 ;;; Generated autoloads from progmodes/vhdl-mode.el
 
 (autoload 'vhdl-mode "vhdl-mode" "\
@@ -31162,8 +31244,8 @@ Turn on Viper emulation of Vi in Emacs. See Info node 
`(viper)Top'.
 
 ;;;***
 
-;;;### (autoloads nil "warnings" "emacs-lisp/warnings.el" (21670
-;;;;;;  32330 885624 725000))
+;;;### (autoloads nil "warnings" "emacs-lisp/warnings.el" (21884
+;;;;;;  813 562651 696000))
 ;;; Generated autoloads from emacs-lisp/warnings.el
 
 (defvar warning-prefix-function nil "\
@@ -31717,8 +31799,8 @@ if ARG is omitted or nil.
 
 ;;;***
 
-;;;### (autoloads nil "wid-edit" "wid-edit.el" (21862 60209 928657
-;;;;;;  362000))
+;;;### (autoloads nil "wid-edit" "wid-edit.el" (21891 60465 939679
+;;;;;;  523000))
 ;;; Generated autoloads from wid-edit.el
 
 (autoload 'widgetp "wid-edit" "\
@@ -31960,8 +32042,8 @@ If LIMIT is non-nil, then do not consider characters 
beyond LIMIT.
 
 ;;;***
 
-;;;### (autoloads nil "xref" "progmodes/xref.el" (21861 5946 771514
-;;;;;;  868000))
+;;;### (autoloads nil "xref" "progmodes/xref.el" (21903 51634 290370
+;;;;;;  580000))
 ;;; Generated autoloads from progmodes/xref.el
 
 (autoload 'xref-pop-marker-stack "xref" "\
@@ -32185,23 +32267,31 @@ Zone out, completely.
 ;;;;;;  "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"
-;;;;;;  "leim/quail/arabic.el" "leim/quail/croatian.el" 
"leim/quail/cyril-jis.el"
-;;;;;;  "leim/quail/cyrillic.el" "leim/quail/czech.el" "leim/quail/ethiopic.el"
-;;;;;;  "leim/quail/georgian.el" "leim/quail/greek.el" 
"leim/quail/hanja-jis.el"
-;;;;;;  "leim/quail/hanja.el" "leim/quail/hanja3.el" "leim/quail/hebrew.el"
-;;;;;;  "leim/quail/indian.el" "leim/quail/ipa-praat.el" "leim/quail/ipa.el"
-;;;;;;  "leim/quail/japanese.el" "leim/quail/lao.el" "leim/quail/latin-alt.el"
-;;;;;;  "leim/quail/latin-ltx.el" "leim/quail/latin-post.el" 
"leim/quail/latin-pre.el"
-;;;;;;  "leim/quail/lrt.el" "leim/quail/persian.el" "leim/quail/py-punct.el"
-;;;;;;  "leim/quail/pypunct-b5.el" "leim/quail/rfc1345.el" 
"leim/quail/sgml-input.el"
-;;;;;;  "leim/quail/sisheng.el" "leim/quail/slovak.el" 
"leim/quail/symbol-ksc.el"
-;;;;;;  "leim/quail/thai.el" "leim/quail/tibetan.el" "leim/quail/viqr.el"
-;;;;;;  "leim/quail/vntelex.el" "leim/quail/vnvni.el" "leim/quail/welsh.el"
-;;;;;;  "loadup.el" "mail/blessmail.el" "mail/mailheader.el" "mail/mspools.el"
-;;;;;;  "mail/rfc2368.el" "mail/rfc822.el" "mail/rmail-spam-filter.el"
+;;;;;;  "international/charscript.el" "international/fontset.el"
+;;;;;;  "international/iso-ascii.el" "international/ja-dic-cnv.el"
+;;;;;;  "international/ja-dic-utl.el" "international/ogonek.el" 
"international/uni-bidi.el"
+;;;;;;  "international/uni-brackets.el" "international/uni-category.el"
+;;;;;;  "international/uni-combining.el" "international/uni-comment.el"
+;;;;;;  "international/uni-decimal.el" "international/uni-decomposition.el"
+;;;;;;  "international/uni-digit.el" "international/uni-lowercase.el"
+;;;;;;  "international/uni-mirrored.el" "international/uni-name.el"
+;;;;;;  "international/uni-numeric.el" "international/uni-old-name.el"
+;;;;;;  "international/uni-titlecase.el" "international/uni-uppercase.el"
+;;;;;;  "kermit.el" "language/hanja-util.el" "language/thai-word.el"
+;;;;;;  "ldefs-boot.el" "leim/quail/arabic.el" "leim/quail/croatian.el"
+;;;;;;  "leim/quail/cyril-jis.el" "leim/quail/cyrillic.el" 
"leim/quail/czech.el"
+;;;;;;  "leim/quail/ethiopic.el" "leim/quail/georgian.el" "leim/quail/greek.el"
+;;;;;;  "leim/quail/hanja-jis.el" "leim/quail/hanja.el" "leim/quail/hanja3.el"
+;;;;;;  "leim/quail/hebrew.el" "leim/quail/indian.el" "leim/quail/ipa-praat.el"
+;;;;;;  "leim/quail/ipa.el" "leim/quail/japanese.el" "leim/quail/lao.el"
+;;;;;;  "leim/quail/latin-alt.el" "leim/quail/latin-ltx.el" 
"leim/quail/latin-post.el"
+;;;;;;  "leim/quail/latin-pre.el" "leim/quail/lrt.el" "leim/quail/persian.el"
+;;;;;;  "leim/quail/py-punct.el" "leim/quail/pypunct-b5.el" 
"leim/quail/rfc1345.el"
+;;;;;;  "leim/quail/sgml-input.el" "leim/quail/sisheng.el" 
"leim/quail/slovak.el"
+;;;;;;  "leim/quail/symbol-ksc.el" "leim/quail/thai.el" "leim/quail/tibetan.el"
+;;;;;;  "leim/quail/viqr.el" "leim/quail/vntelex.el" "leim/quail/vnvni.el"
+;;;;;;  "leim/quail/welsh.el" "loadup.el" "mail/blessmail.el" 
"mail/mailheader.el"
+;;;;;;  "mail/mspools.el" "mail/rfc2368.el" "mail/rfc822.el" 
"mail/rmail-spam-filter.el"
 ;;;;;;  "mail/rmailedit.el" "mail/rmailkwd.el" "mail/rmailmm.el"
 ;;;;;;  "mail/rmailmsc.el" "mail/rmailsort.el" "mail/rmailsum.el"
 ;;;;;;  "mail/undigest.el" "mh-e/mh-acros.el" "mh-e/mh-alias.el"
@@ -32276,7 +32366,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") (21868 12847 464673 840000))
+;;;;;;  "x-dnd.el") (21907 48688 857360 195000))
 
 ;;;***
 
diff --git a/lisp/leim/quail/lrt.el b/lisp/leim/quail/lrt.el
index 081535a..342b52d 100644
--- a/lisp/leim/quail/lrt.el
+++ b/lisp/leim/quail/lrt.el
@@ -34,7 +34,7 @@
 ;; key sequence:
 ;;     consonant [+ semi-vowel-sign-lo ] + vowel [+ maa-sakod ] [+ tone-mark ]
 
-(defun quail-lao-update-translation (control-flag)
+(defun quail-lrt-update-translation (control-flag)
   (if (integerp control-flag)
       ;; Non-composable character typed.
       (setq quail-current-str
@@ -59,7 +59,7 @@
 `\\' (backslash) + `$'         => ຯ            LAO ELLIPSIS
 "
  nil 'forget-last-selection 'deterministic 'kbd-translate 'show-layout
-  nil nil nil 'quail-lao-update-translation nil t)
+  nil nil nil 'quail-lrt-update-translation nil t)
 
 ;; LRT (Lao Roman Transcription) input method accepts the following
 ;; key sequence:
diff --git a/lisp/loadup.el b/lisp/loadup.el
index 84fa327..fef111f 100644
--- a/lisp/loadup.el
+++ b/lisp/loadup.el
@@ -179,8 +179,8 @@
 (load "language/romanian")
 (load "language/greek")
 (load "language/hebrew")
-(load "international/cp51932.el")
-(load "international/eucjp-ms.el")
+(load "international/cp51932")
+(load "international/eucjp-ms")
 (load "language/japanese")
 (load "language/korean")
 (load "language/lao")
diff --git a/lisp/ls-lisp.el b/lisp/ls-lisp.el
index 0ddae24..70307f6 100644
--- a/lisp/ls-lisp.el
+++ b/lisp/ls-lisp.el
@@ -144,7 +144,7 @@ value to get similar behavior.
 When this option is non-nil, and `ls-lisp-use-string-collate' is also
 non-nil, the collation order produced on MS-Windows will ignore
 punctuation and symbol characters, which will, for example, place
-\`.foo' near `foo'.  See the documentation of `string-collate-lessp'
+`.foo' near `foo'.  See the documentation of `string-collate-lessp'
 and `w32-collate-ignore-punctuation' for more details.
 
 This option is ignored on platforms other than MS-Windows; to
@@ -237,13 +237,13 @@ to fail to line up, e.g. if month names are not all of 
the same length."
   :type 'boolean
   :group 'ls-lisp)
 
-(defvar ls-lisp-uid-d-fmt "-%d"
+(defvar ls-lisp-uid-d-fmt " %d"
   "Format to display integer UIDs.")
-(defvar ls-lisp-uid-s-fmt "-%s"
+(defvar ls-lisp-uid-s-fmt " %s"
   "Format to display user names.")
-(defvar ls-lisp-gid-d-fmt "-%d"
+(defvar ls-lisp-gid-d-fmt " %d"
   "Format to display integer GIDs.")
-(defvar ls-lisp-gid-s-fmt "-%s"
+(defvar ls-lisp-gid-s-fmt " %s"
   "Format to display user group names.")
 (defvar ls-lisp-filesize-d-fmt "%d"
   "Format to display integer file sizes.")
@@ -539,7 +539,7 @@ Responds to the window width as ls should but may not!"
   "Return t if string S1 should sort before string S2.
 Case is significant if `ls-lisp-ignore-case' is nil.
 Uses `string-collate-lessp' if `ls-lisp-use-string-collate' is non-nil,
-\`compare-strings' otherwise.
+`compare-strings' otherwise.
 On GNU/Linux systems, if the locale specifies UTF-8 as the codeset,
 the sorting order will place together file names that differ only
 by punctuation characters, like `.emacs' and `emacs'.  To have a
diff --git a/lisp/macros.el b/lisp/macros.el
index bf1aa30..101f8b4 100644
--- a/lisp/macros.el
+++ b/lisp/macros.el
@@ -39,14 +39,14 @@ The symbol's function definition becomes the keyboard macro 
string.
 Such a \"function\" cannot be called from Lisp, but it is a valid editor 
command."
   (interactive "SName for last kbd macro: ")
   (or last-kbd-macro
-      (error "No keyboard macro defined"))
+      (user-error "No keyboard macro defined"))
   (and (fboundp symbol)
        (not (stringp (symbol-function symbol)))
        (not (vectorp (symbol-function symbol)))
-       (error "Function %s is already defined and not a keyboard macro"
+       (user-error "Function %s is already defined and not a keyboard macro"
              symbol))
   (if (string-equal symbol "")
-      (error "No command name given"))
+      (user-error "No command name given"))
   (fset symbol last-kbd-macro))
 
 ;;;###autoload
@@ -166,7 +166,7 @@ Your options are: \\<query-replace-map>
   (interactive "P")
   (or executing-kbd-macro
       defining-kbd-macro
-      (error "Not defining or executing kbd macro"))
+      (user-error "Not defining or executing kbd macro"))
   (if flag
       (let (executing-kbd-macro defining-kbd-macro)
        (recursive-edit))
@@ -260,7 +260,7 @@ and then select the region of un-tablified names and use
   (or macro
       (progn
        (if (null last-kbd-macro)
-           (error "No keyboard macro has been defined"))
+           (user-error "No keyboard macro has been defined"))
        (setq macro last-kbd-macro)))
   (save-excursion
     (let ((end-marker (copy-marker bottom))
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index a1b6d95..6a2ff63 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -683,7 +683,7 @@ by \"Save Options\" in Custom buffers.")
     (dolist (elt '(scroll-bar-mode
                   debug-on-quit debug-on-error
                   ;; Somehow this works, when tool-bar and menu-bar don't.
-                  tooltip-mode
+                  tooltip-mode window-divider-mode
                   save-place uniquify-buffer-name-style fringe-mode
                   indicate-empty-lines indicate-buffer-boundaries
                   case-fold-search font-use-system-font
@@ -711,6 +711,95 @@ by \"Save Options\" in Custom buffers.")
 
 ;; The "Show/Hide" submenu of menu "Options"
 
+(defun menu-bar-window-divider-customize ()
+  "Show customization buffer for `window-divider' group."
+  (interactive)
+  (customize-group 'window-divider))
+
+(defun menu-bar-bottom-and-right-window-divider ()
+  "Display dividers on the bottom and right of each window."
+  (interactive)
+  (customize-set-variable 'window-divider-default-places t)
+  (window-divider-mode 1))
+
+(defun menu-bar-right-window-divider ()
+  "Display dividers only on the right of each window."
+  (interactive)
+  (customize-set-variable 'window-divider-default-places 'right-only)
+  (window-divider-mode 1))
+
+(defun menu-bar-bottom-window-divider ()
+  "Display dividers only at the bottom of each window."
+  (interactive)
+  (customize-set-variable 'window-divider-default-places 'bottom-only)
+  (window-divider-mode 1))
+
+(defun menu-bar-no-window-divider ()
+  "Do not display window dividers."
+  (interactive)
+  (window-divider-mode -1))
+
+;; For the radio buttons below we check whether the respective dividers
+;; are displayed on the selected frame.  This is not fully congruent
+;; with `window-divider-mode' but makes the menu entries work also when
+;; dividers are displayed by manipulating frame parameters directly.
+(defvar menu-bar-showhide-window-divider-menu
+  (let ((menu (make-sparse-keymap "Window Divider")))
+    (bindings--define-key menu [customize]
+      '(menu-item "Customize" menu-bar-window-divider-customize
+                  :help "Customize window dividers"
+                  :visible (memq (window-system) '(x w32))))
+
+    (bindings--define-key menu [bottom-and-right]
+      '(menu-item "Bottom and Right"
+                  menu-bar-bottom-and-right-window-divider
+                  :help "Display window divider on the bottom and right of 
each window"
+                  :visible (memq (window-system) '(x w32))
+                  :button (:radio
+                          . (and (window-divider-width-valid-p
+                                  (cdr (assq 'bottom-divider-width
+                                             (frame-parameters))))
+                                 (window-divider-width-valid-p
+                                  (cdr (assq 'right-divider-width
+                                             (frame-parameters))))))))
+    (bindings--define-key menu [right-only]
+      '(menu-item "Right Only"
+                  menu-bar-right-window-divider
+                  :help "Display window divider on the right of each window 
only"
+                  :visible (memq (window-system) '(x w32))
+                  :button (:radio
+                          . (and (not (window-divider-width-valid-p
+                                       (cdr (assq 'bottom-divider-width
+                                                  (frame-parameters)))))
+                                 (window-divider-width-valid-p
+                                  (cdr (assq 'right-divider-width
+                                                    (frame-parameters))))))))
+    (bindings--define-key menu [bottom-only]
+      '(menu-item "Bottom Only"
+                  menu-bar-bottom-window-divider
+                  :help "Display window divider on the bottom of each window 
only"
+                  :visible (memq (window-system) '(x w32))
+                  :button (:radio
+                          . (and (window-divider-width-valid-p
+                                  (cdr (assq 'bottom-divider-width
+                                             (frame-parameters))))
+                                 (not (window-divider-width-valid-p
+                                       (cdr (assq 'right-divider-width
+                                                  (frame-parameters)))))))))
+    (bindings--define-key menu [no-divider]
+      '(menu-item "None"
+                  menu-bar-no-window-divider
+                  :help "Do not display window dividers"
+                  :visible (memq (window-system) '(x w32))
+                  :button (:radio
+                          . (and (not (window-divider-width-valid-p
+                                       (cdr (assq 'bottom-divider-width
+                                                  (frame-parameters)))))
+                                 (not (window-divider-width-valid-p
+                                       (cdr (assq 'right-divider-width
+                                                  (frame-parameters)))))))))
+    menu))
+
 (defun menu-bar-showhide-fringe-ind-customize ()
   "Show customization buffer for `indicate-buffer-boundaries'."
   (interactive)
@@ -1072,6 +1161,10 @@ mail status in mode line"))
                                   (frame-visible-p
                                    (symbol-value 'speedbar-frame))))))
 
+    (bindings--define-key menu [showhide-window-divider]
+      `(menu-item "Window Divider" ,menu-bar-showhide-window-divider-menu
+                  :visible (memq (window-system) '(x w32))))
+
     (bindings--define-key menu [showhide-fringe]
       `(menu-item "Fringe" ,menu-bar-showhide-fringe-menu
                   :visible (display-graphic-p)))
@@ -2258,7 +2351,7 @@ If nil, the current mouse position is used."
     ;; Event.
     ((pred eventp)
      (popup-menu-normalize-position (event-end position)))
-    (t position)))
+    (_ position)))
 
 (defcustom tty-menu-open-use-tmm nil
   "If non-nil, \\[menu-bar-open] on a TTY will invoke `tmm-menubar'.
@@ -2283,7 +2376,7 @@ This function decides which method to use to access the 
menu
 depending on FRAME's terminal device.  On X displays, it calls
 `x-menu-bar-open'; on Windows, `w32-menu-bar-open'; otherwise it
 calls either `popup-menu' or `tmm-menubar' depending on whether
-\`tty-menu-open-use-tmm' is nil or not.
+`tty-menu-open-use-tmm' is nil or not.
 
 If FRAME is nil or not given, use the selected frame."
   (interactive)
diff --git a/lisp/mh-e/mh-comp.el b/lisp/mh-e/mh-comp.el
index 5875b41..a8c5e33 100644
--- a/lisp/mh-e/mh-comp.el
+++ b/lisp/mh-e/mh-comp.el
@@ -91,7 +91,7 @@ user's MH directory, then in the system MH lib directory.")
 Default is \"replgroupcomps\".
 
 This file is used to form replies to the sender and all recipients of
-a message. Only used if `(mh-variant-p 'nmh)' is non-nil.
+a message. Only used if ‘(mh-variant-p 'nmh)’ is non-nil.
 If not an absolute file name, the file is searched for first in the
 user's MH directory, then in the system MH lib directory.")
 
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index 60b89b6..411416b 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -2045,7 +2045,7 @@ This respects the wrapper hook 
`completion-in-region-functions'."
 
 (defvar completion-at-point-functions '(tags-completion-at-point-function)
   "Special hook to find the completion table for the thing at point.
-Each function on this hook is called in turns without any argument and should
+Each function on this hook is called in turn without any argument and should
 return either nil to mean that it is not applicable at point,
 or a function of no argument to perform completion (discouraged),
 or a list of the form (START END COLLECTION . PROPS) where
@@ -2572,7 +2572,7 @@ and `read-file-name-function'."
 (defun read-file-name-default (prompt &optional dir default-filename mustmatch 
initial predicate)
   "Default method for reading file names.
 See `read-file-name' for the meaning of the arguments."
-  (unless dir (setq dir default-directory))
+  (unless dir (setq dir (or default-directory "~/")))
   (unless (file-name-absolute-p dir) (setq dir (expand-file-name dir)))
   (unless default-filename
     (setq default-filename (if initial (expand-file-name initial dir)
diff --git a/lisp/mouse-drag.el b/lisp/mouse-drag.el
index 88838ed..945c305 100644
--- a/lisp/mouse-drag.el
+++ b/lisp/mouse-drag.el
@@ -222,6 +222,8 @@ To test this function, evaluate:
         (col-scrolling-p (mouse-drag-should-do-col-scrolling)))
     (select-window start-window)
     (track-mouse
+      ;; Don't change the mouse pointer shape while we drag.
+      (setq track-mouse 'dragging)
       (while (progn
               (setq event (read-event)
                     end (event-end event)
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 7854d32..221d30b 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -338,9 +338,12 @@ This command must be bound to a mouse click."
          (first-line window-min-height)
          (last-line (- (window-height) window-min-height)))
       (if (< last-line first-line)
-         (error "Window too short to split")
-       (split-window-vertically
-        (min (max new-height first-line) last-line))))))
+         (user-error "Window too short to split")
+        ;; Bind `window-combination-resize' to nil so we are sure to get
+        ;; the split right at the line clicked on.
+        (let (window-combination-resize)
+          (split-window-vertically
+           (min (max new-height first-line) last-line)))))))
 
 (defun mouse-split-window-horizontally (click)
   "Select Emacs window mouse is on, then split it horizontally in half.
@@ -354,9 +357,12 @@ This command must be bound to a mouse click."
          (first-col window-min-width)
          (last-col (- (window-width) window-min-width)))
       (if (< last-col first-col)
-         (error "Window too narrow to split")
-       (split-window-horizontally
-        (min (max new-width first-col) last-col))))))
+         (user-error "Window too narrow to split")
+        ;; Bind `window-combination-resize' to nil so we are sure to get
+        ;; the split right at the column clicked on.
+       (let (window-combination-resize)
+          (split-window-horizontally
+           (min (max new-width first-col) last-col)))))))
 
 (defun mouse-drag-line (start-event line)
   "Drag a mode line, header line, or vertical line with the mouse.
@@ -468,8 +474,10 @@ must be one of the symbols `header', `mode', or 
`vertical'."
                  (setq dragged t)
                  (adjust-window-trailing-edge window growth nil t))
                (setq last-position position))))))
-      ;; Start tracking.
-      (setq track-mouse t)
+      ;; Start tracking.  The special value 'dragging' signals the
+      ;; display engine to freeze the mouse pointer shape for as long
+      ;; as we drag.
+      (setq track-mouse 'dragging)
       ;; Loop reading events and sampling the position of the mouse.
       (setq exitfun
            (set-transient-map
@@ -1913,20 +1921,25 @@ choose a font."
 ;; vertical-line prevents Emacs from signaling an error when the mouse
 ;; button is released after dragging these lines, on non-toolkit
 ;; versions.
-(global-set-key [mode-line mouse-1] 'mouse-select-window)
-(global-set-key [mode-line drag-mouse-1] 'mouse-select-window)
-(global-set-key [mode-line down-mouse-1] 'mouse-drag-mode-line)
 (global-set-key [header-line down-mouse-1] 'mouse-drag-header-line)
 (global-set-key [header-line mouse-1] 'mouse-select-window)
+;; (global-set-key [mode-line drag-mouse-1] 'mouse-select-window)
+(global-set-key [mode-line down-mouse-1] 'mouse-drag-mode-line)
+(global-set-key [mode-line mouse-1] 'mouse-select-window)
 (global-set-key [mode-line mouse-2] 'mouse-delete-other-windows)
 (global-set-key [mode-line mouse-3] 'mouse-delete-window)
 (global-set-key [mode-line C-mouse-2] 'mouse-split-window-horizontally)
 (global-set-key [vertical-scroll-bar C-mouse-2] 'mouse-split-window-vertically)
-(global-set-key [vertical-line C-mouse-2] 'mouse-split-window-vertically)
+(global-set-key [horizontal-scroll-bar C-mouse-2] 
'mouse-split-window-horizontally)
 (global-set-key [vertical-line down-mouse-1] 'mouse-drag-vertical-line)
+(global-set-key [vertical-line mouse-1] 'mouse-select-window)
+(global-set-key [vertical-line C-mouse-2] 'mouse-split-window-vertically)
 (global-set-key [right-divider down-mouse-1] 'mouse-drag-vertical-line)
+(global-set-key [right-divider mouse-1] 'ignore)
+(global-set-key [right-divider C-mouse-2] 'mouse-split-window-vertically)
 (global-set-key [bottom-divider down-mouse-1] 'mouse-drag-mode-line)
-(global-set-key [vertical-line mouse-1] 'mouse-select-window)
+(global-set-key [bottom-divider mouse-1] 'ignore)
+(global-set-key [bottom-divider C-mouse-2] 'mouse-split-window-horizontally)
 
 (provide 'mouse)
 
diff --git a/lisp/net/newst-treeview.el b/lisp/net/newst-treeview.el
index a964750..eca2a9c 100644
--- a/lisp/net/newst-treeview.el
+++ b/lisp/net/newst-treeview.el
@@ -1,10 +1,9 @@
-;;; newst-treeview.el --- Treeview frontend for newsticker.
+;;; newst-treeview.el --- Treeview frontend for newsticker.  -*- 
lexical-binding:t -*-
 
 ;; Copyright (C) 2008-2015 Free Software Foundation, Inc.
 
 ;; Author:      Ulf Jasper <address@hidden>
 ;; Filename:    newst-treeview.el
-;; URL:         http://www.nongnu.org/newsticker
 ;; Created:     2007
 ;; Keywords:    News, RSS, Atom
 ;; Package:     newsticker
@@ -219,7 +218,7 @@ their id stays constant."
     ;;(message "%s/%s %s/%s" (widget-get node1 :tag) (widget-get node2 :tag)
     ;;       (or id1 -1) (or id2 -1))
     (or (newsticker--treeview-ids-eq id1 id2)
-        (string= (widget-get node1 :tag) (widget-get node2 :tag)))))
+        (string= (widget-get node1 :nt-feed) (widget-get node2 :nt-feed)))))
 
 (defun newsticker--treeview-do-get-node-of-feed (feed-name startnode)
    "Recursively search node for feed FEED-NAME starting from STARTNODE."
@@ -259,8 +258,10 @@ their id stays constant."
 
 ;; ======================================================================
 
-(unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))
+(unless (fboundp 'declare-function) (defmacro declare-function (&rest _)))
 (declare-function w3m-toggle-inline-images "ext:w3m" (&optional force 
no-cache))
+(defvar w3m-fill-column)
+(defvar w3-maximum-line-length)
 
 (defun newsticker--treeview-render-text (start end)
   "Render text between markers START and END."
@@ -351,7 +352,7 @@ If string SHOW-FEED is non-nil it is shown in the item 
string."
       (remove-overlays))))
 
 (defun newsticker--treeview-list-items-with-age-callback (widget
-                                                          changed-widget
+                                                          _changed-widget
                                                           &rest ages)
   "Fill newsticker treeview list window with items of certain age.
 This is a callback function for the treeview nodes.
@@ -360,7 +361,7 @@ Argument CHANGED-WIDGET is the widget that actually has 
changed.
 Optional argument AGES is the list of ages that are to be shown."
   (newsticker--treeview-list-clear)
   (widget-put widget :nt-selected t)
-  (apply 'newsticker--treeview-list-items-with-age ages))
+  (apply #'newsticker--treeview-list-items-with-age ages))
 
 (defun newsticker--treeview-list-items-with-age (&rest ages)
   "Actually fill newsticker treeview list window with items of certain age.
@@ -377,7 +378,7 @@ AGES is the list of ages that are to be shown."
   (newsticker--treeview-list-update nil))
 
 (defun newsticker--treeview-list-new-items (widget changed-widget
-                                                   &optional event)
+                                                   &optional _event)
   "Fill newsticker treeview list window with new items.
 This is a callback function for the treeview nodes.
 Argument WIDGET is the calling treeview widget.
@@ -390,7 +391,7 @@ Optional argument EVENT is the mouse event that triggered 
this action."
    "This is a virtual feed containing all new items"))
 
 (defun newsticker--treeview-list-immortal-items (widget changed-widget
-                                                        &optional event)
+                                                        &optional _event)
   "Fill newsticker treeview list window with immortal items.
 This is a callback function for the treeview nodes.
 Argument WIDGET is the calling treeview widget.
@@ -403,7 +404,7 @@ Optional argument EVENT is the mouse event that triggered 
this action."
    "This is a virtual feed containing all immortal items."))
 
 (defun newsticker--treeview-list-obsolete-items (widget changed-widget
-                                                        &optional event)
+                                                        &optional _event)
   "Fill newsticker treeview list window with obsolete items.
 This is a callback function for the treeview nodes.
 Argument WIDGET is the calling treeview widget.
@@ -455,8 +456,8 @@ Optional argument EVENT is the mouse event that triggered 
this action."
              (cdr (newsticker--cache-get-feed (intern feed-name)))))
       (newsticker--treeview-list-update nil))))
 
-(defun newsticker--treeview-list-feed-items (widget changed-widget
-                                                    &optional event)
+(defun newsticker--treeview-list-feed-items (widget _changed-widget
+                                                    &optional _event)
   "Callback function for listing feed items.
 Argument WIDGET is the calling treeview widget.
 Argument CHANGED-WIDGET is the widget that actually has changed.
@@ -583,11 +584,10 @@ The sort function is chosen according to the value of
 (defun newsticker--treeview-list-update-highlight ()
   "Update the highlight in the treeview list buffer."
   (newsticker--treeview-list-clear-highlight)
-    (let (pos num-lines)
-      (with-current-buffer (newsticker--treeview-list-buffer)
-        (let ((inhibit-read-only t))
-          (put-text-property (point-at-bol) (point-at-eol) :nt-selected t))
-        (newsticker--treeview-list-update-faces))))
+  (with-current-buffer (newsticker--treeview-list-buffer)
+    (let ((inhibit-read-only t))
+      (put-text-property (point-at-bol) (point-at-eol) :nt-selected t))
+    (newsticker--treeview-list-update-faces)))
 
 (defun newsticker--treeview-list-highlight-start ()
   "Return position of selection in treeview list buffer."
@@ -664,23 +664,22 @@ for the button."
 (defun newsticker--treeview-list-select (item)
   "Select ITEM in treeview's list buffer."
   (newsticker--treeview-list-clear-highlight)
-    (let (pos num-lines)
-      (save-current-buffer
-        (set-buffer (newsticker--treeview-list-buffer))
-        (goto-char (point-min))
-        (catch 'found
-          (while t
-            (let ((it (get-text-property (point) :nt-item)))
-              (when (eq it item)
-                (newsticker--treeview-list-update-highlight)
-                (newsticker--treeview-list-update-faces)
-                (newsticker--treeview-item-show
-                 item (get-text-property (point) :nt-feed))
-                (throw 'found t)))
-            (forward-line 1)
-            (when (eobp)
-              (goto-char (point-min))
-              (throw 'found nil)))))))
+  (save-current-buffer
+    (set-buffer (newsticker--treeview-list-buffer))
+    (goto-char (point-min))
+    (catch 'found
+      (while t
+        (let ((it (get-text-property (point) :nt-item)))
+          (when (eq it item)
+            (newsticker--treeview-list-update-highlight)
+            (newsticker--treeview-list-update-faces)
+            (newsticker--treeview-item-show
+             item (get-text-property (point) :nt-feed))
+            (throw 'found t)))
+        (forward-line 1)
+        (when (eobp)
+          (goto-char (point-min))
+          (throw 'found nil))))))
 
 ;; ======================================================================
 ;;; item window
@@ -863,8 +862,8 @@ Callback function for tree widget that adds nodes for feeds 
and subgroups."
       (widget-put icon :leaf-icon 'tree-widget-leaf-icon)
       (tree-widget-icon-create icon))))
 
-(defun newsticker--treeview-tree-expand-status (tree &optional changed-widget
-                                                     event)
+(defun newsticker--treeview-tree-expand-status (tree &optional _changed-widget
+                                                     _event)
   "Expand the vfeed TREE.
 Optional arguments CHANGED-WIDGET and EVENT are ignored."
   (tree-widget-set-theme "folder")
@@ -916,7 +915,7 @@ Optional arguments CHANGED-WIDGET and EVENT are ignored."
                            :tag (newsticker--treeview-propertize-tag
                                  "Feeds" 0 "feeds")
                            :expander 'newsticker--treeview-tree-expand
-                           :expander-p (lambda (&rest ignore) t)
+                           :expander-p (lambda (&rest _) t)
                            :leaf-icon 'newsticker--tree-widget-leaf-icon
                            :nt-group (cdr newsticker-groups)
                            :nt-id "feeds"
@@ -927,7 +926,7 @@ Optional arguments CHANGED-WIDGET and EVENT are ignored."
                            :tag (newsticker--treeview-propertize-tag
                                  "Virtual Feeds" 0 "vfeeds")
                            :expander 'newsticker--treeview-tree-expand-status
-                           :expander-p (lambda (&rest ignore) t)
+                           :expander-p (lambda (&rest _) t)
                            :leaf-icon 'newsticker--tree-widget-leaf-icon
                            :nt-id "vfeeds"
                            :keep '(:nt-id)
@@ -990,10 +989,10 @@ Optional argument NT-ID is added to the tag's properties."
 (defun newsticker--stat-num-items-for-group (feed-name-symbol &rest ages)
   "Count number of items in feed FEED-NAME-SYMBOL that have an age matching 
AGES."
   ;;(message "newsticker--stat-num-items-for-group %s %s" feed-name-symbol 
ages)
-  (let ((result (apply 'newsticker--stat-num-items feed-name-symbol ages)))
+  (let ((result (apply #'newsticker--stat-num-items feed-name-symbol ages)))
     (mapc (lambda (f-n)
             (setq result (+ result
-                            (apply 'newsticker--stat-num-items (intern f-n)
+                            (apply #'newsticker--stat-num-items (intern f-n)
                                    ages))))
           (newsticker--group-get-feeds
            (newsticker--group-get-group (symbol-name feed-name-symbol)) t))
@@ -1019,7 +1018,7 @@ the feed is a virtual feed."
     num-new))
 
 (defun newsticker--treeview-tree-update-tag (w &optional recursive
-                                               &rest ignore)
+                                               &rest _ignore)
   "Update tag for tree widget W.
 If RECURSIVE is non-nil recursively update parent widgets as
 well.  Argument IGNORE is ignored.  Note that this function, if
@@ -1042,8 +1041,7 @@ that case."
       (widget-put w :num-new num-new)
       (widget-put w :tag tag)
       (when (marker-position (widget-get w :from))
-        (let ((p (point))
-              (notify (widget-get w :notify)))
+        (let ((p (point)))
           ;; FIXME: This moves point!!!!
           (with-current-buffer (newsticker--treeview-tree-buffer)
             (widget-value-set w (widget-value w)))
@@ -1057,9 +1055,9 @@ that case."
         (newsticker--treeview-tree-do-update-tags w))
       (newsticker--treeview-tree-update-tag widget))))
 
-(defun newsticker--treeview-tree-update-tags (&rest ignore)
+(defun newsticker--treeview-tree-update-tags (&rest _ignore)
   "Update all tags of all trees.
-Arguments IGNORE are ignored."
+Arguments are ignored."
   (save-current-buffer
     (set-buffer (newsticker--treeview-tree-buffer))
     (let ((inhibit-read-only t))
@@ -1655,8 +1653,8 @@ Return t if a new feed was activated, nil otherwise."
            (completing-read
             "Jump to feed: "
             (append '("new" "obsolete" "immortal" "all")
-                    (mapcar 'car (append newsticker-url-list
-                                         newsticker-url-list-defaults)))
+                    (mapcar #'car (append newsticker-url-list
+                                          newsticker-url-list-defaults)))
             nil t))))
   (newsticker--treeview-unfold-node feed-name))
 
@@ -1788,7 +1786,8 @@ return a nested list."
                           (string= old-name (car elt)))
                      (cons new-name (cdr elt)))
                     (t
-                     elt))) parent-group)))
+                     elt)))
+            parent-group)))
 
 (defun newsticker-group-rename-group (old-name new-name)
   "Rename group OLD-NAME to NEW-NAME."
@@ -1808,7 +1807,7 @@ return a nested list."
 (defun newsticker--get-group-names (lst)
   "Do get the group names from LST."
   (delete nil (cons (car lst)
-                    (apply 'append
+                    (apply #'append
                            (mapcar (lambda (e)
                                      (cond ((listp e)
                                             (newsticker--get-group-names e))
@@ -1826,7 +1825,7 @@ Update treeview afterwards unless NO-UPDATE is non-nil."
   (interactive
    (let ((completion-ignore-case t))
      (list (completing-read "Name of feed or group to move: "
-                            (append (mapcar 'car newsticker-url-list)
+                            (append (mapcar #'car newsticker-url-list)
                                     (newsticker--group-names))
                             nil t newsticker--treeview-current-feed)
            (completing-read "Name of new parent group: " 
(newsticker--group-names)
diff --git a/lisp/net/pinentry.el b/lisp/net/pinentry.el
new file mode 100644
index 0000000..7cbe9f5
--- /dev/null
+++ b/lisp/net/pinentry.el
@@ -0,0 +1,397 @@
+;;; pinentry.el --- GnuPG Pinentry server implementation -*- lexical-binding: 
t -*-
+
+;; Copyright (C) 2015 Free Software Foundation, Inc.
+
+;; Author: Daiki Ueno <address@hidden>
+;; Version: 0.1
+;; Keywords: GnuPG
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; This package allows GnuPG passphrase to be prompted through the
+;; minibuffer instead of graphical dialog.
+;;
+;; To use, add allow-emacs-pinentry to ~/.gnupg/gpg-agent.conf, and
+;; start the server with M-x pinentry-start.
+;;
+;; The actual communication path between the relevant components is
+;; as follows:
+;;
+;;   gpg --> gpg-agent --> pinentry --> Emacs
+;;
+;; where pinentry and Emacs communicate through a Unix domain socket
+;; created at:
+;;
+;;   ${TMPDIR-/tmp}/emacs$(id -u)/pinentry
+;;
+;; under the same directory which server.el uses.  The protocol is a
+;; subset of the Pinentry Assuan protocol described in (info
+;; "(pinentry) Protocol").
+;;
+;; NOTE: As of June 2015, this feature requires newer versions of
+;; GnuPG (2.1.5+) and Pinentry (not yet released, possibly 0.9.5+).
+;; For details, see the discussion on gnupg-devel mailing list:
+;; <https://lists.gnupg.org/pipermail/gnupg-devel/2015-May/029875.html>.
+
+;;; Code:
+
+(defvar pinentry--server-process nil)
+(defvar pinentry--connection-process-list nil)
+
+(defvar pinentry--labels nil)
+(put 'pinentry-read-point 'permanent-local t)
+(defvar pinentry--read-point nil)
+(put 'pinentry--read-point 'permanent-local t)
+
+;; We use the same location as `server-socket-dir', when local sockets
+;; are supported.
+(defvar pinentry--socket-dir
+  (format "%s/emacs%d" (or (getenv "TMPDIR") "/tmp") (user-uid))
+  "The directory in which to place the server socket.
+If local sockets are not supported, this is nil.")
+
+(defconst pinentry--set-label-commands
+  '("SETPROMPT" "SETTITLE" "SETDESC"
+    "SETREPEAT" "SETREPEATERROR"
+    "SETOK" "SETCANCEL" "SETNOTOK"))
+
+;; These error codes are defined in libgpg-error/src/err-codes.h.in.
+(defmacro pinentry--error-code (code)
+  (logior (lsh 5 24) code))
+(defconst pinentry--error-not-implemented
+  (cons (pinentry--error-code 69) "not implemented"))
+(defconst pinentry--error-cancelled
+  (cons (pinentry--error-code 99) "cancelled"))
+(defconst pinentry--error-not-confirmed
+  (cons (pinentry--error-code 114) "not confirmed"))
+
+(autoload 'server-ensure-safe-dir "server")
+
+;;;###autoload
+(defun pinentry-start ()
+  "Start a Pinentry service.
+
+Once the environment is properly set, subsequent invocations of
+the gpg command will interact with Emacs for passphrase input."
+  (interactive)
+  (unless (featurep 'make-network-process '(:family local))
+    (error "local sockets are not supported"))
+  (if (process-live-p pinentry--server-process)
+      (message "Pinentry service is already running")
+    (let* ((server-file (expand-file-name "pinentry" pinentry--socket-dir)))
+      (server-ensure-safe-dir pinentry--socket-dir)
+      ;; Delete the socket files made by previous server invocations.
+      (ignore-errors
+        (let (delete-by-moving-to-trash)
+          (delete-file server-file)))
+      (setq pinentry--server-process
+            (make-network-process
+             :name "pinentry"
+             :server t
+             :noquery t
+             :sentinel #'pinentry--process-sentinel
+             :filter #'pinentry--process-filter
+             :coding 'no-conversion
+             :family 'local
+             :service server-file))
+      (process-put pinentry--server-process :server-file server-file))))
+
+(defun pinentry-stop ()
+  "Stop a Pinentry service."
+  (interactive)
+  (when (process-live-p pinentry--server-process)
+    (delete-process pinentry--server-process))
+  (setq pinentry--server-process nil)
+  (dolist (process pinentry--connection-process-list)
+    (when (buffer-live-p (process-buffer process))
+      (kill-buffer (process-buffer process))))
+  (setq pinentry--connection-process-list nil))
+
+(defun pinentry--labels-to-shortcuts (labels)
+  "Convert strings in LABEL by stripping mnemonics."
+  (mapcar (lambda (label)
+            (when label
+              (let (c)
+                (if (string-match "\\(?:\\`\\|[^_]\\)_\\([[:alnum:]]\\)" label)
+                    (let ((key (match-string 1 label)))
+                      (setq c (downcase (aref key 0)))
+                      (setq label (replace-match
+                                   (propertize key 'face 'underline)
+                                   t t label)))
+                  (setq c (if (= (length label) 0)
+                              ??
+                            (downcase (aref label 0)))))
+                ;; Double underscores mean a single underscore.
+                (when (string-match "__" label)
+                  (setq label (replace-match "_" t t label)))
+                (cons c label))))
+          labels))
+
+(defun pinentry--escape-string (string)
+  "Escape STRING in the Assuan percent escape."
+  (let ((length (length string))
+        (index 0)
+        (count 0))
+    (while (< index length)
+      (if (memq (aref string index) '(?\n ?\r ?%))
+          (setq count (1+ count)))
+      (setq index (1+ index)))
+    (setq index 0)
+    (let ((result (make-string (+ length (* count 2)) ?\0))
+          (result-index 0)
+          c)
+      (while (< index length)
+        (setq c (aref string index))
+        (if (memq c '(?\n ?\r ?%))
+            (let ((hex (format "%02X" c)))
+              (aset result result-index ?%)
+              (setq result-index (1+ result-index))
+              (aset result result-index (aref hex 0))
+              (setq result-index (1+ result-index))
+              (aset result result-index (aref hex 1))
+              (setq result-index (1+ result-index)))
+          (aset result result-index c)
+          (setq result-index (1+ result-index)))
+        (setq index (1+ index)))
+      result)))
+
+(defun pinentry--unescape-string (string)
+  "Unescape STRING in the Assuan percent escape."
+  (let ((length (length string))
+        (index 0))
+    (let ((result (make-string length ?\0))
+          (result-index 0)
+          c)
+      (while (< index length)
+        (setq c (aref string index))
+        (if (and (eq c '?%) (< (+ index 2) length))
+           (progn
+             (aset result result-index
+                   (string-to-number (substring string
+                                                (1+ index)
+                                                (+ index 3))
+                                     16))
+             (setq result-index (1+ result-index))
+             (setq index (+ index 2)))
+          (aset result result-index c)
+          (setq result-index (1+ result-index)))
+       (setq index (1+ index)))
+      (substring result 0 result-index))))
+
+(defun pinentry--send-data (process escaped)
+  "Send a string ESCAPED to a process PROCESS.
+ESCAPED will be split if it exceeds the line length limit of the
+Assuan protocol."
+  (let ((length (length escaped))
+        (index 0))
+    (if (= length 0)
+        (process-send-string process "D \n")
+      (while (< index length)
+        ;; 997 = ASSUAN_LINELENGTH (= 1000) - strlen ("D \n")
+        (let* ((sub-length (min (- length index) 997))
+               (sub (substring escaped index (+ index sub-length))))
+          (unwind-protect
+              (progn
+                (process-send-string process "D ")
+                (process-send-string process sub)
+                (process-send-string process "\n"))
+            (clear-string sub))
+          (setq index (+ index sub-length)))))))
+
+(defun pinentry--send-error (process error)
+  (process-send-string process (format "ERR %d %s\n" (car error) (cdr error))))
+
+(defun pinentry--process-filter (process input)
+  (unless (buffer-live-p (process-buffer process))
+    (let ((buffer (generate-new-buffer " *pinentry*")))
+      (set-process-buffer process buffer)
+      (with-current-buffer buffer
+        (if (fboundp 'set-buffer-multibyte)
+            (set-buffer-multibyte nil))
+        (make-local-variable 'pinentry--read-point)
+        (setq pinentry--read-point (point-min))
+        (make-local-variable 'pinentry--labels))))
+  (with-current-buffer (process-buffer process)
+    (save-excursion
+      (goto-char (point-max))
+      (insert input)
+      (goto-char pinentry--read-point)
+      (beginning-of-line)
+      (while (looking-at ".*\n")        ;the input line finished
+        (if (looking-at "\\([A-Z_]+\\) ?\\(.*\\)")
+            (let ((command (match-string 1))
+                  (string (pinentry--unescape-string (match-string 2))))
+              (pcase command
+                ((and set (guard (member set pinentry--set-label-commands)))
+                (when (> (length string) 0)
+                  (let* ((symbol (intern (downcase (substring set 3))))
+                         (entry (assq symbol pinentry--labels))
+                         (label (decode-coding-string string 'utf-8)))
+                    (if entry
+                        (setcdr entry label)
+                      (push (cons symbol label) pinentry--labels))))
+                (ignore-errors
+                  (process-send-string process "OK\n")))
+               ("NOP"
+                (ignore-errors
+                  (process-send-string process "OK\n")))
+                ("GETPIN"
+                 (let ((prompt
+                        (or (cdr (assq 'desc pinentry--labels))
+                            (cdr (assq 'prompt pinentry--labels))
+                            ""))
+                      (confirm (not (null (assq 'repeat pinentry--labels))))
+                       entry)
+                   (if (setq entry (assq 'error pinentry--labels))
+                       (setq prompt (concat "Error: "
+                                            (propertize
+                                             (copy-sequence (cdr entry))
+                                             'face 'error)
+                                            "\n"
+                                            prompt)))
+                   (if (setq entry (assq 'title pinentry--labels))
+                       (setq prompt (format "[%s] %s"
+                                            (cdr entry) prompt)))
+                   (if (string-match ":?[ \n]*\\'" prompt)
+                       (setq prompt (concat
+                                     (substring
+                                      prompt 0 (match-beginning 0)) ": ")))
+                   (let (passphrase escaped-passphrase encoded-passphrase)
+                     (unwind-protect
+                         (condition-case nil
+                             (progn
+                               (setq passphrase
+                                    (read-passwd prompt confirm))
+                               (setq escaped-passphrase
+                                     (pinentry--escape-string
+                                      passphrase))
+                               (setq encoded-passphrase (encode-coding-string
+                                                         escaped-passphrase
+                                                         'utf-8))
+                              (ignore-errors
+                                (pinentry--send-data
+                                 process encoded-passphrase)
+                                (process-send-string process "OK\n")))
+                           (error
+                           (ignore-errors
+                             (pinentry--send-error
+                              process
+                              pinentry--error-cancelled))))
+                       (if passphrase
+                           (clear-string passphrase))
+                       (if escaped-passphrase
+                           (clear-string escaped-passphrase))
+                       (if encoded-passphrase
+                           (clear-string encoded-passphrase))))
+                   (setq pinentry--labels nil)))
+                ("CONFIRM"
+                 (let ((prompt
+                        (or (cdr (assq 'desc pinentry--labels))
+                            ""))
+                       (buttons
+                        (pinentry--labels-to-shortcuts
+                         (list (cdr (assq 'ok pinentry--labels))
+                               (cdr (assq 'notok pinentry--labels))
+                              (cdr (assq 'cancel pinentry--labels)))))
+                       entry)
+                   (if (setq entry (assq 'error pinentry--labels))
+                       (setq prompt (concat "Error: "
+                                            (propertize
+                                             (copy-sequence (cdr entry))
+                                             'face 'error)
+                                            "\n"
+                                            prompt)))
+                   (if (setq entry (assq 'title pinentry--labels))
+                       (setq prompt (format "[%s] %s"
+                                            (cdr entry) prompt)))
+                   (if (remq nil buttons)
+                       (progn
+                         (setq prompt
+                               (concat prompt " ("
+                                       (mapconcat #'cdr (remq nil buttons)
+                                                  ", ")
+                                       ") "))
+                         (condition-case nil
+                             (let ((result (read-char prompt)))
+                               (if (eq result (caar buttons))
+                                  (ignore-errors
+                                    (process-send-string process "OK\n"))
+                                 (if (eq result (car (nth 1 buttons)))
+                                    (ignore-errors
+                                      (pinentry--send-error
+                                       process
+                                       pinentry--error-not-confirmed))
+                                  (ignore-errors
+                                    (pinentry--send-error
+                                     process
+                                     pinentry--error-cancelled)))))
+                           (error
+                           (ignore-errors
+                             (pinentry--send-error
+                              process
+                              pinentry--error-cancelled)))))
+                     (if (string-match "[ \n]*\\'" prompt)
+                         (setq prompt (concat
+                                       (substring
+                                        prompt 0 (match-beginning 0)) " ")))
+                     (if (condition-case nil
+                             (y-or-n-p prompt)
+                           (quit))
+                        (ignore-errors
+                          (process-send-string process "OK\n"))
+                      (ignore-errors
+                        (pinentry--send-error
+                         process
+                         pinentry--error-not-confirmed))))
+                   (setq pinentry--labels nil)))
+                (_ (ignore-errors
+                    (pinentry--send-error
+                     process
+                     pinentry--error-not-implemented))))
+              (forward-line)
+              (setq pinentry--read-point (point))))))))
+
+(defun pinentry--process-sentinel (process _status)
+  "The process sentinel for Emacs server connections."
+  ;; If this is a new client process, set the query-on-exit flag to nil
+  ;; for this process (it isn't inherited from the server process).
+  (when (and (eq (process-status process) 'open)
+            (process-query-on-exit-flag process))
+    (push process pinentry--connection-process-list)
+    (set-process-query-on-exit-flag process nil)
+    (ignore-errors
+      (process-send-string process "OK Your orders please\n")))
+  ;; Kill the process buffer of the connection process.
+  (when (and (not (process-contact process :server))
+            (eq (process-status process) 'closed))
+    (when (buffer-live-p (process-buffer process))
+      (kill-buffer (process-buffer process)))
+    (setq pinentry--connection-process-list
+         (delq process pinentry--connection-process-list)))
+  ;; Delete the associated connection file, if applicable.
+  ;; Although there's no 100% guarantee that the file is owned by the
+  ;; running Emacs instance, server-start uses server-running-p to check
+  ;; for possible servers before doing anything, so it *should* be ours.
+  (and (process-contact process :server)
+       (eq (process-status process) 'closed)
+       (ignore-errors
+        (delete-file (process-get process :server-file)))))
+
+(provide 'pinentry)
+
+;;; pinentry.el ends here
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index 852d294..13a7cfa 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -904,7 +904,10 @@ The list is updated automatically by 
`defun-rcirc-command'.")
   "Function used for `completion-at-point-functions' in `rcirc-mode'."
   (and (rcirc-looking-at-input)
        (let* ((beg (save-excursion
-                    (if (re-search-backward " " rcirc-prompt-end-marker t)
+                     ;; On some networks it is common to message or
+                     ;; mention someone using @nick instead of just
+                     ;; nick.
+                    (if (re-search-backward "[[:space:address@hidden" 
rcirc-prompt-end-marker t)
                         (1+ (point))
                       rcirc-prompt-end-marker)))
              (table (if (and (= beg rcirc-prompt-end-marker)
diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el
index 7c509e1..6305921 100644
--- a/lisp/net/tramp-adb.el
+++ b/lisp/net/tramp-adb.el
@@ -575,8 +575,10 @@ Emacs dired can't find files."
     (let ((tmpfile (tramp-compat-make-temp-file filename)))
       (with-tramp-progress-reporter
          v 3 (format "Fetching %s to tmp file %s" filename tmpfile)
-       (when (tramp-adb-execute-adb-command v "pull" localname tmpfile)
-         (delete-file tmpfile)
+       ;; "adb pull ..." does not always return an error code.
+       (when (or (tramp-adb-execute-adb-command v "pull" localname tmpfile)
+                 (not (file-exists-p tmpfile)))
+         (ignore-errors (delete-file tmpfile))
          (tramp-error
           v 'file-error "Cannot make local copy of file `%s'" filename))
        (set-file-modes
diff --git a/lisp/net/tramp-cache.el b/lisp/net/tramp-cache.el
index f2ee49f..f777468 100644
--- a/lisp/net/tramp-cache.el
+++ b/lisp/net/tramp-cache.el
@@ -66,7 +66,8 @@
 Every entry has the form (REGEXP PROPERTY VALUE).  The regexp
 matches remote file names.  It can be nil.  PROPERTY is a string,
 and VALUE the corresponding value.  They are used, if there is no
-matching entry for PROPERTY in `tramp-cache-data'."
+matching entry for PROPERTY in `tramp-cache-data'.  For more
+details see the info pages."
   :group 'tramp
   :version "24.4"
   :type '(repeat (list (choice :tag "File Name regexp" regexp (const nil))
@@ -120,9 +121,10 @@ matching entries of `tramp-connection-properties'."
 (defun tramp-get-file-property (key file property default)
   "Get the PROPERTY of FILE from the cache context of KEY.
 Returns DEFAULT if not set."
-  ;; Unify localname.
+  ;; Unify localname.  Remove hop from vector.
   (setq key (copy-sequence key))
   (aset key 3 (tramp-run-real-handler 'directory-file-name (list file)))
+  (aset key 4 nil)
   (let* ((hash (tramp-get-hash-table key))
         (value (when (hash-table-p hash) (gethash property hash))))
     (if
@@ -152,9 +154,10 @@ Returns DEFAULT if not set."
 (defun tramp-set-file-property (key file property value)
   "Set the PROPERTY of FILE to VALUE, in the cache context of KEY.
 Returns VALUE."
-  ;; Unify localname.
+  ;; Unify localname.  Remove hop from vector.
   (setq key (copy-sequence key))
   (aset key 3 (tramp-run-real-handler 'directory-file-name (list file)))
+p  (aset key 4 nil)
   (let ((hash (tramp-get-hash-table key)))
     ;; We put the timestamp there.
     (puthash property (cons (current-time) value) hash)
@@ -175,9 +178,10 @@ Returns VALUE."
     (when (and (stringp truename)
               (not (string-equal file (directory-file-name truename))))
       (tramp-flush-file-property key truename))
-    ;; Unify localname.
+    ;; Unify localname.  Remove hop from vector.
     (setq key (copy-sequence key))
     (aset key 3 file)
+    (aset key 4 nil)
     (tramp-message key 8 "%s" file)
     (remhash key tramp-cache-data)))
 
@@ -239,11 +243,12 @@ This is suppressed for temporary buffers."
   "Get the named PROPERTY for the connection.
 KEY identifies the connection, it is either a process or a vector.
 If the value is not set for the connection, returns DEFAULT."
-  ;; Unify key by removing localname from vector.  Work with a copy in
-  ;; order to avoid side effects.
+  ;; Unify key by removing localname and hop from vector.  Work with a
+  ;; copy in order to avoid side effects.
   (when (vectorp key)
     (setq key (copy-sequence key))
-    (aset key 3 nil))
+    (aset key 3 nil)
+    (aset key 4 nil))
   (let* ((hash (tramp-get-hash-table key))
         (value (if (hash-table-p hash)
                    (gethash property hash default)
@@ -256,11 +261,12 @@ If the value is not set for the connection, returns 
DEFAULT."
   "Set the named PROPERTY of a connection to VALUE.
 KEY identifies the connection, it is either a process or a vector.
 PROPERTY is set persistent when KEY is a vector."
-  ;; Unify key by removing localname from vector.  Work with a copy in
-  ;; order to avoid side effects.
+  ;; Unify key by removing localname and hop from vector.  Work with a
+  ;; copy in order to avoid side effects.
   (when (vectorp key)
     (setq key (copy-sequence key))
-    (aset key 3 nil))
+    (aset key 3 nil)
+    (aset key 4 nil))
   (let ((hash (tramp-get-hash-table key)))
     (puthash property value hash)
     (setq tramp-cache-data-changed t)
@@ -277,11 +283,12 @@ KEY identifies the connection, it is either a process or 
a vector."
 (defun tramp-flush-connection-property (key)
   "Remove all properties identified by KEY.
 KEY identifies the connection, it is either a process or a vector."
-  ;; Unify key by removing localname from vector.  Work with a copy in
-  ;; order to avoid side effects.
+  ;; Unify key by removing localname and hop from vector.  Work with a
+  ;; copy in order to avoid side effects.
   (when (vectorp key)
     (setq key (copy-sequence key))
-    (aset key 3 nil))
+    (aset key 3 nil)
+    (aset key 4 nil))
   (tramp-message
    key 7 "%s %s" key
    (let ((hash (gethash key tramp-cache-data))
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el
index 215e39d..4dfdcd7 100644
--- a/lisp/net/tramp-gvfs.el
+++ b/lisp/net/tramp-gvfs.el
@@ -582,62 +582,127 @@ is no information where to trace the message.")
 
 ;; File name primitives.
 
+(defun tramp-gvfs-do-copy-or-rename-file
+  (op filename newname &optional ok-if-already-exists keep-date
+      preserve-uid-gid preserve-extended-attributes)
+  "Copy or rename a remote file.
+OP must be `copy' or `rename' and indicates the operation to perform.
+FILENAME specifies the file to copy or rename, NEWNAME is the name of
+the new file (for copy) or the new name of the file (for rename).
+OK-IF-ALREADY-EXISTS means don't barf if NEWNAME exists already.
+KEEP-DATE means to make sure that NEWNAME has the same timestamp
+as FILENAME.  PRESERVE-UID-GID, when non-nil, instructs to keep
+the uid and gid if both files are on the same host.
+PRESERVE-EXTENDED-ATTRIBUTES is ignored.
+
+This function is invoked by `tramp-gvfs-handle-copy-file' and
+`tramp-gvfs-handle-rename-file'.  It is an error if OP is neither
+of `copy' and `rename'.  FILENAME and NEWNAME must be absolute
+file names."
+  (unless (memq op '(copy rename))
+    (error "Unknown operation `%s', must be `copy' or `rename'" op))
+
+    (let ((t1 (tramp-tramp-file-p filename))
+         (t2 (tramp-tramp-file-p newname))
+         (equal-remote (tramp-equal-remote filename newname))
+         (file-operation (intern (format "%s-file" op)))
+         (gvfs-operation (if (eq op 'copy) "gvfs-copy" "gvfs-move"))
+         (msg-operation (if (eq op 'copy) "Copying" "Renaming")))
+
+      (with-parsed-tramp-file-name (if t1 filename newname) nil
+       (when (and (not ok-if-already-exists) (file-exists-p newname))
+         (tramp-error
+          v 'file-already-exists "File %s already exists" newname))
+
+       (if (or (and equal-remote
+                    (tramp-get-connection-property v "direct-copy-failed" nil))
+               (and t1 (not (tramp-gvfs-file-name-p filename)))
+               (and t2 (not (tramp-gvfs-file-name-p newname))))
+
+           ;; We cannot copy or rename directly.
+           (let ((tmpfile (tramp-compat-make-temp-file filename)))
+             (cond
+              (preserve-extended-attributes
+               (tramp-compat-funcall
+                file-operation
+                filename tmpfile t keep-date preserve-uid-gid
+                preserve-extended-attributes))
+              (preserve-uid-gid
+               (tramp-compat-funcall
+                file-operation filename tmpfile t keep-date preserve-uid-gid))
+              (t
+               (tramp-compat-funcall
+                file-operation filename tmpfile t keep-date)))
+             (rename-file tmpfile newname ok-if-already-exists))
+
+         ;; Direct action.
+         (with-tramp-progress-reporter
+             v 0 (format "%s %s to %s" msg-operation filename newname)
+           (unless
+               (apply
+                'tramp-gvfs-send-command v gvfs-operation
+                (append
+                 (and (eq op 'copy) (or keep-date preserve-uid-gid)
+                      (list "--preserve"))
+                 (list
+                  (tramp-gvfs-url-file-name filename)
+                  (tramp-gvfs-url-file-name newname))))
+
+             (if (or (not equal-remote)
+                     (and equal-remote
+                          (tramp-get-connection-property
+                           v "direct-copy-failed" nil)))
+                 ;; Propagate the error.
+                 (with-current-buffer (tramp-get-connection-buffer v)
+                   (goto-char (point-min))
+                   (tramp-error-with-buffer
+                    nil v 'file-error
+                    "%s failed, see buffer `%s' for details."
+                    msg-operation (buffer-name)))
+
+               ;; Some WebDAV server, like the one from QNAP, do not
+               ;; support direct copy/move.  Try a fallback.
+               (tramp-set-connection-property v "direct-copy-failed" t)
+               (tramp-gvfs-do-copy-or-rename-file
+                op filename newname ok-if-already-exists keep-date
+                preserve-uid-gid preserve-extended-attributes))))
+
+         (when (and t1 (eq op 'rename))
+           (with-parsed-tramp-file-name filename nil
+             (tramp-flush-file-property v (file-name-directory localname))
+             (tramp-flush-file-property v localname)))
+
+         (when t2
+           (with-parsed-tramp-file-name newname nil
+             (tramp-flush-file-property v (file-name-directory localname))
+             (tramp-flush-file-property v localname)))))))
+
 (defun tramp-gvfs-handle-copy-file
   (filename newname &optional ok-if-already-exists keep-date
            preserve-uid-gid preserve-extended-attributes)
   "Like `copy-file' for Tramp files."
-  (with-parsed-tramp-file-name
-      (if (tramp-tramp-file-p filename) filename newname) nil
-
-    (when (and (not ok-if-already-exists) (file-exists-p newname))
-      (tramp-error
-       v 'file-already-exists "File %s already exists" newname))
-
-    (if (or (and (tramp-tramp-file-p filename)
-                (not (tramp-gvfs-file-name-p filename)))
-           (and (tramp-tramp-file-p newname)
-                (not (tramp-gvfs-file-name-p newname))))
-
-       ;; We cannot call `copy-file' directly.  Use
-       ;; `tramp-compat-funcall' for backward compatibility (number
-       ;; of arguments).
-       (let ((tmpfile (tramp-compat-make-temp-file filename)))
-         (cond
-          (preserve-extended-attributes
-           (tramp-compat-funcall
-            'copy-file
-            filename tmpfile t keep-date preserve-uid-gid
-            preserve-extended-attributes))
-          (preserve-uid-gid
-           (tramp-compat-funcall
-            'copy-file filename tmpfile t keep-date preserve-uid-gid))
-          (t
-           (copy-file filename tmpfile t keep-date)))
-         (rename-file tmpfile newname ok-if-already-exists))
-
-      ;; Direct copy.
-      (with-tramp-progress-reporter
-         v 0 (format "Copying %s to %s" filename newname)
-       (unless
-           (let ((args
-                  (append (if (or keep-date preserve-uid-gid)
-                              (list "--preserve")
-                            nil)
-                          (list
-                           (tramp-gvfs-url-file-name filename)
-                           (tramp-gvfs-url-file-name newname)))))
-             (apply 'tramp-gvfs-send-command v "gvfs-copy" args))
-         ;; Propagate the error.
-         (with-current-buffer (tramp-get-connection-buffer v)
-           (goto-char (point-min))
-           (tramp-error-with-buffer
-            nil v 'file-error
-            "Copying failed, see buffer `%s' for details." (buffer-name)))))
-
-      (when (tramp-tramp-file-p newname)
-       (with-parsed-tramp-file-name newname nil
-         (tramp-flush-file-property v (file-name-directory localname))
-         (tramp-flush-file-property v localname))))))
+  (setq filename (expand-file-name filename))
+  (setq newname (expand-file-name newname))
+  (cond
+   ;; At least one file a Tramp file?
+   ((or (tramp-tramp-file-p filename)
+       (tramp-tramp-file-p newname))
+    (tramp-gvfs-do-copy-or-rename-file
+     'copy filename newname ok-if-already-exists keep-date
+     preserve-uid-gid preserve-extended-attributes))
+   ;; Compat section.
+   (preserve-extended-attributes
+    (tramp-run-real-handler
+     'copy-file
+     (list filename newname ok-if-already-exists keep-date
+          preserve-uid-gid preserve-extended-attributes)))
+   (preserve-uid-gid
+    (tramp-run-real-handler
+     'copy-file
+     (list filename newname ok-if-already-exists keep-date preserve-uid-gid)))
+   (t
+    (tramp-run-real-handler
+     'copy-file (list filename newname ok-if-already-exists keep-date)))))
 
 (defun tramp-gvfs-handle-delete-directory (directory &optional recursive trash)
   "Like `delete-directory' for Tramp files."
@@ -1016,60 +1081,35 @@ is no information where to trace the message.")
 
 (defun tramp-gvfs-handle-make-directory (dir &optional parents)
   "Like `make-directory' for Tramp files."
+  (setq dir (directory-file-name (expand-file-name dir)))
   (with-parsed-tramp-file-name dir nil
-    (unless
-       (apply
-        'tramp-gvfs-send-command v "gvfs-mkdir"
-        (if parents
-            (list "-p" (tramp-gvfs-url-file-name dir))
-          (list (tramp-gvfs-url-file-name dir))))
-      ;; Propagate the error.
-      (tramp-error v 'file-error "Couldn't make directory %s" dir))))
+    (tramp-flush-file-property v (file-name-directory localname))
+    (tramp-flush-directory-property v localname)
+    (save-match-data
+      (let ((ldir (file-name-directory dir)))
+       ;; Make missing directory parts.  "gvfs-mkdir -p ..." does not
+       ;; work robust.
+       (when (and parents (not (file-directory-p ldir)))
+         (make-directory ldir parents))
+       ;; Just do it.
+       (unless (tramp-gvfs-send-command
+                v "gvfs-mkdir" (tramp-gvfs-url-file-name dir))
+         (tramp-error v 'file-error "Couldn't make directory %s" dir))))))
 
 (defun tramp-gvfs-handle-rename-file
   (filename newname &optional ok-if-already-exists)
   "Like `rename-file' for Tramp files."
-  (with-parsed-tramp-file-name
-      (if (tramp-tramp-file-p filename) filename newname) nil
-
-    (when (and (not ok-if-already-exists) (file-exists-p newname))
-      (tramp-error
-       v 'file-already-exists "File %s already exists" newname))
-
-    (if (or (and (tramp-tramp-file-p filename)
-                (not (tramp-gvfs-file-name-p filename)))
-           (and (tramp-tramp-file-p newname)
-                (not (tramp-gvfs-file-name-p newname))))
-
-       ;; We cannot move directly.
-       (let ((tmpfile (tramp-compat-make-temp-file filename)))
-         (rename-file filename tmpfile t)
-         (rename-file tmpfile newname ok-if-already-exists))
-
-      ;; Direct move.
-      (with-tramp-progress-reporter
-         v 0 (format "Renaming %s to %s" filename newname)
-       (unless
-           (tramp-gvfs-send-command
-            v "gvfs-move"
-            (tramp-gvfs-url-file-name filename)
-            (tramp-gvfs-url-file-name newname))
-         ;; Propagate the error.
-         (with-current-buffer (tramp-get-buffer v)
-           (goto-char (point-min))
-           (tramp-error-with-buffer
-            nil v 'file-error
-            "Renaming failed, see buffer `%s' for details." (buffer-name)))))
-
-      (when (tramp-tramp-file-p filename)
-       (with-parsed-tramp-file-name filename nil
-         (tramp-flush-file-property v (file-name-directory localname))
-         (tramp-flush-file-property v localname)))
-
-      (when (tramp-tramp-file-p newname)
-       (with-parsed-tramp-file-name newname nil
-         (tramp-flush-file-property v (file-name-directory localname))
-         (tramp-flush-file-property v localname))))))
+  ;; Check if both files are local -- invoke normal rename-file.
+  ;; Otherwise, use Tramp from local system.
+  (setq filename (expand-file-name filename))
+  (setq newname (expand-file-name newname))
+  ;; At least one file a Tramp file?
+  (if (or (tramp-tramp-file-p filename)
+          (tramp-tramp-file-p newname))
+      (tramp-gvfs-do-copy-or-rename-file
+       'rename filename newname ok-if-already-exists t t)
+    (tramp-run-real-handler
+     'rename-file (list filename newname ok-if-already-exists))))
 
 (defun tramp-gvfs-handle-write-region
   (start end filename &optional append visit lockname confirm)
@@ -1530,7 +1570,7 @@ connection if a previous connection has died for some 
reason."
        ;; indicated by the "mounted" signal, i.e. the "fuse-mountpoint"
        ;; file property.
        (with-timeout
-           ((or (tramp-get-method-parameter method 'tramp-connection-timeout)
+           ((or (tramp-get-method-parameter vec 'tramp-connection-timeout)
                 tramp-connection-timeout)
             (if (zerop (length (tramp-file-name-user vec)))
                 (tramp-error
diff --git a/lisp/net/tramp-gw.el b/lisp/net/tramp-gw.el
index 16eff8c..5e22f6a 100644
--- a/lisp/net/tramp-gw.el
+++ b/lisp/net/tramp-gw.el
@@ -126,8 +126,11 @@
 
 (defun tramp-gw-process-filter (proc string)
   (let ((tramp-verbose 0))
-    (process-send-string
-     (tramp-get-connection-property proc "process" nil) string)))
+    ;; The other process might have been stopped already.  We don't
+    ;; want to be interrupted then.
+    (ignore-errors
+      (process-send-string
+       (tramp-get-connection-property proc "process" nil) string))))
 
 ;;;###tramp-autoload
 (defun tramp-gw-open-connection (vec gw-vec target-vec)
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index fda5945..bb939bf 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -135,6 +135,7 @@ The string is used in `tramp-methods'.")
     (tramp-login-program        "rsh")
     (tramp-login-args           (("%h") ("-l" "%u")))
     (tramp-remote-shell         "/bin/sh")
+    (tramp-remote-shell-login   ("-l"))
     (tramp-remote-shell-args    ("-c"))
     (tramp-copy-program         "rcp")
     (tramp-copy-args            (("-p" "%k") ("-r")))
@@ -146,6 +147,7 @@ The string is used in `tramp-methods'.")
     (tramp-login-program        "remsh")
     (tramp-login-args           (("%h") ("-l" "%u")))
     (tramp-remote-shell         "/bin/sh")
+    (tramp-remote-shell-login   ("-l"))
     (tramp-remote-shell-args    ("-c"))
     (tramp-copy-program         "rcp")
     (tramp-copy-args            (("-p" "%k")))
@@ -158,6 +160,7 @@ The string is used in `tramp-methods'.")
                                 ("-e" "none") ("%h")))
     (tramp-async-args           (("-q")))
     (tramp-remote-shell         "/bin/sh")
+    (tramp-remote-shell-login   ("-l"))
     (tramp-remote-shell-args    ("-c"))
     (tramp-copy-program         "scp")
     (tramp-copy-args            (("-P" "%p") ("-p" "%k") ("-q") ("-r") ("%c")))
@@ -175,6 +178,7 @@ The string is used in `tramp-methods'.")
                                 ("-e" "none") ("-t" "-t") ("%h") ("/bin/sh")))
     (tramp-async-args           (("-q")))
     (tramp-remote-shell         "/bin/sh")
+    (tramp-remote-shell-login   ("-l"))
     (tramp-remote-shell-args    ("-c"))
     (tramp-copy-program         "scp")
     (tramp-copy-args            (("-P" "%p") ("-p" "%k")
@@ -193,6 +197,7 @@ The string is used in `tramp-methods'.")
                                 ("-e" "none") ("%h")))
     (tramp-async-args           (("-q")))
     (tramp-remote-shell         "/bin/sh")
+    (tramp-remote-shell-login   ("-l"))
     (tramp-remote-shell-args    ("-c"))
     (tramp-copy-program         "rsync")
     (tramp-copy-args            (("-t" "%k") ("-r")))
@@ -206,6 +211,7 @@ The string is used in `tramp-methods'.")
     (tramp-login-program        "rsh")
     (tramp-login-args           (("%h") ("-l" "%u")))
     (tramp-remote-shell         "/bin/sh")
+    (tramp-remote-shell-login   ("-l"))
     (tramp-remote-shell-args    ("-c"))))
 ;;;###tramp-autoload
 (add-to-list 'tramp-methods
@@ -213,6 +219,7 @@ The string is used in `tramp-methods'.")
     (tramp-login-program        "remsh")
     (tramp-login-args           (("%h") ("-l" "%u")))
     (tramp-remote-shell         "/bin/sh")
+    (tramp-remote-shell-login   ("-l"))
     (tramp-remote-shell-args    ("-c"))))
 ;;;###tramp-autoload
 (add-to-list 'tramp-methods
@@ -222,6 +229,7 @@ The string is used in `tramp-methods'.")
                                 ("-e" "none") ("%h")))
     (tramp-async-args           (("-q")))
     (tramp-remote-shell         "/bin/sh")
+    (tramp-remote-shell-login   ("-l"))
     (tramp-remote-shell-args    ("-c"))
     (tramp-gw-args              (("-o" "GlobalKnownHostsFile=/dev/null")
                                 ("-o" "UserKnownHostsFile=/dev/null")
@@ -235,6 +243,7 @@ The string is used in `tramp-methods'.")
                                 ("-e" "none") ("-t" "-t") ("%h") ("/bin/sh")))
     (tramp-async-args           (("-q")))
     (tramp-remote-shell         "/bin/sh")
+    (tramp-remote-shell-login   ("-l"))
     (tramp-remote-shell-args    ("-c"))
     (tramp-gw-args              (("-o" "GlobalKnownHostsFile=/dev/null")
                                 ("-o" "UserKnownHostsFile=/dev/null")
@@ -246,6 +255,7 @@ The string is used in `tramp-methods'.")
     (tramp-login-program        "telnet")
     (tramp-login-args           (("%h") ("%p") ("2>/dev/null")))
     (tramp-remote-shell         "/bin/sh")
+    (tramp-remote-shell-login   ("-l"))
     (tramp-remote-shell-args    ("-c"))
     (tramp-default-port         23)))
 ;;;###tramp-autoload
@@ -254,6 +264,7 @@ The string is used in `tramp-methods'.")
     (tramp-login-program        "telnet")
     (tramp-login-args           (("%h") ("%p") ("2>/dev/null")))
     (tramp-remote-shell         "/bin/sh")
+    (tramp-remote-shell-login   ("-l"))
     (tramp-remote-shell-args    ("-c"))
     (tramp-copy-program         "nc")
     ;; We use "-v" for better error tracking.
@@ -262,7 +273,7 @@ The string is used in `tramp-methods'.")
     ;; We use "-p" as required for newer busyboxes.  For older
     ;; busybox/nc versions, the value must be (("-l") ("%r")).  This
     ;; can be achieved by tweaking `tramp-connection-properties'.
-    (tramp-remote-copy-args     (("-l") ("-p" "%r")))
+    (tramp-remote-copy-args     (("-l") ("-p" "%r") ("2>/dev/null")))
     (tramp-default-port         23)))
 ;;;###tramp-autoload
 (add-to-list 'tramp-methods
@@ -270,6 +281,7 @@ The string is used in `tramp-methods'.")
     (tramp-login-program        "su")
     (tramp-login-args           (("-") ("%u")))
     (tramp-remote-shell         "/bin/sh")
+    (tramp-remote-shell-login   ("-l"))
     (tramp-remote-shell-args    ("-c"))
     (tramp-connection-timeout   10)))
 ;;;###tramp-autoload
@@ -280,6 +292,7 @@ The string is used in `tramp-methods'.")
     ;; Local $SHELL could be a nasty one, like zsh or fish.  Let's override it.
     (tramp-login-env            (("SHELL") ("/bin/sh")))
     (tramp-remote-shell         "/bin/sh")
+    (tramp-remote-shell-login   ("-l"))
     (tramp-remote-shell-args    ("-c"))
     (tramp-connection-timeout   10)))
 ;;;###tramp-autoload
@@ -288,6 +301,7 @@ The string is used in `tramp-methods'.")
     (tramp-login-program        "ksu")
     (tramp-login-args           (("%u") ("-q")))
     (tramp-remote-shell         "/bin/sh")
+    (tramp-remote-shell-login   ("-l"))
     (tramp-remote-shell-args    ("-c"))
     (tramp-connection-timeout   10)))
 ;;;###tramp-autoload
@@ -296,6 +310,7 @@ The string is used in `tramp-methods'.")
     (tramp-login-program        "krlogin")
     (tramp-login-args           (("%h") ("-l" "%u") ("-x")))
     (tramp-remote-shell         "/bin/sh")
+    (tramp-remote-shell-login   ("-l"))
     (tramp-remote-shell-args    ("-c"))))
 ;;;###tramp-autoload
 (add-to-list 'tramp-methods
@@ -310,6 +325,7 @@ The string is used in `tramp-methods'.")
                                    tramp-initial-end-of-output))
                                 ("/bin/sh") ("\"")))
     (tramp-remote-shell         "/bin/sh")
+    (tramp-remote-shell-login   ("-l"))
     (tramp-remote-shell-args    ("-c"))
     (tramp-default-port         22)))
 ;;;###tramp-autoload
@@ -323,6 +339,7 @@ The string is used in `tramp-methods'.")
                                    tramp-initial-end-of-output))
                                 ("/bin/sh") ("\"")))
     (tramp-remote-shell         "/bin/sh")
+    (tramp-remote-shell-login   ("-l"))
     (tramp-remote-shell-args    ("-c"))))
 ;;;###tramp-autoload
 (add-to-list 'tramp-methods
@@ -336,6 +353,7 @@ The string is used in `tramp-methods'.")
                                    tramp-initial-end-of-output))
                                 ("/bin/sh") ("\"")))
     (tramp-remote-shell         "/bin/sh")
+    (tramp-remote-shell-login   ("-l"))
     (tramp-remote-shell-args    ("-c"))
     (tramp-copy-program         "pscp")
     (tramp-copy-args            (("-l" "%u") ("-P" "%p") ("-scp") ("-p" "%k")
@@ -355,6 +373,7 @@ The string is used in `tramp-methods'.")
                                    tramp-initial-end-of-output))
                                 ("/bin/sh") ("\"")))
     (tramp-remote-shell         "/bin/sh")
+    (tramp-remote-shell-login   ("-l"))
     (tramp-remote-shell-args    ("-c"))
     (tramp-copy-program         "pscp")
     (tramp-copy-args            (("-l" "%u") ("-P" "%p") ("-sftp") ("-p" "%k")
@@ -367,6 +386,7 @@ The string is used in `tramp-methods'.")
     (tramp-login-program        "fsh")
     (tramp-login-args           (("%h") ("-l" "%u") ("sh" "-i")))
     (tramp-remote-shell         "/bin/sh")
+    (tramp-remote-shell-login   ("-l"))
     (tramp-remote-shell-args    ("-i") ("-c"))
     (tramp-copy-program         "fcp")
     (tramp-copy-args            (("-p" "%k")))
@@ -1957,7 +1977,7 @@ tramp-sh-handle-file-name-all-completions: internal error 
accessing `%s': `%s'"
        (t2 (tramp-tramp-file-p newname)))
     (with-parsed-tramp-file-name (if t1 dirname newname) nil
       (if (and (not copy-contents)
-              (tramp-get-method-parameter method 'tramp-copy-recursive)
+              (tramp-get-method-parameter v 'tramp-copy-recursive)
               ;; When DIRNAME and NEWNAME are remote, they must have
               ;; the same method.
               (or (null t1) (null t2)
@@ -2379,7 +2399,7 @@ The method used must be an out-of-band method."
                       (tramp-get-connection-property v "login-as" nil)))
 
        ;; Check for listener port.
-       (when (tramp-get-method-parameter method 'tramp-remote-copy-args)
+       (when (tramp-get-method-parameter v 'tramp-remote-copy-args)
          (setq listener (number-to-string (+ 50000 (random 10000))))
          (while
              (zerop (tramp-call-process v "nc" nil nil nil "-z" host listener))
@@ -2396,10 +2416,9 @@ The method used must be an out-of-band method."
              spec (format-spec-make
                    ?h host ?u user ?p port ?r listener ?c options
                    ?k (if keep-date " " ""))
-             copy-program (tramp-get-method-parameter
-                           method 'tramp-copy-program)
+             copy-program (tramp-get-method-parameter v 'tramp-copy-program)
              copy-keep-date (tramp-get-method-parameter
-                             method 'tramp-copy-keep-date)
+                             v 'tramp-copy-keep-date)
 
              copy-args
              (delete
@@ -2408,9 +2427,7 @@ The method used must be an out-of-band method."
               ;; for the whole keep-date sublist.
               " "
               (dolist
-                  (x
-                   (tramp-get-method-parameter method 'tramp-copy-args)
-                   copy-args)
+                  (x (tramp-get-method-parameter v 'tramp-copy-args) copy-args)
                 (setq copy-args
                       (append
                        copy-args
@@ -2424,16 +2441,12 @@ The method used must be an out-of-band method."
                (lambda (x)
                  (setq x (mapcar (lambda (y) (format-spec y spec)) x))
                  (unless (member "" x) (mapconcat 'identity x " ")))
-               (tramp-get-method-parameter method 'tramp-copy-env)))
+               (tramp-get-method-parameter v 'tramp-copy-env)))
 
              remote-copy-program
-             (tramp-get-method-parameter method 'tramp-remote-copy-program))
+             (tramp-get-method-parameter v 'tramp-remote-copy-program))
 
-       (dolist
-           (x
-            (or
-             (tramp-get-connection-property v "remote-copy-args" nil)
-             (tramp-get-method-parameter method 'tramp-remote-copy-args)))
+       (dolist (x (tramp-get-method-parameter v 'tramp-remote-copy-args))
          (setq remote-copy-args
                (append
                 remote-copy-args
@@ -2464,10 +2477,10 @@ The method used must be an out-of-band method."
                 " "))
          (tramp-send-command v remote-copy-program)
          (with-timeout
-             (1 (tramp-error
-                 v 'file-error
-                 "Listener process not running on remote host: `%s'"
-                 remote-copy-program))
+             (60 (tramp-error
+                  v 'file-error
+                  "Listener process not running on remote host: `%s'"
+                  remote-copy-program))
            (tramp-send-command v (format "netstat -l | grep -q :%s" listener))
            (while (not (tramp-send-command-and-check v nil))
              (tramp-send-command
@@ -2898,10 +2911,15 @@ the result will be a local, non-Tramp, file name."
                       (setq i (+ i 250))))
                   (cdr args)))
           ;; Use a human-friendly prompt, for example for `shell'.
-          (prompt (format "PS1=%s"
-                          (format "%s %s"
-                                  (file-remote-p default-directory)
-                                  tramp-initial-end-of-output)))
+          ;; We discard hops, if existing, that's why we cannot use
+          ;; `file-remote-p'.
+          (prompt (format "PS1=%s %s"
+                          (tramp-make-tramp-file-name
+                           (tramp-file-name-method v)
+                           (tramp-file-name-user v)
+                           (tramp-file-name-host v)
+                           (tramp-file-name-localname v))
+                          tramp-initial-end-of-output))
           ;; We use as environment the difference to toplevel
           ;; `process-environment'.
           env
@@ -3333,8 +3351,7 @@ the result will be a local, non-Tramp, file name."
              (if (and (not (stringp start))
                       (= (or end (point-max)) (point-max))
                       (= (or start (point-min)) (point-min))
-                      (tramp-get-method-parameter
-                       method 'tramp-copy-keep-tmpfile))
+                      (tramp-get-method-parameter v 'tramp-copy-keep-tmpfile))
                  (progn
                    (setq tramp-temp-buffer-file-name tmpfile)
                    (condition-case err
@@ -3952,12 +3969,7 @@ file exists and nonzero exit status otherwise."
 (defun tramp-find-shell (vec)
   "Opens a shell on the remote host which groks tilde expansion."
   (with-current-buffer (tramp-get-buffer vec)
-    (let ((default-shell
-           (or
-            (tramp-get-connection-property
-             (tramp-get-connection-process vec) "remote-shell" nil)
-            (tramp-get-method-parameter
-             (tramp-file-name-method vec) 'tramp-remote-shell)))
+    (let ((default-shell (tramp-get-method-parameter vec 'tramp-remote-shell))
          shell)
       (setq shell
            (with-tramp-connection-property vec "remote-shell"
@@ -4016,15 +4028,11 @@ seconds.  If not, it produces an error message with the 
given ERROR-ARGS."
 Mainly sets the prompt and the echo correctly.  PROC is the shell
 process to set up.  VEC specifies the connection."
   (let ((tramp-end-of-output tramp-initial-end-of-output))
-    (tramp-open-shell
-     vec
-     (or (tramp-get-connection-property vec "remote-shell" nil)
-        (tramp-get-method-parameter
-         (tramp-file-name-method vec) 'tramp-remote-shell)))
+    (tramp-open-shell vec (tramp-get-method-parameter vec 'tramp-remote-shell))
 
-    ;; Disable echo.
+    ;; Disable tab and echo expansion.
     (tramp-message vec 5 "Setting up remote shell environment")
-    (tramp-send-command vec "stty -inlcr -echo kill '^U' erase '^H'" t)
+    (tramp-send-command vec "stty tab0 -inlcr -echo kill '^U' erase '^H'" t)
     ;; Check whether the echo has really been disabled.  Some
     ;; implementations, like busybox of embedded GNU/Linux, don't
     ;; support disabling.
@@ -4557,15 +4565,9 @@ Gateway hops are already opened."
     ;; Foreign and out-of-band methods are not supported for multi-hops.
     (when (cdr target-alist)
       (setq choices target-alist)
-      (while choices
-       (setq item (pop choices))
-       (when
-           (or
-            (not
-             (tramp-get-method-parameter
-              (tramp-file-name-method item) 'tramp-login-program))
-            (tramp-get-method-parameter
-             (tramp-file-name-method item) 'tramp-copy-program))
+      (while (setq item (pop choices))
+       (when (or (not (tramp-get-method-parameter item 'tramp-login-program))
+                 (tramp-get-method-parameter item 'tramp-copy-program))
          (tramp-error
           vec 'file-error
           "Method `%s' is not supported for multi-hops."
@@ -4582,8 +4584,7 @@ Gateway hops are already opened."
           ;; There are multi-hops.
           (cdr target-alist)
           ;; The host name is used for the remote shell command.
-          (member
-           '("%h") (tramp-get-method-parameter method 'tramp-login-args))
+          (member '("%h") (tramp-get-method-parameter v 'tramp-login-args))
           ;; The host is local.  We cannot use `tramp-local-host-p'
           ;; here, because it opens a connection as well.
           (string-match tramp-local-host-regexp host))
@@ -4600,8 +4601,7 @@ Gateway hops are already opened."
   (cond
    ;; No options to be computed.
    ((or (null tramp-use-ssh-controlmaster-options)
-       (null (assoc "%c" (tramp-get-method-parameter
-                          (tramp-file-name-method vec) 'tramp-login-args))))
+       (null (assoc "%c" (tramp-get-method-parameter vec 'tramp-login-args))))
     "")
 
    ;; There is already a value to be used.
@@ -4619,19 +4619,15 @@ Gateway hops are already opened."
                (setq tramp-ssh-controlmaster-options "-o ControlMaster=auto")))
            (unless (zerop (length tramp-ssh-controlmaster-options))
              (with-temp-buffer
-               ;; When we use a non-existing host name, we could run
-               ;; into DNS timeouts.  So we use "localhost" with an
-               ;; improper port, expecting nobody runs sshd on the
-               ;; telnet port.
+               ;; We use a non-existing IP address, in order to avoid
+               ;; useless connections, and DNS timeouts.
                (tramp-call-process
-                vec "ssh" nil t nil
-                "-p" "23" "-o" "ControlPath=%C" "localhost")
+                vec "ssh" nil t nil "-o" "ControlPath=%C" "0.0.0.1")
                (goto-char (point-min))
                (setq tramp-ssh-controlmaster-options
-                     (if (search-forward-regexp "unknown.+key" nil t)
-                         (concat tramp-ssh-controlmaster-options
-                                 " -o ControlPath='address@hidden:%%p'")
-                       (concat tramp-ssh-controlmaster-options
+                     (concat tramp-ssh-controlmaster-options
+                             (if (search-forward-regexp "unknown.+key" nil t)
+                                 " -o ControlPath='address@hidden:%%p'"
                                " -o ControlPath='tramp.%%C'"))))
              (with-temp-buffer
                (tramp-call-process vec "ssh" nil t nil "-o" "ControlPersist")
@@ -4764,22 +4760,18 @@ connection if a previous connection has died for some 
reason."
                         (l-host (tramp-file-name-host hop))
                         (l-port nil)
                         (login-program
-                         (tramp-get-method-parameter
-                          l-method 'tramp-login-program))
+                         (tramp-get-method-parameter hop 'tramp-login-program))
                         (login-args
-                         (tramp-get-method-parameter
-                          l-method 'tramp-login-args))
+                         (tramp-get-method-parameter hop 'tramp-login-args))
                         (login-env
-                         (tramp-get-method-parameter
-                          l-method 'tramp-login-env))
+                         (tramp-get-method-parameter hop 'tramp-login-env))
                         (async-args
-                         (tramp-get-method-parameter
-                          l-method 'tramp-async-args))
+                         (tramp-get-method-parameter hop 'tramp-async-args))
                         (connection-timeout
                          (tramp-get-method-parameter
-                          l-method 'tramp-connection-timeout))
+                          hop 'tramp-connection-timeout))
                         (gw-args
-                         (tramp-get-method-parameter l-method 'tramp-gw-args))
+                         (tramp-get-method-parameter hop 'tramp-gw-args))
                         (gw (let ((tramp-verbose 0))
                               (tramp-get-file-property hop "" "gateway" nil)))
                         (g-method (and gw (tramp-file-name-method gw)))
@@ -5121,12 +5113,13 @@ Return ATTR."
   (let ((method (tramp-file-name-method vec))
        (user (tramp-file-name-user vec))
        (host (tramp-file-name-real-host vec))
-       (localname (tramp-shell-quote-argument
-                   (tramp-file-name-localname vec))))
+       (localname (tramp-file-name-localname vec)))
     (when (string-match tramp-ipv6-regexp host)
       (setq host (format "[%s]" host)))
+    (unless (string-match "ftp$" method)
+      (setq localname (tramp-shell-quote-argument localname)))
     (cond
-     ((tramp-get-method-parameter method 'tramp-remote-copy-program)
+     ((tramp-get-method-parameter vec 'tramp-remote-copy-program)
       localname)
      ((not (zerop (length user)))
       (shell-quote-argument (format "address@hidden:%s" user host localname)))
@@ -5136,7 +5129,7 @@ Return ATTR."
   "Return t if this is an out-of-band method, nil otherwise."
   (and
    ;; It shall be an out-of-band method.
-   (tramp-get-method-parameter (tramp-file-name-method vec) 
'tramp-copy-program)
+   (tramp-get-method-parameter vec 'tramp-copy-program)
    ;; There must be a size, otherwise the file doesn't exist.
    (numberp size)
    ;; Either the file size is large enough, or (in rare cases) there
@@ -5178,13 +5171,15 @@ Return ATTR."
              (tramp-send-command-and-read
               vec
               (format
-               "%s -l %s 'echo %s \\\"$PATH\\\"'"
-               (tramp-get-method-parameter
-                (tramp-file-name-method vec) 'tramp-remote-shell)
+               "%s %s %s 'echo %s \\\"$PATH\\\"'"
+               (tramp-get-method-parameter vec 'tramp-remote-shell)
+               (mapconcat
+                'identity
+                (tramp-get-method-parameter vec 'tramp-remote-shell-login)
+                " ")
                (mapconcat
                 'identity
-                (tramp-get-method-parameter
-                 (tramp-file-name-method vec) 'tramp-remote-shell-args)
+                (tramp-get-method-parameter vec 'tramp-remote-shell-args)
                 " ")
                (tramp-shell-quote-argument tramp-end-of-heredoc))
               nil (regexp-quote tramp-end-of-heredoc)))))
@@ -5636,8 +5631,6 @@ function cell is returned to be applied on a buffer."
 ;; * Don't use globbing for directories with many files, as this is
 ;;   likely to produce long command lines, and some shells choke on
 ;;   long command lines.
-;; * Make it work for different encodings, and for different file name
-;;   encodings, too.  (Daniel Pittman)
 ;; * Don't search for perl5 and perl.  Instead, only search for perl and
 ;;   then look if it's the right version (with `perl -v').
 ;; * When editing a remote CVS controlled file as a different user, VC
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index fc23a0b..e157321 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -210,6 +210,12 @@ pair of the form (KEY VALUE).  The following KEYs are 
defined:
     for it.  Also note that \"/bin/sh\" exists on all Unixen,
     this might not be true for the value that you decide to use.
     You Have Been Warned.
+  * `tramp-remote-shell-login'
+    This specifies the arguments to let `tramp-remote-shell' run
+    as a login shell.  It defaults to (\"-l\"), but some shells,
+    like ksh, require another argument.  See
+    `tramp-connection-properties' for a way to overwrite the
+    default value.
   * `tramp-remote-shell-args'
     For implementation of `shell-command', this specifies the
     arguments to let `tramp-remote-shell' run a single command.
@@ -1099,11 +1105,20 @@ calling HANDLER.")
 ;; internal data structure.  Convenience functions for internal
 ;; data structure.
 
-(defun tramp-get-method-parameter (method param)
+(defun tramp-get-method-parameter (vec param)
   "Return the method parameter PARAM.
-If the `tramp-methods' entry does not exist, return nil."
-  (let ((entry (assoc param (assoc method tramp-methods))))
-    (when entry (cadr entry))))
+If VEC is a vector, check first in connection properties.
+Afterwards, check in `tramp-methods'.  If the `tramp-methods'
+entry does not exist, return nil."
+  (let ((hash-entry
+        (replace-regexp-in-string "^tramp-" "" (symbol-name param))))
+    (if (tramp-connection-property-p vec hash-entry)
+       ;; We use the cached property.
+       (tramp-get-connection-property  vec hash-entry nil)
+      ;; Use the static value from `tramp-methods'.
+      (let ((methods-entry
+            (assoc param (assoc (tramp-file-name-method vec) tramp-methods))))
+       (when methods-entry (cadr methods-entry))))))
 
 (defun tramp-file-name-p (vec)
   "Check, whether VEC is a Tramp object."
@@ -1167,7 +1182,7 @@ If the `tramp-methods' entry does not exist, return nil."
       (or (and (stringp host)
               (string-match tramp-host-with-port-regexp host)
               (string-to-number (match-string 2 host)))
-         (tramp-get-method-parameter method 'tramp-default-port)))))
+         (tramp-get-method-parameter vec 'tramp-default-port)))))
 
 ;;;###tramp-autoload
 (defun tramp-tramp-file-p (name)
@@ -2912,7 +2927,8 @@ User is always nil."
      (tramp-file-name-user v)
      (tramp-file-name-host v)
      (tramp-run-real-handler
-      'file-name-as-directory (list (or (tramp-file-name-localname v) ""))))))
+      'file-name-as-directory (list (or (tramp-file-name-localname v) "")))
+     (tramp-file-name-hop v))))
 
 (defun tramp-handle-file-name-completion
   (filename directory &optional predicate)
@@ -2940,7 +2956,8 @@ User is always nil."
      (tramp-file-name-user v)
      (tramp-file-name-host v)
      (tramp-run-real-handler
-      'file-name-directory (list (or (tramp-file-name-localname v) ""))))))
+      'file-name-directory (list (or (tramp-file-name-localname v) "")))
+     (tramp-file-name-hop v))))
 
 (defun tramp-handle-file-name-nondirectory (file)
   "Like `file-name-nondirectory' but aware of Tramp files."
@@ -2977,7 +2994,8 @@ User is always nil."
                ((eq identification 'user) user)
                ((eq identification 'host) host)
                ((eq identification 'localname) localname)
-               (t (tramp-make-tramp-file-name method user host "")))))))))
+               ((eq identification 'hop) hop)
+               (t (tramp-make-tramp-file-name method user host "" hop)))))))))
 
 (defun tramp-handle-file-symlink-p (filename)
   "Like `file-symlink-p' for Tramp files."
@@ -3092,8 +3110,7 @@ User is always nil."
                    ;; name handlers.
                    (when (and (or beg end)
                               (tramp-get-method-parameter
-                               (tramp-file-name-method v)
-                               'tramp-login-program))
+                               v 'tramp-login-program))
                      (setq remote-copy (tramp-make-tramp-temp-file v))
                      ;; This is defined in tramp-sh.el.  Let's assume
                      ;; this is loaded already.
@@ -3144,7 +3161,7 @@ User is always nil."
 
                    (when (and (null remote-copy)
                               (tramp-get-method-parameter
-                               method 'tramp-copy-keep-tmpfile))
+                               v 'tramp-copy-keep-tmpfile))
                      ;; We keep the local file for performance reasons,
                      ;; useful for "rsync".
                      (setq tramp-temp-buffer-file-name local-copy))
@@ -3228,12 +3245,10 @@ User is always nil."
         (args (append
                (cons
                 (tramp-get-method-parameter
-                 (tramp-file-name-method
-                  (tramp-dissect-file-name default-directory))
+                 (tramp-dissect-file-name default-directory)
                  'tramp-remote-shell)
                 (tramp-get-method-parameter
-                 (tramp-file-name-method
-                  (tramp-dissect-file-name default-directory))
+                 (tramp-dissect-file-name default-directory)
                  'tramp-remote-shell-args))
                (list (substring command 0 asynchronous))))
         current-buffer-p
@@ -3952,8 +3967,7 @@ be granted."
      ;; The method shall be applied to one of the shell file name
      ;; handlers.  `tramp-local-host-p' is also called for "smb" and
      ;; alike, where it must fail.
-     (tramp-get-method-parameter
-      (tramp-file-name-method vec) 'tramp-login-program)
+     (tramp-get-method-parameter vec 'tramp-login-program)
      ;; The local temp directory must be writable for the other user.
      (file-writable-p
       (tramp-make-tramp-file-name
@@ -3969,18 +3983,19 @@ be granted."
 
 (defun tramp-get-remote-tmpdir (vec)
   "Return directory for temporary files on the remote host identified by VEC."
-  (with-tramp-connection-property vec "tmpdir"
-    (let ((dir (tramp-make-tramp-file-name
-               (tramp-file-name-method vec)
-               (tramp-file-name-user vec)
-               (tramp-file-name-host vec)
-               (or
-                (tramp-get-method-parameter
-                 (tramp-file-name-method vec) 'tramp-tmpdir)
-                "/tmp"))))
-      (if (and (file-directory-p dir) (file-writable-p dir))
-         dir
-       (tramp-error vec 'file-error "Directory %s not accessible" dir)))))
+  (when (file-remote-p (tramp-get-connection-property vec "tmpdir" ""))
+    ;; Compatibility code: Cached value shall be the local path only.
+    (tramp-set-connection-property vec "tmpdir" 'undef))
+  (let ((dir (tramp-make-tramp-file-name
+             (tramp-file-name-method vec)
+             (tramp-file-name-user vec)
+             (tramp-file-name-host vec)
+             (or (tramp-get-method-parameter vec 'tramp-tmpdir) "/tmp"))))
+    (with-tramp-connection-property vec "tmpdir"
+      (or (and (file-directory-p dir) (file-writable-p dir)
+              (file-remote-p dir 'localname))
+         (tramp-error vec 'file-error "Directory %s not accessible" dir)))
+    dir))
 
 ;;;###tramp-autoload
 (defun tramp-make-tramp-temp-file (vec)
diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el
index eb22b60..2f575f9 100644
--- a/lisp/net/trampver.el
+++ b/lisp/net/trampver.el
@@ -31,7 +31,7 @@
 ;; should be changed only there.
 
 ;;;###tramp-autoload
-(defconst tramp-version "2.2.12-pre"
+(defconst tramp-version "2.2.13-pre"
   "This version of Tramp.")
 
 ;;;###tramp-autoload
@@ -58,7 +58,7 @@
                      (= emacs-major-version 21)
                      (>= emacs-minor-version 4)))
             "ok"
-          (format "Tramp 2.2.12-pre is not fit for %s"
+          (format "Tramp 2.2.13-pre is not fit for %s"
                   (when (string-match "^.*$" (emacs-version))
                     (match-string 0 (emacs-version)))))))
   (unless (string-match "\\`ok\\'" x) (error "%s" x)))
diff --git a/lisp/obsolete/bruce.el b/lisp/obsolete/bruce.el
index 6b0d04e..54b92b6 100644
--- a/lisp/obsolete/bruce.el
+++ b/lisp/obsolete/bruce.el
@@ -1,4 +1,4 @@
-;;; bruce.el --- bruce phrase utility for overloading the Communications -*- 
no-byte-compile: t -*-
+;;; bruce.el --- bruce phrase utility for overloading the Communications
 ;;; Decency Act snoops, if any.
 
 ;; Copyright (C) 1988, 1993, 1997, 2001-2015 Free Software Foundation,
diff --git a/lisp/obsolete/keyswap.el b/lisp/obsolete/keyswap.el
index 3c8fd5f..1f27896 100644
--- a/lisp/obsolete/keyswap.el
+++ b/lisp/obsolete/keyswap.el
@@ -1,4 +1,4 @@
-;;; keyswap.el --- swap BS and DEL keys -*- no-byte-compile: t -*-
+;;; keyswap.el --- swap BS and DEL keys
 
 ;; Copyright (C) 1992, 2001-2015 Free Software Foundation, Inc.
 
diff --git a/lisp/play/landmark.el b/lisp/obsolete/landmark.el
similarity index 99%
rename from lisp/play/landmark.el
rename to lisp/obsolete/landmark.el
index 2a64cdf..cd397ae 100644
--- a/lisp/play/landmark.el
+++ b/lisp/obsolete/landmark.el
@@ -6,6 +6,7 @@
 ;; Created: December 16, 1996 - first release to usenet
 ;; Keywords: games, neural network, adaptive search, chemotaxis
 ;; Version: 1.0
+;; Obsolete-since: 25.1
 
 ;; This file is part of GNU Emacs.
 
@@ -25,6 +26,8 @@
 
 ;;; Commentary:
 
+;; *Note: This package has now moved to elpa.gnu.org.*
+
 ;; To try this, just type: M-x landmark-test-run
 
 ;; Landmark is a relatively non-participatory game in which a robot
diff --git a/lisp/obsolete/longlines.el b/lisp/obsolete/longlines.el
index a27c43b..01939da 100644
--- a/lisp/obsolete/longlines.el
+++ b/lisp/obsolete/longlines.el
@@ -464,14 +464,9 @@ This is called by `window-configuration-change-hook'."
 
 (defun longlines-search-function ()
   (cond
-   (isearch-word
-    (if isearch-forward 'word-search-forward 'word-search-backward))
-   (isearch-regexp
-    (if isearch-forward 're-search-forward 're-search-backward))
-   (t
-    (if isearch-forward
-       'longlines-search-forward
-      'longlines-search-backward))))
+   ((or isearch-word isearch-regexp) (isearch-search-fun-default))
+   (isearch-forward #'longlines-search-forward)
+   (t #'longlines-search-backward)))
 
 (defun longlines-search-forward (string &optional bound noerror count)
   (let ((search-spaces-regexp " *[ \n]"))
diff --git a/lisp/obsolete/otodo-mode.el b/lisp/obsolete/otodo-mode.el
index 69364f6..04b8810 100644
--- a/lisp/obsolete/otodo-mode.el
+++ b/lisp/obsolete/otodo-mode.el
@@ -734,7 +734,7 @@ If point is on an empty line, insert the entry there."
 Number of entries for each category is given by NOF-PRIORITIES which
 defaults to `todo-show-priorities'.
 
-If CATEGORY-PR-PAGE is non-nil, a page separator \'^L\' is inserted
+If CATEGORY-PR-PAGE is non-nil, a page separator '^L' is inserted
 between each category.
 INTERACTIVE should be non-nil if this function is called interactively."
 
diff --git a/lisp/obsolete/patcomp.el b/lisp/obsolete/patcomp.el
index 9aacdd8..8545f07 100644
--- a/lisp/obsolete/patcomp.el
+++ b/lisp/obsolete/patcomp.el
@@ -1,4 +1,4 @@
-;;; patcomp.el --- used by patch files to update Emacs releases -*- 
no-byte-compile: t -*-
+;;; patcomp.el --- used by patch files to update Emacs releases
 
 ;; This file is part of GNU Emacs.
 
diff --git a/lisp/obsolete/vc-arch.el b/lisp/obsolete/vc-arch.el
index 2469f76..8b2454b 100644
--- a/lisp/obsolete/vc-arch.el
+++ b/lisp/obsolete/vc-arch.el
@@ -397,7 +397,7 @@ CALLBACK expects (ENTRIES &optional MORE-TO-COME); see
            (pcase (vc-state file)
              ((or `up-to-date `needs-update) ?-)
              (`added ?@)
-             (t ?:))
+             (_ ?:))
            rev)))
 
 (defun vc-arch-diff3-rej-p (rej)
diff --git a/lisp/progmodes/cfengine.el b/lisp/progmodes/cfengine.el
index aec7d20..108ccb6 100644
--- a/lisp/progmodes/cfengine.el
+++ b/lisp/progmodes/cfengine.el
@@ -5,7 +5,7 @@
 ;; Author: Dave Love <address@hidden>
 ;; Maintainer: Ted Zlatanov <address@hidden>
 ;; Keywords: languages
-;; Version: 1.3
+;; Version: 1.4
 
 ;; This file is part of GNU Emacs.
 
@@ -24,7 +24,7 @@
 
 ;;; Commentary:
 
-;; Provides support for editing GNU Cfengine files, including
+;; Provides support for editing GNU CFEngine files, including
 ;; font-locking, Imenu and indentation, but with no special keybindings.
 
 ;; By default, CFEngine 3.x syntax is used.
@@ -46,6 +46,14 @@
 
 ;; (add-hook 'cfengine3-mode-hook 'eldoc-mode)
 
+;; You may also find the command `cfengine3-reformat-json-string'
+;; useful, just bind it to a key you prefer. It will take the current
+;; string and reformat it as JSON. So if you're editing JSON inside
+;; the policy, it's a quick way to make it more legible without
+;; manually reindenting it.  For instance:
+
+;; (global-set-key [(control f4)] 'cfengine3-reformat-json-string)
+
 ;; This is not the same as the mode written by Rolf Ebert
 ;; <address@hidden>, distributed with cfengine-2.0.5.  It does
 ;; better fontification and indentation, inter alia.
@@ -53,6 +61,7 @@
 ;;; Code:
 
 (autoload 'json-read "json")
+(autoload 'json-pretty-print "json")
 
 (defgroup cfengine ()
   "Editing CFEngine files."
@@ -80,7 +89,7 @@ will use a fallback syntax definition."
   :group 'cfengine
   :type '(choice file (const nil)))
 
-(defcustom cfengine-parameters-indent '(promise pname 0)
+(defcustom cfengine-parameters-indent '(promise pname 2)
   "Indentation of CFEngine3 promise parameters (hanging indent).
 
 For example, say you have this code:
@@ -101,15 +110,15 @@ You can also choose to indent the start of the word
 
 Finally, you can choose the amount of the indent.
 
-The default is to anchor at promise, indent parameter name, and offset 0:
+The default is to anchor at promise, indent parameter name, and offset 2:
 
 bundle agent rcfiles
 {
   files:
     any::
       \"/tmp/netrc\"
-      comment => \"my netrc\",
-      perms => mog(\"600\", \"tzz\", \"tzz\");
+        comment => \"my netrc\",
+        perms => mog(\"600\", \"tzz\", \"tzz\");
 }
 
 Here we anchor at beginning of line, indent arrow, and offset 10:
@@ -823,7 +832,9 @@ This includes those for cfservd as well as cfagent.")
                                             )
     "Regexp matching full defun declaration (excluding argument list).")
 
-  (defconst cfengine3-class-selector-regex "\\([[:alnum:]_().&|!:]+\\)::")
+  (defconst cfengine3-macro-regex "\\(@[a-zA-Z].+\\)")
+
+  (defconst cfengine3-class-selector-regex 
"\\([\"']?[[:alnum:]_().$&|!:]+[\"']?\\)::")
 
   (defconst cfengine3-category-regex "\\([[:alnum:]_]+\\):")
 
@@ -850,6 +861,14 @@ This includes those for cfservd as well as cfagent.")
 
 (defvar cfengine3-font-lock-keywords
   `(
+    ;; Macros
+    (,(concat "^" cfengine3-macro-regex)
+     1 font-lock-error-face)
+
+    ;; invalid macros
+    (,(concat "^[ \t]*" cfengine3-macro-regex)
+     1 font-lock-warning-face)
+
     ;; Defuns.  This happens early so they don't get caught by looser
     ;; patterns.
     (,(concat "\\_<" cfengine3-defuns-regex "\\_>"
@@ -1016,7 +1035,7 @@ Treats body/bundle blocks as defuns."
   t)
 
 (defun cfengine3-indent-line ()
-  "Indent a line in Cfengine 3 mode.
+  "Indent a line in CFEngine 3 mode.
 Intended as the value of `indent-line-function'."
   (let ((pos (- (point-max) (point)))
         parse)
@@ -1028,6 +1047,10 @@ Intended as the value of `indent-line-function'."
         (message "%S" parse))
 
       (cond
+       ;; Macros start at 0.  But make sure we're not inside a string.
+       ((and (not (nth 3 parse))
+             (looking-at (concat cfengine3-macro-regex)))
+        (indent-line-to 0))
        ;; Body/bundle blocks start at 0.
        ((looking-at (concat cfengine3-defuns-regex "\\_>"))
         (indent-line-to 0))
@@ -1103,6 +1126,19 @@ Intended as the value of `indent-line-function'."
     (if (> (- (point-max) pos) (point))
         (goto-char (- (point-max) pos)))))
 
+(defun cfengine3-reformat-json-string ()
+  "Reformat the current string as JSON using `json-pretty-print'."
+  (interactive)
+  (let ((ppss (syntax-ppss)))
+    (when (nth 3 ppss)                  ;inside a string
+      (save-excursion
+        (goto-char (nth 8 ppss))
+        (forward-char 1)
+        (let ((start (point)))
+          (forward-sexp 1)
+          (json-pretty-print start
+                             (point)))))))
+
 ;; CFEngine 3.x grammar
 
 ;; specification: blocks
@@ -1199,18 +1235,22 @@ Intended as the value of `indent-line-function'."
               "???")
             (propertize f 'face 'font-lock-function-name-face)
             (mapconcat (lambda (p)
-                         (let ((type (cdr (assq 'type p)))
+                         (let* ((type (cdr (assq 'type p)))
+                                (description (cdr (assq 'description p)))
+                                (desc-string (if (stringp description)
+                                                 (concat " /" description "/")
+                                               ""))
                                (range (cdr (assq 'range p))))
                            (cond
                             ((not (stringp type)) "???type???")
                             ((not (stringp range)) "???range???")
                             ;; options are lists of possible keywords
                             ((equal type "option")
-                             (propertize (concat "[" range "]")
+                             (propertize (concat "[" range "]" desc-string)
                                          'face
                                          'font-lock-keyword-face))
                             ;; anything else is a type name as a variable
-                            (t (propertize type
+                            (t (propertize (concat type desc-string)
                                            'face
                                            'font-lock-variable-name-face)))))
                        plist
@@ -1350,6 +1390,10 @@ to the action header."
                  (when buffer-file-name
                    (shell-quote-argument buffer-file-name)))))
 
+  ;; For emacs < 25.1 where `eldoc-documentation-function' defaults to
+  ;; nil.
+  (or eldoc-documentation-function
+      (setq-local eldoc-documentation-function #'ignore))
   (add-function :before-until (local 'eldoc-documentation-function)
                 #'cfengine3-documentation-function)
 
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index a58e393..9a44335 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -255,7 +255,7 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1))
      ;; can be composed of any non-newline char, but it also rules out some
      ;; valid but unlikely cases, such as a trailing space or a space
      ;; followed by a -, or a colon followed by a space.
-     ;; 
+     ;;
      ;; The "in \\|from " exception was added to handle messages from Ruby.
      ,(rx
        bol
@@ -1461,9 +1461,9 @@ Additionally, with universal prefix arg, compilation 
buffer will be in
 comint mode, i.e. interactive.
 
 To run more than one compilation at once, start one then rename
-the \`*compilation*' buffer to some other name with
+the `*compilation*' buffer to some other name with
 \\[rename-buffer].  Then _switch buffers_ and start the new compilation.
-It will create a new \`*compilation*' buffer.
+It will create a new `*compilation*' buffer.
 
 On most systems, termination of the main compilation process
 kills its subprocesses.
@@ -2521,9 +2521,9 @@ displays at the top of the window; there is no arrow."
                             (- 1 compilation-context-lines))
                            (point)))
     ;; If there is no left fringe.
-    (if (equal (car (window-fringes)) 0)
-       (set-window-start w (save-excursion
-                             (goto-char mk)
+    (when (equal (car (window-fringes w)) 0)
+      (set-window-start w (save-excursion
+                            (goto-char mk)
                            (beginning-of-line 1)
                            (point)))))
     (set-window-point w mk))
diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index 61709c3..b7ae3c7 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/progmodes/elisp-mode.el
@@ -29,6 +29,7 @@
 ;;; Code:
 
 (require 'lisp-mode)
+(eval-when-compile (require 'cl-lib))
 
 (define-abbrev-table 'emacs-lisp-mode-abbrev-table ()
   "Abbrev table for Emacs Lisp mode.
@@ -228,6 +229,7 @@ Blank lines separate paragraphs.  Semicolons start comments.
   :group 'lisp
   (defvar xref-find-function)
   (defvar xref-identifier-completion-table-function)
+  (defvar project-search-path-function)
   (lisp-mode-variables nil nil 'elisp)
   (add-hook 'after-load-functions #'elisp--font-lock-flush-elisp-buffers)
   (setq-local electric-pair-text-pairs
@@ -239,6 +241,7 @@ Blank lines separate paragraphs.  Semicolons start comments.
   (setq-local xref-find-function #'elisp-xref-find)
   (setq-local xref-identifier-completion-table-function
               #'elisp--xref-identifier-completion-table)
+  (setq-local project-search-path-function #'elisp-search-path)
   (add-hook 'completion-at-point-functions
             #'elisp-completion-at-point nil 'local))
 
@@ -460,7 +463,7 @@ It can be quoted, or be inside a quoted form."
           (beg (condition-case nil
                    (save-excursion
                      (backward-sexp 1)
-                     (skip-chars-forward "`',‘")
+                     (skip-chars-forward "`',‘#")
                      (point))
                  (scan-error pos)))
           (end
@@ -580,8 +583,8 @@ It can be quoted, or be inside a quoted form."
 ;;; Xref backend
 
 (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))
+(declare-function xref-make "xref" (summary location))
+(declare-function xref-collect-references "xref" (symbol dir))
 
 (defun elisp-xref-find (action id)
   (require 'find-func)
@@ -591,9 +594,7 @@ It can be quoted, or be inside a quoted form."
         (when sym
           (elisp--xref-find-definitions sym))))
     (`references
-     (elisp--xref-find-matches id #'xref-collect-references))
-    (`matches
-     (elisp--xref-find-matches id #'xref-collect-matches))
+     (elisp--xref-find-references id))
     (`apropos
      (elisp--xref-find-apropos id))))
 
@@ -652,29 +653,14 @@ It can be quoted, or be inside a quoted form."
              lst))))
       lst)))
 
-(defvar package-user-dir)
-
-(defun elisp--xref-find-matches (symbol fun)
-  (let* ((dirs (sort
-                (mapcar
-                 (lambda (dir)
-                   (file-name-as-directory (expand-file-name dir)))
-                 ;; It's one level above a number of `load-path'
-                 ;; elements (one for each installed package).
-                 ;; Save us some process calls.
-                 (cons package-user-dir load-path))
-                #'string<))
-         (ref dirs))
-    ;; Delete subdirectories from the list.
-    (while (cdr ref)
-      (if (string-prefix-p (car ref) (cadr ref))
-          (setcdr ref (cddr ref))
-        (setq ref (cdr ref))))
-    (cl-mapcan
-     (lambda (dir)
-       (and (file-exists-p dir)
-            (funcall fun symbol dir)))
-     dirs)))
+(declare-function project-search-path "project")
+(declare-function project-current "project")
+
+(defun elisp--xref-find-references (symbol)
+  (cl-mapcan
+   (lambda (dir)
+     (xref-collect-references symbol dir))
+   (project-search-path (project-current))))
 
 (defun elisp--xref-find-apropos (regexp)
   (apply #'nconc
@@ -714,6 +700,13 @@ It can be quoted, or be inside a quoted form."
         (goto-char (or (cdr buffer-point) (point-min)))
         (point-marker)))))
 
+(cl-defmethod xref-location-group ((l xref-elisp-location))
+  (xref-elisp-location-file l))
+
+(defun elisp-search-path ()
+  (defvar package-user-dir)
+  (cons package-user-dir load-path))
+
 ;;; Elisp Interaction mode
 
 (defvar lisp-interaction-mode-map
@@ -1434,7 +1427,7 @@ In the absence of INDEX, just call 
`eldoc-docstring-format-sym-doc'."
 ARGLIST is either a string, or a list of strings or symbols."
   (let ((str (cond ((stringp arglist) arglist)
                    ((not (listp arglist)) nil)
-                   (t (format "%S" (help-make-usage 'toto arglist))))))
+                   (t (help--make-usage-docstring 'toto arglist)))))
     (if (and str (string-match "\\`([^ )]+ ?" str))
         (replace-match "(" t t str)
       str)))
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el
index bf57770..f5745a9 100644
--- a/lisp/progmodes/etags.el
+++ b/lisp/progmodes/etags.el
@@ -1772,7 +1772,7 @@ if the file was newly read in, the value is the filename."
                "No \\[tags-search] or \\[tags-query-replace] in progress"))
   "Form for `tags-loop-continue' to eval to scan one file.
 If it returns non-nil, this file needs processing by evalling
-\`tags-loop-operate'.  Otherwise, move on to the next file.")
+`tags-loop-operate'.  Otherwise, move on to the next file.")
 
 (defun tags-loop-eval (form)
   "Evaluate FORM and return its result.
@@ -2087,18 +2087,15 @@ 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 #'xref-collect-references))
-    (`matches
-     (etags--xref-find-matches id #'xref-collect-matches))
+    (`references  (etags--xref-find-references id))
     (`apropos (etags--xref-find-definitions id t))))
 
-(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) (funcall fun input dir)) dirs)))
+(defun etags--xref-find-references (symbol)
+  ;; TODO: Merge together with the Elisp impl.
+  (cl-mapcan
+   (lambda (dir)
+     (xref-collect-references symbol dir))
+   (project-search-path (project-current))))
 
 (defun etags--xref-find-definitions (pattern &optional regexp?)
   ;; This emulates the behaviour of `find-tag-in-order' but instead of
@@ -2154,6 +2151,9 @@ for \\[find-tag] (which see)."
   (with-slots (tag-info) l
     (nth 1 tag-info)))
 
+(defun etags-search-path ()
+  (mapcar #'file-name-directory tags-table-list))
+
 
 (provide 'etags)
 
diff --git a/lisp/progmodes/executable.el b/lisp/progmodes/executable.el
index bdc6403..50e4da9 100644
--- a/lisp/progmodes/executable.el
+++ b/lisp/progmodes/executable.el
@@ -104,11 +104,13 @@ Typical values are 73 (+x) or -493 (rwxr-xr-x)."
 (defvar executable-command nil)
 
 (defcustom executable-self-display "tail"
-  "Command you use with argument `+2' to make text files self-display.
+  "Command you use with argument `-n+2' to make text files self-display.
 Note that the like of `more' doesn't work too well under Emacs \\[shell]."
   :type 'string
   :group 'executable)
 
+(make-obsolete-variable 'executable-self-display nil "25.1" 'set)
+
 
 (defvar executable-font-lock-keywords
   '(("\\`#!.*/\\([^ \t\n]+\\)" 1 font-lock-keyword-face t))
@@ -251,14 +253,14 @@ executable."
 
 
 
-;;;###autoload
 (defun executable-self-display ()
   "Turn a text file into a self-displaying Un*x command.
 The magic number of such a command displays all lines but itself."
+  (declare (obsolete nil "25.1"))
   (interactive)
   (if (eq this-command 'executable-self-display)
       (setq this-command 'executable-set-magic))
-  (executable-set-magic executable-self-display "+2"))
+  (executable-set-magic executable-self-display "-n+2"))
 
 ;;;###autoload
 (defun executable-make-buffer-file-executable-if-script-p ()
diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el
index 0fde4f4..43b057b 100644
--- a/lisp/progmodes/f90.el
+++ b/lisp/progmodes/f90.el
@@ -898,12 +898,12 @@ Can be overridden by the value of 
`font-lock-maximum-decoration'.")
 (defconst f90-type-def-re
   ;; type word
   ;; type :: word
-  ;; type, stuff :: word
-  ;; type, bind(c) :: word
-  ;; type, extends(stuff) :: word
+  ;; type, attr-list :: word
+  ;;   where attr-list = attr [, attr ...]
+  ;;   and attr may include bind(c) or extends(thing)
   ;; NOT "type ("
   "\\_<\\(type\\)\\_>\\(?:\\(?:[^()\n]*\\|\
-.*,[ \t]*\\(?:bind\\|extends\\)[ \t]*(.*)[ \t]*\\)::\\)?\
+.*,[ \t]*\\(?:bind\\|extends\\)[ \t]*(.*).*\\)::\\)?\
 [ \t]*\\(\\(?:\\sw\\|\\s_\\)+\\)"
   "Regexp matching the definition of a derived type.")
 
@@ -2374,7 +2374,7 @@ With optional argument ALL, change the default for all 
present
 and future F90 buffers.  F90 mode normally treats backslash as an
 escape character."
   (or (derived-mode-p 'f90-mode)
-      (error "This function should only be used in F90 buffers"))
+      (user-error "This function should only be used in F90 buffers"))
   (when (equal (char-syntax ?\\ ) ?\\ )
     (or all (set-syntax-table (copy-syntax-table (syntax-table))))
     (modify-syntax-entry ?\\ ".")))
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index 696ab52..bb5ac63 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -287,7 +287,7 @@ Return its file name if found, or nil if not found."
             nil)))))
 
 (defun flymake-fix-file-name (name)
-  "Replace all occurrences of '\' with '/'."
+  "Replace all occurrences of ‘\\’ with ‘/’."
   (when name
     (setq name (expand-file-name name))
     (setq name (abbreviate-file-name name))
diff --git a/lisp/progmodes/fortran.el b/lisp/progmodes/fortran.el
index c0d4454..65aa745 100644
--- a/lisp/progmodes/fortran.el
+++ b/lisp/progmodes/fortran.el
@@ -916,12 +916,12 @@ with no args, if that value is non-nil."
 
 (defun fortran-line-length (nchars &optional global)
   "Set the length of fixed-form Fortran lines to NCHARS.
-This normally only affects the current buffer, which must be in
-Fortran mode.  If the optional argument GLOBAL is non-nil, it
-affects all Fortran buffers, and also the default.
-If a numeric prefix argument is specified, it will be used as NCHARS,
-otherwise is a non-numeric prefix arg is specified, the length will be
-provided via the minibuffer, and otherwise the current column is used."
+By default this only affects the current buffer, which must be in
+Fortran mode.  If the optional argument GLOBAL is non-nil, it affects
+all Fortran buffers, and also the default.  The default value of NCHARS
+is the current column.  A numeric prefix argument specifies a value to
+use instead of the current column.  A non-numeric prefix argument prompts
+for the value to use."
   (interactive
    (list (cond
           ((numberp current-prefix-arg) current-prefix-arg)
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
index 6981d38..3240ee8 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -130,7 +130,7 @@ Customize or call the function `grep-apply-setting'."
 (defcustom grep-template nil
   "The default command to run for \\[lgrep].
 The following place holders should be present in the string:
- <C> - place to put -i if case insensitive grep.
+ <C> - place to put the options like -i and --color.
  <F> - file names and wildcards to search.
  <X> - file names and wildcards to exclude.
  <R> - the regular expression searched for.
@@ -177,7 +177,7 @@ The following place holders should be present in the string:
  <D> - base directory for find
  <X> - find options to restrict or expand the directory list
  <F> - find options to limit the files matched
- <C> - place to put -i if case insensitive grep
+ <C> - place to put the grep options like -i and --color
  <R> - the regular expression searched for.
 In interactive usage, the actual value of this variable is set up
 by `grep-compute-defaults'; to change the default value, use
@@ -572,20 +572,23 @@ This function is called from `compilation-filter-hook'."
     (unless (and grep-command grep-find-command
                 grep-template grep-find-template)
       (let ((grep-options
-            (concat (and grep-highlight-matches
-                         (grep-probe grep-program
-                                     `(nil nil nil "--color" "x" ,null-device)
-                                     nil 1)
-                         (if (eq grep-highlight-matches 'always)
-                             "--color=always " "--color "))
-                    (if grep-use-null-device "-n" "-nH")
+            (concat (if grep-use-null-device "-n" "-nH")
                     (if (grep-probe grep-program
                                     `(nil nil nil "-e" "foo" ,null-device)
                                     nil 1)
                         " -e"))))
        (unless grep-command
          (setq grep-command
-               (format "%s %s " grep-program grep-options)))
+               (format "%s %s %s " grep-program
+                        (or
+                         (and grep-highlight-matches
+                              (grep-probe grep-program
+                                          `(nil nil nil "--color" "x" 
,null-device)
+                                          nil 1)
+                              (if (eq grep-highlight-matches 'always)
+                                  "--color=always" "--color"))
+                         "")
+                         grep-options)))
        (unless grep-template
          (setq grep-template
                (format "%s <X> <C> %s <R> <F>" grep-program grep-options)))
@@ -633,17 +636,17 @@ This function is called from `compilation-filter-hook'."
                                (format "%s " null-device)
                              "")))
                  (cond ((eq grep-find-use-xargs 'gnu)
-                        (format "%s . <X> -type f <F> -print0 | \"%s\" -0 %s"
+                        (format "%s <D> <X> -type f <F> -print0 | \"%s\" -0 %s"
                                 find-program xargs-program gcmd))
                        ((eq grep-find-use-xargs 'exec)
-                        (format "%s . <X> -type f <F> -exec %s {} %s%s"
+                        (format "%s <D> <X> -type f <F> -exec %s {} %s%s"
                                 find-program gcmd null
                                 (shell-quote-argument ";")))
                        ((eq grep-find-use-xargs 'exec-plus)
-                        (format "%s . <X> -type f <F> -exec %s %s{} +"
+                        (format "%s <D> <X> -type f <F> -exec %s %s{} +"
                                 find-program gcmd null))
                        (t
-                        (format "%s . <X> -type f <F> -print | \"%s\" %s"
+                        (format "%s <D> <X> -type f <F> -print | \"%s\" %s"
                                 find-program xargs-program gcmd))))))))
 
     ;; Save defaults for this host.
@@ -791,8 +794,8 @@ easily repeat a find command."
 ;; User-friendly interactive API.
 
 (defconst grep-expand-keywords
-  '(("<C>" . (and cf (isearch-no-upper-case-p regexp t) "-i"))
-    ("<D>" . dir)
+  '(("<C>" . (mapconcat #'identity opts " "))
+    ("<D>" . (or dir "."))
     ("<F>" . files)
     ("<N>" . null-device)
     ("<X>" . excl)
@@ -804,7 +807,16 @@ substitution string.  Note dynamic scoping of variables.")
 (defun grep-expand-template (template &optional regexp files dir excl)
   "Patch grep COMMAND string replacing <C>, <D>, <F>, <R>, and <X>."
   (let* ((command template)
-         (env `((cf . ,case-fold-search)
+         (env `((opts . ,(let (opts)
+                           (when (and case-fold-search
+                                      (isearch-no-upper-case-p regexp t))
+                             (push "-i" opts))
+                           (cond
+                            ((eq grep-highlight-matches 'always)
+                             (push "--color=always" opts))
+                            ((eq grep-highlight-matches 'auto)
+                             (push "--color" opts)))
+                           opts))
                 (excl . ,excl)
                 (dir . ,dir)
                 (files . ,files)
@@ -992,7 +1004,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)))
-      (let ((command (rgrep-default-command regexp files dir)))
+      (let ((command (rgrep-default-command regexp files nil)))
        (when command
          (if confirm
              (setq command
@@ -1094,9 +1106,9 @@ file name to `*.gz', and sets `grep-highlight-matches' to 
`always'."
                                            nil default-directory t))
                  (confirm (equal current-prefix-arg '(4))))
             (list regexp files dir confirm grep-find-template)))))))
-  ;; Set `grep-highlight-matches' to `always'
-  ;; since `zgrep' puts filters in the grep output.
   (let ((grep-find-template template)
+        ;; Set `grep-highlight-matches' to `always'
+        ;; since `zgrep' puts filters in the grep output.
         (grep-highlight-matches 'always))
     (rgrep regexp files dir confirm)))
 
diff --git a/lisp/progmodes/inf-lisp.el b/lisp/progmodes/inf-lisp.el
index cdedbce..17aaab9 100644
--- a/lisp/progmodes/inf-lisp.el
+++ b/lisp/progmodes/inf-lisp.el
@@ -126,7 +126,7 @@ mode.  Default is whitespace followed by 0 or 1 
single-letter colon-keyword
 
 ;;; This function exists for backwards compatibility.
 ;;; Previous versions of this package bound commands to C-c <letter>
-;;; bindings, which is not allowed by the gnumacs standard.
+;;; bindings, which is not allowed by the Emacs standard.
 
 ;;;  "This function binds many inferior-lisp commands to C-c <letter> bindings,
 ;;;where they are more accessible. C-c <letter> bindings are reserved for the
@@ -662,7 +662,7 @@ See variable `lisp-describe-sym-command'."
 ;;; Changed all keybindings of the form C-c <letter>. These are
 ;;; supposed to be reserved for the user to bind. This affected
 ;;; mainly the compile/eval-defun/region[-and-go] commands.
-;;; This was painful, but necessary to adhere to the gnumacs standard.
+;;; This was painful, but necessary to adhere to the Emacs standard.
 ;;; For some backwards compatibility, see the
 ;;;     cmulisp-install-letter-bindings
 ;;; function.
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el
index f06c5c7..40a4a10 100644
--- a/lisp/progmodes/js.el
+++ b/lisp/progmodes/js.el
@@ -3497,7 +3497,7 @@ If one hasn't been set, or if it's stale, prompt for a 
new one."
 ;;; Main Function
 
 ;;;###autoload
-(define-derived-mode js-mode prog-mode "Javascript"
+(define-derived-mode js-mode prog-mode "JavaScript"
   "Major mode for editing JavaScript."
   :group 'js
   (setq-local indent-line-function 'js-indent-line)
@@ -3528,7 +3528,7 @@ If one hasn't been set, or if it's stale, prompt for a 
new one."
 
   ;; for filling, pretend we're cc-mode
   (setq c-comment-prefix-regexp "//+\\|\\**"
-        c-paragraph-start "$"
+        c-paragraph-start "\\(@[[:alpha:]]+\\>\\|$\\)"
         c-paragraph-separate "$"
         c-block-comment-prefix "* "
         c-line-comment-starter "//"
diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el
index fc0be60..9abbf16 100644
--- a/lisp/progmodes/make-mode.el
+++ b/lisp/progmodes/make-mode.el
@@ -1455,7 +1455,7 @@ Fill comments, backslashed lines, and variable 
definitions specially."
 
 (defun makefile-browser-insert-continuation ()
   "Insert a makefile continuation.
-In the makefile buffer, go to (end-of-line), insert a \'\\\'
+In the makefile buffer, go to (end-of-line), insert a ‘\\’
 character, insert a new blank line, go to that line and indent by one TAB.
 This is most useful in the process of creating continued lines when copying
 large dependencies from the browser to the client buffer.
diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el
index 8541cce..50f888c 100644
--- a/lisp/progmodes/octave.el
+++ b/lisp/progmodes/octave.el
@@ -1064,7 +1064,7 @@ directory and makes this the current buffer's default 
directory."
     (pcase (and buffer-file-name (file-name-extension buffer-file-name))
       (`"cc" (funcall search
                       
"\\_<DEFUN\\(?:_DLD\\)?\\s-*(\\s-*\\(\\(?:\\sw\\|\\s_\\)+\\)" 1))
-      (t (funcall search octave-function-header-regexp 3)))))
+      (_ (funcall search octave-function-header-regexp 3)))))
 
 (defun octave-function-file-p ()
   "Return non-nil if the first token is \"function\".
@@ -1820,7 +1820,7 @@ If the environment variable OCTAVE_SRCDIR is set, it is 
searched first."
                               (file-name-nondirectory name)))
          name
        (user-error "Aborted")))
-    (t name)))
+    (_ name)))
 
 (defvar find-tag-marker-ring)
 
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el
index a64944f..3521a13 100644
--- a/lisp/progmodes/perl-mode.el
+++ b/lisp/progmodes/perl-mode.el
@@ -204,10 +204,13 @@
   '((?\( . ?\)) (?\[ . ?\]) (?\{ . ?\}) (?\< . ?\>)))
 
 (eval-and-compile
+  (defconst perl--syntax-exp-intro-keywords
+    '("split" "if" "unless" "until" "while" "print"
+      "grep" "map" "not" "or" "and" "for" "foreach"))
+
   (defconst perl--syntax-exp-intro-regexp
     (concat "\\(?:\\(?:^\\|[^$@&%[:word:]]\\)"
-            (regexp-opt '("split" "if" "unless" "until" "while" "print"
-                          "grep" "map" "not" "or" "and" "for" "foreach"))
+            (regexp-opt perl--syntax-exp-intro-keywords)
             "\\|[-?:.,;|&+*=!~({[]\\|\\(^\\)\\)[ \t\n]*")))
 
 ;; FIXME: handle here-docs and regexps.
@@ -278,8 +281,13 @@
                       (forward-comment (- (point-max)))
                       (put-text-property (point) (match-end 2)
                                          'syntax-multiline t)
-                      (not (memq (char-before)
-                                 '(?? ?: ?. ?, ?\; ?= ?! ?~ ?\( ?\[)))))
+                      (not (or (and (eq ?w (char-syntax (preceding-char)))
+                                    (let ((end (point)))
+                                      (backward-sexp 1)
+                                      (member (buffer-substring (point) end)
+                                              
perl--syntax-exp-intro-keywords)))
+                               (memq (char-before)
+                                     '(?? ?: ?. ?, ?\; ?= ?! ?~ ?\( ?\[))))))
                nil ;; A division sign instead of a regexp-match.
              (put-text-property (match-beginning 2) (match-end 2)
                                 'syntax-table (string-to-syntax "\""))
@@ -297,13 +305,19 @@
                                (looking-at-p "sub[ \t\n]"))
                ;; This is defining a function.
                nil
-             (put-text-property (match-beginning 3) (match-end 3)
-                                'syntax-table
-                                (if (assoc (char-after (match-beginning 3))
-                                           perl-quote-like-pairs)
-                                    (string-to-syntax "|")
-                                  (string-to-syntax "\"")))
-             (perl-syntax-propertize-special-constructs end)))))
+             (unless (nth 8 (save-excursion (syntax-ppss (match-beginning 1))))
+               ;; Don't add this syntax-table property if
+               ;; within a string, which would misbehave in cases such as
+               ;; $a = "foo y \"toto\" bar" where we'd end up changing the
+               ;; syntax of the backslash and hence de-escaping the embedded
+               ;; double quote.
+               (put-text-property (match-beginning 3) (match-end 3)
+                                  'syntax-table
+                                  (if (assoc (char-after (match-beginning 3))
+                                             perl-quote-like-pairs)
+                                      (string-to-syntax "|")
+                                    (string-to-syntax "\"")))
+               (perl-syntax-propertize-special-constructs end))))))
       ;; Here documents.
       ((concat
         "\\(?:"
diff --git a/lisp/progmodes/prog-mode.el b/lisp/progmodes/prog-mode.el
index 0d9fabd..cb8aaad 100644
--- a/lisp/progmodes/prog-mode.el
+++ b/lisp/progmodes/prog-mode.el
@@ -48,6 +48,51 @@
     map)
   "Keymap used for programming modes.")
 
+(defvar prog-indentation-context nil
+  "Non-nil while indenting embedded code chunks.
+There are languages where part of the code is actually written in
+a sub language, e.g., a Yacc/Bison or ANTLR grammar also consists
+of plain C code.  This variable enables the major mode of the
+main language to use the indentation engine of the sub mode for
+lines in code chunks written in the sub language.
+
+When a major mode of such a main language decides to delegate the
+indentation of a line/region to the indentation engine of the sub
+mode, it is supposed to bind this variable to non-nil around the call.
+
+The non-nil value looks as follows
+   \(FIRST-COLUMN (START . END) PREVIOUS-CHUNKS)
+
+FIRST-COLUMN is the column the indentation engine of the sub mode
+should usually choose for top-level language constructs inside
+the code chunk (instead of 0).
+
+START to END is the region of the code chunk.  See function
+`prog-widen' for additional info.
+
+PREVIOUS-CHUNKS, if non-nil, provides the indentation engine of
+the sub mode with the virtual context of the code chunk.  Valid
+values are:
+
+ - A string containing code which the indentation engine can
+   consider as standing in front of the code chunk.  To cache the
+   string's calculated syntactic information for repeated calls
+   with the same string, it is valid and expected for the inner
+   mode to add text-properties to the string.
+
+   A typical use case is for grammars with code chunks which are
+   to be indented like function bodies - the string would contain
+   a corresponding function header.
+
+ - A function called with the start position of the current
+   chunk.  It will return either the region of the previous chunk
+   as \(PREV-START . PREV-END) or nil if there is no further
+   previous chunk.
+
+   A typical use case are literate programming sources - the
+   function would successively return the code chunks of the
+   previous macro definitions for the same name.")
+
 (defun prog-indent-sexp (&optional defun)
   "Indent the expression after point.
 When interactively called with prefix, indent the enclosing defun
@@ -61,6 +106,27 @@ instead."
          (end (progn (forward-sexp 1) (point))))
       (indent-region start end nil))))
 
+(defun prog-first-column ()
+  "Return the indentation column normally used for top-level constructs."
+  (or (car prog-indentation-context) 0))
+
+(defun prog-widen ()
+  "Remove restrictions (narrowing) from current code chunk or buffer.
+This function can be used instead of `widen' in any function used
+by the indentation engine to make it respect the value
+`prog-indentation-context'.
+
+This function (like 'widen') is useful inside a
+`save-restriction' to make the indentation correctly work when
+narrowing is in effect."
+  (let ((chunk (cadr prog-indentation-context)))
+    (if chunk
+        ;; no widen necessary here, as narrow-to-region changes (not
+        ;; just narrows) existing restrictions
+        (narrow-to-region (car chunk) (or (cdr chunk) (point-max)))
+      (widen))))
+
+
 (defvar-local prettify-symbols-alist nil
   "Alist of symbol prettifications.
 Each element looks like (SYMBOL . CHARACTER), where the symbol
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
new file mode 100644
index 0000000..44a15dc
--- /dev/null
+++ b/lisp/progmodes/project.el
@@ -0,0 +1,144 @@
+;;; project.el --- Operations on the current project  -*- lexical-binding: t; 
-*-
+
+;; Copyright (C) 2015 Free Software Foundation, Inc.
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; This file contains generic infrastructure for dealing with
+;; projects, and a number of public functions: finding the current
+;; root, related project directories, search path, etc.
+
+;;; Code:
+
+(require 'cl-generic)
+
+(defvar project-find-functions (list #'project-try-vc
+                                     #'project-ask-user)
+  "Special hook to find the project containing a given directory.
+Each functions on this hook is called in turn with one
+argument (the directory) and should return either nil to mean
+that it is not applicable, or a project instance.")
+
+(declare-function etags-search-path "etags" ())
+
+(defvar project-search-path-function #'etags-search-path
+  "Function that returns a list of source directories.
+
+The directories in which we can look for the declarations or
+other references to the symbols used in the current buffer.
+Depending on the language, it should include the headers search
+path, load path, class path, and so on.
+
+The directory names should be absolute.  Normally set by the
+major mode.  Used in the default implementation of
+`project-search-path'.")
+
+;;;###autoload
+(defun project-current (&optional dir)
+  "Return the project instance in DIR or `default-directory'."
+  (unless dir (setq dir default-directory))
+  (run-hook-with-args-until-success 'project-find-functions dir))
+
+(cl-defgeneric project-root (project)
+  "Return the root directory of the current project.
+The directory name should be absolute.")
+
+(cl-defgeneric project-search-path (project)
+  "Return the list of source directories.
+Including any where source (or header, etc) files used by the
+current project may be found, inside or outside of the project
+tree.  The directory names should be absolute.
+
+A specialized implementation should use the value
+`project-search-path-function', or, better yet, call and combine
+the results from the functions that this value is set to by all
+major modes used in the project.  Alternatively, it can return a
+user-configurable value."
+  (project--prune-directories
+   (nconc (funcall project-search-path-function)
+          ;; Include these, because we don't know any better.
+          ;; But a specialized implementation may include only some of
+          ;; the project's subdirectories, if there are no source
+          ;; files at the top level.
+          (project-directories project))))
+
+(cl-defgeneric project-directories (project)
+  "Return the list of directories related to the current project.
+It should include the current project root, as well as the roots
+of any currently open related projects, if they're meant to be
+edited together.  The directory names should be absolute."
+  (list (project-root project)))
+
+(cl-defgeneric project-ignores (_project)
+  "Return the list of glob patterns that match ignored files.
+To root an entry, start it with `./'.  To match directories only,
+end it with `/'."
+  (require 'grep)
+  (defvar grep-find-ignored-files)
+  (nconc
+   (mapcar
+    (lambda (dir)
+      (concat dir "/"))
+    vc-directory-exclusion-list)
+   grep-find-ignored-files))
+
+(defun project-try-vc (dir)
+  (let* ((backend (ignore-errors (vc-responsible-backend dir)))
+         (root (and backend (ignore-errors
+                              (vc-call-backend backend 'root dir)))))
+    (and root (cons 'vc root))))
+
+(cl-defmethod project-root ((project (head vc)))
+  (cdr project))
+
+(cl-defmethod project-ignores ((project (head vc)))
+  (nconc
+   (let* ((dir (cdr project))
+          (backend (vc-responsible-backend dir)))
+     (mapcar
+      (lambda (entry)
+        (if (string-match "\\`/" entry)
+            (replace-match "./" t t entry)
+          entry))
+      (vc-call-backend backend 'ignore-completion-table dir)))
+   (cl-call-next-method)))
+
+(defun project-ask-user (dir)
+  (cons 'user (read-directory-name "Project root: " dir nil t)))
+
+(cl-defmethod project-root ((project (head user)))
+  (cdr project))
+
+(defun project--prune-directories (dirs)
+  "Returns a copy of DIRS sorted, without subdirectories or non-existing ones."
+  (let* ((dirs (sort
+                (mapcar
+                 (lambda (dir)
+                   (file-name-as-directory (expand-file-name dir)))
+                 dirs)
+                #'string<))
+         (ref dirs))
+    ;; Delete subdirectories from the list.
+    (while (cdr ref)
+      (if (string-prefix-p (car ref) (cadr ref))
+          (setcdr ref (cddr ref))
+        (setq ref (cdr ref))))
+    (cl-delete-if-not #'file-exists-p dirs)))
+
+(provide 'project)
+;;; project.el ends here
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index d45d082..95814fa 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -180,6 +180,12 @@
 ;; shell so that relative imports work properly using the
 ;; `python-shell-package-enable' command.
 
+;; Shell remote support: remote Python shells are started with the
+;; correct environment for files opened remotely through tramp, also
+;; respecting dir-local variables provided `enable-remote-dir-locals'
+;; is non-nil.  The logic for this is transparently handled by the
+;; `python-shell-with-environment' macro.
+
 ;; Shell syntax highlighting: when enabled current input in shell is
 ;; highlighted.  The variable `python-shell-font-lock-enable' controls
 ;; activation of this feature globally when shells are started.
@@ -255,6 +261,7 @@
 (require 'cl-lib)
 (require 'comint)
 (require 'json)
+(require 'tramp-sh)
 
 ;; Avoid compiler warnings
 (defvar view-return-to-alist)
@@ -284,6 +291,7 @@
     (define-key map [remap backward-sentence] 'python-nav-backward-block)
     (define-key map [remap forward-sentence] 'python-nav-forward-block)
     (define-key map [remap backward-up-list] 'python-nav-backward-up-list)
+    (define-key map [remap mark-defun] 'python-mark-defun)
     (define-key map "\C-c\C-j" 'imenu)
     ;; Indent specific
     (define-key map "\177" 'python-indent-dedent-line-backspace)
@@ -359,7 +367,7 @@
 
 ;;; Python specialized rx
 
-(eval-when-compile
+(eval-and-compile
   (defconst python-rx-constituents
     `((block-start          . ,(rx symbol-start
                                    (or "def" "class" "if" "elif" "else" "try"
@@ -430,7 +438,7 @@ This variant of `rx' supports common Python named REGEXPS."
 
 ;;; Font-lock and syntax
 
-(eval-when-compile
+(eval-and-compile
   (defun python-syntax--context-compiler-macro (form type &optional 
syntax-ppss)
     (pcase type
       (`'comment
@@ -734,7 +742,7 @@ work on `python-indent-calculate-indentation' instead."
   (interactive)
   (save-excursion
     (save-restriction
-      (widen)
+      (prog-widen)
       (goto-char (point-min))
       (let ((block-end))
         (while (and (not block-end)
@@ -833,7 +841,7 @@ keyword
  - Point is on a line starting a dedenter block.
  - START is the position where the dedenter block starts."
   (save-restriction
-    (widen)
+    (prog-widen)
     (let ((ppss (save-excursion
                   (beginning-of-line)
                   (syntax-ppss))))
@@ -958,18 +966,20 @@ keyword
        ((save-excursion
           (back-to-indentation)
           (skip-chars-backward " \t\n")
-          (python-nav-beginning-of-statement)
-          (cons
-           (cond ((python-info-current-line-comment-p)
-                  :after-comment)
-                 ((save-excursion
-                    (goto-char (line-end-position))
-                    (python-util-forward-comment -1)
-                    (python-nav-beginning-of-statement)
-                    (looking-at (python-rx block-ender)))
-                  :after-block-end)
-                 (t :after-line))
-           (point))))))))
+          (if (bobp)
+              (cons :no-indent 0)
+            (python-nav-beginning-of-statement)
+            (cons
+             (cond ((python-info-current-line-comment-p)
+                    :after-comment)
+                   ((save-excursion
+                      (goto-char (line-end-position))
+                      (python-util-forward-comment -1)
+                      (python-nav-beginning-of-statement)
+                      (looking-at (python-rx block-ender)))
+                    :after-block-end)
+                   (t :after-line))
+             (point)))))))))
 
 (defun python-indent--calculate-indentation ()
   "Internal implementation of `python-indent-calculate-indentation'.
@@ -978,10 +988,10 @@ current context or a list of integers.  The latter case 
is only
 happening for :at-dedenter-block-start context since the
 possibilities can be narrowed to specific indentation points."
   (save-restriction
-    (widen)
+    (prog-widen)
     (save-excursion
       (pcase (python-indent-context)
-        (`(:no-indent . ,_) 0)
+        (`(:no-indent . ,_) (prog-first-column)) ; usually 0
         (`(,(or :after-line
                 :after-comment
                 :inside-string
@@ -1019,7 +1029,7 @@ possibilities can be narrowed to specific indentation 
points."
          (let ((opening-block-start-points
                 (python-info-dedenter-opening-block-positions)))
            (if (not opening-block-start-points)
-               0  ; if not found default to first column
+               (prog-first-column) ; if not found default to first column
              (mapcar (lambda (pos)
                        (save-excursion
                          (goto-char pos)
@@ -1037,15 +1047,9 @@ integers.  Levels are returned in ascending order, and 
in the
 case INDENTATION is a list, this order is enforced."
   (if (listp indentation)
       (sort (copy-sequence indentation) #'<)
-    (let* ((remainder (% indentation python-indent-offset))
-           (steps (/ (- indentation remainder) python-indent-offset))
-           (levels (mapcar (lambda (step)
-                             (* python-indent-offset step))
-                           (number-sequence steps 0 -1))))
-      (reverse
-       (if (not (zerop remainder))
-           (cons indentation levels)
-         levels)))))
+    (nconc (number-sequence (prog-first-column) (1- indentation)
+                            python-indent-offset)
+           (list indentation))))
 
 (defun python-indent--previous-level (levels indentation)
   "Return previous level from LEVELS relative to INDENTATION."
@@ -1068,7 +1072,7 @@ minimum."
         (python-indent--previous-level levels (current-indentation))
       (if levels
           (apply #'max levels)
-        0))))
+        (prog-first-column)))))
 
 (defun python-indent-line (&optional previous)
   "Internal implementation of `python-indent-line-function'.
@@ -1255,6 +1259,21 @@ the line will be re-indented automatically if needed."
               (python-indent-region dedenter-pos current-pos)))))))))
 
 
+;;; Mark
+
+(defun python-mark-defun (&optional allow-extend)
+  "Put mark at end of this defun, point at beginning.
+The defun marked is the one that contains point or follows point.
+
+Interactively (or with ALLOW-EXTEND non-nil), if this command is
+repeated or (in Transient Mark mode) if the mark is active, it
+marks the next defun after the ones already marked."
+  (interactive "p")
+  (when (python-info-looking-at-beginning-of-defun)
+    (end-of-line 1))
+  (mark-defun allow-extend))
+
+
 ;;; Navigation
 
 (defvar python-nav-beginning-of-defun-regexp
@@ -1989,6 +2008,78 @@ virtualenv."
   :type '(alist string)
   :group 'python)
 
+(defun python-shell-calculate-process-environment ()
+  "Calculate `process-environment' or `tramp-remote-process-environment'.
+Pre-appends `python-shell-process-environment', sets extra
+pythonpaths from `python-shell-extra-pythonpaths' and sets a few
+virtualenv related vars.  If `default-directory' points to a
+remote machine, the returned value is intended for
+`tramp-remote-process-environment'."
+  (let* ((remote-p (file-remote-p default-directory))
+         (process-environment (append
+                               python-shell-process-environment
+                               (if remote-p
+                                   tramp-remote-process-environment
+                                 process-environment) nil))
+         (virtualenv (if python-shell-virtualenv-root
+                         (directory-file-name python-shell-virtualenv-root)
+                       nil)))
+    (when python-shell-unbuffered
+      (setenv "PYTHONUNBUFFERED" "1"))
+    (when python-shell-extra-pythonpaths
+      (setenv "PYTHONPATH" (python-shell-calculate-pythonpath)))
+    (if (not virtualenv)
+        process-environment
+      (setenv "PYTHONHOME" nil)
+      (setenv "VIRTUAL_ENV" virtualenv))
+    process-environment))
+
+(defun python-shell-calculate-exec-path ()
+  "Calculate `exec-path' or `tramp-remote-path'.
+Pre-appends `python-shell-exec-path' and adds the binary
+directory for virtualenv if `python-shell-virtualenv-root' is
+set.  If `default-directory' points to a remote machine, the
+returned value is intended for `tramp-remote-path'."
+  (let ((path (append
+               ;; Use nil as the tail so that the list is a full copy,
+               ;; this is a paranoid safeguard for side-effects.
+               python-shell-exec-path
+               (if (file-remote-p default-directory)
+                   tramp-remote-path
+                 exec-path)
+               nil)))
+    (if (not python-shell-virtualenv-root)
+        path
+      (cons (expand-file-name "bin" python-shell-virtualenv-root)
+            path))))
+
+(defmacro python-shell-with-environment (&rest body)
+  "Modify shell environment during execution of BODY.
+Temporarily sets `process-environment' and `exec-path' during
+execution of body.  If `default-directory' points to a remote
+machine then modifies `tramp-remote-process-environment' and
+`tramp-remote-path' instead."
+  (declare (indent 0) (debug (body)))
+  (let ((remote-p (make-symbol "remote-p")))
+    `(let* ((,remote-p (file-remote-p default-directory))
+            (process-environment
+             (if ,remote-p
+                 process-environment
+               (python-shell-calculate-process-environment)))
+            (tramp-remote-process-environment
+             (if ,remote-p
+                 (python-shell-calculate-process-environment)
+               tramp-remote-process-environment))
+            (exec-path
+             (if ,remote-p
+                 exec-path
+               (python-shell-calculate-exec-path)))
+            (tramp-remote-path
+             (if ,remote-p
+                 (python-shell-calculate-exec-path)
+               tramp-remote-path)))
+       ,(macroexp-progn body))))
+
 (defvar python-shell--prompt-calculated-input-regexp nil
   "Calculated input prompt regexp for inferior python shell.
 Do not set this variable directly, instead use
@@ -2011,69 +2102,68 @@ shows a warning with instructions to avoid hangs and 
returns nil.
 When `python-shell-prompt-detect-enabled' is nil avoids any
 detection and just returns nil."
   (when python-shell-prompt-detect-enabled
-    (let* ((process-environment (python-shell-calculate-process-environment))
-           (exec-path (python-shell-calculate-exec-path))
-           (code (concat
-                  "import sys\n"
-                  "ps = [getattr(sys, 'ps%s' % i, '') for i in range(1,4)]\n"
-                  ;; JSON is built manually for compatibility
-                  "ps_json = '\\n[\"%s\", \"%s\", \"%s\"]\\n' % tuple(ps)\n"
-                  "print (ps_json)\n"
-                  "sys.exit(0)\n"))
-           (output
-            (with-temp-buffer
-              ;; TODO: improve error handling by using
-              ;; `condition-case' and displaying the error message to
-              ;; the user in the no-prompts warning.
-              (ignore-errors
-                (let ((code-file (python-shell--save-temp-file code)))
-                  ;; Use `process-file' as it is remote-host friendly.
-                  (process-file
-                   python-shell-interpreter
-                   code-file
-                   '(t nil)
-                   nil
-                   python-shell-interpreter-interactive-arg)
-                  ;; Try to cleanup
-                  (delete-file code-file)))
-              (buffer-string)))
-           (prompts
-            (catch 'prompts
-              (dolist (line (split-string output "\n" t))
-                (let ((res
-                       ;; Check if current line is a valid JSON array
-                       (and (string= (substring line 0 2) "[\"")
-                            (ignore-errors
-                              ;; Return prompts as a list, not vector
-                              (append (json-read-from-string line) nil)))))
-                  ;; The list must contain 3 strings, where the first
-                  ;; is the input prompt, the second is the block
-                  ;; prompt and the last one is the output prompt.  The
-                  ;; input prompt is the only one that can't be empty.
-                  (when (and (= (length res) 3)
-                             (cl-every #'stringp res)
-                             (not (string= (car res) "")))
-                    (throw 'prompts res))))
-              nil)))
-      (when (and (not prompts)
-                 python-shell-prompt-detect-failure-warning)
-        (lwarn
-         '(python python-shell-prompt-regexp)
-         :warning
-         (concat
-          "Python shell prompts cannot be detected.\n"
-          "If your emacs session hangs when starting python shells\n"
-          "recover with `keyboard-quit' and then try fixing the\n"
-          "interactive flag for your interpreter by adjusting the\n"
-          "`python-shell-interpreter-interactive-arg' or add regexps\n"
-          "matching shell prompts in the directory-local friendly vars:\n"
-          "  + `python-shell-prompt-regexp'\n"
-          "  + `python-shell-prompt-block-regexp'\n"
-          "  + `python-shell-prompt-output-regexp'\n"
-          "Or alternatively in:\n"
-          "  + `python-shell-prompt-input-regexps'\n"
-          "  + `python-shell-prompt-output-regexps'")))
-      prompts)))
+    (python-shell-with-environment
+      (let* ((code (concat
+                    "import sys\n"
+                    "ps = [getattr(sys, 'ps%s' % i, '') for i in range(1,4)]\n"
+                    ;; JSON is built manually for compatibility
+                    "ps_json = '\\n[\"%s\", \"%s\", \"%s\"]\\n' % tuple(ps)\n"
+                    "print (ps_json)\n"
+                    "sys.exit(0)\n"))
+             (output
+              (with-temp-buffer
+                ;; TODO: improve error handling by using
+                ;; `condition-case' and displaying the error message to
+                ;; the user in the no-prompts warning.
+                (ignore-errors
+                  (let ((code-file (python-shell--save-temp-file code)))
+                    ;; Use `process-file' as it is remote-host friendly.
+                    (process-file
+                     python-shell-interpreter
+                     code-file
+                     '(t nil)
+                     nil
+                     python-shell-interpreter-interactive-arg)
+                    ;; Try to cleanup
+                    (delete-file code-file)))
+                (buffer-string)))
+             (prompts
+              (catch 'prompts
+                (dolist (line (split-string output "\n" t))
+                  (let ((res
+                         ;; Check if current line is a valid JSON array
+                         (and (string= (substring line 0 2) "[\"")
+                              (ignore-errors
+                                ;; Return prompts as a list, not vector
+                                (append (json-read-from-string line) nil)))))
+                    ;; The list must contain 3 strings, where the first
+                    ;; is the input prompt, the second is the block
+                    ;; prompt and the last one is the output prompt.  The
+                    ;; input prompt is the only one that can't be empty.
+                    (when (and (= (length res) 3)
+                               (cl-every #'stringp res)
+                               (not (string= (car res) "")))
+                      (throw 'prompts res))))
+                nil)))
+        (when (and (not prompts)
+                   python-shell-prompt-detect-failure-warning)
+          (lwarn
+           '(python python-shell-prompt-regexp)
+           :warning
+           (concat
+            "Python shell prompts cannot be detected.\n"
+            "If your emacs session hangs when starting python shells\n"
+            "recover with `keyboard-quit' and then try fixing the\n"
+            "interactive flag for your interpreter by adjusting the\n"
+            "`python-shell-interpreter-interactive-arg' or add regexps\n"
+            "matching shell prompts in the directory-local friendly vars:\n"
+            "  + `python-shell-prompt-regexp'\n"
+            "  + `python-shell-prompt-block-regexp'\n"
+            "  + `python-shell-prompt-output-regexp'\n"
+            "Or alternatively in:\n"
+            "  + `python-shell-prompt-input-regexps'\n"
+            "  + `python-shell-prompt-output-regexps'")))
+        prompts))))
 
 (defun python-shell-prompt-validate-regexps ()
   "Validate all user provided regexps for prompts.
@@ -2169,14 +2259,12 @@ the `buffer-name'."
 
 (defun python-shell-calculate-command ()
   "Calculate the string used to execute the inferior Python process."
-  (let ((exec-path (python-shell-calculate-exec-path)))
+  (python-shell-with-environment
     ;; `exec-path' gets tweaked so that virtualenv's specific
     ;; `python-shell-interpreter' absolute path can be found by
     ;; `executable-find'.
     (format "%s %s"
-            ;; FIXME: Why executable-find?
-            (shell-quote-argument
-             (executable-find python-shell-interpreter))
+            (shell-quote-argument python-shell-interpreter)
             python-shell-interpreter-args)))
 
 (define-obsolete-function-alias
@@ -2193,38 +2281,6 @@ the `buffer-name'."
         (concat extra path-separator pythonpath)
       extra)))
 
-(defun python-shell-calculate-process-environment ()
-  "Calculate process environment given `python-shell-virtualenv-root'."
-  (let ((process-environment (append
-                              python-shell-process-environment
-                              process-environment nil))
-        (virtualenv (if python-shell-virtualenv-root
-                        (directory-file-name python-shell-virtualenv-root)
-                      nil)))
-    (when python-shell-unbuffered
-      (setenv "PYTHONUNBUFFERED" "1"))
-    (when python-shell-extra-pythonpaths
-      (setenv "PYTHONPATH" (python-shell-calculate-pythonpath)))
-    (if (not virtualenv)
-        process-environment
-      (setenv "PYTHONHOME" nil)
-      (setenv "PATH" (format "%s/bin%s%s"
-                             virtualenv path-separator
-                             (or (getenv "PATH") "")))
-      (setenv "VIRTUAL_ENV" virtualenv))
-    process-environment))
-
-(defun python-shell-calculate-exec-path ()
-  "Calculate exec path given `python-shell-virtualenv-root'."
-  (let ((path (append
-               ;; Use nil as the tail so that the list is a full copy,
-               ;; this is a paranoid safeguard for side-effects.
-               python-shell-exec-path exec-path nil)))
-    (if (not python-shell-virtualenv-root)
-        path
-      (cons (expand-file-name "bin" python-shell-virtualenv-root)
-            path))))
-
 (defvar python-shell--package-depth 10)
 
 (defun python-shell-package-enable (directory package)
@@ -2471,6 +2527,12 @@ With argument MSG show activation/deactivation message."
       (python-shell-font-lock-turn-off msg))
     python-shell-font-lock-enable))
 
+;; Used to hold user interactive overrides to
+;; `python-shell-interpreter' and `python-shell-interpreter-args' that
+;; will be made buffer-local by `inferior-python-mode':
+(defvar python-shell--interpreter)
+(defvar python-shell--interpreter-args)
+
 (define-derived-mode inferior-python-mode comint-mode "Inferior Python"
   "Major mode for Python inferior process.
 Runs a Python interpreter as a subprocess of Emacs, with Python
@@ -2496,15 +2558,16 @@ initialization of the interpreter via 
`python-shell-setup-codes'
 variable.
 
 \(Type \\[describe-mode] in the process buffer for a list of commands.)"
-  (let ((interpreter python-shell-interpreter)
-        (args python-shell-interpreter-args))
-    (when python-shell--parent-buffer
-      (python-util-clone-local-variables python-shell--parent-buffer))
-    ;; Users can override default values for these vars when calling
-    ;; `run-python'.  This ensures new values let-bound in
-    ;; `python-shell-make-comint' are locally set.
-    (set (make-local-variable 'python-shell-interpreter) interpreter)
-    (set (make-local-variable 'python-shell-interpreter-args) args))
+  (when python-shell--parent-buffer
+    (python-util-clone-local-variables python-shell--parent-buffer))
+  ;; Users can interactively override default values for
+  ;; `python-shell-interpreter' and `python-shell-interpreter-args'
+  ;; when calling `run-python'.  This ensures values let-bound in
+  ;; `python-shell-make-comint' are locally set if needed.
+  (set (make-local-variable 'python-shell-interpreter)
+       (or python-shell--interpreter python-shell-interpreter))
+  (set (make-local-variable 'python-shell-interpreter-args)
+       (or python-shell--interpreter-args python-shell-interpreter-args))
   (set (make-local-variable 'python-shell--prompt-calculated-input-regexp) nil)
   (set (make-local-variable 'python-shell--prompt-calculated-output-regexp) 
nil)
   (python-shell-prompt-set-calculated-regexps)
@@ -2542,31 +2605,30 @@ convention for temporary/internal buffers, and also 
makes sure
 the user is not queried for confirmation when the process is
 killed."
   (save-excursion
-    (let* ((proc-buffer-name
-            (format (if (not internal) "*%s*" " *%s*") proc-name))
-           (process-environment (python-shell-calculate-process-environment))
-           (exec-path (python-shell-calculate-exec-path)))
-      (when (not (comint-check-proc proc-buffer-name))
-        (let* ((cmdlist (split-string-and-unquote cmd))
-               (interpreter (car cmdlist))
-               (args (cdr cmdlist))
-               (buffer (apply #'make-comint-in-buffer proc-name 
proc-buffer-name
-                              interpreter nil args))
-               (python-shell--parent-buffer (current-buffer))
-               (process (get-buffer-process buffer))
-               ;; As the user may have overridden default values for
-               ;; these vars on `run-python', let-binding them allows
-               ;; to have the new right values in all setup code
-               ;; that's is done in `inferior-python-mode', which is
-               ;; important, especially for prompt detection.
-               (python-shell-interpreter interpreter)
-               (python-shell-interpreter-args
-                (mapconcat #'identity args " ")))
-          (with-current-buffer buffer
-            (inferior-python-mode))
-          (when show (display-buffer buffer))
-          (and internal (set-process-query-on-exit-flag process nil))))
-      proc-buffer-name)))
+    (python-shell-with-environment
+      (let* ((proc-buffer-name
+              (format (if (not internal) "*%s*" " *%s*") proc-name)))
+        (when (not (comint-check-proc proc-buffer-name))
+          (let* ((cmdlist (split-string-and-unquote cmd))
+                 (interpreter (car cmdlist))
+                 (args (cdr cmdlist))
+                 (buffer (apply #'make-comint-in-buffer proc-name 
proc-buffer-name
+                                interpreter nil args))
+                 (python-shell--parent-buffer (current-buffer))
+                 (process (get-buffer-process buffer))
+                 ;; Users can override the interpreter and args
+                 ;; interactively when calling `run-python', let-binding
+                 ;; these allows to have the new right values in all
+                 ;; setup code that is done in `inferior-python-mode',
+                 ;; which is important, especially for prompt detection.
+                 (python-shell--interpreter interpreter)
+                 (python-shell--interpreter-args
+                  (mapconcat #'identity args " ")))
+            (with-current-buffer buffer
+              (inferior-python-mode))
+            (when show (display-buffer buffer))
+            (and internal (set-process-query-on-exit-flag process nil))))
+        proc-buffer-name))))
 
 ;;;###autoload
 (defun run-python (&optional cmd dedicated show)
@@ -3159,9 +3221,12 @@ def __PYTHON_EL_native_completion_setup():
             if not is_ipython:
                 readline.set_completer(new_completer)
             else:
-                # IPython hacks readline such that `readline.set_completer`
+                # Try both initializations to cope with all IPython versions.
+                # This works fine for IPython 3.x but not for earlier:
+                readline.set_completer(new_completer)
+                # IPython<3 hacks readline such that `readline.set_completer`
                 # won't work.  This workaround injects the new completer
-                # function into the existing instance directly.
+                # function into the existing instance directly:
                 instance = getattr(completer, 'im_self', completer.__self__)
                 instance.rlcomplete = new_completer
         if readline.__doc__ and 'libedit' in readline.__doc__:
@@ -3292,7 +3357,7 @@ completion."
                 ;; output end marker is found.  Output is accepted
                 ;; *very* quickly to keep the shell super-responsive.
                 (while (and (not (re-search-backward 
"~~~~__dummy_completion__" nil t))
-                            (< (- current-time (float-time))
+                            (< (- (float-time) current-time)
                                python-shell-completion-native-output-timeout))
                   (accept-process-output process 0.01))
                 (cl-remove-duplicates
@@ -3962,8 +4027,7 @@ See `python-check-command' for the default."
                                     "")))))))
   (setq python-check-custom-command command)
   (save-some-buffers (not compilation-ask-about-save) nil)
-  (let ((process-environment (python-shell-calculate-process-environment))
-        (exec-path (python-shell-calculate-exec-path)))
+  (python-shell-with-environment
     (compilation-start command nil
                        (lambda (_modename)
                          (format python-check-buffer-name command)))))
@@ -4230,7 +4294,7 @@ Optional argument INCLUDE-TYPE indicates to include the 
type of the defun.
 This function can be used as the value of `add-log-current-defun-function'
 since it returns nil if point is not inside a defun."
   (save-restriction
-    (widen)
+    (prog-widen)
     (save-excursion
       (end-of-line 1)
       (let ((names)
@@ -4413,7 +4477,7 @@ likely an invalid python file."
   (let ((point (python-info-dedenter-opening-block-position)))
     (when point
       (save-restriction
-        (widen)
+        (prog-widen)
         (message "Closes %s" (save-excursion
                                (goto-char point)
                                (buffer-substring
@@ -4434,7 +4498,7 @@ statement."
 With optional argument LINE-NUMBER, check that line instead."
   (save-excursion
     (save-restriction
-      (widen)
+      (prog-widen)
       (when line-number
         (python-util-goto-line line-number))
       (while (and (not (eobp))
@@ -4450,7 +4514,7 @@ With optional argument LINE-NUMBER, check that line 
instead."
 Optional argument LINE-NUMBER forces the line number to check against."
   (save-excursion
     (save-restriction
-      (widen)
+      (prog-widen)
       (when line-number
         (python-util-goto-line line-number))
       (when (python-info-line-ends-backslash-p)
@@ -4467,7 +4531,7 @@ When current line is continuation of another return the 
point
 where the continued line ends."
   (save-excursion
     (save-restriction
-      (widen)
+      (prog-widen)
       (let* ((context-type (progn
                              (back-to-indentation)
                              (python-syntax-context-type)))
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index 537b180..6709e75 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -987,7 +987,7 @@ See `sh-feature'.")
     "\\(?:\\(?:.*[^\\\n]\\)?\\(?:\\\\\\\\\\)*\\\\\n\\)*.*")
 
   (defconst sh-here-doc-open-re
-    (concat "<<-?\\s-*\\\\?\\(\\(?:['\"][^'\"]+['\"]\\|\\sw\\|[-/~._]\\)+\\)"
+    (concat 
"[^<]<<-?\\s-*\\\\?\\(\\(?:['\"][^'\"]+['\"]\\|\\sw\\|[-/~._]\\)+\\)"
             sh-escaped-line-re "\\(\n\\)")))
 
 (defun sh--inside-noncommand-expression (pos)
@@ -1064,7 +1064,16 @@ subshells can nest."
         (pcase (char-after)
           (?\' (pcase state
                  (`double-quote nil)
-                 (_ (forward-char 1) (skip-chars-forward "^'" limit))))
+                 (_ (forward-char 1)
+                    ;; FIXME: mark skipped double quotes as punctuation syntax.
+                    (let ((spos (point)))
+                      (skip-chars-forward "^'" limit)
+                      (save-excursion
+                        (let ((epos (point)))
+                          (goto-char spos)
+                          (while (search-forward "\"" epos t)
+                            (put-text-property (point) (1- (point))
+                                            'syntax-table '(1)))))))))
           (?\\ (forward-char 1))
           (?\" (pcase state
                  (`double-quote (setq state (pop states)))
diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el
index f85f4c4..5ed0ff0 100644
--- a/lisp/progmodes/vhdl-mode.el
+++ b/lisp/progmodes/vhdl-mode.el
@@ -5713,7 +5713,7 @@ the offset is simply returned."
        (t nil)))))
 
 (defun vhdl-in-extended-identifier-p ()
-  "Determine if point is inside extended identifier (delimited by '\')."
+  "Determine if point is inside extended identifier (delimited by ‘\\’)."
   (save-match-data
     (and (save-excursion (re-search-backward "\\\\" (vhdl-point 'bol) t))
         (save-excursion (re-search-forward "\\\\" (vhdl-point 'eol) t)))))
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index d6f6ba8..9d0dd77 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -54,6 +54,7 @@
 (require 'eieio)
 (require 'ring)
 (require 'pcase)
+(require 'project)
 
 (defgroup xref nil "Cross-referencing commands"
   :group 'tools)
@@ -77,6 +78,10 @@ This is typically the filename.")
   "Return the line number corresponding to the location."
   nil)
 
+(cl-defgeneric xref-match-bounds (_item)
+  "Return a cons with columns of the beginning and end of the match."
+  nil)
+
 ;;;; Commonly needed location classes are defined here:
 
 ;; FIXME: might be useful to have an optional "hint" i.e. a string to
@@ -84,7 +89,7 @@ This is typically the filename.")
 (defclass xref-file-location (xref-location)
   ((file :type string :initarg :file)
    (line :type fixnum :initarg :line :reader xref-location-line)
-   (column :type fixnum :initarg :column))
+   (column :type fixnum :initarg :column :reader xref-file-location-column))
   :documentation "A file location is a file/line/column triple.
 Line numbers start from 1 and columns from 0.")
 
@@ -107,7 +112,7 @@ Line numbers start from 1 and columns from 0.")
           (point-marker))))))
 
 (cl-defmethod xref-location-group ((l xref-file-location))
-  (oref l :file))
+  (oref l file))
 
 (defclass xref-buffer-location (xref-location)
   ((buffer :type buffer :initarg :buffer)
@@ -139,26 +144,53 @@ actual location is not known.")
   (make-instance 'xref-bogus-location :message message))
 
 (cl-defmethod xref-location-marker ((l xref-bogus-location))
-  (user-error "%s" (oref l :message)))
+  (user-error "%s" (oref l message)))
 
 (cl-defmethod xref-location-group ((_ xref-bogus-location)) "(No location)")
 
 
 ;;; Cross-reference
 
-(defclass xref--xref ()
-  ((description :type string :initarg :description
-                :reader xref--xref-description)
+(defclass xref-item ()
+  ((summary :type string :initarg :summary
+            :reader xref-item-summary
+            :documentation "One line which will be displayed for
+this item in the output buffer.")
    (location :initarg :location
-             :reader xref--xref-location))
-  :comment "An xref is used to display and locate constructs like
-variables or functions.")
+             :reader xref-item-location
+             :documentation "An object describing how to navigate
+to the reference's target."))
+  :comment "An xref item describes a reference to a location
+somewhere.")
+
+(defun xref-make (summary location)
+  "Create and return a new xref item.
+SUMMARY is a short string to describe the xref.
+LOCATION is an `xref-location'."
+  (make-instance 'xref-item :summary summary :location location))
 
-(defun xref-make (description location)
-  "Create and return a new xref.
-DESCRIPTION is a short string to describe the xref.
+(defclass xref-match-item ()
+  ((summary :type string :initarg :summary
+            :reader xref-item-summary)
+   (location :initarg :location
+             :type xref-file-location
+             :reader xref-item-location)
+   (end-column :initarg :end-column))
+  :comment "An xref item describes a reference to a location
+somewhere.")
+
+(cl-defmethod xref-match-bounds ((i xref-match-item))
+  (with-slots (end-column location) i
+    (cons (xref-file-location-column location)
+          end-column)))
+
+(defun xref-make-match (summary end-column location)
+  "Create and return a new xref match item.
+SUMMARY is a short string to describe the xref.
+END-COLUMN is the match end column number inside SUMMARY.
 LOCATION is an `xref-location'."
-  (make-instance 'xref--xref :description description :location location))
+  (make-instance 'xref-match-item :summary summary :location location
+                 :end-column end-column))
 
 
 ;;; API
@@ -182,9 +214,6 @@ found, return nil.
  (apropos PATTERN): Find all symbols that match PATTERN.  PATTERN
 is a regexp.
 
- (matches REGEXP): Find all matches for REGEXP in the related
-files.  REGEXP is an Emacs regular expression.
-
 IDENTIFIER can be any string returned by
 `xref-identifier-at-point-function', or from the table returned
 by `xref-identifier-completion-table-function'.
@@ -255,8 +284,7 @@ backward."
 
 (defcustom xref-marker-ring-length 16
   "Length of the xref marker ring."
-  :type 'integer
-  :version "25.1")
+  :type 'integer)
 
 (defcustom xref-prompt-for-identifier '(not xref-find-definitions
                                             xref-find-definitions-other-window
@@ -276,13 +304,16 @@ elements is negated."
                  (set :menu-tag "command specific" :tag "commands"
                      :value (not)
                      (const :tag "Except" not)
-                     (repeat :inline t (symbol :tag "command"))))
-  :version "25.1")
+                     (repeat :inline t (symbol :tag "command")))))
+
+(defcustom xref-after-jump-hook '(recenter
+                                  xref-pulse-momentarily)
+  "Functions called after jumping to an xref."
+  :type 'hook)
 
-(defcustom xref-pulse-on-jump t
-  "When non-nil, momentarily highlight jump locations."
-  :type 'boolean
-  :version "25.1")
+(defcustom xref-after-return-hook '(xref-pulse-momentarily)
+  "Functions called after returning to a pre-jump location."
+  :type 'hook)
 
 (defvar xref--marker-ring (make-ring xref-marker-ring-length)
   "Ring of markers to implement the marker stack.")
@@ -303,19 +334,29 @@ elements is negated."
                             (error "The marked buffer has been deleted")))
       (goto-char (marker-position marker))
       (set-marker marker nil nil)
-      (xref--maybe-pulse))))
-
-(defun xref--maybe-pulse ()
-  (when xref-pulse-on-jump
-    (let (beg end)
-      (save-excursion
-        (back-to-indentation)
-        (if (eolp)
-            (setq beg (line-beginning-position)
-                  end (1+ (point)))
-          (setq beg (point)
-                end (line-end-position))))
-      (pulse-momentary-highlight-region beg end 'next-error))))
+      (run-hooks 'xref-after-return-hook))))
+
+(defvar xref--current-item nil)
+
+(defun xref-pulse-momentarily ()
+  (pcase-let ((`(,beg . ,end)
+               (save-excursion
+                 (or
+                  (xref--match-buffer-bounds xref--current-item)
+                  (back-to-indentation)
+                  (if (eolp)
+                      (cons (line-beginning-position) (1+ (point)))
+                    (cons (point) (line-end-position)))))))
+    (pulse-momentary-highlight-region beg end 'next-error)))
+
+(defun xref--match-buffer-bounds (item)
+  (save-excursion
+    (let ((bounds (xref-match-bounds item)))
+      (when bounds
+        (cons (progn (move-to-column (car bounds))
+                     (point))
+              (progn (move-to-column (cdr bounds))
+                     (point)))))))
 
 ;; etags.el needs this
 (defun xref-clear-marker-stack ()
@@ -340,18 +381,19 @@ elements is negated."
           (t (error "Location is outside accessible part of buffer")))
     (goto-char marker)))
 
-(defun xref--pop-to-location (location &optional window)
-  "Goto xref-location LOCATION and display the buffer.
+(defun xref--pop-to-location (item &optional window)
+  "Go to the location of ITEM and display the buffer.
 WINDOW controls how the buffer is displayed:
   nil      -- switch-to-buffer
   'window  -- pop-to-buffer (other window)
   'frame   -- pop-to-buffer (other frame)"
-  (xref--goto-location location)
+  (xref--goto-location (xref-item-location item))
   (cl-ecase window
     ((nil)  (switch-to-buffer (current-buffer)))
     (window (pop-to-buffer (current-buffer) t))
     (frame  (let ((pop-up-frames t)) (pop-to-buffer (current-buffer) t))))
-  (xref--maybe-pulse))
+  (let ((xref--current-item item))
+    (run-hooks 'xref-after-jump-hook)))
 
 
 ;;; XREF buffer (part of the UI)
@@ -382,12 +424,11 @@ Used for temporary buffers.")
     (when (and restore (not (eq (car restore) 'same)))
       (push (cons buf win) xref--display-history))))
 
-(defun xref--display-position (pos other-window recenter-arg xref-buf)
+(defun xref--display-position (pos other-window xref-buf)
   ;; Show the location, but don't hijack focus.
   (with-selected-window (display-buffer (current-buffer) other-window)
     (goto-char pos)
-    (recenter recenter-arg)
-    (xref--maybe-pulse)
+    (run-hooks 'xref-after-jump-hook)
     (let ((buf (current-buffer))
           (win (selected-window)))
       (with-current-buffer xref-buf
@@ -406,32 +447,33 @@ Used for temporary buffers.")
             (add-hook 'buffer-list-update-hook #'xref--mark-selected nil t)
             (with-current-buffer xref-buf
               (push buf xref--temporary-buffers))))
-        (xref--display-position (point) t 1 xref-buf))
+        (xref--display-position (point) t xref-buf))
     (user-error (message (error-message-string err)))))
 
 (defun xref-show-location-at-point ()
   "Display the source of xref at point in the other window, if any."
   (interactive)
-  (let ((loc (xref--location-at-point)))
-    (when loc
-      (xref--show-location loc))))
+  (let* ((xref (xref--item-at-point))
+         (xref--current-item xref))
+    (when xref
+      (xref--show-location (xref-item-location xref)))))
 
 (defun xref-next-line ()
   "Move to the next xref and display its source in the other window."
   (interactive)
-  (xref--search-property 'xref-location)
+  (xref--search-property 'xref-item)
   (xref-show-location-at-point))
 
 (defun xref-prev-line ()
   "Move to the previous xref and display its source in the other window."
   (interactive)
-  (xref--search-property 'xref-location t)
+  (xref--search-property 'xref-item t)
   (xref-show-location-at-point))
 
-(defun xref--location-at-point ()
+(defun xref--item-at-point ()
   (save-excursion
     (back-to-indentation)
-    (get-text-property (point) 'xref-location)))
+    (get-text-property (point) 'xref-item)))
 
 (defvar-local xref--window nil
   "ACTION argument to call `display-buffer' with.")
@@ -439,17 +481,78 @@ Used for temporary buffers.")
 (defun xref-goto-xref ()
   "Jump to the xref on the current line and bury the xref buffer."
   (interactive)
-  (let ((loc (or (xref--location-at-point)
+  (let ((xref (or (xref--item-at-point)
                  (user-error "No reference at point")))
         (window xref--window))
     (xref-quit)
-    (xref--pop-to-location loc window)))
+    (xref--pop-to-location xref window)))
+
+(defun xref-query-replace (from to)
+  "Perform interactive replacement in all current matches."
+  (interactive
+   (list (read-regexp "Query replace regexp in matches" ".*")
+         (read-regexp "Replace with: ")))
+  (let (pairs item)
+    (unwind-protect
+        (progn
+          (save-excursion
+            (goto-char (point-min))
+            ;; TODO: Check that none of the matches are out of date;
+            ;; offer to re-scan otherwise.  Note that saving the last
+            ;; modification tick won't work, as long as not all of the
+            ;; buffers are kept open.
+            (while (setq item (xref--search-property 'xref-item))
+              (when (xref-match-bounds item)
+                (save-excursion
+                  (xref--goto-location (xref-item-location item))
+                  (let ((bounds (xref--match-buffer-bounds item))
+                        (beg (make-marker))
+                        (end (make-marker)))
+                    (move-marker beg (car bounds))
+                    (move-marker end (cdr bounds))
+                    (push (cons beg end) pairs)))))
+            (setq pairs (nreverse pairs)))
+          (unless pairs (user-error "No suitable matches here"))
+          (xref--query-replace-1 from to pairs))
+      (dolist (pair pairs)
+        (move-marker (car pair) nil)
+        (move-marker (cdr pair) nil)))))
+
+(defun xref--query-replace-1 (from to pairs)
+  (let* ((query-replace-lazy-highlight nil)
+         current-pair current-buf
+         ;; Counteract the "do the next match now" hack in
+         ;; `perform-replace'.  And still, it'll report that those
+         ;; matches were "filtered out" at the end.
+         (isearch-filter-predicate
+          (lambda (beg end)
+            (and current-pair
+                 (eq (current-buffer) current-buf)
+                 (>= beg (car current-pair))
+                 (<= end (cdr current-pair)))))
+         (replace-re-search-function
+          (lambda (from &optional _bound noerror)
+            (let (found)
+              (while (and (not found) pairs)
+                (setq current-pair (pop pairs)
+                      current-buf  (marker-buffer (car current-pair)))
+                (pop-to-buffer current-buf)
+                (goto-char (car current-pair))
+                (when (re-search-forward from (cdr current-pair) noerror)
+                  (setq found t)))
+              found))))
+    ;; FIXME: Despite this being a multi-buffer replacement, `N'
+    ;; doesn't work, because we're not using
+    ;; `multi-query-replace-map', and it would expect the below
+    ;; function to be called once per buffer.
+    (perform-replace from to t t nil)))
 
 (defvar xref--xref-buffer-mode-map
   (let ((map (make-sparse-keymap)))
     (define-key map [remap quit-window] #'xref-quit)
     (define-key map (kbd "n") #'xref-next-line)
     (define-key map (kbd "p") #'xref-prev-line)
+    (define-key map (kbd "r") #'xref-query-replace)
     (define-key map (kbd "RET") #'xref-goto-xref)
     (define-key map (kbd "C-o") #'xref-show-location-at-point)
     ;; suggested by Johan Claesson "to further reduce finger movement":
@@ -468,11 +571,11 @@ Used for temporary buffers.")
     (goto-char (point-min)))
   (let ((backward (< n 0))
         (n (abs n))
-        (loc nil))
+        (xref nil))
     (dotimes (_ n)
-      (setq loc (xref--search-property 'xref-location backward)))
-    (cond (loc
-           (xref--pop-to-location loc))
+      (setq xref (xref--search-property 'xref-item backward)))
+    (cond (xref
+           (xref--pop-to-location xref))
           (t
            (error "No %s xref" (if backward "previous" "next"))))))
 
@@ -516,27 +619,27 @@ meantime are preserved."
   (interactive "e")
   (mouse-set-point event)
   (forward-line 0)
-  (xref--search-property 'xref-location)
+  (xref--search-property 'xref-item)
   (xref-show-location-at-point))
 
 (defun xref--insert-xrefs (xref-alist)
   "Insert XREF-ALIST in the current-buffer.
 XREF-ALIST is of the form ((GROUP . (XREF ...)) ...).  Where
 GROUP is a string for decoration purposes and XREF is an
-`xref--xref' object."
+`xref-item' object."
   (require 'compile) ; For the compilation faces.
   (cl-loop for ((group . xrefs) . more1) on xref-alist
            for max-line-width =
            (cl-loop for xref in xrefs
                     maximize (let ((line (xref-location-line
-                                          (oref xref :location))))
+                                          (oref xref location))))
                                (length (and line (format "%d" line)))))
            for line-format = (and max-line-width
                                   (format "%%%dd: " max-line-width))
            do
            (xref--insert-propertized '(face compilation-info) group "\n")
            (cl-loop for (xref . more2) on xrefs do
-                    (with-slots (description location) xref
+                    (with-slots (summary location) xref
                       (let* ((line (xref-location-line location))
                              (prefix
                               (if line
@@ -544,14 +647,14 @@ GROUP is a string for decoration purposes and XREF is an
                                               'face 'compilation-line-number)
                                 "  ")))
                         (xref--insert-propertized
-                         (list 'xref-location location
+                         (list 'xref-item xref
                                ;; 'face 'font-lock-keyword-face
                                'mouse-face 'highlight
                                'keymap xref--button-map
                                'help-echo
                                (concat "mouse-2: display in another window, "
                                        "RET or mouse-1: follow reference"))
-                         prefix description)))
+                         prefix summary)))
                     (insert "\n"))))
 
 (defun xref--analyze (xrefs)
@@ -559,7 +662,7 @@ GROUP is a string for decoration purposes and XREF is an
 Return an alist of the form ((FILENAME . (XREF ...)) ...)."
   (xref--alistify xrefs
                   (lambda (x)
-                    (xref-location-group (xref--xref-location x)))
+                    (xref-location-group (xref-item-location x)))
                   #'equal))
 
 (defun xref--show-xref-buffer (xrefs alist)
@@ -598,10 +701,10 @@ Return an alist of the form ((FILENAME . (XREF ...)) 
...)."
          (tb (cl-set-difference (buffer-list) bl)))
     (cond
      ((null xrefs)
-      (user-error "No known %s for: %s" (symbol-name kind) input))
+      (user-error "No %s found for: %s" (symbol-name kind) input))
      ((not (cdr xrefs))
       (xref-push-marker-stack)
-      (xref--pop-to-location (xref--xref-location (car xrefs)) window))
+      (xref--pop-to-location (car xrefs) window))
      (t
       (xref-push-marker-stack)
       (funcall xref-show-xrefs-function xrefs
@@ -620,7 +723,12 @@ Return an alist of the form ((FILENAME . (XREF ...)) ...)."
     (cond ((or current-prefix-arg
                (not id)
                (xref--prompt-p this-command))
-           (completing-read prompt
+           (completing-read (if id
+                                (format "%s (default %s): "
+                                        (substring prompt 0 (string-match
+                                                             "[ :]+\\'" 
prompt))
+                                        id)
+                              prompt)
                             (funcall xref-identifier-completion-table-function)
                             nil nil nil
                             'xref--read-identifier-history id))
@@ -661,10 +769,29 @@ With prefix argument, prompt for the identifier."
 
 ;;;###autoload
 (defun xref-find-regexp (regexp)
-  "Find all matches for REGEXP."
-  ;; FIXME: Prompt for directory.
+  "Find all matches for REGEXP.
+With \\[universal-argument] prefix, you can specify the directory
+to search in, and the file name pattern to search for."
   (interactive (list (xref--read-identifier "Find regexp: ")))
-  (xref--show-xrefs regexp 'matches regexp nil))
+  (require 'grep)
+  (let* ((proj (project-current))
+         (files (if current-prefix-arg
+                    (grep-read-files regexp)
+                  "*.*"))
+         (dirs (if current-prefix-arg
+                   (list (read-directory-name "Base directory: "
+                                              nil default-directory t))
+                 (project--prune-directories
+                  (nconc
+                   (project-directories proj)
+                   (project-search-path proj)))))
+         (xref-find-function
+          (lambda (_kind regexp)
+            (cl-mapcan
+             (lambda (dir)
+               (xref-collect-matches regexp files dir (project-ignores proj)))
+             dirs))))
+    (xref--show-xrefs regexp 'matches regexp nil)))
 
 (declare-function apropos-parse-pattern "apropos" (pattern))
 
@@ -690,6 +817,7 @@ The argument has the same meaning as in `apropos'."
 
 ;;;###autoload (define-key esc-map "." #'xref-find-definitions)
 ;;;###autoload (define-key esc-map "," #'xref-pop-marker-stack)
+;;;###autoload (define-key esc-map "?" #'xref-find-references)
 ;;;###autoload (define-key esc-map [?\C-.] #'xref-find-apropos)
 ;;;###autoload (define-key ctl-x-4-map "." 
#'xref-find-definitions-other-window)
 ;;;###autoload (define-key ctl-x-5-map "." #'xref-find-definitions-other-frame)
@@ -720,7 +848,8 @@ 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")
+(declare-function grep-read-files "grep")
+(declare-function grep-expand-template "grep")
 
 (defun xref-collect-references (symbol dir)
   "Collect references to SYMBOL inside DIR.
@@ -733,7 +862,7 @@ tools are used, and when."
   (let* ((default-directory dir)
          (semantic-symref-tool 'detect)
          (res (semantic-symref-find-references-by-name symbol 'subdirs))
-         (hits (and res (oref res :hit-lines)))
+         (hits (and res (oref res hit-lines)))
          (orig-buffers (buffer-list)))
     (unwind-protect
         (delq nil
@@ -743,39 +872,73 @@ tools are used, and when."
       (mapc #'kill-buffer
             (cl-set-difference (buffer-list) orig-buffers)))))
 
-(defun xref-collect-matches (regexp dir)
-  "Collect matches for REGEXP inside DIR using rgrep."
+(defun xref-collect-matches (regexp files dir ignores)
+  "Collect matches for REGEXP inside FILES in DIR.
+FILES is a string with glob patterns separated by spaces.
+IGNORES is a list of glob patterns."
   (cl-assert (directory-name-p dir))
   (require 'semantic/fw)
   (grep-compute-defaults)
   (defvar grep-find-template)
+  (defvar grep-highlight-matches)
   (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))
+         (grep-highlight-matches nil)
+         (command (xref--rgrep-command (xref--regexp-to-extended regexp)
+                                       files dir ignores))
          (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))))
+      (call-process-shell-command command nil t)
+      (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))
+              (mapcar (lambda (hit) (xref--collect-match hit regexp))
+                      (nreverse hits)))
       (mapc #'kill-buffer
             (cl-set-difference (buffer-list) orig-buffers)))))
 
+(defun xref--rgrep-command (regexp files dir ignores)
+  (require 'find-dired)      ; for `find-name-arg'
+  (defvar grep-find-template)
+  (defvar 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
+    (shell-quote-argument "(")
+    " -path "
+    (mapconcat
+     (lambda (ignore)
+       (when (string-match "\\(\\.\\)/" ignore)
+         (setq ignore (replace-match dir t t ignore 1)))
+       (when (string-match-p "/\\'" ignore)
+         (setq ignore (concat ignore "*")))
+       (unless (string-prefix-p "*" ignore)
+         (setq ignore (concat "*/" ignore)))
+       (shell-quote-argument ignore))
+     ignores
+     " -o -path ")
+    " "
+    (shell-quote-argument ")")
+    " -prune -o ")))
+
 (defun xref--regexp-to-extended (str)
   (replace-regexp-in-string
    ;; FIXME: Add tests.  Move to subr.el, make a public function.
@@ -802,15 +965,19 @@ tools are used, and when."
       (save-excursion
         (goto-char (point-min))
         (forward-line (1- line))
+        (syntax-propertize (line-end-position))
+        ;; TODO: Handle multiple matches per line.
         (when (re-search-forward regexp (line-end-position) t)
           (goto-char (match-beginning 0))
-          (xref-make (buffer-substring
-                      (line-beginning-position)
-                      (line-end-position))
-                     (xref-make-file-location file line
-                                              (current-column))))))))
+          (let ((loc (xref-make-file-location file line
+                                              (current-column))))
+            (goto-char (match-end 0))
+            (xref-make-match (buffer-substring
+                              (line-beginning-position)
+                              (line-end-position))
+                             (current-column)
+                             loc)))))))
 
-
 (provide 'xref)
 
 ;;; xref.el ends here
diff --git a/lisp/replace.el b/lisp/replace.el
index 1bf1343..41debdd 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -33,6 +33,14 @@
   :type 'boolean
   :group 'matching)
 
+(defcustom replace-character-fold t
+  "Non-nil means `query-replace' should do character folding in matches.
+This means, for instance, that ' will match a large variety of
+unicode quotes."
+  :type 'boolean
+  :group 'matching
+  :version "25.1")
+
 (defcustom replace-lax-whitespace nil
   "Non-nil means `query-replace' matches a sequence of whitespace chars.
 When you enter a space or spaces in the strings to be replaced,
@@ -156,6 +164,8 @@ wants to replace FROM with TO."
     ;; unavailable while preparing to dump.
     (custom-reevaluate-setting 'query-replace-from-to-separator)
     (let* ((history-add-new-input nil)
+          (text-property-default-nonsticky
+           (cons '(separator . t) text-property-default-nonsticky))
           (separator
            (when query-replace-from-to-separator
              (propertize "\0"
@@ -2002,7 +2012,10 @@ It is called with three arguments, as if it were
   ;; outside of this function because then another I-search
   ;; used after `recursive-edit' might override them.
   (let* ((isearch-regexp regexp-flag)
-        (isearch-word delimited-flag)
+        (isearch-word (or delimited-flag
+                           (and replace-character-fold
+                                (not regexp-flag)
+                                #'character-fold-to-regexp)))
         (isearch-lax-whitespace
          replace-lax-whitespace)
         (isearch-regexp-lax-whitespace
diff --git a/lisp/ruler-mode.el b/lisp/ruler-mode.el
index f0b012e..4f68909 100644
--- a/lisp/ruler-mode.el
+++ b/lisp/ruler-mode.el
@@ -437,6 +437,8 @@ the mouse has been clicked."
   (let ((drags 0)
         event)
     (track-mouse
+      ;; Signal the display engine to freeze the mouse pointer shape.
+      (setq track-mouse 'dragging)
       (while (mouse-movement-p (setq event (read-event)))
         (setq drags (1+ drags))
         (when (eq window (posn-window (event-end event)))
diff --git a/lisp/server.el b/lisp/server.el
index 2007635..b6b0e97 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -1167,6 +1167,12 @@ The following commands are accepted by the client:
                  (let ((file (pop args-left)))
                    (if coding-system
                        (setq file (decode-coding-string file coding-system)))
+                   ;; Allow Cygwin's emacsclient to be used as a file
+                   ;; handler on MS-Windows, in which case FILENAME
+                   ;; might start with a drive letter.
+                   (when (and (eq system-type 'cygwin)
+                              (string-match "\\`[A-Za-z]:" file))
+                     (setq file (cygwin-convert-file-name-from-windows file)))
                    (setq file (expand-file-name file dir))
                    (push (cons file filepos) files)
                    (server-log (format "New file: %s %s"
diff --git a/lisp/shell.el b/lisp/shell.el
index f71d140..f5cb321 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -83,8 +83,8 @@
 ;; tab     completion-at-point         Complete filename/command/history
 ;; m-?     comint-dynamic-list-filename-completions
 ;;                                     List completions in help buffer
-;; m-c-f   shell-forward-command       Forward a shell command
-;; m-c-b   shell-backward-command      Backward a shell command
+;; c-c c-f shell-forward-command       Forward a shell command
+;; c-c c-b shell-backward-command      Backward a shell command
 ;;        dirs                         Resync the buffer's dir stack
 ;;        shell-dirtrack-mode          Turn dir tracking on/off
 ;;         comint-strip-ctrl-m         Remove trailing ^Ms from output
@@ -1092,10 +1092,12 @@ Copy Shell environment variable to Emacs: ")))
   "Move forward across ARG shell command(s).  Does not cross lines.
 See `shell-command-regexp'."
   (interactive "p")
-  (let ((limit (line-end-position)))
-    (if (re-search-forward (concat shell-command-regexp "\\([;&|][\t ]*\\)+")
-                          limit 'move arg)
-       (skip-syntax-backward " "))))
+  (let ((limit (line-end-position))
+       (pt (point)))
+    (re-search-forward (concat shell-command-regexp "\\([;&|][\t ]*\\)+")
+                      limit 'move arg)
+    (and (/= pt (point))
+        (skip-syntax-backward " " pt))))
 
 
 (defun shell-backward-command (&optional arg)
@@ -1106,10 +1108,13 @@ See `shell-command-regexp'."
     (when (> limit (point))
       (setq limit (line-beginning-position)))
     (skip-syntax-backward " " limit)
-    (if (re-search-backward
-        (format "[;&|]+[\t ]*\\(%s\\)" shell-command-regexp) limit 'move arg)
-       (progn (goto-char (match-beginning 1))
-              (skip-chars-forward ";&|")))))
+    (let ((pt (point)))
+      (if (re-search-backward
+          (format "[;&|]+[\t ]*\\(%s\\)" shell-command-regexp) limit 'move arg)
+         (progn (goto-char (match-beginning 1))
+                (skip-chars-forward ";&|")))
+      (and (/= pt (point))
+          (skip-syntax-forward " " pt)))))
 
 (defun shell-dynamic-complete-command ()
   "Dynamically complete the command at point.
diff --git a/lisp/simple.el b/lisp/simple.el
index 4ef45c5..7eed279 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -1448,7 +1448,7 @@ this command arranges for all errors to enter the 
debugger."
       ;; Bind debug-on-error to something unique so that we can
       ;; detect when evalled code changes it.
       (let ((debug-on-error old-value))
-       (push (eval exp lexical-binding) values)
+       (push (eval (macroexpand-all exp) lexical-binding) values)
        (setq new-value debug-on-error))
       ;; If evalled code has changed the value of debug-on-error,
       ;; propagate that change to the global binding.
@@ -3318,7 +3318,7 @@ display the error buffer if there were any errors.  When 
called
 interactively, this is t."
   (interactive (let (string)
                 (unless (mark)
-                  (error "The mark is not set now, so there is no region"))
+                  (user-error "The mark is not set now, so there is no 
region"))
                 ;; Do this before calling region-beginning
                 ;; and region-end, in case subprocess output
                 ;; relocates them while we are in the minibuffer.
@@ -3521,7 +3521,7 @@ support pty association, if PROGRAM is nil."
 (defvar tabulated-list-sort-key)
 (declare-function tabulated-list-init-header  "tabulated-list" ())
 (declare-function tabulated-list-print "tabulated-list"
-                  (&optional remember-pos))
+                  (&optional remember-pos update))
 
 (defvar process-menu-query-only nil)
 
@@ -4017,7 +4017,7 @@ some text between BEG and END, but we're killing the 
region."
   ;; calling `kill-append'.
   (interactive (list (mark) (point) 'region))
   (unless (and beg end)
-    (error "The mark is not set now, so there is no region"))
+    (user-error "The mark is not set now, so there is no region"))
   (condition-case nil
       (let ((string (if region
                         (funcall region-extract-function 'delete)
@@ -7314,6 +7314,11 @@ it were the arg to `interactive' (which see) to 
interactively read VALUE.
 If VARIABLE has been defined with `defcustom', then the type information
 in the definition is used to check that VALUE is valid.
 
+Note that this function is at heart equivalent to the basic `set' function.
+For a variable defined with `defcustom', it does not pay attention to
+any :set property that the variable might have (if you want that, use
+\\[customize-set-variable] instead).
+
 With a prefix argument, set VARIABLE to VALUE buffer-locally."
   (interactive
    (let* ((default-var (variable-at-point))
@@ -7358,8 +7363,8 @@ With a prefix argument, set VARIABLE to VALUE 
buffer-locally."
       (require 'cus-edit)
       (setq type (widget-convert type))
       (unless (widget-apply type :match value)
-       (error "Value `%S' does not match type %S of %S"
-              value (car type) variable))))
+       (user-error "Value `%S' does not match type %S of %S"
+                   value (car type) variable))))
 
   (if make-local
       (make-local-variable variable))
diff --git a/lisp/skeleton.el b/lisp/skeleton.el
index d23488b..2c017dd 100644
--- a/lisp/skeleton.el
+++ b/lisp/skeleton.el
@@ -277,7 +277,8 @@ When done with skeleton, but before going back to `_'-point 
call
 (defun skeleton-read (prompt &optional initial-input recursive)
   "Function for reading a string from the minibuffer within skeletons.
 
-PROMPT must be a string or a form that evaluates to a string.
+PROMPT must be a string or a function that evaluates to a string.
+It may also be a form that evaluates to a string (deprecated).
 It may contain a `%s' which will be replaced by `skeleton-subprompt'.
 If non-nil second arg INITIAL-INPUT or variable `input' is a string or
 cons with index to insert before reading.  If third arg RECURSIVE is non-nil
@@ -306,12 +307,14 @@ automatically, and you are prompted to fill in the 
variable parts.")))
        ;; before point.
         (save-excursion (insert "\n")))
     (unwind-protect
-       (setq prompt (if (stringp prompt)
-                        (read-string (format prompt skeleton-subprompt)
-                                     (setq initial-input
-                                           (or initial-input
-                                               (symbol-value 'input))))
-                      (eval prompt)))
+       (setq prompt (cond ((stringp prompt)
+                            (read-string (format prompt skeleton-subprompt)
+                                         (setq initial-input
+                                               (or initial-input
+                                                   (symbol-value 'input)))))
+                           ((functionp prompt)
+                            (funcall prompt))
+                           (t (eval prompt))))
       (or eolp
          (delete-char 1))))
   (if (and recursive
diff --git a/lisp/startup.el b/lisp/startup.el
index 3c9ada6..cfe2269 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -581,7 +581,7 @@ It is the default value of the variable `top-level'."
         (set (make-local-variable 'window-point-insertion-type) t)
         ;; Give *Messages* the same default-directory as *scratch*,
         ;; just to keep things predictable.
-       (setq default-directory dir)))
+       (setq default-directory (or dir (expand-file-name "~/")))))
     ;; `user-full-name' is now known; reset its standard-value here.
     (put 'user-full-name 'standard-value
         (list (default-value 'user-full-name)))
@@ -590,11 +590,12 @@ It is the default value of the variable `top-level'."
       (and (stringp pwd)
           ;; Use FOO/., so that if FOO is a symlink, file-attributes
           ;; describes the directory linked to, not FOO itself.
-          (or (equal (file-attributes
+          (or (and default-directory
+                   (equal (file-attributes
                       (concat (file-name-as-directory pwd) "."))
                      (file-attributes
                       (concat (file-name-as-directory default-directory)
-                              ".")))
+                              "."))))
               (setq process-environment
                     (delete (concat "PWD=" pwd)
                             process-environment)))))
@@ -609,12 +610,15 @@ It is the default value of the variable `top-level'."
                (mapcar (lambda (dir)
                          (decode-coding-string dir coding t))
                        charset-map-path))))
-    (setq default-directory (abbreviate-file-name default-directory))
+    (if default-directory
+       (setq default-directory (abbreviate-file-name default-directory))
+      (display-warning 'initialization "Error setting default-directory"))
     (let ((old-face-font-rescale-alist face-font-rescale-alist))
       (unwind-protect
          (command-line)
        ;; Do this again, in case .emacs defined more abbreviations.
-       (setq default-directory (abbreviate-file-name default-directory))
+       (if default-directory
+           (setq default-directory (abbreviate-file-name default-directory)))
        ;; Specify the file for recording all the auto save files of this 
session.
        ;; This is used by recover-session.
        (or auto-save-list-file-name
@@ -1013,6 +1017,13 @@ please check its value")
                                '("no" "off" "false" "0")))))
     (setq no-blinking-cursor t))
 
+  ;; If curved quotes don't work, display ASCII approximations.
+  (dolist (char-repl '((?‘ . [?\`]) (?’ . [?\']) (?“ . [?\"]) (?” . [?\"])))
+    (when (not (char-displayable-p (car char-repl)))
+      (or standard-display-table
+          (setq standard-display-table (make-display-table)))
+      (aset standard-display-table (car char-repl) (cdr char-repl))))
+
   ;; Re-evaluate predefined variables whose initial value depends on
   ;; the runtime context.
   (mapc 'custom-reevaluate-setting
@@ -1163,25 +1174,18 @@ please check its value")
                (funcall inner)
                (setq init-file-had-error nil))
            (error
-            ;; Postpone displaying the warning until all hooks
-            ;; in `after-init-hook' like `desktop-read' will finalize
-            ;; possible changes in the window configuration.
-            (add-hook
-             'after-init-hook
-             (lambda ()
-               (display-warning
-                'initialization
-                (format "An error occurred while loading `%s':\n\n%s%s%s\n\n\
+            (display-warning
+             'initialization
+             (format "An error occurred while loading `%s':\n\n%s%s%s\n\n\
 To ensure normal operation, you should investigate and remove the
 cause of the error in your initialization file.  Start Emacs with
 the `--debug-init' option to view a complete error backtrace."
-                        user-init-file
-                        (get (car error) 'error-message)
-                        (if (cdr error) ": " "")
-                        (mapconcat (lambda (s) (prin1-to-string s t))
-                                   (cdr error) ", "))
-                :warning))
-             t)
+                     user-init-file
+                     (get (car error) 'error-message)
+                     (if (cdr error) ": " "")
+                     (mapconcat (lambda (s) (prin1-to-string s t))
+                                (cdr error) ", "))
+             :warning)
             (setq init-file-had-error t))))
 
       (if (and deactivate-mark transient-mark-mode)
@@ -1264,7 +1268,10 @@ the `--debug-init' option to view a complete error 
backtrace."
        (package-initialize))
 
   (setq after-init-time (current-time))
-  (run-hooks 'after-init-hook)
+  ;; Display any accumulated warnings after all functions in
+  ;; `after-init-hook' like `desktop-read' have finalized possible
+  ;; changes in the window configuration.
+  (run-hooks 'after-init-hook 'delayed-warnings-hook)
 
   ;; If *scratch* exists and init file didn't change its mode, initialize it.
   (if (get-buffer "*scratch*")
@@ -2193,19 +2200,23 @@ A fancy display is used on graphic displays, normal 
otherwise."
                ;; 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))))))
+                 ;; This can only happen if PWD is deleted.
+                 (if (not (or dir (file-name-absolute-p name)))
+                     (message "Ignoring relative file name (%s) due to \
+nil default-directory" 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)
diff --git a/lisp/subr.el b/lisp/subr.el
index b9a847d..bfdc0ff 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -426,8 +426,8 @@ one is kept."
             (let ((elt (car retail)))
               (if (gethash elt hash)
                   (setcdr tail (cdr retail))
-                (puthash elt t hash)))
-            (setq tail retail)))
+                (puthash elt t hash)
+                (setq tail retail)))))
       (let ((tail list))
         (while tail
           (setcdr tail (delete (car tail) (cdr tail)))
@@ -440,16 +440,16 @@ one is kept."
 First and last elements are considered consecutive if CIRCULAR is
 non-nil."
   (let ((tail list) last)
-    (while (consp tail)
+    (while (cdr tail)
       (if (equal (car tail) (cadr tail))
          (setcdr tail (cddr tail))
-       (setq last (car tail)
+       (setq last tail
              tail (cdr tail))))
     (if (and circular
-            (cdr list)
-            (equal last (car list)))
-       (nbutlast list)
-      list)))
+            last
+            (equal (car tail) (car list)))
+       (setcdr last nil)))
+  list)
 
 (defun number-sequence (from &optional to inc)
   "Return a sequence of numbers from FROM to TO (both inclusive) as a list.
@@ -1213,14 +1213,14 @@ and `event-end' functions."
   "Return the window row number in POSITION and character number in that row.
 
 Return nil if POSITION does not contain the actual position; in that case
-\`posn-col-row' can be used to get approximate values.
+`posn-col-row' can be used to get approximate values.
 POSITION should be a list of the form returned by the `event-start'
 and `event-end' functions.
 
 This function does not account for the width on display, like the
 number of visual columns taken by a TAB or image.  If you need
 the coordinates of POSITION in character units, you should use
-\`posn-col-row', not this function."
+`posn-col-row', not this function."
   (nth 6 position))
 
 (defsubst posn-timestamp (position)
@@ -1384,6 +1384,7 @@ is converted into a string by expressing it in decimal."
 (defalias 'send-region 'process-send-region)
 (defalias 'string= 'string-equal)
 (defalias 'string< 'string-lessp)
+(defalias 'string> 'string-greaterp)
 (defalias 'move-marker 'set-marker)
 (defalias 'rplaca 'setcar)
 (defalias 'rplacd 'setcdr)
@@ -2347,6 +2348,7 @@ is nil and `use-dialog-box' is non-nil."
                  (t (setq temp-prompt (concat "Please answer y or n.  "
                                               prompt))))))))
      ((and (display-popup-menus-p)
+           last-input-event             ; not during startup
           (listp last-nonmenu-event)
           use-dialog-box)
       (setq prompt (funcall padded prompt t)
@@ -3834,6 +3836,13 @@ consisting of STR followed by an invisible left-to-right 
mark
   (if (string-match "\\cR" str)
       (concat str (propertize (string ?\x200e) 'invisible t))
     str))
+
+(defun string-greaterp (string1 string2)
+  "Return non-nil if STRING1 is greater than STRING2 in lexicographic order.
+Case is significant.
+Symbols are also allowed; their print names are used instead."
+  (string-lessp string2 string1))
+
 
 ;;;; Specifying things to do later.
 
@@ -4057,9 +4066,10 @@ that can be added."
 
 (defun remove-from-invisibility-spec (element)
   "Remove ELEMENT from `buffer-invisibility-spec'."
-  (if (consp buffer-invisibility-spec)
-      (setq buffer-invisibility-spec
-           (delete element buffer-invisibility-spec))))
+  (setq buffer-invisibility-spec
+        (if (consp buffer-invisibility-spec)
+           (delete element buffer-invisibility-spec)
+          (list t))))
 
 ;;;; Syntax tables.
 
diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el
index f603f3e..a21c105 100644
--- a/lisp/term/ns-win.el
+++ b/lisp/term/ns-win.el
@@ -930,12 +930,9 @@ See the documentation of 
`create-fontset-from-fontset-spec' for the format.")
 
 (declare-function ns-own-selection-internal "nsselect.m" (selection value))
 (declare-function ns-disown-selection-internal "nsselect.m" (selection))
-(declare-function ns-selection-owner-p "nsselect.m"
-                  (&optional selection terminal))
-(declare-function ns-selection-exists-p "nsselect.m"
-                  (&optional selection terminal))
-(declare-function ns-get-selection "nsselect.m"
-                  (selection-symbol target-type &optional time-stamp terminal))
+(declare-function ns-selection-owner-p "nsselect.m" (&optional selection))
+(declare-function ns-selection-exists-p "nsselect.m" (&optional selection))
+(declare-function ns-get-selection "nsselect.m" (selection-symbol target-type))
 
 (cl-defmethod gui-backend-set-selection (selection value
                                          &context (window-system (eql ns)))
diff --git a/lisp/term/pc-win.el b/lisp/term/pc-win.el
index b6c7222..e8aaa1a 100644
--- a/lisp/term/pc-win.el
+++ b/lisp/term/pc-win.el
@@ -177,7 +177,7 @@ contain wildcard characters:
   PATTERN is case-insensitive.
 
 The return value is a list of strings, suitable as arguments to
-\`set-face-font'.
+`set-face-font'.
 
 Fonts Emacs can't use may or may not be excluded
 even if they match PATTERN and FACE.
diff --git a/lisp/term/w32console.el b/lisp/term/w32console.el
index 29ab2f1..2df1378 100644
--- a/lisp/term/w32console.el
+++ b/lisp/term/w32console.el
@@ -69,7 +69,7 @@
           ;; Since we changed the terminal encoding, we need to repeat
           ;; the test for Unicode quotes being displayable.
           (dolist (char-repl
-                   '((?‘ . [?\']) (?’ . [?\']) (?“ . [?\"]) (?” . [?\"])))
+                   '((?‘ . [?\`]) (?’ . [?\']) (?“ . [?\"]) (?” . [?\"])))
             (when (not (char-displayable-p (car char-repl)))
               (or standard-display-table
                   (setq standard-display-table (make-display-table)))
diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el
index f7f8007..300e494 100644
--- a/lisp/term/xterm.el
+++ b/lisp/term/xterm.el
@@ -688,6 +688,10 @@ string bytes that can be copied is 3/4 of this value."
           ;;(xterm--init-activate-get-selection)
           (xterm--init-activate-set-selection))))))
 
+(defvar xterm-query-timeout 2
+  "Seconds to wait for an answer from the terminal.
+Can be nil to mean \"no timeout\".")
+
 (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).
@@ -696,35 +700,47 @@ 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 (and (input-pending-p) (not no-async))
-      (progn
-        (dolist (handler handlers)
-          (define-key input-decode-map (car handler)
-            (lambda (&optional _prompt)
-              ;; Unregister the handler, since we don't expect further answers.
-              (dolist (handler handlers)
-                (define-key input-decode-map (car handler) nil))
-              (funcall (cdr handler))
-              [])))
-        (send-string-to-terminal query))
-    ;; Pending input can be mistakenly returned by the calls to
-    ;; read-event below.  Discard it.
-    (send-string-to-terminal query)
-    (while handlers
-      (let ((handler (pop handlers))
-            (i 0))
-        (while (and (< i (length (car handler)))
-                    (let ((evt (read-event nil nil 2)))
-                      (or (eq evt (aref (car handler) i))
-                          (progn (if evt (push evt unread-command-events))
-                                 nil))))
-          (setq i (1+ i)))
-        (if (= i (length (car handler)))
-            (progn (setq handlers nil)
-                   (funcall (cdr handler)))
-          (while (> i 0)
-            (push (aref (car handler) (setq i (1- i)))
-                  unread-command-events)))))))
+  (let ((register
+         (lambda (handlers)
+           (dolist (handler handlers)
+             (define-key input-decode-map (car handler)
+               (lambda (&optional _prompt)
+                 ;; Unregister the handler, since we don't expect
+                 ;; further answers.
+                 (dolist (handler handlers)
+                   (define-key input-decode-map (car handler) nil))
+                 (funcall (cdr handler))
+                 []))))))
+    (if (and (or (null xterm-query-timeout) (input-pending-p))
+             (not no-async))
+        (progn
+          (funcall register handlers)
+          (send-string-to-terminal query))
+      ;; Pending input can be mistakenly returned by the calls to
+      ;; read-event below: discard it.
+      (discard-input)
+      (send-string-to-terminal query)
+      (while handlers
+        (let ((handler (pop handlers))
+              (i 0))
+          (while (and (< i (length (car handler)))
+                      (let ((evt (read-event nil nil xterm-query-timeout)))
+                        (if (and (null evt) (= i 0) (not no-async))
+                            ;; Timeout on the first event: fallback on async.
+                            (progn
+                              (funcall register (cons handler handlers))
+                              (setq handlers nil)
+                              nil)
+                          (or (eq evt (aref (car handler) i))
+                              (progn (if evt (push evt unread-command-events))
+                                     nil)))))
+            (setq i (1+ i)))
+          (if (= i (length (car handler)))
+              (progn (setq handlers nil)
+                     (funcall (cdr handler)))
+            (while (> i 0)
+              (push (aref (car handler) (setq i (1- i)))
+                    unread-command-events))))))))
 
 (defun xterm--push-map (map basemap)
   ;; Use inheritance to let the main keymaps override those defaults.
diff --git a/lisp/textmodes/artist.el b/lisp/textmodes/artist.el
index 14cf402..a29418e 100644
--- a/lisp/textmodes/artist.el
+++ b/lisp/textmodes/artist.el
@@ -4965,6 +4965,9 @@ The event, EV, is the mouse event."
        (artist-no-rb-set-point1 x1 y1))
     (unwind-protect
         (track-mouse
+          ;; We don't want flickering of mouse pointer shape while we
+          ;; drag the mouse.
+          (setq track-mouse 'dragging)
           (while (or (mouse-movement-p ev)
                      (member 'down (event-modifiers ev)))
             (setq ev-start-pos (artist-coord-win-to-buf
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el
index 8aadf51..e074918 100644
--- a/lisp/textmodes/flyspell.el
+++ b/lisp/textmodes/flyspell.el
@@ -1119,7 +1119,8 @@ misspelling and skips redundant spell-checking step."
                   (let* ((bound
                           (- start
                              (- end start)
-                             (- (skip-chars-backward " \t\n\f"))))
+                             (- (save-excursion
+                                   (skip-chars-backward " \t\n\f")))))
                          (p (when (>= bound (point-min))
                               (flyspell-word-search-backward word bound t))))
                     (and p (/= p start)))))
@@ -1827,11 +1828,12 @@ as returned by `ispell-parse-output'."
 ;;*    flyspell-check-previous-highlighted-word ...                     */
 ;;*---------------------------------------------------------------------*/
 (defun flyspell-check-previous-highlighted-word (&optional arg)
-  "Correct the closer misspelled word.
-This function scans a mis-spelled word before the cursor. If it finds one
-it proposes replacement for that word. With prefix arg, count that many
-misspelled words backwards."
-  (interactive)
+  "Correct the closest previous word that is highlighted as misspelled.
+This function scans for a word which starts before point that has been
+highlighted by Flyspell as misspelled.  If it finds one, it proposes
+a replacement for that word.  With prefix arg N, check the Nth word
+before point that's highlighted as misspelled."
+  (interactive "P")
   (let ((pos1 (point))
        (pos  (point))
        (arg  (if (or (not (numberp arg)) (< arg 1)) 1 arg))
@@ -1842,7 +1844,7 @@ misspelled words backwards."
            (setq pos1 pos)
            (if (> pos (point-min))
                (progn
-                 (setq ovs (overlays-at (1- pos)))
+                 (setq ovs (overlays-at pos))
                  (while (consp ovs)
                    (setq ov (car ovs))
                    (setq ovs (cdr ovs))
@@ -2087,8 +2089,6 @@ If EVENT is non-nil, it is the mouse event that invoked 
this operation;
 that controls where to put the menu.
 If OPOINT is non-nil, restore point there after adjusting it for replacement."
   (interactive)
-  (unless (mouse-position)
-    (error "Pop-up menus do not work on this terminal"))
   ;; use the correct dictionary
   (flyspell-accept-buffer-local-defs)
   (or opoint (setq opoint (point)))
@@ -2203,9 +2203,8 @@ If OPOINT is non-nil, restore point there after adjusting 
it for replacement."
 ;;*---------------------------------------------------------------------*/
 (defun flyspell-emacs-popup (event poss word)
   "The Emacs popup menu."
-  (unless window-system
-    (error "This command requires pop-up dialogs"))
-  (if (not event)
+  (if (and (not event)
+           (display-mouse-p))
       (let* ((mouse-pos  (mouse-position))
             (mouse-pos  (if (nth 1 mouse-pos)
                             mouse-pos
diff --git a/lisp/textmodes/page-ext.el b/lisp/textmodes/page-ext.el
index 3781c98..d3bd33e 100644
--- a/lisp/textmodes/page-ext.el
+++ b/lisp/textmodes/page-ext.el
@@ -345,14 +345,13 @@ If point is in the pages directory buffer, insert the new 
page in the
 buffer associated with the directory.
 
 Insert the new page just before current page if
-  pages-directory-for-adding-new-page-before-current-page-p  variable
-is non-nil.  Else insert at exact location of point.
+`pages-directory-for-adding-new-page-before-current-page-p' is non-nil.
+Else insert at exact location of point.
 
-Narrow to new page if
-  pages-directory-for-adding-page-narrowing-p variable
-is non-nil.
+Narrow to new page if `pages-directory-for-adding-page-narrowing-p' is
+non-nil.
 
-Page begins with a `^L' as the default page-delimiter.
+Page begins with a '^L' as the default `page-delimiter'.
 Use \\[set-page-delimiter] to change the page-delimiter.
 Point is left in the body of page."
   (interactive "sHeader line: ")
@@ -516,7 +515,7 @@ resets the page-delimiter to the original value."
 (defun pages-directory
   (pages-list-all-headers-p count-lines-p &optional regexp)
   "Display a directory of the page headers in a temporary buffer.
-A header is the first non-blank line after the page-delimiter.
+A header is the first non-blank line after the `page-delimiter'.
 \\[pages-directory-mode]
 You may move point to one of the lines in the temporary buffer,
 then use \\<pages-directory-goto> to go to the same line in the pages buffer.
@@ -752,10 +751,10 @@ Move point to one of the lines in the displayed directory,
 then use \\[pages-directory-goto] to go to the same line
 in the addresses buffer.
 
-If    pages-directory-for-addresses-goto-narrowing-p    is non-nil,
+If `pages-directory-for-addresses-goto-narrowing-p' is non-nil,
 `pages-directory-goto' narrows addresses buffer to entry.
 
-If    pages-directory-for-addresses-buffer-keep-windows-p     is nil,
+If `pages-directory-for-addresses-buffer-keep-windows-p' is nil,
 this command deletes other windows when it displays the addresses
 directory."
 
diff --git a/lisp/textmodes/reftex-vars.el b/lisp/textmodes/reftex-vars.el
index 7f050e9..a8f5fce 100644
--- a/lisp/textmodes/reftex-vars.el
+++ b/lisp/textmodes/reftex-vars.el
@@ -876,7 +876,7 @@ DOWNCASE    t:   Downcase words before using them."
       "\\\\label{\\(?1:[^}]*\\)}"
       ;; keyvals [..., label = {foo}, ...] forms used by ctable,
       ;; listings, minted, ...
-      "\\[[^]]*\\<label[[:space:]]*=[[:space:]]*{?\\(?1:[^],}]+\\)}?")
+      "\\[[^[]]*\\<label[[:space:]]*=[[:space:]]*{?\\(?1:[^],}]+\\)}?")
     "List of regexps matching \\label definitions.
 The default value matches usual \\label{...} definitions and
 keyval style [..., label = {...}, ...] label definitions.  It is
@@ -886,7 +886,7 @@ have to define it using \\(?1:...\\) when adding new 
regexps.
 When changed from Lisp, make sure to call
 `reftex-compile-variables' afterwards to make the change
 effective."
-    :version "24.4"
+    :version "25.1"
     :set (lambda (symbol value)
           (set symbol value)
           (when (fboundp 'reftex-compile-variables)
diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el
index 2ffe9c1..6a14b52 100644
--- a/lisp/textmodes/sgml-mode.el
+++ b/lisp/textmodes/sgml-mode.el
@@ -759,9 +759,10 @@ If QUIET, do not print a message when there are no 
attributes for TAG."
            (insert ?\s)
            (insert (funcall skeleton-transformation-function
                             (setq attribute
-                                  (skeleton-read '(completing-read
-                                                   "Attribute: "
-                                                   alist)))))
+                                  (skeleton-read (lambda ()
+                                                    (completing-read
+                                                     "Attribute: "
+                                                     alist))))))
            (if (string= "" attribute)
                (setq i 0)
              (sgml-value (assoc (downcase attribute) alist))
@@ -1177,13 +1178,16 @@ See `sgml-tag-alist' for info about attribute rules."
     (if (and (eq (car alist) t) (not sgml-xml-mode))
        (when (cdr alist)
          (insert "=\"")
-         (setq alist (skeleton-read '(completing-read "Value: " (cdr alist))))
+         (setq alist (skeleton-read (lambda ()
+                                       (completing-read
+                                        "Value: " (cdr alist)))))
          (if (string< "" alist)
              (insert alist ?\")
            (delete-char -2)))
       (insert "=\"")
       (if (cdr alist)
-          (insert (skeleton-read '(completing-read "Value: " alist)))
+          (insert (skeleton-read (lambda ()
+                                   (completing-read "Value: " alist))))
         (when (null alist)
           (insert (skeleton-read '(read-string "Value: ")))))
       (insert ?\"))))
diff --git a/lisp/textmodes/texinfmt.el b/lisp/textmodes/texinfmt.el
index cab4f77..e1259ff 100644
--- a/lisp/textmodes/texinfmt.el
+++ b/lisp/textmodes/texinfmt.el
@@ -34,7 +34,7 @@
 If optional argument HERE is non-nil, insert info at point."
   (interactive "P")
   (let ((version-string
-         (format "Version of \`texinfmt.el\': %s" texinfmt-version)))
+         (format "Version of `texinfmt.el': %s" texinfmt-version)))
     (if here
         (insert version-string)
       (if (called-interactively-p 'interactive)
diff --git a/lisp/textmodes/texnfo-upd.el b/lisp/textmodes/texnfo-upd.el
index df05b67..eefea1f 100644
--- a/lisp/textmodes/texnfo-upd.el
+++ b/lisp/textmodes/texnfo-upd.el
@@ -893,7 +893,7 @@ first update all existing menus in the buffer (incorporating
 descriptions from pre-existing menus) before it constructs the
 master menu.  If the argument is numeric (e.g., \"C-u 2\"),
 update all existing nodes as well, by calling
-\`texinfo-update-node' on the entire file.  Warning: do NOT
+`texinfo-update-node' on the entire file.  Warning: do NOT
 invoke with a numeric argument if your Texinfo file uses @node
 lines without the `Next', `Previous', `Up' pointers, as the
 result could be an invalid Texinfo file!
diff --git a/lisp/thingatpt.el b/lisp/thingatpt.el
index b3fe1bc..84ffcca 100644
--- a/lisp/thingatpt.el
+++ b/lisp/thingatpt.el
@@ -1,4 +1,4 @@
-;;; thingatpt.el --- get the `thing' at point
+;;; thingatpt.el --- get the `thing' at point  -*- lexical-binding:t -*-
 
 ;; Copyright (C) 1991-1998, 2000-2015 Free Software Foundation, Inc.
 
@@ -178,34 +178,40 @@ The bounds of THING are determined by 
`bounds-of-thing-at-point'."
 ;;  Sexps
 
 (defun in-string-p ()
-  "Return non-nil if point is in a string.
-\[This is an internal function.]"
+  "Return non-nil if point is in a string."
+  (declare (obsolete "use (nth 3 (syntax-ppss)) instead." "25.1"))
   (let ((orig (point)))
     (save-excursion
       (beginning-of-defun)
       (nth 3 (parse-partial-sexp (point) orig)))))
 
-(defun end-of-sexp ()
-  "Move point to the end of the current sexp.
-\[This is an internal function.]"
+(defun thing-at-point--end-of-sexp ()
+  "Move point to the end of the current sexp."
   (let ((char-syntax (syntax-after (point))))
     (if (or (eq char-syntax ?\))
-           (and (eq char-syntax ?\") (in-string-p)))
+           (and (eq char-syntax ?\") (nth 3 (syntax-ppss))))
        (forward-char 1)
       (forward-sexp 1))))
 
-(put 'sexp 'end-op 'end-of-sexp)
+(define-obsolete-function-alias 'end-of-sexp
+  'thing-at-point--end-of-sexp "25.1"
+  "This is an internal thingatpt function and should not be used.")
 
-(defun beginning-of-sexp ()
-  "Move point to the beginning of the current sexp.
-\[This is an internal function.]"
+(put 'sexp 'end-op 'thing-at-point--end-of-sexp)
+
+(defun thing-at-point--beginning-of-sexp ()
+  "Move point to the beginning of the current sexp."
   (let ((char-syntax (char-syntax (char-before))))
     (if (or (eq char-syntax ?\()
-           (and (eq char-syntax ?\") (in-string-p)))
+           (and (eq char-syntax ?\") (nth 3 (syntax-ppss))))
        (forward-char -1)
       (forward-sexp -1))))
 
-(put 'sexp 'beginning-op 'beginning-of-sexp)
+(define-obsolete-function-alias 'beginning-of-sexp
+  'thing-at-point--beginning-of-sexp "25.1"
+  "This is an internal thingatpt function and should not be used.")
+
+(put 'sexp 'beginning-op 'thing-at-point--beginning-of-sexp)
 
 ;;  Lists
 
@@ -355,7 +361,7 @@ the bounds of a possible ill-formed URI (one lacking a 
scheme)."
       (if found
          (cons (match-beginning 1) (match-end 1))))))
 
-(defun thing-at-point--bounds-of-well-formed-url (beg end _pt)
+(defun thing-at-point--bounds-of-well-formed-url (beg end pt)
   (save-excursion
     (goto-char beg)
     (let (url-beg paren-end regexp)
@@ -382,7 +388,11 @@ the bounds of a possible ill-formed URI (one lacking a 
scheme)."
                                 (scan-lists (1- url-beg) 1 0))))
             (not (blink-matching-check-mismatch (1- url-beg) paren-end))
             (setq end (1- paren-end)))
-       (cons url-beg end)))))
+       ;; Ensure PT is actually within BOUNDARY. Check the following
+       ;; example with point on the beginning of the line:
+       ;;
+       ;; 3,1406710489,http://gnu.org,0,"0";
+       (and (<= url-beg pt end) (cons url-beg end))))))
 
 (put 'url 'thing-at-point 'thing-at-point-url-at-point)
 
@@ -550,7 +560,7 @@ with angle brackets.")
   "Return the sentence at point.  See `thing-at-point'."
   (thing-at-point 'sentence))
 
-(defun read-from-whole-string (str)
+(defun thing-at-point--read-from-whole-string (str)
   "Read a Lisp expression from STR.
 Signal an error if the entire string was not used."
   (let* ((read-data (read-from-string str))
@@ -564,9 +574,14 @@ Signal an error if the entire string was not used."
        (error "Can't read whole string")
       (car read-data))))
 
+(define-obsolete-function-alias 'read-from-whole-string
+  'thing-at-point--read-from-whole-string "25.1"
+  "This is an internal thingatpt function and should not be used.")
+
 (defun form-at-point (&optional thing pred)
   (let ((sexp (ignore-errors
-               (read-from-whole-string (thing-at-point (or thing 'sexp))))))
+               (thing-at-point--read-from-whole-string
+                (thing-at-point (or thing 'sexp))))))
     (if (or (not pred) (funcall pred sexp)) sexp)))
 
 ;;;###autoload
diff --git a/lisp/time-stamp.el b/lisp/time-stamp.el
index 24e5ef4..1e0fe99 100644
--- a/lisp/time-stamp.el
+++ b/lisp/time-stamp.el
@@ -420,16 +420,8 @@ format the string."
   (or ts-format
       (setq ts-format time-stamp-format))
   (if (stringp ts-format)
-      (if (stringp time-stamp-time-zone)
-         (let ((ts-real-time-zone (getenv "TZ")))
-           (unwind-protect
-               (progn
-                 (setenv "TZ" time-stamp-time-zone)
-                 (format-time-string
-                  (time-stamp-string-preprocess ts-format)))
-             (setenv "TZ" ts-real-time-zone)))
-       (format-time-string
-        (time-stamp-string-preprocess ts-format)))
+      (format-time-string (time-stamp-string-preprocess ts-format)
+                          nil time-stamp-time-zone)
     ;; handle version 1 compatibility
     (cond ((or (eq time-stamp-old-format-warn 'error)
               (and (eq time-stamp-old-format-warn 'ask)
diff --git a/lisp/time.el b/lisp/time.el
index 7c1e95e..d35f5b9 100644
--- a/lisp/time.el
+++ b/lisp/time.el
@@ -160,15 +160,8 @@ LABEL is a string to display as the label of that 
TIMEZONE's time."
 (defcustom display-time-world-list
   ;; Determine if zoneinfo style timezones are supported by testing that
   ;; America/New York and Europe/London return different timezones.
-  (let ((old-tz (getenv "TZ"))
-       gmt nyt)
-    (unwind-protect
-       (progn
-         (setenv "TZ" "America/New_York")
-         (setq nyt (format-time-string "%z"))
-         (setenv "TZ" "Europe/London")
-         (setq gmt (format-time-string "%z")))
-      (setenv "TZ" old-tz))
+  (let ((nyt (format-time-string "%z" nil "America/New_York"))
+        (gmt (format-time-string "%z" nil "Europe/London")))
     (if (string-equal nyt gmt)
         legacy-style-world-list
       zoneinfo-style-world-list))
@@ -176,7 +169,7 @@ LABEL is a string to display as the label of that 
TIMEZONE's time."
 Each element has the form (TIMEZONE LABEL).
 TIMEZONE should be in a format supported by your system.  See the
 documentation of `zoneinfo-style-world-list' and
-\`legacy-style-world-list' for two widely used formats.  LABEL is
+`legacy-style-world-list' for two widely used formats.  LABEL is
 a string to display as the label of that TIMEZONE's time."
   :group 'display-time
   :type '(repeat (list string string))
@@ -523,21 +516,19 @@ See `display-time-world'."
   "Replace current buffer text with times in various zones, based on ALIST."
   (let ((inhibit-read-only t)
        (buffer-undo-list t)
-       (old-tz (getenv "TZ"))
+       (now (current-time))
        (max-width 0)
        result fmt)
     (erase-buffer)
-    (unwind-protect
-       (dolist (zone alist)
-         (let* ((label (cadr zone))
-                (width (string-width label)))
-           (setenv "TZ" (car zone))
-           (push (cons label
-                       (format-time-string display-time-world-time-format))
-                 result)
-           (when (> width max-width)
-             (setq max-width width))))
-      (setenv "TZ" old-tz))
+    (dolist (zone alist)
+      (let* ((label (cadr zone))
+            (width (string-width label)))
+       (push (cons label
+                   (format-time-string display-time-world-time-format
+                                       now (car zone)))
+             result)
+       (when (> width max-width)
+         (setq max-width width))))
     (setq fmt (concat "%-" (int-to-string max-width) "s %s\n"))
     (dolist (timedata (nreverse result))
       (insert (format fmt (car timedata) (cdr timedata))))
diff --git a/lisp/tmm.el b/lisp/tmm.el
index 2ddeeee..5d56cff 100644
--- a/lisp/tmm.el
+++ b/lisp/tmm.el
@@ -54,7 +54,7 @@ we make that menu bar item (the one at that position) the 
default choice.
 
 Note that \\[menu-bar-open] by default drops down TTY menus; if you want it
 to invoke `tmm-menubar' instead, customize the variable
-\`tty-menu-open-use-tmm' to a non-nil value."
+`tty-menu-open-use-tmm' to a non-nil value."
   (interactive)
   (run-hooks 'menu-bar-update-hook)
   ;; Obey menu-bar-final-items; put those items last.
diff --git a/lisp/vc/add-log.el b/lisp/vc/add-log.el
index eb7e5bf..c90413c 100644
--- a/lisp/vc/add-log.el
+++ b/lisp/vc/add-log.el
@@ -581,8 +581,8 @@ If t, use universal time.")
 (put 'add-log-time-zone-rule 'safe-local-variable
      (lambda (x) (or (booleanp x) (stringp x))))
 
-(defun add-log-iso8601-time-zone (&optional time)
-  (let* ((utc-offset (or (car (current-time-zone time)) 0))
+(defun add-log-iso8601-time-zone (&optional time zone)
+  (let* ((utc-offset (or (car (current-time-zone time zone)) 0))
         (sign (if (< utc-offset 0) ?- ?+))
         (sec (abs utc-offset))
         (ss (% sec 60))
@@ -596,12 +596,11 @@ If t, use universal time.")
 
 (defvar add-log-iso8601-with-time-zone nil)
 
-(defun add-log-iso8601-time-string ()
-  (let ((time (format-time-string "%Y-%m-%d"
-                                  nil (eq t add-log-time-zone-rule))))
+(defun add-log-iso8601-time-string (&optional time zone)
+  (let ((date (format-time-string "%Y-%m-%d" time zone)))
     (if add-log-iso8601-with-time-zone
-        (concat time " " (add-log-iso8601-time-zone))
-      time)))
+        (concat date " " (add-log-iso8601-time-zone time zone))
+      date)))
 
 (defun change-log-name ()
   "Return (system-dependent) default name for a change log file."
@@ -848,14 +847,8 @@ non-nil, otherwise in local time."
       (let ((new-entries
              (mapcar (lambda (addr)
                        (concat
-                        (if (stringp add-log-time-zone-rule)
-                            (let ((tz (getenv "TZ")))
-                              (unwind-protect
-                                  (progn
-                                    (setenv "TZ" add-log-time-zone-rule)
-                                    (funcall add-log-time-format))
-                                (setenv "TZ" tz)))
-                          (funcall add-log-time-format))
+                        (funcall add-log-time-format
+                                 nil add-log-time-zone-rule)
                         "  " full-name
                         "  <" addr ">"))
                      (if (consp mailing-address)
diff --git a/lisp/vc/compare-w.el b/lisp/vc/compare-w.el
index 5b92369..cec1644 100644
--- a/lisp/vc/compare-w.el
+++ b/lisp/vc/compare-w.el
@@ -150,7 +150,8 @@ out all highlighting later with the command 
`compare-windows-dehighlight'."
 (defvar compare-windows-overlays2 nil)
 (defvar compare-windows-sync-point nil)
 
-(defcustom compare-windows-get-window-function 
'compare-windows-get-recent-window
+(defcustom compare-windows-get-window-function
+  'compare-windows-get-recent-window
   "Function that provides the window to compare with."
   :type '(choice
          (function-item :tag "Most recently used window"
@@ -159,7 +160,7 @@ out all highlighting later with the command 
`compare-windows-dehighlight'."
                         compare-windows-get-next-window)
          (function :tag "Your function"))
   :group 'compare-windows
-  :version "25.0")
+  :version "25.1")
 
 (defun compare-windows-get-recent-window ()
   "Return the most recently used window.
diff --git a/lisp/vc/ediff-help.el b/lisp/vc/ediff-help.el
index 67acc66..3d46869 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 "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 "^[`‘]=['’]"))
+      (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/log-edit.el b/lisp/vc/log-edit.el
index d595497..acbd9c0 100644
--- a/lisp/vc/log-edit.el
+++ b/lisp/vc/log-edit.el
@@ -872,7 +872,8 @@ Return non-nil if it is."
                  (and (boundp 'user-mail-address) user-mail-address)))
        (time (or (and (boundp 'add-log-time-format)
                       (functionp add-log-time-format)
-                      (funcall add-log-time-format))
+                      (funcall add-log-time-format
+                               nil add-log-time-zone-rule))
                  (format-time-string "%Y-%m-%d"))))
     (if (null log-edit-changelog-use-first)
         (looking-at (regexp-quote (format "%s  %s  <%s>" time name mail)))
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index e3cd5d4..9522328 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -308,12 +308,12 @@ matching the resulting Git log output, and KEYWORDS is a 
list of
                  (pcase old-type
                    (?\100 "   (type change file -> symlink)")
                    (?\160 "   (type change subproject -> symlink)")
-                   (t "   (symlink)")))
+                   (_ "   (symlink)")))
                  (?\160  ;; Subproject.
                   (pcase old-type
                     (?\100 "   (type change file -> subproject)")
                     (?\120 "   (type change symlink -> subproject)")
-                    (t "   (subproject)")))
+                    (_ "   (subproject)")))
                   (?\110 nil)  ;; Directory (internal, not a real git state).
                  (?\000  ;; Deleted or unknown.
                   (pcase old-type
diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el
index 556174a..f634e2e 100644
--- a/lisp/vc/vc-hg.el
+++ b/lisp/vc/vc-hg.el
@@ -272,7 +272,7 @@ If LIMIT is non-nil, show no more than this many entries."
   (let ((inhibit-read-only t))
     (with-current-buffer
        buffer
-      (apply 'vc-hg-command buffer 0 files "log"
+      (apply 'vc-hg-command buffer 'async files "log"
             (nconc
              (when start-revision (list (format "-r%s:0" start-revision)))
              (when limit (list "-l" (format "%s" limit)))
diff --git a/lisp/vc/vc-mtn.el b/lisp/vc/vc-mtn.el
index 93bd1f6..685ef3b 100644
--- a/lisp/vc/vc-mtn.el
+++ b/lisp/vc/vc-mtn.el
@@ -179,15 +179,18 @@ switches."
 (defun vc-mtn-mode-line-string (file)
   "Return a string for `vc-mode-line' to put in the mode line for FILE."
   (let ((branch (vc-mtn-workfile-branch file)))
-    (dolist (rule vc-mtn-mode-line-rewrite)
-      (if (string-match (car rule) branch)
-         (setq branch (replace-match (cdr rule) t nil branch))))
-    (format "Mtn%c%s"
-           (pcase (vc-state file)
-             ((or `up-to-date `needs-update) ?-)
-             (`added ?@)
-             (_ ?:))
-           branch)))
+    (if branch
+        (progn
+          (dolist (rule vc-mtn-mode-line-rewrite)
+            (if (string-match (car rule) branch)
+                (setq branch (replace-match (cdr rule) t nil branch))))
+          (format "Mtn%c%s"
+                  (pcase (vc-state file)
+                    ((or `up-to-date `needs-update) ?-)
+                    (`added ?@)
+                    (_ ?:))
+                  branch))
+      "")))
 
 (defun vc-mtn-register (files &optional _comment)
   (vc-mtn-command nil 0 files "add"))
@@ -204,7 +207,10 @@ switches."
                                          comment))))
 
 (defun vc-mtn-find-revision (file rev buffer)
-  (vc-mtn-command buffer 0 file "cat" "-r" rev))
+  ;; null rev means latest revision
+  (if rev
+      (vc-mtn-command buffer 0 file "cat" "-r" rev)
+    (vc-mtn-command buffer 0 file "cat")))
 
 ;; (defun vc-mtn-checkout (file &optional rev)
 ;;   )
diff --git a/lisp/vc/vc-rcs.el b/lisp/vc/vc-rcs.el
index 1e19908..71ffa55 100644
--- a/lisp/vc/vc-rcs.el
+++ b/lisp/vc/vc-rcs.el
@@ -243,7 +243,9 @@ to the RCS command."
             ;; if available, use the secure registering option
             (and (vc-rcs-release-p "5.6.4") "-i")
             "-u"
-            (and comment (concat "-t-" comment))
+             ;; Some old MS-Windows ports of RCS crash when "ci -i" is
+             ;; invoked without -t; indulge them.
+            (concat "-t-" (or comment ""))
             (vc-switches 'RCS 'register))
       ;; parse output to find master file name and workfile version
       (with-current-buffer "*vc*"
diff --git a/lisp/vc/vc-svn.el b/lisp/vc/vc-svn.el
index 5ce9afa..8d6eae5 100644
--- a/lisp/vc/vc-svn.el
+++ b/lisp/vc/vc-svn.el
@@ -279,7 +279,21 @@ RESULT is a list of conses (FILE . STATE) for directory 
DIR."
   ;; Expand default-directory because svn gets confused by eg
   ;; file://~/path/to/file.  (Bug#15446).
   (vc-svn-command "*vc*" 0 "." "checkout"
-                  (concat "file://" (expand-file-name default-directory) 
"SVN")))
+                  (let ((defdir (expand-file-name default-directory))
+                        (svn-prog (executable-find "svn")))
+                    (when (and (fboundp 'w32-application-type)
+                               (eq (w32-application-type svn-prog) 'msys))
+                      (setq defdir
+                            (replace-regexp-in-string "^\\(.\\):/" "/\\1/"
+                                                      defdir)))
+                    (concat (if (and (stringp defdir)
+                                     (eq (aref defdir 0) ?/))
+                                "file://"
+                              ;; MS-Windows files d:/foo/bar need to
+                              ;; begin with 3 leading slashes.
+                              "file:///")
+                            defdir
+                            "SVN"))))
 
 (autoload 'vc-switches "vc")
 
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 1bd04e1..3b9e788 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -1423,8 +1423,12 @@ Argument BACKEND is the backend you are using."
 
 (defun vc-default-ignore-completion-table (backend file)
   "Return the list of ignored files under BACKEND."
-  (vc--read-lines
-   (vc-call-backend backend 'find-ignore-file file)))
+  (cl-delete-if
+   (lambda (str)
+     ;; Commented or empty lines.
+     (string-match-p "\\`\\(?:#\\|[ \t\r\n]*\\'\\)" str))
+   (vc--read-lines
+    (vc-call-backend backend 'find-ignore-file file))))
 
 (defun vc--read-lines (file)
   "Return a list of lines of FILE."
diff --git a/lisp/version.el b/lisp/version.el
index b8555cb..c0b975e 100644
--- a/lisp/version.el
+++ b/lisp/version.el
@@ -47,6 +47,7 @@ This variable first existed in version 19.23.")
 (defvar motif-version-string)
 (defvar gtk-version-string)
 (defvar ns-version-string)
+(defvar cairo-version-string)
 
 (defun emacs-version (&optional here)
   "Return string describing the version of Emacs that is running.
@@ -99,6 +100,30 @@ or if we could not determine the revision.")
 (define-obsolete-function-alias 'emacs-bzr-get-version
                                 'emacs-repository-get-version "24.4")
 
+(defun emacs-repository-version-git (dir)
+  "Ask git itself for the version information for directory DIR."
+  (message "Waiting for git...")
+  (with-temp-buffer
+    (let ((default-directory (file-name-as-directory dir)))
+      (and (eq 0
+              (with-demoted-errors "Error running git rev-parse: %S"
+                (call-process "git" nil '(t nil) nil "rev-parse" "HEAD")))
+          (progn (goto-char (point-min))
+                 (looking-at "[0-9a-fA-F]\\{40\\}"))
+          (match-string 0)))))
+
+(defun emacs-repository--version-git-1 (file)
+  "Internal subroutine of `emacs-repository-get-version'."
+  (when (file-readable-p file)
+    (erase-buffer)
+    (insert-file-contents file)
+    (cond ((looking-at "[0-9a-fA-F]\\{40\\}")
+          (match-string 0))
+         ((looking-at "ref: \\(.*\\)")
+          (emacs-repository--version-git-1
+           (expand-file-name (match-string 1)
+                             (file-name-directory file)))))))
+
 (defun emacs-repository-get-version (&optional dir external)
   "Try to return as a string the repository revision of the Emacs sources.
 The format of the returned string is dependent on the VCS in use.
@@ -107,21 +132,25 @@ control, or if we could not determine the revision.  Note 
that
 this reports on the current state of the sources, which may not
 correspond to the running Emacs.
 
-Optional argument DIR is a directory to use instead of
-`source-directory'.  Optional argument EXTERNAL is ignored and is
-retained for compatibility."
+Optional argument DIR is a directory to use instead of `source-directory'.
+Optional argument EXTERNAL non-nil means to just ask the VCS itself,
+if the sources appear to be under version control.  Otherwise only ask
+the VCS if we cannot find any information ourselves."
   (or dir (setq dir source-directory))
-  (cond ((file-directory-p (expand-file-name ".git" dir))
-        (message "Waiting for git...")
-        (with-temp-buffer
-          (let ((default-directory (file-name-as-directory dir)))
-            (and (eq 0
-                     (condition-case nil
-                         (call-process "git" nil '(t nil) nil "rev-parse"
-                                       "HEAD")
-                       (error nil)))
-                 (not (zerop (buffer-size)))
-                 (replace-regexp-in-string "\n" "" (buffer-string))))))))
+  (when (file-directory-p (expand-file-name ".git" dir))
+    (if external
+       (emacs-repository-version-git dir)
+      (or (let ((files '("HEAD" "refs/heads/master"))
+               file rev)
+           (with-temp-buffer
+             (while (and (not rev)
+                         (setq file (car files)))
+               (setq file (expand-file-name (format ".git/%s" file) dir)
+                     files (cdr files)
+                     rev (emacs-repository--version-git-1 file))))
+           rev)
+         ;; AFAICS this doesn't work during dumping (bug#20799).
+         (emacs-repository-version-git dir)))))
 
 ;; We put version info into the executable in the form that `ident' uses.
 (purecopy (concat "\n$Id: " (subst-char-in-string ?\n ?\s (emacs-version))
diff --git a/lisp/whitespace.el b/lisp/whitespace.el
index fad3e2f..a1a6c3c 100644
--- a/lisp/whitespace.el
+++ b/lisp/whitespace.el
@@ -884,6 +884,7 @@ Used when `whitespace-style' includes `lines' or 
`lines-tail'."
   :type '(choice :tag "Line Length Limit"
                 (integer :tag "Line Length")
                 (const :tag "Use fill-column" nil))
+  :safe  'integerp
   :group 'whitespace)
 
 
diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el
index 295e2aa..f7d8964 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/lisp/window.el b/lisp/window.el
index fad9b2f..238e53c 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -3874,12 +3874,10 @@ before was current this also makes BUFFER the current 
buffer."
 (defcustom switch-to-visible-buffer t
   "If non-nil, allow switching to an already visible buffer.
 If this variable is non-nil, `switch-to-prev-buffer' and
-`switch-to-next-buffer' may switch to an already visible buffer
-provided the buffer was shown before in the window specified as
-argument to those functions.  If this variable is nil,
-`switch-to-prev-buffer' and `switch-to-next-buffer' always try to
-avoid switching to a buffer that is already visible in another
-window on the same frame."
+`switch-to-next-buffer' may switch to an already visible buffer.
+If this variable is nil, `switch-to-prev-buffer' and
+`switch-to-next-buffer' always try to avoid switching to a buffer
+that is already visible in another window on the same frame."
   :type 'boolean
   :version "24.1"
   :group 'windows)
@@ -3950,7 +3948,8 @@ to it."
                    (or (null pred) (funcall pred buffer))
                   (not (eq (aref (buffer-name buffer) 0) ?\s))
                   (or bury-or-kill (not (memq buffer next-buffers))))
-         (if (get-buffer-window buffer frame)
+         (if (and (not switch-to-visible-buffer)
+                  (get-buffer-window buffer frame))
              ;; Try to avoid showing a buffer visible in some other window.
              (unless visible
                (setq visible buffer))
@@ -4052,7 +4051,8 @@ found."
                    (or (null pred) (funcall pred buffer))
                   (not (eq (aref (buffer-name buffer) 0) ?\s))
                   (not (assq buffer (window-prev-buffers window))))
-         (if (get-buffer-window buffer frame)
+         (if (and (not switch-to-visible-buffer)
+                  (get-buffer-window buffer frame))
              ;; Try to avoid showing a buffer visible in some other window.
              (setq visible buffer)
            (setq new-buffer buffer)
@@ -4358,11 +4358,18 @@ nil means to not handle the buffer in a particular way. 
 This
           (eq (nth 3 quit-restore) buffer))
       ;; Show another buffer stored in quit-restore parameter.
       (when (and (integerp (nth 3 quad))
-                (/= (nth 3 quad) (window-total-height window)))
+                (if (window-combined-p window)
+                     (/= (nth 3 quad) (window-total-height window))
+                   (/= (nth 3 quad) (window-total-width window))))
        ;; Try to resize WINDOW to its old height but don't signal an
        ;; error.
        (condition-case nil
-           (window-resize window (- (nth 3 quad) (window-total-height window)))
+           (window-resize
+             window
+             (- (nth 3 quad) (if (window-combined-p window)
+                                 (window-total-height window)
+                               (window-total-width window)))
+             (window-combined-p window t))
          (error nil)))
       (set-window-dedicated-p window nil)
       ;; Restore WINDOW's previous buffer, start and point position.
@@ -5375,6 +5382,8 @@ windows can get as small as `window-safe-min-height' and
                        root))))
       (delete-other-windows-internal window root)))
 
+  (set-window-dedicated-p window nil)
+
   (let* ((frame (window-frame window))
         (head (car state))
         ;; We check here (1) whether the total sizes of root window of
@@ -5498,7 +5507,9 @@ element is BUFFER."
                     ;; Preserve window-point-insertion-type (Bug#12588).
                     (copy-marker
                      (window-point window) window-point-insertion-type)
-                    (window-total-height window))
+                    (if (window-combined-p window)
+                         (window-total-height window)
+                       (window-total-width window)))
               (selected-window) buffer)))))
    ((eq type 'window)
     ;; WINDOW has been created on an existing frame.
@@ -6079,33 +6090,43 @@ represents a live window, nil otherwise."
                        ))
        frame))))
 
-(defcustom even-window-heights t
-  "If non-nil `display-buffer' will try to even window heights.
+(defcustom even-window-sizes t
+  "If non-nil `display-buffer' will try to even window sizes.
 Otherwise `display-buffer' will leave the window configuration
-alone.  Heights are evened only when `display-buffer' chooses a
-window that appears above or below the selected window."
-  :type 'boolean
+alone.  Special values are `height-only' to even heights only and
+`width-only' to even widths only.  Any other value means to even
+any of them."
+  :type '(choice
+         (const :tag "Never" nil)
+         (const :tag "Side-by-side windows only" width-only)
+         (const :tag "Windows above or below only" height-only)
+         (const :tag "Always" t))
+  :version "25.1"
   :group 'windows)
-
-(defun window--even-window-heights (window)
-  "Even heights of WINDOW and selected window.
-Do this only if these windows are vertically adjacent to each
-other, `even-window-heights' is non-nil, and the selected window
-is higher than WINDOW."
-  (when (and even-window-heights
-            ;; Even iff WINDOW forms a vertical combination with the
-            ;; selected window, and WINDOW's height exceeds that of the
-            ;; selected window, see also bug#11880.
-            (window-combined-p window)
-            (= (window-child-count (window-parent window)) 2)
-            (eq (window-parent) (window-parent window))
-            (> (window-total-height) (window-total-height window)))
-    ;; Don't throw an error if we can't even window heights for
-    ;; whatever reason.
-    (condition-case nil
-       (enlarge-window
-        (/ (- (window-total-height window) (window-total-height)) 2))
-      (error nil))))
+(defvaralias 'even-window-heights 'even-window-sizes)
+
+(defun window--even-window-sizes (window)
+  "Even sizes of WINDOW and selected window.
+Even only if these windows are the only children of their parent,
+`even-window-sizes' has the appropriate value and the selected
+window is larger than WINDOW."
+  (when (and (= (window-child-count (window-parent window)) 2)
+             (eq (window-parent) (window-parent window)))
+    (cond
+     ((and (not (memq even-window-sizes '(nil height-only)))
+           (window-combined-p window t)
+           (> (window-total-width) (window-total-width window)))
+      (condition-case nil
+          (enlarge-window
+           (/ (- (window-total-width window) (window-total-width)) 2) t)
+        (error nil)))
+     ((and (not (memq even-window-sizes '(nil width-only)))
+           (window-combined-p window)
+           (> (window-total-height) (window-total-height window)))
+      (condition-case nil
+          (enlarge-window
+           (/ (- (window-total-height window) (window-total-height)) 2))
+        (error nil))))))
 
 (defun window--display-buffer (buffer window type &optional alist dedicated)
   "Display BUFFER in WINDOW.
@@ -6467,6 +6488,37 @@ its documentation for additional customization 
information."
 
 ;;; `display-buffer' action functions:
 
+(defun display-buffer-use-some-frame (buffer alist)
+  "Display BUFFER in an existing frame that meets a predicate
+(by default any frame other than the current frame).  If
+successful, return the window used; otherwise return nil.
+
+If ALIST has a non-nil `inhibit-switch-frame' entry, avoid
+raising the frame.
+
+If ALIST has a non-nil `frame-predicate' entry, its value is a
+function taking one argument (a frame), returning non-nil if the
+frame is a candidate; this function replaces the default
+predicate."
+  (let* ((predicate (or (cdr (assoc 'frame-predicate alist))
+                        (lambda (frame)
+                          (and
+                           (not (eq frame (selected-frame)))
+                           (not (window-dedicated-p
+                                 (or
+                                  (get-lru-window frame)
+                                  (frame-first-window frame)))))
+                          )))
+         (frame (car (filtered-frame-list predicate)))
+         (window (and frame (get-lru-window frame))))
+    (when window
+      (prog1
+          (window--display-buffer
+           buffer window 'frame alist display-buffer-mark-dedicated)
+        (unless (cdr (assq 'inhibit-switch-frame alist))
+          (window--maybe-raise-frame frame))))
+    ))
+
 (defun display-buffer-same-window (buffer alist)
   "Display BUFFER in the selected window.
 This fails if ALIST has a non-nil `inhibit-same-window' entry, or
@@ -6765,7 +6817,7 @@ that frame."
 
       (prog1
          (window--display-buffer buffer window 'reuse alist)
-       (window--even-window-heights window)
+       (window--even-window-sizes window)
        (unless (cdr (assq 'inhibit-switch-frame alist))
          (window--maybe-raise-frame (window-frame window)))))))
 
diff --git a/lwlib/Makefile.in b/lwlib/Makefile.in
index cbc747c..bfeef16 100644
--- a/lwlib/Makefile.in
+++ b/lwlib/Makefile.in
@@ -31,7 +31,8 @@ address@hidden@
 address@hidden@
 address@hidden@
 PROFILING_CFLAGS = @PROFILING_CFLAGS@
-WARN_CFLAGS = `echo @WARN_CFLAGS@ | sed 's/ -Wwrite-strings//'`
+WARN_CFLAGS = @WARN_CFLAGS@
+WARN_CFLAGS := $(filter-out -Wwrite-strings,${WARN_CFLAGS})
 WERROR_CFLAGS = @WERROR_CFLAGS@
 CAIRO_CFLAGS= @CAIRO_CFLAGS@
 
diff --git a/m4/acl.m4 b/m4/acl.m4
index 5da6a43..75fc9ce 100644
--- a/m4/acl.m4
+++ b/m4/acl.m4
@@ -1,5 +1,5 @@
 # acl.m4 - check for access control list (ACL) primitives
-# serial 20
+# serial 21
 
 # Copyright (C) 2002, 2004-2015 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
@@ -181,12 +181,26 @@ AC_DEFUN([gl_FILE_HAS_ACL],
 [
   AC_REQUIRE([gl_FUNC_ACL_ARG])
   if test "$enable_acl" != no; then
-    AC_CHECK_HEADERS([linux/xattr.h])
-    AC_CHECK_HEADERS([sys/xattr.h],
-      [AC_CHECK_FUNCS([getxattr])])
+    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])])
   fi
-  if test "$ac_cv_header_sys_xattr_h,$ac_cv_func_getxattr" = yes,yes; then
+  if test "$gl_cv_getxattr_with_posix_acls" = 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-common.m4 b/m4/gnulib-common.m4
index b301abe..40e82f6 100644
--- a/m4/gnulib-common.m4
+++ b/m4/gnulib-common.m4
@@ -278,12 +278,12 @@ Amsterdam
       dnl but prefer ${host}-ar over ar (useful for cross-compiling).
       AC_CHECK_TOOL([AR], [ar], [ar])
       if test -z "$ARFLAGS"; then
-        ARFLAGS='cru'
+        ARFLAGS='cr'
       fi
     fi
   else
     if test -z "$ARFLAGS"; then
-      ARFLAGS='cru'
+      ARFLAGS='cr'
     fi
   fi
   AC_SUBST([AR])
diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4
index 0425d02..c48d2e5 100644
--- a/m4/gnulib-comp.m4
+++ b/m4/gnulib-comp.m4
@@ -98,6 +98,7 @@ AC_DEFUN([gl_EARLY],
   # Code from module memrchr:
   # Code from module mkostemp:
   # Code from module mktime:
+  # Code from module mktime-internal:
   # Code from module multiarch:
   # Code from module nocrash:
   # Code from module openat-h:
@@ -141,13 +142,14 @@ AC_DEFUN([gl_EARLY],
   # Code from module tempname:
   # Code from module time:
   # Code from module time_r:
+  # Code from module time_rz:
+  # Code from module timegm:
   # Code from module timer-time:
   # Code from module timespec:
   # Code from module timespec-add:
   # Code from module timespec-sub:
   # Code from module u64:
   # Code from module unistd:
-  # Code from module unsetenv:
   # Code from module update-copyright:
   # Code from module utimens:
   # Code from module vararrays:
@@ -385,15 +387,20 @@ AC_DEFUN([gl_INIT],
     gl_PREREQ_TIME_R
   fi
   gl_TIME_MODULE_INDICATOR([time_r])
+  gl_TIME_RZ
+  if test "$HAVE_TIMEZONE_T" = 0; then
+    AC_LIBOBJ([time_rz])
+  fi
+  gl_TIME_MODULE_INDICATOR([time_rz])
+  gl_FUNC_TIMEGM
+  if test $HAVE_TIMEGM = 0 || test $REPLACE_TIMEGM = 1; then
+    AC_LIBOBJ([timegm])
+    gl_PREREQ_TIMEGM
+  fi
+  gl_TIME_MODULE_INDICATOR([timegm])
   gl_TIMER_TIME
   gl_TIMESPEC
   gl_UNISTD_H
-  gl_FUNC_UNSETENV
-  if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
-    AC_LIBOBJ([unsetenv])
-    gl_PREREQ_UNSETENV
-  fi
-  gl_STDLIB_MODULE_INDICATOR([unsetenv])
   gl_UTIMENS
   AC_C_VARARRAYS
   gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b=false
@@ -404,6 +411,7 @@ AC_DEFUN([gl_INIT],
   gl_gnulib_enabled_getgroups=false
   gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false
   gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1=false
+  gl_gnulib_enabled_5264294aa0a5557541b53c8c741f7f31=false
   gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7=false
   gl_gnulib_enabled_pathmax=false
   gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c=false
@@ -506,6 +514,17 @@ AC_DEFUN([gl_INIT],
       fi
     fi
   }
+  func_gl_gnulib_m4code_5264294aa0a5557541b53c8c741f7f31 ()
+  {
+    if ! $gl_gnulib_enabled_5264294aa0a5557541b53c8c741f7f31; then
+      gl_FUNC_MKTIME_INTERNAL
+      if test $REPLACE_MKTIME = 1; then
+        AC_LIBOBJ([mktime])
+        gl_PREREQ_MKTIME
+      fi
+      gl_gnulib_enabled_5264294aa0a5557541b53c8c741f7f31=true
+    fi
+  }
   func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7 ()
   {
     if ! $gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7; then
@@ -653,6 +672,9 @@ AC_DEFUN([gl_INIT],
   if { test $HAVE_DECL_STRTOUMAX = 0 || test $REPLACE_STRTOUMAX = 1; } && test 
$ac_cv_type_unsigned_long_long_int = yes; then
     func_gl_gnulib_m4code_strtoull
   fi
+  if test $HAVE_TIMEGM = 0 || test $REPLACE_TIMEGM = 1; then
+    func_gl_gnulib_m4code_5264294aa0a5557541b53c8c741f7f31
+  fi
   m4_pattern_allow([^gl_GNULIB_ENABLED_])
   AM_CONDITIONAL([gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b], 
[$gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b])
   AM_CONDITIONAL([gl_GNULIB_ENABLED_dirfd], [$gl_gnulib_enabled_dirfd])
@@ -662,6 +684,7 @@ AC_DEFUN([gl_INIT],
   AM_CONDITIONAL([gl_GNULIB_ENABLED_getgroups], [$gl_gnulib_enabled_getgroups])
   AM_CONDITIONAL([gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36], 
[$gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36])
   AM_CONDITIONAL([gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1], 
[$gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1])
+  AM_CONDITIONAL([gl_GNULIB_ENABLED_5264294aa0a5557541b53c8c741f7f31], 
[$gl_gnulib_enabled_5264294aa0a5557541b53c8c741f7f31])
   AM_CONDITIONAL([gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7], 
[$gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7])
   AM_CONDITIONAL([gl_GNULIB_ENABLED_pathmax], [$gl_gnulib_enabled_pathmax])
   AM_CONDITIONAL([gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c], 
[$gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c])
@@ -936,8 +959,11 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/sys_types.in.h
   lib/tempname.c
   lib/tempname.h
+  lib/time-internal.h
   lib/time.in.h
   lib/time_r.c
+  lib/time_rz.c
+  lib/timegm.c
   lib/timespec-add.c
   lib/timespec-sub.c
   lib/timespec.c
@@ -946,7 +972,6 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/u64.h
   lib/unistd.c
   lib/unistd.in.h
-  lib/unsetenv.c
   lib/utimens.c
   lib/utimens.h
   lib/verify.h
@@ -1011,7 +1036,6 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/readlink.m4
   m4/readlinkat.m4
   m4/secure_getenv.m4
-  m4/setenv.m4
   m4/sha1.m4
   m4/sha256.m4
   m4/sha512.m4
@@ -1043,6 +1067,8 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/tempname.m4
   m4/time_h.m4
   m4/time_r.m4
+  m4/time_rz.m4
+  m4/timegm.m4
   m4/timer_time.m4
   m4/timespec.m4
   m4/tm_gmtoff.m4
diff --git a/m4/pthread_sigmask.m4 b/m4/pthread_sigmask.m4
index 5c17dfc..2598856 100644
--- a/m4/pthread_sigmask.m4
+++ b/m4/pthread_sigmask.m4
@@ -1,4 +1,4 @@
-# pthread_sigmask.m4 serial 15
+# pthread_sigmask.m4 serial 16
 dnl Copyright (C) 2011-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,
@@ -40,6 +40,30 @@ AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK],
              LIBS="$gl_save_LIBS"
             ])
           if test $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD = yes; then
+            AC_CACHE_CHECK([whether pthread_sigmask is only a macro],
+              [gl_cv_func_pthread_sigmask_is_macro],
+              [gl_save_LIBS="$LIBS"
+               LIBS="$LIBS $LIBMULTITHREAD"
+               AC_LINK_IFELSE(
+                 [AC_LANG_PROGRAM(
+                    [[#include <pthread.h>
+                      #include <signal.h>
+                      #undef pthread_sigmask
+                    ]],
+                    [[return pthread_sigmask (0, (sigset_t *) 0, (sigset_t *) 
0);]])
+                 ],
+                 [gl_cv_func_pthread_sigmask_is_macro=no],
+                 [gl_cv_func_pthread_sigmask_is_macro=yes])
+               LIBS="$gl_save_LIBS"
+              ])
+            if test $gl_cv_func_pthread_sigmask_is_macro = yes; then
+              dnl On MinGW pthread_sigmask is just a macro which always 
returns 0.
+              dnl It does not exist as a real function, which is required by 
POSIX.
+              REPLACE_PTHREAD_SIGMASK=1
+              gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=no
+            fi
+          fi
+          if test $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD = yes; then
             dnl pthread_sigmask is available with -pthread or -lpthread.
             LIB_PTHREAD_SIGMASK="$LIBMULTITHREAD"
           else
diff --git a/m4/readlinkat.m4 b/m4/readlinkat.m4
index d0f5e69..3477602 100644
--- a/m4/readlinkat.m4
+++ b/m4/readlinkat.m4
@@ -1,4 +1,4 @@
-# serial 4
+# serial 5
 # See if we need to provide readlinkat replacement.
 
 dnl Copyright (C) 2009-2015 Free Software Foundation, Inc.
@@ -13,6 +13,7 @@ AC_DEFUN([gl_FUNC_READLINKAT],
   AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
   AC_CHECK_FUNCS_ONCE([readlinkat])
+  AC_REQUIRE([gl_FUNC_READLINK])
   if test $ac_cv_func_readlinkat = no; then
     HAVE_READLINKAT=0
   else
@@ -25,8 +26,17 @@ AC_DEFUN([gl_FUNC_READLINKAT],
              ssize_t readlinkat (int, char const *, char *, size_t);]])],
          [gl_cv_decl_readlinkat_works=yes],
          [gl_cv_decl_readlinkat_works=no])])
-    if test "$gl_cv_decl_readlink_works" != yes; then
-      REPLACE_READLINKAT=1
-    fi
+    # Assume readinkat has the same trailing slash bug as readlink,
+    # as is the case on Mac Os X 10.10
+    case "$gl_cv_func_readlink_works" in
+      *yes)
+        if test "$gl_cv_decl_readlinkat_works" != yes; then
+          REPLACE_READLINKAT=1
+        fi
+        ;;
+      *)
+        REPLACE_READLINKAT=1
+        ;;
+    esac
   fi
 ])
diff --git a/m4/sys_time_h.m4 b/m4/sys_time_h.m4
index 50133b9..28c8b1a 100644
--- a/m4/sys_time_h.m4
+++ b/m4/sys_time_h.m4
@@ -105,6 +105,7 @@ AC_DEFUN([gl_HEADER_SYS_TIME_H_DEFAULTS],
   HAVE_GETTIMEOFDAY=1;       AC_SUBST([HAVE_GETTIMEOFDAY])
   HAVE_STRUCT_TIMEVAL=1;     AC_SUBST([HAVE_STRUCT_TIMEVAL])
   HAVE_SYS_TIME_H=1;         AC_SUBST([HAVE_SYS_TIME_H])
+  HAVE_TIMEZONE_T=0;         AC_SUBST([HAVE_TIMEZONE_T])
   REPLACE_GETTIMEOFDAY=0;    AC_SUBST([REPLACE_GETTIMEOFDAY])
   REPLACE_STRUCT_TIMEVAL=0;  AC_SUBST([REPLACE_STRUCT_TIMEVAL])
 ])
diff --git a/m4/time_h.m4 b/m4/time_h.m4
index d9c41a4..754b469 100644
--- a/m4/time_h.m4
+++ b/m4/time_h.m4
@@ -109,6 +109,7 @@ AC_DEFUN([gl_HEADER_TIME_H_DEFAULTS],
   GNULIB_STRPTIME=0;                     AC_SUBST([GNULIB_STRPTIME])
   GNULIB_TIMEGM=0;                       AC_SUBST([GNULIB_TIMEGM])
   GNULIB_TIME_R=0;                       AC_SUBST([GNULIB_TIME_R])
+  GNULIB_TIME_RZ=0;                      AC_SUBST([GNULIB_TIME_RZ])
   dnl Assume proper GNU behavior unless another module says otherwise.
   HAVE_DECL_LOCALTIME_R=1;               AC_SUBST([HAVE_DECL_LOCALTIME_R])
   HAVE_NANOSLEEP=1;                      AC_SUBST([HAVE_NANOSLEEP])
diff --git a/m4/time_rz.m4 b/m4/time_rz.m4
new file mode 100644
index 0000000..0c1f2c3
--- /dev/null
+++ b/m4/time_rz.m4
@@ -0,0 +1,21 @@
+dnl Time zone functions: tzalloc, localtime_rz, etc.
+
+dnl Copyright (C) 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Written by Paul Eggert.
+
+AC_DEFUN([gl_TIME_RZ],
+[
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+  AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS])
+  AC_REQUIRE([AC_STRUCT_TIMEZONE])
+  AC_CHECK_FUNCS_ONCE([tzset])
+
+  AC_CHECK_TYPES([timezone_t], [], [], [[#include <time.h>]])
+  if test "$ac_cv_type_timezone_t" = yes; then
+    HAVE_TIMEZONE_T=1
+  fi
+])
diff --git a/m4/timegm.m4 b/m4/timegm.m4
new file mode 100644
index 0000000..8e68b99
--- /dev/null
+++ b/m4/timegm.m4
@@ -0,0 +1,26 @@
+# timegm.m4 serial 11
+dnl Copyright (C) 2003, 2007, 2009-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,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_TIMEGM],
+[
+  AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS])
+  AC_REQUIRE([gl_FUNC_MKTIME])
+  REPLACE_TIMEGM=0
+  AC_CHECK_FUNCS_ONCE([timegm])
+  if test $ac_cv_func_timegm = yes; then
+    if test $gl_cv_func_working_mktime = no; then
+      # Assume that timegm is buggy if mktime is.
+      REPLACE_TIMEGM=1
+    fi
+  else
+    HAVE_TIMEGM=0
+  fi
+])
+
+# Prerequisites of lib/timegm.c.
+AC_DEFUN([gl_PREREQ_TIMEGM], [
+  :
+])
diff --git a/nextstep/INSTALL b/nextstep/INSTALL
index 96aaac7..8c9cd3b 100644
--- a/nextstep/INSTALL
+++ b/nextstep/INSTALL
@@ -19,6 +19,8 @@ In the top-level directory, use:
 
   ./configure --with-ns
 
+(On Mac OS X, --with-ns is enabled by default.)
+
 This will compile all the files, but emacs will not be able to be run except
 in -nw (terminal) mode.
 
diff --git a/nextstep/Makefile.in b/nextstep/Makefile.in
index 07e7285..04d87d8 100644
--- a/nextstep/Makefile.in
+++ b/nextstep/Makefile.in
@@ -33,11 +33,20 @@ top_srcdir_abs = $(shell cd @top_srcdir@; pwd -P)
 @SET_MAKE@
 MKDIR_P = @MKDIR_P@
 
+## Emacs.app.
 ns_appdir = @ns_appdir@
+## GNUstep: ns_appdir; OS X: ns_appdir/Contents/MacOS
 ns_appbindir = @ns_appbindir@
+## GNUstep/Emacs.base or Cocoa/Emacs.base.
 ns_appsrc = @ns_appsrc@
+## GNUstep: GNUstep/Emacs.base/Resources/Info-gnustep.plist
+## OS X: Cocoa/Emacs.base/Contents/Info.plist
 ns_check_file = @ns_appdir@/@ns_check_file@
 
+.PHONY: all
+
+all: ${ns_appdir} ${ns_appbindir}/Emacs
+
 ${ns_check_file} ${ns_appdir}: ${srcdir}/${ns_appsrc} ${ns_appsrc}
        rm -rf ${ns_appdir}
        ${MKDIR_P} ${ns_appdir}
@@ -48,26 +57,30 @@ ${ns_check_file} ${ns_appdir}: ${srcdir}/${ns_appsrc} 
${ns_appsrc}
            ( cd ${ns_appdir} ; umask 022; tar xf - )
        touch ${ns_appdir}
 
-${ns_appbindir}:
-       ${MKDIR_P} $@
-
-${ns_appbindir}/Emacs: ${ns_appdir} ${ns_check_file} ../src/emacs${EXEEXT} | \
-  ${ns_appbindir}
+## Don't create ns_appbindir via an order-only prerequisite, because
+## on GNUstep ns_appbindir and ns_bindir are the same, so
+## the rule for ns_appbindir would conflict with that for ns_appdir.
+${ns_appbindir}/Emacs: ${ns_appdir} ${ns_check_file} ../src/emacs${EXEEXT}
+       ${MKDIR_P} ${ns_appbindir}
        cp -f ../src/emacs${EXEEXT} $@
 
-.PHONY: all links
+.PHONY: FORCE
 
-all: ${ns_appdir} ${ns_appbindir}/Emacs
+../src/emacs${EXEEXT}: FORCE
+       ${MAKE} -C ../src $(notdir $@)
 
 # create a fake installation pointing back to the source tree
 # to run GUI Emacs in-place
-links : ../src/emacs${EXEEXT} | ${ns_appbindir}
+.PHONY: links
+
+links: ../src/emacs${EXEEXT}
        for d in $(shell cd ${srcdir}/${ns_appsrc}; find . -type d); do 
${MKDIR_P} ${ns_appdir}/$$d; done
        for f in $(shell cd ${srcdir}/${ns_appsrc}; find . -type f); do ln -s 
$(shell cd ${srcdir}; pwd -P)/${ns_appsrc}/$$f ${ns_appdir}/$$f; done
        for d in $(shell cd ${ns_appsrc}; find . -type d); do ${MKDIR_P} 
${ns_appdir}/$$d; done
        for f in $(shell cd ${ns_appsrc}; find . -type f); do ln -s $(shell cd 
${ns_appsrc}; pwd -P)/$$f ${ns_appdir}/$$f; done
        ln -s $(top_srcdir_abs)/lisp ${ns_appdir}/Contents/Resources
        ln -s $(top_srcdir_abs)/info ${ns_appdir}/Contents/Resources
+       ${MKDIR_P} ${ns_appbindir}
        ln -s $(abs_top_builddir)/src/emacs${EXEEXT} ${ns_appbindir}/Emacs
        ln -s $(abs_top_builddir)/lib-src ${ns_appbindir}/bin
        ln -s $(abs_top_builddir)/lib-src ${ns_appbindir}/libexec
diff --git a/nextstep/templates/Info.plist.in b/nextstep/templates/Info.plist.in
index 8c9dc21..09e953c 100644
--- a/nextstep/templates/Info.plist.in
+++ b/nextstep/templates/Info.plist.in
@@ -452,6 +452,8 @@ along with GNU Emacs.  If not, see 
<http://www.gnu.org/licenses/>.
                                <string>tex</string>
                                <string>ltx</string>
                                <string>ctx</string>
+                               <string>dtx</string>
+                               <string>sty</string>
                                <string>latex</string>
                                <string>texi</string>
                        </array>
@@ -465,6 +467,30 @@ along with GNU Emacs.  If not, see 
<http://www.gnu.org/licenses/>.
                <dict>
                        <key>CFBundleTypeExtensions</key>
                        <array>
+                               <string>org</string>
+                       </array>
+                       <key>CFBundleTypeIconFile</key>
+                       <string>document.icns</string>
+                       <key>CFBundleTypeName</key>
+                       <string>Org document</string>
+                       <key>CFBundleTypeRole</key>
+                       <string>Editor</string>
+               </dict>
+               <dict>
+                       <key>CFBundleTypeExtensions</key>
+                       <array>
+                               <string>json</string>
+                       </array>
+                       <key>CFBundleTypeIconFile</key>
+                       <string>document.icns</string>
+                       <key>CFBundleTypeName</key>
+                       <string>JSON document</string>
+                       <key>CFBundleTypeRole</key>
+                       <string>Editor</string>
+               </dict>
+               <dict>
+                       <key>CFBundleTypeExtensions</key>
+                       <array>
                                <string>*</string>
                        </array>
                        <key>CFBundleTypeName</key>
@@ -478,6 +504,68 @@ along with GNU Emacs.  If not, see 
<http://www.gnu.org/licenses/>.
                </dict>
        </array>
 
+       <!-- Export definitions so that OS X understands about the file types 
-->
+       <key>UTExportedTypeDeclarations</key>
+       <array>
+               <dict>
+                       <key>UTTypeConformsTo</key>
+                       <array>
+                               <string>public.source-code</string>
+                       </array>
+                       <key>UTTypeDescription</key>
+                       <string>Emacs Lisp Source File</string>
+                       <key>UTTypeIdentifier</key>
+                       <string>org.gnu.emacs-lisp</string>
+                       <key>UTTypeReferenceURL</key>
+                       
<string>https://www.gnu.org/software/emacs/manual/html_node/elisp/</string>
+                       <key>UTTypeTagSpecification</key>
+                       <dict>
+                               <key>public.filename-extension</key>
+                               <array>
+                                       <string>el</string>
+                               </array>
+                       </dict>
+               </dict>
+               <dict>
+                       <key>UTTypeConformsTo</key>
+                       <array>
+                               <string>public.content</string>
+                       </array>
+                       <key>UTTypeDescription</key>
+                       <string>Emacs Lisp Object File</string>
+                       <key>UTTypeIdentifier</key>
+                       <string>org.gnu.emacs-lisp-object</string>
+                       <key>UTTypeReferenceURL</key>
+                       
<string>https://www.gnu.org/software/emacs/manual/html_node/elisp/</string>
+                       <key>UTTypeTagSpecification</key>
+                       <dict>
+                               <key>public.filename-extension</key>
+                               <array>
+                                       <string>elc</string>
+                               </array>
+                       </dict>
+               </dict>
+               <dict>
+                       <key>UTTypeConformsTo</key>
+                       <array>
+                               <string>public.plain-text</string>
+                       </array>
+                       <key>UTTypeDescription</key>
+                       <string>Org document</string>
+                       <key>UTTypeIdentifier</key>
+                       <string>org.orgmode.org</string>
+                       <key>UTTypeReferenceURL</key>
+                       <string>http://orgmode.org</string>
+                       <key>UTTypeTagSpecification</key>
+                       <dict>
+                               <key>public.filename-extension</key>
+                               <array>
+                                       <string>org</string>
+                               </array>
+                       </dict>
+               </dict>
+       </array>
+
        <key>NSServices</key>
        <array>
                <dict>
diff --git a/nt/README b/nt/README
index a5226f6..d331e9e 100644
--- a/nt/README
+++ b/nt/README
@@ -78,13 +78,19 @@
 
 * Further information
 
-  The FAQ for the MS Windows port of Emacs is distributed with Emacs
-  (info manual "efaq-w32"), and also available at
+  The Emacs User manual describes Windows-specific issues in the
+  appendix named "Emacs and Microsoft Windows/MS-DOS".  You can read
+  it in Emacs by typing
 
-        http://www.gnu.org/software/emacs/manual/efaq-w32.html
+        C-h r g Microsoft Windows RET
 
-  There is also a mailing list for discussing issues related to this
-  port of Emacs.  For information about the list, see this Web page:
+  This appendix is also available (as part of the entire manual) at
+
+        
http://www.gnu.org/software/emacs/manual/html_mono/emacs.html#Microsoft-Windows
+
+  In addition to the manual, there is a mailing list for discussing
+  issues related to the Windows port of Emacs.  For information about
+  the list, see this Web page:
 
        http://mail.gnu.org/mailman/listinfo/help-emacs-windows
 
diff --git a/nt/README.W32 b/nt/README.W32
index 5024bdc..a26ca10 100644
--- a/nt/README.W32
+++ b/nt/README.W32
@@ -265,14 +265,19 @@ See the end of the file for license conditions.
 
 * Further information
 
-  The FAQ for the MS Windows port of Emacs is distributed with Emacs
-  (info manual "efaq-w32"), and also available at
+  The Emacs User manual describes Windows-specific issues in the
+  appendix named "Emacs and Microsoft Windows/MS-DOS".  You can read
+  it in Emacs by typing
 
-        http://www.gnu.org/software/emacs/manual/efaq-w32.html
+        C-h r g Microsoft Windows RET
 
-  In addition to the FAQ, there is a mailing list for discussing issues
-  related to the Windows port of Emacs.  For information about the
-  list, see this Web page:
+  This appendix is also available (as part of the entire manual) at
+
+        
http://www.gnu.org/software/emacs/manual/html_mono/emacs.html#Microsoft-Windows
+
+  In addition to the manual, there is a mailing list for discussing
+  issues related to the Windows port of Emacs.  For information about
+  the list, see this Web page:
 
        http://lists.gnu.org/mailman/listinfo/help-emacs-windows
 
diff --git a/nt/gnulib.mk b/nt/gnulib.mk
index 0c2b786..8a57d64 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=flexmember --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=setenv --avoid=sigprocmask --avoid=stdarg 
--avoid=stdbool --avoid=threadlib --avoid=unsetenv --makefile-name=gnu [...]
 
 
 MOSTLYCLEANFILES += core *.stackdump
@@ -487,6 +487,17 @@ EXTRA_libgnu_a_SOURCES += mktime.c
 
 ## end   gnulib module mktime
 
+## begin gnulib module mktime-internal
+
+if gl_GNULIB_ENABLED_5264294aa0a5557541b53c8c741f7f31
+
+endif
+EXTRA_DIST += mktime-internal.h mktime.c
+
+EXTRA_libgnu_a_SOURCES += mktime.c
+
+## end   gnulib module mktime-internal
+
 ## begin gnulib module openat-h
 
 if gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7
@@ -944,6 +955,54 @@ EXTRA_libgnu_a_SOURCES += symlink.c
 
 ## end   gnulib module symlink
 
+## begin gnulib module time
+
+BUILT_SOURCES += time.h
+
+# We need the following in order to create <time.h> when the system
+# doesn't have one that works with the given compiler.
+time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) 
$(WARN_ON_USE_H)
+       $(AM_V_GEN)rm -f address@hidden $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+         sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+             -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \
+             -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \
+             -e 's/@''GNULIB_MKTIME''@/$(GNULIB_MKTIME)/g' \
+             -e 's/@''GNULIB_NANOSLEEP''@/$(GNULIB_NANOSLEEP)/g' \
+             -e 's/@''GNULIB_STRPTIME''@/$(GNULIB_STRPTIME)/g' \
+             -e 's/@''GNULIB_TIMEGM''@/$(GNULIB_TIMEGM)/g' \
+             -e 's/@''GNULIB_TIME_R''@/$(GNULIB_TIME_R)/g' \
+             -e 's/@''GNULIB_TIME_RZ''@/$(GNULIB_TIME_RZ)/g' \
+             -e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \
+             -e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \
+             -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \
+             -e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \
+             -e 's|@''HAVE_TIMEZONE_T''@|$(HAVE_TIMEZONE_T)|g' \
+             -e 's|@''REPLACE_GMTIME''@|$(REPLACE_GMTIME)|g' \
+             -e 's|@''REPLACE_LOCALTIME''@|$(REPLACE_LOCALTIME)|g' \
+             -e 's|@''REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \
+             -e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \
+             -e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \
+             -e 's|@''REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \
+             -e 
's|@''PTHREAD_H_DEFINES_STRUCT_TIMESPEC''@|$(PTHREAD_H_DEFINES_STRUCT_TIMESPEC)|g'
 \
+             -e 
's|@''SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g'
 \
+             -e 
's|@''TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
+             -e 
's|@''UNISTD_H_DEFINES_STRUCT_TIMESPEC''@|$(UNISTD_H_DEFINES_STRUCT_TIMESPEC)|g'
 \
+             -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+             -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+             < $(srcdir)/time.in.h; \
+       } > address@hidden && \
+       mv address@hidden $@
+MOSTLYCLEANFILES += time.h time.h-t
+
+EXTRA_DIST += time.in.h
+
+## end   gnulib module time
+
 ## begin gnulib module time_r
 
 
@@ -953,6 +1012,24 @@ EXTRA_libgnu_a_SOURCES += time_r.c
 
 ## end   gnulib module time_r
 
+## begin gnulib module time_rz
+
+
+EXTRA_DIST += time_rz.c
+
+EXTRA_libgnu_a_SOURCES += time_rz.c
+
+## end   gnulib module time_rz
+
+## begin gnulib module timegm
+
+
+EXTRA_DIST += mktime-internal.h timegm.c
+
+EXTRA_libgnu_a_SOURCES += timegm.c
+
+## end   gnulib module timegm
+
 ## begin gnulib module timespec
 
 libgnu_a_SOURCES += timespec.c
@@ -981,15 +1058,6 @@ EXTRA_DIST += u64.h
 
 ## end   gnulib module u64
 
-## begin gnulib module unsetenv
-
-
-EXTRA_DIST += unsetenv.c
-
-EXTRA_libgnu_a_SOURCES += unsetenv.c
-
-## end   gnulib module unsetenv
-
 ## begin gnulib module update-copyright
 
 
diff --git a/nt/inc/ms-w32.h b/nt/inc/ms-w32.h
index da77290..4fb32df 100644
--- a/nt/inc/ms-w32.h
+++ b/nt/inc/ms-w32.h
@@ -306,18 +306,6 @@ int _getpid (void);
 #include <time.h>
 #define tzname    _tzname
 
-/* 'struct timespec' is used by time-related functions in lib/ and
-   elsewhere, but we don't use lib/time.h where the structure is
-   defined.  */
-/* MinGW64 defines 'struct timespec' and _TIMESPEC_DEFINED in sys/types.h.  */
-#ifndef _TIMESPEC_DEFINED
-struct timespec
-{
-  time_t       tv_sec;         /* seconds */
-  long int     tv_nsec;        /* nanoseconds */
-};
-#endif
-
 /* Required for functions in lib/time_r.c, since we don't use lib/time.h.  */
 extern struct tm *gmtime_r (time_t const * restrict, struct tm * restrict);
 extern struct tm *localtime_r (time_t const * restrict, struct tm * restrict);
diff --git a/nt/mingw-cfg.site b/nt/mingw-cfg.site
index 0be24dd..05034fe 100644
--- a/nt/mingw-cfg.site
+++ b/nt/mingw-cfg.site
@@ -35,6 +35,11 @@ ac_cv_header_getopt_h=no
 # We don't want our struct timeval replaced due to Posix conformance
 gl_cv_sys_struct_timeval_tv_sec=yes
 
+# We don't want pthread.h to be picked up just because it defines timespec
+gl_cv_sys_struct_timespec_in_pthread_h=no
+# Or at all...
+ac_cv_header_pthread_h=no
+
 # ACL functions are implemented in w32.c
 ac_cv_search_acl_get_file="none required"
 ac_cv_func_acl_get_file=yes
diff --git a/nt/runemacs.c b/nt/runemacs.c
index 3fcf405..86644b4 100644
--- a/nt/runemacs.c
+++ b/nt/runemacs.c
@@ -59,6 +59,7 @@ WinMain (HINSTANCE hSelf, HINSTANCE hPrev, LPSTR cmdline, int 
nShow)
   char *new_cmdline;
   char *p;
   char modname[MAX_PATH];
+  static const char iconic_opt[] = "--iconic ", maximized_opt[] = "--maximized 
";
 
   if (!ensure_unicows_dll ())
     goto error;
@@ -71,7 +72,13 @@ WinMain (HINSTANCE hSelf, HINSTANCE hPrev, LPSTR cmdline, 
int nShow)
     goto error;
   *p = 0;
 
-  new_cmdline = alloca (MAX_PATH + strlen (cmdline) + 3);
+  new_cmdline = alloca (MAX_PATH
+                       + strlen (cmdline)
+                       + ((nShow == SW_SHOWMINNOACTIVE
+                           || nShow == SW_SHOWMAXIMIZED)
+                          ? max (sizeof (iconic_opt), sizeof (maximized_opt))
+                          : 0)
+                       + 3);
   /* Quote executable name in case of spaces in the path. */
   *new_cmdline = '"';
   strcpy (new_cmdline + 1, modname);
@@ -140,6 +147,14 @@ WinMain (HINSTANCE hSelf, HINSTANCE hPrev, LPSTR cmdline, 
int nShow)
       while (*++cmdline == ' ');
     }
 
+  /* If the desktop shortcut properties tell to invoke runemacs
+     minimized, or if they invoked runemacs via "start /min", pass
+     '--iconic' to Emacs, as that's what users will expect.  Likewise
+     with invoking runemacs maximized: pass '--maximized' to Emacs.  */
+  if (nShow == SW_SHOWMINNOACTIVE)
+    strcat (new_cmdline, iconic_opt);
+  else if (nShow == SW_SHOWMAXIMIZED)
+    strcat (new_cmdline, maximized_opt);
   strcat (new_cmdline, cmdline);
 
   /* Set emacs_dir variable if runemacs was in "%emacs_dir%\bin".  */
diff --git a/src/.gdbinit b/src/.gdbinit
index 91beaef..3b1004c 100644
--- a/src/.gdbinit
+++ b/src/.gdbinit
@@ -72,9 +72,6 @@ end
 
 define xgetsym
   xgetptr $arg0
-  if (!USE_LSB_TAG)
-    set $ptr = ($ptr << GCTYPEBITS)
-  end
   set $ptr = ((struct Lisp_Symbol *) ((char *)lispsym + $ptr))
 end
 
diff --git a/src/ChangeLog.12 b/src/ChangeLog.12
index 78b903e..f29b175 100644
--- a/src/ChangeLog.12
+++ b/src/ChangeLog.12
@@ -5623,7 +5623,7 @@
 2012-09-17  Kenichi Handa  <address@hidden>
 
        * font.c (Ffont_shape_gstring): Fix previous change; GLYPHs may
-       not covert the last few charactes.
+       not convert the last few characters.
 
 2012-09-16  Kenichi Handa  <address@hidden>
 
diff --git a/src/ChangeLog.13 b/src/ChangeLog.13
index 328f798..196bd8e 100644
--- a/src/ChangeLog.13
+++ b/src/ChangeLog.13
@@ -10152,7 +10152,7 @@
        (FRAME_TEXT_COLS_TO_PIXEL_WIDTH, FRAME_PIXEL_WIDTH_TO_TEXT_COLS)
        (FRAME_TEXT_COLS_TO_PIXEL_WIDTH): Rewrite macros.
        (FRAME_TOTAL_COLS_ARG): Remove macro.
-       * fringe.c (draw_fringe_bitmap_1): Handle right divder.
+       * fringe.c (draw_fringe_bitmap_1): Handle right divider.
        * gtkutil.c (xg_frame_resized, xg_frame_set_char_size)
        (x_wm_set_size_hint): Handle frame pixel sizes.
        * indent.c (compute_motion, Fcompute_motion):
diff --git a/src/Makefile.in b/src/Makefile.in
index 322b16f..ad2dd05 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -499,6 +499,12 @@ charsets = ${top_srcdir}/admin/charsets/charsets.stamp
 ${charsets}: FORCE
        ${MAKE} -C ../admin/charsets all
 
+charscript = ${lispintdir}/charscript.el
+${charscript}: FORCE
+       $(MAKE) -C ../admin/unidata $(notdir $@)
+
+${lispintdir}/characters.elc: ${charscript:.el=.elc}
+
 ## The dumped Emacs is as functional and more efficient than
 ## bootstrap-emacs, so we replace the latter with the former.
 ## Strictly speaking, emacs does not depend directly on all of $lisp,
@@ -534,7 +540,7 @@ $(etc)/DOC: lisp.mk $(libsrc)/make-docfile$(EXEEXT) $(obj) 
$(lisp)
        $(AM_V_at)$(libsrc)/make-docfile -a $(etc)/DOC -d $(lispsource) \
          $(shortlisp)
 
-$(libsrc)/make-docfile$(EXEEXT):
+$(libsrc)/make-docfile$(EXEEXT): $(lib)/libgnu.a
        $(MAKE) -C $(libsrc) make-docfile$(EXEEXT)
 
 buildobj.h: Makefile
@@ -561,14 +567,14 @@ globals.h: gl-stamp; @true
 $(ALLOBJS): globals.h
 
 $(lib)/libgnu.a: $(config_h)
-       $(MAKE) -C $(lib) libgnu.a
+       $(MAKE) -C $(lib) all
 
 ## We have to create $(etc) here because init_cmdargs tests its
 ## existence when setting Vinstallation_directory (FIXME?).
 ## This goes on to affect various things, and the emacs binary fails
 ## to start if Vinstallation_directory has the wrong value.
 temacs$(EXEEXT): $(LIBXMENU) $(ALLOBJS) \
-                $(lib)/libgnu.a $(EMACSRES) ${charsets}
+                $(lib)/libgnu.a $(EMACSRES) ${charsets} ${charscript}
        $(AM_V_CCLD)$(CC) $(ALL_CFLAGS) $(TEMACS_LDFLAGS) $(LDFLAGS) \
          -o temacs $(ALLOBJS) $(lib)/libgnu.a $(W32_RES_LINK) $(LIBES)
        $(MKDIR_P) $(etc)
diff --git a/src/alloc.c b/src/alloc.c
index a956e95..9ac3ad8 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -528,12 +528,8 @@ buffer_memory_full (ptrdiff_t nbytes)
    alignment that Emacs needs for C types and for USE_LSB_TAG.  */
 #define XMALLOC_BASE_ALIGNMENT alignof (max_align_t)
 
-#if USE_LSB_TAG
-# define XMALLOC_HEADER_ALIGNMENT \
-    COMMON_MULTIPLE (GCALIGNMENT, XMALLOC_BASE_ALIGNMENT)
-#else
-# define XMALLOC_HEADER_ALIGNMENT XMALLOC_BASE_ALIGNMENT
-#endif
+#define XMALLOC_HEADER_ALIGNMENT \
+   COMMON_MULTIPLE (GCALIGNMENT, XMALLOC_BASE_ALIGNMENT)
 #define XMALLOC_OVERRUN_SIZE_SIZE                              \
    (((XMALLOC_OVERRUN_CHECK_SIZE + sizeof (size_t)             \
       + XMALLOC_HEADER_ALIGNMENT - 1)                          \
@@ -2730,7 +2726,7 @@ enum
   {
     /* Alignment of struct Lisp_Vector objects.  */
     vector_alignment = COMMON_MULTIPLE (ALIGNOF_STRUCT_LISP_VECTOR,
-                                       USE_LSB_TAG ? GCALIGNMENT : 1),
+                                       GCALIGNMENT),
 
     /* Vector size requests are a multiple of this.  */
     roundup_size = COMMON_MULTIPLE (vector_alignment, word_size)
@@ -3299,15 +3295,13 @@ usage: (make-byte-code ARGLIST BYTE-CODE CONSTANTS 
DEPTH &optional DOCSTRING INT
  ***********************************************************************/
 
 /* Like struct Lisp_Symbol, but padded so that the size is a multiple
-   of the required alignment if LSB tags are used.  */
+   of the required alignment.  */
 
 union aligned_Lisp_Symbol
 {
   struct Lisp_Symbol s;
-#if USE_LSB_TAG
   unsigned char c[(sizeof (struct Lisp_Symbol) + GCALIGNMENT - 1)
                  & -GCALIGNMENT];
-#endif
 };
 
 /* Each symbol_block is just under 1020 bytes long, since malloc
@@ -3411,15 +3405,13 @@ Its value is void, and its function definition and 
property list are nil.  */)
  ***********************************************************************/
 
 /* Like union Lisp_Misc, but padded so that its size is a multiple of
-   the required alignment when LSB tags are used.  */
+   the required alignment.  */
 
 union aligned_Lisp_Misc
 {
   union Lisp_Misc m;
-#if USE_LSB_TAG
   unsigned char c[(sizeof (union Lisp_Misc) + GCALIGNMENT - 1)
                  & -GCALIGNMENT];
-#endif
 };
 
 /* Allocation of markers and other objects that share that structure.
@@ -4628,13 +4620,13 @@ mark_maybe_object (Lisp_Object obj)
 }
 
 /* Return true if P can point to Lisp data, and false otherwise.
-   USE_LSB_TAG needs Lisp data to be aligned on multiples of GCALIGNMENT.
-   Otherwise, assume that Lisp data is aligned on even addresses.  */
+   Symbols are implemented via offsets not pointers, but the offsets
+   are also multiples of GCALIGNMENT.  */
 
 static bool
 maybe_lisp_pointer (void *p)
 {
-  return !((intptr_t) p % (USE_LSB_TAG ? GCALIGNMENT : 2));
+  return (uintptr_t) p % GCALIGNMENT == 0;
 }
 
 /* If P points to Lisp data, mark that as live if it isn't already
@@ -4722,27 +4714,6 @@ mark_maybe_pointer (void *p)
    miss objects if __alignof__ were used.  */
 #define GC_POINTER_ALIGNMENT alignof (void *)
 
-/* Define POINTERS_MIGHT_HIDE_IN_OBJECTS to 1 if marking via C pointers does
-   not suffice, which is the typical case.  A host where a Lisp_Object is
-   wider than a pointer might allocate a Lisp_Object in non-adjacent halves.
-   If USE_LSB_TAG, the bottom half is not a valid pointer, but it should
-   suffice to widen it to to a Lisp_Object and check it that way.  */
-#if USE_LSB_TAG || VAL_MAX < UINTPTR_MAX
-# if !USE_LSB_TAG && VAL_MAX < UINTPTR_MAX >> GCTYPEBITS
-  /* If tag bits straddle pointer-word boundaries, neither mark_maybe_pointer
-     nor mark_maybe_object can follow the pointers.  This should not occur on
-     any practical porting target.  */
-#  error "MSB type bits straddle pointer-word boundaries"
-# endif
-  /* Marking via C pointers does not suffice, because Lisp_Objects contain
-     pointer words that hold pointers ORed with type bits.  */
-# define POINTERS_MIGHT_HIDE_IN_OBJECTS 1
-#else
-  /* Marking via C pointers suffices, because Lisp_Objects contain pointer
-     words that hold unmodified pointers.  */
-# define POINTERS_MIGHT_HIDE_IN_OBJECTS 0
-#endif
-
 /* Mark Lisp objects referenced from the address range START+OFFSET..END
    or END+OFFSET..START.  */
 
@@ -4788,8 +4759,7 @@ mark_memory (void *start, void *end)
       {
        void *p = *(void **) ((char *) pp + i);
        mark_maybe_pointer (p);
-       if (POINTERS_MIGHT_HIDE_IN_OBJECTS)
-         mark_maybe_object (XIL ((intptr_t) p));
+       mark_maybe_object (XIL ((intptr_t) p));
       }
 }
 
@@ -5148,22 +5118,13 @@ static void *
 pure_alloc (size_t size, int type)
 {
   void *result;
-#if USE_LSB_TAG
-  size_t alignment = GCALIGNMENT;
-#else
-  size_t alignment = alignof (EMACS_INT);
-
-  /* Give Lisp_Floats an extra alignment.  */
-  if (type == Lisp_Float)
-    alignment = alignof (struct Lisp_Float);
-#endif
 
  again:
   if (type >= 0)
     {
       /* Allocate space for a Lisp object from the beginning of the free
         space with taking account of alignment.  */
-      result = ALIGN (purebeg + pure_bytes_used_lisp, alignment);
+      result = ALIGN (purebeg + pure_bytes_used_lisp, GCALIGNMENT);
       pure_bytes_used_lisp = ((char *)result - (char *)purebeg) + size;
     }
   else
@@ -7294,8 +7255,6 @@ init_alloc_once (void)
 void
 init_alloc (void)
 {
-  gcprolist = 0;
-  byte_stack_list = 0;
 #if GC_MARK_STACK
 #if !defined GC_SAVE_REGISTERS_ON_STACK && !defined GC_SETJMP_WORKS
   setjmp_tested_p = longjmps_done = 0;
diff --git a/src/atimer.c b/src/atimer.c
index 8ff9bb8..8a1a48b 100644
--- a/src/atimer.c
+++ b/src/atimer.c
@@ -492,9 +492,9 @@ debug_timer_callback (struct atimer *t)
     {
 #ifdef HAVE_SETITIMER
       struct timespec delta = timespec_sub (now, r->expected);
-      /* Too late if later than expected + 0.01s.  FIXME:
+      /* Too late if later than expected + 0.02s.  FIXME:
         this should depend from system clock resolution.  */
-      if (timespec_cmp (delta, make_timespec (0, 10000000)) > 0)
+      if (timespec_cmp (delta, make_timespec (0, 20000000)) > 0)
        r->intime = 0;
       else
 #endif /* HAVE_SETITIMER */
@@ -523,8 +523,26 @@ Return t if all self-tests are passed, nil otherwise.  */)
                            debug_timer_callback, results[i]);
     }
 
+#ifdef HAVE_TIMERFD
   /* Wait for 1s but process timers.  */
   wait_reading_process_output (1, 0, 0, false, Qnil, NULL, 0);
+#else
+  /* If timerfd is not supported, wait_reading_process_output won't
+     pay attention to timers that expired, and the callbacks won't be
+     called.  So we need to run the expired timers' callbacks by
+     hand.  */
+  /* Wait 1.2 sec for the timers to expire.  */
+  struct timespec tend =
+    timespec_add (current_timespec (), make_timespec (1, 200000000));
+
+  while (timespec_cmp (current_timespec (), tend) < 0)
+    {
+      /* Wait for 5 msec between iterations.  */
+      wait_reading_process_output (0, 5000000, 0, false, Qnil, NULL, 0);
+      if (pending_signals)
+       do_pending_atimers ();
+    }
+#endif
   /* Shut up the compiler by "using" this variable.  */
   (void) timer;
 
diff --git a/src/bidi.c b/src/bidi.c
index e5e08c6..e06430c 100644
--- a/src/bidi.c
+++ b/src/bidi.c
@@ -2452,7 +2452,7 @@ typedef struct bpa_stack_entry {
 #define MAX_BPA_STACK ((int)max (MAX_ALLOCA / sizeof (bpa_stack_entry), 1))
 
 /* UAX#9 says to match opening brackets with the matching closing
-   brackets or their canonical equivalents.  As of Unicode 7.0, there
+   brackets or their canonical equivalents.  As of Unicode 8.0, there
    are only 2 bracket characters that have canonical equivalence
    decompositions: u+2329 and u+232A.  So instead of accessing the
    table in uni-decomposition.el, we just handle these 2 characters
diff --git a/src/buffer.c b/src/buffer.c
index 27e1130..cdf6c72 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -5293,41 +5293,47 @@ init_buffer (int initialized)
   pwd = get_current_dir_name ();
 
   if (!pwd)
-    fatal ("get_current_dir_name: %s\n", strerror (errno));
-
-  /* Maybe this should really use some standard subroutine
-     whose definition is filename syntax dependent.  */
-  len = strlen (pwd);
-  if (!(IS_DIRECTORY_SEP (pwd[len - 1])))
     {
-      /* Grow buffer to add directory separator and '\0'.  */
-      pwd = realloc (pwd, len + 2);
-      if (!pwd)
-       fatal ("get_current_dir_name: %s\n", strerror (errno));
-      pwd[len] = DIRECTORY_SEP;
-      pwd[len + 1] = '\0';
-      len++;
+      fprintf (stderr, "Error getting directory: %s\n",
+               emacs_strerror (errno));
+      bset_directory (current_buffer, Qnil);
     }
-
-  /* At this moment, we still don't know how to decode the directory
-     name.  So, we keep the bytes in unibyte form so that file I/O
-     routines correctly get the original bytes.  */
-  bset_directory (current_buffer, make_unibyte_string (pwd, len));
-
-  /* Add /: to the front of the name
-     if it would otherwise be treated as magic.  */
-  temp = Ffind_file_name_handler (BVAR (current_buffer, directory), Qt);
-  if (! NILP (temp)
-      /* If the default dir is just /, TEMP is non-nil
-        because of the ange-ftp completion handler.
-        However, it is not necessary to turn / into /:/.
-        So avoid doing that.  */
-      && strcmp ("/", SSDATA (BVAR (current_buffer, directory))))
+  else
     {
-      AUTO_STRING (slash_colon, "/:");
-      bset_directory (current_buffer,
-                     concat2 (slash_colon,
-                              BVAR (current_buffer, directory)));
+      /* Maybe this should really use some standard subroutine
+         whose definition is filename syntax dependent.  */
+      len = strlen (pwd);
+      if (!(IS_DIRECTORY_SEP (pwd[len - 1])))
+        {
+          /* Grow buffer to add directory separator and '\0'.  */
+          pwd = realloc (pwd, len + 2);
+          if (!pwd)
+            fatal ("get_current_dir_name: %s\n", strerror (errno));
+          pwd[len] = DIRECTORY_SEP;
+          pwd[len + 1] = '\0';
+          len++;
+        }
+
+      /* At this moment, we still don't know how to decode the directory
+         name.  So, we keep the bytes in unibyte form so that file I/O
+         routines correctly get the original bytes.  */
+      bset_directory (current_buffer, make_unibyte_string (pwd, len));
+
+      /* Add /: to the front of the name
+         if it would otherwise be treated as magic.  */
+      temp = Ffind_file_name_handler (BVAR (current_buffer, directory), Qt);
+      if (! NILP (temp)
+          /* If the default dir is just /, TEMP is non-nil
+             because of the ange-ftp completion handler.
+             However, it is not necessary to turn / into /:/.
+             So avoid doing that.  */
+          && strcmp ("/", SSDATA (BVAR (current_buffer, directory))))
+        {
+          AUTO_STRING (slash_colon, "/:");
+          bset_directory (current_buffer,
+                          concat2 (slash_colon,
+                                   BVAR (current_buffer, directory)));
+        }
     }
 
   temp = get_minibuffer (0);
@@ -5732,7 +5738,7 @@ The values of `right-to-left' and `left-to-right' 
override that.
 Any other value is treated as nil.
 
 This variable has no effect unless the buffer's value of
-\`bidi-display-reordering' is non-nil.  */);
+`bidi-display-reordering' is non-nil.  */);
 
  DEFVAR_PER_BUFFER ("truncate-lines", &BVAR (current_buffer, truncate_lines), 
Qnil,
                     doc: /* Non-nil means do not display continuation lines.
diff --git a/src/coding.c b/src/coding.c
index 9342c38..1887560 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -8301,7 +8301,11 @@ encode_coding_object (struct coding_system *coding,
        }
     }
   else
-    code_conversion_save (0, 0);
+    {
+      code_conversion_save (0, 0);
+      coding->src_pos = from;
+      coding->src_pos_byte = from_byte;
+    }
 
   if (BUFFERP (dst_object))
     {
@@ -11053,7 +11057,7 @@ conversion.  */);
 
   DEFVAR_BOOL ("inhibit-eol-conversion", inhibit_eol_conversion,
               doc: /*
-*Non-nil means always inhibit code conversion of end-of-line format.
+Non-nil means always inhibit code conversion of end-of-line format.
 See info node `Coding Systems' and info node `Text and Binary' concerning
 such conversion.  */);
   inhibit_eol_conversion = 0;
@@ -11128,27 +11132,27 @@ encoding standard output and error streams.  */);
   /* The eol mnemonics are reset in startup.el system-dependently.  */
   DEFVAR_LISP ("eol-mnemonic-unix", eol_mnemonic_unix,
               doc: /*
-*String displayed in mode line for UNIX-like (LF) end-of-line format.  */);
+String displayed in mode line for UNIX-like (LF) end-of-line format.  */);
   eol_mnemonic_unix = build_pure_c_string (":");
 
   DEFVAR_LISP ("eol-mnemonic-dos", eol_mnemonic_dos,
               doc: /*
-*String displayed in mode line for DOS-like (CRLF) end-of-line format.  */);
+String displayed in mode line for DOS-like (CRLF) end-of-line format.  */);
   eol_mnemonic_dos = build_pure_c_string ("\\");
 
   DEFVAR_LISP ("eol-mnemonic-mac", eol_mnemonic_mac,
               doc: /*
-*String displayed in mode line for MAC-like (CR) end-of-line format.  */);
+String displayed in mode line for MAC-like (CR) end-of-line format.  */);
   eol_mnemonic_mac = build_pure_c_string ("/");
 
   DEFVAR_LISP ("eol-mnemonic-undecided", eol_mnemonic_undecided,
               doc: /*
-*String displayed in mode line when end-of-line format is not yet determined.  
*/);
+String displayed in mode line when end-of-line format is not yet determined.  
*/);
   eol_mnemonic_undecided = build_pure_c_string (":");
 
   DEFVAR_LISP ("enable-character-translation", Venable_character_translation,
               doc: /*
-*Non-nil enables character translation while encoding and decoding.  */);
+Non-nil enables character translation while encoding and decoding.  */);
   Venable_character_translation = Qt;
 
   DEFVAR_LISP ("standard-translation-table-for-decode",
diff --git a/src/composite.c b/src/composite.c
index 1c9c62b..1c18165 100644
--- a/src/composite.c
+++ b/src/composite.c
@@ -732,9 +732,11 @@ composition_gstring_width (Lisp_Object gstring, ptrdiff_t 
from, ptrdiff_t to,
       if (FONT_OBJECT_P (font_object))
        {
          struct font *font = XFONT_OBJECT (font_object);
+         int font_ascent, font_descent;
 
-         metrics->ascent = font->ascent;
-         metrics->descent = font->descent;
+         get_font_ascent_descent (font, &font_ascent, &font_descent);
+         metrics->ascent = font_ascent;
+         metrics->descent = font_descent;
        }
       else
        {
diff --git a/src/conf_post.h b/src/conf_post.h
index 1a080fa..785e5d7 100644
--- a/src/conf_post.h
+++ b/src/conf_post.h
@@ -206,6 +206,13 @@ extern void _DebPrint (const char *fmt, ...);
 #define RE_TRANSLATE_P(TBL) (!EQ (TBL, make_number (0)))
 #endif
 
+/* Tell time_rz.c to use Emacs's getter and setter for TZ.
+   Only Emacs uses time_rz so this is OK.  */
+#define getenv_TZ emacs_getenv_TZ
+#define setenv_TZ emacs_setenv_TZ
+extern char *emacs_getenv_TZ (void);
+extern int emacs_setenv_TZ (char const *);
+
 #include <string.h>
 #include <stdlib.h>
 
diff --git a/src/data.c b/src/data.c
index 9b1c12a..80f2ac9 100644
--- a/src/data.c
+++ b/src/data.c
@@ -186,7 +186,7 @@ DEFUN ("eq", Feq, Seq, 2, 2, 0,
 }
 
 DEFUN ("null", Fnull, Snull, 1, 1, 0,
-       doc: /* Return t if OBJECT is nil.  */
+       doc: /* Return t if OBJECT is nil, and return nil otherwise.  */
        attributes: const)
   (Lisp_Object object)
 {
diff --git a/src/dispextern.h b/src/dispextern.h
index de6a6f1..a4cdd0e 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -1536,6 +1536,12 @@ struct glyph_string
       + (FRAME_LINE_HEIGHT ((F)) > FONT_HEIGHT ((FONT)))) / 2  \
    - (FONT_DESCENT (FRAME_FONT (F)) - FRAME_BASELINE_OFFSET (F)))
 
+/* A heuristic test for fonts that claim they need a preposterously
+   large vertical space.  The heuristics is in the factor of 3.  We
+   ignore the ascent and descent values reported by such fonts, and
+   instead go by the values reported for individual glyphs.  */
+#define FONT_TOO_HIGH(ft)  ((ft)->ascent + (ft)->descent > 3*(ft)->pixel_size)
+
 
 /***********************************************************************
                                Faces
@@ -3268,6 +3274,8 @@ extern ptrdiff_t compute_display_string_end (ptrdiff_t,
 extern void produce_stretch_glyph (struct it *);
 extern int merge_glyphless_glyph_face (struct it *);
 
+extern void get_font_ascent_descent (struct font *, int *, int *);
+
 #ifdef HAVE_WINDOW_SYSTEM
 
 #ifdef GLYPH_DEBUG
@@ -3393,7 +3401,6 @@ void unrequest_sigio (void);
 bool tabs_safe_p (int);
 void init_baud_rate (int);
 void init_sigio (int);
-void ignore_sigio (void);
 
 /* Defined in xfaces.c.  */
 
diff --git a/src/dispnew.c b/src/dispnew.c
index 0ac30ab..861ede2 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -5691,8 +5691,16 @@ additional wait period, in milliseconds; this is for 
backwards compatibility.
   if (duration > 0)
     {
       struct timespec t = dtotimespec (duration);
-      wait_reading_process_output (min (t.tv_sec, WAIT_READING_MAX),
-                                  t.tv_nsec, 0, 0, Qnil, NULL, 0);
+      struct timespec tend = timespec_add (current_timespec (), t);
+
+      /* wait_reading_process_output returns as soon as it detects
+        output from any subprocess, so we wait in a loop until the
+        time expires.  */
+      do {
+       wait_reading_process_output (min (t.tv_sec, WAIT_READING_MAX),
+                                    t.tv_nsec, 0, 0, Qnil, NULL, 0);
+       t = timespec_sub (tend, current_timespec ());
+      } while (timespec_sign (t) > 0);
     }
 
   return Qnil;
diff --git a/src/doc.c b/src/doc.c
index f1ba643..78a7815 100644
--- a/src/doc.c
+++ b/src/doc.c
@@ -1,4 +1,4 @@
-/* Record indices of function doc strings stored in a file.
+/* Record indices of function doc strings stored in a file. -*- coding: utf-8 
-*-
 
 Copyright (C) 1985-1986, 1993-1995, 1997-2015 Free Software Foundation,
 Inc.
@@ -32,6 +32,7 @@ along with GNU Emacs.  If not, see 
<http://www.gnu.org/licenses/>.  */
 #include "lisp.h"
 #include "character.h"
 #include "buffer.h"
+#include "disptab.h"
 #include "keyboard.h"
 #include "keymap.h"
 
@@ -683,6 +684,18 @@ the same file name is found in the `doc-directory'.  */)
   return unbind_to (count, Qnil);
 }
 
+/* Declare named constants for U+2018 LEFT SINGLE QUOTATION MARK and
+   U+2019 RIGHT SINGLE QUOTATION MARK, which have UTF-8 encodings
+   "\xE2\x80\x98" and "\xE2\x80\x99", respectively.  */
+enum
+  {
+    LEFT_SINGLE_QUOTATION_MARK = 0x2018,
+    uLSQM0 = 0xE2, uLSQM1 = 0x80, uLSQM2 = 0x98,
+    uRSQM0 = 0xE2, uRSQM1 = 0x80, uRSQM2 = 0x99,
+  };
+static unsigned char const LSQM[] = { uLSQM0, uLSQM1, uLSQM2 };
+static unsigned char const RSQM[] = { uRSQM0, uRSQM1, uRSQM2 };
+
 DEFUN ("substitute-command-keys", Fsubstitute_command_keys,
        Ssubstitute_command_keys, 1, 1, 0,
        doc: /* Substitute key descriptions for command names in STRING.
@@ -699,8 +712,10 @@ summary).
 Each substring of the form \\=\\<MAPVAR> specifies the use of MAPVAR
 as the keymap for future \\=\\[COMMAND] substrings.
 
-Each \\=` is replaced by ‘.  Each ' preceded by \\=` and without
-intervening ' is replaced by ’.
+Each \\=‘ and \\=’ are replaced by left and right quote.  Each \\=` is
+replaced by left quote, and each ' preceded by \\=` and without
+intervening ' is replaced by right quote.  Left and right quote
+characters are specified by ‘help-quote-translation’.
 
 \\=\\= quotes the following character and is discarded; thus,
 \\=\\=\\=\\= puts \\=\\= into the output, \\=\\=\\=\\[ puts \\=\\[ into the 
output, and
@@ -719,7 +734,7 @@ Otherwise, return a new string.  */)
   ptrdiff_t bsize;
   Lisp_Object tem;
   Lisp_Object keymap;
-  unsigned char *start;
+  unsigned char const *start;
   ptrdiff_t length, length_byte;
   Lisp_Object name;
   struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
@@ -735,6 +750,21 @@ Otherwise, return a new string.  */)
   name = Qnil;
   GCPRO4 (string, tem, keymap, name);
 
+  enum { unicode, grave_accent, apostrophe } quote_translation = unicode;
+  if (EQ (Vhelp_quote_translation, make_number ('`')))
+    quote_translation = grave_accent;
+  else if (EQ (Vhelp_quote_translation, make_number ('\'')))
+    quote_translation = apostrophe;
+  else if (NILP (Vhelp_quote_translation)
+          && DISP_TABLE_P (Vstandard_display_table))
+    {
+      Lisp_Object dv = DISP_CHAR_VECTOR (XCHAR_TABLE (Vstandard_display_table),
+                                        LEFT_SINGLE_QUOTATION_MARK);
+      if (VECTORP (dv) && ASIZE (dv) == 1
+         && EQ (AREF (dv, 0), make_number ('`')))
+       quote_translation = grave_accent;
+    }
+
   multibyte = STRING_MULTIBYTE (string);
   nchars = 0;
 
@@ -932,22 +962,39 @@ Otherwise, return a new string.  */)
            strp = SDATA (string) + idx;
          }
        }
-      else if (strp[0] == '`')
+      else if (strp[0] == '`' && quote_translation == unicode)
        {
          in_quote = true;
-         start = (unsigned char *) "\xE2\x80\x98"; /* ‘ */
+         start = LSQM;
        subst_quote:
          length = 1;
          length_byte = 3;
          idx = strp - SDATA (string) + 1;
          goto subst;
        }
+      else if (strp[0] == '`' && quote_translation == apostrophe)
+       {
+         *bufp++ = '\'';
+         strp++;
+         nchars++;
+         changed = true;
+       }
       else if (strp[0] == '\'' && in_quote)
        {
          in_quote = false;
-         start = (unsigned char *) "\xE2\x80\x99"; /* ’ */
+         start = RSQM;
          goto subst_quote;
        }
+      else if (strp[0] == uLSQM0 && strp[1] == uLSQM1
+              && (strp[2] == uLSQM2 || strp[2] == uRSQM2)
+              && quote_translation != unicode)
+        {
+         *bufp++ = (strp[2] == uLSQM2 && quote_translation == grave_accent
+                    ? '`' : '\'');
+         strp += 3;
+         nchars++;
+         changed = true;
+        }
       else if (! multibyte)            /* just copy other chars */
        *bufp++ = *strp++, nchars++;
       else
@@ -986,6 +1033,16 @@ syms_of_doc (void)
                doc: /* A list of files used to build this Emacs binary.  */);
   Vbuild_files = Qnil;
 
+  DEFVAR_LISP ("help-quote-translation", Vhelp_quote_translation,
+               doc: /* Style to use for single quotes in help.
+The value is a left single quote character of some style.
+Quote \\=‘like this\\=’ if the value is ?\\=‘ (left single quotation mark).
+Quote 'like this' if the value is ?' (apostrophe).
+Quote \\=`like this' if the value is ?\\=` (grave accent).
+The default value is nil, which means quote with left single quotation mark
+if displayable, and with grave accent otherwise.  */);
+  Vhelp_quote_translation = Qnil;
+
   defsubr (&Sdocumentation);
   defsubr (&Sdocumentation_property);
   defsubr (&Ssnarf_documentation);
diff --git a/src/editfns.c b/src/editfns.c
index c387dc7..9ff39f9 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -44,8 +44,10 @@ along with GNU Emacs.  If not, see 
<http://www.gnu.org/licenses/>.  */
 #include <sys/resource.h>
 #endif
 
+#include <errno.h>
 #include <float.h>
 #include <limits.h>
+
 #include <intprops.h>
 #include <strftime.h>
 #include <verify.h>
@@ -65,9 +67,8 @@ extern Lisp_Object w32_get_internal_run_time (void);
 #endif
 
 static struct lisp_time lisp_time_struct (Lisp_Object, int *);
-static void set_time_zone_rule (char const *);
 static Lisp_Object format_time_string (char const *, ptrdiff_t, struct 
timespec,
-                                      bool, struct tm *);
+                                      Lisp_Object, struct tm *);
 static long int tm_gmtoff (struct tm *);
 static int tm_diff (struct tm *, struct tm *);
 static void update_buffer_properties (ptrdiff_t, ptrdiff_t);
@@ -76,8 +77,13 @@ static void update_buffer_properties (ptrdiff_t, ptrdiff_t);
 # define HAVE_TM_GMTOFF false
 #endif
 
-/* The startup value of the TZ environment variable; null if unset.  */
-static char const *initial_tz;
+enum { tzeqlen = sizeof "TZ=" - 1 };
+
+/* Time zones equivalent to current local time, to wall clock time,
+   and to UTC, respectively.  */
+static timezone_t local_tz;
+static timezone_t wall_clock_tz;
+static timezone_t const utc_tz = 0;
 
 /* A valid but unlikely setting for the TZ environment variable.
    It is OK (though a bit slower) if the user chooses this value.  */
@@ -94,8 +100,97 @@ init_and_cache_system_name (void)
   cached_system_name = Vsystem_name;
 }
 
+static struct tm *
+emacs_localtime_rz (timezone_t tz, time_t const *t, struct tm *tm)
+{
+  tm = localtime_rz (tz, t, tm);
+  if (!tm && errno == ENOMEM)
+    memory_full (SIZE_MAX);
+  return tm;
+}
+
+static time_t
+emacs_mktime_z (timezone_t tz, struct tm *tm)
+{
+  errno = 0;
+  time_t t = mktime_z (tz, tm);
+  if (t == (time_t) -1 && errno == ENOMEM)
+    memory_full (SIZE_MAX);
+  return t;
+}
+
+/* Allocate a timezone, signaling on failure.  */
+static timezone_t
+xtzalloc (char const *name)
+{
+  timezone_t tz = tzalloc (name);
+  if (!tz)
+    memory_full (SIZE_MAX);
+  return tz;
+}
+
+/* Free a timezone, except do not free the time zone for local time.
+   Freeing utc_tz is also a no-op.  */
+static void
+xtzfree (timezone_t tz)
+{
+  if (tz != local_tz)
+    tzfree (tz);
+}
+
+/* Convert the Lisp time zone rule ZONE to a timezone_t object.
+   The returned value either is 0, or is LOCAL_TZ, or is newly allocated.
+   If SETTZ, set Emacs local time to the time zone rule; otherwise,
+   the caller should eventually pass the returned value to xtzfree.  */
+static timezone_t
+tzlookup (Lisp_Object zone, bool settz)
+{
+  static char const tzbuf_format[] = "XXX%s%"pI"d:%02d:%02d";
+  char tzbuf[sizeof tzbuf_format + INT_STRLEN_BOUND (EMACS_INT)];
+  char const *zone_string;
+  timezone_t new_tz;
+
+  if (NILP (zone))
+    return local_tz;
+  else if (EQ (zone, Qt))
+    {
+      zone_string = "UTC0";
+      new_tz = utc_tz;
+    }
+  else
+    {
+      if (EQ (zone, Qwall))
+       zone_string = 0;
+      else if (STRINGP (zone))
+       zone_string = SSDATA (zone);
+      else if (INTEGERP (zone))
+       {
+         EMACS_INT abszone = eabs (XINT (zone)), hour = abszone / (60 * 60);
+         int min = (abszone / 60) % 60, sec = abszone % 60;
+         sprintf (tzbuf, tzbuf_format, &"-"[XINT (zone) < 0], hour, min, sec);
+         zone_string = tzbuf;
+       }
+      else
+       xsignal2 (Qerror, build_string ("Invalid time zone specification"),
+                 zone);
+      new_tz = xtzalloc (zone_string);
+    }
+
+  if (settz)
+    {
+      block_input ();
+      emacs_setenv_TZ (zone_string);
+      timezone_t old_tz = local_tz;
+      local_tz = new_tz;
+      tzfree (old_tz);
+      unblock_input ();
+    }
+
+  return new_tz;
+}
+
 void
-init_editfns (void)
+init_editfns (bool dumping)
 {
   const char *user_name;
   register char *p;
@@ -108,7 +203,7 @@ init_editfns (void)
 #ifndef CANNOT_DUMP
   /* When just dumping out, set the time zone to a known unlikely value
      and skip the rest of this function.  */
-  if (!initialized)
+  if (dumping)
     {
 # ifdef HAVE_TZSET
       xputenv (dump_tz_string);
@@ -119,7 +214,6 @@ init_editfns (void)
 #endif
 
   char *tz = getenv ("TZ");
-  initial_tz = tz;
 
 #if !defined CANNOT_DUMP && defined HAVE_TZSET
   /* If the execution TZ happens to be the same as the dump TZ,
@@ -127,7 +221,7 @@ init_editfns (void)
      to force the underlying implementation to reload the TZ info.
      This is needed on implementations that load TZ info from files,
      since the TZ file contents may differ between dump and execution.  */
-  if (tz && strcmp (tz, &dump_tz_string[sizeof "TZ=" - 1]) == 0)
+  if (tz && strcmp (tz, &dump_tz_string[tzeqlen]) == 0)
     {
       ++*tz;
       tzset ();
@@ -135,9 +229,10 @@ init_editfns (void)
     }
 #endif
 
-  /* Call set_time_zone_rule now, so that its call to putenv is done
+  /* Set the time zone rule now, so that the call to putenv is done
      before multiple threads are active.  */
-  set_time_zone_rule (tz);
+  wall_clock_tz = xtzalloc (0);
+  tzlookup (tz ? build_string (tz) : Qwall, true);
 
   pw = getpwuid (getuid ());
 #ifdef MSDOS
@@ -1025,10 +1120,20 @@ DEFUN ("byte-to-position", Fbyte_to_position, 
Sbyte_to_position, 1, 1, 0,
 If BYTEPOS is out of range, the value is nil.  */)
   (Lisp_Object bytepos)
 {
+  ptrdiff_t pos_byte;
+
   CHECK_NUMBER (bytepos);
-  if (XINT (bytepos) < BEG_BYTE || XINT (bytepos) > Z_BYTE)
+  pos_byte = XINT (bytepos);
+  if (pos_byte < BEG_BYTE || pos_byte > Z_BYTE)
     return Qnil;
-  return make_number (BYTE_TO_CHAR (XINT (bytepos)));
+  if (Z != Z_BYTE)
+    /* There are multibyte characters in the buffer.
+       The argument of BYTE_TO_CHAR must be a byte position at
+       a character boundary, so search for the start of the current
+       character.  */
+    while (!CHAR_HEAD_P (FETCH_BYTE (pos_byte)))
+      pos_byte--;
+  return make_number (BYTE_TO_CHAR (pos_byte));
 }
 
 DEFUN ("following-char", Ffollowing_char, Sfollowing_char, 0, 0, 0,
@@ -1196,7 +1301,7 @@ of the user with that uid, or nil if there is no such 
user.  */)
      (That can happen if Emacs is dumpable
      but you decide to run `temacs -l loadup' and not dump.  */
   if (NILP (Vuser_login_name))
-    init_editfns ();
+    init_editfns (false);
 
   if (NILP (uid))
     return Vuser_login_name;
@@ -1219,7 +1324,7 @@ This ignores the environment variables LOGNAME and USER, 
so it differs from
      (That can happen if Emacs is dumpable
      but you decide to run `temacs -l loadup' and not dump.  */
   if (NILP (Vuser_login_name))
-    init_editfns ();
+    init_editfns (false);
   return Vuser_real_login_name;
 }
 
@@ -1374,30 +1479,6 @@ check_time_validity (int validity)
     }
 }
 
-/* A substitute for mktime_z on platforms that lack it.  It's not
-   thread-safe, but should be good enough for Emacs in typical use.  */
-#ifndef HAVE_TZALLOC
-static time_t
-mktime_z (timezone_t tz, struct tm *tm)
-{
-  char *oldtz = getenv ("TZ");
-  USE_SAFE_ALLOCA;
-  if (oldtz)
-    {
-      size_t oldtzsize = strlen (oldtz) + 1;
-      char *oldtzcopy = SAFE_ALLOCA (oldtzsize);
-      oldtz = strcpy (oldtzcopy, oldtz);
-    }
-  block_input ();
-  set_time_zone_rule (tz);
-  time_t t = mktime (tm);
-  set_time_zone_rule (oldtz);
-  unblock_input ();
-  SAFE_FREE ();
-  return t;
-}
-#endif
-
 /* Return the upper part of the time T (everything but the bottom 16 bits).  */
 static EMACS_INT
 hi_time (time_t t)
@@ -1838,7 +1919,7 @@ or (if you need time as a string) `format-time-string'.  
*/)
 
 /* Write information into buffer S of size MAXSIZE, according to the
    FORMAT of length FORMAT_LEN, using time information taken from *TP.
-   Default to Universal Time if UT, local time otherwise.
+   Use the time zone specified by TZ.
    Use NS as the number of nanoseconds in the %N directive.
    Return the number of bytes written, not including the terminating
    '\0'.  If S is NULL, nothing will be written anywhere; so to
@@ -1849,7 +1930,7 @@ or (if you need time as a string) `format-time-string'.  
*/)
    bytes in FORMAT and it does not support nanoseconds.  */
 static size_t
 emacs_nmemftime (char *s, size_t maxsize, const char *format,
-                size_t format_len, const struct tm *tp, bool ut, int ns)
+                size_t format_len, const struct tm *tp, timezone_t tz, int ns)
 {
   size_t total = 0;
 
@@ -1866,7 +1947,7 @@ emacs_nmemftime (char *s, size_t maxsize, const char 
*format,
       if (s)
        s[0] = '\1';
 
-      result = nstrftime (s, maxsize, format, tp, ut, ns);
+      result = nstrftime (s, maxsize, format, tp, tz, ns);
 
       if (s)
        {
@@ -1891,8 +1972,9 @@ DEFUN ("format-time-string", Fformat_time_string, 
Sformat_time_string, 1, 3, 0,
 TIME is specified as (HIGH LOW USEC PSEC), as returned by
 `current-time' or `file-attributes'.  The obsolete form (HIGH . LOW)
 is also still accepted.
-The third, optional, argument UNIVERSAL, if non-nil, means describe TIME
-as Universal Time; nil means describe TIME in the local time zone.
+The optional ZONE is omitted or nil for Emacs local time, t for
+Universal Time, `wall' for system wall clock time, or a string as in
+`set-time-zone-rule' for a time zone rule.
 The value is a copy of FORMAT-STRING, but with certain constructs replaced
 by text that describes the specified date and time in TIME:
 
@@ -1941,8 +2023,8 @@ The modifiers are `E' and `O'.  For certain characters X,
 
 For example, to produce full ISO 8601 format, use "%FT%T%z".
 
-usage: (format-time-string FORMAT-STRING &optional TIME UNIVERSAL)  */)
-  (Lisp_Object format_string, Lisp_Object timeval, Lisp_Object universal)
+usage: (format-time-string FORMAT-STRING &optional TIME ZONE)  */)
+  (Lisp_Object format_string, Lisp_Object timeval, Lisp_Object zone)
 {
   struct timespec t = lisp_time_argument (timeval);
   struct tm tm;
@@ -1951,12 +2033,12 @@ usage: (format-time-string FORMAT-STRING &optional TIME 
UNIVERSAL)  */)
   format_string = code_convert_string_norecord (format_string,
                                                Vlocale_coding_system, 1);
   return format_time_string (SSDATA (format_string), SBYTES (format_string),
-                            t, ! NILP (universal), &tm);
+                            t, zone, &tm);
 }
 
 static Lisp_Object
 format_time_string (char const *format, ptrdiff_t formatlen,
-                   struct timespec t, bool ut, struct tm *tmp)
+                   struct timespec t, Lisp_Object zone, struct tm *tmp)
 {
   char buffer[4000];
   char *buf = buffer;
@@ -1966,36 +2048,48 @@ format_time_string (char const *format, ptrdiff_t 
formatlen,
   int ns = t.tv_nsec;
   USE_SAFE_ALLOCA;
 
-  tmp = ut ? gmtime_r (&t.tv_sec, tmp) : localtime_r (&t.tv_sec, tmp);
+  timezone_t tz = tzlookup (zone, false);
+  tmp = emacs_localtime_rz (tz, &t.tv_sec, tmp);
   if (! tmp)
-    time_overflow ();
+    {
+      xtzfree (tz);
+      time_overflow ();
+    }
   synchronize_system_time_locale ();
 
   while (true)
     {
       buf[0] = '\1';
-      len = emacs_nmemftime (buf, size, format, formatlen, tmp, ut, ns);
+      len = emacs_nmemftime (buf, size, format, formatlen, tmp, tz, ns);
       if ((0 < len && len < size) || (len == 0 && buf[0] == '\0'))
        break;
 
       /* Buffer was too small, so make it bigger and try again.  */
-      len = emacs_nmemftime (NULL, SIZE_MAX, format, formatlen, tmp, ut, ns);
+      len = emacs_nmemftime (NULL, SIZE_MAX, format, formatlen, tmp, tz, ns);
       if (STRING_BYTES_BOUND <= len)
-       string_overflow ();
+       {
+         xtzfree (tz);
+         string_overflow ();
+       }
       size = len + 1;
       buf = SAFE_ALLOCA (size);
     }
 
+  xtzfree (tz);
   bufstring = make_unibyte_string (buf, len);
   SAFE_FREE ();
   return code_convert_string_norecord (bufstring, Vlocale_coding_system, 0);
 }
 
-DEFUN ("decode-time", Fdecode_time, Sdecode_time, 0, 1, 0,
-       doc: /* Decode a time value as (SEC MINUTE HOUR DAY MONTH YEAR DOW DST 
ZONE).
+DEFUN ("decode-time", Fdecode_time, Sdecode_time, 0, 2, 0,
+       doc: /* Decode a time value as (SEC MINUTE HOUR DAY MONTH YEAR DOW DST 
UTCOFF).
 The optional SPECIFIED-TIME should be a list of (HIGH LOW . IGNORED),
 as from `current-time' and `file-attributes', or nil to use the
 current time.  The obsolete form (HIGH . LOW) is also still accepted.
+The optional ZONE is omitted or nil for Emacs local time, t for
+Universal Time, `wall' for system wall clock time, or a string as in
+`set-time-zone-rule' for a time zone rule.
+
 The list has the following nine members: SEC is an integer between 0
 and 60; SEC is 60 for a leap second, which only some operating systems
 support.  MINUTE is an integer between 0 and 59.  HOUR is an integer
@@ -2003,15 +2097,20 @@ between 0 and 23.  DAY is an integer between 1 and 31.  
MONTH is an
 integer between 1 and 12.  YEAR is an integer indicating the
 four-digit year.  DOW is the day of week, an integer between 0 and 6,
 where 0 is Sunday.  DST is t if daylight saving time is in effect,
-otherwise nil.  ZONE is an integer indicating the number of seconds
-east of Greenwich.  (Note that Common Lisp has different meanings for
-DOW and ZONE.)  */)
-  (Lisp_Object specified_time)
+otherwise nil.  UTCOFF is an integer indicating the UTC offset in
+seconds, i.e., the number of seconds east of Greenwich.  (Note that
+Common Lisp has different meanings for DOW and UTCOFF.)
+
+usage: (decode-time &optional TIME ZONE)  */)
+  (Lisp_Object specified_time, Lisp_Object zone)
 {
   time_t time_spec = lisp_seconds_argument (specified_time);
   struct tm local_tm, gmt_tm;
+  timezone_t tz = tzlookup (zone, false);
+  struct tm *tm = emacs_localtime_rz (tz, &time_spec, &local_tm);
+  xtzfree (tz);
 
-  if (! (localtime_r (&time_spec, &local_tm)
+  if (! (tm
         && MOST_NEGATIVE_FIXNUM - TM_YEAR_BASE <= local_tm.tm_year
         && local_tm.tm_year <= MOST_POSITIVE_FIXNUM - TM_YEAR_BASE))
     time_overflow ();
@@ -2049,35 +2148,13 @@ check_tm_member (Lisp_Object obj, int offset)
   return n - offset;
 }
 
-/* Decode ZONE as a time zone specification.  */
-
-static Lisp_Object
-decode_time_zone (Lisp_Object zone)
-{
-  if (EQ (zone, Qt))
-    return build_string ("UTC0");
-  else if (STRINGP (zone))
-    return zone;
-  else if (INTEGERP (zone))
-    {
-      static char const tzbuf_format[] = "XXX%s%"pI"d:%02d:%02d";
-      char tzbuf[sizeof tzbuf_format + INT_STRLEN_BOUND (EMACS_INT)];
-      EMACS_INT abszone = eabs (XINT (zone)), zone_hr = abszone / (60 * 60);
-      int zone_min = (abszone / 60) % 60, zone_sec = abszone % 60;
-
-      return make_formatted_string (tzbuf, tzbuf_format, &"-"[XINT (zone) < 0],
-                                   zone_hr, zone_min, zone_sec);
-    }
-  else
-    xsignal2 (Qerror, build_string ("Invalid time zone specification"), zone);
-}
-
 DEFUN ("encode-time", Fencode_time, Sencode_time, 6, MANY, 0,
        doc: /* Convert SECOND, MINUTE, HOUR, DAY, MONTH, YEAR and ZONE to 
internal time.
 This is the reverse operation of `decode-time', which see.
-ZONE defaults to the current time zone rule.  This can
-be a string or t (as from `set-time-zone-rule'), or it can be a list
-\(as from `current-time-zone') or an integer (as from `decode-time')
+The optional ZONE is omitted or nil for Emacs local time, t for
+Universal Time, `wall' for system wall clock time, or a string as in
+`set-time-zone-rule' for a time zone rule.  It can also be a list (as
+from `current-time-zone') or an integer (as from `decode-time')
 applied without consideration for daylight saving time.
 
 You can pass more than 7 arguments; then the first six arguments
@@ -2110,14 +2187,9 @@ usage: (encode-time SECOND MINUTE HOUR DAY MONTH YEAR 
&optional ZONE)  */)
 
   if (CONSP (zone))
     zone = XCAR (zone);
-  if (NILP (zone))
-    value = mktime (&tm);
-  else
-    {
-      timezone_t tz = tzalloc (SSDATA (decode_time_zone (zone)));
-      value = mktime_z (tz, &tm);
-      tzfree (tz);
-    }
+  timezone_t tz = tzlookup (zone, false);
+  value = emacs_mktime_z (tz, &tm);
+  xtzfree (tz);
 
   if (value == (time_t) -1)
     time_overflow ();
@@ -2125,7 +2197,8 @@ usage: (encode-time SECOND MINUTE HOUR DAY MONTH YEAR 
&optional ZONE)  */)
   return list2i (hi_time (value), lo_time (value));
 }
 
-DEFUN ("current-time-string", Fcurrent_time_string, Scurrent_time_string, 0, 
1, 0,
+DEFUN ("current-time-string", Fcurrent_time_string, Scurrent_time_string,
+       0, 2, 0,
        doc: /* Return the current local time, as a human-readable string.
 Programs can use this function to decode a time,
 since the number of columns in each field is fixed
@@ -2138,17 +2211,24 @@ If SPECIFIED-TIME is given, it is a time to format 
instead of the
 current time.  The argument should have the form (HIGH LOW . IGNORED).
 Thus, you can use times obtained from `current-time' and from
 `file-attributes'.  SPECIFIED-TIME can also have the form (HIGH . LOW),
-but this is considered obsolete.  */)
-  (Lisp_Object specified_time)
+but this is considered obsolete.
+
+The optional ZONE is omitted or nil for Emacs local time, t for
+Universal Time, `wall' for system wall clock time, or a string as in
+`set-time-zone-rule' for a time zone rule.  */)
+  (Lisp_Object specified_time, Lisp_Object zone)
 {
   time_t value = lisp_seconds_argument (specified_time);
+  timezone_t tz = tzlookup (zone, false);
 
   /* Convert to a string in ctime format, except without the trailing
      newline, and without the 4-digit year limit.  Don't use asctime
      or ctime, as they might dump core if the year is outside the
      range -999 .. 9999.  */
   struct tm tm;
-  if (! localtime_r (&value, &tm))
+  struct tm *tmp = emacs_localtime_rz (tz, &value, &tm);
+  xtzfree (tz);
+  if (! tmp)
     time_overflow ();
 
   static char const wday_name[][4] =
@@ -2200,7 +2280,7 @@ tm_gmtoff (struct tm *a)
 #endif
 }
 
-DEFUN ("current-time-zone", Fcurrent_time_zone, Scurrent_time_zone, 0, 1, 0,
+DEFUN ("current-time-zone", Fcurrent_time_zone, Scurrent_time_zone, 0, 2, 0,
        doc: /* Return the offset and name for the local time zone.
 This returns a list of the form (OFFSET NAME).
 OFFSET is an integer number of seconds ahead of UTC (east of Greenwich).
@@ -2211,11 +2291,13 @@ instead of using the current time.  The argument should 
have the form
 (HIGH LOW . IGNORED).  Thus, you can use times obtained from
 `current-time' and from `file-attributes'.  SPECIFIED-TIME can also
 have the form (HIGH . LOW), but this is considered obsolete.
+Optional second arg ZONE is omitted or nil for the local time zone, or
+a string as in `set-time-zone-rule'.
 
 Some operating systems cannot provide all this information to Emacs;
 in this case, `current-time-zone' returns a list containing nil for
 the data it can't find.  */)
-  (Lisp_Object specified_time)
+  (Lisp_Object specified_time, Lisp_Object zone)
 {
   struct timespec value;
   struct tm local_tm, gmt_tm;
@@ -2223,7 +2305,8 @@ the data it can't find.  */)
 
   zone_offset = Qnil;
   value = make_timespec (lisp_seconds_argument (specified_time), 0);
-  zone_name = format_time_string ("%Z", sizeof "%Z" - 1, value, 0, &local_tm);
+  zone_name = format_time_string ("%Z", sizeof "%Z" - 1, value,
+                                 zone, &local_tm);
 
   if (HAVE_TM_GMTOFF || gmtime_r (&value.tv_sec, &gmt_tm))
     {
@@ -2249,42 +2332,48 @@ the data it can't find.  */)
 }
 
 DEFUN ("set-time-zone-rule", Fset_time_zone_rule, Sset_time_zone_rule, 1, 1, 0,
-       doc: /* Set the local time zone using TZ, a string specifying a time 
zone rule.
-If TZ is nil, use implementation-defined default time zone information.
-If TZ is t, use Universal Time.  If TZ is an integer, it is treated as in
-`encode-time'.
-
-Instead of calling this function, you typically want (setenv "TZ" TZ).
-That changes both the environment of the Emacs process and the
-variable `process-environment', whereas `set-time-zone-rule' affects
-only the former.  */)
+       doc: /* Set the Emacs local time zone using TZ, a string specifying a 
time zone rule.
+If TZ is nil or `wall', use system wall clock time.  If TZ is t, use
+Universal Time.  If TZ is an integer, treat it as in `encode-time'.
+
+Instead of calling this function, you typically want something else.
+To temporarily use a different time zone rule for just one invocation
+of `decode-time', `encode-time', or `format-time-string', pass the
+function a ZONE argument.  To change local time consistently
+throughout Emacs, call (setenv "TZ" TZ): this changes both the
+environment of the Emacs process and the variable
+`process-environment', whereas `set-time-zone-rule' affects only the
+former.  */)
   (Lisp_Object tz)
 {
-  const char *tzstring = NILP (tz) ? initial_tz : SSDATA (decode_time_zone 
(tz));
+  tzlookup (NILP (tz) ? Qwall : tz, true);
+  return Qnil;
+}
 
-  block_input ();
-  set_time_zone_rule (tzstring);
-  unblock_input ();
+/* A buffer holding a string of the form "TZ=value", intended
+   to be part of the environment.  If TZ is supposed to be unset,
+   the buffer string is "tZ=".  */
+ static char *tzvalbuf;
 
-  return Qnil;
+/* Get the local time zone rule.  */
+char *
+emacs_getenv_TZ (void)
+{
+  return tzvalbuf[0] == 'T' ? tzvalbuf + tzeqlen : 0;
 }
 
-/* Set the local time zone rule to TZSTRING.
+/* Set the local time zone rule to TZSTRING, which can be null to
+   denote wall clock time.  Do not record the setting in LOCAL_TZ.
 
    This function is not thread-safe, in theory because putenv is not,
    but mostly because of the static storage it updates.  Other threads
    that invoke localtime etc. may be adversely affected while this
    function is executing.  */
 
-static void
-set_time_zone_rule (const char *tzstring)
+int
+emacs_setenv_TZ (const char *tzstring)
 {
-  /* A buffer holding a string of the form "TZ=value", intended
-     to be part of the environment.  */
-  static char *tzvalbuf;
   static ptrdiff_t tzvalbufsize;
-
-  int tzeqlen = sizeof "TZ=" - 1;
   ptrdiff_t tzstringlen = tzstring ? strlen (tzstring) : 0;
   char *tzval = tzvalbuf;
   bool new_tzvalbuf = tzvalbufsize <= tzeqlen + tzstringlen;
@@ -2318,16 +2407,25 @@ set_time_zone_rule (const char *tzstring)
       tzval[tzeqlen] = 0;
     }
 
-  if (new_tzvalbuf)
+  if (new_tzvalbuf
+#ifdef WINDOWSNT
+      /* MS-Windows implementation of 'putenv' copies the argument
+        string into a block it allocates, so modifying tzval string
+        does not change the environment.  OTOH, the other threads run
+        by Emacs on MS-Windows never call 'xputenv' or 'putenv' or
+        'unsetenv', so the original cause for the dicey in-place
+        modification technique doesn't exist there in the first
+        place.  */
+      || 1
+#endif
+      )
     {
       /* Although this is not thread-safe, in practice this runs only
         on startup when there is only one thread.  */
       xputenv (tzval);
     }
 
-#ifdef HAVE_TZSET
-  tzset ();
-#endif
+  return 0;
 }
 
 /* Insert NARGS Lisp objects in the array ARGS by calling INSERT_FUNC
@@ -4922,6 +5020,7 @@ void
 syms_of_editfns (void)
 {
   DEFSYM (Qbuffer_access_fontify_functions, "buffer-access-fontify-functions");
+  DEFSYM (Qwall, "wall");
 
   DEFVAR_LISP ("inhibit-field-text-motion", Vinhibit_field_text_motion,
               doc: /* Non-nil means text motion commands don't notice fields.  
*/);
diff --git a/src/emacs.c b/src/emacs.c
index 9990798..aca966c 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -849,10 +849,13 @@ main (int argc, char **argv)
     }
 #endif /* HAVE_PERSONALITY_LINUX32 */
 
-#if defined (HAVE_SETRLIMIT) && defined (RLIMIT_STACK)
-  /* Extend the stack space available.
-     Don't do that if dumping, since some systems (e.g. DJGPP)
-     might define a smaller stack limit at that time.  */
+#if defined (HAVE_SETRLIMIT) && defined (RLIMIT_STACK) && !defined (CYGWIN)
+  /* Extend the stack space available.  Don't do that if dumping,
+     since some systems (e.g. DJGPP) might define a smaller stack
+     limit at that time.  And it's not needed on Cygwin, since emacs
+     is built with an 8MB stack.  Moreover, the setrlimit call can
+     cause problems on Cygwin
+     (https://www.cygwin.com/ml/cygwin/2015-07/msg00096.html).  */
   if (1
 #ifndef CANNOT_DUMP
       && (!noninteractive || initialized)
@@ -886,7 +889,7 @@ main (int argc, char **argv)
 
       setrlimit (RLIMIT_STACK, &rlim);
     }
-#endif /* HAVE_SETRLIMIT and RLIMIT_STACK */
+#endif /* HAVE_SETRLIMIT and RLIMIT_STACK and not CYGWIN */
 
   /* Record (approximately) where the stack begins.  */
   stack_bottom = &stack_bottom_variable;
@@ -1555,7 +1558,7 @@ Using an Emacs configured with --with-x-toolkit=lucid 
does not have this problem
 
   /* This calls putenv and so must precede init_process_emacs.  Also,
      it sets Voperating_system_release, which init_process_emacs uses.  */
-  init_editfns ();
+  init_editfns (dumping);
 
   /* These two call putenv.  */
 #ifdef HAVE_DBUS
@@ -2014,7 +2017,6 @@ shut_down_emacs (int sig, Lisp_Object stuff)
   /* There is a tendency for a SIGIO signal to arrive within exit,
      and cause a SIGHUP because the input descriptor is already closed.  */
   unrequest_sigio ();
-  ignore_sigio ();
 
   /* Do this only if terminating normally, we want glyph matrices
      etc. in a core dump.  */
diff --git a/src/eval.c b/src/eval.c
index 4655095..9bdcf4b 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -200,6 +200,12 @@ backtrace_next (union specbinding *pdl)
   return pdl;
 }
 
+/* Return a pointer to somewhere near the top of the C stack.  */
+void *
+near_C_stack_top (void)
+{
+  return backtrace_args (backtrace_top ());
+}
 
 void
 init_eval_once (void)
@@ -220,6 +226,8 @@ static struct handler handlerlist_sentinel;
 void
 init_eval (void)
 {
+  gcprolist = 0;
+  byte_stack_list = 0;
   specpdl_ptr = specpdl;
   { /* Put a dummy catcher at top-level so that handlerlist is never NULL.
        This is important since handlerlist->nextfree holds the freelist
diff --git a/src/fileio.c b/src/fileio.c
index aad0270..905778e 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -5866,7 +5866,7 @@ syms_of_fileio (void)
 If it is nil, `default-file-name-coding-system' (which see) is used.
 
 On MS-Windows, the value of this variable is largely ignored if
-\`w32-unicode-filenames' (which see) is non-nil.  Emacs on Windows
+`w32-unicode-filenames' (which see) is non-nil.  Emacs on Windows
 behaves as if file names were encoded in `utf-8'.  */);
   Vfile_name_coding_system = Qnil;
 
@@ -5881,7 +5881,7 @@ instead use `file-name-coding-system' to get a constant 
encoding
 of file names regardless of the current language environment.
 
 On MS-Windows, the value of this variable is largely ignored if
-\`w32-unicode-filenames' (which see) is non-nil.  Emacs on Windows
+`w32-unicode-filenames' (which see) is non-nil.  Emacs on Windows
 behaves as if file names were encoded in `utf-8'.  */);
   Vdefault_file_name_coding_system = Qnil;
 
diff --git a/src/fns.c b/src/fns.c
index 235a4f6..cef2823 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -303,26 +303,26 @@ If string STR1 is greater, the value is a positive number 
N;
 }
 
 DEFUN ("string-lessp", Fstring_lessp, Sstring_lessp, 2, 2, 0,
-       doc: /* Return t if first arg string is less than second in 
lexicographic order.
+       doc: /* Return non-nil if STRING1 is less than STRING2 in lexicographic 
order.
 Case is significant.
 Symbols are also allowed; their print names are used instead.  */)
-  (register Lisp_Object s1, Lisp_Object s2)
+  (register Lisp_Object string1, Lisp_Object string2)
 {
   register ptrdiff_t end;
   register ptrdiff_t i1, i1_byte, i2, i2_byte;
 
-  if (SYMBOLP (s1))
-    s1 = SYMBOL_NAME (s1);
-  if (SYMBOLP (s2))
-    s2 = SYMBOL_NAME (s2);
-  CHECK_STRING (s1);
-  CHECK_STRING (s2);
+  if (SYMBOLP (string1))
+    string1 = SYMBOL_NAME (string1);
+  if (SYMBOLP (string2))
+    string2 = SYMBOL_NAME (string2);
+  CHECK_STRING (string1);
+  CHECK_STRING (string2);
 
   i1 = i1_byte = i2 = i2_byte = 0;
 
-  end = SCHARS (s1);
-  if (end > SCHARS (s2))
-    end = SCHARS (s2);
+  end = SCHARS (string1);
+  if (end > SCHARS (string2))
+    end = SCHARS (string2);
 
   while (i1 < end)
     {
@@ -330,13 +330,13 @@ Symbols are also allowed; their print names are used 
instead.  */)
         characters, not just the bytes.  */
       int c1, c2;
 
-      FETCH_STRING_CHAR_ADVANCE (c1, s1, i1, i1_byte);
-      FETCH_STRING_CHAR_ADVANCE (c2, s2, i2, i2_byte);
+      FETCH_STRING_CHAR_ADVANCE (c1, string1, i1, i1_byte);
+      FETCH_STRING_CHAR_ADVANCE (c2, string2, i2, i2_byte);
 
       if (c1 != c2)
        return c1 < c2 ? Qt : Qnil;
     }
-  return i1 < SCHARS (s2) ? Qt : Qnil;
+  return i1 < SCHARS (string2) ? Qt : Qnil;
 }
 
 DEFUN ("string-collate-lessp", Fstring_collate_lessp, Sstring_collate_lessp, 
2, 4, 0,
@@ -2686,7 +2686,7 @@ if `last-nonmenu-event' is nil, and `use-dialog-box' is 
non-nil.  */)
   CHECK_STRING (prompt);
 
   if ((NILP (last_nonmenu_event) || CONSP (last_nonmenu_event))
-      && use_dialog_box)
+      && use_dialog_box && ! NILP (last_input_event))
     {
       Lisp_Object pane, menu, obj;
       redisplay_preserve_echo_area (4);
diff --git a/src/font.c b/src/font.c
index 1405d43..50b966e 100644
--- a/src/font.c
+++ b/src/font.c
@@ -2908,7 +2908,12 @@ font_open_entity (struct frame *f, Lisp_Object entity, 
int pixel_size)
               : font->average_width ? font->average_width
               : font->space_width ? font->space_width
               : 1);
-  height = (font->height ? font->height : 1);
+
+  int font_ascent, font_descent;
+  get_font_ascent_descent (font, &font_ascent, &font_descent);
+  height = font_ascent + font_descent;
+  if (height <= 0)
+    height = 1;
 #ifdef HAVE_WINDOW_SYSTEM
   FRAME_DISPLAY_INFO (f)->n_fonts++;
   if (FRAME_DISPLAY_INFO (f)->n_fonts == 1)
@@ -3332,6 +3337,38 @@ font_load_for_lface (struct frame *f, Lisp_Object 
*attrs, Lisp_Object spec)
       /* No font is listed for SPEC, but each font-backend may have
         different criteria about "font matching".  So, try it.  */
       entity = font_matching_entity (f, attrs, spec);
+      /* Perhaps the user asked for a font "Foobar-123", and we
+        interpreted "-123" as the size, whereas it really is part of
+        the name.  So we reset the size to nil and the family name to
+        the entire "Foobar-123" thing, and try again with that.  */
+      if (NILP (entity))
+       {
+         name = Ffont_get (spec, QCuser_spec);
+         if (STRINGP (name))
+           {
+             char *p = SSDATA (name), *q = strrchr (p, '-');
+
+             if (q != NULL && c_isdigit (q[1]))
+               {
+                 char *tail;
+                 double font_size = strtod (q + 1, &tail);
+
+                 if (font_size > 0 && tail != q + 1)
+                   {
+                     Lisp_Object lsize = Ffont_get (spec, QCsize);
+
+                     if ((FLOATP (lsize) && XFLOAT_DATA (lsize) == font_size)
+                         || (INTEGERP (lsize) && XINT (lsize) == font_size))
+                       {
+                         ASET (spec, FONT_FAMILY_INDEX,
+                               font_intern_prop (p, tail - p, 1));
+                         ASET (spec, FONT_SIZE_INDEX, Qnil);
+                         entity = font_matching_entity (f, attrs, spec);
+                       }
+                   }
+               }
+           }
+       }
       if (NILP (entity))
        return Qnil;
     }
@@ -3852,8 +3889,10 @@ listed in the variable `script-representative-chars'.
 
 `:lang'
 
-VALUE must be a symbol of two-letter ISO-639 language names,
-e.g. `ja'.
+VALUE must be a symbol whose name is a two-letter ISO-639 language
+name, e.g. `ja'.  The value is matched against the "Additional Style"
+field of the XLFD spec of a font, if it's non-empty, on X, and
+against the codepages supported by the font on w32.
 
 `:otf'
 
@@ -5265,10 +5304,10 @@ See `font-weight-table' for the format of the vector. 
*/);
   ASET (font_style_table, 2, Vfont_width_table);
 
   DEFVAR_LISP ("font-log", Vfont_log, doc: /*
-*Logging list of font related actions and results.
-The value t means to suppress the logging.
-The initial value is set to nil if the environment variable
-EMACS_FONT_LOG is set.  Otherwise, it is set to t.  */);
+A list that logs font-related actions and results, for debugging.
+The default value is t, which means to suppress logging.
+Set it to nil to enable logging.  If the environment variable
+EMACS_FONT_LOG is set at startup, it defaults to nil.  */);
   Vfont_log = Qnil;
 
 #ifdef HAVE_WINDOW_SYSTEM
diff --git a/src/fontset.c b/src/fontset.c
index e957c38..50fcc64 100644
--- a/src/fontset.c
+++ b/src/fontset.c
@@ -66,16 +66,15 @@ along with GNU Emacs.  If not, see 
<http://www.gnu.org/licenses/>.  */
    A fontset object is implemented by a char-table whose default value
    and parent are always nil.
 
-   An element of a base fontset is a vector of FONT-DEFs which itself
-   is a vector [ FONT-SPEC ENCODING REPERTORY ].
+   An element of a base fontset is a vector of FONT-DEFs which themselves
+   are vectors of the form [ FONT-SPEC ENCODING REPERTORY ].
 
    An element of a realized fontset is nil, t, 0, or a vector of this
    form:
 
-       [ CHARSET-ORDERED-LIST-TICK PREFERRED-RFONT-DEF
-         RFONT-DEF0 RFONT-DEF1 ... ]
+       [ PREFERRED-RFONT-DEF RFONT-DEF0 RFONT-DEF1 ... ]
 
-   RFONT-DEFn (i.e. Realized FONT-DEF) has this form:
+   Each RFONT-DEFn (i.e. Realized FONT-DEF) has this form:
 
        [ FACE-ID FONT-DEF FONT-OBJECT SORTING-SCORE ]
 
@@ -370,14 +369,12 @@ fontset_compare_rfontdef (const void *val1, const void 
*val2)
          - RFONT_DEF_SCORE (*(Lisp_Object *) val2));
 }
 
-/* Update FONT-GROUP which has this form:
-       [ CHARSET-ORDERED-LIST-TICK PREFERRED-RFONT-DEF
-         RFONT-DEF0 RFONT-DEF1 ... ]
+/* Update a cons cell which has this form:
+       (CHARSET-ORDERED-LIST-TICK . FONT-GROUP)
+   where FONT-GROUP is of the form
+       [ PREFERRED-RFONT-DEF RFONT-DEF0 RFONT-DEF1 ... ]
    Reorder RFONT-DEFs according to the current language, and update
-   CHARSET-ORDERED-LIST-TICK.
-
-   If PREFERRED_FAMILY is not nil, that family has the higher priority
-   if the encoding charsets or languages in font-specs are the same.  */
+   CHARSET-ORDERED-LIST-TICK.  */
 
 static void
 reorder_font_vector (Lisp_Object font_group, struct font *font)
@@ -892,18 +889,46 @@ face_for_char (struct frame *f, struct face *face, int c,
   if (ASCII_CHAR_P (c) || CHAR_BYTE8_P (c))
     return face->ascii_face->id;
 
-#ifdef HAVE_NS
-  if (face->font)
+  if (c > 0 && EQ (CHAR_TABLE_REF (Vchar_script_table, c), Qsymbol))
     {
-      /* Fonts often have characters in other scripts, like symbol, even if 
they
-         don't match script: symbol.  So check if the character is present
-         in the current face first.  Only enable for NS for now, but should
-         perhaps be general?  */
+      /* Fonts often have characters for punctuation and other
+         symbols, even if they don't match the 'symbol' script.  So
+         check if the character is present in the current ASCII face
+         first, and if so, use the same font as used by that face.
+         This avoids unnecessarily switching to another font when the
+         frame's default font will do.  We only do this for symbols so
+         that users could still setup fontsets to force Emacs to use
+         specific fonts for characters from other scripts, because
+         choice of fonts is frequently affected by cultural
+         preferences and font features, not by font coverage.
+         However, these considerations are unlikely to be relevant to
+         punctuation and other symbols, since the latter generally
+         aren't specific to any culture, and don't require
+         sophisticated OTF features.  */
       Lisp_Object font_object;
-      XSETFONT (font_object, face->font);
-      if (font_has_char (f, font_object, c)) return face->id;
-    }
+
+      if (face->ascii_face->font)
+       {
+         XSETFONT (font_object, face->ascii_face->font);
+         if (font_has_char (f, font_object, c))
+           return face->ascii_face->id;
+       }
+
+#if 0
+      /* Try the current face.  Disabled because it can cause
+        counter-intuitive results, whereby the font used for some
+        character depends on the characters that precede it on
+        display.  See the discussion of bug #15138.  Note that the
+        original bug reported in #15138 was in a situation where face
+        == face->ascii_face, so the above code solves that situation
+        without risking the undesirable consequences.  */
+      if (face->font)
+       {
+         XSETFONT (font_object, face->font);
+         if (font_has_char (f, font_object, c)) return face->id;
+       }
 #endif
+    }
 
   fontset = FONTSET_FROM_ID (face->fontset);
   eassert (!BASE_FONTSET_P (fontset));
@@ -1383,9 +1408,11 @@ Modify fontset NAME to use FONT-SPEC for TARGET 
characters.
 NAME is a fontset name string, nil for the fontset of FRAME, or t for
 the default fontset.
 
-TARGET may be a cons; (FROM . TO), where FROM and TO are characters.
-In that case, use FONT-SPEC for all characters in the range FROM and
-TO (inclusive).
+TARGET may be a single character to use FONT-SPEC for.
+
+Target may be a cons (FROM . TO), where FROM and TO are characters.
+In that case, use FONT-SPEC for all characters in the range FROM
+and TO (inclusive).
 
 TARGET may be a script name symbol.  In that case, use FONT-SPEC for
 all characters that belong to the script.
@@ -1955,7 +1982,7 @@ format is the same as above.  */)
                  for (j = 0; j < ASIZE (val); j++)
                    {
                      elt = AREF (val, j);
-                     if (FONT_OBJECT_P (RFONT_DEF_OBJECT (elt)))
+                     if (!NILP (elt) && FONT_OBJECT_P (RFONT_DEF_OBJECT (elt)))
                        {
                          Lisp_Object font_object = RFONT_DEF_OBJECT (elt);
                          Lisp_Object slot, name;
diff --git a/src/frame.c b/src/frame.c
index e3ad82f..9e69598 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -3607,10 +3607,12 @@ x_set_font (struct frame *f, Lisp_Object arg, 
Lisp_Object oldval)
          Lisp_Object ascii_font = fontset_ascii (fontset);
          Lisp_Object spec = font_spec_from_name (ascii_font);
 
-         if (NILP (spec))
-           signal_error ("Invalid font name", ascii_font);
-
-         if (! font_match_p (spec, font_object))
+         /* SPEC might be nil because ASCII_FONT's name doesn't parse
+            according to stupid XLFD rules, which, for example,
+            disallow font names that include a dash followed by a
+            number.  So in those cases we simply request x_new_font
+            below to generate a new fontset.  */
+         if (NILP (spec) || ! font_match_p (spec, font_object))
            fontset = -1;
        }
     }
diff --git a/src/ftcrfont.c b/src/ftcrfont.c
index 0cbfd80..df3aa59 100644
--- a/src/ftcrfont.c
+++ b/src/ftcrfont.c
@@ -34,8 +34,8 @@ along with GNU Emacs.  If not, see 
<http://www.gnu.org/licenses/>.  */
 
 /* FTCR font driver.  */
 
-/* The actual structure for ftcr font that can be casted to struct
-   font.  */
+/* The actual structure for FTCR font.  A pointer to this structure
+   can be cast to struct font *.  */
 
 struct ftcrfont_info
 {
diff --git a/src/ftfont.c b/src/ftfont.c
index afeaeca..41d99df 100644
--- a/src/ftfont.c
+++ b/src/ftfont.c
@@ -1179,7 +1179,7 @@ ftfont_open2 (struct frame *f,
   bool scalable;
   int spacing;
   int i;
-  int upEM;
+  double upEM;
 
   val = assq_no_quit (QCfont_entity, AREF (entity, FONT_EXTRA_INDEX));
   if (! CONSP (val))
@@ -1235,9 +1235,9 @@ ftfont_open2 (struct frame *f,
              && XINT (AREF (entity, FONT_AVGWIDTH_INDEX)) == 0);
   if (scalable)
     {
-      font->ascent = ft_face->ascender * size / upEM;
-      font->descent = - ft_face->descender * size / upEM;
-      font->height = ft_face->height * size / upEM;
+      font->ascent = ft_face->ascender * size / upEM + 0.5;
+      font->descent = - ft_face->descender * size / upEM + 0.5;
+      font->height = ft_face->height * size / upEM + 0.5;
     }
   else
     {
@@ -1255,7 +1255,7 @@ ftfont_open2 (struct frame *f,
 #endif /* FC_DUAL */
       )
     font->min_width = font->average_width = font->space_width
-      = (scalable ? ft_face->max_advance_width * size / upEM
+      = (scalable ? ft_face->max_advance_width * size / upEM + 0.5
         : ft_face->size->metrics.max_advance >> 6);
   else
     {
@@ -1285,8 +1285,10 @@ ftfont_open2 (struct frame *f,
   font->vertical_centering = 0;
   if (scalable)
     {
-      font->underline_position = -ft_face->underline_position * size / upEM;
-      font->underline_thickness = ft_face->underline_thickness * size / upEM;
+      font->underline_position = (-ft_face->underline_position * size / upEM
+                                 + 0.5);
+      font->underline_thickness = (ft_face->underline_thickness * size / upEM
+                                  + 0.5);
     }
   else
     {
@@ -1313,6 +1315,10 @@ ftfont_open (struct frame *f, Lisp_Object entity, int 
pixel_size)
 static void
 ftfont_close (struct font *font)
 {
+  /* FIXME: Although this function can be called while garbage-collecting,
+     the function assumes that Lisp data structures are properly-formed.
+     This invalid assumption can lead to core dumps (Bug#20890).  */
+
   struct ftfont_info *ftfont_info = (struct ftfont_info *) font;
   Lisp_Object val, cache;
 
diff --git a/src/gnutls.c b/src/gnutls.c
index cab2404..864cac5 100644
--- a/src/gnutls.c
+++ b/src/gnutls.c
@@ -1512,7 +1512,7 @@ one trustfile (usually a CA bundle).  */)
           || !NILP (Fmember (QCgnutls_bootprop_trustfiles, verify_error)))
         {
          emacs_gnutls_deinit (proc);
-         error ("Certificate validation failed %s, verification code %u",
+         error ("Certificate validation failed %s, verification code %x",
                 c_hostname, peer_verification);
         }
       else
diff --git a/src/image.c b/src/image.c
index dfa8941..066db74 100644
--- a/src/image.c
+++ b/src/image.c
@@ -3690,7 +3690,7 @@ xpm_load (struct frame *f, struct image *img)
       int i;
       uint32_t *od = (uint32_t *)data;
       uint32_t *id = (uint32_t *)img->ximg->data;
-      unsigned char *mid = img->mask_img ? img->mask_img->data : 0;
+      char *mid = img->mask_img ? img->mask_img->data : 0;
       uint32_t bgcolor = get_spec_bg_or_alpha_as_argb (img, f);
 
       for (i = 0; i < height; ++i)
@@ -5642,7 +5642,7 @@ png_image_p (Lisp_Object object)
 #endif /* HAVE_PNG || HAVE_NS || USE_CAIRO */
 
 
-#if defined HAVE_PNG && !defined HAVE_NS
+#if (defined HAVE_PNG && !defined HAVE_NS) || defined USE_CAIRO
 
 # ifdef WINDOWSNT
 /* PNG library details.  */
diff --git a/src/indent.c b/src/indent.c
index ce78308..b4e6d74 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -2134,17 +2134,20 @@ whether or not it is currently displayed in some 
window.  */)
          overshoot_handled = 1;
        }
       else if (IT_CHARPOS (it) == PT - 1
-              && FETCH_BYTE (PT - 1) == '\n'
-              && nlines < 0)
+              && FETCH_BYTE (PT_BYTE - 1) == '\n'
+              && nlines <= 0)
        {
          /* The position we started from was covered by a display
             property, so we moved to position before the string, and
-            backed up one line, because the character at PT - 1 is a
-            newline.  So we need one less line to go up.  */
+            backed up one line, because the character at PT - 1 is
+            a newline.  So we need one less line to go up (or exactly
+            one line to go down if nlines == 0).  */
          nlines++;
          /* But we still need to record that one line, in order to
             return the correct value to the caller.  */
          vpos_init = -1;
+
+         overshoot_handled = 1;
        }
       if (lcols_given)
        to_x = window_column_x (w, window, extract_float (lcols), lcols);
@@ -2159,7 +2162,7 @@ whether or not it is currently displayed in some window.  
*/)
        }
       else if (overshoot_handled)
        {
-         it.vpos = 0;
+         it.vpos = vpos_init;
          move_it_by_lines (&it, min (PTRDIFF_MAX, nlines));
        }
       else
diff --git a/src/keyboard.c b/src/keyboard.c
index 3ee039d..8b4d9c3 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -288,18 +288,18 @@ static bool input_was_pending;
 
 /* Circular buffer for pre-read keyboard input.  */
 
-static struct input_event kbd_buffer[KBD_BUFFER_SIZE];
+static union buffered_input_event kbd_buffer[KBD_BUFFER_SIZE];
 
 /* Pointer to next available character in kbd_buffer.
    If kbd_fetch_ptr == kbd_store_ptr, the buffer is empty.
    This may be kbd_buffer + KBD_BUFFER_SIZE, meaning that the
    next available char is in kbd_buffer[0].  */
-static struct input_event *kbd_fetch_ptr;
+static union buffered_input_event *kbd_fetch_ptr;
 
 /* Pointer to next place to store character in kbd_buffer.  This
    may be kbd_buffer + KBD_BUFFER_SIZE, meaning that the next
    character should go in kbd_buffer[0].  */
-static struct input_event * volatile kbd_store_ptr;
+static union buffered_input_event *volatile kbd_store_ptr;
 
 /* The above pair of variables forms a "queue empty" flag.  When we
    enqueue a non-hook event, we increment kbd_store_ptr.  When we
@@ -372,14 +372,9 @@ static bool help_char_p (Lisp_Object);
 static void save_getcjmp (sys_jmp_buf);
 static void restore_getcjmp (sys_jmp_buf);
 static Lisp_Object apply_modifiers (int, Lisp_Object);
-static void clear_event (struct input_event *);
 static void restore_kboard_configuration (int);
-#ifdef USABLE_SIGIO
-static void deliver_input_available_signal (int signo);
-#endif
 static void handle_interrupt (bool);
 static _Noreturn void quit_throw_to_read_char (bool);
-static void process_special_events (void);
 static void timer_start_idle (void);
 static void timer_stop_idle (void);
 static void timer_resume_idle (void);
@@ -758,11 +753,11 @@ force_auto_save_soon (void)
 
 DEFUN ("recursive-edit", Frecursive_edit, Srecursive_edit, 0, 0, "",
        doc: /* Invoke the editor command loop recursively.
-To get out of the recursive edit, a command can throw to `exit' -- for
-instance `(throw 'exit nil)'.
-If you throw a value other than t, `recursive-edit' returns normally
+To get out of the recursive edit, a command can throw to ‘exit’ -- for
+instance ‘(throw 'exit nil)’.
+If you throw a value other than t, ‘recursive-edit’ returns normally
 to the function that called it.  Throwing a t value causes
-`recursive-edit' to quit, so that control returns to the command loop
+‘recursive-edit’ to quit, so that control returns to the command loop
 one level up.
 
 This function is called by the editor initialization to begin editing.  */)
@@ -1618,6 +1613,7 @@ command_loop_1 (void)
     finalize:
 
       if (current_buffer == prev_buffer
+         && XBUFFER (XWINDOW (selected_window)->contents) == current_buffer
          && last_point_position != PT
          && NILP (Vdisable_point_adjustment)
          && NILP (Vglobal_disable_point_adjustment))
@@ -1686,6 +1682,8 @@ adjust_point_for_property (ptrdiff_t last_pt, bool 
modified)
   bool check_composition = ! modified, check_display = 1, check_invisible = 1;
   ptrdiff_t orig_pt = PT;
 
+  eassert (XBUFFER (XWINDOW (selected_window)->contents) == current_buffer);
+
   /* FIXME: cycling is probably not necessary because these properties
      can't be usefully combined anyway.  */
   while (check_composition || check_display || check_invisible)
@@ -3443,7 +3441,7 @@ readable_events (int flags)
 #endif
                   ))
         {
-          struct input_event *event;
+          union buffered_input_event *event;
 
           event = ((kbd_fetch_ptr < kbd_buffer + KBD_BUFFER_SIZE)
                    ? kbd_fetch_ptr
@@ -3460,8 +3458,8 @@ readable_events (int flags)
                  && !((flags & READABLE_EVENTS_IGNORE_SQUEEZABLES)
                       && (event->kind == SCROLL_BAR_CLICK_EVENT
                           || event->kind == HORIZONTAL_SCROLL_BAR_CLICK_EVENT)
-                      && event->part == scroll_bar_handle
-                      && event->modifiers == 0)
+                      && event->ie.part == scroll_bar_handle
+                      && event->ie.modifiers == 0)
 #endif
                  && !((flags & READABLE_EVENTS_FILTER_EVENTS)
                       && event->kind == BUFFER_SWITCH_EVENT))
@@ -3548,8 +3546,8 @@ kbd_buffer_store_event (register struct input_event 
*event)
    subsequent input events have been parsed (and discarded).  */
 
 void
-kbd_buffer_store_event_hold (register struct input_event *event,
-                            struct input_event *hold_quit)
+kbd_buffer_store_buffered_event (union buffered_input_event *event,
+                                struct input_event *hold_quit)
 {
   if (event->kind == NO_EVENT)
     emacs_abort ();
@@ -3559,36 +3557,36 @@ kbd_buffer_store_event_hold (register struct 
input_event *event,
 
   if (event->kind == ASCII_KEYSTROKE_EVENT)
     {
-      register int c = event->code & 0377;
+      int c = event->ie.code & 0377;
 
-      if (event->modifiers & ctrl_modifier)
+      if (event->ie.modifiers & ctrl_modifier)
        c = make_ctrl_char (c);
 
-      c |= (event->modifiers
+      c |= (event->ie.modifiers
            & (meta_modifier | alt_modifier
               | hyper_modifier | super_modifier));
 
       if (c == quit_char)
        {
-         KBOARD *kb = FRAME_KBOARD (XFRAME (event->frame_or_window));
-         struct input_event *sp;
+         KBOARD *kb = FRAME_KBOARD (XFRAME (event->ie.frame_or_window));
 
          if (single_kboard && kb != current_kboard)
            {
              kset_kbd_queue
-               (kb, list2 (make_lispy_switch_frame (event->frame_or_window),
+               (kb, list2 (make_lispy_switch_frame (event->ie.frame_or_window),
                            make_number (c)));
              kb->kbd_queue_has_data = 1;
+             union buffered_input_event *sp;
              for (sp = kbd_fetch_ptr; sp != kbd_store_ptr; sp++)
                {
                  if (sp == kbd_buffer + KBD_BUFFER_SIZE)
                    sp = kbd_buffer;
 
-                 if (event_to_kboard (sp) == kb)
+                 if (event_to_kboard (&sp->ie) == kb)
                    {
-                     sp->kind = NO_EVENT;
-                     sp->frame_or_window = Qnil;
-                     sp->arg = Qnil;
+                     sp->ie.kind = NO_EVENT;
+                     sp->ie.frame_or_window = Qnil;
+                     sp->ie.arg = Qnil;
                    }
                }
              return;
@@ -3596,7 +3594,7 @@ kbd_buffer_store_event_hold (register struct input_event 
*event,
 
          if (hold_quit)
            {
-             *hold_quit = *event;
+             *hold_quit = event->ie;
              return;
            }
 
@@ -3607,9 +3605,9 @@ kbd_buffer_store_event_hold (register struct input_event 
*event,
          {
            Lisp_Object focus;
 
-           focus = FRAME_FOCUS_FRAME (XFRAME (event->frame_or_window));
+           focus = FRAME_FOCUS_FRAME (XFRAME (event->ie.frame_or_window));
            if (NILP (focus))
-             focus = event->frame_or_window;
+             focus = event->ie.frame_or_window;
            internal_last_event_frame = focus;
            Vlast_event_frame = focus;
          }
@@ -3651,8 +3649,7 @@ kbd_buffer_store_event_hold (register struct input_event 
*event,
           /* Don't read keyboard input until we have processed kbd_buffer.
              This happens when pasting text longer than KBD_BUFFER_SIZE/2.  */
           hold_keyboard_input ();
-          if (!noninteractive)
-            ignore_sigio ();
+          unrequest_sigio ();
           stop_polling ();
         }
 #endif /* subprocesses */
@@ -3679,22 +3676,27 @@ kbd_buffer_store_event_hold (register struct 
input_event *event,
 }
 
 
-/* Put an input event back in the head of the event queue.  */
+#ifdef HAVE_X11
+
+/* Put a selection input event back in the head of the event queue.  */
 
 void
-kbd_buffer_unget_event (register struct input_event *event)
+kbd_buffer_unget_event (struct selection_input_event *event)
 {
   if (kbd_fetch_ptr == kbd_buffer)
     kbd_fetch_ptr = kbd_buffer + KBD_BUFFER_SIZE;
 
   /* Don't let the very last slot in the buffer become full,  */
-  if (kbd_fetch_ptr - 1 != kbd_store_ptr)
+  union buffered_input_event *kp = kbd_fetch_ptr - 1;
+  if (kp != kbd_store_ptr)
     {
-      --kbd_fetch_ptr;
-      *kbd_fetch_ptr = *event;
+      kp->sie = *event;
+      kbd_fetch_ptr = kp;
     }
 }
 
+#endif
+
 /* Limit help event positions to this range, to avoid overflow problems.  */
 #define INPUT_EVENT_POS_MAX \
   ((ptrdiff_t) min (PTRDIFF_MAX, min (TYPE_MAXIMUM (Time) / 2, \
@@ -3773,7 +3775,7 @@ kbd_buffer_store_help_event (Lisp_Object frame, 
Lisp_Object help)
 void
 discard_mouse_events (void)
 {
-  struct input_event *sp;
+  union buffered_input_event *sp;
   for (sp = kbd_fetch_ptr; sp != kbd_store_ptr; sp++)
     {
       if (sp == kbd_buffer + KBD_BUFFER_SIZE)
@@ -3803,7 +3805,7 @@ discard_mouse_events (void)
 bool
 kbd_buffer_events_waiting (void)
 {
-  struct input_event *sp;
+  union buffered_input_event *sp;
 
   for (sp = kbd_fetch_ptr;
        sp != kbd_store_ptr && sp->kind == NO_EVENT;
@@ -3821,7 +3823,7 @@ kbd_buffer_events_waiting (void)
 /* Clear input event EVENT.  */
 
 static void
-clear_event (struct input_event *event)
+clear_event (union buffered_input_event *event)
 {
   event->kind = NO_EVENT;
 }
@@ -3846,6 +3848,7 @@ kbd_buffer_get_event (KBOARD **kbp,
       /* Start reading input again because we have processed enough to
          be able to accept new events again.  */
       unhold_keyboard_input ();
+      request_sigio ();
       start_polling ();
     }
 #endif /* subprocesses */
@@ -3942,13 +3945,13 @@ kbd_buffer_get_event (KBOARD **kbp,
      mouse movement enabled and available.  */
   if (kbd_fetch_ptr != kbd_store_ptr)
     {
-      struct input_event *event;
+      union buffered_input_event *event;
 
       event = ((kbd_fetch_ptr < kbd_buffer + KBD_BUFFER_SIZE)
               ? kbd_fetch_ptr
               : kbd_buffer);
 
-      *kbp = event_to_kboard (event);
+      *kbp = event_to_kboard (&event->ie);
       if (*kbp == 0)
        *kbp = current_kboard;  /* Better than returning null ptr?  */
 
@@ -3961,12 +3964,10 @@ kbd_buffer_get_event (KBOARD **kbp,
          || event->kind == SELECTION_CLEAR_EVENT)
        {
 #ifdef HAVE_X11
-         struct input_event copy;
-
          /* Remove it from the buffer before processing it,
             since otherwise swallow_events will see it
             and process it again.  */
-         copy = *event;
+         struct selection_input_event copy = event->sie;
          kbd_fetch_ptr = event + 1;
          input_pending = readable_events (0);
          x_handle_selection_event (&copy);
@@ -3980,7 +3981,7 @@ kbd_buffer_get_event (KBOARD **kbp,
 #if defined (HAVE_NS)
       else if (event->kind == NS_TEXT_EVENT)
         {
-          if (event->code == KEY_NS_PUT_WORKING_TEXT)
+          if (event->ie.code == KEY_NS_PUT_WORKING_TEXT)
             obj = list1 (intern ("ns-put-working-text"));
           else
             obj = list1 (intern ("ns-unput-working-text"));
@@ -3995,7 +3996,7 @@ kbd_buffer_get_event (KBOARD **kbp,
       else if (event->kind == DELETE_WINDOW_EVENT)
        {
          /* Make an event (delete-frame (FRAME)).  */
-         obj = list2 (Qdelete_frame, list1 (event->frame_or_window));
+         obj = list2 (Qdelete_frame, list1 (event->ie.frame_or_window));
          kbd_fetch_ptr = event + 1;
        }
 #endif
@@ -4004,13 +4005,13 @@ kbd_buffer_get_event (KBOARD **kbp,
       else if (event->kind == ICONIFY_EVENT)
        {
          /* Make an event (iconify-frame (FRAME)).  */
-         obj = list2 (Qiconify_frame, list1 (event->frame_or_window));
+         obj = list2 (Qiconify_frame, list1 (event->ie.frame_or_window));
          kbd_fetch_ptr = event + 1;
        }
       else if (event->kind == DEICONIFY_EVENT)
        {
          /* Make an event (make-frame-visible (FRAME)).  */
-         obj = list2 (Qmake_frame_visible, list1 (event->frame_or_window));
+         obj = list2 (Qmake_frame_visible, list1 (event->ie.frame_or_window));
          kbd_fetch_ptr = event + 1;
        }
 #endif
@@ -4026,8 +4027,8 @@ kbd_buffer_get_event (KBOARD **kbp,
        {
          kbd_fetch_ptr = event + 1;
          input_pending = readable_events (0);
-         if (FRAME_LIVE_P (XFRAME (event->frame_or_window)))
-           x_activate_menubar (XFRAME (event->frame_or_window));
+         if (FRAME_LIVE_P (XFRAME (event->ie.frame_or_window)))
+           x_activate_menubar (XFRAME (event->ie.frame_or_window));
        }
 #endif
 #ifdef HAVE_NTGUI
@@ -4035,9 +4036,9 @@ kbd_buffer_get_event (KBOARD **kbp,
        {
          /* Make an event (language-change FRAME CODEPAGE LANGUAGE-ID).  */
          obj = list4 (Qlanguage_change,
-                      event->frame_or_window,
-                      make_number (event->code),
-                      make_number (event->modifiers));
+                      event->ie.frame_or_window,
+                      make_number (event->ie.code),
+                      make_number (event->ie.modifiers));
          kbd_fetch_ptr = event + 1;
        }
 #endif
@@ -4046,16 +4047,16 @@ kbd_buffer_get_event (KBOARD **kbp,
        {
 #ifdef HAVE_W32NOTIFY
          /* Make an event (file-notify (DESCRIPTOR ACTION FILE) CALLBACK).  */
-         obj = list3 (Qfile_notify, event->arg, event->frame_or_window);
+         obj = list3 (Qfile_notify, event->ie.arg, event->ie.frame_or_window);
 #else
-          obj = make_lispy_event (event);
+          obj = make_lispy_event (&event->ie);
 #endif
          kbd_fetch_ptr = event + 1;
        }
 #endif /* USE_FILE_NOTIFY */
       else if (event->kind == SAVE_SESSION_EVENT)
         {
-          obj = list2 (Qsave_session, event->arg);
+          obj = list2 (Qsave_session, event->ie.arg);
          kbd_fetch_ptr = event + 1;
         }
       /* Just discard these, by returning nil.
@@ -4072,11 +4073,11 @@ kbd_buffer_get_event (KBOARD **kbp,
        {
          Lisp_Object object, position, help, frame, window;
 
-         frame = event->frame_or_window;
-         object = event->arg;
-         position = make_number (Time_to_position (event->timestamp));
-         window = event->x;
-         help = event->y;
+         frame = event->ie.frame_or_window;
+         object = event->ie.arg;
+         position = make_number (Time_to_position (event->ie.timestamp));
+         window = event->ie.x;
+         help = event->ie.y;
          clear_event (event);
 
          kbd_fetch_ptr = event + 1;
@@ -4092,14 +4093,14 @@ kbd_buffer_get_event (KBOARD **kbp,
             switch-frame event if necessary.  */
          Lisp_Object frame, focus;
 
-          frame = event->frame_or_window;
+          frame = event->ie.frame_or_window;
           focus = FRAME_FOCUS_FRAME (XFRAME (frame));
           if (FRAMEP (focus))
             frame = focus;
 
           if (
 #ifdef HAVE_X11
-              ! NILP (event->arg)
+              ! NILP (event->ie.arg)
               &&
 #endif
               !EQ (frame, internal_last_event_frame)
@@ -4116,7 +4117,7 @@ kbd_buffer_get_event (KBOARD **kbp,
 #ifdef HAVE_WINDOW_SYSTEM
 
           Display_Info *di;
-          Lisp_Object frame = event->frame_or_window;
+          Lisp_Object frame = event->ie.frame_or_window;
           bool focused = false;
 
           for (di = x_display_list; di && ! focused; di = di->next)
@@ -4132,7 +4133,7 @@ kbd_buffer_get_event (KBOARD **kbp,
 #ifdef HAVE_DBUS
       else if (event->kind == DBUS_EVENT)
        {
-         obj = make_lispy_event (event);
+         obj = make_lispy_event (&event->ie);
          kbd_fetch_ptr = event + 1;
        }
 #endif
@@ -4145,7 +4146,7 @@ kbd_buffer_get_event (KBOARD **kbp,
 #endif
       else if (event->kind == CONFIG_CHANGED_EVENT)
        {
-         obj = make_lispy_event (event);
+         obj = make_lispy_event (&event->ie);
          kbd_fetch_ptr = event + 1;
        }
       else
@@ -4155,7 +4156,7 @@ kbd_buffer_get_event (KBOARD **kbp,
          Lisp_Object frame;
          Lisp_Object focus;
 
-         frame = event->frame_or_window;
+         frame = event->ie.frame_or_window;
          if (CONSP (frame))
            frame = XCAR (frame);
          else if (WINDOWP (frame))
@@ -4175,7 +4176,7 @@ kbd_buffer_get_event (KBOARD **kbp,
 
          if (NILP (obj))
            {
-             obj = make_lispy_event (event);
+             obj = make_lispy_event (&event->ie);
 
 #if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) \
     || defined (HAVE_NS) || defined (USE_GTK)
@@ -4185,7 +4186,7 @@ kbd_buffer_get_event (KBOARD **kbp,
                 beginning of the menu sequence, and we might as well leave
                 that as the `event with parameters' for this selection.  */
              if (used_mouse_menu
-                 && !EQ (event->frame_or_window, event->arg)
+                 && !EQ (event->ie.frame_or_window, event->ie.arg)
                  && (event->kind == MENU_BAR_EVENT
                      || event->kind == TOOL_BAR_EVENT))
                *used_mouse_menu = 1;
@@ -4265,7 +4266,7 @@ kbd_buffer_get_event (KBOARD **kbp,
 static void
 process_special_events (void)
 {
-  struct input_event *event;
+  union buffered_input_event *event;
 
   for (event = kbd_fetch_ptr; event != kbd_store_ptr; ++event)
     {
@@ -4288,23 +4289,22 @@ process_special_events (void)
             between kbd_fetch_ptr and EVENT one slot to the right,
             cyclically.  */
 
-         struct input_event copy = *event;
-         struct input_event *beg
+         struct selection_input_event copy = event->sie;
+         union buffered_input_event *beg
            = (kbd_fetch_ptr == kbd_buffer + KBD_BUFFER_SIZE)
            ? kbd_buffer : kbd_fetch_ptr;
 
          if (event > beg)
-           memmove (beg + 1, beg, (event - beg) * sizeof (struct input_event));
+           memmove (beg + 1, beg, (event - beg) * sizeof *beg);
          else if (event < beg)
            {
              if (event > kbd_buffer)
                memmove (kbd_buffer + 1, kbd_buffer,
-                        (event - kbd_buffer) * sizeof (struct input_event));
+                        (event - kbd_buffer) * sizeof *kbd_buffer);
              *kbd_buffer = *(kbd_buffer + KBD_BUFFER_SIZE - 1);
              if (beg < kbd_buffer + KBD_BUFFER_SIZE - 1)
                memmove (beg + 1, beg,
-                        (kbd_buffer + KBD_BUFFER_SIZE - 1 - beg)
-                        * sizeof (struct input_event));
+                        (kbd_buffer + KBD_BUFFER_SIZE - 1 - beg) * sizeof 
*beg);
            }
 
          if (kbd_fetch_ptr == kbd_buffer + KBD_BUFFER_SIZE)
@@ -4376,9 +4376,6 @@ timer_resume_idle (void)
   timer_idleness_start_time = timer_last_idleness_start_time;
 }
 
-/* This is only for debugging.  */
-struct input_event last_timer_event EXTERNALLY_VISIBLE;
-
 /* List of elisp functions to call, delayed because they were generated in
    a context where Elisp could not be safely run (e.g. redisplay, signal,
    ...).  Each element has the form (FUN . ARGS).  */
@@ -10326,7 +10323,7 @@ stuff_buffered_input (Lisp_Object stuffstring)
       if (kbd_fetch_ptr == kbd_buffer + KBD_BUFFER_SIZE)
        kbd_fetch_ptr = kbd_buffer;
       if (kbd_fetch_ptr->kind == ASCII_KEYSTROKE_EVENT)
-       stuff_char (kbd_fetch_ptr->code);
+       stuff_char (kbd_fetch_ptr->ie.code);
 
       clear_event (kbd_fetch_ptr);
     }
@@ -10813,7 +10810,11 @@ The return value is similar to a mouse click position:
 The `posn-' functions access elements of such lists.  */)
   (Lisp_Object x, Lisp_Object y, Lisp_Object frame_or_window, Lisp_Object 
whole)
 {
-  CHECK_NATNUM (x);
+  CHECK_NUMBER (x);
+  /* We allow X of -1, for the newline in a R2L line that overflowed
+     into the left fringe.  */
+  if (XINT (x) != -1)
+    CHECK_NATNUM (x);
   CHECK_NATNUM (y);
 
   if (NILP (frame_or_window))
@@ -10861,8 +10862,9 @@ The `posn-' functions access elements of such lists.  
*/)
       Lisp_Object x = XCAR (tem);
       Lisp_Object y = XCAR (XCDR (tem));
 
-      /* Point invisible due to hscrolling?  */
-      if (XINT (x) < 0)
+      /* Point invisible due to hscrolling?  X can be -1 when a
+        newline in a R2L line overflows into the left fringe.  */
+      if (XINT (x) < -1)
        return Qnil;
       tem = Fposn_at_x_y (x, y, window, Qnil);
     }
@@ -11956,7 +11958,7 @@ mark_kboards (void)
       mark_object (KVAR (kb, echo_string));
     }
   {
-    struct input_event *event;
+    union buffered_input_event *event;
     for (event = kbd_fetch_ptr; event != kbd_store_ptr; event++)
       {
        if (event == kbd_buffer + KBD_BUFFER_SIZE)
@@ -11965,10 +11967,10 @@ mark_kboards (void)
        if (event->kind != SELECTION_REQUEST_EVENT
            && event->kind != SELECTION_CLEAR_EVENT)
          {
-           mark_object (event->x);
-           mark_object (event->y);
-           mark_object (event->frame_or_window);
-           mark_object (event->arg);
+           mark_object (event->ie.x);
+           mark_object (event->ie.y);
+           mark_object (event->ie.frame_or_window);
+           mark_object (event->ie.arg);
          }
       }
   }
diff --git a/src/keyboard.h b/src/keyboard.h
index bcdeaf6..b843e8d 100644
--- a/src/keyboard.h
+++ b/src/keyboard.h
@@ -21,6 +21,10 @@ along with GNU Emacs.  If not, see 
<http://www.gnu.org/licenses/>.  */
 #include "coding.h"             /* for ENCODE_UTF_8 and ENCODE_SYSTEM */
 #include "termhooks.h"
 
+#ifdef HAVE_X11
+# include "xterm.h"            /* for struct selection_input_event */
+#endif
+
 INLINE_HEADER_BEGIN
 
 /* Most code should use this macro to access Lisp fields in struct kboard.  */
@@ -217,6 +221,15 @@ kset_window_system (struct kboard *kb, Lisp_Object val)
   kb->Vwindow_system_ = val;
 }
 
+union buffered_input_event
+{
+  ENUM_BF (event_kind) kind : EVENT_KIND_WIDTH;
+  struct input_event ie;
+#ifdef HAVE_X11
+  struct selection_input_event sie;
+#endif
+};
+
 /* Temporarily used before a frame has been opened. */
 extern KBOARD *initial_kboard;
 
@@ -438,9 +451,20 @@ extern void clear_waiting_for_input (void);
 extern void swallow_events (bool);
 extern bool lucid_event_type_list_p (Lisp_Object);
 extern void kbd_buffer_store_event (struct input_event *);
-extern void kbd_buffer_store_event_hold (struct input_event *,
-                                         struct input_event *);
-extern void kbd_buffer_unget_event (struct input_event *);
+extern void kbd_buffer_store_buffered_event (union buffered_input_event *,
+                                            struct input_event *);
+INLINE void
+kbd_buffer_store_event_hold (struct input_event *event,
+                            struct input_event *hold_quit)
+{
+  verify (alignof (struct input_event) == alignof (union buffered_input_event)
+         && sizeof (struct input_event) == sizeof (union 
buffered_input_event));
+  kbd_buffer_store_buffered_event ((union buffered_input_event *) event,
+                                  hold_quit);
+}
+#ifdef HAVE_X11
+extern void kbd_buffer_unget_event (struct selection_input_event *);
+#endif
 extern void poll_for_input_1 (void);
 extern void show_help_echo (Lisp_Object, Lisp_Object, Lisp_Object,
                             Lisp_Object);
diff --git a/src/keymap.c b/src/keymap.c
index 8f4ac0d..b69b409 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -1652,10 +1652,14 @@ specified buffer position instead of point are used.
 
   if (NILP (position) && VECTORP (key))
     {
-      Lisp_Object event
-       /* mouse events may have a symbolic prefix indicating the
-          scrollbar or mode line */
-       = AREF (key, SYMBOLP (AREF (key, 0)) && ASIZE (key) > 1 ? 1 : 0);
+      Lisp_Object event;
+
+      if (ASIZE (key) == 0)
+       return Qnil;
+
+      /* mouse events may have a symbolic prefix indicating the
+        scrollbar or mode line */
+      event = AREF (key, SYMBOLP (AREF (key, 0)) && ASIZE (key) > 1 ? 1 : 0);
 
       /* We are not interested in locations without event data */
 
diff --git a/src/lisp.h b/src/lisp.h
index 9839cfd..f012cb2 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -278,10 +278,7 @@ error !;
 #endif
 
 #ifndef alignas
-# define alignas(alignment) /* empty */
-# if USE_LSB_TAG
-#  error "USE_LSB_TAG requires alignas"
-# endif
+# error "alignas not defined"
 #endif
 
 #ifdef HAVE_STRUCT_ATTRIBUTE_ALIGNED
@@ -731,9 +728,7 @@ struct Lisp_Symbol
 
 /* Yield an integer that contains a symbol tag along with OFFSET.
    OFFSET should be the offset in bytes from 'lispsym' to the symbol.  */
-#define TAG_SYMOFFSET(offset)                              \
-  TAG_PTR (Lisp_Symbol,                                            \
-          ((uintptr_t) (offset) >> (USE_LSB_TAG ? 0 : GCTYPEBITS)))
+#define TAG_SYMOFFSET(offset) TAG_PTR (Lisp_Symbol, offset)
 
 /* XLI_BUILTIN_LISPSYM (iQwhatever) is equivalent to
    XLI (builtin_lisp_symbol (Qwhatever)),
@@ -905,8 +900,6 @@ INLINE struct Lisp_Symbol *
 XSYMBOL (Lisp_Object a)
 {
   uintptr_t i = (uintptr_t) XUNTAG (a, Lisp_Symbol);
-  if (! USE_LSB_TAG)
-    i <<= GCTYPEBITS;
   void *p = (char *) lispsym + i;
   return p;
 }
@@ -4042,6 +4035,7 @@ extern _Noreturn void verror (const char *, va_list)
   ATTRIBUTE_FORMAT_PRINTF (1, 0);
 extern void un_autoload (Lisp_Object);
 extern Lisp_Object call_debugger (Lisp_Object arg);
+extern void *near_C_stack_top (void);
 extern void init_eval_once (void);
 extern Lisp_Object safe_call (ptrdiff_t, Lisp_Object, ...);
 extern Lisp_Object safe_call1 (Lisp_Object, Lisp_Object);
@@ -4067,7 +4061,7 @@ extern _Noreturn void time_overflow (void);
 extern Lisp_Object make_buffer_string (ptrdiff_t, ptrdiff_t, bool);
 extern Lisp_Object make_buffer_string_both (ptrdiff_t, ptrdiff_t, ptrdiff_t,
                                            ptrdiff_t, bool);
-extern void init_editfns (void);
+extern void init_editfns (bool);
 extern void syms_of_editfns (void);
 
 /* Defined in buffer.c.  */
diff --git a/src/macfont.m b/src/macfont.m
index cbf1b07..02dc468 100644
--- a/src/macfont.m
+++ b/src/macfont.m
@@ -897,14 +897,152 @@ macfont_descriptor_entity (FontDescriptorRef desc, 
Lisp_Object extra,
   return entity;
 }
 
+/* Cache for font family name symbols vs CFStrings.  A value of nil
+means the cache has been invalidated.  Otherwise the value is a Lisp
+hash table whose keys are symbols and the value for a key is either
+nil (no corresponding family name) or a Lisp save value wrapping the
+corresponding family name in CFString.  */
+
+static Lisp_Object macfont_family_cache;
+
+static void
+macfont_invalidate_family_cache (void)
+{
+  if (HASH_TABLE_P (macfont_family_cache))
+    {
+      struct Lisp_Hash_Table *h = XHASH_TABLE (macfont_family_cache);
+      ptrdiff_t i, size = HASH_TABLE_SIZE (h);
+
+      for (i = 0; i < size; ++i)
+       if (!NILP (HASH_HASH (h, i)))
+         {
+           Lisp_Object value = HASH_VALUE (h, i);
+
+           if (SAVE_VALUEP (value))
+             CFRelease (XSAVE_POINTER (value, 0));
+         }
+      macfont_family_cache = Qnil;
+    }
+}
+
+static bool
+macfont_get_family_cache_if_present (Lisp_Object symbol, CFStringRef *string)
+{
+  if (HASH_TABLE_P (macfont_family_cache))
+    {
+      struct Lisp_Hash_Table *h = XHASH_TABLE (macfont_family_cache);
+      ptrdiff_t i = hash_lookup (h, symbol, NULL);
+
+      if (i >= 0)
+       {
+         Lisp_Object value = HASH_VALUE (h, i);
+
+         *string = SAVE_VALUEP (value) ? XSAVE_POINTER (value, 0) : NULL;
+
+         return true;
+       }
+    }
+
+  return false;
+}
+
+static void
+macfont_set_family_cache (Lisp_Object symbol, CFStringRef string)
+{
+  struct Lisp_Hash_Table *h;
+  ptrdiff_t i;
+  EMACS_UINT hash;
+  Lisp_Object value;
+
+  if (!HASH_TABLE_P (macfont_family_cache))
+    {
+      Lisp_Object args[2];
+
+      args[0] = QCtest;
+      args[1] = Qeq;
+      macfont_family_cache = Fmake_hash_table (2, args);
+    }
+
+  h = XHASH_TABLE (macfont_family_cache);
+  i = hash_lookup (h, symbol, &hash);
+  value = string ? make_save_ptr ((void *) CFRetain (string)) : Qnil;
+  if (i >= 0)
+    {
+      Lisp_Object old_value = HASH_VALUE (h, i);
+
+      if (SAVE_VALUEP (old_value))
+       CFRelease (XSAVE_POINTER (old_value, 0));
+      set_hash_value_slot (h, i, value);
+    }
+  else
+    hash_put (h, symbol, value, hash);
+}
+
+/* Cache of all the available font family names except "LastResort"
+and those start with ".".  NULL means the cache has been invalidated.
+Otherwise, the value is CFArray of CFStrings and the elements are
+sorted in the canonical order (CTFontManagerCompareFontFamilyNames on
+OS X 10.6 and later).  */
+
+static CFArrayRef macfont_available_families_cache = NULL;
+
+static void
+macfont_invalidate_available_families_cache (void)
+{
+  if (macfont_available_families_cache)
+    {
+      CFRelease (macfont_available_families_cache);
+      macfont_available_families_cache = NULL;
+    }
+}
+
+static void
+macfont_handle_font_change_notification (CFNotificationCenterRef center,
+                                        void *observer,
+                                        CFStringRef name, const void *object,
+                                        CFDictionaryRef userInfo)
+{
+  macfont_invalidate_family_cache ();
+  macfont_invalidate_available_families_cache ();
+}
+
+static void
+macfont_init_font_change_handler (void)
+{
+  static bool initialized = false;
+
+  if (initialized)
+    return;
+
+  initialized = true;
+  CFNotificationCenterAddObserver
+    (CFNotificationCenterGetLocalCenter (), NULL,
+     macfont_handle_font_change_notification,
+     kCTFontManagerRegisteredFontsChangedNotification,
+     NULL, CFNotificationSuspensionBehaviorCoalesce);
+}
+
+static CFArrayRef
+macfont_copy_available_families_cache (void)
+{
+  macfont_init_font_change_handler ();
+
+  if (macfont_available_families_cache == NULL)
+    macfont_available_families_cache = mac_font_create_available_families ();
+
+  return (macfont_available_families_cache
+         ? CFRetain (macfont_available_families_cache) : NULL);
+}
+
 static CFStringRef
 macfont_create_family_with_symbol (Lisp_Object symbol)
 {
-  static CFArrayRef families = NULL;
   CFStringRef result = NULL, family_name;
-  int using_cache_p = 1;
   CFComparatorFunction family_name_comparator;
 
+  if (macfont_get_family_cache_if_present (symbol, &result))
+    return result ? CFRetain (result) : NULL;
+
   family_name = cfstring_create_with_string_noencode (SYMBOL_NAME (symbol));
   if (family_name == NULL)
     return NULL;
@@ -917,42 +1055,32 @@ macfont_create_family_with_symbol (Lisp_Object symbol)
       == kCFCompareEqualTo)
     result = CFSTR ("LastResort");
   else
-    while (1)
-      {
-        CFIndex i, count;
-
-        if (families == NULL)
-          {
-            families = mac_font_create_available_families ();
-            using_cache_p = 0;
-            if (families == NULL)
-              break;
-          }
+    {
+      CFIndex i, count;
+      CFArrayRef families = macfont_copy_available_families_cache ();
 
-        count = CFArrayGetCount (families);
-        i = CFArrayBSearchValues (families, CFRangeMake (0, count),
-                                  (const void *) family_name,
-                                  family_name_comparator, NULL);
-        if (i < count)
-          {
-            CFStringRef name = CFArrayGetValueAtIndex (families, i);
+      if (families)
+       {
+         count = CFArrayGetCount (families);
+         i = CFArrayBSearchValues (families, CFRangeMake (0, count),
+                                   (const void *) family_name,
+                                   family_name_comparator, NULL);
+         if (i < count)
+           {
+             CFStringRef name = CFArrayGetValueAtIndex (families, i);
 
-            if ((*family_name_comparator) (name, family_name, NULL)
-                == kCFCompareEqualTo)
-              result = CFRetain (name);
-          }
-
-        if (result || !using_cache_p)
-          break;
-        else
-          {
-            CFRelease (families);
-            families = NULL;
-          }
-      }
+             if ((*family_name_comparator) (name, family_name, NULL)
+                 == kCFCompareEqualTo)
+               result = CFRetain (name);
+           }
+         CFRelease (families);
+       }
+    }
 
   CFRelease (family_name);
 
+  macfont_set_family_cache (symbol, result);
+
   return result;
 }
 
@@ -2091,7 +2219,7 @@ macfont_list (struct frame *f, Lisp_Object spec)
       CFStringRef pref_family;
       CFIndex families_count, pref_family_index = -1;
 
-      families = mac_font_create_available_families ();
+      families = macfont_copy_available_families_cache ();
       if (families == NULL)
         goto err;
 
@@ -2198,7 +2326,7 @@ macfont_list (struct frame *f, Lisp_Object spec)
         }
       CFRelease (pat_desc);
       if (! descs)
-        goto err;
+        continue;
 
       descs_count = CFArrayGetCount (descs);
       if (descs_count == 0
@@ -2380,7 +2508,7 @@ macfont_list_family (struct frame *frame)
 
   block_input ();
 
-  families = mac_font_create_available_families ();
+  families = macfont_copy_available_families_cache ();
   if (families)
     {
       CFIndex i, count = CFArrayGetCount (families);
@@ -3393,15 +3521,25 @@ mac_ctfont_create_preferred_family_for_attributes 
(CFDictionaryRef attributes)
 static inline double
 mac_ctfont_get_advance_width_for_glyph (CTFontRef font, CGGlyph glyph)
 {
-  return CTFontGetAdvancesForGlyphs (font, kCTFontDefaultOrientation,
-                                     &glyph, NULL, 1);
+  return CTFontGetAdvancesForGlyphs (font,
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1080
+                                    kCTFontOrientationDefault,
+#else
+                                    kCTFontDefaultOrientation,
+#endif
+                                    &glyph, NULL, 1);
 }
 
 static inline CGRect
 mac_ctfont_get_bounding_rect_for_glyph (CTFontRef font, CGGlyph glyph)
 {
-  return CTFontGetBoundingRectsForGlyphs (font, kCTFontDefaultOrientation,
-                                          &glyph, NULL, 1);
+  return CTFontGetBoundingRectsForGlyphs (font,
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1080
+                                         kCTFontOrientationDefault,
+#else
+                                         kCTFontDefaultOrientation,
+#endif
+                                         &glyph, NULL, 1);
 }
 
 static CFArrayRef
@@ -3763,7 +3901,7 @@ mac_font_copy_default_descriptors_for_language 
(CFStringRef language)
 #endif
     {
       CTFontRef user_font =
-        CTFontCreateUIFontForLanguage (kCTFontUserFontType, 0, language);
+       CTFontCreateUIFontForLanguage (kCTFontUIFontUser, 0, language);
 
       if (user_font)
         {
@@ -3923,4 +4061,7 @@ syms_of_macfont (void)
 
   /* The boolean-valued font property key specifying the use of leading.  */
   DEFSYM (QCminspace, ":minspace");
+
+  macfont_family_cache = Qnil;
+  staticpro (&macfont_family_cache);
 }
diff --git a/src/nsfns.m b/src/nsfns.m
index 6a2e2ff..0fc867c 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -70,9 +70,7 @@ Lisp_Object Fx_open_connection (Lisp_Object, Lisp_Object, 
Lisp_Object);
 static Lisp_Object as_script, *as_result;
 static int as_status;
 
-#ifdef GLYPH_DEBUG
 static ptrdiff_t image_cache_refcount;
-#endif
 
 
 /* ==========================================================================
@@ -1005,6 +1003,17 @@ unwind_create_frame (Lisp_Object frame)
       struct ns_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
 #endif
 
+      /* If the frame's image cache refcount is still the same as our
+        private shadow variable, it means we are unwinding a frame
+        for which we didn't yet call init_frame_faces, where the
+        refcount is incremented.  Therefore, we increment it here, so
+        that free_frame_faces, called in x_free_frame_resources
+        below, will not mistakenly decrement the counter that was not
+        incremented yet to account for this new frame.  */
+      if (FRAME_IMAGE_CACHE (f) != NULL
+         && FRAME_IMAGE_CACHE (f)->refcount == image_cache_refcount)
+       FRAME_IMAGE_CACHE (f)->refcount++;
+
       x_free_frame_resources (f);
       free_glyphs (f);
 
@@ -1187,6 +1196,9 @@ This function is an internal primitive--use `make-frame' 
instead.  */)
     register_font_driver (&nsfont_driver, f);
 #endif
 
+  image_cache_refcount =
+    FRAME_IMAGE_CACHE (f) ? FRAME_IMAGE_CACHE (f)->refcount : 0;
+
   x_default_parameter (f, parms, Qfont_backend, Qnil,
                        "fontBackend", "FontBackend", RES_TYPE_STRING);
 
@@ -1241,11 +1253,6 @@ This function is an internal primitive--use `make-frame' 
instead.  */)
   x_default_parameter (f, parms, Qright_fringe, Qnil,
                       "rightFringe", "RightFringe", RES_TYPE_NUMBER);
 
-#ifdef GLYPH_DEBUG
-  image_cache_refcount =
-    FRAME_IMAGE_CACHE (f) ? FRAME_IMAGE_CACHE (f)->refcount : 0;
-#endif
-
   init_frame_faces (f);
 
   /* Read comment about this code in corresponding place in xfns.c.  */
@@ -2666,7 +2673,7 @@ compute_tip_xy (struct frame *f,
                 int *root_x,
                 int *root_y)
 {
-  Lisp_Object left, top;
+  Lisp_Object left, top, right, bottom;
   EmacsView *view = FRAME_NS_VIEW (f);
   struct ns_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
   NSPoint pt;
@@ -2674,8 +2681,11 @@ compute_tip_xy (struct frame *f,
   /* Start with user-specified or mouse position.  */
   left = Fcdr (Fassq (Qleft, parms));
   top = Fcdr (Fassq (Qtop, parms));
+  right = Fcdr (Fassq (Qright, parms));
+  bottom = Fcdr (Fassq (Qbottom, parms));
 
-  if (!INTEGERP (left) || !INTEGERP (top))
+  if ((!INTEGERP (left) && !INTEGERP (right))
+      || (!INTEGERP (top) && !INTEGERP (bottom)))
     {
       pt.x = dpyinfo->last_mouse_motion_x;
       pt.y = dpyinfo->last_mouse_motion_y;
@@ -2695,13 +2705,14 @@ compute_tip_xy (struct frame *f,
   else
     {
       /* Absolute coordinates.  */
-      pt.x = XINT (left);
-      pt.y = x_display_pixel_height (FRAME_DISPLAY_INFO (f)) - XINT (top)
-        - height;
+      pt.x = INTEGERP (left) ? XINT (left) : XINT (right);
+      pt.y = (x_display_pixel_height (FRAME_DISPLAY_INFO (f))
+             - (INTEGERP (top) ? XINT (top) : XINT (bottom))
+             - height);
     }
 
   /* Ensure in bounds.  (Note, screen origin = lower left.) */
-  if (INTEGERP (left))
+  if (INTEGERP (left) || INTEGERP (right))
     *root_x = pt.x;
   else if (pt.x + XINT (dx) <= 0)
     *root_x = 0; /* Can happen for negative dx */
@@ -2716,7 +2727,7 @@ compute_tip_xy (struct frame *f,
     /* Put it left justified on the screen -- it ought to fit that way.  */
     *root_x = 0;
 
-  if (INTEGERP (top))
+  if (INTEGERP (top) || INTEGERP (bottom))
     *root_y = pt.y;
   else if (pt.y - XINT (dy) - height >= 0)
     /* It fits below the pointer.  */
@@ -2746,12 +2757,18 @@ Automatically hide the tooltip after TIMEOUT seconds.  
TIMEOUT nil
 means use the default timeout of 5 seconds.
 
 If the list of frame parameters PARMS contains a `left' parameter,
-the tooltip is displayed at that x-position.  Otherwise it is
-displayed at the mouse position, with offset DX added (default is 5 if
-DX isn't specified).  Likewise for the y-position; if a `top' frame
-parameter is specified, it determines the y-position of the tooltip
-window, otherwise it is displayed at the mouse position, with offset
-DY added (default is -10).
+display the tooltip at that x-position.  If the list of frame parameters
+PARMS contains no `left' but a `right' parameter, display the tooltip
+right-adjusted at that x-position. Otherwise display it at the
+x-position of the mouse, with offset DX added (default is 5 if DX isn't
+specified).
+
+Likewise for the y-position: If a `top' frame parameter is specified, it
+determines the position of the upper edge of the tooltip window.  If a
+`bottom' parameter but no `top' frame parameter is specified, it
+determines the position of the lower edge of the tooltip window.
+Otherwise display the tooltip window at the y-position of the mouse,
+with offset DY added (default is -10).
 
 A tooltip's maximum size is specified by `x-max-tooltip-size'.
 Text larger than the specified size is clipped.  */)
@@ -2860,18 +2877,24 @@ elements (all size values are in pixels).
   int inner_width = FRAME_PIXEL_WIDTH (f);
   int inner_height = FRAME_PIXEL_HEIGHT (f);
   Lisp_Object fullscreen = Fframe_parameter (frame, Qfullscreen);
-  int border = f->border_width;
-  int title = FRAME_NS_TITLEBAR_HEIGHT (f);
-  int outer_width = FRAME_PIXEL_WIDTH (f) + 2 * border;
-  int outer_height = FRAME_PIXEL_HEIGHT (f) + 2 * border;
-  int tool_bar_height = FRAME_TOOLBAR_HEIGHT (f);
-  int tool_bar_width = tool_bar_height > 0
-    ? outer_width - 2 * FRAME_INTERNAL_BORDER_WIDTH (f)
-    : 0;
+  int border, title, outer_width, outer_height;
+  int tool_bar_height, tool_bar_width;
   // Always 0 on NS.
   int menu_bar_height = 0;
   int menu_bar_width = 0;
 
+  if (FRAME_INITIAL_P (f) || !FRAME_NS_P (f))
+    return Qnil;
+
+  border = f->border_width;
+  title = FRAME_NS_TITLEBAR_HEIGHT (f);
+  outer_width = FRAME_PIXEL_WIDTH (f) + 2 * border;
+  outer_height = FRAME_PIXEL_HEIGHT (f) + 2 * border;
+  tool_bar_height = FRAME_TOOLBAR_HEIGHT (f);
+  tool_bar_width = tool_bar_height > 0
+    ? outer_width - 2 * FRAME_INTERNAL_BORDER_WIDTH (f)
+    : 0;
+
   return
     listn (CONSTYPE_HEAP, 10,
           Fcons (Qframe_position,
@@ -2900,7 +2923,6 @@ elements (all size values are in pixels).
                         make_number (inner_height))));
 }
 
-
 /* ==========================================================================
 
     Class implementations
diff --git a/src/nsterm.m b/src/nsterm.m
index 67a0389..2806f31 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -2928,6 +2928,11 @@ ns_maybe_dumpglyphs_background (struct glyph_string *s, 
char force_p)
     {
       int box_line_width = max (s->face->box_line_width, 0);
       if (FONT_HEIGHT (s->font) < s->height - 2 * box_line_width
+         /* When xdisp.c ignores FONT_HEIGHT, we cannot trust font
+            dimensions, since the actual glyphs might be much
+            smaller.  So in that case we always clear the rectangle
+            with background color.  */
+         || FONT_TOO_HIGH (s->font)
           || s->font_not_found_p || s->extends_to_end_of_line_p || force_p)
        {
           struct face *face;
@@ -7687,6 +7692,7 @@ x_new_font (struct frame *f, Lisp_Object font_object, int 
fontset)
 {
   struct font *font = XFONT_OBJECT (font_object);
   EmacsView *view = FRAME_NS_VIEW (f);
+  int font_ascent, font_descent;
 
   if (fontset < 0)
     fontset = fontset_from_font (font_object);
@@ -7701,7 +7707,8 @@ x_new_font (struct frame *f, Lisp_Object font_object, int 
fontset)
 
   FRAME_BASELINE_OFFSET (f) = font->baseline_offset;
   FRAME_COLUMN_WIDTH (f) = font->average_width;
-  FRAME_LINE_HEIGHT (f) = font->height;
+  get_font_ascent_descent (font, &font_ascent, &font_descent);
+  FRAME_LINE_HEIGHT (f) = font_ascent + font_descent;
 
   /* Compute the scroll bar width in character columns.  */
   if (FRAME_CONFIG_SCROLL_BAR_WIDTH (f) > 0)
diff --git a/src/print.c b/src/print.c
index e1cf7c0..eb24d46 100644
--- a/src/print.c
+++ b/src/print.c
@@ -1590,33 +1590,32 @@ print_object (Lisp_Object obj, Lisp_Object 
printcharfun, bool escapeflag)
          && print_depth > XINT (Vprint_level))
        print_c_string ("...", printcharfun);
       else if (print_quoted && CONSP (XCDR (obj)) && NILP (XCDR (XCDR (obj)))
-              && (EQ (XCAR (obj), Qquote)))
+              && EQ (XCAR (obj), Qquote))
        {
          printchar ('\'', printcharfun);
          print_object (XCAR (XCDR (obj)), printcharfun, escapeflag);
        }
       else if (print_quoted && CONSP (XCDR (obj)) && NILP (XCDR (XCDR (obj)))
-              && (EQ (XCAR (obj), Qfunction)))
+              && EQ (XCAR (obj), Qfunction))
        {
          print_c_string ("#'", printcharfun);
          print_object (XCAR (XCDR (obj)), printcharfun, escapeflag);
        }
       else if (print_quoted && CONSP (XCDR (obj)) && NILP (XCDR (XCDR (obj)))
-              && ((EQ (XCAR (obj), Qbackquote))))
+              && EQ (XCAR (obj), Qbackquote))
        {
-         print_object (XCAR (obj), printcharfun, 0);
+         printchar ('`', printcharfun);
          new_backquote_output++;
          print_object (XCAR (XCDR (obj)), printcharfun, escapeflag);
          new_backquote_output--;
        }
       else if (print_quoted && CONSP (XCDR (obj)) && NILP (XCDR (XCDR (obj)))
               && new_backquote_output
-              && ((EQ (XCAR (obj), Qbackquote)
-                   || EQ (XCAR (obj), Qcomma)
-                   || EQ (XCAR (obj), Qcomma_at)
-                   || EQ (XCAR (obj), Qcomma_dot))))
+              && (EQ (XCAR (obj), Qcomma)
+                  || EQ (XCAR (obj), Qcomma_at)
+                  || EQ (XCAR (obj), Qcomma_dot)))
        {
-         print_object (XCAR (obj), printcharfun, 0);
+         print_object (XCAR (obj), printcharfun, false);
          new_backquote_output--;
          print_object (XCAR (XCDR (obj)), printcharfun, escapeflag);
          new_backquote_output++;
diff --git a/src/process.c b/src/process.c
index 17fe708..9d8fa22 100644
--- a/src/process.c
+++ b/src/process.c
@@ -224,11 +224,6 @@ static EMACS_INT update_tick;
 # define HAVE_SEQPACKET
 #endif
 
-#if !defined (ADAPTIVE_READ_BUFFERING) && !defined (NO_ADAPTIVE_READ_BUFFERING)
-#define ADAPTIVE_READ_BUFFERING
-#endif
-
-#ifdef ADAPTIVE_READ_BUFFERING
 #define READ_OUTPUT_DELAY_INCREMENT (TIMESPEC_RESOLUTION / 100)
 #define READ_OUTPUT_DELAY_MAX       (READ_OUTPUT_DELAY_INCREMENT * 5)
 #define READ_OUTPUT_DELAY_MAX_MAX   (READ_OUTPUT_DELAY_INCREMENT * 7)
@@ -242,10 +237,6 @@ static int process_output_delay_count;
 
 static bool process_output_skip;
 
-#else
-#define process_output_delay_count 0
-#endif
-
 static void create_process (Lisp_Object, char **, Lisp_Object);
 #ifdef USABLE_SIGIO
 static bool keyboard_bit_set (fd_set *);
@@ -658,22 +649,24 @@ allocate_pty (char pty_name[PTY_NAME_SIZE])
 
        if (fd >= 0)
          {
-#ifdef PTY_OPEN
+#ifdef PTY_TTY_NAME_SPRINTF
+           PTY_TTY_NAME_SPRINTF
+#else
+           sprintf (pty_name, "/dev/tty%c%x", c, i);
+#endif /* no PTY_TTY_NAME_SPRINTF */
+
            /* Set FD's close-on-exec flag.  This is needed even if
               PT_OPEN calls posix_openpt with O_CLOEXEC, since POSIX
               doesn't require support for that combination.
+              Do this after PTY_TTY_NAME_SPRINTF, which on some platforms
+              doesn't work if the close-on-exec flag is set (Bug#20555).
               Multithreaded platforms where posix_openpt ignores
               O_CLOEXEC (or where PTY_OPEN doesn't call posix_openpt)
               have a race condition between the PTY_OPEN and here.  */
            fcntl (fd, F_SETFD, FD_CLOEXEC);
-#endif
-           /* Check to make certain that both sides are available
-              this avoids a nasty yet stupid bug in rlogins.  */
-#ifdef PTY_TTY_NAME_SPRINTF
-           PTY_TTY_NAME_SPRINTF
-#else
-           sprintf (pty_name, "/dev/tty%c%x", c, i);
-#endif /* no PTY_TTY_NAME_SPRINTF */
+
+           /* Check to make certain that both sides are available.
+              This avoids a nasty yet stupid bug in rlogins.  */
            if (faccessat (AT_FDCWD, pty_name, R_OK | W_OK, AT_EACCESS) != 0)
              {
                emacs_close (fd);
@@ -1515,11 +1508,9 @@ usage: (make-process &rest ARGS)  */)
   pset_gnutls_cred_type (XPROCESS (proc), Qnil);
 #endif
 
-#ifdef ADAPTIVE_READ_BUFFERING
   XPROCESS (proc)->adaptive_read_buffering
     = (NILP (Vprocess_adaptive_read_buffering) ? 0
        : EQ (Vprocess_adaptive_read_buffering, Qt) ? 1 : 2);
-#endif
 
   /* Make the process marker point into the process buffer (if any).  */
   if (BUFFERP (buffer))
@@ -1843,35 +1834,29 @@ create_process (Lisp_Object process, char **new_argv, 
Lisp_Object current_dir)
 
 #ifndef WINDOWSNT
   /* vfork, and prevent local vars from being clobbered by the vfork.  */
-  {
-    Lisp_Object volatile current_dir_volatile = current_dir;
-    Lisp_Object volatile lisp_pty_name_volatile = lisp_pty_name;
-    char **volatile new_argv_volatile = new_argv;
-    int volatile forkin_volatile = forkin;
-    int volatile forkout_volatile = forkout;
-    int volatile forkerr_volatile = forkerr;
-    struct Lisp_Process *p_volatile = p;
-
-    pid = vfork ();
-
-    current_dir = current_dir_volatile;
-    lisp_pty_name = lisp_pty_name_volatile;
-    new_argv = new_argv_volatile;
-    forkin = forkin_volatile;
-    forkout = forkout_volatile;
-    forkerr = forkerr_volatile;
-    p = p_volatile;
-
-    pty_flag = p->pty_flag;
-  }
+  Lisp_Object volatile current_dir_volatile = current_dir;
+  Lisp_Object volatile lisp_pty_name_volatile = lisp_pty_name;
+  char **volatile new_argv_volatile = new_argv;
+  int volatile forkin_volatile = forkin;
+  int volatile forkout_volatile = forkout;
+  int volatile forkerr_volatile = forkerr;
+  struct Lisp_Process *p_volatile = p;
+
+  pid = vfork ();
+
+  current_dir = current_dir_volatile;
+  lisp_pty_name = lisp_pty_name_volatile;
+  new_argv = new_argv_volatile;
+  forkin = forkin_volatile;
+  forkout = forkout_volatile;
+  forkerr = forkerr_volatile;
+  p = p_volatile;
+
+  pty_flag = p->pty_flag;
 
   if (pid == 0)
 #endif /* not WINDOWSNT */
     {
-      int xforkin = forkin;
-      int xforkout = forkout;
-      int xforkerr = forkerr;
-
       /* Make the pty be the controlling terminal of the process.  */
 #ifdef HAVE_PTYS
       /* First, disconnect its current controlling terminal.  */
@@ -1879,30 +1864,30 @@ create_process (Lisp_Object process, char **new_argv, 
Lisp_Object current_dir)
         process_set_signal to fail on SGI when using a pipe.  */
       setsid ();
       /* Make the pty's terminal the controlling terminal.  */
-      if (pty_flag && xforkin >= 0)
+      if (pty_flag && forkin >= 0)
        {
 #ifdef TIOCSCTTY
          /* We ignore the return value
             because address@hidden says that is necessary on Linux.  */
-         ioctl (xforkin, TIOCSCTTY, 0);
+         ioctl (forkin, TIOCSCTTY, 0);
 #endif
        }
 #if defined (LDISC1)
-      if (pty_flag && xforkin >= 0)
+      if (pty_flag && forkin >= 0)
        {
          struct termios t;
-         tcgetattr (xforkin, &t);
+         tcgetattr (forkin, &t);
          t.c_lflag = LDISC1;
-         if (tcsetattr (xforkin, TCSANOW, &t) < 0)
+         if (tcsetattr (forkin, TCSANOW, &t) < 0)
            emacs_perror ("create_process/tcsetattr LDISC1");
        }
 #else
 #if defined (NTTYDISC) && defined (TIOCSETD)
-      if (pty_flag && xforkin >= 0)
+      if (pty_flag && forkin >= 0)
        {
          /* Use new line discipline.  */
          int ldisc = NTTYDISC;
-         ioctl (xforkin, TIOCSETD, &ldisc);
+         ioctl (forkin, TIOCSETD, &ldisc);
        }
 #endif
 #endif
@@ -1935,11 +1920,11 @@ create_process (Lisp_Object process, char **new_argv, 
Lisp_Object current_dir)
 
          /* I wonder if emacs_close (emacs_open (SSDATA (lisp_pty_name), ...))
             would work?  */
-         if (xforkin >= 0)
-           emacs_close (xforkin);
-         xforkout = xforkin = emacs_open (SSDATA (lisp_pty_name), O_RDWR, 0);
+         if (forkin >= 0)
+           emacs_close (forkin);
+         forkout = forkin = emacs_open (SSDATA (lisp_pty_name), O_RDWR, 0);
 
-         if (xforkin < 0)
+         if (forkin < 0)
            {
              emacs_perror (SSDATA (lisp_pty_name));
              _exit (EXIT_CANCELED);
@@ -1969,14 +1954,14 @@ create_process (Lisp_Object process, char **new_argv, 
Lisp_Object current_dir)
       unblock_child_signal (&oldset);
 
       if (pty_flag)
-       child_setup_tty (xforkout);
+       child_setup_tty (forkout);
 
-      if (xforkerr < 0)
-       xforkerr = xforkout;
+      if (forkerr < 0)
+       forkerr = forkout;
 #ifdef WINDOWSNT
-      pid = child_setup (xforkin, xforkout, xforkerr, new_argv, 1, 
current_dir);
+      pid = child_setup (forkin, forkout, forkerr, new_argv, 1, current_dir);
 #else  /* not WINDOWSNT */
-      child_setup (xforkin, xforkout, xforkerr, new_argv, 1, current_dir);
+      child_setup (forkin, forkout, forkerr, new_argv, 1, current_dir);
 #endif /* not WINDOWSNT */
     }
 
@@ -2188,11 +2173,9 @@ usage:  (make-pipe-process &rest ARGS)  */)
       FD_SET (inchannel, &input_wait_mask);
       FD_SET (inchannel, &non_keyboard_wait_mask);
     }
-#ifdef ADAPTIVE_READ_BUFFERING
   p->adaptive_read_buffering
     = (NILP (Vprocess_adaptive_read_buffering) ? 0
        : EQ (Vprocess_adaptive_read_buffering, Qt) ? 1 : 2);
-#endif
 
   /* Make the process marker point into the process buffer (if any).  */
   if (BUFFERP (buffer))
@@ -4187,7 +4170,6 @@ deactivate_process (Lisp_Object proc)
   emacs_gnutls_deinit (proc);
 #endif /* HAVE_GNUTLS */
 
-#ifdef ADAPTIVE_READ_BUFFERING
   if (p->read_output_delay > 0)
     {
       if (--process_output_delay_count < 0)
@@ -4195,7 +4177,6 @@ deactivate_process (Lisp_Object proc)
       p->read_output_delay = 0;
       p->read_output_skip = 0;
     }
-#endif
 
   /* Beware SIGCHLD hereabouts.  */
 
@@ -4604,10 +4585,15 @@ wait_reading_process_output (intmax_t time_limit, int 
nsecs, int read_kbd,
   bool no_avail;
   int xerrno;
   Lisp_Object proc;
-  struct timespec timeout, end_time;
-  int got_some_input = -1;
+  struct timespec timeout, end_time, timer_delay;
+  struct timespec got_output_end_time = invalid_timespec ();
+  enum { MINIMUM = -1, TIMEOUT, INFINITY } wait;
+  int got_some_output = -1;
   ptrdiff_t count = SPECPDL_INDEX ();
 
+  /* Close to the current time if known, an invalid timespec otherwise.  */
+  struct timespec now = invalid_timespec ();
+
   FD_ZERO (&Available);
   FD_ZERO (&Writeok);
 
@@ -4620,25 +4606,23 @@ wait_reading_process_output (intmax_t time_limit, int 
nsecs, int read_kbd,
                             waiting_for_user_input_p);
   waiting_for_user_input_p = read_kbd;
 
-  if (time_limit < 0)
-    {
-      time_limit = 0;
-      nsecs = -1;
-    }
-  else if (TYPE_MAXIMUM (time_t) < time_limit)
+  if (TYPE_MAXIMUM (time_t) < time_limit)
     time_limit = TYPE_MAXIMUM (time_t);
 
-  /* Since we may need to wait several times,
-     compute the absolute time to return at.  */
-  if (time_limit || nsecs > 0)
+  if (time_limit < 0 || nsecs < 0)
+    wait = MINIMUM;
+  else if (time_limit > 0 || nsecs > 0)
     {
-      timeout = make_timespec (time_limit, nsecs);
-      end_time = timespec_add (current_timespec (), timeout);
+      wait = TIMEOUT;
+      now = current_timespec ();
+      end_time = timespec_add (now, make_timespec (time_limit, nsecs));
     }
+  else
+    wait = INFINITY;
 
   while (1)
     {
-      bool timeout_reduced_for_timers = false;
+      bool process_skipped = false;
 
       /* If calling from keyboard input, do not quit
         since we want to return C-g as an input character.
@@ -4652,31 +4636,18 @@ wait_reading_process_output (intmax_t time_limit, int 
nsecs, int read_kbd,
       if (! NILP (wait_for_cell) && ! NILP (XCAR (wait_for_cell)))
        break;
 
-      /* After reading input, vacuum up any leftovers without waiting.  */
-      if (0 <= got_some_input)
-       nsecs = -1;
-
       /* Compute time from now till when time limit is up.  */
       /* Exit if already run out.  */
-      if (nsecs < 0)
-       {
-         /* A negative timeout means
-            gobble output available now
-            but don't wait at all.  */
-
-         timeout = make_timespec (0, 0);
-       }
-      else if (time_limit || nsecs > 0)
+      if (wait == TIMEOUT)
        {
-         struct timespec now = current_timespec ();
+         if (!timespec_valid_p (now))
+           now = current_timespec ();
          if (timespec_cmp (end_time, now) <= 0)
            break;
          timeout = timespec_sub (end_time, now);
        }
       else
-       {
-         timeout = make_timespec (100000, 0);
-       }
+       timeout = make_timespec (wait < TIMEOUT ? 0 : 100000, 0);
 
       /* Normally we run timers here.
         But not if wait_for_cell; in those cases,
@@ -4685,8 +4656,6 @@ wait_reading_process_output (intmax_t time_limit, int 
nsecs, int read_kbd,
       if (NILP (wait_for_cell)
          && just_wait_proc >= 0)
        {
-         struct timespec timer_delay;
-
          do
            {
              unsigned old_timers_run = timers_run;
@@ -4717,24 +4686,10 @@ wait_reading_process_output (intmax_t time_limit, int 
nsecs, int read_kbd,
              && requeued_events_pending_p ())
            break;
 
-         /* A negative timeout means do not wait at all.  */
-         if (nsecs >= 0)
-           {
-             if (timespec_valid_p (timer_delay))
-               {
-                 if (timespec_cmp (timer_delay, timeout) < 0)
-                   {
-                     timeout = timer_delay;
-                     timeout_reduced_for_timers = true;
-                   }
-               }
-             else
-               {
-                 /* This is so a breakpoint can be put here.  */
-                 wait_reading_process_output_1 ();
-               }
-           }
-       }
+          /* This is so a breakpoint can be put here.  */
+          if (!timespec_valid_p (timer_delay))
+              wait_reading_process_output_1 ();
+        }
 
       /* Cause C-g and alarm signals to take immediate action,
         and cause input available signals to zero out timeout.
@@ -4774,7 +4729,7 @@ wait_reading_process_output (intmax_t time_limit, int 
nsecs, int read_kbd,
              /* It's okay for us to do this and then continue with
                 the loop, since timeout has already been zeroed out.  */
              clear_waiting_for_input ();
-             got_some_input = status_notify (NULL, wait_proc);
+             got_some_output = status_notify (NULL, wait_proc);
              if (do_display) redisplay_preserve_echo_area (13);
            }
        }
@@ -4810,8 +4765,8 @@ wait_reading_process_output (intmax_t time_limit, int 
nsecs, int read_kbd,
                    }
                  else
                    {
-                     if (got_some_input < nread)
-                       got_some_input = nread;
+                     if (got_some_output < nread)
+                       got_some_output = nread;
                      if (nread == 0)
                        break;
                      read_some_bytes = true;
@@ -4877,11 +4832,8 @@ wait_reading_process_output (intmax_t time_limit, int 
nsecs, int read_kbd,
          no_avail = 1;
          FD_ZERO (&Available);
        }
-
-      if (!no_avail)
+      else
        {
-
-#ifdef ADAPTIVE_READ_BUFFERING
          /* Set the timeout for adaptive read buffering if any
             process has non-zero read_output_skip and non-zero
             read_output_delay, and we are not reading output for a
@@ -4889,9 +4841,9 @@ wait_reading_process_output (intmax_t time_limit, int 
nsecs, int read_kbd,
             Vprocess_adaptive_read_buffering is nil.  */
          if (process_output_skip && check_delay > 0)
            {
-             int nsecs = timeout.tv_nsec;
-             if (timeout.tv_sec > 0 || nsecs > READ_OUTPUT_DELAY_MAX)
-               nsecs = READ_OUTPUT_DELAY_MAX;
+             int adaptive_nsecs = timeout.tv_nsec;
+             if (timeout.tv_sec > 0 || adaptive_nsecs > READ_OUTPUT_DELAY_MAX)
+               adaptive_nsecs = READ_OUTPUT_DELAY_MAX;
              for (channel = 0; check_delay > 0 && channel <= max_process_desc; 
channel++)
                {
                  proc = chan_process[channel];
@@ -4905,15 +4857,42 @@ wait_reading_process_output (intmax_t time_limit, int 
nsecs, int read_kbd,
                      if (!XPROCESS (proc)->read_output_skip)
                        continue;
                      FD_CLR (channel, &Available);
+                     process_skipped = true;
                      XPROCESS (proc)->read_output_skip = 0;
-                     if (XPROCESS (proc)->read_output_delay < nsecs)
-                       nsecs = XPROCESS (proc)->read_output_delay;
+                     if (XPROCESS (proc)->read_output_delay < adaptive_nsecs)
+                       adaptive_nsecs = XPROCESS (proc)->read_output_delay;
                    }
                }
-             timeout = make_timespec (0, nsecs);
+             timeout = make_timespec (0, adaptive_nsecs);
              process_output_skip = 0;
            }
-#endif
+
+         /* If we've got some output and haven't limited our timeout
+            with adaptive read buffering, limit it. */
+         if (got_some_output > 0 && !process_skipped
+             && (timeout.tv_sec
+                 || timeout.tv_nsec > READ_OUTPUT_DELAY_INCREMENT))
+           timeout = make_timespec (0, READ_OUTPUT_DELAY_INCREMENT);
+
+
+         if (NILP (wait_for_cell) && just_wait_proc >= 0
+             && timespec_valid_p (timer_delay)
+             && timespec_cmp (timer_delay, timeout) < 0)
+           {
+             if (!timespec_valid_p (now))
+               now = current_timespec ();
+             struct timespec timeout_abs = timespec_add (now, timeout);
+             if (!timespec_valid_p (got_output_end_time)
+                 || timespec_cmp (timeout_abs, got_output_end_time) < 0)
+               got_output_end_time = timeout_abs;
+             timeout = timer_delay;
+           }
+         else
+           got_output_end_time = invalid_timespec ();
+
+         /* NOW can become inaccurate if time can pass during pselect.  */
+         if (timeout.tv_sec > 0 || timeout.tv_nsec > 0)
+           now = invalid_timespec ();
 
 #if defined (HAVE_NS)
           nfds = ns_select
@@ -4986,9 +4965,30 @@ wait_reading_process_output (intmax_t time_limit, int 
nsecs, int read_kbd,
       /*  If we woke up due to SIGWINCH, actually change size now.  */
       do_pending_window_change (0);
 
-      if ((time_limit || nsecs) && nfds == 0 && ! timeout_reduced_for_timers)
-       /* We waited the full specified time, so return now.  */
-       break;
+      if (nfds == 0)
+       {
+          /* Exit the main loop if we've passed the requested timeout,
+             or aren't skipping processes and got some output and
+             haven't lowered our timeout due to timers or SIGIO and
+             have waited a long amount of time due to repeated
+             timers.  */
+         if (wait < TIMEOUT)
+           break;
+         struct timespec cmp_time
+           = (wait == TIMEOUT
+              ? end_time
+              : (!process_skipped && got_some_output > 0
+                 && (timeout.tv_sec > 0 || timeout.tv_nsec > 0))
+              ? got_output_end_time
+              : invalid_timespec ());
+         if (timespec_valid_p (cmp_time))
+           {
+             now = current_timespec ();
+             if (timespec_cmp (cmp_time, now) <= 0)
+               break;
+           }
+       }
+
       if (nfds < 0)
        {
          if (xerrno == EINTR)
@@ -5111,10 +5111,14 @@ wait_reading_process_output (intmax_t time_limit, int 
nsecs, int read_kbd,
                 buffered-ahead character if we have one.  */
 
              nread = read_process_output (proc, channel);
-             if ((!wait_proc || wait_proc == XPROCESS (proc)) && 
got_some_input < nread)
-               got_some_input = nread;
+             if ((!wait_proc || wait_proc == XPROCESS (proc))
+                 && got_some_output < nread)
+               got_some_output = nread;
              if (nread > 0)
                {
+                 /* Vacuum up any leftovers without waiting.  */
+                 if (wait_proc == XPROCESS (proc))
+                   wait = MINIMUM;
                  /* Since read_process_output can run a filter,
                     which can call accept-process-output,
                     don't try to read from any other processes
@@ -5272,7 +5276,7 @@ wait_reading_process_output (intmax_t time_limit, int 
nsecs, int read_kbd,
       QUIT;
     }
 
-  return got_some_input;
+  return got_some_output;
 }
 
 /* Given a list (FUNCTION ARGS...), apply FUNCTION to the ARGS.  */
@@ -5350,7 +5354,6 @@ read_process_output (Lisp_Object proc, int channel)
 #endif
        nbytes = emacs_read (channel, chars + carryover + buffered,
                             readmax - buffered);
-#ifdef ADAPTIVE_READ_BUFFERING
       if (nbytes > 0 && p->adaptive_read_buffering)
        {
          int delay = p->read_output_delay;
@@ -5376,7 +5379,6 @@ read_process_output (Lisp_Object proc, int channel)
              process_output_skip = 1;
            }
        }
-#endif
       nbytes += buffered;
       nbytes += buffered && nbytes <= 0;
     }
@@ -5845,7 +5847,6 @@ send_process (Lisp_Object proc, const char *buf, 
ptrdiff_t len,
 #endif
                written = emacs_write_sig (outfd, cur_buf, cur_len);
              rv = (written ? 0 : -1);
-#ifdef ADAPTIVE_READ_BUFFERING
              if (p->read_output_delay > 0
                  && p->adaptive_read_buffering == 1)
                {
@@ -5853,7 +5854,6 @@ send_process (Lisp_Object proc, const char *buf, 
ptrdiff_t len,
                  process_output_delay_count--;
                  p->read_output_skip = 0;
                }
-#endif
            }
 
          if (rv < 0)
@@ -6685,7 +6685,7 @@ status_notify (struct Lisp_Process *deleting_process,
   Lisp_Object proc;
   Lisp_Object tail, msg;
   struct gcpro gcpro1, gcpro2;
-  int got_some_input = -1;
+  int got_some_output = -1;
 
   tail = Qnil;
   msg = Qnil;
@@ -6718,8 +6718,9 @@ status_notify (struct Lisp_Process *deleting_process,
                 && p != deleting_process)
            {
              int nread = read_process_output (proc, p->infd);
-             if (got_some_input < nread)
-               got_some_input = nread;
+             if ((!wait_proc || wait_proc == XPROCESS (proc))
+                 && got_some_output < nread)
+               got_some_output = nread;
              if (nread <= 0)
                break;
            }
@@ -6754,7 +6755,7 @@ status_notify (struct Lisp_Process *deleting_process,
 
   update_mode_lines = 24;  /* In case buffers use %s in mode-line-format.  */
   UNGCPRO;
-  return got_some_input;
+  return got_some_output;
 }
 
 DEFUN ("internal-default-process-sentinel", Finternal_default_process_sentinel,
@@ -6968,9 +6969,7 @@ extern int sys_select (int, fd_set *, fd_set *, fd_set *,
    DO_DISPLAY means redisplay should be done to show subprocess
    output that arrives.
 
-   Return positive if we received input from WAIT_PROC (or from any
-   process if WAIT_PROC is null), zero if we attempted to receive
-   input but got none, and negative if we didn't even try.  */
+   Return -1 signifying we got no output and did not try.  */
 
 int
 wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
@@ -6980,21 +6979,21 @@ wait_reading_process_output (intmax_t time_limit, int 
nsecs, int read_kbd,
 {
   register int nfds;
   struct timespec end_time, timeout;
+  enum { MINIMUM = -1, TIMEOUT, INFINITY } wait;
 
-  if (time_limit < 0)
-    {
-      time_limit = 0;
-      nsecs = -1;
-    }
-  else if (TYPE_MAXIMUM (time_t) < time_limit)
+  if (TYPE_MAXIMUM (time_t) < time_limit)
     time_limit = TYPE_MAXIMUM (time_t);
 
-  /* What does time_limit really mean?  */
-  if (time_limit || nsecs > 0)
+  if (time_limit < 0 || nsecs < 0)
+    wait = MINIMUM;
+  else if (time_limit > 0 || nsecs > 0)
     {
-      timeout = make_timespec (time_limit, nsecs);
-      end_time = timespec_add (current_timespec (), timeout);
+      wait = TIMEOUT;
+      end_time = timespec_add (current_timespec (),
+                               make_timespec (time_limit, nsecs));
     }
+  else
+    wait = INFINITY;
 
   /* Turn off periodic alarms (in case they are in use)
      and then turn off any other atimers,
@@ -7020,15 +7019,7 @@ wait_reading_process_output (intmax_t time_limit, int 
nsecs, int read_kbd,
 
       /* Compute time from now till when time limit is up.  */
       /* Exit if already run out.  */
-      if (nsecs < 0)
-       {
-         /* A negative timeout means
-            gobble output available now
-            but don't wait at all.  */
-
-         timeout = make_timespec (0, 0);
-       }
-      else if (time_limit || nsecs > 0)
+      if (wait == TIMEOUT)
        {
          struct timespec now = current_timespec ();
          if (timespec_cmp (end_time, now) <= 0)
@@ -7036,9 +7027,7 @@ wait_reading_process_output (intmax_t time_limit, int 
nsecs, int read_kbd,
          timeout = timespec_sub (end_time, now);
        }
       else
-       {
-         timeout = make_timespec (100000, 0);
-       }
+       timeout = make_timespec (wait < TIMEOUT ? 0 : 100000, 0);
 
       /* If our caller will not immediately handle keyboard events,
         run timer events directly.
@@ -7066,7 +7055,7 @@ wait_reading_process_output (intmax_t time_limit, int 
nsecs, int read_kbd,
              && requeued_events_pending_p ())
            break;
 
-         if (timespec_valid_p (timer_delay) && nsecs >= 0)
+         if (timespec_valid_p (timer_delay))
            {
              if (timespec_cmp (timer_delay, timeout) < 0)
                {
@@ -7110,7 +7099,7 @@ wait_reading_process_output (intmax_t time_limit, int 
nsecs, int read_kbd,
       /*  If we woke up due to SIGWINCH, actually change size now.  */
       do_pending_window_change (0);
 
-      if ((time_limit || nsecs) && nfds == 0 && ! timeout_reduced_for_timers)
+      if (wait < INFINITY && nfds == 0 && ! timeout_reduced_for_timers)
        /* We waited the full specified time, so return now.  */
        break;
 
@@ -7476,10 +7465,8 @@ init_process_emacs (void)
   num_pending_connects = 0;
 #endif
 
-#ifdef ADAPTIVE_READ_BUFFERING
   process_output_delay_count = 0;
   process_output_skip = 0;
-#endif
 
   /* Don't do this, it caused infinite select loops.  The display
      method should call add_keyboard_wait_descriptor on stdin if it
@@ -7644,7 +7631,6 @@ then a pipe is used in any case.
 The value takes effect when `start-process' is called.  */);
   Vprocess_connection_type = Qt;
 
-#ifdef ADAPTIVE_READ_BUFFERING
   DEFVAR_LISP ("process-adaptive-read-buffering", 
Vprocess_adaptive_read_buffering,
               doc: /* If non-nil, improve receive buffering by delaying after 
short reads.
 On some systems, when Emacs reads the output from a subprocess, the output data
@@ -7656,7 +7642,6 @@ If the value is t, the delay is reset after each write to 
the process; any other
 non-nil value means that the delay is not reset on write.
 The variable takes effect when `start-process' is called.  */);
   Vprocess_adaptive_read_buffering = Qt;
-#endif
 
   defsubr (&Sprocessp);
   defsubr (&Sget_process);
diff --git a/src/profiler.c b/src/profiler.c
index 1b49afe..d4c98a8 100644
--- a/src/profiler.c
+++ b/src/profiler.c
@@ -217,6 +217,12 @@ static EMACS_INT current_sampling_interval;
 
 /* Signal handler for sampling profiler.  */
 
+/* timer_getoverrun is not implemented on Cygwin, but the following
+   seems to be good enough for profiling. */
+#ifdef CYGWIN
+#define timer_getoverrun(x) 0
+#endif
+
 static void
 handle_profiler_signal (int signal)
 {
@@ -250,7 +256,7 @@ deliver_profiler_signal (int signal)
   deliver_process_signal (signal, handle_profiler_signal);
 }
 
-static enum profiler_cpu_running
+static int
 setup_cpu_timer (Lisp_Object sampling_interval)
 {
   struct sigaction action;
@@ -263,7 +269,7 @@ setup_cpu_timer (Lisp_Object sampling_interval)
                          ? ((EMACS_INT) TYPE_MAXIMUM (time_t) * billion
                             + (billion - 1))
                          : EMACS_INT_MAX)))
-    return NOT_RUNNING;
+    return -1;
 
   current_sampling_interval = XINT (sampling_interval);
   interval = make_timespec (current_sampling_interval / billion,
@@ -336,9 +342,18 @@ See also `profiler-log-size' and 
`profiler-max-stack-depth'.  */)
                          profiler_max_stack_depth);
     }
 
-  profiler_cpu_running = setup_cpu_timer (sampling_interval);
-  if (! profiler_cpu_running)
-    error ("Invalid sampling interval");
+  int status = setup_cpu_timer (sampling_interval);
+  if (status == -1)
+    {
+      profiler_cpu_running = NOT_RUNNING;
+      error ("Invalid sampling interval");
+    }
+  else
+    {
+      profiler_cpu_running = status;
+      if (! profiler_cpu_running)
+       error ("Unable to start profiler timer");
+    }
 
   return Qt;
 }
diff --git a/src/scroll.c b/src/scroll.c
index ad7f0f7..7f5b73b 100644
--- a/src/scroll.c
+++ b/src/scroll.c
@@ -93,10 +93,10 @@ calculate_scrolling (struct frame *frame,
                     int *draw_cost, unsigned *old_hash, unsigned *new_hash,
                     int free_at_end)
 {
-  register int i, j;
-  int frame_lines = FRAME_LINES (frame);
-  register struct matrix_elt *p, *p1;
-  register int cost, cost1;
+  int i, j;
+  int frame_total_lines = FRAME_TOTAL_LINES (frame);
+  struct matrix_elt *p, *p1;
+  int cost, cost1;
 
   int lines_moved = window_size
     + (FRAME_SCROLL_REGION_OK (frame) ? 0 : lines_below);
@@ -104,18 +104,18 @@ calculate_scrolling (struct frame *frame,
      at the i'th line of the lines we are considering,
      where I is origin 1 (as it is below).  */
   int *first_insert_cost
-    = &FRAME_INSERT_COST (frame)[frame_lines - 1 - lines_moved];
+    = &FRAME_INSERT_COST (frame)[frame_total_lines - 1 - lines_moved];
   int *first_delete_cost
-    = &FRAME_DELETE_COST (frame)[frame_lines - 1 - lines_moved];
+    = &FRAME_DELETE_COST (frame)[frame_total_lines - 1 - lines_moved];
   int *next_insert_cost
-    = &FRAME_INSERTN_COST (frame)[frame_lines - 1 - lines_moved];
+    = &FRAME_INSERTN_COST (frame)[frame_total_lines - 1 - lines_moved];
   int *next_delete_cost
-    = &FRAME_DELETEN_COST (frame)[frame_lines - 1 - lines_moved];
+    = &FRAME_DELETEN_COST (frame)[frame_total_lines - 1 - lines_moved];
 
   /* Discourage long scrolls on fast lines.
      Don't scroll nearly a full frame height unless it saves
      at least 1/4 second.  */
-  int extra_cost = (int) (baud_rate / (10 * 4 * FRAME_LINES (frame)));
+  int extra_cost = baud_rate / (10 * 4 * frame_total_lines);
 
   if (baud_rate <= 0)
     extra_cost = 1;
@@ -433,28 +433,28 @@ calculate_direct_scrolling (struct frame *frame,
                            unsigned *old_hash, unsigned *new_hash,
                            int free_at_end)
 {
-  register int i, j;
-  int frame_lines = FRAME_LINES (frame);
-  register struct matrix_elt *p, *p1;
-  register int cost, cost1, delta;
+  int i, j;
+  int frame_total_lines = FRAME_TOTAL_LINES (frame);
+  struct matrix_elt *p, *p1;
+  int cost, cost1, delta;
 
   /* first_insert_cost[-I] is the cost of doing the first insert-line
      at a position I lines above the bottom line in the scroll window. */
   int *first_insert_cost
-    = &FRAME_INSERT_COST (frame)[frame_lines - 1];
+    = &FRAME_INSERT_COST (frame)[frame_total_lines - 1];
   int *first_delete_cost
-    = &FRAME_DELETE_COST (frame)[frame_lines - 1];
+    = &FRAME_DELETE_COST (frame)[frame_total_lines - 1];
   int *next_insert_cost
-    = &FRAME_INSERTN_COST (frame)[frame_lines - 1];
+    = &FRAME_INSERTN_COST (frame)[frame_total_lines - 1];
   int *next_delete_cost
-    = &FRAME_DELETEN_COST (frame)[frame_lines - 1];
+    = &FRAME_DELETEN_COST (frame)[frame_total_lines - 1];
 
   int scroll_overhead;
 
   /* Discourage long scrolls on fast lines.
      Don't scroll nearly a full frame height unless it saves
      at least 1/4 second.  */
-  int extra_cost = (int) (baud_rate / (10 * 4 * FRAME_LINES (frame)));
+  int extra_cost = baud_rate / (10 * 4 * frame_total_lines);
 
   if (baud_rate <= 0)
     extra_cost = 1;
@@ -894,14 +894,14 @@ scrolling_max_lines_saved (int start, int end,
 
 static void
 line_ins_del (struct frame *frame, int ov1, int pf1, int ovn, int pfn,
-              register int *ov, register int *mf)
+              int *ov, int *mf)
 {
-  register int i;
-  register int frame_lines = FRAME_LINES (frame);
-  register int insert_overhead = ov1 * 10;
-  register int next_insert_cost = ovn * 10;
+  int i;
+  int frame_total_lines = FRAME_TOTAL_LINES (frame);
+  int insert_overhead = ov1 * 10;
+  int next_insert_cost = ovn * 10;
 
-  for (i = frame_lines-1; i >= 0; i--)
+  for (i = frame_total_lines - 1; i >= 0; i--)
     {
       mf[i] = next_insert_cost / 10;
       next_insert_cost += pfn;
@@ -946,12 +946,12 @@ ins_del_costs (struct frame *frame,
    only) and those that must repeatedly insert one line.
 
    The cost to insert N lines at line L is
-           [tt.t_ILov  + (frame_lines + 1 - L) * tt.t_ILpf] +
-       N * [tt.t_ILnov + (frame_lines + 1 - L) * tt.t_ILnpf]
+           [tt.t_ILov  + (frame_total_lines + 1 - L) * tt.t_ILpf] +
+       N * [tt.t_ILnov + (frame_total_lines + 1 - L) * tt.t_ILnpf]
 
    ILov represents the basic insert line overhead.  ILpf is the padding
    required to allow the terminal time to move a line: insertion at line
-   L changes (frame_lines + 1 - L) lines.
+   L changes (frame_total_lines + 1 - L) lines.
 
    The first bracketed expression above is the overhead; the second is
    the multiply factor.  Both are dependent only on the position at
@@ -976,14 +976,15 @@ do_line_insertion_deletion_costs (struct frame *frame,
                                  const char *cleanup_string,
                                  int coefficient)
 {
+  int frame_total_lines = FRAME_TOTAL_LINES (frame);
   FRAME_INSERT_COST (frame) =
-    xnrealloc (FRAME_INSERT_COST (frame), FRAME_LINES (frame), sizeof (int));
+    xnrealloc (FRAME_INSERT_COST (frame), frame_total_lines, sizeof (int));
   FRAME_DELETEN_COST (frame) =
-    xnrealloc (FRAME_DELETEN_COST (frame), FRAME_LINES (frame), sizeof (int));
+    xnrealloc (FRAME_DELETEN_COST (frame), frame_total_lines, sizeof (int));
   FRAME_INSERTN_COST (frame) =
-    xnrealloc (FRAME_INSERTN_COST (frame), FRAME_LINES (frame), sizeof (int));
+    xnrealloc (FRAME_INSERTN_COST (frame), frame_total_lines, sizeof (int));
   FRAME_DELETE_COST (frame) =
-    xnrealloc (FRAME_DELETE_COST (frame), FRAME_LINES (frame), sizeof (int));
+    xnrealloc (FRAME_DELETE_COST (frame), frame_total_lines, sizeof (int));
 
   ins_del_costs (frame,
                 ins_line_string, multi_ins_string,
diff --git a/src/syntax.c b/src/syntax.c
index 1695815..0d8b08c 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -3013,7 +3013,8 @@ but before count is used up, nil is returned.  */)
 DEFUN ("backward-prefix-chars", Fbackward_prefix_chars, Sbackward_prefix_chars,
        0, 0, 0,
        doc: /* Move point backward over any number of chars with prefix syntax.
-This includes chars with "quote" or "prefix" syntax (' or p).  */)
+This includes chars with expression prefix syntax class (') and those with
+the prefix syntax flag (p).  */)
   (void)
 {
   ptrdiff_t beg = BEGV;
diff --git a/src/sysdep.c b/src/sysdep.c
index 0a0b0ac..df3e573 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -79,9 +79,6 @@ along with GNU Emacs.  If not, see 
<http://www.gnu.org/licenses/>.  */
 #include "msdos.h"
 #endif
 
-#ifdef HAVE_SYS_RESOURCE_H
-#include <sys/resource.h>
-#endif
 #include <sys/param.h>
 #include <sys/file.h>
 #include <fcntl.h>
@@ -662,14 +659,6 @@ unrequest_sigio (void)
   interrupts_deferred = 1;
 #endif
 }
-
-void
-ignore_sigio (void)
-{
-#ifdef USABLE_SIGIO
-  signal (SIGIO, SIG_IGN);
-#endif
-}
 
 #ifndef MSDOS
 /* Block SIGCHLD.  */
@@ -1625,14 +1614,58 @@ handle_arith_signal (int sig)
 
 #ifdef HAVE_STACK_OVERFLOW_HANDLING
 
-/* -1 if stack grows down as expected on most OS/ABI variants, 1 otherwise.  */
-
-static int stack_direction;
-
 /* Alternate stack used by SIGSEGV handler below.  */
 
 static unsigned char sigsegv_stack[SIGSTKSZ];
 
+
+/* Return true if SIGINFO indicates a stack overflow.  */
+
+static bool
+stack_overflow (siginfo_t *siginfo)
+{
+  /* In theory, a more-accurate heuristic can be obtained by using
+     GNU/Linux pthread_getattr_np along with POSIX pthread_attr_getstack
+     and pthread_attr_getguardsize to find the location and size of the
+     guard area.  In practice, though, these functions are so hard to
+     use reliably that they're not worth bothering with.  E.g., see:
+     https://sourceware.org/bugzilla/show_bug.cgi?id=16291
+     Other operating systems also have problems, e.g., Solaris's
+     stack_violation function is tailor-made for this problem, but it
+     doesn't work on Solaris 11.2 x86-64 with a 32-bit executable.
+
+     GNU libsigsegv is overkill for Emacs; otherwise it might be a
+     candidate here.  */
+
+  if (!siginfo)
+    return false;
+
+  /* The faulting address.  */
+  char *addr = siginfo->si_addr;
+  if (!addr)
+    return false;
+
+  /* The known top and bottom of the stack.  The actual stack may
+     extend a bit beyond these boundaries.  */
+  char *bot = stack_bottom;
+  char *top = near_C_stack_top ();
+
+  /* Log base 2 of the stack heuristic ratio.  This ratio is the size
+     of the known stack divided by the size of the guard area past the
+     end of the stack top.  The heuristic is that a bad address is
+     considered to be a stack overflow if it occurs within
+     stacksize>>LG_STACK_HEURISTIC bytes above the top of the known
+     stack.  This heuristic is not exactly correct but it's good
+     enough in practice.  */
+  enum { LG_STACK_HEURISTIC = 8 };
+
+  if (bot < top)
+    return 0 <= addr - top && addr - top < (top - bot) >> LG_STACK_HEURISTIC;
+  else
+    return 0 <= top - addr && top - addr < (bot - top) >> LG_STACK_HEURISTIC;
+}
+
+
 /* Attempt to recover from SIGSEGV caused by C stack overflow.  */
 
 static void
@@ -1640,28 +1673,15 @@ handle_sigsegv (int sig, siginfo_t *siginfo, void *arg)
 {
   /* Hard GC error may lead to stack overflow caused by
      too nested calls to mark_object.  No way to survive.  */
-  if (!gc_in_progress)
-    {
-      struct rlimit rlim;
+  bool fatal = gc_in_progress;
 
-      if (!getrlimit (RLIMIT_STACK, &rlim))
-       {
-         enum { STACK_DANGER_ZONE = 16 * 1024 };
-         char *beg, *end, *addr;
-
-         beg = stack_bottom;
-         end = stack_bottom + stack_direction * rlim.rlim_cur;
-         if (beg > end)
-           addr = beg, beg = end, end = addr;
-         addr = (char *) siginfo->si_addr;
-         /* If we're somewhere on stack and too close to
-            one of its boundaries, most likely this is it.  */
-         if (beg < addr && addr < end
-             && (addr - beg < STACK_DANGER_ZONE
-                 || end - addr < STACK_DANGER_ZONE))
-           siglongjmp (return_to_command_loop, 1);
-       }
-    }
+#ifdef FORWARD_SIGNAL_TO_MAIN_THREAD
+  if (!fatal && !pthread_equal (pthread_self (), main_thread))
+    fatal = true;
+#endif
+
+  if (!fatal && stack_overflow (siginfo))
+    siglongjmp (return_to_command_loop, 1);
 
   /* Otherwise we can't do anything with this.  */
   deliver_fatal_thread_signal (sig);
@@ -1676,8 +1696,6 @@ init_sigsegv (void)
   struct sigaction sa;
   stack_t ss;
 
-  stack_direction = ((char *) &ss < stack_bottom) ? -1 : 1;
-
   ss.ss_sp = sigsegv_stack;
   ss.ss_size = sizeof (sigsegv_stack);
   ss.ss_flags = 0;
diff --git a/src/syssignal.h b/src/syssignal.h
index b536eb5..5c14479 100644
--- a/src/syssignal.h
+++ b/src/syssignal.h
@@ -32,6 +32,12 @@ extern void unblock_tty_out_signal (sigset_t const *);
 #define FORWARD_SIGNAL_TO_MAIN_THREAD
 #endif
 
+/* On Cygwin as of 2015-06-22 SIGEV_SIGNAL is defined as an enum
+   constant but not as a macro. */
+#if defined CYGWIN && !defined SIGEV_SIGNAL
+#define SIGEV_SIGNAL SIGEV_SIGNAL
+#endif
+
 #if defined HAVE_TIMER_SETTIME && defined SIGEV_SIGNAL
 # define HAVE_ITIMERSPEC
 #endif
diff --git a/src/systime.h b/src/systime.h
index 744af17..abbe601 100644
--- a/src/systime.h
+++ b/src/systime.h
@@ -106,20 +106,6 @@ extern struct timespec lisp_to_timespec (struct lisp_time);
 extern struct timespec lisp_time_argument (Lisp_Object);
 #endif
 
-#ifndef HAVE_TZALLOC
-# undef mktime_z
-# undef timezone_t
-# undef tzalloc
-# undef tzfree
-# define mktime_z emacs_mktime_z
-# define timezone_t emacs_timezone_t
-# define tzalloc emacs_tzalloc
-# define tzfree emacs_tzfree
-typedef char const *timezone_t;
-INLINE timezone_t tzalloc (char const *name) { return name; }
-INLINE void tzfree (timezone_t tz) { }
-#endif
-
 INLINE_HEADER_END
 
 #endif /* EMACS_SYSTIME_H */
diff --git a/src/termhooks.h b/src/termhooks.h
index d65d5ba..2ab07b6 100644
--- a/src/termhooks.h
+++ b/src/termhooks.h
@@ -248,6 +248,9 @@ enum event_kind
 
 };
 
+/* Bit width of an enum event_kind tag at the start of structs and unions.  */
+enum { EVENT_KIND_WIDTH = 16 };
+
 /* If a struct input_event has a kind which is SELECTION_REQUEST_EVENT
    or SELECTION_CLEAR_EVENT, then its contents are really described
    by `struct selection_input_event'; see xterm.h.  */
@@ -260,7 +263,7 @@ enum event_kind
 struct input_event
 {
   /* What kind of event was this?  */
-  ENUM_BF (event_kind) kind : 16;
+  ENUM_BF (event_kind) kind : EVENT_KIND_WIDTH;
 
   /* Used in scroll back click events.  */
   ENUM_BF (scroll_bar_part) part : 16;
diff --git a/src/w32fns.c b/src/w32fns.c
index c247a9b..499450f 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -73,6 +73,7 @@ along with GNU Emacs.  If not, see 
<http://www.gnu.org/licenses/>.  */
 
 #include <dlgs.h>
 #include <imm.h>
+#include <windowsx.h>
 
 #include "font.h"
 #include "w32font.h"
@@ -204,7 +205,8 @@ unsigned int msh_mousewheel = 0;
 static unsigned menu_free_timer = 0;
 
 #ifdef GLYPH_DEBUG
-static int image_cache_refcount, dpyinfo_refcount;
+static ptrdiff_t image_cache_refcount;
+static int dpyinfo_refcount;
 #endif
 
 static HWND w32_visible_system_caret_hwnd;
@@ -3492,13 +3494,31 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, 
LPARAM lParam)
       return (msg == WM_XBUTTONDOWN || msg == WM_XBUTTONUP);
 
     case WM_MOUSEMOVE:
-      /* Ignore mouse movements as long as the menu is active.  These
-        movements are processed by the window manager anyway, and
-        it's wrong to handle them as if they happened on the
-        underlying frame.  */
       f = x_window_to_frame (dpyinfo, hwnd);
-      if (f && f->output_data.w32->menubar_active)
-       return 0;
+      if (f)
+       {
+         /* Ignore mouse movements as long as the menu is active.
+            These movements are processed by the window manager
+            anyway, and it's wrong to handle them as if they happened
+            on the underlying frame.  */
+         if (f->output_data.w32->menubar_active)
+           return 0;
+
+         /* If the mouse moved, and the mouse pointer is invisible,
+            make it visible again.  We do this here so as to be able
+            to show the mouse pointer even when the main
+            (a.k.a. "Lisp") thread is busy doing something.  */
+         static int last_x, last_y;
+         int x = GET_X_LPARAM (lParam);
+         int y = GET_Y_LPARAM (lParam);
+
+         if (f->pointer_invisible
+             && (x != last_x || y != last_y))
+           f->pointer_invisible = false;
+
+         last_x = x;
+         last_y = y;
+       }
 
       /* If the mouse has just moved into the frame, start tracking
         it, so we will be notified when it leaves the frame.  Mouse
@@ -3973,11 +3993,17 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, 
LPARAM lParam)
       if (LOWORD (lParam) == HTCLIENT)
        {
          f = x_window_to_frame (dpyinfo, hwnd);
-         if (f && f->output_data.w32->hourglass_p
-             && !menubar_in_use && !current_popup_menu)
-           SetCursor (f->output_data.w32->hourglass_cursor);
-         else if (f)
-           SetCursor (f->output_data.w32->current_cursor);
+         if (f)
+           {
+             if (f->output_data.w32->hourglass_p
+                 && !menubar_in_use && !current_popup_menu)
+               SetCursor (f->output_data.w32->hourglass_cursor);
+             else if (f->pointer_invisible)
+               SetCursor (NULL);
+             else
+               SetCursor (f->output_data.w32->current_cursor);
+           }
+
          return 0;
        }
       goto dflt;
@@ -3989,8 +4015,15 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM 
lParam)
        if (f && cursor)
          {
            f->output_data.w32->current_cursor = cursor;
-           if (!f->output_data.w32->hourglass_p)
-             SetCursor (cursor);
+           /* Don't change the cursor while menu-bar menu is in use.  */
+           if (!f->output_data.w32->menubar_active
+               && !f->output_data.w32->hourglass_p)
+             {
+               if (f->pointer_invisible)
+                 SetCursor (NULL);
+               else
+                 SetCursor (cursor);
+             }
          }
        return 0;
       }
@@ -5805,8 +5838,6 @@ x_create_tip_frame (struct w32_display_info *dpyinfo,
                       "cursorColor", "Foreground", RES_TYPE_STRING);
   x_default_parameter (f, parms, Qborder_color, build_string ("black"),
                       "borderColor", "BorderColor", RES_TYPE_STRING);
-  x_default_parameter (f, parms, Qalpha, Qnil,
-                       "alpha", "Alpha", RES_TYPE_NUMBER);
 
   /* Init faces before x_default_parameter is called for the
      scroll-bar-width parameter because otherwise we end up in
@@ -5835,6 +5866,9 @@ x_create_tip_frame (struct w32_display_info *dpyinfo,
                       "autoLower", "AutoRaiseLower", RES_TYPE_BOOLEAN);
   x_default_parameter (f, parms, Qcursor_type, Qbox,
                       "cursorType", "CursorType", RES_TYPE_SYMBOL);
+  /* Process alpha here (Bug#17344).  */
+  x_default_parameter (f, parms, Qalpha, Qnil,
+                       "alpha", "Alpha", RES_TYPE_NUMBER);
 
   /* Dimensions, especially FRAME_LINES (f), must be done via
      change_frame_size.  Change will not be effected unless different
@@ -5907,23 +5941,26 @@ x_create_tip_frame (struct w32_display_info *dpyinfo,
    parameters for F.  DX and DY are specified offsets from the current
    location of the mouse.  WIDTH and HEIGHT are the width and height
    of the tooltip.  Return coordinates relative to the root window of
-   the display in *ROOT_X, and *ROOT_Y.  */
+   the display in *ROOT_X and *ROOT_Y.  */
 
 static void
 compute_tip_xy (struct frame *f,
                Lisp_Object parms, Lisp_Object dx, Lisp_Object dy,
                int width, int height, int *root_x, int *root_y)
 {
-  Lisp_Object left, top;
+  Lisp_Object left, top, right, bottom;
   int min_x, min_y, max_x, max_y;
 
   /* User-specified position?  */
   left = Fcdr (Fassq (Qleft, parms));
   top  = Fcdr (Fassq (Qtop, parms));
+  right = Fcdr (Fassq (Qright, parms));
+  bottom = Fcdr (Fassq (Qbottom, parms));
 
   /* Move the tooltip window where the mouse pointer is.  Resize and
      show it.  */
-  if (!INTEGERP (left) || !INTEGERP (top))
+  if ((!INTEGERP (left) && !INTEGERP (right))
+      || (!INTEGERP (top) && !INTEGERP (bottom)))
     {
       POINT pt;
 
@@ -5964,6 +6001,8 @@ compute_tip_xy (struct frame *f,
 
   if (INTEGERP (top))
     *root_y = XINT (top);
+  else if (INTEGERP (bottom))
+    *root_y = XINT (bottom) - height;
   else if (*root_y + XINT (dy) <= min_y)
     *root_y = min_y; /* Can happen for negative dy */
   else if (*root_y + XINT (dy) + height <= max_y)
@@ -5978,6 +6017,8 @@ compute_tip_xy (struct frame *f,
 
   if (INTEGERP (left))
     *root_x = XINT (left);
+  else if (INTEGERP (right))
+    *root_y = XINT (right) - width;
   else if (*root_x + XINT (dx) <= min_x)
     *root_x = 0; /* Can happen for negative dx */
   else if (*root_x + XINT (dx) + width <= max_x)
@@ -6007,12 +6048,18 @@ Automatically hide the tooltip after TIMEOUT seconds.  
TIMEOUT nil
 means use the default timeout of 5 seconds.
 
 If the list of frame parameters PARMS contains a `left' parameter,
-the tooltip is displayed at that x-position.  Otherwise it is
-displayed at the mouse position, with offset DX added (default is 5 if
-DX isn't specified).  Likewise for the y-position; if a `top' frame
-parameter is specified, it determines the y-position of the tooltip
-window, otherwise it is displayed at the mouse position, with offset
-DY added (default is -10).
+display the tooltip at that x-position.  If the list of frame parameters
+PARMS contains no `left' but a `right' parameter, display the tooltip
+right-adjusted at that x-position. Otherwise display it at the
+x-position of the mouse, with offset DX added (default is 5 if DX isn't
+specified).
+
+Likewise for the y-position: If a `top' frame parameter is specified, it
+determines the position of the upper edge of the tooltip window.  If a
+`bottom' parameter but no `top' frame parameter is specified, it
+determines the position of the lower edge of the tooltip window.
+Otherwise display the tooltip window at the y-position of the mouse,
+with offset DY added (default is -10).
 
 A tooltip's maximum size is specified by `x-max-tooltip-size'.
 Text larger than the specified size is clipped.  */)
@@ -6888,7 +6935,8 @@ If optional parameter FRAME is not specified, use 
selected frame.  */)
 
   CHECK_NUMBER (command);
 
-  PostMessage (FRAME_W32_WINDOW (f), WM_SYSCOMMAND, XINT (command), 0);
+  if (FRAME_W32_P (f))
+    PostMessage (FRAME_W32_WINDOW (f), WM_SYSCOMMAND, XINT (command), 0);
 
   return Qnil;
 }
@@ -7475,6 +7523,9 @@ If FRAME is omitted or nil, the selected frame is used.  
*/)
   MENUBARINFO menu_bar;
   int width, height, single_height, wrapped_height;
 
+  if (FRAME_INITIAL_P (f) || !FRAME_W32_P (f))
+    return Qnil;
+
   block_input ();
 
   single_height = GetSystemMetrics (SM_CYMENU);
@@ -7506,6 +7557,9 @@ title bar and decorations.  */)
   struct frame *f = decode_live_frame (frame);
   RECT rect;
 
+  if (FRAME_INITIAL_P (f) || !FRAME_W32_P (f))
+    return Qnil;
+
   block_input ();
 
   if (!NILP (client))
@@ -7563,6 +7617,9 @@ elements (all size values are in pixels).
   int single_bar_height, wrapped_bar_height, menu_bar_height;
   Lisp_Object fullscreen = Fframe_parameter (frame, Qfullscreen);
 
+  if (FRAME_INITIAL_P (f) || !FRAME_W32_P (f))
+    return Qnil;
+
   block_input ();
 
   /* Outer frame rectangle, including outer borders and title bar. */
@@ -7742,6 +7799,11 @@ The following %-sequences are provided:
 
 
 #ifdef WINDOWSNT
+typedef BOOL (WINAPI *GetDiskFreeSpaceExW_Proc)
+  (LPCWSTR, PULARGE_INTEGER, PULARGE_INTEGER, PULARGE_INTEGER);
+typedef BOOL (WINAPI *GetDiskFreeSpaceExA_Proc)
+  (LPCSTR, PULARGE_INTEGER, PULARGE_INTEGER, PULARGE_INTEGER);
+
 DEFUN ("file-system-info", Ffile_system_info, Sfile_system_info, 1, 1, 0,
        doc: /* Return storage information about the file system FILENAME is on.
 Value is a list of floats (TOTAL FREE AVAIL), where TOTAL is the total
@@ -7765,12 +7827,10 @@ If the underlying system call fails, value is nil.  */)
      added rather late on.  */
   {
     HMODULE hKernel = GetModuleHandle ("kernel32");
-    BOOL (WINAPI *pfn_GetDiskFreeSpaceExW)
-      (wchar_t *, PULARGE_INTEGER, PULARGE_INTEGER, PULARGE_INTEGER)
-      = GetProcAddress (hKernel, "GetDiskFreeSpaceExW");
-    BOOL (WINAPI *pfn_GetDiskFreeSpaceExA)
-      (char *, PULARGE_INTEGER, PULARGE_INTEGER, PULARGE_INTEGER)
-      = GetProcAddress (hKernel, "GetDiskFreeSpaceExA");
+    GetDiskFreeSpaceExW_Proc pfn_GetDiskFreeSpaceExW =
+      (GetDiskFreeSpaceExW_Proc) GetProcAddress (hKernel, 
"GetDiskFreeSpaceExW");
+    GetDiskFreeSpaceExA_Proc pfn_GetDiskFreeSpaceExA =
+      (GetDiskFreeSpaceExA_Proc) GetProcAddress (hKernel, 
"GetDiskFreeSpaceExA");
     bool have_pfn_GetDiskFreeSpaceEx =
       ((w32_unicode_filenames && pfn_GetDiskFreeSpaceExW)
        || (!w32_unicode_filenames && pfn_GetDiskFreeSpaceExA));
diff --git a/src/w32font.c b/src/w32font.c
index 6306a84..1c2f966 100644
--- a/src/w32font.c
+++ b/src/w32font.c
@@ -650,12 +650,31 @@ w32font_draw (struct glyph_string *s, int from, int to,
       HBRUSH brush;
       RECT rect;
       struct font *font = s->font;
-
+      int ascent = font->ascent, descent = font->descent;
+
+      /* Font's global ascent and descent values might be
+        preposterously large for some fonts.  We fix here the case
+        when those fonts are used for display of glyphless
+        characters, because drawing background with font dimensions
+        in those cases makes the display illegible.  There's only one
+        more call to the draw method with with_background set to
+        true, and that's in x_draw_glyph_string_foreground, when
+        drawing the cursor, where we have no such heuristics
+        available.  FIXME.  */
+      if (s->first_glyph->type == GLYPHLESS_GLYPH
+         && (s->first_glyph->u.glyphless.method == GLYPHLESS_DISPLAY_HEX_CODE
+             || s->first_glyph->u.glyphless.method == 
GLYPHLESS_DISPLAY_ACRONYM))
+       {
+         ascent =
+           s->first_glyph->slice.glyphless.lower_yoff
+           - s->first_glyph->slice.glyphless.upper_yoff;
+         descent = 0;
+       }
       brush = CreateSolidBrush (s->gc->background);
       rect.left = x;
-      rect.top = y - font->ascent;
+      rect.top = y - ascent;
       rect.right = x + s->width;
-      rect.bottom = y + font->descent;
+      rect.bottom = y + descent;
       FillRect (s->hdc, &rect, brush);
       DeleteObject (brush);
     }
diff --git a/src/w32heap.c b/src/w32heap.c
index 47ffec1..60afd1d 100644
--- a/src/w32heap.c
+++ b/src/w32heap.c
@@ -115,7 +115,7 @@ typedef struct _RTL_HEAP_PARAMETERS {
    to build only the first bootstrap-emacs.exe with the large size,
    and reset that to a lower value afterwards.  */
 #if defined _WIN64 || defined WIDE_EMACS_INT
-# define DUMPED_HEAP_SIZE (19*1024*1024)
+# define DUMPED_HEAP_SIZE (20*1024*1024)
 #else
 # define DUMPED_HEAP_SIZE (12*1024*1024)
 #endif
@@ -305,9 +305,10 @@ init_heap (void)
 #undef free
 
 /* FREEABLE_P checks if the block can be safely freed.  */
-#define FREEABLE_P(addr)                                        \
-    ((unsigned char *)(addr) < dumped_data                      \
-     || (unsigned char *)(addr) >= dumped_data + DUMPED_HEAP_SIZE)
+#define FREEABLE_P(addr)                                               \
+    ((unsigned char *)(addr) > 0                                       \
+     && ((unsigned char *)(addr) < dumped_data                         \
+        || (unsigned char *)(addr) >= dumped_data + DUMPED_HEAP_SIZE))
 
 void *
 malloc_after_dump (size_t size)
@@ -407,10 +408,10 @@ realloc_after_dump (void *ptr, size_t size)
       /* If the block lies in the dumped data, do not free it.  Only
          allocate a new one.  */
       p = HeapAlloc (heap, 0, size);
-      if (p)
-       CopyMemory (p, ptr, size);
-      else
+      if (!p)
        errno = ENOMEM;
+      else if (ptr)
+       CopyMemory (p, ptr, size);
     }
   /* After dump, keep track of the "brk value" for sbrk(0).  */
   if (p)
@@ -449,7 +450,7 @@ realloc_before_dump (void *ptr, size_t size)
         of failing the call as below.  But this doesn't seem to be
         worth the added complexity, as loadup allocates only a very
         small number of large blocks, and never reallocates them.  */
-      if (p)
+      if (p && ptr)
        {
          CopyMemory (p, ptr, size);
          free_before_dump (ptr);
@@ -473,6 +474,9 @@ free_after_dump (void *ptr)
 void
 free_before_dump (void *ptr)
 {
+  if (!ptr)
+    return;
+
   /* Before dumping.  */
   if (dumped_data < (unsigned char *)ptr
       && (unsigned char *)ptr < bc_limit)
diff --git a/src/w32proc.c b/src/w32proc.c
index 1f633d8..66a9761 100644
--- a/src/w32proc.c
+++ b/src/w32proc.c
@@ -1527,22 +1527,25 @@ waitpid (pid_t pid, int *status, int options)
 
 /* Implementation note: This function works with file names encoded in
    the current ANSI codepage.  */
-static void
+static int
 w32_executable_type (char * filename,
                     int * is_dos_app,
                     int * is_cygnus_app,
+                    int * is_msys_app,
                     int * is_gui_app)
 {
   file_data executable;
   char * p;
+  int retval = 0;
 
   /* Default values in case we can't tell for sure.  */
   *is_dos_app = FALSE;
   *is_cygnus_app = FALSE;
+  *is_msys_app = FALSE;
   *is_gui_app = FALSE;
 
   if (!open_input_file (&executable, filename))
-    return;
+    return -1;
 
   p = strrchr (filename, '.');
 
@@ -1560,7 +1563,8 @@ w32_executable_type (char * filename,
         extension, which is defined in the registry.  */
       p = egetenv ("COMSPEC");
       if (p)
-       w32_executable_type (p, is_dos_app, is_cygnus_app, is_gui_app);
+       retval = w32_executable_type (p, is_dos_app, is_cygnus_app, is_msys_app,
+                                     is_gui_app);
     }
   else
     {
@@ -1637,6 +1641,16 @@ w32_executable_type (char * filename,
                       *is_cygnus_app = TRUE;
                       break;
                     }
+                 else if (strncmp (dllname, "msys-", 5) == 0)
+                   {
+                     /* This catches both MSYS 1.x and MSYS2
+                        executables (the DLL name is msys-1.0.dll and
+                        msys-2.0.dll, respectively).  There doesn't
+                        seem to be a reason to distinguish between
+                        the two, for now.  */
+                     *is_msys_app = TRUE;
+                     break;
+                   }
                 }
             }
        }
@@ -1644,6 +1658,7 @@ w32_executable_type (char * filename,
 
 unwind:
   close_file_data (&executable);
+  return retval;
 }
 
 static int
@@ -1702,7 +1717,7 @@ sys_spawnve (int mode, char *cmdname, char **argv, char 
**envp)
   int arglen, numenv;
   pid_t pid;
   child_process *cp;
-  int is_dos_app, is_cygnus_app, is_gui_app;
+  int is_dos_app, is_cygnus_app, is_msys_app, is_gui_app;
   int do_quoting = 0;
   /* We pass our process ID to our children by setting up an environment
      variable in their environment.  */
@@ -1713,10 +1728,10 @@ sys_spawnve (int mode, char *cmdname, char **argv, char 
**envp)
      argument being split into two or more. Arguments with wildcards
      are also quoted, for consistency with posix platforms, where wildcards
      are not expanded if we run the program directly without a shell.
-     Some extra whitespace characters need quoting in Cygwin programs,
+     Some extra whitespace characters need quoting in Cygwin/MSYS programs,
      so this list is conditionally modified below.  */
   char *sepchars = " \t*?";
-  /* This is for native w32 apps; modified below for Cygwin apps.  */
+  /* This is for native w32 apps; modified below for Cygwin/MSUS apps.  */
   char escape_char = '\\';
   char cmdname_a[MAX_PATH];
 
@@ -1777,15 +1792,17 @@ sys_spawnve (int mode, char *cmdname, char **argv, char 
**envp)
   cmdname = cmdname_a;
   argv[0] = cmdname;
 
-  /* Determine whether program is a 16-bit DOS executable, or a 32-bit Windows
-     executable that is implicitly linked to the Cygnus dll (implying it
-     was compiled with the Cygnus GNU toolchain and hence relies on
-     cygwin.dll to parse the command line - we use this to decide how to
-     escape quote chars in command line args that must be quoted).
+  /* Determine whether program is a 16-bit DOS executable, or a 32-bit
+     Windows executable that is implicitly linked to the Cygnus or
+     MSYS dll (implying it was compiled with the Cygnus/MSYS GNU
+     toolchain and hence relies on cygwin.dll or MSYS DLL to parse the
+     command line - we use this to decide how to escape quote chars in
+     command line args that must be quoted).
 
      Also determine whether it is a GUI app, so that we don't hide its
      initial window unless specifically requested.  */
-  w32_executable_type (cmdname, &is_dos_app, &is_cygnus_app, &is_gui_app);
+  w32_executable_type (cmdname, &is_dos_app, &is_cygnus_app, &is_msys_app,
+                      &is_gui_app);
 
   /* On Windows 95, if cmdname is a DOS app, we invoke a helper
      application to start it by specifying the helper app as cmdname,
@@ -1845,10 +1862,10 @@ sys_spawnve (int mode, char *cmdname, char **argv, char 
**envp)
       if (INTEGERP (Vw32_quote_process_args))
        escape_char = XINT (Vw32_quote_process_args);
       else
-       escape_char = is_cygnus_app ? '"' : '\\';
+       escape_char = (is_cygnus_app || is_msys_app) ? '"' : '\\';
     }
 
-  /* Cygwin apps needs quoting a bit more often.  */
+  /* Cygwin/MSYS apps need quoting a bit more often.  */
   if (escape_char == '"')
     sepchars = "\r\n\t\f '";
 
@@ -1866,7 +1883,7 @@ sys_spawnve (int mode, char *cmdname, char **argv, char 
**envp)
       for ( ; *p; p++)
        {
          if (escape_char == '"' && *p == '\\')
-           /* If it's a Cygwin app, \ needs to be escaped.  */
+           /* If it's a Cygwin/MSYS app, \ needs to be escaped.  */
            arglen++;
          else if (*p == '"')
            {
@@ -2947,6 +2964,59 @@ If successful, the return value is t, otherwise nil.  */)
   return result;
 }
 
+DEFUN ("w32-application-type", Fw32_application_type,
+       Sw32_application_type, 1, 1, 0,
+       doc: /* Return the type of an MS-Windows PROGRAM.
+
+Knowing the type of an executable could be useful for formatting
+file names passed to it or for quoting its command-line arguments.
+
+PROGRAM should specify an executable file, including the extension.
+
+The value is one of the following:
+
+`dos'        -- a DOS .com program or some other non-PE executable
+`cygwin'     -- a Cygwin program that depends on Cygwin DLL
+`msys'       -- an MSYS 1.x or MSYS2 program
+`w32-native' -- a native Windows application
+`unknown'    -- a file that doesn't exist, or cannot be open, or whose
+                name is not encodable in the current ANSI codepage.
+
+Note that for .bat and .cmd batch files the function returns the type
+of their command interpreter, as specified by the \"COMSPEC\"
+environment variable.
+
+This function returns `unknown' for programs whose file names
+include characters not supported by the current ANSI codepage, as
+such programs cannot be invoked by Emacs anyway.  */)
+     (Lisp_Object program)
+{
+  int is_dos_app, is_cygwin_app, is_msys_app, dummy;
+  Lisp_Object encoded_progname;
+  char *progname, progname_a[MAX_PATH];
+
+  program = Fexpand_file_name (program, Qnil);
+  encoded_progname = ENCODE_FILE (program);
+  progname = SDATA (encoded_progname);
+  unixtodos_filename (progname);
+  filename_to_ansi (progname, progname_a);
+  /* Reject file names that cannot be encoded in the current ANSI
+     codepage.  */
+  if (_mbspbrk (progname_a, "?"))
+    return Qunknown;
+
+  if (w32_executable_type (progname_a, &is_dos_app, &is_cygwin_app,
+                          &is_msys_app, &dummy) != 0)
+    return Qunknown;
+  if (is_dos_app)
+    return Qdos;
+  if (is_cygwin_app)
+    return Qcygwin;
+  if (is_msys_app)
+    return Qmsys;
+  return Qw32_native;
+}
+
 #ifdef HAVE_LANGINFO_CODESET
 /* Emulation of nl_langinfo.  Used in fns.c:Flocale_info.  */
 char *
@@ -3257,16 +3327,16 @@ yield nil.  */)
   (Lisp_Object cp)
 {
   CHARSETINFO info;
-  DWORD dwcp;
+  DWORD_PTR dwcp;
 
   CHECK_NUMBER (cp);
 
   if (!IsValidCodePage (XINT (cp)))
     return Qnil;
 
-  /* Going through a temporary DWORD variable avoids compiler warning
+  /* Going through a temporary DWORD_PTR variable avoids compiler warning
      about cast to pointer from integer of different size, when
-     building --with-wide-int.  */
+     building --with-wide-int or building for 64bit.  */
   dwcp = XINT (cp);
   if (TranslateCharsetInfo ((DWORD *) dwcp, &info, TCI_SRCCODEPAGE))
     return make_number (info.ciCharset);
@@ -3429,6 +3499,9 @@ get_lcid (const char *locale_name)
 # define LINGUISTIC_IGNORECASE  0x00000010
 #endif
 
+typedef int (WINAPI *CompareStringW_Proc)
+  (LCID, DWORD, LPCWSTR, int, LPCWSTR, int);
+
 int
 w32_compare_strings (const char *s1, const char *s2, char *locname,
                     int ignore_case)
@@ -3437,7 +3510,7 @@ w32_compare_strings (const char *s1, const char *s2, char 
*locname,
   wchar_t *string1_w, *string2_w;
   int val, needed;
   extern BOOL g_b_init_compare_string_w;
-  static int (WINAPI *pCompareStringW)(LCID, DWORD, LPCWSTR, int, LPCWSTR, 
int);
+  static CompareStringW_Proc pCompareStringW;
   DWORD flags = 0;
 
   USE_SAFE_ALLOCA;
@@ -3453,8 +3526,9 @@ w32_compare_strings (const char *s1, const char *s2, char 
*locname,
     {
       if (os_subtype == OS_9X)
        {
-         pCompareStringW = GetProcAddress (LoadLibrary ("Unicows.dll"),
-                                           "CompareStringW");
+         pCompareStringW =
+            (CompareStringW_Proc) GetProcAddress (LoadLibrary ("Unicows.dll"),
+                                                  "CompareStringW");
          if (!pCompareStringW)
            {
              errno = EINVAL;
@@ -3541,6 +3615,9 @@ syms_of_ntproc (void)
 {
   DEFSYM (Qhigh, "high");
   DEFSYM (Qlow, "low");
+  DEFSYM (Qcygwin, "cygwin");
+  DEFSYM (Qmsys, "msys");
+  DEFSYM (Qw32_native, "w32-native");
 
   defsubr (&Sw32_has_winsock);
   defsubr (&Sw32_unload_winsock);
@@ -3548,6 +3625,7 @@ syms_of_ntproc (void)
   defsubr (&Sw32_short_file_name);
   defsubr (&Sw32_long_file_name);
   defsubr (&Sw32_set_process_priority);
+  defsubr (&Sw32_application_type);
   defsubr (&Sw32_get_locale_info);
   defsubr (&Sw32_get_current_locale_id);
   defsubr (&Sw32_get_default_locale_id);
diff --git a/src/w32term.c b/src/w32term.c
index 0bc2e98..fbd31b1 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -1218,7 +1218,12 @@ x_draw_glyph_string_background (struct glyph_string *s, 
bool force_p)
        }
       else
 #endif
-        if (FONT_HEIGHT (s->font) < s->height - 2 * box_line_width
+           if (FONT_HEIGHT (s->font) < s->height - 2 * box_line_width
+              /* When xdisp.c ignores FONT_HEIGHT, we cannot trust
+                 font dimensions, since the actual glyphs might be
+                 much smaller.  So in that case we always clear the
+                 rectangle with background color.  */
+              || FONT_TOO_HIGH (s->font)
               || s->font_not_found_p
               || s->extends_to_end_of_line_p
               || force_p)
@@ -5827,7 +5832,7 @@ Lisp_Object
 x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
 {
   struct font *font = XFONT_OBJECT (font_object);
-  int unit;
+  int unit, font_ascent, font_descent;
 
   if (fontset < 0)
     fontset = fontset_from_font (font_object);
@@ -5840,7 +5845,8 @@ x_new_font (struct frame *f, Lisp_Object font_object, int 
fontset)
   FRAME_FONT (f) = font;
   FRAME_BASELINE_OFFSET (f) = font->baseline_offset;
   FRAME_COLUMN_WIDTH (f) = unit = font->average_width;
-  FRAME_LINE_HEIGHT (f) = font->height;
+  get_font_ascent_descent (font, &font_ascent, &font_descent);
+  FRAME_LINE_HEIGHT (f) = font_ascent + font_descent;
 
   /* Compute number of scrollbar columns.  */
   unit = FRAME_COLUMN_WIDTH (f);
@@ -6584,7 +6590,10 @@ w32_hide_hourglass (struct frame *f)
   struct w32_output *w32 = FRAME_X_OUTPUT (f);
 
   w32->hourglass_p = 0;
-  SetCursor (w32->current_cursor);
+  if (f->pointer_invisible)
+    SetCursor (NULL);
+  else
+    SetCursor (w32->current_cursor);
 }
 
 /* FIXME: old code did that, but I don't know why.  Anyway,
@@ -6596,6 +6605,21 @@ w32_arrow_cursor (void)
   SetCursor (w32_load_cursor (IDC_ARROW));
 }
 
+static void
+w32_toggle_invisible_pointer (struct frame *f, bool invisible)
+{
+  block_input ();
+
+  if (f->pointer_invisible != invisible)
+    {
+      f->pointer_invisible = invisible;
+      w32_define_cursor (FRAME_W32_WINDOW (f),
+                        f->output_data.w32->current_cursor);
+    }
+
+  unblock_input ();
+}
+
 /***********************************************************************
                            Initialization
  ***********************************************************************/
@@ -6735,6 +6759,7 @@ w32_create_terminal (struct w32_display_info *dpyinfo)
   terminal->ins_del_lines_hook = x_ins_del_lines;
   terminal->delete_glyphs_hook = x_delete_glyphs;
   terminal->ring_bell_hook = w32_ring_bell;
+  terminal->toggle_invisible_pointer_hook = w32_toggle_invisible_pointer;
   terminal->update_begin_hook = x_update_begin;
   terminal->update_end_hook = x_update_end;
   terminal->read_socket_hook = w32_read_socket;
diff --git a/src/xdisp.c b/src/xdisp.c
index 58f2c34..696d3fa 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -839,6 +839,9 @@ static void x_draw_bottom_divider (struct window *w);
 static void notice_overwritten_cursor (struct window *,
                                        enum glyph_row_area,
                                        int, int, int, int);
+static int  normal_char_height (struct font *, int);
+static void normal_char_ascent_descent (struct font *, int, int *, int *);
+
 static void append_stretch_glyph (struct it *, Lisp_Object,
                                   int, int, int);
 
@@ -1767,7 +1770,7 @@ estimate_mode_line_height (struct frame *f, enum face_id 
face_id)
          if (face)
            {
              if (face->font)
-               height = FONT_HEIGHT (face->font);
+               height = normal_char_height (face->font, -1);
              if (face->box_line_width > 0)
                height += 2 * face->box_line_width;
            }
@@ -2156,7 +2159,7 @@ get_phys_cursor_geometry (struct window *w, struct 
glyph_row *row,
                          struct glyph *glyph, int *xp, int *yp, int *heightp)
 {
   struct frame *f = XFRAME (WINDOW_FRAME (w));
-  int x, y, wd, h, h0, y0;
+  int x, y, wd, h, h0, y0, ascent;
 
   /* Compute the width of the rectangle to draw.  If on a stretch
      glyph, and `x-stretch-block-cursor' is nil, don't draw a
@@ -2176,13 +2179,21 @@ get_phys_cursor_geometry (struct window *w, struct 
glyph_row *row,
     wd = min (FRAME_COLUMN_WIDTH (f), wd);
   w->phys_cursor_width = wd;
 
-  y = w->phys_cursor.y + row->ascent - glyph->ascent;
+  /* Don't let the hollow cursor glyph descend below the glyph row's
+     ascent value, lest the hollow cursor looks funny.  */
+  y = w->phys_cursor.y;
+  ascent = row->ascent;
+  if (row->ascent < glyph->ascent)
+    {
+      y =- glyph->ascent - row->ascent;
+      ascent = glyph->ascent;
+    }
 
   /* If y is below window bottom, ensure that we still see a cursor.  */
   h0 = min (FRAME_LINE_HEIGHT (f), row->visible_height);
 
-  h = max (h0, glyph->ascent + glyph->descent);
-  h0 = min (h0, glyph->ascent + glyph->descent);
+  h = max (h0, ascent + glyph->descent);
+  h0 = min (h0, ascent + glyph->descent);
 
   y0 = WINDOW_HEADER_LINE_HEIGHT (w);
   if (y < y0)
@@ -4889,7 +4900,7 @@ handle_single_display_spec (struct it *it, Lisp_Object 
spec, Lisp_Object object,
            {
              struct face *face = FACE_FROM_ID (it->f, it->face_id);
              it->voffset = - (XFLOATINT (value)
-                              * (FONT_HEIGHT (face->font)));
+                              * (normal_char_height (face->font, -1)));
            }
 #endif /* HAVE_WINDOW_SYSTEM */
        }
@@ -9468,7 +9479,7 @@ move_it_vertically_backward (struct it *it, int dy)
             treating terminal frames specially here.  */
 
          if (!FRAME_WINDOW_P (it->f))
-           move_it_vertically (it, target_y - (it->current_y + line_height));
+           move_it_vertically (it, target_y - it->current_y);
          else
            {
              do
@@ -15134,11 +15145,13 @@ try_scrolling (Lisp_Object window, bool 
just_this_one_p,
            RESTORE_IT (&it, &it, it1data);
            move_it_by_lines (&it, 1);
            SAVE_IT (it1, it, it1data);
-         } while (line_bottom_y (&it1) - start_y < amount_to_scroll);
+         } while (IT_CHARPOS (it) < ZV
+                  && line_bottom_y (&it1) - start_y < amount_to_scroll);
+         bidi_unshelve_cache (it1data, true);
        }
 
       /* If STARTP is unchanged, move it down another screen line.  */
-      if (CHARPOS (it.current.pos) == CHARPOS (startp))
+      if (IT_CHARPOS (it) == CHARPOS (startp))
        move_it_by_lines (&it, 1);
       startp = it.current.pos;
     }
@@ -19230,6 +19243,7 @@ append_space_for_newline (struct it *it, bool 
default_face_p)
          struct text_pos saved_pos;
          Lisp_Object saved_object;
          struct face *face;
+         struct glyph *g;
 
          saved_object = it->object;
          saved_pos = it->position;
@@ -19261,6 +19275,25 @@ append_space_for_newline (struct it *it, bool 
default_face_p)
 
          PRODUCE_GLYPHS (it);
 
+#ifdef HAVE_WINDOW_SYSTEM
+         /* Make sure this space glyph has the right ascent and
+            descent values, or else cursor at end of line will look
+            funny.  */
+         g = it->glyph_row->glyphs[TEXT_AREA] + n;
+         struct font *font = face->font ? face->font : FRAME_FONT (it->f);
+         if (n == 0 || it->glyph_row->height < font->pixel_size)
+           {
+             normal_char_ascent_descent (font, -1, &it->ascent, &it->descent);
+             it->max_ascent = it->ascent;
+             it->max_descent = it->descent;
+             /* Make sure compute_line_metrics recomputes the row height.  */
+             it->glyph_row->height = 0;
+           }
+
+         g->ascent = it->max_ascent;
+         g->descent = it->max_descent;
+#endif
+
          it->override_ascent = -1;
          it->constrain_row_ascent_descent_p = false;
          it->current_x = saved_x;
@@ -21331,6 +21364,14 @@ Value is the new character position of point.  */)
       /* Setup the arena.  */
       SET_TEXT_POS (pt, PT, PT_BYTE);
       start_display (&it, w, pt);
+      /* When lines are truncated, we could be called with point
+        outside of the windows edges, in which case move_it_*
+        functions either prematurely stop at window's edge or jump to
+        the next screen line, whereas we rely below on our ability to
+        reach point, in order to start from its X coordinate.  So we
+        need to disregard the window's horizontal extent in that case.  */
+      if (it.line_wrap == TRUNCATE)
+       it.last_visible_x = INFINITY;
 
       if (it.cmp_it.id < 0
          && it.method == GET_FROM_STRING
@@ -21422,6 +21463,8 @@ Value is the new character position of point.  */)
          if (pt_x > 0)
            {
              start_display (&it, w, pt);
+             if (it.line_wrap == TRUNCATE)
+               it.last_visible_x = INFINITY;
              reseat_at_previous_visible_line_start (&it);
              it.current_x = it.current_y = it.hpos = 0;
              if (pt_vpos != 0)
@@ -21534,27 +21577,6 @@ Value is the new character position of point.  */)
       if (it.current_x != target_x)
        move_it_in_display_line_to (&it, ZV, target_x, MOVE_TO_POS | MOVE_TO_X);
 
-      /* When lines are truncated, the above loop will stop at the
-        window edge.  But we want to get to the end of line, even if
-        it is beyond the window edge; automatic hscroll will then
-        scroll the window to show point as appropriate.  */
-      if (target_is_eol_p && it.line_wrap == TRUNCATE
-         && get_next_display_element (&it))
-       {
-         struct text_pos new_pos = it.current.pos;
-
-         while (!ITERATOR_AT_END_OF_LINE_P (&it))
-           {
-             set_iterator_to_next (&it, false);
-             if (it.method == GET_FROM_BUFFER)
-               new_pos = it.current.pos;
-             if (!get_next_display_element (&it))
-               break;
-           }
-
-         it.current.pos = new_pos;
-       }
-
       /* If we ended up in a display string that covers point, move to
         buffer position to the right in the visual order.  */
       if (dir > 0)
@@ -23973,9 +23995,13 @@ calc_pixel_width_or_height (double *res, struct it 
*it, Lisp_Object prop,
 
 #ifdef HAVE_WINDOW_SYSTEM
       if (EQ (prop, Qheight))
-       return OK_PIXELS (font ? FONT_HEIGHT (font) : FRAME_LINE_HEIGHT 
(it->f));
+       return OK_PIXELS (font
+                         ? normal_char_height (font, -1)
+                         : FRAME_LINE_HEIGHT (it->f));
       if (EQ (prop, Qwidth))
-       return OK_PIXELS (font ? FONT_WIDTH (font) : FRAME_COLUMN_WIDTH 
(it->f));
+       return OK_PIXELS (font
+                         ? FONT_WIDTH (font)
+                         : FRAME_COLUMN_WIDTH (it->f));
 #else
       if (EQ (prop, Qheight) || EQ (prop, Qwidth))
        return OK_PIXELS (1);
@@ -24112,6 +24138,17 @@ calc_pixel_width_or_height (double *res, struct it 
*it, Lisp_Object prop,
   return false;
 }
 
+void
+get_font_ascent_descent (struct font *font, int *ascent, int *descent)
+{
+#ifdef HAVE_WINDOW_SYSTEM
+  normal_char_ascent_descent (font, -1, ascent, descent);
+#else
+  *ascent = 1;
+  *descent = 0;
+#endif
+}
+
 
 /***********************************************************************
                             Glyph Display
@@ -24628,6 +24665,55 @@ get_per_char_metric (struct font *font, XChar2b 
*char2b)
   return &metrics;
 }
 
+/* A subroutine that computes "normal" values of ASCENT and DESCENT
+   for FONT.  Values are taken from font-global ones, except for fonts
+   that claim preposterously large values, but whose glyphs actually
+   have reasonable dimensions.  C is the character to use for metrics
+   if the font-global values are too large; if C is negative, the
+   function selects a default character.  */
+static void
+normal_char_ascent_descent (struct font *font, int c, int *ascent, int 
*descent)
+{
+  *ascent = FONT_BASE (font);
+  *descent = FONT_DESCENT (font);
+
+  if (FONT_TOO_HIGH (font))
+    {
+      XChar2b char2b;
+
+      /* Get metrics of C, defaulting to a reasonably sized ASCII
+        character.  */
+      if (get_char_glyph_code (c >= 0 ? c : '{', font, &char2b))
+       {
+         struct font_metrics *pcm = get_per_char_metric (font, &char2b);
+
+         if (!(pcm->width == 0 && pcm->rbearing == 0 && pcm->lbearing == 0))
+           {
+             /* We add 1 pixel to character dimensions as heuristics
+                that produces nicer display, e.g. when the face has
+                the box attribute.  */
+             *ascent = pcm->ascent + 1;
+             *descent = pcm->descent + 1;
+           }
+       }
+    }
+}
+
+/* A subroutine that computes a reasonable "normal character height"
+   for fonts that claim preposterously large vertical dimensions, but
+   whose glyphs are actually reasonably sized.  C is the character
+   whose metrics to use for those fonts, or -1 for default
+   character.  */
+static int
+normal_char_height (struct font *font, int c)
+{
+  int ascent, descent;
+
+  normal_char_ascent_descent (font, c, &ascent, &descent);
+
+  return ascent + descent;
+}
+
 /* EXPORT for RIF:
    Set *LEFT and *RIGHT to the left and right overhang of GLYPH on
    frame F.  Overhangs of glyphs other than type CHAR_GLYPH are
@@ -26065,6 +26151,8 @@ produce_stretch_glyph (struct it *it)
   /* Compute height.  */
   if (FRAME_WINDOW_P (it->f))
     {
+      int default_height = normal_char_height (font, ' ');
+
       if ((prop = Fplist_get (plist, QCheight), !NILP (prop))
          && calc_pixel_width_or_height (&tem, it, prop, font, false, 0))
        {
@@ -26073,9 +26161,9 @@ produce_stretch_glyph (struct it *it)
        }
       else if (prop = Fplist_get (plist, QCrelative_height),
               NUMVAL (prop) > 0)
-       height = FONT_HEIGHT (font) * NUMVAL (prop);
+       height = default_height * NUMVAL (prop);
       else
-       height = FONT_HEIGHT (font);
+       height = default_height;
 
       if (height <= 0 && (height < 0 || !zero_height_ok_p))
        height = 1;
@@ -26299,8 +26387,7 @@ calc_line_height_property (struct it *it, Lisp_Object 
val, struct font *font,
        boff = VCENTER_BASELINE_OFFSET (font, it->f) - boff;
     }
 
-  ascent = FONT_BASE (font) + boff;
-  descent = FONT_DESCENT (font) - boff;
+  normal_char_ascent_descent (font, -1, &ascent, &descent);
 
   if (override)
     {
@@ -26426,8 +26513,9 @@ produce_glyphless_glyph (struct it *it, bool 
for_no_font, Lisp_Object acronym)
      ASCII face.  */
   face = FACE_FROM_ID (it->f, it->face_id)->ascii_face;
   font = face->font ? face->font : FRAME_FONT (it->f);
-  it->ascent = FONT_BASE (font) + font->baseline_offset;
-  it->descent = FONT_DESCENT (font) - font->baseline_offset;
+  normal_char_ascent_descent (font, -1, &it->ascent, &it->descent);
+  it->ascent += font->baseline_offset;
+  it->descent -= font->baseline_offset;
   base_height = it->ascent + it->descent;
   base_width = font->average_width;
 
@@ -26614,6 +26702,22 @@ x_produce_glyphs (struct it *it)
              it->phys_ascent = pcm->ascent + boff;
              it->phys_descent = pcm->descent - boff;
              it->pixel_width = pcm->width;
+             /* Don't use font-global values for ascent and descent
+                if they result in an exceedingly large line height.  */
+             if (it->override_ascent < 0)
+               {
+                 if (FONT_TOO_HIGH (font))
+                   {
+                     it->ascent = it->phys_ascent;
+                     it->descent = it->phys_descent;
+                     /* These limitations are enforced by an
+                        assertion near the end of this function.  */
+                     if (it->ascent < 0)
+                       it->ascent = 0;
+                     if (it->descent < 0)
+                       it->descent = 0;
+                   }
+               }
            }
          else
            {
@@ -26741,8 +26845,18 @@ x_produce_glyphs (struct it *it)
            }
          else
            {
-             it->ascent = FONT_BASE (font) + boff;
-             it->descent = FONT_DESCENT (font) - boff;
+             if (FONT_TOO_HIGH (font))
+               {
+                 it->ascent = font->pixel_size + boff - 1;
+                 it->descent = -boff + 1;
+                 if (it->descent < 0)
+                   it->descent = 0;
+               }
+             else
+               {
+                 it->ascent = FONT_BASE (font) + boff;
+                 it->descent = FONT_DESCENT (font) - boff;
+               }
            }
 
          if (EQ (height, Qt))
@@ -26813,8 +26927,38 @@ x_produce_glyphs (struct it *it)
 
              it->pixel_width = next_tab_x - x;
              it->nglyphs = 1;
-             it->ascent = it->phys_ascent = FONT_BASE (font) + boff;
-             it->descent = it->phys_descent = FONT_DESCENT (font) - boff;
+             if (FONT_TOO_HIGH (font))
+               {
+                 if (get_char_glyph_code (' ', font, &char2b))
+                   {
+                     pcm = get_per_char_metric (font, &char2b);
+                     if (pcm->width == 0
+                         && pcm->rbearing == 0 && pcm->lbearing == 0)
+                       pcm = NULL;
+                   }
+
+                 if (pcm)
+                   {
+                     it->ascent = pcm->ascent + boff;
+                     it->descent = pcm->descent - boff;
+                   }
+                 else
+                   {
+                     it->ascent = font->pixel_size + boff - 1;
+                     it->descent = -boff + 1;
+                   }
+                 if (it->ascent < 0)
+                   it->ascent = 0;
+                 if (it->descent < 0)
+                   it->descent = 0;
+               }
+             else
+               {
+                 it->ascent = FONT_BASE (font) + boff;
+                 it->descent = FONT_DESCENT (font) - boff;
+               }
+             it->phys_ascent = it->ascent;
+             it->phys_descent = it->descent;
 
              if (it->glyph_row)
                {
@@ -26828,6 +26972,22 @@ x_produce_glyphs (struct it *it)
              it->nglyphs = 1;
            }
        }
+
+      if (FONT_TOO_HIGH (font))
+       {
+         int font_ascent, font_descent;
+
+         /* For very large fonts, where we ignore the declared font
+            dimensions, and go by per-character metrics instead,
+            don't let the row ascent and descent values (and the row
+            height computed from them) be smaller than the "normal"
+            character metrics.  This avoids unpleasant effects
+            whereby lines on display would change their height
+            depending on which characters are shown.  */
+         normal_char_ascent_descent (font, -1, &font_ascent, &font_descent);
+         it->max_ascent = max (it->max_ascent, font_ascent);
+         it->max_descent = max (it->max_descent, font_descent);
+       }
     }
   else if (it->what == IT_COMPOSITION && it->cmp_it.ch < 0)
     {
@@ -26894,9 +27054,10 @@ x_produce_glyphs (struct it *it)
          boff = font->baseline_offset;
          if (font->vertical_centering)
            boff = VCENTER_BASELINE_OFFSET (font, it->f) - boff;
-         font_ascent = FONT_BASE (font) + boff;
-         font_descent = FONT_DESCENT (font) - boff;
-         font_height = FONT_HEIGHT (font);
+         normal_char_ascent_descent (font, -1, &font_ascent, &font_descent);
+         font_ascent +=  boff;
+         font_descent -= boff;
+         font_height = font_ascent + font_descent;
 
          cmp->font = font;
 
@@ -29171,7 +29332,7 @@ static void
 define_frame_cursor1 (struct frame *f, Cursor cursor, Lisp_Object pointer)
 {
   /* Do not change cursor shape while dragging mouse.  */
-  if (!NILP (do_mouse_tracking))
+  if (EQ (do_mouse_tracking, Qdragging))
     return;
 
   if (!NILP (pointer))
@@ -30138,8 +30299,11 @@ expose_area (struct window *w, struct glyph_row *row, 
XRectangle *r,
       /* Find the last one.  */
       last = first;
       first_x = x;
-      while (last < end
-            && x < r->x + r->width)
+      /* Use a signed int intermediate value to avoid catastrophic
+        failures due to comparison between signed and unsigned, when
+        x is negative (can happen for wide images that are hscrolled).  */
+      int r_end = r->x + r->width;
+      while (last < end && x < r_end)
        {
          x += last->pixel_width;
          ++last;
@@ -30413,6 +30577,11 @@ expose_window (struct window *w, XRectangle *fr)
         check later if it is changed.  */
       bool phys_cursor_on_p = w->phys_cursor_on_p;
 
+      /* Use a signed int intermediate value to avoid catastrophic
+        failures due to comparison between signed and unsigned, when
+        y0 or y1 is negative (can happen for tall images).  */
+      int r_bottom = r.y + r.height;
+
       /* Update lines intersecting rectangle R.  */
       first_overlapping_row = last_overlapping_row = NULL;
       for (row = w->current_matrix->rows;
@@ -30422,10 +30591,10 @@ expose_window (struct window *w, XRectangle *fr)
          int y0 = row->y;
          int y1 = MATRIX_ROW_BOTTOM_Y (row);
 
-         if ((y0 >= r.y && y0 < r.y + r.height)
-             || (y1 > r.y && y1 < r.y + r.height)
+         if ((y0 >= r.y && y0 < r_bottom)
+             || (y1 > r.y && y1 < r_bottom)
              || (r.y >= y0 && r.y < y1)
-             || (r.y + r.height > y0 && r.y + r.height < y1))
+             || (r_bottom > y0 && r_bottom < y1))
            {
              /* A header line may be overlapping, but there is no need
                 to fix overlapping areas for them.  KFS 2005-02-12 */
@@ -30462,7 +30631,7 @@ expose_window (struct window *w, XRectangle *fr)
       if (WINDOW_WANTS_MODELINE_P (w)
          && (row = MATRIX_MODE_LINE_ROW (w->current_matrix),
              row->enabled_p)
-         && row->y < r.y + r.height)
+         && row->y < r_bottom)
        {
          if (expose_line (w, row, &r))
            mouse_face_overwritten_p = true;
@@ -30793,6 +30962,8 @@ They are still logged to the *Messages* buffer.  */);
   DEFSYM (Qarrow, "arrow");
   /* also Qtext */
 
+  DEFSYM (Qdragging, "dragging");
+
   DEFSYM (Qinhibit_free_realized_faces, "inhibit-free-realized-faces");
 
   list_of_error = list1 (list2 (Qerror, Qvoid_variable));
diff --git a/src/xfns.c b/src/xfns.c
index 634881d..8137cea 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -120,8 +120,8 @@ extern LWLIB_ID widget_id_tick;
 
 #define MAXREQUEST(dpy) (XMaxRequestSize (dpy))
 
-#ifdef GLYPH_DEBUG
 static ptrdiff_t image_cache_refcount;
+#ifdef GLYPH_DEBUG
 static int dpyinfo_refcount;
 #endif
 
@@ -2828,6 +2828,17 @@ unwind_create_frame (Lisp_Object frame)
       struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
 #endif
 
+      /* If the frame's image cache refcount is still the same as our
+        private shadow variable, it means we are unwinding a frame
+        for which we didn't yet call init_frame_faces, where the
+        refcount is incremented.  Therefore, we increment it here, so
+        that free_frame_faces, called in x_free_frame_resources
+        below, will not mistakenly decrement the counter that was not
+        incremented yet to account for this new frame.  */
+      if (FRAME_IMAGE_CACHE (f) != NULL
+         && FRAME_IMAGE_CACHE (f)->refcount == image_cache_refcount)
+       FRAME_IMAGE_CACHE (f)->refcount++;
+
       x_free_frame_resources (f);
       free_glyphs (f);
 
@@ -3127,6 +3138,12 @@ This function is an internal primitive--use `make-frame' 
instead.  */)
   register_font_driver (&xfont_driver, f);
 #endif /* not USE_CAIRO */
 
+  image_cache_refcount =
+    FRAME_IMAGE_CACHE (f) ? FRAME_IMAGE_CACHE (f)->refcount : 0;
+#ifdef GLYPH_DEBUG
+  dpyinfo_refcount = dpyinfo->reference_count;
+#endif /* GLYPH_DEBUG */
+
   x_default_parameter (f, parms, Qfont_backend, Qnil,
                       "fontBackend", "FontBackend", RES_TYPE_STRING);
 
@@ -3205,12 +3222,6 @@ This function is an internal primitive--use `make-frame' 
instead.  */)
                                        "scrollBarBackground",
                                        "ScrollBarBackground", false);
 
-#ifdef GLYPH_DEBUG
-  image_cache_refcount =
-    FRAME_IMAGE_CACHE (f) ? FRAME_IMAGE_CACHE (f)->refcount : 0;
-  dpyinfo_refcount = dpyinfo->reference_count;
-#endif /* GLYPH_DEBUG */
-
   /* Init faces before x_default_parameter is called for the
      scroll-bar-width parameter because otherwise we end up in
      init_iterator with a null face cache, which should not happen.  */
@@ -4348,6 +4359,9 @@ elements (all size values are in pixels).
   int left_off, right_off, top_off, bottom_off, outer_border;
   XWindowAttributes atts;
 
+  if (FRAME_INITIAL_P (f) || !FRAME_X_P (f))
+    return Qnil;
+
   block_input ();
 
   XGetWindowAttributes (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), &atts);
@@ -5134,6 +5148,12 @@ x_create_tip_frame (struct x_display_info *dpyinfo,
 #endif /* HAVE_FREETYPE */
 #endif /* not USE_CAIRO */
 
+  image_cache_refcount =
+    FRAME_IMAGE_CACHE (f) ? FRAME_IMAGE_CACHE (f)->refcount : 0;
+#ifdef GLYPH_DEBUG
+  dpyinfo_refcount = dpyinfo->reference_count;
+#endif /* GLYPH_DEBUG */
+
   x_default_parameter (f, parms, Qfont_backend, Qnil,
                       "fontBackend", "FontBackend", RES_TYPE_STRING);
 
@@ -5178,12 +5198,6 @@ x_create_tip_frame (struct x_display_info *dpyinfo,
   x_default_parameter (f, parms, Qborder_color, build_string ("black"),
                       "borderColor", "BorderColor", RES_TYPE_STRING);
 
-#ifdef GLYPH_DEBUG
-  image_cache_refcount =
-    FRAME_IMAGE_CACHE (f) ? FRAME_IMAGE_CACHE (f)->refcount : 0;
-  dpyinfo_refcount = dpyinfo->reference_count;
-#endif /* GLYPH_DEBUG */
-
   /* Init faces before x_default_parameter is called for the
      scroll-bar-width parameter because otherwise we end up in
      init_iterator with a null face cache, which should not happen.  */
@@ -5333,7 +5347,7 @@ x_create_tip_frame (struct x_display_info *dpyinfo,
 static void
 compute_tip_xy (struct frame *f, Lisp_Object parms, Lisp_Object dx, 
Lisp_Object dy, int width, int height, int *root_x, int *root_y)
 {
-  Lisp_Object left, top;
+  Lisp_Object left, top, right, bottom;
   int win_x, win_y;
   Window root, child;
   unsigned pmask;
@@ -5341,10 +5355,13 @@ compute_tip_xy (struct frame *f, Lisp_Object parms, 
Lisp_Object dx, Lisp_Object
   /* User-specified position?  */
   left = Fcdr (Fassq (Qleft, parms));
   top  = Fcdr (Fassq (Qtop, parms));
+  right = Fcdr (Fassq (Qright, parms));
+  bottom = Fcdr (Fassq (Qbottom, parms));
 
   /* Move the tooltip window where the mouse pointer is.  Resize and
      show it.  */
-  if (!INTEGERP (left) || !INTEGERP (top))
+  if ((!INTEGERP (left) && !INTEGERP (right))
+      || (!INTEGERP (top) && !INTEGERP (bottom)))
     {
       block_input ();
       XQueryPointer (FRAME_X_DISPLAY (f), FRAME_DISPLAY_INFO (f)->root_window,
@@ -5354,6 +5371,8 @@ compute_tip_xy (struct frame *f, Lisp_Object parms, 
Lisp_Object dx, Lisp_Object
 
   if (INTEGERP (top))
     *root_y = XINT (top);
+  else if (INTEGERP (bottom))
+    *root_y = XINT (bottom) - height;
   else if (*root_y + XINT (dy) <= 0)
     *root_y = 0; /* Can happen for negative dy */
   else if (*root_y + XINT (dy) + height
@@ -5369,6 +5388,8 @@ compute_tip_xy (struct frame *f, Lisp_Object parms, 
Lisp_Object dx, Lisp_Object
 
   if (INTEGERP (left))
     *root_x = XINT (left);
+  else if (INTEGERP (right))
+    *root_y = XINT (right) - width;
   else if (*root_x + XINT (dx) <= 0)
     *root_x = 0; /* Can happen for negative dx */
   else if (*root_x + XINT (dx) + width
@@ -5398,13 +5419,19 @@ change the tooltip's appearance.
 Automatically hide the tooltip after TIMEOUT seconds.  TIMEOUT nil
 means use the default timeout of 5 seconds.
 
-If the list of frame parameters PARMS contains a `left' parameters,
-the tooltip is displayed at that x-position.  Otherwise it is
-displayed at the mouse position, with offset DX added (default is 5 if
-DX isn't specified).  Likewise for the y-position; if a `top' frame
-parameter is specified, it determines the y-position of the tooltip
-window, otherwise it is displayed at the mouse position, with offset
-DY added (default is -10).
+If the list of frame parameters PARMS contains a `left' parameter,
+display the tooltip at that x-position.  If the list of frame parameters
+PARMS contains no `left' but a `right' parameter, display the tooltip
+right-adjusted at that x-position. Otherwise display it at the
+x-position of the mouse, with offset DX added (default is 5 if DX isn't
+specified).
+
+Likewise for the y-position: If a `top' frame parameter is specified, it
+determines the position of the upper edge of the tooltip window.  If a
+`bottom' parameter but no `top' frame parameter is specified, it
+determines the position of the lower edge of the tooltip window.
+Otherwise display the tooltip window at the y-position of the mouse,
+with offset DY added (default is -10).
 
 A tooltip's maximum size is specified by `x-max-tooltip-size'.
 Text larger than the specified size is clipped.  */)
diff --git a/src/xftfont.c b/src/xftfont.c
index 0e8b876..a1846e8 100644
--- a/src/xftfont.c
+++ b/src/xftfont.c
@@ -617,8 +617,26 @@ xftfont_draw (struct glyph_string *s, int from, int to, 
int x, int y,
     XftDrawSetClip (xft_draw, NULL);
 
   if (with_background)
-    XftDrawRect (xft_draw, &bg,
-                x, y - s->font->ascent, s->width, s->font->height);
+    {
+      int height = FONT_HEIGHT (s->font), ascent = FONT_BASE (s->font);
+
+      /* Font's global height and ascent values might be
+        preposterously large for some fonts.  We fix here the case
+        when those fonts are used for display of glyphless
+        characters, because drawing background with font dimensions
+        in those cases makes the display illegible.  There's only one
+        more call to the draw method with with_background set to
+        true, and that's in x_draw_glyph_string_foreground, when
+        drawing the cursor, where we have no such heuristics
+        available.  FIXME.  */
+      if (s->first_glyph->type == GLYPHLESS_GLYPH
+         && (s->first_glyph->u.glyphless.method == GLYPHLESS_DISPLAY_HEX_CODE
+             || s->first_glyph->u.glyphless.method == 
GLYPHLESS_DISPLAY_ACRONYM))
+       height = ascent =
+         s->first_glyph->slice.glyphless.lower_yoff
+         - s->first_glyph->slice.glyphless.upper_yoff;
+      XftDrawRect (xft_draw, &bg, x, y - ascent, s->width, height);
+    }
   code = alloca (sizeof (FT_UInt) * len);
   for (i = 0; i < len; i++)
     code[i] = ((XCHAR2B_BYTE1 (s->char2b + from + i) << 8)
diff --git a/src/xselect.c b/src/xselect.c
index 19ace06..bd2d65e 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -45,9 +45,8 @@ along with GNU Emacs.  If not, see 
<http://www.gnu.org/licenses/>.  */
 struct prop_location;
 struct selection_data;
 
-static void x_decline_selection_request (struct input_event *);
-static bool x_convert_selection (struct input_event *, Lisp_Object,
-                                Lisp_Object, Atom, bool,
+static void x_decline_selection_request (struct selection_input_event *);
+static bool x_convert_selection (Lisp_Object, Lisp_Object, Atom, bool,
                                 struct x_display_info *);
 static bool waiting_for_other_props_on_window (Display *, Window);
 static struct prop_location *expect_property_change (Display *, Window,
@@ -117,7 +116,7 @@ selection_quantum (Display *display)
 
 struct selection_event_queue
   {
-    struct input_event event;
+    struct selection_input_event event;
     struct selection_event_queue *next;
   };
 
@@ -127,10 +126,22 @@ static struct selection_event_queue *selection_queue;
 
 static int x_queue_selection_requests;
 
+/* True if the input events are duplicates.  */
+
+static bool
+selection_input_event_equal (struct selection_input_event *a,
+                            struct selection_input_event *b)
+{
+  return (a->kind == b->kind && a->dpyinfo == b->dpyinfo
+         && a->requestor == b->requestor && a->selection == b->selection
+         && a->target == b->target && a->property == b->property
+         && a->time == b->time);
+}
+
 /* Queue up an SELECTION_REQUEST_EVENT *EVENT, to be processed later.  */
 
 static void
-x_queue_event (struct input_event *event)
+x_queue_event (struct selection_input_event *event)
 {
   struct selection_event_queue *queue_tmp;
 
@@ -138,7 +149,7 @@ x_queue_event (struct input_event *event)
      This only happens for large requests which uses the incremental protocol. 
 */
   for (queue_tmp = selection_queue; queue_tmp; queue_tmp = queue_tmp->next)
     {
-      if (!memcmp (&queue_tmp->event, event, sizeof (*event)))
+      if (selection_input_event_equal (event, &queue_tmp->event))
        {
          TRACE1 ("DECLINE DUP SELECTION EVENT %p", queue_tmp);
          x_decline_selection_request (event);
@@ -419,7 +430,7 @@ x_get_local_selection (Lisp_Object selection_symbol, 
Lisp_Object target_type,
    meaning we were unable to do what they wanted.  */
 
 static void
-x_decline_selection_request (struct input_event *event)
+x_decline_selection_request (struct selection_input_event *event)
 {
   XEvent reply_base;
   XSelectionEvent *reply = &(reply_base.xselection);
@@ -444,7 +455,7 @@ x_decline_selection_request (struct input_event *event)
 
 /* This is the selection request currently being processed.
    It is set to zero when the request is fully processed.  */
-static struct input_event *x_selection_current_request;
+static struct selection_input_event *x_selection_current_request;
 
 /* Display info in x_selection_request.  */
 
@@ -549,7 +560,7 @@ static int x_reply_selection_request_cnt;
 #endif  /* TRACE_SELECTION */
 
 static void
-x_reply_selection_request (struct input_event *event,
+x_reply_selection_request (struct selection_input_event *event,
                            struct x_display_info *dpyinfo)
 {
   XEvent reply_base;
@@ -740,7 +751,7 @@ x_reply_selection_request (struct input_event *event,
    This is called from keyboard.c when such an event is found in the queue.  */
 
 static void
-x_handle_selection_request (struct input_event *event)
+x_handle_selection_request (struct selection_input_event *event)
 {
   struct gcpro gcpro1, gcpro2;
   Time local_selection_time;
@@ -809,7 +820,7 @@ x_handle_selection_request (struct input_event *event)
                                               AREF (multprop, 2*j+1));
 
          if (subproperty != None)
-           x_convert_selection (event, selection_symbol, subtarget,
+           x_convert_selection (selection_symbol, subtarget,
                                 subproperty, true, dpyinfo);
        }
       success = true;
@@ -818,7 +829,7 @@ x_handle_selection_request (struct input_event *event)
     {
       if (property == None)
        property = SELECTION_EVENT_TARGET (event);
-      success = x_convert_selection (event, selection_symbol,
+      success = x_convert_selection (selection_symbol,
                                     target_symbol, property,
                                     false, dpyinfo);
     }
@@ -849,7 +860,7 @@ x_handle_selection_request (struct input_event *event)
    Return true iff successful.  */
 
 static bool
-x_convert_selection (struct input_event *event, Lisp_Object selection_symbol,
+x_convert_selection (Lisp_Object selection_symbol,
                     Lisp_Object target_symbol, Atom property,
                     bool for_multiple, struct x_display_info *dpyinfo)
 {
@@ -902,7 +913,7 @@ x_convert_selection (struct input_event *event, Lisp_Object 
selection_symbol,
    This is called from keyboard.c when such an event is found in the queue.  */
 
 static void
-x_handle_selection_clear (struct input_event *event)
+x_handle_selection_clear (struct selection_input_event *event)
 {
   Atom selection = SELECTION_EVENT_SELECTION (event);
   Time changed_owner_time = SELECTION_EVENT_TIME (event);
@@ -954,7 +965,7 @@ x_handle_selection_clear (struct input_event *event)
 }
 
 void
-x_handle_selection_event (struct input_event *event)
+x_handle_selection_event (struct selection_input_event *event)
 {
   TRACE0 ("x_handle_selection_event");
   if (event->kind != SELECTION_REQUEST_EVENT)
@@ -2006,10 +2017,7 @@ On MS-DOS, all this does is return non-nil if we own the 
selection.  */)
 {
   Time timestamp;
   Atom selection_atom;
-  union {
-    struct selection_input_event sie;
-    struct input_event ie;
-  } event;
+  struct selection_input_event event;
   struct frame *f = frame_for_x_selection (terminal);
   struct x_display_info *dpyinfo;
 
@@ -2038,10 +2046,10 @@ On MS-DOS, all this does is return non-nil if we own 
the selection.  */)
      the selection owner to None.  The NCD server does, the MIT Sun4 server
      doesn't.  So we synthesize one; this means we might get two, but
      that's ok, because the second one won't have any effect.  */
-  SELECTION_EVENT_DPYINFO (&event.sie) = dpyinfo;
-  SELECTION_EVENT_SELECTION (&event.sie) = selection_atom;
-  SELECTION_EVENT_TIME (&event.sie) = timestamp;
-  x_handle_selection_clear (&event.ie);
+  SELECTION_EVENT_DPYINFO (&event) = dpyinfo;
+  SELECTION_EVENT_SELECTION (&event) = selection_atom;
+  SELECTION_EVENT_TIME (&event) = timestamp;
+  x_handle_selection_clear (&event);
 
   return Qt;
 }
diff --git a/src/xsmfns.c b/src/xsmfns.c
index 48aaa9b..3b06f71 100644
--- a/src/xsmfns.c
+++ b/src/xsmfns.c
@@ -28,6 +28,7 @@ along with GNU Emacs.  If not, see 
<http://www.gnu.org/licenses/>.  */
 
 #include <unistd.h>
 #include <sys/param.h>
+#include <errno.h>
 #include <stdio.h>
 
 #include "lisp.h"
@@ -402,6 +403,14 @@ x_session_initialize (struct x_display_info *dpyinfo)
   SmcCallbacks callbacks;
   ptrdiff_t name_len = 0;
 
+  /* libSM seems to crash if pwd is missing - see bug#18851.  */
+  if (! get_current_dir_name ())
+    {
+      fprintf (stderr, "Disabling session management due to pwd error: %s\n",
+               emacs_strerror (errno));
+      return;
+    }
+
   ice_fd = -1;
   doing_interact = false;
 
diff --git a/src/xterm.c b/src/xterm.c
index 5733e44..0581280 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -555,7 +555,7 @@ x_cr_accumulate_data (void *closure, const unsigned char 
*data,
 {
   Lisp_Object *acc = (Lisp_Object *) closure;
 
-  *acc = Fcons (make_unibyte_string (data, length), *acc);
+  *acc = Fcons (make_unibyte_string ((char const *) data, length), *acc);
 
   return CAIRO_STATUS_SUCCESS;
 }
@@ -1727,6 +1727,11 @@ x_draw_glyph_string_background (struct glyph_string *s, 
bool force_p)
          s->background_filled_p = true;
        }
       else if (FONT_HEIGHT (s->font) < s->height - 2 * box_line_width
+              /* When xdisp.c ignores FONT_HEIGHT, we cannot trust
+                 font dimensions, since the actual glyphs might be
+                 much smaller.  So in that case we always clear the
+                 rectangle with background color.  */
+              || FONT_TOO_HIGH (s->font)
               || s->font_not_found_p
               || s->extends_to_end_of_line_p
               || force_p)
@@ -6418,7 +6423,7 @@ x_scroll_bar_set_handle (struct scroll_bar *bar, int 
start, int end,
                      f->output_data.x->scroll_bar_foreground_pixel);
 
     /* Draw the handle itself.  */
-    x_fill_rectangle (f, gc,
+    XFillRectangle (FRAME_X_DISPLAY (f), w, gc,
                    /* x, y, width, height */
                    VERTICAL_SCROLL_BAR_LEFT_BORDER,
                    VERTICAL_SCROLL_BAR_TOP_BORDER + start,
@@ -6893,7 +6898,7 @@ x_scroll_bar_expose (struct scroll_bar *bar, const XEvent 
*event)
                    f->output_data.x->scroll_bar_foreground_pixel);
 
   /* Draw a one-pixel border just inside the edges of the scroll bar.  */
-  x_draw_rectangle (f, gc,
+  XDrawRectangle (FRAME_X_DISPLAY (f), w, gc,
                  /* x, y, width, height */
                  0, 0, bar->width - 1, bar->height - 1);
 
@@ -7362,10 +7367,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
                   const XEvent *event,
                   int *finish, struct input_event *hold_quit)
 {
-  union {
-    struct input_event ie;
-    struct selection_input_event sie;
-  } inev;
+  union buffered_input_event inev;
   int count = 0;
   int do_help = 0;
   ptrdiff_t nbytes = 0;
@@ -7593,7 +7595,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
       {
         const XSelectionClearEvent *eventp = &event->xselectionclear;
 
-        inev.ie.kind = SELECTION_CLEAR_EVENT;
+        inev.sie.kind = SELECTION_CLEAR_EVENT;
         SELECTION_EVENT_DPYINFO (&inev.sie) = dpyinfo;
         SELECTION_EVENT_SELECTION (&inev.sie) = eventp->selection;
         SELECTION_EVENT_TIME (&inev.sie) = eventp->time;
@@ -7609,7 +7611,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
       {
        const XSelectionRequestEvent *eventp = &event->xselectionrequest;
 
-       inev.ie.kind = SELECTION_REQUEST_EVENT;
+       inev.sie.kind = SELECTION_REQUEST_EVENT;
        SELECTION_EVENT_DPYINFO (&inev.sie) = dpyinfo;
        SELECTION_EVENT_REQUESTOR (&inev.sie) = eventp->requestor;
        SELECTION_EVENT_SELECTION (&inev.sie) = eventp->selection;
@@ -7677,7 +7679,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
             }
           else
            {
-#if defined (USE_GTK) && ! defined (HAVE_GTK3) && ! defined (USE_CAIRO)
+#ifdef USE_GTK
              /* This seems to be needed for GTK 2.6 and later, see
                 http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15398.  */
              x_clear_area (f,
@@ -8120,7 +8122,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
                                ? ASCII_KEYSTROKE_EVENT
                                : MULTIBYTE_CHAR_KEYSTROKE_EVENT);
                inev.ie.code = ch;
-               kbd_buffer_store_event_hold (&inev.ie, hold_quit);
+               kbd_buffer_store_buffered_event (&inev, hold_quit);
              }
 
            count += nchars;
@@ -8537,7 +8539,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
  done:
   if (inev.ie.kind != NO_EVENT)
     {
-      kbd_buffer_store_event_hold (&inev.ie, hold_quit);
+      kbd_buffer_store_buffered_event (&inev, hold_quit);
       count++;
     }
 
@@ -9419,7 +9421,7 @@ Lisp_Object
 x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
 {
   struct font *font = XFONT_OBJECT (font_object);
-  int unit;
+  int unit, font_ascent, font_descent;
 
   if (fontset < 0)
     fontset = fontset_from_font (font_object);
@@ -9432,7 +9434,8 @@ x_new_font (struct frame *f, Lisp_Object font_object, int 
fontset)
   FRAME_FONT (f) = font;
   FRAME_BASELINE_OFFSET (f) = font->baseline_offset;
   FRAME_COLUMN_WIDTH (f) = font->average_width;
-  FRAME_LINE_HEIGHT (f) = FONT_HEIGHT (font);
+  get_font_ascent_descent (font, &font_ascent, &font_descent);
+  FRAME_LINE_HEIGHT (f) = font_ascent + font_descent;
 
 #ifndef USE_X_TOOLKIT
   FRAME_MENU_BAR_HEIGHT (f) = FRAME_MENU_BAR_LINES (f) * FRAME_LINE_HEIGHT (f);
diff --git a/src/xterm.h b/src/xterm.h
index 3081c16..5622344 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -960,7 +960,7 @@ struct scroll_bar
 
 struct selection_input_event
 {
-  int kind;
+  ENUM_BF (event_kind) kind : EVENT_KIND_WIDTH;
   struct x_display_info *dpyinfo;
   /* We spell it with an "o" here because X does.  */
   Window requestor;
@@ -970,23 +970,23 @@ struct selection_input_event
 
 /* Unlike macros below, this can't be used as an lvalue.  */
 INLINE Display *
-SELECTION_EVENT_DISPLAY (struct input_event *ev)
+SELECTION_EVENT_DISPLAY (struct selection_input_event *ev)
 {
-  return ((struct selection_input_event *) ev)->dpyinfo->display;
+  return ev->dpyinfo->display;
 }
 #define SELECTION_EVENT_DPYINFO(eventp) \
-  (((struct selection_input_event *) (eventp))->dpyinfo)
+  ((eventp)->dpyinfo)
 /* We spell it with an "o" here because X does.  */
 #define SELECTION_EVENT_REQUESTOR(eventp)      \
-  (((struct selection_input_event *) (eventp))->requestor)
+  ((eventp)->requestor)
 #define SELECTION_EVENT_SELECTION(eventp)      \
-  (((struct selection_input_event *) (eventp))->selection)
+  ((eventp)->selection)
 #define SELECTION_EVENT_TARGET(eventp) \
-  (((struct selection_input_event *) (eventp))->target)
+  ((eventp)->target)
 #define SELECTION_EVENT_PROPERTY(eventp)       \
-  (((struct selection_input_event *) (eventp))->property)
+  ((eventp)->property)
 #define SELECTION_EVENT_TIME(eventp)   \
-  (((struct selection_input_event *) (eventp))->time)
+  ((eventp)->time)
 
 /* From xfns.c.  */
 
@@ -1079,7 +1079,7 @@ extern void x_clear_under_internal_border (struct frame 
*f);
 
 extern void x_handle_property_notify (const XPropertyEvent *);
 extern void x_handle_selection_notify (const XSelectionEvent *);
-extern void x_handle_selection_event (struct input_event *);
+extern void x_handle_selection_event (struct selection_input_event *);
 extern void x_clear_frame_selections (struct frame *);
 
 extern void x_send_client_event (Lisp_Object display,
diff --git a/test/BidiCharacterTest.txt b/test/BidiCharacterTest.txt
index ee6432f..7a460b4 100644
--- a/test/BidiCharacterTest.txt
+++ b/test/BidiCharacterTest.txt
@@ -1,8 +1,8 @@
-# BidiCharacterTest-7.0.0.txt
-# Date: 2014-02-07, 02:00:00 GMT [LI]
+# BidiCharacterTest-8.0.0.txt
+# Date: 2015-02-19, 00:30:00 GMT [LI]
 #
 # Unicode Character Database
-# Copyright (c) 1991-2014 Unicode, Inc.
+# Copyright (c) 1991-2015 Unicode, Inc.
 # For terms of use, see http://www.unicode.org/terms_of_use.html
 #
 # This file provides a conformance test for implementations of the
diff --git a/test/automated/Makefile.in b/test/automated/Makefile.in
index faf0b3d..174b3b6 100644
--- a/test/automated/Makefile.in
+++ b/test/automated/Makefile.in
@@ -93,7 +93,7 @@ WRITE_LOG = > $@ 2>&1 || { stat=ERROR; cat $@; }; echo 
$$stat: $@
        $(emacs) -l ert -l $$loadfile \
          -f ert-run-tests-batch-and-exit ${WRITE_LOG}
 
-ELFILES = $(wildcard ${srcdir}/*.el)
+ELFILES = $(sort $(wildcard ${srcdir}/*.el))
 LOGFILES = $(patsubst %.el,%.log,$(notdir ${ELFILES}))
 TESTS = ${LOGFILES:.log=}
 
diff --git a/test/automated/auto-revert-tests.el 
b/test/automated/auto-revert-tests.el
new file mode 100644
index 0000000..204e03d
--- /dev/null
+++ b/test/automated/auto-revert-tests.el
@@ -0,0 +1,210 @@
+;;; auto-revert-tests.el --- Tests of auto-revert
+
+;; Copyright (C) 2015 Free Software Foundation, Inc.
+
+;; Author: Michael Albinus <address@hidden>
+
+;; 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/'.
+
+;;; Commentary:
+
+;; A whole test run can be performed calling the command 
`auto-revert-test-all'.
+
+;;; Code:
+
+(require 'ert)
+(require 'autorevert)
+(setq auto-revert-notify-exclude-dir-regexp "nothing-to-be-excluded"
+      auto-revert-stop-on-user-input nil)
+
+(defvar auto-revert--timeout 10)
+
+(ert-deftest auto-revert-test00-auto-revert-mode ()
+  "Check autorevert for a file."
+  ;; `auto-revert-buffers' runs every 5".  And we must wait, until the
+  ;; file has been reverted.
+  (let ((tmpfile (make-temp-file "auto-revert-test"))
+        buf)
+    (unwind-protect
+       (progn
+          (with-current-buffer (get-buffer-create "*Messages*")
+            (narrow-to-region (point-max) (point-max)))
+         (write-region "any text" nil tmpfile nil 'no-message)
+         (setq buf (find-file-noselect 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)
+           (should auto-revert-mode)
+
+           ;; Modify file.  We wait for a second, in order to have
+           ;; another timestamp.
+           (sleep-for 1)
+            (write-region "another text" nil tmpfile nil 'no-message)
+
+           ;; Check, that the buffer has been reverted.
+            (with-timeout (auto-revert--timeout nil)
+              (with-current-buffer "*Messages*"
+                (while
+                    (null (string-match
+                           (format "Reverting buffer `%s'." (buffer-name buf))
+                           (buffer-string)))
+                  (read-event nil nil 0.1))))
+            (should (string-match "another text" (buffer-string)))
+
+            ;; When the buffer is modified, it shall not be reverted.
+            (with-current-buffer (get-buffer-create "*Messages*")
+              (narrow-to-region (point-max) (point-max)))
+            (set-buffer-modified-p t)
+           (sleep-for 1)
+            (write-region "any text" nil tmpfile nil 'no-message)
+
+           ;; Check, whether the buffer has been reverted.
+            (with-timeout (auto-revert--timeout nil)
+              (with-current-buffer "*Messages*"
+                (while
+                    (null (string-match
+                           (format "Reverting buffer `%s'." (buffer-name buf))
+                           (buffer-string)))
+                  (read-event nil nil 0.1))))
+            (should-not (string-match "any text" (buffer-string)))))
+
+      ;; Exit.
+      (with-current-buffer "*Messages*" (widen))
+      (ignore-errors
+        (with-current-buffer buf (set-buffer-modified-p nil))
+        (kill-buffer buf))
+      (ignore-errors (delete-file tmpfile)))))
+
+(ert-deftest auto-revert-test01-auto-revert-tail-mode ()
+  "Check autorevert tail mode."
+  ;; `auto-revert-buffers' runs every 5".  And we must wait, until the
+  ;; file has been reverted.
+  (let ((tmpfile (make-temp-file "auto-revert-test"))
+        buf)
+    (unwind-protect
+       (progn
+          (with-current-buffer (get-buffer-create "*Messages*")
+            (narrow-to-region (point-max) (point-max)))
+          (write-region "any text" nil tmpfile nil 'no-message)
+         (setq buf (find-file-noselect tmpfile))
+         (with-current-buffer buf
+            ;; `buffer-stale--default-function' checks for
+            ;; `verify-visited-file-modtime'.  We must ensure that it
+            ;; returns nil.
+            (sleep-for 1)
+           (auto-revert-tail-mode 1)
+           (should auto-revert-tail-mode)
+            (erase-buffer)
+            (insert "modified text\n")
+            (set-buffer-modified-p nil)
+
+           ;; Modify file.  We wait for a second, in order to have
+           ;; another timestamp.
+           (sleep-for 1)
+            (write-region "another text" nil tmpfile 'append 'no-message)
+
+           ;; Check, that the buffer has been reverted.
+            (with-timeout (auto-revert--timeout nil)
+              (with-current-buffer "*Messages*"
+                (while
+                    (null (string-match
+                           (format "Reverting buffer `%s'." (buffer-name buf))
+                           (buffer-string)))
+                  (read-event nil nil 0.1))))
+            (should
+             (string-match "modified text\nanother text" (buffer-string)))))
+
+      ;; Exit.
+      (with-current-buffer "*Messages*" (widen))
+      (ignore-errors (kill-buffer buf))
+      (ignore-errors (delete-file tmpfile)))))
+
+(ert-deftest auto-revert-test02-auto-revert-mode-dired ()
+  "Check autorevert for dired."
+  ;; `auto-revert-buffers' runs every 5".  And we must wait, until the
+  ;; file has been reverted.
+  (let* ((tmpfile (make-temp-file "auto-revert-test"))
+         (name (file-name-nondirectory tmpfile))
+         buf)
+    (unwind-protect
+       (progn
+          (with-current-buffer (get-buffer-create "*Messages*")
+            (narrow-to-region (point-max) (point-max)))
+         (setq buf (dired-noselect temporary-file-directory))
+         (with-current-buffer buf
+            ;; `buffer-stale--default-function' checks for
+            ;; `verify-visited-file-modtime'.  We must ensure that it
+            ;; returns nil.
+            (sleep-for 1)
+            (auto-revert-mode 1)
+            (should auto-revert-mode)
+           (should
+             (string-match name (substring-no-properties (buffer-string))))
+
+           ;; Delete file.  We wait for a second, in order to have
+           ;; another timestamp.
+           (sleep-for 1)
+            (delete-file tmpfile)
+
+           ;; Check, that the buffer has been reverted.
+            (with-timeout (auto-revert--timeout nil)
+              (with-current-buffer "*Messages*"
+                (while
+                    (null (string-match
+                           (format "Reverting buffer `%s'." (buffer-name buf))
+                           (buffer-string)))
+                  (read-event nil nil 0.1))))
+            (should
+             (null
+              (string-match name (substring-no-properties (buffer-string)))))
+
+            ;; Make dired buffer modified.  Check, that the buffer has
+            ;; been still reverted.
+            (with-current-buffer (get-buffer-create "*Messages*")
+              (narrow-to-region (point-max) (point-max)))
+            (set-buffer-modified-p t)
+           (sleep-for 1)
+            (write-region "any text" nil tmpfile nil 'no-message)
+
+           ;; Check, that the buffer hasn't been reverted.
+            (with-timeout (auto-revert--timeout nil)
+              (with-current-buffer "*Messages*"
+                (while
+                    (null (string-match
+                           (format "Reverting buffer `%s'." (buffer-name buf))
+                           (buffer-string)))
+                  (read-event nil nil 0.1))))
+            (should
+             (string-match name (substring-no-properties (buffer-string))))))
+
+      ;; Exit.
+      (with-current-buffer "*Messages*" (widen))
+      (ignore-errors
+        (with-current-buffer buf (set-buffer-modified-p nil))
+        (kill-buffer buf))
+      (ignore-errors (delete-file tmpfile)))))
+
+(defun auto-revert-test-all (&optional interactive)
+  "Run all tests for \\[auto-revert]."
+  (interactive "p")
+  (if interactive
+      (ert-run-tests-interactively "^auto-revert-")
+    (ert-run-tests-batch "^auto-revert-")))
+
+(provide 'auto-revert-tests)
+;;; auto-revert-tests.el ends here
diff --git a/test/automated/bytecomp-tests.el b/test/automated/bytecomp-tests.el
index f51710a..c65009c 100644
--- a/test/automated/bytecomp-tests.el
+++ b/test/automated/bytecomp-tests.el
@@ -376,8 +376,12 @@ Subtests signal errors if something goes wrong."
   (with-current-buffer (get-buffer-create "*Compile-Log*")
     (goto-char (point-min))
     ;; Should warn that mt--test1[12] are first used as functions.
-    (should (re-search-forward "my--test11:\n.*macro" nil t))
-    (should (re-search-forward "my--test12:\n.*macro" nil t))
+    ;; The second alternative is for when the file name is so long
+    ;; that pretty-printing starts the message on the next line.
+    (should (or (re-search-forward "my--test11:\n.*macro" nil t)
+                (re-search-forward "my--test11:\n.*:\n.*macro" nil t)))
+    (should (or (re-search-forward "my--test12:\n.*macro" nil t)
+                (re-search-forward "my--test12:\n.*:\n.*macro" nil t)))
     (goto-char (point-min))
     ;; Should not warn that mt--test2 is not known to be defined.
     (should-not (re-search-forward "my--test2" nil t))))
diff --git a/test/automated/eieio-test-persist.el 
b/test/automated/eieio-test-persist.el
index 6710ead..9b21b73 100644
--- a/test/automated/eieio-test-persist.el
+++ b/test/automated/eieio-test-persist.el
@@ -48,7 +48,7 @@ This is usually a symbol that starts with `:'."
   (let* ((file (oref original file))
         (class (eieio-object-class original))
         (fromdisk (eieio-persistent-read file class))
-        (cv (eieio--class-v class))
+        (cv (cl--find-class class))
         (slots  (eieio--class-slots cv))
         )
     (unless (object-of-class-p fromdisk class)
@@ -62,7 +62,7 @@ This is usually a symbol that starts with `:'."
             (origvalue (eieio-oref original oneslot))
             (fromdiskvalue (eieio-oref fromdisk oneslot))
             (initarg-p (eieio--attribute-to-initarg
-                         (eieio--class-v class) oneslot))
+                         (cl--find-class class) oneslot))
             )
 
        (if initarg-p
diff --git a/test/automated/eieio-tests.el b/test/automated/eieio-tests.el
index 01131d8..5709a1b 100644
--- a/test/automated/eieio-tests.el
+++ b/test/automated/eieio-tests.el
@@ -803,7 +803,7 @@ Subclasses to override slot attributes.")
   (should (eq (oref-default 'slotattr-class-ok initform) 'no-init)))
 
 (ert-deftest eieio-test-32-slot-attribute-override-2 ()
-  (let* ((cv (eieio--class-v 'slotattr-ok))
+  (let* ((cv (cl--find-class 'slotattr-ok))
          (slots  (eieio--class-slots cv))
         (args   (eieio--class-initarg-tuples cv)))
     ;; :initarg should override for subclass
diff --git a/test/automated/elisp-mode-tests.el 
b/test/automated/elisp-mode-tests.el
index 7af6dfc..2581de4 100644
--- a/test/automated/elisp-mode-tests.el
+++ b/test/automated/elisp-mode-tests.el
@@ -78,6 +78,15 @@
         (should (member "backup-buffer" comps))
         (should-not (member "backup-inhibited" comps))))))
 
+(ert-deftest elisp-completes-functions-after-hash-quote ()
+  (ert-deftest elisp-completes-functions-after-let-bindings ()
+    (with-temp-buffer
+      (emacs-lisp-mode)
+      (insert "#'ba")
+      (let ((comps (elisp--test-completions)))
+        (should (member "backup-buffer" comps))
+        (should-not (member "backup-inhibited" comps))))))
+
 (ert-deftest elisp-completes-local-variables ()
   (with-temp-buffer
     (emacs-lisp-mode)
@@ -110,9 +119,9 @@
   ;; "system-name" is both: a variable and a function
   (let ((defs (elisp-xref-find 'definitions "system-name")))
     (should (= (length defs) 2))
-    (should (string= (xref--xref-description (nth 0 defs))
+    (should (string= (xref-item-summary (nth 0 defs))
                      "(defun system-name)"))
-    (should (string= (xref--xref-description (nth 1 defs))
+    (should (string= (xref-item-summary (nth 1 defs))
                      "(defvar system-name)")))
   ;; It's a minor mode, but the variable is defined in buffer.c
   (let ((defs (elisp-xref-find 'definitions "abbrev-mode")))
@@ -122,7 +131,7 @@
   ;; Both variable and function are defined in the same place.
   (let ((defs (elisp-xref-find 'definitions "visible-mode")))
     (should (= (length defs) 1))
-    (should (string= (xref--xref-description (nth 0 defs))
+    (should (string= (xref-item-summary (nth 0 defs))
                      "(defun visible-mode)"))))
 
 (provide 'elisp-mode-tests)
diff --git a/test/automated/ert-tests.el b/test/automated/ert-tests.el
index 181df89..fcfc7ee 100644
--- a/test/automated/ert-tests.el
+++ b/test/automated/ert-tests.el
@@ -349,6 +349,7 @@ This macro is used to test if macroexpansion in `should' 
works."
                 '(progn
                    (ert-set-test 'abc
                                  (progn
+                                   "Constructor for objects of type 
`ert-test'."
                                    (vector 'cl-struct-ert-test 'abc "foo"
                                            #'(lambda nil)
                                            nil ':passed
@@ -363,6 +364,7 @@ This macro is used to test if macroexpansion in `should' 
works."
                 '(progn
                    (ert-set-test 'def
                                  (progn
+                                   "Constructor for objects of type 
`ert-test'."
                                    (vector 'cl-struct-ert-test 'def nil
                                            #'(lambda nil)
                                            nil ':passed 'nil)))
diff --git a/test/automated/ert-x-tests.el b/test/automated/ert-x-tests.el
index 6172133..11b7ed4 100644
--- a/test/automated/ert-x-tests.el
+++ b/test/automated/ert-x-tests.el
@@ -196,8 +196,8 @@
             (should (string-match (concat
                                    "\\`ert-test-describe-test is a test"
                                    " defined in"
-                                   " [`‘]ert-x-tests.elc?['’]\\.\n\n"
-                                   "Tests [`‘]ert-describe-test['’]\\.\n\\'")
+                                   " ['`‘]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 4c1abc3..c521d28 100644
--- a/test/automated/f90.el
+++ b/test/automated/f90.el
@@ -214,4 +214,30 @@ end module modname")
     (forward-line -1)
     (should (= 2 (current-indentation)))))
 
+(ert-deftest f90-test-bug20969 ()
+  "Test for http://debbugs.gnu.org/20969 ."
+  (with-temp-buffer
+    (f90-mode)
+    (insert "module modname
+type, extends ( sometype ), private :: type1
+integer :: part1
+end type type1
+end module modname")
+    (f90-indent-subprogram)
+    (forward-line -1)
+    (should (= 2 (current-indentation)))))
+
+(ert-deftest f90-test-bug20969b ()
+  "Test for http://debbugs.gnu.org/20969 ."
+  (with-temp-buffer
+    (f90-mode)
+    (insert "module modname
+type, private, extends ( sometype ) :: type1
+integer :: part1
+end type type1
+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 a45eff7..11589b9 100644
--- a/test/automated/file-notify-tests.el
+++ b/test/automated/file-notify-tests.el
@@ -85,26 +85,24 @@ being the result.")
 (defun file-notify--test-remote-enabled ()
   "Whether remote file notification is enabled."
   (unless (consp file-notify--test-remote-enabled-checked)
-    (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))))
+    (let (desc)
+      (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))))
+      (setq file-notify--test-remote-enabled-checked (cons t desc))
+      (when desc (file-notify-rm-watch desc))))
   ;; Return result.
   (cdr file-notify--test-remote-enabled-checked))
 
 (defmacro file-notify--deftest-remote (test docstring)
   "Define ert `TEST-remote' for remote files."
+  (declare (indent 1))
   `(ert-deftest ,(intern (concat (symbol-name test) "-remote")) ()
      ,docstring
      (let* ((temporary-file-directory
@@ -118,7 +116,6 @@ being the result.")
 (ert-deftest file-notify-test00-availability ()
   "Test availability of `file-notify'."
   (skip-unless (file-notify--test-local-enabled))
-  ;; Check, that different valid parameters are accepted.
   (should
    (setq file-notify--test-desc
          (file-notify-add-watch temporary-file-directory '(change) 'ignore)))
diff --git a/test/automated/help-fns.el b/test/automated/help-fns.el
index ba87593..b8772eb 100644
--- a/test/automated/help-fns.el
+++ b/test/automated/help-fns.el
@@ -34,4 +34,27 @@
     (goto-char (point-min))
     (should (search-forward "autoloaded Lisp macro" (line-end-position)))))
 
+(defun abc\\\[universal-argument\]b\`c\'d\\e\"f (x)
+  "A function with a funny name.
+
+\(fn XYZZY)"
+  x)
+
+(defun defgh\\\[universal-argument\]b\`c\'d\\e\"f (x)
+  "Another function with a funny name."
+  x)
+
+(ert-deftest help-fns-test-funny-names ()
+  "Test for help with functions with funny names."
+  (describe-function 'abc\\\[universal-argument\]b\`c\'d\\e\"f)
+  (with-current-buffer "*Help*"
+    (goto-char (point-min))
+    (should (search-forward
+             "(abc\\\\\\[universal-argument\\]b\\`c\\'d\\\\e\\\"f XYZZY)")))
+  (describe-function 'defgh\\\[universal-argument\]b\`c\'d\\e\"f)
+  (with-current-buffer "*Help*"
+    (goto-char (point-min))
+    (should (search-forward
+             "(defgh\\\\\\[universal-argument\\]b\\`c\\'d\\\\e\\\"f X)"))))
+
 ;;; help-fns.el ends here
diff --git a/test/automated/icalendar-tests.el 
b/test/automated/icalendar-tests.el
index 68d0a40..3614c7a 100644
--- a/test/automated/icalendar-tests.el
+++ b/test/automated/icalendar-tests.el
@@ -1318,6 +1318,11 @@ DTEND;VALUE=DATE-TIME:20030919T113000"
    "&9/19/2003 09:00-11:30 non-recurring\n UID: 1234567890uid\n"))
 
 (ert-deftest icalendar-import-with-timezone ()
+  ;; This is known to fail on MS-Windows, because the test assumes
+  ;; Posix features of specifying DST rules.
+  :expected-result (if (memq system-type '(windows-nt ms-dos))
+                       :failed
+                     :passed)
   ;; bug#11473
   (icalendar-tests--test-import
    "BEGIN:VCALENDAR
@@ -1446,6 +1451,11 @@ SUMMARY:and diary-anniversary
 ;; ======================================================================
 (ert-deftest icalendar-real-world ()
   "Perform real-world tests, as gathered from problem reports."
+  ;; This is known to fail on MS-Windows, since it doesn't support DST
+  ;; specification with month and day.
+  :expected-result (if (memq system-type '(windows-nt ms-dos))
+                       :failed
+                     :passed)
   ;; 2003-05-29
   (icalendar-tests--test-import
    "BEGIN:VCALENDAR
diff --git a/test/automated/let-alist.el b/test/automated/let-alist.el
index c436d89..65727dc 100644
--- a/test/automated/let-alist.el
+++ b/test/automated/let-alist.el
@@ -48,6 +48,19 @@
               ..external ..external.too)))
     (list nil 0 1 2 3 "ext" "et"))))
 
+(ert-deftest let-alist-cons ()
+  (should
+   (equal
+    (let ((.external "ext")
+          (.external.too "et"))
+      (let-alist '((test-two . 0)
+                   (test-three . 1)
+                   (sublist . ((foo . 2)
+                               (bar . 3))))
+        (list `(, .test-one . , .test-two)
+              .sublist.bar ..external)))
+    (list '(nil . 0) 3 "ext"))))
+
 (defvar let-alist--test-counter 0
   "Used to count number of times a function is called.")
 
diff --git a/test/automated/map-tests.el b/test/automated/map-tests.el
new file mode 100644
index 0000000..1f3a07e
--- /dev/null
+++ b/test/automated/map-tests.el
@@ -0,0 +1,326 @@
+;;; map-tests.el --- Tests for map.el  -*- lexical-binding:t -*-
+
+;; Copyright (C) 2015 Free Software Foundation, Inc.
+
+;; Author: Nicolas Petton <address@hidden>
+;; Maintainer: address@hidden
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; Tests for map.el
+
+;;; Code:
+
+(require 'ert)
+(require 'map)
+
+(defmacro with-maps-do (var &rest body)
+  "Successively bind VAR to an alist, vector and hash-table.
+Each map is built from the following alist data:
+'((0 . 3) (1 . 4) (2 . 5)).
+Evaluate BODY for each created map.
+
+\(fn (var map) body)"
+  (declare (indent 1) (debug t))
+  (let ((alist (make-symbol "alist"))
+        (vec (make-symbol "vec"))
+        (ht (make-symbol "ht")))
+   `(let ((,alist (list (cons 0 3)
+                        (cons 1 4)
+                        (cons 2 5)))
+          (,vec (vector 3 4 5))
+          (,ht (make-hash-table)))
+      (puthash 0 3 ,ht)
+      (puthash 1 4 ,ht)
+      (puthash 2 5 ,ht)
+      (dolist (,var (list ,alist ,vec ,ht))
+        ,@body))))
+
+(ert-deftest test-map-elt ()
+  (with-maps-do map
+    (should (= 3 (map-elt map 0)))
+    (should (= 4 (map-elt map 1)))
+    (should (= 5 (map-elt map 2)))
+    (should (null (map-elt map -1)))
+    (should (null (map-elt map 4)))))
+
+(ert-deftest test-map-elt-default ()
+  (with-maps-do map
+    (should (= 5 (map-elt map 7 5)))))
+
+(ert-deftest test-map-elt-with-nil-value ()
+  (should (null (map-elt '((a . 1)
+                           (b))
+                         'b
+                         '2))))
+
+(ert-deftest test-map-put ()
+  (with-maps-do map
+    (setf (map-elt map 2) 'hello)
+    (should (eq (map-elt map 2) 'hello)))
+  (with-maps-do map
+    (map-put map 2 'hello)
+    (should (eq (map-elt map 2) 'hello)))
+  (let ((ht (make-hash-table)))
+    (setf (map-elt ht 2) 'a)
+    (should (eq (map-elt ht 2)
+                'a)))
+  (let ((alist '((0 . a) (1 . b) (2 . c))))
+    (setf (map-elt alist 2) 'a)
+    (should (eq (map-elt alist 2)
+                'a)))
+  (let ((vec [3 4 5]))
+   (should-error (setf (map-elt vec 3) 6))))
+
+(ert-deftest test-map-put-return-value ()
+  (let ((ht (make-hash-table)))
+    (should (eq (map-put ht 'a 'hello) ht))))
+
+(ert-deftest test-map-delete ()
+  (with-maps-do map
+    (map-delete map 1)
+    (should (null (map-elt map 1))))
+  (with-maps-do map
+    (map-delete map -2)
+    (should (null (map-elt map -2)))))
+
+(ert-deftest test-map-delete-return-value ()
+  (let ((ht (make-hash-table)))
+    (should (eq (map-delete ht 'a) ht))))
+
+(ert-deftest test-map-nested-elt ()
+  (let ((vec [a b [c d [e f]]]))
+    (should (eq (map-nested-elt vec '(2 2 0)) 'e)))
+  (let ((alist '((a . 1)
+                 (b . ((c . 2)
+                       (d . 3)
+                       (e . ((f . 4)
+                             (g . 5))))))))
+    (should (eq (map-nested-elt alist '(b e f))
+                4)))
+  (let ((ht (make-hash-table)))
+    (setf (map-elt ht 'a) 1)
+    (setf (map-elt ht 'b) (make-hash-table))
+    (setf (map-elt (map-elt ht 'b) 'c) 2)
+    (should (eq (map-nested-elt ht '(b c))
+                2))))
+
+(ert-deftest test-map-nested-elt-default ()
+  (let ((vec [a b [c d]]))
+    (should (null (map-nested-elt vec '(2 3))))
+    (should (null (map-nested-elt vec '(2 1 1))))
+    (should (= 4 (map-nested-elt vec '(2 1 1) 4)))))
+
+(ert-deftest test-map-p ()
+  (should (map-p nil))
+  (should (map-p '((a . b) (c . d))))
+  (should (map-p '(a b c d)))
+  (should (map-p []))
+  (should (map-p [1 2 3]))
+  (should (map-p (make-hash-table)))
+  (should (map-p "hello"))
+  (should (not (map-p 1)))
+  (should (not (map-p 'hello))))
+
+(ert-deftest test-map-keys ()
+  (with-maps-do map
+    (should (equal (map-keys map) '(0 1 2))))
+  (should (null (map-keys nil)))
+  (should (null (map-keys []))))
+
+(ert-deftest test-map-values ()
+  (with-maps-do map
+    (should (equal (map-values map) '(3 4 5)))))
+
+(ert-deftest test-map-pairs ()
+  (with-maps-do map
+    (should (equal (map-pairs map) '((0 . 3)
+                                     (1 . 4)
+                                     (2 . 5))))))
+
+(ert-deftest test-map-length ()
+  (let ((ht (make-hash-table)))
+    (puthash 'a 1 ht)
+    (puthash 'b 2 ht)
+    (puthash 'c 3 ht)
+    (puthash 'd 4 ht)
+    (should (= 0 (map-length nil)))
+    (should (= 0 (map-length [])))
+    (should (= 0 (map-length (make-hash-table))))
+    (should (= 5 (map-length [0 1 2 3 4])))
+    (should (= 2 (map-length '((a . 1) (b . 2)))))
+    (should (= 4 (map-length ht)))))
+
+(ert-deftest test-map-copy ()
+  (with-maps-do map
+    (let ((copy (map-copy map)))
+      (should (equal (map-keys map) (map-keys copy)))
+      (should (equal (map-values map) (map-values copy)))
+      (should (not (eq map copy))))))
+
+(ert-deftest test-map-apply ()
+  (with-maps-do map
+    (should (equal (map-apply (lambda (k v) (cons (int-to-string k) v))
+                              map)
+                   '(("0" . 3) ("1" . 4) ("2" . 5)))))
+  (let ((vec [a b c]))
+    (should (equal (map-apply (lambda (k v) (cons (1+ k) v))
+                              vec)
+                   '((1 . a)
+                     (2 . b)
+                     (3 . c))))))
+
+(ert-deftest test-map-keys-apply ()
+  (with-maps-do map
+    (should (equal (map-keys-apply (lambda (k) (int-to-string k))
+                                   map)
+                   '("0" "1" "2"))))
+  (let ((vec [a b c]))
+    (should (equal (map-keys-apply (lambda (k) (1+ k))
+                                   vec)
+                   '(1 2 3)))))
+
+(ert-deftest test-map-values-apply ()
+  (with-maps-do map
+    (should (equal (map-values-apply (lambda (v) (1+ v))
+                                     map)
+                   '(4 5 6))))
+  (let ((vec [a b c]))
+    (should (equal (map-values-apply (lambda (v) (symbol-name v))
+                                     vec)
+                   '("a" "b" "c")))))
+
+(ert-deftest test-map-filter ()
+  (with-maps-do map
+    (should (equal (map-keys (map-filter (lambda (_k v)
+                                           (<= 4 v))
+                                         map))
+                   '(1 2)))
+    (should (null (map-filter (lambda (k _v)
+                                (eq 'd k))
+                              map))))
+  (should (null (map-filter (lambda (_k v)
+                              (eq 3 v))
+                            [1 2 4 5])))
+  (should (equal (map-filter (lambda (k _v)
+                               (eq 3 k))
+                             [1 2 4 5])
+                 '((3 . 5)))))
+
+(ert-deftest test-map-remove ()
+  (with-maps-do map
+    (should (equal (map-keys (map-remove (lambda (_k v)
+                                           (>= v 4))
+                                         map))
+                   '(0)))
+    (should (equal (map-keys (map-remove (lambda (k _v)
+                                           (eq 'd k))
+                                         map))
+                   (map-keys map))))
+  (should (equal (map-remove (lambda (_k v)
+                               (eq 3 v))
+                             [1 2 4 5])
+                 '((0 . 1)
+                   (1 . 2)
+                   (2 . 4)
+                   (3 . 5))))
+  (should (null (map-remove (lambda (k _v)
+                              (>= k 0))
+                            [1 2 4 5]))))
+
+(ert-deftest test-map-empty-p ()
+  (should (map-empty-p nil))
+  (should (not (map-empty-p '((a . b) (c . d)))))
+  (should (map-empty-p []))
+  (should (not (map-empty-p [1 2 3])))
+  (should (map-empty-p (make-hash-table)))
+  (should (not (map-empty-p "hello")))
+  (should (map-empty-p "")))
+
+(ert-deftest test-map-contains-key-p ()
+  (should (map-contains-key-p '((a . 1) (b . 2)) 'a))
+  (should (not (map-contains-key-p '((a . 1) (b . 2)) 'c)))
+  (should (map-contains-key-p '(("a" . 1)) "a"))
+  (should (not (map-contains-key-p '(("a" . 1)) "a" #'eq)))
+  (should (map-contains-key-p [a b c] 2))
+  (should (not (map-contains-key-p [a b c] 3))))
+
+(ert-deftest test-map-some-p ()
+  (with-maps-do map
+    (should (equal (map-some-p (lambda (k _v)
+                                 (eq 1 k))
+                               map)
+                   (cons 1 4)))
+    (should (not (map-some-p (lambda (k _v)
+                               (eq 'd k))
+                             map))))
+  (let ((vec [a b c]))
+    (should (equal (map-some-p (lambda (k _v)
+                                 (> k 1))
+                               vec)
+                   (cons 2 'c)))
+    (should (not (map-some-p (lambda (k _v)
+                               (> k 3))
+                             vec)))))
+
+(ert-deftest test-map-every-p ()
+  (with-maps-do map
+    (should (map-every-p (lambda (k _v)
+                           k)
+                         map))
+    (should (not (map-every-p (lambda (_k _v)
+                                nil)
+                              map))))
+  (let ((vec [a b c]))
+    (should (map-every-p (lambda (k _v)
+                           (>= k 0))
+                         vec))
+    (should (not (map-every-p (lambda (k _v)
+                                (> k 3))
+                              vec)))))
+
+(ert-deftest test-map-into ()
+  (let* ((alist '((a . 1) (b . 2)))
+         (ht (map-into alist 'hash-table)))
+    (should (hash-table-p ht))
+    (should (equal (map-into (map-into alist 'hash-table) 'list)
+                   alist))
+    (should (listp (map-into ht 'list)))
+    (should (equal (map-keys (map-into (map-into ht 'list) 'hash-table))
+                   (map-keys ht)))
+    (should (equal (map-values (map-into (map-into ht 'list) 'hash-table))
+                   (map-values ht)))
+    (should (null (map-into nil 'list)))
+    (should (map-empty-p (map-into nil 'hash-table)))
+    (should-error (map-into [1 2 3] 'string))))
+
+(ert-deftest test-map-let ()
+  (map-let (foo bar baz) '((foo . 1) (bar . 2))
+    (should (= foo 1))
+    (should (= bar 2))
+    (should (null baz)))
+  (map-let (('foo a)
+            ('bar b)
+            ('baz c))
+      '((foo . 1) (bar . 2))
+    (should (= a 1))
+    (should (= b 2))
+    (should (null c))))
+
+(provide 'map-tests)
+;;; map-tests.el ends here
diff --git a/test/automated/package-test.el b/test/automated/package-test.el
index e908635..ae10a9b 100644
--- a/test/automated/package-test.el
+++ b/test/automated/package-test.el
@@ -50,7 +50,9 @@
                        :version '(1 3)
                        :summary "A single-file package with no dependencies"
                        :kind 'single
-                       :extras '((:url . "http://doodles.au";)))
+                       :extras '((:authors ("J. R. Hacker" . "address@hidden"))
+                                 (:maintainer "J. R. Hacker" . 
"address@hidden")
+                                 (:url . "http://doodles.au";)))
   "Expected `package-desc' parsed from simple-single-1.3.el.")
 
 (defvar simple-depend-desc
@@ -58,7 +60,9 @@
                        :version '(1 0)
                        :summary "A single-file package with a dependency."
                        :kind 'single
-                       :reqs '((simple-single (1 3))))
+                       :reqs '((simple-single (1 3)))
+                       :extras '((:authors ("J. R. Hacker" . "address@hidden"))
+                                 (:maintainer "J. R. Hacker" . 
"address@hidden")))
   "Expected `package-desc' parsed from simple-depend-1.0.el.")
 
 (defvar multi-file-desc
@@ -216,6 +220,8 @@ Must called from within a `tar-mode' buffer."
                                  "(define-package \"simple-single\" \"1.3\" "
                                  "\"A single-file package "
                                  "with no dependencies\" 'nil "
+                                 ":authors '((\"J. R. Hacker\" . 
\"address@hidden")) "
+                                 ":maintainer '(\"J. R. Hacker\" . 
\"address@hidden") "
                                  ":url \"http://doodles.au\"";
                                  ")\n"))))
       (should (file-exists-p autoloads-file))
@@ -305,6 +311,7 @@ Must called from within a `tar-mode' buffer."
       (search-forward-regexp "^ +simple-single")
       (package-menu-mark-install)
       (package-menu-execute)
+      (run-hooks 'post-command-hook)
       (should (package-installed-p 'simple-single))
       (switch-to-buffer "*Packages*")
       (goto-char (point-min))
@@ -380,8 +387,9 @@ Must called from within a `tar-mode' buffer."
    (describe-package '5x5)
    (goto-char (point-min))
    (should (search-forward "5x5 is a built-in package." nil t))
-   (should (search-forward "Status: Built-in." nil t))
-   (should (search-forward "Summary: simple little puzzle game" nil t))
+   ;; Don't assume the descriptions are in any particular order.
+   (save-excursion (should (search-forward "Status: Built-in." nil t)))
+   (save-excursion (should (search-forward "Summary: simple little puzzle 
game" nil t)))
    (should (search-forward "The aim of 5x5" nil t)))
 
   ;; Installed
@@ -393,14 +401,11 @@ 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 (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"
-                             nil t))
-     (should (search-forward "Homepage: http://doodles.au"; nil t))
-     (should (re-search-forward "Keywords: \\[?frobnicate\\]?" nil t))
+     (save-excursion (should (re-search-forward "Status: Installed in 
['`‘]simple-single-1.3/['’] (unsigned)." nil t)))
+     (save-excursion (should (search-forward "Version: 1.3" nil t)))
+     (save-excursion (should (search-forward "Summary: A single-file package 
with no dependencies" nil t)))
+     (save-excursion (should (search-forward "Homepage: http://doodles.au"; nil 
t)))
+     (save-excursion (should (re-search-forward "Keywords: \\[?frobnicate\\]?" 
nil t)))
      ;; No description, though. Because at this point we don't know
      ;; what archive the package originated from, and we don't have
      ;; its readme file saved.
@@ -467,7 +472,7 @@ Must called from within a `tar-mode' buffer."
        (should (re-search-forward "signed-good is an? \\(\\S-+\\) package." 
nil t))
        (should (string-equal (match-string-no-properties 1) "installed"))
        (should (re-search-forward
-               "Status: Installed in [`‘]~/signed-good-1.0/['’]."
+               "Status: Installed in ['`‘]signed-good-1.0/['’]."
                nil t))))))
 
 
@@ -481,7 +486,9 @@ Must called from within a `tar-mode' buffer."
         (package-make-ac-desc '(1 3) nil
                               "A single-file package with no dependencies"
                               'single
-                              '((:url . "http://doodles.au";))))
+                              '((:authors ("J. R. Hacker" . "address@hidden"))
+                                (:maintainer "J. R. Hacker" . "address@hidden")
+                                (:url . "http://doodles.au";))))
   "Expected contents of the archive entry from the \"simple-single\" package.")
 
 (defvar package-x-test--single-archive-entry-1-4
@@ -489,7 +496,8 @@ Must called from within a `tar-mode' buffer."
         (package-make-ac-desc '(1 4) nil
                               "A single-file package with no dependencies"
                               'single
-                              nil))
+                              '((:authors ("J. R. Hacker" . "address@hidden"))
+                                (:maintainer "J. R. Hacker" . 
"address@hidden"))))
   "Expected contents of the archive entry from the updated \"simple-single\" 
package.")
 
 (ert-deftest package-x-test-upload-buffer ()
diff --git a/test/automated/python-tests.el b/test/automated/python-tests.el
index ae4323b..d490f7f 100644
--- a/test/automated/python-tests.el
+++ b/test/automated/python-tests.el
@@ -27,6 +27,7 @@
 ;; Dependencies for testing:
 (require 'electric)
 (require 'hideshow)
+(require 'tramp-sh)
 
 
 (defmacro python-tests-with-temp-buffer (contents &rest body)
@@ -267,10 +268,10 @@ foo = long_function_name(
    (should (eq (car (python-indent-context)) :no-indent))
    (should (= (python-indent-calculate-indentation) 0))
    (forward-line 1)
-   (should (eq (car (python-indent-context)) :after-line))
+   (should (eq (car (python-indent-context)) :no-indent))
    (should (= (python-indent-calculate-indentation) 0))
    (forward-line 1)
-   (should (eq (car (python-indent-context)) :after-line))
+   (should (eq (car (python-indent-context)) :no-indent))
    (should (= (python-indent-calculate-indentation) 0))))
 
 (ert-deftest python-indent-after-comment-1 ()
@@ -392,7 +393,7 @@ data = {
 }
 "
    (python-tests-look-at "data = {")
-   (should (eq (car (python-indent-context)) :after-line))
+   (should (eq (car (python-indent-context)) :no-indent))
    (should (= (python-indent-calculate-indentation) 0))
    (python-tests-look-at "'key':")
    (should (eq (car (python-indent-context)) :inside-paren-newline-start))
@@ -455,7 +456,7 @@ data = {'key': {
 }}
 "
    (python-tests-look-at "data = {")
-   (should (eq (car (python-indent-context)) :after-line))
+   (should (eq (car (python-indent-context)) :no-indent))
    (should (= (python-indent-calculate-indentation) 0))
    (python-tests-look-at "'objlist': [")
    (should (eq (car (python-indent-context)) :inside-paren-newline-start))
@@ -494,7 +495,7 @@ data = ('these',
         'tokens')
 "
    (python-tests-look-at "data = ('these',")
-   (should (eq (car (python-indent-context)) :after-line))
+   (should (eq (car (python-indent-context)) :no-indent))
    (should (= (python-indent-calculate-indentation) 0))
    (forward-line 1)
    (should (eq (car (python-indent-context)) :inside-paren))
@@ -514,7 +515,7 @@ data = [ [ 'these', 'are'],
          ['the', 'tokens' ] ]
 "
    (python-tests-look-at "data = [ [ 'these', 'are'],")
-   (should (eq (car (python-indent-context)) :after-line))
+   (should (eq (car (python-indent-context)) :no-indent))
    (should (= (python-indent-calculate-indentation) 0))
    (forward-line 1)
    (should (eq (car (python-indent-context)) :inside-paren))
@@ -530,7 +531,7 @@ while ((not some_condition) and
         with_some_arg)
 "
    (python-tests-look-at "while ((not some_condition) and")
-   (should (eq (car (python-indent-context)) :after-line))
+   (should (eq (car (python-indent-context)) :no-indent))
    (should (= (python-indent-calculate-indentation) 0))
    (forward-line 1)
    (should (eq (car (python-indent-context)) :inside-paren))
@@ -551,7 +552,7 @@ CHOICES = (('some', 'choice'),
            ('more', 'choices'))
 "
    (python-tests-look-at "CHOICES = (('some', 'choice'),")
-   (should (eq (car (python-indent-context)) :after-line))
+   (should (eq (car (python-indent-context)) :no-indent))
    (should (= (python-indent-calculate-indentation) 0))
    (forward-line 1)
    (should (eq (car (python-indent-context)) :inside-paren))
@@ -612,7 +613,7 @@ from foo.bar.baz import something, something_1 \\\\
     something_4, something_5
 "
    (python-tests-look-at "from foo.bar.baz import something, something_1")
-   (should (eq (car (python-indent-context)) :after-line))
+   (should (eq (car (python-indent-context)) :no-indent))
    (should (= (python-indent-calculate-indentation) 0))
    (python-tests-look-at "something_2 something_3,")
    (should (eq (car (python-indent-context)) :after-backslash-first-line))
@@ -639,7 +640,7 @@ objects = Thing.objects.all() \\\\
                        .values_list()
 "
    (python-tests-look-at "objects = Thing.objects.all()")
-   (should (eq (car (python-indent-context)) :after-line))
+   (should (eq (car (python-indent-context)) :no-indent))
    (should (= (python-indent-calculate-indentation) 0))
    (python-tests-look-at ".filter(")
    (should (eq (car (python-indent-context))
@@ -682,7 +683,7 @@ with open('/path/to/some/file/you/want/to/read') as file_1, 
\\\\
 "
    (python-tests-look-at
     "with open('/path/to/some/file/you/want/to/read') as file_1, \\\\")
-   (should (eq (car (python-indent-context)) :after-line))
+   (should (eq (car (python-indent-context)) :no-indent))
    (should (= (python-indent-calculate-indentation) 0))
    (python-tests-look-at
     "open('/path/to/some/file/being/written', 'w') as file_2")
@@ -703,7 +704,7 @@ super_awful_assignment = some_calculation() and \\\\
 "
    (python-tests-look-at
     "super_awful_assignment = some_calculation() and \\\\")
-   (should (eq (car (python-indent-context)) :after-line))
+   (should (eq (car (python-indent-context)) :no-indent))
    (should (= (python-indent-calculate-indentation) 0))
    (python-tests-look-at "another_calculation() and \\\\")
    (should (eq (car (python-indent-context))
@@ -992,7 +993,7 @@ lines
 '''
 "
    (python-tests-look-at "multiline = '''")
-   (should (eq (car (python-indent-context)) :after-line))
+   (should (eq (car (python-indent-context)) :no-indent))
    (should (= (python-indent-calculate-indentation) 0))
    (python-tests-look-at "bunch")
    (should (eq (car (python-indent-context)) :inside-string))
@@ -1226,6 +1227,158 @@ this is an arbitrarily
                       expected)))))
 
 
+;;; Mark
+
+(ert-deftest python-mark-defun-1 ()
+  """Test `python-mark-defun' with point at defun symbol start."""
+  (python-tests-with-temp-buffer
+   "
+def foo(x):
+    return x
+
+class A:
+   pass
+
+class B:
+
+    def __init__(self):
+       self.b = 'b'
+
+    def fun(self):
+       return self.b
+
+class C:
+   '''docstring'''
+"
+   (let ((expected-mark-beginning-position
+          (progn
+            (python-tests-look-at "class A:")
+            (1- (point))))
+         (expected-mark-end-position-1
+          (save-excursion
+            (python-tests-look-at "pass")
+            (forward-line)
+            (point)))
+         (expected-mark-end-position-2
+          (save-excursion
+            (python-tests-look-at "return self.b")
+            (forward-line)
+            (point)))
+         (expected-mark-end-position-3
+          (save-excursion
+            (python-tests-look-at "'''docstring'''")
+            (forward-line)
+            (point))))
+     ;; Select class A only, with point at bol.
+     (python-mark-defun 1)
+     (should (= (point) expected-mark-beginning-position))
+     (should (= (marker-position (mark-marker))
+                expected-mark-end-position-1))
+     ;; expand to class B, start position should remain the same.
+     (python-mark-defun 1)
+     (should (= (point) expected-mark-beginning-position))
+     (should (= (marker-position (mark-marker))
+                expected-mark-end-position-2))
+     ;; expand to class C, start position should remain the same.
+     (python-mark-defun 1)
+     (should (= (point) expected-mark-beginning-position))
+     (should (= (marker-position (mark-marker))
+                expected-mark-end-position-3)))))
+
+(ert-deftest python-mark-defun-2 ()
+  """Test `python-mark-defun' with point at nested defun symbol start."""
+  (python-tests-with-temp-buffer
+   "
+def foo(x):
+    return x
+
+class A:
+   pass
+
+class B:
+
+    def __init__(self):
+       self.b = 'b'
+
+    def fun(self):
+       return self.b
+
+class C:
+   '''docstring'''
+"
+   (let ((expected-mark-beginning-position
+          (progn
+            (python-tests-look-at "def __init__(self):")
+            (1- (line-beginning-position))))
+         (expected-mark-end-position-1
+          (save-excursion
+            (python-tests-look-at "self.b = 'b'")
+            (forward-line)
+            (point)))
+         (expected-mark-end-position-2
+          (save-excursion
+            (python-tests-look-at "return self.b")
+            (forward-line)
+            (point)))
+         (expected-mark-end-position-3
+          (save-excursion
+            (python-tests-look-at "'''docstring'''")
+            (forward-line)
+            (point))))
+     ;; Select B.__init only, with point at its start.
+     (python-mark-defun 1)
+     (should (= (point) expected-mark-beginning-position))
+     (should (= (marker-position (mark-marker))
+                expected-mark-end-position-1))
+     ;; expand to B.fun, start position should remain the same.
+     (python-mark-defun 1)
+     (should (= (point) expected-mark-beginning-position))
+     (should (= (marker-position (mark-marker))
+                expected-mark-end-position-2))
+     ;; expand to class C, start position should remain the same.
+     (python-mark-defun 1)
+     (should (= (point) expected-mark-beginning-position))
+     (should (= (marker-position (mark-marker))
+                expected-mark-end-position-3)))))
+
+(ert-deftest python-mark-defun-3 ()
+  """Test `python-mark-defun' with point inside defun symbol."""
+  (python-tests-with-temp-buffer
+   "
+def foo(x):
+    return x
+
+class A:
+   pass
+
+class B:
+
+    def __init__(self):
+       self.b = 'b'
+
+    def fun(self):
+       return self.b
+
+class C:
+   '''docstring'''
+"
+   (let ((expected-mark-beginning-position
+          (progn
+            (python-tests-look-at "def fun(self):")
+            (python-tests-look-at "(self):")
+            (1- (line-beginning-position))))
+         (expected-mark-end-position
+          (save-excursion
+            (python-tests-look-at "return self.b")
+            (forward-line)
+            (point))))
+     ;; Should select B.fun, despite point is inside the defun symbol.
+     (python-mark-defun 1)
+     (should (= (point) expected-mark-beginning-position))
+     (should (= (marker-position (mark-marker))
+                expected-mark-end-position)))))
+
+
 ;;; Navigation
 
 (ert-deftest python-nav-beginning-of-defun-1 ()
@@ -2311,17 +2464,12 @@ Using `python-shell-interpreter' and
 
 (ert-deftest python-shell-calculate-process-environment-3 ()
   "Test `python-shell-virtualenv-root' modification."
-  (let* ((original-path (or (getenv "PATH") ""))
-         (python-shell-virtualenv-root
+  (let* ((python-shell-virtualenv-root
           (directory-file-name user-emacs-directory))
          (process-environment
           (python-shell-calculate-process-environment)))
     (should (not (getenv "PYTHONHOME")))
-    (should (string= (getenv "VIRTUAL_ENV") python-shell-virtualenv-root))
-    (should (equal (getenv "PATH")
-                   (format "%s/bin%s%s"
-                           python-shell-virtualenv-root
-                           path-separator original-path)))))
+    (should (string= (getenv "VIRTUAL_ENV") python-shell-virtualenv-root))))
 
 (ert-deftest python-shell-calculate-process-environment-4 ()
   "Test `python-shell-unbuffered' modification."
@@ -2351,7 +2499,7 @@ Using `python-shell-interpreter' and
                      original-exec-path)))))
 
 (ert-deftest python-shell-calculate-exec-path-2 ()
-  "Test `python-shell-exec-path' modification."
+  "Test `python-shell-virtualenv-root' modification."
   (let* ((original-exec-path exec-path)
          (python-shell-virtualenv-root
           (directory-file-name (expand-file-name user-emacs-directory)))
@@ -2362,6 +2510,38 @@ Using `python-shell-interpreter' and
                       (format "%s/bin" python-shell-virtualenv-root)
                       original-exec-path))))))
 
+(ert-deftest python-shell-with-environment-1 ()
+  "Test with local `default-directory'."
+  (let* ((original-exec-path exec-path)
+         (python-shell-virtualenv-root
+          (directory-file-name (expand-file-name user-emacs-directory))))
+    (python-shell-with-environment
+      (should (equal
+               exec-path
+               (append (cons
+                        (format "%s/bin" python-shell-virtualenv-root)
+                        original-exec-path))))
+      (should (not (getenv "PYTHONHOME")))
+      (should (string= (getenv "VIRTUAL_ENV") python-shell-virtualenv-root)))))
+
+(ert-deftest python-shell-with-environment-2 ()
+  "Test with remote `default-directory'."
+  (let* ((default-directory "/ssh::/example/dir/")
+         (original-exec-path tramp-remote-path)
+         (original-process-environment tramp-remote-process-environment)
+         (python-shell-virtualenv-root
+          (directory-file-name (expand-file-name user-emacs-directory))))
+    (python-shell-with-environment
+      (should (equal
+               tramp-remote-path
+               (append (cons
+                        (format "%s/bin" python-shell-virtualenv-root)
+                        original-exec-path))))
+      (let ((process-environment tramp-remote-process-environment))
+        (should (not (getenv "PYTHONHOME")))
+        (should (string= (getenv "VIRTUAL_ENV")
+                         python-shell-virtualenv-root))))))
+
 (ert-deftest python-shell-make-comint-1 ()
   "Check comint creation for global shell buffer."
   (skip-unless (executable-find python-tests-shell-interpreter))
diff --git a/test/automated/seq-tests.el b/test/automated/seq-tests.el
index ab46eb8..3643ce5 100644
--- a/test/automated/seq-tests.el
+++ b/test/automated/seq-tests.el
@@ -297,5 +297,10 @@ Evaluate BODY for each created sequence.
       (should (null b))
       (should (null c)))))
 
+(ert-deftest test-seq-min-max ()
+  (with-test-sequences (seq '(4 5 3 2 0 4))
+    (should (= (seq-min seq) 0))
+    (should (= (seq-max seq) 5))))
+
 (provide 'seq-tests)
 ;;; seq-tests.el ends here
diff --git a/test/automated/subr-tests.el b/test/automated/subr-tests.el
index d29efc6..28a423f 100644
--- a/test/automated/subr-tests.el
+++ b/test/automated/subr-tests.el
@@ -2,7 +2,8 @@
 
 ;; Copyright (C) 2015 Free Software Foundation, Inc.
 
-;; Author: Oleh Krehel <address@hidden>
+;; Author: Oleh Krehel <address@hidden>,
+;;         Nicolas Petton <address@hidden>
 ;; Keywords:
 
 ;; This file is part of GNU Emacs.
@@ -60,5 +61,26 @@
                      (quote
                       (0 font-lock-keyword-face))))))))
 
+(ert-deftest string-comparison-test ()
+  (should (string-lessp "abc" "acb"))
+  (should (string-lessp "aBc" "abc"))
+  (should (string-lessp "abc" "abcd"))
+  (should (string-lessp "abc" "abcd"))
+  (should-not (string-lessp "abc" "abc"))
+  (should-not (string-lessp "" ""))
+
+  (should (string-greaterp "acb" "abc"))
+  (should (string-greaterp "abc" "aBc"))
+  (should (string-greaterp "abcd" "abc"))
+  (should (string-greaterp "abcd" "abc"))
+  (should-not (string-greaterp "abc" "abc"))
+  (should-not (string-greaterp "" ""))
+
+  ;; Symbols are also accepted
+  (should (string-lessp 'abc 'acb))
+  (should (string-lessp "abc" 'acb))
+  (should (string-greaterp 'acb 'abc))
+  (should (string-greaterp "acb" 'abc)))
+
 (provide 'subr-tests)
 ;;; subr-tests.el ends here
diff --git a/test/automated/tramp-tests.el b/test/automated/tramp-tests.el
index 84b2ab8..e6f77e4 100644
--- a/test/automated/tramp-tests.el
+++ b/test/automated/tramp-tests.el
@@ -49,6 +49,7 @@
 (declare-function tramp-get-remote-stat "tramp-sh")
 (declare-function tramp-get-remote-perl "tramp-sh")
 (defvar tramp-copy-size-limit)
+(defvar tramp-persistency-file-name)
 (defvar tramp-remote-process-environment)
 
 ;; There is no default value on w32 systems, which could work out of the box.
@@ -70,7 +71,8 @@
 (setq password-cache-expiry nil
       tramp-verbose 0
       tramp-copy-size-limit nil
-      tramp-message-show-message nil)
+      tramp-message-show-message nil
+      tramp-persistency-file-name nil)
 
 ;; This shall happen on hydra only.
 (when (getenv "NIX_STORE")
@@ -117,7 +119,9 @@ shall not contain a timeout."
   (declare (indent 1) (debug (natnump body)))
   `(let ((tramp-verbose ,verbose)
         (tramp-message-show-message t)
-        (tramp-debug-on-error t))
+        (tramp-debug-on-error t)
+        (debug-ignored-errors
+         (cons "^make-symbolic-link not supported$" debug-ignored-errors)))
      (unwind-protect
         (progn ,@body)
        (when (> tramp-verbose 3)
@@ -209,6 +213,7 @@ shall not contain a timeout."
     (should (string-equal (file-remote-p "/method::" 'user) "default-user"))
     (should (string-equal (file-remote-p "/method::" 'host) "default-host"))
     (should (string-equal (file-remote-p "/method::" 'localname) ""))
+    (should (string-equal (file-remote-p "/method::" 'hop) nil))
 
     ;; Expand `tramp-default-method' and `tramp-default-user'.
     (should (string-equal
@@ -218,6 +223,7 @@ shall not contain a timeout."
     (should (string-equal (file-remote-p "/host:" 'user) "default-user"))
     (should (string-equal (file-remote-p "/host:" 'host) "host"))
     (should (string-equal (file-remote-p "/host:" 'localname) ""))
+    (should (string-equal (file-remote-p "/host:" 'hop) nil))
 
     ;; Expand `tramp-default-method' and `tramp-default-host'.
     (should (string-equal
@@ -227,6 +233,7 @@ shall not contain a timeout."
     (should (string-equal (file-remote-p "/user@:" 'user) "user"))
     (should (string-equal (file-remote-p "/user@:" 'host) "default-host"))
     (should (string-equal (file-remote-p "/user@:" 'localname) ""))
+    (should (string-equal (file-remote-p "/user@:" 'hop) nil))
 
     ;; Expand `tramp-default-method'.
     (should (string-equal
@@ -237,6 +244,7 @@ shall not contain a timeout."
     (should (string-equal (file-remote-p "/address@hidden:" 'user) "user"))
     (should (string-equal (file-remote-p "/address@hidden:" 'host) "host"))
     (should (string-equal (file-remote-p "/address@hidden:" 'localname) ""))
+    (should (string-equal (file-remote-p "/address@hidden:" 'hop) nil))
 
     ;; Expand `tramp-default-user'.
     (should (string-equal
@@ -246,6 +254,7 @@ shall not contain a timeout."
     (should (string-equal (file-remote-p "/method:host:" 'user) 
"default-user"))
     (should (string-equal (file-remote-p "/method:host:" 'host) "host"))
     (should (string-equal (file-remote-p "/method:host:" 'localname) ""))
+    (should (string-equal (file-remote-p "/method:host:" 'hop) nil))
 
     ;; Expand `tramp-default-host'.
     (should (string-equal
@@ -256,6 +265,7 @@ shall not contain a timeout."
     (should (string-equal (file-remote-p "/method:user@:" 'host)
                          "default-host"))
     (should (string-equal (file-remote-p "/method:user@:" 'localname) ""))
+    (should (string-equal (file-remote-p "/method:user@:" 'hop) nil))
 
     ;; No expansion.
     (should (string-equal
@@ -266,6 +276,7 @@ shall not contain a timeout."
     (should (string-equal (file-remote-p "/method:address@hidden:" 'user) 
"user"))
     (should (string-equal (file-remote-p "/method:address@hidden:" 'host) 
"host"))
     (should (string-equal (file-remote-p "/method:address@hidden:" 'localname) 
""))
+    (should (string-equal (file-remote-p "/method:address@hidden:" 'hop) nil))
 
     ;; No expansion.
     (should (string-equal
@@ -279,6 +290,8 @@ shall not contain a timeout."
             (file-remote-p "/method:address@hidden@host:" 'host) "host"))
     (should (string-equal
             (file-remote-p "/method:address@hidden@host:" 'localname) ""))
+    (should (string-equal
+            (file-remote-p "/method:address@hidden@host:" 'hop) nil))
 
     ;; Expand `tramp-default-method' and `tramp-default-user'.
     (should (string-equal
@@ -289,6 +302,7 @@ shall not contain a timeout."
     (should (string-equal (file-remote-p "/host#1234:" 'user) "default-user"))
     (should (string-equal (file-remote-p "/host#1234:" 'host) "host#1234"))
     (should (string-equal (file-remote-p "/host#1234:" 'localname) ""))
+    (should (string-equal (file-remote-p "/host#1234:" 'hop) nil))
 
     ;; Expand `tramp-default-method'.
     (should (string-equal
@@ -299,6 +313,7 @@ shall not contain a timeout."
     (should (string-equal (file-remote-p "/address@hidden:" 'user) "user"))
     (should (string-equal (file-remote-p "/address@hidden:" 'host) 
"host#1234"))
     (should (string-equal (file-remote-p "/address@hidden:" 'localname) ""))
+    (should (string-equal (file-remote-p "/address@hidden:" 'hop) nil))
 
     ;; Expand `tramp-default-user'.
     (should (string-equal
@@ -311,6 +326,7 @@ shall not contain a timeout."
     (should (string-equal
             (file-remote-p "/method:host#1234:" 'host) "host#1234"))
     (should (string-equal (file-remote-p "/method:host#1234:" 'localname) ""))
+    (should (string-equal (file-remote-p "/method:host#1234:" 'hop) nil))
 
     ;; No expansion.
     (should (string-equal
@@ -324,6 +340,8 @@ shall not contain a timeout."
             (file-remote-p "/method:address@hidden:" 'host) "host#1234"))
     (should (string-equal
             (file-remote-p "/method:address@hidden:" 'localname) ""))
+    (should (string-equal
+            (file-remote-p "/method:address@hidden:" 'hop) nil))
 
     ;; Expand `tramp-default-method' and `tramp-default-user'.
     (should (string-equal
@@ -333,6 +351,7 @@ shall not contain a timeout."
     (should (string-equal (file-remote-p "/1.2.3.4:" 'user) "default-user"))
     (should (string-equal (file-remote-p "/1.2.3.4:" 'host) "1.2.3.4"))
     (should (string-equal (file-remote-p "/1.2.3.4:" 'localname) ""))
+    (should (string-equal (file-remote-p "/1.2.3.4:" 'hop) nil))
 
     ;; Expand `tramp-default-method'.
     (should (string-equal
@@ -343,6 +362,7 @@ shall not contain a timeout."
     (should (string-equal (file-remote-p "/address@hidden:" 'user) "user"))
     (should (string-equal (file-remote-p "/address@hidden:" 'host) "1.2.3.4"))
     (should (string-equal (file-remote-p "/address@hidden:" 'localname) ""))
+    (should (string-equal (file-remote-p "/address@hidden:" 'hop) nil))
 
     ;; Expand `tramp-default-user'.
     (should (string-equal
@@ -353,6 +373,7 @@ shall not contain a timeout."
             (file-remote-p "/method:1.2.3.4:" 'user) "default-user"))
     (should (string-equal (file-remote-p "/method:1.2.3.4:" 'host) "1.2.3.4"))
     (should (string-equal (file-remote-p "/method:1.2.3.4:" 'localname) ""))
+    (should (string-equal (file-remote-p "/method:1.2.3.4:" 'hop) nil))
 
     ;; No expansion.
     (should (string-equal
@@ -365,6 +386,8 @@ shall not contain a timeout."
             (file-remote-p "/method:address@hidden:" 'host) "1.2.3.4"))
     (should (string-equal
             (file-remote-p "/method:address@hidden:" 'localname) ""))
+    (should (string-equal
+            (file-remote-p "/method:address@hidden:" 'hop) nil))
 
     ;; Expand `tramp-default-method', `tramp-default-user' and
     ;; `tramp-default-host'.
@@ -376,6 +399,7 @@ shall not contain a timeout."
     (should (string-equal (file-remote-p "/[]:" 'user) "default-user"))
     (should (string-equal (file-remote-p "/[]:" 'host) "default-host"))
     (should (string-equal (file-remote-p "/[]:" 'localname) ""))
+    (should (string-equal (file-remote-p "/[]:" 'hop) nil))
 
     ;; Expand `tramp-default-method' and `tramp-default-user'.
     (let ((tramp-default-host "::1"))
@@ -385,7 +409,8 @@ shall not contain a timeout."
       (should (string-equal (file-remote-p "/[]:" 'method) "default-method"))
       (should (string-equal (file-remote-p "/[]:" 'user) "default-user"))
       (should (string-equal (file-remote-p "/[]:" 'host) "::1"))
-      (should (string-equal (file-remote-p "/[]:" 'localname) "")))
+      (should (string-equal (file-remote-p "/[]:" 'localname) ""))
+      (should (string-equal (file-remote-p "/[]:" 'hop) nil)))
 
     ;; Expand `tramp-default-method' and `tramp-default-user'.
     (should (string-equal
@@ -395,6 +420,7 @@ shall not contain a timeout."
     (should (string-equal (file-remote-p "/[::1]:" 'user) "default-user"))
     (should (string-equal (file-remote-p "/[::1]:" 'host) "::1"))
     (should (string-equal (file-remote-p "/[::1]:" 'localname) ""))
+    (should (string-equal (file-remote-p "/[::1]:" 'hop) nil))
 
     ;; Expand `tramp-default-method'.
     (should (string-equal
@@ -405,6 +431,7 @@ shall not contain a timeout."
     (should (string-equal (file-remote-p "/address@hidden::1]:" 'user) "user"))
     (should (string-equal (file-remote-p "/address@hidden::1]:" 'host) "::1"))
     (should (string-equal (file-remote-p "/address@hidden::1]:" 'localname) 
""))
+    (should (string-equal (file-remote-p "/address@hidden::1]:" 'hop) nil))
 
     ;; Expand `tramp-default-user'.
     (should (string-equal
@@ -415,6 +442,7 @@ shall not contain a timeout."
             (file-remote-p "/method:[::1]:" 'user) "default-user"))
     (should (string-equal (file-remote-p "/method:[::1]:" 'host) "::1"))
     (should (string-equal (file-remote-p "/method:[::1]:" 'localname) ""))
+    (should (string-equal (file-remote-p "/method:[::1]:" 'hop) nil))
 
     ;; No expansion.
     (should (string-equal
@@ -426,6 +454,7 @@ shall not contain a timeout."
     (should (string-equal (file-remote-p "/method:address@hidden::1]:" 'host) 
"::1"))
     (should (string-equal
             (file-remote-p "/method:address@hidden::1]:" 'localname) ""))
+    (should (string-equal (file-remote-p "/method:address@hidden::1]:" 'hop) 
nil))
 
     ;; Local file name part.
     (should (string-equal (file-remote-p "/host:/:" 'localname) "/:"))
@@ -440,7 +469,8 @@ shall not contain a timeout."
     (should
      (string-equal
       (file-remote-p 
"/method1:address@hidden|method2:address@hidden:/path/to/file")
-      (format "/%s:address@hidden:" "method2" "user2" "host2")))
+      (format "/%s:address@hidden|%s:address@hidden:"
+             "method1" "user1" "host1" "method2" "user2" "host2")))
     (should
      (string-equal
       (file-remote-p
@@ -461,12 +491,21 @@ shall not contain a timeout."
       (file-remote-p
        "/method1:address@hidden|method2:address@hidden:/path/to/file" 
'localname)
       "/path/to/file"))
+    (should
+     (string-equal
+      (file-remote-p
+       "/method1:address@hidden|method2:address@hidden:/path/to/file" 'hop)
+      (format "%s:address@hidden|"
+             "method1" "user1" "host1")))
 
     (should
      (string-equal
       (file-remote-p
        
"/method1:address@hidden|method2:address@hidden|method3:address@hidden:/path/to/file")
-      (format "/%s:address@hidden:" "method3" "user3" "host3")))
+      (format "/%s:address@hidden|%s:address@hidden|%s:address@hidden:"
+             "method1" "user1" "host1"
+             "method2" "user2" "host2"
+             "method3" "user3" "host3")))
     (should
      (string-equal
       (file-remote-p
@@ -490,7 +529,14 @@ shall not contain a timeout."
       (file-remote-p
        
"/method1:address@hidden|method2:address@hidden|method3:address@hidden:/path/to/file"
        'localname)
-      "/path/to/file"))))
+      "/path/to/file"))
+    (should
+     (string-equal
+      (file-remote-p
+       
"/method1:address@hidden|method2:address@hidden|method3:address@hidden:/path/to/file"
+       'hop)
+      (format "%s:address@hidden|%s:address@hidden|"
+             "method1" "user1" "host1" "method2" "user2" "host2")))))
 
 (ert-deftest tramp-test03-file-name-defaults ()
   "Check default values for some methods."
@@ -622,6 +668,8 @@ This checks also `file-name-as-directory', 
`file-name-directory',
                (tramp-inline-compress-start-size 2))
            (delete-file tmp-name2)
            (should (setq tmp-name2 (file-local-copy tmp-name1)))))
+
+      ;; Cleanup.
       (ignore-errors
        (delete-file tmp-name1)
        (delete-file tmp-name2)))))
@@ -645,6 +693,8 @@ This checks also `file-name-as-directory', 
`file-name-directory',
            ;; Replace.
            (insert-file-contents tmp-name nil nil nil 'replace)
            (should (string-equal (buffer-string) "foo"))))
+
+      ;; Cleanup.
       (ignore-errors (delete-file tmp-name)))))
 
 (ert-deftest tramp-test10-write-region ()
@@ -679,6 +729,8 @@ This checks also `file-name-as-directory', 
`file-name-directory',
          (with-temp-buffer
            (insert-file-contents tmp-name)
            (should (string-equal (buffer-string) "34"))))
+
+      ;; Cleanup.
       (ignore-errors (delete-file tmp-name)))))
 
 (ert-deftest tramp-test11-copy-file ()
@@ -707,6 +759,8 @@ This checks also `file-name-as-directory', 
`file-name-directory',
          (should
           (file-exists-p
            (expand-file-name (file-name-nondirectory tmp-name1) tmp-name3))))
+
+      ;; Cleanup.
       (ignore-errors (delete-file tmp-name1))
       (ignore-errors (delete-file tmp-name2))
       (ignore-errors (delete-directory tmp-name3 'recursive)))
@@ -727,6 +781,8 @@ This checks also `file-name-as-directory', 
`file-name-directory',
          (should
           (file-exists-p
            (expand-file-name (file-name-nondirectory tmp-name1) tmp-name5))))
+
+      ;; Cleanup.
       (ignore-errors (delete-file tmp-name1))
       (ignore-errors (delete-file tmp-name4))
       (ignore-errors (delete-directory tmp-name5 'recursive)))
@@ -747,6 +803,8 @@ This checks also `file-name-as-directory', 
`file-name-directory',
          (should
           (file-exists-p
            (expand-file-name (file-name-nondirectory tmp-name4) tmp-name3))))
+
+      ;; Cleanup.
       (ignore-errors (delete-file tmp-name1))
       (ignore-errors (delete-file tmp-name4))
       (ignore-errors (delete-directory tmp-name3 'recursive)))))
@@ -782,6 +840,8 @@ This checks also `file-name-as-directory', 
`file-name-directory',
          (should
           (file-exists-p
            (expand-file-name (file-name-nondirectory tmp-name1) tmp-name3))))
+
+      ;; Cleanup.
       (ignore-errors (delete-file tmp-name1))
       (ignore-errors (delete-file tmp-name2))
       (ignore-errors (delete-directory tmp-name3 'recursive)))
@@ -807,6 +867,8 @@ This checks also `file-name-as-directory', 
`file-name-directory',
          (should
           (file-exists-p
            (expand-file-name (file-name-nondirectory tmp-name1) tmp-name5))))
+
+      ;; Cleanup.
       (ignore-errors (delete-file tmp-name1))
       (ignore-errors (delete-file tmp-name4))
       (ignore-errors (delete-directory tmp-name5 'recursive)))
@@ -832,6 +894,8 @@ This checks also `file-name-as-directory', 
`file-name-directory',
          (should
           (file-exists-p
            (expand-file-name (file-name-nondirectory tmp-name4) tmp-name3))))
+
+      ;; Cleanup.
       (ignore-errors (delete-file tmp-name1))
       (ignore-errors (delete-file tmp-name4))
       (ignore-errors (delete-directory tmp-name3 'recursive)))))
@@ -841,20 +905,20 @@ This checks also `file-name-as-directory', 
`file-name-directory',
 This tests also `file-directory-p' and `file-accessible-directory-p'."
   (skip-unless (tramp--test-enabled))
 
-  (let ((tmp-name (tramp--test-make-temp-name)))
+  (let* ((tmp-name1 (tramp--test-make-temp-name))
+        (tmp-name2 (expand-file-name "foo/bar" tmp-name1)))
     (unwind-protect
        (progn
-         (make-directory tmp-name)
-         (should (file-directory-p tmp-name))
-         (should (file-accessible-directory-p tmp-name))
-         (should-error
-          (make-directory (expand-file-name "foo/bar" tmp-name))
-          :type 'file-error)
-         (make-directory (expand-file-name "foo/bar" tmp-name) 'parents)
-         (should (file-directory-p (expand-file-name "foo/bar" tmp-name)))
-         (should
-          (file-accessible-directory-p (expand-file-name "foo/bar" tmp-name))))
-      (ignore-errors (delete-directory tmp-name)))))
+         (make-directory tmp-name1)
+         (should (file-directory-p tmp-name1))
+         (should (file-accessible-directory-p tmp-name1))
+         (should-error (make-directory tmp-name2) :type 'file-error)
+         (make-directory tmp-name2 'parents)
+         (should (file-directory-p tmp-name2))
+         (should (file-accessible-directory-p tmp-name2)))
+
+      ;; Cleanup.
+      (ignore-errors (delete-directory tmp-name1 'recursive)))))
 
 (ert-deftest tramp-test14-delete-directory ()
   "Check `delete-directory'."
@@ -903,6 +967,8 @@ This tests also `file-directory-p' and 
`file-accessible-directory-p'."
          (copy-directory tmp-name1 tmp-name2)
          (should (file-directory-p tmp-name3))
          (should (file-exists-p tmp-name6)))
+
+      ;; Cleanup.
       (ignore-errors
        (delete-directory tmp-name1 'recursive)
        (delete-directory tmp-name2 'recursive)))))
@@ -933,6 +999,8 @@ This tests also `file-directory-p' and 
`file-accessible-directory-p'."
          (should (equal (directory-files
                          tmp-name1 'full directory-files-no-dot-files-regexp)
                         `(,tmp-name2 ,tmp-name3))))
+
+      ;; Cleanup.
       (ignore-errors (delete-directory tmp-name1 'recursive)))))
 
 (ert-deftest tramp-test17-insert-directory ()
@@ -974,6 +1042,8 @@ This tests also `file-directory-p' and 
`file-accessible-directory-p'."
               "\\(total.+[[:digit:]]+\n\\)?"
               ;; We don't know in which order ".", ".." and "foo" appear.
               "\\(.+ \\(\\.?\\.\\|foo\\)\n\\)\\{3\\}")))))
+
+      ;; Cleanup.
       (ignore-errors (delete-directory tmp-name1 'recursive)))))
 
 (ert-deftest tramp-test18-file-attributes ()
@@ -1038,6 +1108,7 @@ This tests also `file-readable-p' and `file-regular-p'."
          (setq attr (file-attributes tmp-name1))
          (should (eq (car attr) t)))
 
+      ;; Cleanup.
       (ignore-errors (delete-directory tmp-name1)))))
 
 (ert-deftest tramp-test19-directory-files-and-attributes ()
@@ -1079,6 +1150,8 @@ This tests also `file-readable-p' and `file-regular-p'."
               (equal (file-attributes (car elt)) (cdr elt)))))
          (setq attr (directory-files-and-attributes tmp-name2 nil "^b"))
          (should (equal (mapcar 'car attr) '("bar" "boz"))))
+
+      ;; Cleanup.
       (ignore-errors (delete-directory tmp-name1 'recursive)))))
 
 (ert-deftest tramp-test20-file-modes ()
@@ -1108,6 +1181,8 @@ This tests also `file-executable-p', `file-writable-p' 
and `set-file-modes'."
          ;; A file is always writable for user "root".
          (unless (zerop (nth 2 (file-attributes tmp-name)))
            (should-not (file-writable-p tmp-name))))
+
+      ;; Cleanup.
       (ignore-errors (delete-file tmp-name)))))
 
 (ert-deftest tramp-test21-file-links ()
@@ -1142,6 +1217,8 @@ This tests also `make-symbolic-link', `file-truename' and 
`add-name-to-file'."
          (should (file-symlink-p tmp-name2))
          ;; `tmp-name3' is a local file name.
          (should-error (make-symbolic-link tmp-name1 tmp-name3)))
+
+      ;; Cleanup.
       (ignore-errors
        (delete-file tmp-name1)
        (delete-file tmp-name2)))
@@ -1157,6 +1234,8 @@ This tests also `make-symbolic-link', `file-truename' and 
`add-name-to-file'."
          (should-not (file-symlink-p tmp-name2))
          ;; `tmp-name3' is a local file name.
          (should-error (add-name-to-file tmp-name1 tmp-name3)))
+
+      ;; Cleanup.
       (ignore-errors
        (delete-file tmp-name1)
        (delete-file tmp-name2)))
@@ -1214,6 +1293,8 @@ This tests also `make-symbolic-link', `file-truename' and 
`add-name-to-file'."
            ;; `tmp-name3' does not exist.
            (should (file-newer-than-file-p tmp-name2 tmp-name3))
            (should-not (file-newer-than-file-p tmp-name3 tmp-name1))))
+
+      ;; Cleanup.
       (ignore-errors
        (delete-file tmp-name1)
        (delete-file tmp-name2)))))
@@ -1233,6 +1314,8 @@ This tests also `make-symbolic-link', `file-truename' and 
`add-name-to-file'."
            (set-visited-file-modtime '(0 1))
            (should (verify-visited-file-modtime))
            (should (equal (visited-file-modtime) '(0 1 0 0)))))
+
+      ;; Cleanup.
       (ignore-errors (delete-file tmp-name)))))
 
 (ert-deftest tramp-test24-file-name-completion ()
@@ -1255,6 +1338,8 @@ This tests also `make-symbolic-link', `file-truename' and 
`add-name-to-file'."
          (should
           (equal (sort (file-name-all-completions "b" tmp-name) 'string-lessp)
                  '("bold" "boz/"))))
+
+      ;; Cleanup.
       (ignore-errors (delete-directory tmp-name 'recursive)))))
 
 (ert-deftest tramp-test25-load ()
@@ -1271,6 +1356,8 @@ This tests also `make-symbolic-link', `file-truename' and 
`add-name-to-file'."
          ;(should-error (load tmp-name nil 'nomessage 'nosuffix 'must-suffix))
          (load tmp-name nil 'nomessage 'nosuffix)
          (should (featurep 'tramp-test-load)))
+
+      ;; Cleanup.
       (ignore-errors
        (and (featurep 'tramp-test-load) (unload-feature 'tramp-test-load))
        (delete-file tmp-name)))))
@@ -1317,6 +1404,7 @@ This tests also `make-symbolic-link', `file-truename' and 
`add-name-to-file'."
            ;; A non-nil DISPLAY must not raise the buffer.
            (should-not (get-buffer-window (current-buffer) t))))
 
+      ;; Cleanup.
       (ignore-errors (delete-file tmp-name)))))
 
 (ert-deftest tramp-test27-start-file-process ()
@@ -1345,6 +1433,8 @@ This tests also `make-symbolic-link', `file-truename' and 
`add-name-to-file'."
            (while (< (- (point-max) (point-min)) (length "foo"))
              (accept-process-output proc 1)))
          (should (string-equal (buffer-string) "foo")))
+
+      ;; Cleanup.
       (ignore-errors (delete-process proc)))
 
     (unwind-protect
@@ -1361,6 +1451,8 @@ This tests also `make-symbolic-link', `file-truename' and 
`add-name-to-file'."
            (while (< (- (point-max) (point-min)) (length "foo"))
              (accept-process-output proc 1)))
          (should (string-equal (buffer-string) "foo")))
+
+      ;; Cleanup.
       (ignore-errors
        (delete-process proc)
        (delete-file tmp-name)))
@@ -1380,6 +1472,8 @@ This tests also `make-symbolic-link', `file-truename' and 
`add-name-to-file'."
            (while (< (- (point-max) (point-min)) (length "foo"))
              (accept-process-output proc 1)))
          (should (string-equal (buffer-string) "foo")))
+
+      ;; Cleanup.
       (ignore-errors (delete-process proc)))))
 
 (ert-deftest tramp-test28-shell-command ()
@@ -1409,6 +1503,8 @@ This tests also `make-symbolic-link', `file-truename' and 
`add-name-to-file'."
          (should
           (string-equal
            (format "%s\n" (file-name-nondirectory tmp-name)) (buffer-string))))
+
+      ;; Cleanup.
       (ignore-errors (delete-file tmp-name)))
 
     (unwind-protect
@@ -1434,6 +1530,8 @@ This tests also `make-symbolic-link', `file-truename' and 
`add-name-to-file'."
          (should
           (string-equal
            (format "%s\n" (file-name-nondirectory tmp-name)) (buffer-string))))
+
+      ;; Cleanup.
       (ignore-errors (delete-file tmp-name)))
 
     (unwind-protect
@@ -1461,6 +1559,8 @@ This tests also `make-symbolic-link', `file-truename' and 
`add-name-to-file'."
          (should
           (string-equal
            (format "%s\n" (file-name-nondirectory tmp-name)) (buffer-string))))
+
+      ;; Cleanup.
       (ignore-errors (delete-file tmp-name)))))
 
 (ert-deftest tramp-test29-vc-registered ()
@@ -1521,7 +1621,8 @@ This tests also `make-symbolic-link', `file-truename' and 
`add-name-to-file'."
                          (list (file-name-nondirectory tmp-name2)))))))
          (should (vc-registered tmp-name2)))
 
-       (ignore-errors (delete-directory tmp-name1 'recursive)))))
+      ;; Cleanup.
+      (ignore-errors (delete-directory tmp-name1 'recursive)))))
 
 (ert-deftest tramp-test30-make-auto-save-file-name ()
   "Check `make-auto-save-file-name'."
@@ -1603,23 +1704,43 @@ This tests also `make-symbolic-link', `file-truename' 
and `add-name-to-file'."
                 tmp-name2)))
              (should (file-directory-p tmp-name2)))))
 
+      ;; Cleanup.
       (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."
-  (eq (tramp-find-foreign-file-name-handler
-       tramp-test-temporary-file-directory)
-      'tramp-adb-file-name-handler))
+  (tramp-adb-file-name-p tramp-test-temporary-file-directory))
+
+(defun tramp--test-ftp-p ()
+  "Check, whether an FTP-like method is used.
+This does not support globbing characters in file names (yet)."
+  ;; Globbing characters are ??, ?* and ?\[.
+  (and (eq (tramp-find-foreign-file-name-handler
+           tramp-test-temporary-file-directory)
+          'tramp-sh-file-name-handler)
+       (string-match
+       "ftp$" (file-remote-p tramp-test-temporary-file-directory 'method))))
+
+(defun tramp--test-gvfs-p ()
+  "Check, whether the remote host runs a GVFS based method.
+This requires restrictions of file name syntax."
+  (tramp-gvfs-file-name-p tramp-test-temporary-file-directory))
 
 (defun tramp--test-smb-or-windows-nt-p ()
   "Check, whether the locale or remote host runs MS Windows.
 This requires restrictions of file name syntax."
   (or (eq system-type 'windows-nt)
-      (eq (tramp-find-foreign-file-name-handler
-          tramp-test-temporary-file-directory)
-         'tramp-smb-file-name-handler)))
+      (tramp-smb-file-name-p tramp-test-temporary-file-directory)))
+
+(defun tramp--test-hpux-p ()
+  "Check, whether the remote host runs HP-UX.
+Several special characters do not work properly there."
+  ;; We must refill the cache.  `file-truename' does it.
+  (with-parsed-tramp-file-name
+      (file-truename tramp-test-temporary-file-directory) nil
+    (string-match "^HP-UX" (tramp-get-connection-property v "uname" ""))))
 
 (defun tramp--test-check-files (&rest files)
   "Run a simple but comprehensive test over every file in FILES."
@@ -1752,18 +1873,19 @@ This requires restrictions of file name syntax."
              (delete-directory file1)
              (should-not (file-exists-p file1)))))
 
+      ;; Cleanup.
       (ignore-errors (delete-directory tmp-name1 'recursive))
       (ignore-errors (delete-directory tmp-name2 'recursive)))))
 
 (defun tramp--test-special-characters ()
-  "Perform the test in `tramp-test30-special-characters*'."
+  "Perform the test in `tramp-test31-special-characters*'."
   ;; Newlines, slashes and backslashes in file names are not
   ;; supported.  So we don't test.  And we don't test the tab
   ;; character on Windows or Cygwin, because the backslash is
   ;; interpreted as a path separator, preventing "\t" from being
   ;; expanded to <TAB>.
   (tramp--test-check-files
-   (if (tramp--test-smb-or-windows-nt-p)
+   (if (or (tramp--test-gvfs-p) (tramp--test-smb-or-windows-nt-p))
        "foo bar baz"
      (if (or (tramp--test-adb-p) (eq system-type 'cygwin))
         " foo bar baz "
@@ -1772,15 +1894,28 @@ This requires restrictions of file name syntax."
    "-foo-bar-baz-"
    "%foo%bar%baz%"
    "&foo&bar&baz&"
-   (unless (tramp--test-smb-or-windows-nt-p) "?foo?bar?baz?")
-   (unless (tramp--test-smb-or-windows-nt-p) "*foo*bar*baz*")
-   (if (tramp--test-smb-or-windows-nt-p) "'foo'bar'baz'" "'foo\"bar'baz\"")
+   (unless (or (tramp--test-ftp-p)
+              (tramp--test-gvfs-p)
+              (tramp--test-smb-or-windows-nt-p))
+     "?foo?bar?baz?")
+   (unless (or (tramp--test-ftp-p)
+              (tramp--test-gvfs-p)
+              (tramp--test-smb-or-windows-nt-p))
+     "*foo*bar*baz*")
+   (if (or (tramp--test-gvfs-p) (tramp--test-smb-or-windows-nt-p))
+       "'foo'bar'baz'"
+     "'foo\"bar'baz\"")
    "#foo~bar#baz~"
-   (if (tramp--test-smb-or-windows-nt-p) "!foo!bar!baz!" "!foo|bar!baz|")
-   (if (tramp--test-smb-or-windows-nt-p) ";foo;bar;baz;" ":foo;bar:baz;")
-   (unless (tramp--test-smb-or-windows-nt-p) "<foo>bar<baz>")
+   (if (or (tramp--test-gvfs-p) (tramp--test-smb-or-windows-nt-p))
+       "!foo!bar!baz!"
+     "!foo|bar!baz|")
+   (if (or (tramp--test-gvfs-p) (tramp--test-smb-or-windows-nt-p))
+       ";foo;bar;baz;"
+     ":foo;bar:baz;")
+   (unless (or (tramp--test-gvfs-p) (tramp--test-smb-or-windows-nt-p))
+     "<foo>bar<baz>")
    "(foo)bar(baz)"
-   "[foo]bar[baz]"
+   (unless (or (tramp--test-ftp-p) (tramp--test-gvfs-p)) "[foo]bar[baz]")
    "{foo}bar{baz}"))
 
 ;; These tests are inspired by Bug#17238.
@@ -1801,13 +1936,12 @@ Use the `stat' command."
   (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil
     (skip-unless (tramp-get-remote-stat v)))
 
-  (unwind-protect
-      (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil
-       (tramp-set-connection-property v "perl" nil)
-       (tramp--test-special-characters))
-    ;; Reset suppressed properties.
-    (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil
-      (tramp-set-connection-property v "perl" 'undef))))
+  (let ((tramp-connection-properties
+        (append
+         `((,(regexp-quote (file-remote-p tramp-test-temporary-file-directory))
+            "perl" nil))
+         tramp-connection-properties)))
+    (tramp--test-special-characters)))
 
 (ert-deftest tramp-test31-special-characters-with-perl ()
   "Check special characters in file names.
@@ -1820,13 +1954,12 @@ Use the `perl' command."
   (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil
     (skip-unless (tramp-get-remote-perl v)))
 
-  (unwind-protect
-      (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil
-       (tramp-set-connection-property v "stat" nil)
-       (tramp--test-special-characters))
-    ;; Reset suppressed properties.
-    (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil
-      (tramp-set-connection-property v "stat" 'undef))))
+  (let ((tramp-connection-properties
+        (append
+         `((,(regexp-quote (file-remote-p tramp-test-temporary-file-directory))
+            "stat" nil))
+         tramp-connection-properties)))
+    (tramp--test-special-characters)))
 
 (ert-deftest tramp-test31-special-characters-with-ls ()
   "Check special characters in file names.
@@ -1837,24 +1970,24 @@ Use the `ls' command."
     (tramp-find-foreign-file-name-handler tramp-test-temporary-file-directory)
     'tramp-sh-file-name-handler))
 
-  (unwind-protect
-      (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil
-       (tramp-set-connection-property v "stat" nil)
-       (tramp-set-connection-property v "perl" nil)
-       (tramp--test-special-characters))
-    ;; Reset suppressed properties.
-    (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil
-      (tramp-set-connection-property v "stat" 'undef)
-      (tramp-set-connection-property v "perl" 'undef))))
+  (let ((tramp-connection-properties
+        (append
+         `((,(regexp-quote (file-remote-p tramp-test-temporary-file-directory))
+            "perl" nil)
+           (,(regexp-quote (file-remote-p tramp-test-temporary-file-directory))
+            "stat" nil))
+         tramp-connection-properties)))
+    (tramp--test-special-characters)))
 
 (defun tramp--test-utf8 ()
-  "Perform the test in `tramp-test31-utf8*'."
+  "Perform the test in `tramp-test32-utf8*'."
   (let ((coding-system-for-read 'utf-8)
        (coding-system-for-write 'utf-8)
        (file-name-coding-system 'utf-8))
     (tramp--test-check-files
-     "Γυρίστε το Γαλαξία με Ώτο Στοπ"
-     "أصبح بوسعك الآن تنزيل نسخة كاملة من موسوعة ويكيبيديا العربية لتصفحها بلا 
اتصال بالإنترنت"
+     (unless (tramp--test-hpux-p) "Γυρίστε το Γαλαξία με Ώτο Στοπ")
+     (unless (tramp--test-hpux-p)
+       "أصبح بوسعك الآن تنزيل نسخة كاملة من موسوعة ويكيبيديا العربية لتصفحها 
بلا اتصال بالإنترنت")
      "银河系漫游指南系列"
      "Автостопом по гала́ктике")))
 
@@ -1875,13 +2008,12 @@ Use the `stat' command."
   (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil
     (skip-unless (tramp-get-remote-stat v)))
 
-  (unwind-protect
-      (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil
-       (tramp-set-connection-property v "perl" nil)
-       (tramp--test-utf8))
-    ;; Reset suppressed properties.
-    (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil
-      (tramp-set-connection-property v "perl" 'undef))))
+  (let ((tramp-connection-properties
+        (append
+         `((,(regexp-quote (file-remote-p tramp-test-temporary-file-directory))
+            "perl" nil))
+         tramp-connection-properties)))
+    (tramp--test-utf8)))
 
 (ert-deftest tramp-test32-utf8-with-perl ()
   "Check UTF8 encoding in file names and file contents.
@@ -1894,13 +2026,12 @@ Use the `perl' command."
   (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil
     (skip-unless (tramp-get-remote-perl v)))
 
-  (unwind-protect
-      (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil
-       (tramp-set-connection-property v "stat" nil)
-       (tramp--test-utf8))
-    ;; Reset suppressed properties.
-    (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil
-      (tramp-set-connection-property v "stat" 'undef))))
+  (let ((tramp-connection-properties
+        (append
+         `((,(regexp-quote (file-remote-p tramp-test-temporary-file-directory))
+            "stat" nil))
+         tramp-connection-properties)))
+    (tramp--test-utf8)))
 
 (ert-deftest tramp-test32-utf8-with-ls ()
   "Check UTF8 encoding in file names and file contents.
@@ -1911,15 +2042,14 @@ Use the `ls' command."
     (tramp-find-foreign-file-name-handler tramp-test-temporary-file-directory)
     'tramp-sh-file-name-handler))
 
-  (unwind-protect
-      (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil
-       (tramp-set-connection-property v "stat" nil)
-       (tramp-set-connection-property v "perl" nil)
-       (tramp--test-utf8))
-    ;; Reset suppressed properties.
-    (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil
-      (tramp-set-connection-property v "stat" 'undef)
-      (tramp-set-connection-property v "perl" 'undef))))
+  (let ((tramp-connection-properties
+        (append
+         `((,(regexp-quote (file-remote-p tramp-test-temporary-file-directory))
+            "perl" nil)
+           (,(regexp-quote (file-remote-p tramp-test-temporary-file-directory))
+            "stat" nil))
+         tramp-connection-properties)))
+    (tramp--test-utf8)))
 
 ;; This test is inspired by Bug#16928.
 (ert-deftest tramp-test33-asynchronous-requests ()
@@ -2080,13 +2210,9 @@ Since it unloads Tramp, it shall be the last test to 
run."
 ;; * Work on skipped tests.  Make a comment, when it is impossible.
 ;; * Fix `tramp-test15-copy-directory' for `smb'.  Using tar in a pipe
 ;;   doesn't work well when an interactive password must be provided.
-;; * Fix `tramp-test27-start-file-process' for `nc' and on MS
-;;   Windows (`process-send-eof'?).
-;; * Fix `tramp-test30-special-characters' for `nc'.
-;; * Fix `tramp-test31-utf8' for `nc'/`telnet' (when target is a dumb
-;;   busybox).  Seems to be in `directory-files'.
-;; * Fix Bug#16928.  Set expected error of 
`tramp-test32-asynchronous-requests'.
-;; * Fix `tramp-test34-unload' (Not all symbols are unbound).  Set
+;; * Fix `tramp-test27-start-file-process' on MS Windows (`process-send-eof'?).
+;; * Fix Bug#16928.  Set expected error of 
`tramp-test33-asynchronous-requests'.
+;; * Fix `tramp-test35-unload' (Not all symbols are unbound).  Set
 ;;   expected error.
 
 (defun tramp-test-all (&optional interactive)
diff --git a/test/automated/vc-tests.el b/test/automated/vc-tests.el
index 58d2237..a7242e9 100644
--- a/test/automated/vc-tests.el
+++ b/test/automated/vc-tests.el
@@ -130,7 +130,19 @@ For backends which dont support it, it is emulated."
            (make-temp-name "vc-test") temporary-file-directory)))
       (make-directory (expand-file-name "module" tmp-dir) 'parents)
       (make-directory (expand-file-name "CVSROOT" tmp-dir) 'parents)
-      (shell-command-to-string (format "cvs -Q -d:local:%s co module" tmp-dir))
+      (if (not (fboundp 'w32-application-type))
+          (shell-command-to-string (format "cvs -Q -d:local:%s co module"
+                                           tmp-dir))
+        (let ((cvs-prog (executable-find "cvs"))
+              (tdir tmp-dir))
+          ;; If CVS executable is an MSYS program, reformat the file
+          ;; name of TMP-DIR to have the /d/foo/bar form supported by
+          ;; MSYS programs.  (FIXME: What about Cygwin cvs.exe?)
+          (if (eq (w32-application-type cvs-prog) 'msys)
+              (setq tdir
+                    (concat "/" (substring tmp-dir 0 1) (substring tmp-dir 
2))))
+          (shell-command-to-string (format "cvs -Q -d:local:%s co module"
+                                           tdir))))
       (rename-file "module/CVS" default-directory)
       (delete-directory "module" 'recursive)
       ;; We must cleanup the "remote" CVS repo as well.
diff --git a/test/indent/perl.perl b/test/indent/perl.perl
index ea48754..f86a09b 100755
--- a/test/indent/perl.perl
+++ b/test/indent/perl.perl
@@ -59,3 +59,11 @@ print "hello" for /./;
 
 $fileType_filesButNot           # bug#12373?
     = join( '|', map { quotemeta($_).'$' } @{$fileType->{filesButNot}} );
+
+# There can be a comment between an if/when/while and a /<re>/ matcher!
+return 'W' if               #/^Not Available on Mobile/m;    #W=Web only
+    /This video is not available on mobile devices./m;       #bug#20800
+
+# A "y|abc|def|" shouldn't interfere when inside a string!
+$toto = " x \" string\"";
+$toto = " y \" string\"";       # This is not the `y' operator!



reply via email to

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