emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] xwidget_mvp 707260f 2/2: upstream merge


From: Joakim Verona
Subject: [Emacs-diffs] xwidget_mvp 707260f 2/2: upstream merge
Date: Fri, 13 Nov 2015 19:48:07 +0000

branch: xwidget_mvp
commit 707260fd62842e99b270684df9d4d6bbef900f55
Merge: 7ecc620 4f0ce9c
Author: Joakim Verona <address@hidden>
Commit: Joakim Verona <address@hidden>

    upstream merge
---
 .gitignore                             |    1 +
 CONTRIBUTE                             |   99 +-
 ChangeLog.2                            | 3408 +++++++++++++++++++++++---------
 admin/MAINTAINERS                      |   10 +-
 admin/notes/repo                       |    4 +-
 build-aux/msys-to-w32                  |    2 +-
 configure.ac                           |   15 +
 doc/emacs/ack.texi                     |   27 +-
 doc/emacs/custom.texi                  |    6 +-
 doc/lispref/files.texi                 |   12 +-
 doc/lispref/os.texi                    |   84 +-
 doc/lispref/sequences.texi             |    6 +-
 doc/lispref/strings.texi               |    7 +-
 doc/lispref/variables.texi             |   39 +-
 doc/lispref/windows.texi               |    2 +-
 doc/misc/cc-mode.texi                  |    4 +-
 doc/misc/texinfo.tex                   |  351 +++-
 doc/misc/tramp.texi                    |   17 +-
 etc/NEWS                               |   23 +
 etc/PROBLEMS                           |   30 +
 etc/TODO                               |    9 +
 etc/emacs-buffer.gdb                   |   10 +-
 etc/themes/tsdh-dark-theme.el          |   25 +-
 etc/tutorials/TUTORIAL.translators     |    6 +-
 lib/intprops.h                         |  144 ++-
 lib/stdalign.in.h                      |    2 +-
 lib/timespec-add.c                     |   27 +-
 lib/timespec-sub.c                     |   27 +-
 lisp/ChangeLog.17                      |   10 +-
 lisp/abbrev.el                         |    2 +
 lisp/arc-mode.el                       |    1 +
 lisp/bookmark.el                       |  114 +-
 lisp/calc/calc-aent.el                 |    1 -
 lisp/calc/calc-alg.el                  |    1 -
 lisp/calc/calc-arith.el                |    1 -
 lisp/calc/calc-bin.el                  |    1 -
 lisp/calc/calc-comb.el                 |    1 -
 lisp/calc/calc-cplx.el                 |    1 -
 lisp/calc/calc-embed.el                |    1 -
 lisp/calc/calc-ext.el                  |    1 -
 lisp/calc/calc-fin.el                  |    1 -
 lisp/calc/calc-forms.el                |    1 -
 lisp/calc/calc-frac.el                 |    1 -
 lisp/calc/calc-funcs.el                |    1 -
 lisp/calc/calc-graph.el                |    1 -
 lisp/calc/calc-help.el                 |    1 -
 lisp/calc/calc-incom.el                |    1 -
 lisp/calc/calc-keypd.el                |    1 -
 lisp/calc/calc-lang.el                 |    1 -
 lisp/calc/calc-macs.el                 |    1 -
 lisp/calc/calc-map.el                  |    1 -
 lisp/calc/calc-math.el                 |    1 -
 lisp/calc/calc-menu.el                 |    2 -
 lisp/calc/calc-misc.el                 |    1 -
 lisp/calc/calc-mode.el                 |    1 -
 lisp/calc/calc-mtx.el                  |    1 -
 lisp/calc/calc-nlfit.el                |    2 -
 lisp/calc/calc-poly.el                 |    1 -
 lisp/calc/calc-prog.el                 |    1 -
 lisp/calc/calc-rewr.el                 |    1 -
 lisp/calc/calc-rules.el                |    1 -
 lisp/calc/calc-sel.el                  |    1 -
 lisp/calc/calc-stat.el                 |    1 -
 lisp/calc/calc-store.el                |    1 -
 lisp/calc/calc-stuff.el                |    1 -
 lisp/calc/calc-trail.el                |    1 -
 lisp/calc/calc-undo.el                 |    1 -
 lisp/calc/calc-units.el                |    1 -
 lisp/calc/calc-vec.el                  |    1 -
 lisp/calc/calc-yank.el                 |    1 -
 lisp/calc/calc.el                      |    3 +-
 lisp/calc/calcalg2.el                  |    1 -
 lisp/calc/calcalg3.el                  |    1 -
 lisp/calc/calccomp.el                  |    1 -
 lisp/calc/calcsel2.el                  |    1 -
 lisp/character-fold.el                 |    2 +
 lisp/dired.el                          |   14 +-
 lisp/emacs-lisp/bytecomp.el            |    5 +-
 lisp/emacs-lisp/cl-generic.el          |  150 ++-
 lisp/emacs-lisp/cl-macs.el             |    2 +-
 lisp/emacs-lisp/cl-seq.el              |    2 +-
 lisp/emacs-lisp/cursor-sensor.el       |    2 +-
 lisp/emacs-lisp/eieio-compat.el        |   42 +-
 lisp/emacs-lisp/eieio-core.el          |   30 +-
 lisp/emacs-lisp/map.el                 |   31 +-
 lisp/emacs-lisp/pcase.el               |    8 +-
 lisp/emacs-lisp/seq.el                 |   10 +-
 lisp/emacs-lisp/smie.el                |    8 +-
 lisp/emacs-lisp/syntax.el              |   11 +-
 lisp/epg.el                            |    4 +-
 lisp/erc/ChangeLog.2                   |    5 +
 lisp/erc/erc-pcomplete.el              |    7 +-
 lisp/faces.el                          |   59 +-
 lisp/filenotify.el                     |   50 +-
 lisp/files-x.el                        |   29 +-
 lisp/files.el                          |  197 ++-
 lisp/frame.el                          |   19 +-
 lisp/gnus/auth-source.el               |  197 +-
 lisp/gnus/gnus-sum.el                  |    1 +
 lisp/gnus/mm-url.el                    |   23 +-
 lisp/help-fns.el                       |   52 +-
 lisp/hexl.el                           |    2 +-
 lisp/ielm.el                           |    2 +-
 lisp/isearch.el                        |   10 +-
 lisp/json.el                           |  193 ++-
 lisp/ldefs-boot.el                     |  531 +++---
 lisp/loadup.el                         |    2 +-
 lisp/net/ntlm.el                       |    2 +-
 lisp/net/pinentry.el                   |   10 +-
 lisp/net/shr.el                        |   19 +-
 lisp/net/soap-client.el                |   31 +-
 lisp/net/soap-inspect.el               |    5 +-
 lisp/net/tramp-adb.el                  |    4 +-
 lisp/net/tramp-gvfs.el                 |  201 ++-
 lisp/net/tramp-sh.el                   |    4 +-
 lisp/net/tramp-smb.el                  |    4 +-
 lisp/net/tramp.el                      |   40 +-
 lisp/obarray.el                        |   66 +
 lisp/proced.el                         |    1 +
 lisp/progmodes/cc-engine.el            |   68 +-
 lisp/progmodes/cc-mode.el              |   12 +-
 lisp/progmodes/elisp-mode.el           |   15 +-
 lisp/progmodes/etags.el                |    7 +-
 lisp/progmodes/f90.el                  |    2 +-
 lisp/progmodes/js.el                   |  221 +++
 lisp/progmodes/project.el              |  201 ++-
 lisp/progmodes/python.el               |    4 +-
 lisp/progmodes/xref.el                 |  123 +-
 lisp/simple.el                         |  151 ++-
 lisp/startup.el                        |    2 +-
 lisp/term/ns-win.el                    |   14 +-
 lisp/term/pc-win.el                    |   14 +-
 lisp/term/w32-win.el                   |   22 +-
 lisp/term/x-win.el                     |   14 +-
 lisp/term/xterm.el                     |    4 +-
 lisp/textmodes/tex-mode.el             |    1 +
 lisp/url/url-handlers.el               |    2 +-
 lisp/vc/vc-bzr.el                      |    2 +-
 lisp/vc/vc-dir.el                      |    1 +
 lisp/vc/vc-git.el                      |    2 +-
 lisp/vc/vc-hg.el                       |    2 +-
 lisp/vc/vc-svn.el                      |    2 +-
 lisp/vc/vc.el                          |   12 +-
 src/Makefile.in                        |    3 +-
 src/alloc.c                            |   87 +-
 src/buffer.c                           |   30 +-
 src/casefiddle.c                       |    8 +-
 src/ccl.c                              |    8 +-
 src/character.c                        |   63 +-
 src/cmds.c                             |   56 +-
 src/coding.c                           |   21 +-
 src/data.c                             |   59 +-
 src/dispnew.c                          |   18 +-
 src/editfns.c                          |    7 +-
 src/fileio.c                           |    4 +-
 src/fns.c                              |    4 +-
 src/ftfont.c                           |   18 +-
 src/gfilenotify.c                      |    1 +
 src/gnutls.c                           |    7 +-
 src/gtkutil.c                          |    7 +-
 src/image.c                            |   31 +-
 src/keyboard.c                         |   16 +-
 src/keymap.c                           |    9 +-
 src/lisp.h                             |   47 +-
 src/lread.c                            |   32 +-
 src/macros.c                           |   15 +-
 src/minibuf.c                          |    7 +-
 src/nsimage.m                          |   15 +-
 src/nsterm.h                           |    4 +-
 src/nsterm.m                           |  134 +-
 src/term.c                             |   12 +-
 src/tparam.c                           |    4 +-
 src/undo.c                             |   52 +-
 src/unexelf.c                          | 1024 ++--------
 src/w32fns.c                           |  465 +++++
 src/w32proc.c                          |   12 +-
 src/w32term.c                          |   33 +
 src/window.c                           |    2 +-
 src/window.h                           |    1 +
 src/xdisp.c                            |   22 +-
 src/xfns.c                             |  276 +++-
 src/xrdb.c                             |    8 +-
 src/xselect.c                          |    5 +-
 src/xsmfns.c                           |    3 +-
 src/xterm.c                            |   83 +-
 src/xterm.h                            |    8 +
 test/automated/abbrev-tests.el         |   43 +
 test/automated/auto-revert-tests.el    |   68 +-
 test/automated/buffer-tests.el         |   48 +
 test/automated/character-fold-tests.el |   58 +
 test/automated/cl-lib-tests.el         |   16 +-
 test/automated/eieio-tests.el          |    4 -
 test/automated/elisp-mode-tests.el     |   34 +-
 test/automated/f90.el                  |   15 +
 test/automated/faces-tests.el          |   54 +
 test/automated/file-notify-tests.el    |   30 +-
 test/automated/flymake-tests.el        |    2 +-
 test/automated/fns-tests.el            |    2 +
 test/automated/isearch-tests.el        |   32 +
 test/automated/json-tests.el           |   48 +
 test/automated/keymap-tests.el         |   43 +
 test/automated/map-tests.el            |   27 +-
 test/automated/obarray-tests.el        |   90 +
 test/automated/process-tests.el        |   26 +-
 test/automated/python-tests.el         |   20 +-
 test/automated/simple-test.el          |   50 +
 test/automated/sort-tests.el           |  106 +
 test/automated/subr-tests.el           |   21 +
 test/automated/vc-tests.el             |   63 +-
 test/etags/cp-src/clheir.hpp           |    2 +-
 test/indent/css-mode.css               |    4 +-
 test/indent/js-jsx.js                  |   85 +
 212 files changed, 7618 insertions(+), 3650 deletions(-)

diff --git a/.gitignore b/.gitignore
index 7f023b7..fda50e9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -255,6 +255,7 @@ gnustmp*
 ChangeLog
 [0-9]*.patch
 [0-9]*.txt
+.dir-locals?.el
 /vc-dwim-log-*
 
 # Built by 'make install'.
diff --git a/CONTRIBUTE b/CONTRIBUTE
index 4d5d08a..2aae251 100644
--- a/CONTRIBUTE
+++ b/CONTRIBUTE
@@ -201,48 +201,6 @@ then exclude that commit from the merge to trunk.
 
 ** Other process information
 
-*** Non-ASCII characters in Emacs files
-
-If you introduce non-ASCII characters into Emacs source files, it is a
-good idea to add a 'coding' cookie to the file to state its encoding.
-Please use the UTF-8 encoding unless it cannot do the job for some
-good reason.  As of Emacs 24.4, it is no longer necessary to have
-explicit 'coding' cookies in *.el files if they are encoded in UTF-8,
-but other files need them even if encoded in UTF-8.  However, if
-an *.el file is intended for use with older Emacs versions (e.g. if
-it's also distributed via ELPA), having an explicit encoding
-specification is still a good idea.
-
-*** Useful files in the admin/ directory
-
-See all the files in admin/notes/* .  In particular, see
-admin/notes/newfile, see admin/notes/repo.
-
-The file admin/MAINTAINERS records the areas of interest of frequent
-Emacs contributors.  If you are making changes in one of the files
-mentioned there, it is a good idea to consult the person who expressed
-an interest in that file, and/or get his/her feedback for the changes.
-If you are a frequent contributor and have interest in maintaining
-specific files, please record those interests in that file, so that
-others could be aware of that.
-
-*** git vs rename
-
-Git does not explicitly represent a file renaming; it uses a percent
-changed heuristic to deduce that a file was renamed.  So if you are
-planning to make extensive changes to a file after renaming it (or
-moving it to another directory), you should:
-
-- create a feature branch
-
-- commit the rename without any changes
-
-- make other changes
-
-- merge the feature branch to trunk, _not_ squashing the commits into
-  one.  The commit message on this merge should summarize the renames
-  and all the changes.
-
 ** Emacs Mailing lists.
 
 Discussion about Emacs development takes place on address@hidden
@@ -260,6 +218,17 @@ packages the patch's commit message and changes.  To send 
just one
 such patch without additional remarks, you can use a command like
 'git send-email address@hidden 0001-DESCRIPTION.patch'.
 
+** Issue tracker (a.k.a. "bug tracker")
+
+The Emacs issue tracker is at http://debbugs.gnu.org/.  The form
+presented by that page allows to view bug reports and search the
+database for bugs matching several criteria.  Messages posted to the
address@hidden mailing list, mentioned above, are recorded by
+the tracker with the corresponding bugs/issues.
+
+GNU ELPA has a 'debbugs' package that allows accessing the tracker
+database from Emacs.
+
 ** Document your changes.
 
 Any change that matters to end-users should have an entry in etc/NEWS.
@@ -279,7 +248,9 @@ for documentation errors before submitting a patch.
 ** Test your changes.
 
 Please test your changes before committing them or sending them to the
-list.
+list.  If possible, add a new test along with any bug fix or new
+functionality you commit (of course, some changes cannot be easily
+tested).
 
 Emacs uses ERT, Emacs Lisp Regression Testing, for testing.  See (info
 "(ert)") or https://www.gnu.org/software/emacs/manual/html_node/ert/
@@ -301,6 +272,48 @@ implementation in more detail.
 
 The file etc/DEBUG describes how to debug Emacs bugs.
 
+*** Non-ASCII characters in Emacs files
+
+If you introduce non-ASCII characters into Emacs source files, it is a
+good idea to add a 'coding' cookie to the file to state its encoding.
+Please use the UTF-8 encoding unless it cannot do the job for some
+good reason.  As of Emacs 24.4, it is no longer necessary to have
+explicit 'coding' cookies in *.el files if they are encoded in UTF-8,
+but other files need them even if encoded in UTF-8.  However, if
+an *.el file is intended for use with older Emacs versions (e.g. if
+it's also distributed via ELPA), having an explicit encoding
+specification is still a good idea.
+
+*** Useful files in the admin/ directory
+
+See all the files in admin/notes/* .  In particular, see
+admin/notes/newfile, see admin/notes/repo.
+
+The file admin/MAINTAINERS records the areas of interest of frequent
+Emacs contributors.  If you are making changes in one of the files
+mentioned there, it is a good idea to consult the person who expressed
+an interest in that file, and/or get his/her feedback for the changes.
+If you are a frequent contributor and have interest in maintaining
+specific files, please record those interests in that file, so that
+others could be aware of that.
+
+*** git vs rename
+
+Git does not explicitly represent a file renaming; it uses a percent
+changed heuristic to deduce that a file was renamed.  So if you are
+planning to make extensive changes to a file after renaming it (or
+moving it to another directory), you should:
+
+- create a feature branch
+
+- commit the rename without any changes
+
+- make other changes
+
+- merge the feature branch to trunk, _not_ squashing the commits into
+  one.  The commit message on this merge should summarize the renames
+  and all the changes.
+
 
 
 This file is part of GNU Emacs.
diff --git a/ChangeLog.2 b/ChangeLog.2
index d86ce38..3636e38 100644
--- a/ChangeLog.2
+++ b/ChangeLog.2
@@ -1,3 +1,1100 @@
+2015-11-08  Paul Eggert  <address@hidden>
+
+       Prefer xpalloc to doubling buffers by hand
+
+       * src/lread.c (grow_read_buffer): New function, which uses xpalloc.
+       (read1): Use it for simplicity.
+       * src/macros.c (store_kbd_macro_char):
+       * src/minibuf.c (read_minibuf_noninteractive):
+       * src/term.c (encode_terminal_code):
+       * src/xrdb.c (magic_db):
+       Prefer xpalloc to growing buffers by hand.
+       This doesn’t fix any bugs, but simplifies the code a bit.
+
+2015-11-08  Paul Eggert  <address@hidden>
+
+       Merge from gnulib
+
+       This incorporates:
+       2015-11-05 timespec-sub: fix overflow bug; add tests
+       2015-11-04 intprops: revise _WRAPV macros, revert _OVERFLOW
+       2015-11-03 intprops: add parentheses
+       * lib/intprops.h, lib/timespec-add.c, lib/timespec-sub.c:
+       Copy from gnulib.
+
+2015-11-07  David Reitter  <address@hidden>
+
+       Provide NS notification objects where required to eliminate warnings
+
+       * nsterm.m (windowDidResize:, toggleFullScreen:):
+       Call notification functions with notification objects
+       as per delegate APIs.
+
+2015-11-07  Noam Postavsky  <address@hidden>
+
+       Add test for bug #21824
+
+       * test/automated/buffer-tests.el: New file.
+       (overlay-modification-hooks-message-other-buf): New test.
+
+2015-11-07  Kelvin White  <address@hidden>
+
+       * lisp/erc/erc-pcomplete.el (pcomplete-erc-nicks): Fix bug#18771.
+
+2015-11-07  David Reitter  <address@hidden>
+
+       Ignore fullscreen exit notifications on NS when frame is dead
+
+       * nsterm.m (windowDidResize:, windowWillExitFullScreen:)
+       (windowDidExitFullScreen:): Return if frame is dead.
+       These functions may be called when a fullscreen frame
+       is closed; they are called before, not after.
+
+       May address Bug#21428.
+
+2015-11-07  Eli Zaretskii  <address@hidden>
+
+       Speed up lookup in redisplay--variables
+
+       * lisp/frame.el (redisplay--variables): Make it a hash-table.
+
+       * src/xdisp.c (maybe_set_redisplay): Access redisplay--variables
+       as a hash-table.  This speeds up this function by an order of
+       magnitude: where previously a setq was slowed down by 100% by
+       introducing the maybe_set_redisplay test, it is now only 5%
+       slower.
+       (syms_of_xdisp) <redisplay--variables>: Doc fix.
+
+2015-11-07  Artur Malabarba  <address@hidden>
+
+       * lisp/emacs-lisp/cl-macs.el (cl-defstruct): Fix a bug.
+
+       The defsubst was being created as:
+           (cl-defsubst name (args) ("DOC") ...)
+
+       * test/automated/cl-lib-tests.el (cl-lib-struct-constructors):
+       Add test.
+
+2015-11-07  Mihai Olteanu  <address@hidden>  (tiny change)
+
+       Update doc string of hexl-mode
+
+       * lisp/hexl.el (hexl-mode): Doc fix.  (Bug#21800)
+
+2015-11-07  Eli Zaretskii  <address@hidden>
+
+       Fix error in copy-abbrev-table
+
+       * lisp/abbrev.el (define-abbrev): Don't erase the :abbrev-table-modiff
+       property of the abbrev-table.  (Bug#21828)
+
+       * test/automated/abbrev-tests.el: New file.
+
+2015-11-07  Michael Albinus  <address@hidden>
+
+       Add test to auto-revert-tests.el for Bug#21841
+
+       * test/automated/auto-revert-tests.el
+       (auto-revert-test01-auto-revert-several-files): New test.
+       (auto-revert-test02-auto-revert-tail-mode)
+       (auto-revert-test03-auto-revert-mode-dired): Rename them.
+
+2015-11-07  Martin Rudalics  <address@hidden>
+
+       * doc/lispref/windows.texi (Coordinates and Windows): Fix typo.
+
+2015-11-07  Martin Rudalics  <address@hidden>
+
+       In x_consider_frame_title don't set title of tooltip frames
+
+       * src/xdisp.c (x_consider_frame_title): Return immediately for
+       tooltip frames to avoid displaying empty tooltips.
+
+2015-11-06  Anders Lindgren  <address@hidden>
+
+       Fixed NextStep fullscreen problem (bug#21770).
+
+       * src/nsterm.m (ns_constrain_all_frames): Don't constrain
+       fullscreen frames.
+
+2015-11-06  Eli Zaretskii  <address@hidden>
+
+       Ensure redisplay after evaluation
+
+       * lisp/progmodes/elisp-mode.el (elisp--eval-last-sexp):
+       Revert last change.
+       * lisp/frame.el (redisplay--variables): Populate the
+       redisplay--variables list.
+       * src/xdisp.c (maybe_set_redisplay): New function.
+       (syms_of_xdisp) <redisplay--variables>: New variable.
+       * src/window.h (maybe_set_redisplay): Declare prototype.
+       * src/data.c (set_internal): Call maybe_set_redisplay.  (Bug#21835)
+
+2015-11-06  Artur Malabarba  <address@hidden>
+
+       * test/automated/subr-tests.el (subr-test-when): Fix again.
+
+2015-11-06  Eli Zaretskii  <address@hidden>
+
+       Don't invoke overlay modification hooks in wrong buffer
+
+       * src/buffer.c (report_overlay_modification): When called with
+       AFTER non-zero, don't invoke overlay modification hooks if the
+       buffer recorded in last_overlay_modification_hooks is different
+       from the current buffer.  (Bug#21824)
+
+2015-11-06  Juanma Barranquero  <address@hidden>
+
+       * admin/notes/repo: Fix a few obsolete references to Bazaar.
+
+2015-11-06  Artur Malabarba  <address@hidden>
+
+       * test/automated/subr-tests.el (subr-test-when): Fix test.
+
+2015-11-06  Martin Rudalics  <address@hidden>
+
+       Avoid division by zero crash observed by Yuan MEI
+
+       See http://lists.gnu.org/archive/html/emacs-devel/2015-11/msg00194.html.
+
+       * src/dispnew.c (required_matrix_height, required_matrix_width):
+       Avoid division by zero.
+       * src/xterm.c (x_term_init): Init dpyinfo->smallest_font_height and
+       dpyinfo->smallest_char_width to 1.
+
+2015-11-06  Eli Zaretskii  <address@hidden>
+
+       Ensure redisplay after "C-x C-e"
+
+       * lisp/progmodes/elisp-mode.el (elisp--eval-last-sexp): Make sure
+       redisplay happens to account for any side effects of the evaluated
+       sexp.  (Bug#21835)
+
+2015-11-06  Michael Albinus  <address@hidden>
+
+       Skip some file notification tests for cygwin
+
+       * test/automated/file-notify-tests.el (file-notify--test-with-events):
+       Remove argument TIMEOUT.  Adapt all callees.
+       (file-notify-test02-events, file-notify-test04-file-validity):
+       Skip for cygwin.  (Bug#21804)
+
+2015-11-05  Stephen Leake  <address@hidden>
+
+       * lisp/progmodes/xref.el: Require semantic/symref during compilation.
+
+2015-11-05  Daiki Ueno  <address@hidden>
+
+       Suppress redundant Pinentry startup messages
+
+       * lisp/net/pinentry.el (pinentry-start): Add optional QUIET argument.
+       * lisp/epg.el: Declare `pinentry-start'.
+       (epg--start): Call `pinentry-start' with QUIET argument set.
+
+2015-11-05  Xue Fuqiao  <address@hidden>
+
+       * doc/emacs/ack.texi (Acknowledgments): Updates.
+
+2015-11-05  Juanma Barranquero  <address@hidden>
+
+       * test/automated/elisp-mode-test.el: Silence some run-time warnings.
+       (xref-elisp-deftest): Bind `find-file-suppress-same-file-warnings' to t.
+
+2015-11-05  Tassilo Horn  <address@hidden>
+
+       * lisp/textmodes/tex-mode.el (tex--prettify-symbols-alist):
+       Add prettification support for \times.
+
+2015-11-05  Juanma Barranquero  <address@hidden>
+
+       * test/automated/process-tests.el: Skip tests when bash is unavailable.
+       (process-test-sentinel-accept-process-output)
+       (process-test-sentinel-sit-for): skip-unless bash executable found.
+
+2015-11-05  Eli Zaretskii  <address@hidden>
+
+       Add test for bug #21831
+
+       * test/automated/process-tests.el
+       (start-process-should-not-modify-arguments): New test.  (Bug#21831)
+       Suggested by Nicolas Richard <address@hidden>
+
+2015-11-04  Stefan Monnier  <address@hidden>
+
+       * lisp/emacs-lisp/eieio-compat.el: Typo caught by tests.
+
+       (eieio--generic-static-object-generalizer): Fix typo.
+       * test/automated/eieio-tests.el: Byte-compile it again.  It looks
+       like the underlying cause of bug#17852 was fixed in the mean time.
+
+2015-11-04  Artur Malabarba  <address@hidden>
+
+       Revert "* lisp/subr.el (when): Use `macroexp-progn'"
+
+       This reverts commit 8e843831eaf271801836b7a3e4dd3b4fb0bb72b8.
+       It breaks bootstrapping (duh).
+
+2015-11-04  Artur Malabarba  <address@hidden>
+
+       * lisp/files.el (report-errors): Obsolete.
+
+       (normal-mode, hack-local-variables, dir-locals-find-file):
+       Use `with-demoted-errors' instead.
+
+2015-11-04  Artur Malabarba  <address@hidden>
+
+       * lisp/subr.el (when): Use `macroexp-progn'.
+
+       * test/automated/subr-tests.el (subr-test-when): New test.
+
+2015-11-04  Juanma Barranquero  <address@hidden>
+
+       * lisp/progmodes/xref.el: Doc fixes.
+       (xref-make-file-location, xref-make-buffer-location, xref-make)
+       (xref-make-bogus-location, xref-make-match): Add cross-references.
+       (xref--insert-xrefs): Fix typo in docstring.
+
+2015-11-04  Anders Lindgren  <address@hidden>
+
+       Render fringe bitmaps correctly on NextStep (bug#21301)
+
+       The fringe bitmaps were inverted, the background was not transparent,
+       the image data was horizontally mirrored, and periodic fringe bitmaps
+       were not supported.
+
+       * src/nsimage.m ([EmacsImage initFromXBM:width:height:fg:bg:]):
+       When both background and foreground colors are 0, set the background
+       alpha channel to 0 (making the background transparent).  When
+       copying the image data, do this from the most significant bit
+       (leftmost) to the least (rightmost), to avoid mirroring.
+       * src/nsterm.m (ns_draw_fringe_bitmap): Don't invert the image bits.
+       Add support for periodic images (e.g. the empty line indicator).
+
+2015-11-03  Michael Heerdegen  <address@hidden>
+
+       * lisp/emacs-lisp/pcase.el (pcase): Tweak docstring.
+
+2015-11-03  Nicolas Petton  <address@hidden>
+
+       * admin/MAINTAINERS: Add seq-tests.el, map-tests.el, and thunk-tests.el.
+
+       * admin/MAINTAINERS: Add thunk.el.
+
+2015-11-03  Jay Belanger  <address@hidden>
+
+       * lisp/calc/calc (calc-bug-address): Change maintainer address.
+
+2015-11-03  Michael Albinus  <address@hidden>
+
+       Fix a stupid error in gfilenotify.c
+
+       * src/gfilenotify.c (dir_monitor_callback): Cancel monitor only,
+       if we've got a `deleted' signal AND the file name is the watched one.
+
+2015-11-03  Stephen Leake  <address@hidden>
+
+       Fix Bug#21816; case insensitive file system in elisp-mode-tests.el
+
+       * test/automated/elisp-mode-tests.el (xref-elisp-test-run):
+       Use case-insensitive string compare for file names.
+       (emacs-test-dir): Add 'downcase' to cause case differences (at
+       least on my system).
+
+2015-11-02  Juanma Barranquero  <address@hidden>
+
+       flymake-tests.el (warning-predicate-rx-gcc): Fix check
+
+       * test/automated/flymake-tests.el (warning-predicate-rx-gcc):
+       Also check that "make" is available, not just "gcc".
+
+2015-11-02  Ken Brown  <address@hidden>
+
+       Document behavior of collation on Cygwin
+
+       * test/automated/fns-tests.el (fns-tests-collate-sort): Mark as
+       expected failure on Cygwin.
+       * doc/lispref/strings.texi (Text Comparison): Document that
+       punctuation and whitespace are not ignored for sorting on Cygwin.
+
+2015-11-02  Dani Moncayo  <address@hidden>
+
+       * build-aux/msys-to-w32: Prevent double slashes in w32 path list.
+
+2015-11-01  Glenn Morris  <address@hidden>
+
+       * lisp/progmodes/f90.el (f90-no-block-limit): Add associate.
+       (Bug#21794)
+       * test/automated/f90.el (f90-test-bug21794): New test.
+
+2015-11-01  Juanma Barranquero  <address@hidden>
+
+       Fix incompatibility with TCC in test for bug#18745
+
+       * test/automated/process-tests.el (process-test-quoted-batfile):
+       Remove spaces unrelated to the bug being tested.
+
+2015-11-01  Michael Albinus  <address@hidden>
+
+       Improve completion in tramp-gvfs.el
+
+       * lisp/net/tramp-gvfs.el (tramp-zeroconf-parse-device-names):
+       Rename from `tramp-zeroconf-parse-service-device-names'.
+       (tramp-zeroconf-parse-webdav-device-names): Remove.  Code merged
+       with `tramp-zeroconf-parse-device-names'.
+       (tramp-gvfs-parse-device-names): New defun.
+       (top): Use it when `tramp-zeroconf-parse-device-names' is not
+       applicable.
+
+       * lisp/net/tramp.el (tramp-set-completion-function): The argument
+       could also be a zeroconf service type.
+
+2015-10-31  Thomas Fitzsimmons  <address@hidden>
+
+       * lisp/net/ntlm.el: Change version to 2.0.0.
+
+2015-10-31  Juanma Barranquero  <address@hidden>
+
+       Fix bug#21762
+       * lisp/progmodes/python.el (python-syntax-closing-paren-p): Check with
+       `eql' instead of `=' to accommodate the case that (syntax-after (point))
+       returns nil.
+       * test/automated/python-tests.el (python-indent-inside-paren-7):
+       New test.
+
+2015-10-31  Juanma Barranquero  <address@hidden>
+
+       * test/automated/python-tests.el: Avoid warnings.
+       (python-tests-with-temp-buffer, python-tests-with-temp-file):
+       Bind `python-indent-guess-indent-offset' to nil.
+
+2015-10-31  Juanma Barranquero  <address@hidden>
+
+       * src/alloc.c: Silence compiler warnings.
+       (pointers_fit_in_lispobj_p, mmap_lisp_allowed_p): #ifdef 
DOUG_LEA_MALLOC.
+
+2015-10-31  Jackson Ray Hamilton  <address@hidden>
+
+       * etc/NEWS: Fix js-jsx-mode entry punctuation.
+
+2015-10-31  Jackson Ray Hamilton  <address@hidden>
+
+       Add JSX indentation via js-jsx-mode  (Bug#21799)
+
+       * progmodes/js.el: Add JSX indentation support.
+       (js--jsx-end-tag-re)
+       (js--jsx-after-tag-re): New variables.
+       (js--jsx-find-before-tag)
+       (js--jsx-indented-element-p)
+       (js--as-sgml)
+       (js--expression-in-sgml-indent-line)
+       (js-jsx-indent-line)
+       (js-jsx-mode): New functions.
+       * test/indent/js-jsx.el: New file.
+       * etc/NEWS: Add information about js-jsx-mode.
+
+2015-10-31  Michael Albinus  <address@hidden>
+
+       Minor fix in filenotify.el
+
+       * lisp/filenotify.el (file-notify--event-file-name)
+       (file-notify--event-file1-name): Normalize result with
+       `directory-file-name'.
+
+2015-10-31  Eli Zaretskii  <address@hidden>
+
+       Avoid errors in redisplay--pre-redisplay-functions
+
+       * lisp/emacs-lisp/cursor-sensor.el (cursor-sensor--detect): Don't
+       use 'bobp', instead compare window-point with 1.  (Bug#21730)
+
+2015-10-30  Paul Eggert  <address@hidden>
+
+       Merge from gnulib
+
+       This incorporates:
+       2015-10-30 intprops: add WRAPV and const flavors for GCC 5
+       2015-10-25 stdalign: port to Sun C 5.9
+       * doc/misc/texinfo.tex, lib/intprops.h, lib/stdalign.in.h:
+       Copy from gnulib.
+
+2015-10-30  Eli Zaretskii  <address@hidden>
+
+       * src/w32proc.c (_NLSCMPERROR): Fix a typo in the name of this macro.
+       (w32_compare_strings): Adjust for the correction.
+
+2015-10-30  Michael Albinus  <address@hidden>
+
+       * test/automated/vc-tests.el (vc-test--state)
+       (vc-test--working-revision, vc-test--checkout-model):
+       Add result messages.
+
+2015-10-30  Artur Malabarba  <address@hidden>
+
+       * test/automated/faces-tests.el: Add another test
+
+2015-10-30  Artur Malabarba  <address@hidden>
+
+       * lisp/faces.el (faces--attribute-at-point): Fix bug
+       introduced by previous commit.
+
+2015-10-30  Artur Malabarba  <address@hidden>
+
+       * test/automated/faces-tests.el: New file.
+
+2015-10-30  Artur Malabarba  <address@hidden>
+
+       * lisp/faces.el: Refactor common code and fix a bug.
+       (faces--attribute-at-point): New function.  Fix a bug when the
+       face at point is a list of faces and the desired attribute is not
+       on the first one.
+       (foreground-color-at-point, background-color-at-point): Use it.
+
+2015-10-30  Przemysław Wojnowski  <address@hidden>
+
+       * etc/tutorials/TUTORIAL.translators: Fix PL names.
+
+2015-10-30  Juanma Barranquero  <address@hidden>
+
+       * lisp/character-fold.el: Provide `character-fold'.
+
+2015-10-30  Tassilo Horn  <address@hidden>
+
+       * etc/themes/tsdh-dark-theme.el (tsdh-dark): Add more faces
+       for Gnus and ivy.
+
+2015-10-30  Michael Albinus  <address@hidden>
+
+       Some minor fixes for tramp-gvfs.el
+
+       * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-attributes):
+       An attribute returned by gvfs-info might be empty.  In case of
+       undetermined uid or gid, return "UNKNOWN" or -1, respectively.
+       (tramp-zeroconf-parse-service-device-names): New defun.
+       Derived from `tramp-zeroconf-parse-workstation-device-names'.
+       (top): Add completion functions for "afp" and "smb" methods.
+
+2015-10-30  Artur Malabarba  <address@hidden>
+
+       * test/automated/character-fold-tests.el: New file
+
+2015-10-30  Artur Malabarba  <address@hidden>
+
+       * test/automated/sort-tests.el: New file.
+       Tests in this file are randomly generated and then tested with
+       regular, reverse, and case-fold sorting.
+
+2015-10-30  Eli Zaretskii  <address@hidden>
+
+       Describe known problems with pinning Emacs to taskbar
+
+       * etc/PROBLEMS: Describe the problem with pinning Emacs to taskbar
+       on Windows 10.  For the details, see the discussion starting at
+       
http://lists.gnu.org/archive/html/help-emacs-windows/2015-09/msg00000.html.
+
+2015-10-30  Artur Malabarba  <address@hidden>
+
+       * lisp/isearch.el: Avoid an error that blocks isearch.
+       (isearch-update): Don't error if `isearch--current-buffer' has
+       been killed.
+
+       * test/automated/isearch-tests.el (isearch--test-update):
+       New file.
+
+2015-10-30  Phil Sainty  <address@hidden>
+
+       Fix documentation of 'beginning/end-of-buffer'
+
+       * lisp/simple.el (beginning-of-buffer, end-of-buffer): Clarify
+       conditions under which the mark will be pushed at the previous
+       position.  (Bug#21748)
+
+2015-10-30  Tassilo Horn  <address@hidden>
+
+       Add RefTeX feature idea: editing RefTeX TOC buffers
+
+       More face defs for ivy, swiper, ace-window, eshell
+
+2015-10-29  Stefan Monnier  <address@hidden>
+
+       * lisp/gnus/auth-source.el: Silence lexical-binding warnings.
+       (auth-source-netrc-use-gpg-tokens): Simplify (symbol-value 'VAR) to
+       just VAR.
+       (auth-source-backend-parse): Use make-instance.
+       (auth-source-search): Remove unused key args.
+       Remove unused vars `accessor-key' and `backend'.  Avoid `eval'.
+       (auth-source-search-backends): Use slot names rather than their initarg.
+       (auth-source-netrc-create):
+       (auth-source-delete):
+       (auth-source-secrets-create, auth-source-plstore-search)
+       (auth-source-macos-keychain-create, auth-source-macos-keychain-search)
+       (auth-source-plstore-create, auth-source-netrc-search)
+       (auth-source-netrc-parse): Remove unused key args.
+       (auth-source-forget+): Simplify the arglist.
+       (auth-source-macos-keychain-search-items)
+       (auth-source-token-passphrase-callback-function): Mark unused args.
+       (auth-source-epa-extract-gpg-token): Remove unused var `plain'.
+       (pp-escape-newlines): Declare.
+       (auto-source--symbol-keyword): New function.
+       (auth-source-plstore-create, auth-source-netrc-create)
+       (auth-source-netrc-normalize): Use it.
+       (auth-source-netrc-search): Don't pass :delete to
+       auth-source-netrc-parse since it doesn't use it.
+       (auth-source-plstore-create, auth-source-netrc-create): Use plist-get
+       symbol-value to index in keyword args.
+       (auth-source-macos-keychain-result-append): Avoid setq.
+       (auth-source-netrc-create): Remove unused vars `file' and `add'.
+       (auth-source-user-or-password): Remove unused var `cname'.
+
+2015-10-29  Juri Linkov  <address@hidden>
+
+       * lisp/dired.el (dired-unmark-all-files-query): Declare.
+       (dired-unmark-all-files): Let-bind it and use instead of ‘query’.
+       (Bug#21746)
+
+2015-10-29  Juri Linkov  <address@hidden>
+
+       * lisp/ielm.el (ielm-indent-line): Use non-nil arg of comint-bol
+       to go to the beginning of text line instead of command line.
+       http://lists.gnu.org/archive/html/emacs-devel/2015-10/msg02360.html
+
+2015-10-29  Eli Zaretskii  <address@hidden>
+
+       Fix encoding of saving *Help* buffers
+
+       * lisp/help-fns.el (describe-function-1): If we use curved quotes,
+       set help buffer's buffer-file-coding-system to UTF-8.  (Bug#21780)
+
+2015-10-29  Stefan Monnier  <address@hidden>
+
+       * lisp/emacs-lisp/cl-generic.el: Add (major-mode MODE) context.
+       (cl--generic-derived-specializers): New function.
+       (cl--generic-derived-generalizer): New generalizer.
+       (cl-generic-generalizers): New specializer (derived-mode MODE).
+       (cl--generic-split-args): Apply the rewriter, if any.
+       (cl-generic-define-context-rewriter): New macro.
+       (major-mode): Use it to define a new context-rewriter, so we can write
+       `(major-mode MODE)' instead of `(major-mode (derived-mode MODE))'.
+
+       * lisp/frame.el (window-system): New context-rewriter so we can write
+       `(window-system VAL)' instead of (window-system (eql VAL)).
+       (cl--generic-split-args): Apply the rewriter, if any.
+       (frame-creation-function): Use the new syntax.
+
+       * lisp/term/x-win.el (window-system-initialization)
+       (handle-args-function, frame-creation-function)
+       (gui-backend-set-selection, gui-backend-selection-owner-p)
+       (gui-backend-selection-exists-p, gui-backend-get-selection):
+       * lisp/term/w32-win.el (window-system-initialization)
+       (handle-args-function, frame-creation-function)
+       (gui-backend-set-selection, gui-backend-get-selection)
+       (gui-backend-selection-owner-p, gui-backend-selection-exists-p):
+       * lisp/term/pc-win.el (gui-backend-get-selection)
+       (gui-backend-selection-exists-p, gui-backend-selection-owner-p)
+       (gui-backend-set-selection, window-system-initialization)
+       (frame-creation-function, handle-args-function):
+       * lisp/term/ns-win.el (window-system-initialization)
+       (handle-args-function, frame-creation-function)
+       (gui-backend-set-selection, gui-backend-selection-exists-p)
+       (gui-backend-get-selection):
+       * lisp/startup.el (handle-args-function):
+       * lisp/term/xterm.el (gui-backend-get-selection)
+       (gui-backend-set-selection): Use the new syntax.
+
+2015-10-29  Stefan Monnier  <address@hidden>
+
+       * test/indent/css-mode.css: Add tests for url(...) syntax.
+
+2015-10-29  Stefan Monnier  <address@hidden>
+
+       * lisp/emacs-lisp/smie.el: Use `declare' for `pure'.
+       (smie-precs->prec2, smie-merge-prec2s, smie-bnf->prec2)
+       (smie-prec2->grammar): Use `declare'.
+
+2015-10-29  Stefan Monnier  <address@hidden>
+
+       * lisp/emacs-lisp/cl-generic.el: Accommodate future changes.
+       (cl--generic-generalizer): Add `name' field.
+       (cl-generic-make-generalizer): Add corresponding `name' argument.
+       (cl-generic-define-generalizer): New macro.
+       (cl--generic-head-generalizer, cl--generic-eql-generalizer)
+       (cl--generic-struct-generalizer, cl--generic-typeof-generalizer)
+       (cl--generic-t-generalizer): Use it.
+       (cl-generic-ensure-function): Add `noerror' argument.
+       (cl-generic-define): Use it so we don't follow aliases.
+       (cl-generic-define-method): Preserve pre-existing ordering of methods.
+       (cl--generic-arg-specializer): New function.
+       (cl--generic-cache-miss): Use it.
+       (cl-generic-generalizers): Only fset a temporary definition
+       during bootstrap.
+       (cl--generic-struct-tag, cl--generic-struct-specializers):
+       Allow extra arguments.
+
+       * lisp/emacs-lisp/eieio-compat.el
+       (eieio--generic-static-symbol-generalizer)
+       (eieio--generic-static-object-generalizer):
+       Use cl-generic-define-generalizer.
+       (eieio--generic-static-symbol-specializers): Allow extra arguments.
+
+       * lisp/emacs-lisp/eieio-core.el (eieio--generic-generalizer)
+       (eieio--generic-subclass-generalizer):
+       Use cl-generic-define-generalizer.
+       (eieio--generic-subclass-specializers): Allow extra arguments.
+
+2015-10-29  Stefan Monnier  <address@hidden>
+
+       * lisp/emacs-lisp/bytecomp.el (compile-defun): Add defvars in scope.
+
+2015-10-29  Michael Albinus  <address@hidden>
+
+       Add "afp" method to Tramp
+
+       * doc/misc/tramp.texi (GVFS based methods): Describe `afp' method.
+
+       * lisp/net/tramp-gvfs.el (tramp-gvfs-methods): Add "afp" method.
+       (tramp-gvfs-handle-expand-file-name)
+       (tramp-gvfs-handler-mounted-unmounted)
+       (tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec)
+       (tramp-gvfs-maybe-open-connection): Support also "afp".
+       (tramp-gvfs-handle-file-attributes): Handle the case of empty
+       "owner::user" and "owner::group" entries.
+
+2015-10-29  Andy Moreton  <address@hidden>
+
+       Handle negative coordinates in ‘x_calc_absolute_position’
+
+       * src/w32term.c (x_calc_absolute_position): Find display origin to
+       allow for negative coordinates.
+
+2015-10-28  Stefan Monnier  <address@hidden>
+
+       (internal--syntax-propertize): Save match-data here (bug#21766)
+
+       * lisp/emacs-lisp/syntax.el (internal--syntax-propertize): Save 
match-data.
+       * lisp/simple.el (delete-trailing-whitespace): Undo last change.
+
+2015-10-28  Dmitry Gutov  <address@hidden>
+
+       Don't require default-directory to end with a slash
+
+       * doc/lispref/files.texi (Magic File Names): Document the change
+       in unhandled-file-name-directory.
+
+       * lisp/url/url-handlers.el
+       (url-handler-unhandled-file-name-directory): Update accordingly.
+
+       * src/buffer.c (default-directory): Update the docsting.
+
+       * src/fileio.c (unhandled-file-name-directory): Default to calling
+       `file-name-as-directory'
+       (http://lists.gnu.org/archive/html/emacs-devel/2015-10/msg02294.html).
+
+2015-10-28  Artur Malabarba  <address@hidden>
+
+       * lisp/isearch.el: Delete some outdated comments.
+
+2015-10-28  Vibhav Pant  <address@hidden>
+
+       Fix eshell/clear not working if the output has a small line count
+
+       * lisp/eshell/esh-mode.el (eshell/clear): Use (window-size) as the
+       number of newlines to be inserted. This fixes the issue where
+       eshell/clear wouldn't work if the prompt was not at the bottom of the
+       window, and the output wasn't too long.
+
+2015-10-28  Stefan Monnier  <address@hidden>
+
+       * lisp/files.el (write-file): Use vc-refresh-state.
+
+       * lisp/autorevert.el (auto-revert-handler): Use vc-refresh-state.
+
+       * lisp/vc/pcvs.el (cvs-revert-if-needed): Use vc-refresh-state.
+
+2015-10-28  Stefan Monnier  <address@hidden>
+
+       * lisp/emacs-lisp/macroexp.el: Tweak macroexp-if optimizations.
+       (macroexp-unprogn): Make sure we never return an empty list.
+       (macroexp-if): Remove unused (and unsafe) optimization.
+       Optimize (if A T (if B T E)) into (if (or A B) T E) instead, which does
+       occur occasionally.
+
+2015-10-28  Juanma Barranquero  <address@hidden>
+
+       Fix bug#21766 and add test
+       * lisp/simple.el (delete-trailing-whitespace): Save match data when
+       calling `skip-syntax-backward'.
+       * test/automated/simple-test.el (simple-delete-trailing-whitespace):
+       New test.
+
+2015-10-28  Artur Malabarba  <address@hidden>
+
+       * doc/lispref/sequences.texi (Sequence Functions): Fix typo.
+
+2015-10-28  Paul Eggert  <address@hidden>
+
+       * src/dispnew.c (init_display): Simplify overflow checking.
+
+2015-10-28  Artur Malabarba  <address@hidden>
+
+       * lisp/character-fold.el (character-fold-to-regexp): Fix case
+       where string ends in space
+
+2015-10-28  Artur Malabarba  <address@hidden>
+
+       * lisp/emacs-lisp/seq.el (seq-mapn): New function.
+
+       * doc/lispref/sequences.texi (Sequence Functions): Document seq-mapn.
+
+2015-10-28  Artur Malabarba  <address@hidden>
+
+       * lisp/character-fold.el: Make compatible with lax-whitespace.
+       (character-fold-to-regexp): Rework internals to play nice with
+       lax-whitespacing.
+
+       When the user types a space, we want to match the table entry for
+       ?\s, which is generally a regexp like "[ ...]".  However, the
+       `search-spaces-regexp' variable doesn't "see" spaces inside these
+       regexp constructs, so we need to use "\\( \\|[ ...]\\)" instead (to
+       manually expose a space).
+
+       Furthermore, the lax search engine acts on a bunch of spaces, not
+       on individual spaces, so if the string contains sequential spaces
+       like "  ", we need to keep them grouped together like this:
+       "\\(  \\|[ ...][ ...]\\)".
+
+2015-10-28  Artur Malabarba  <address@hidden>
+
+       * lisp/isearch.el: Refactor momentary messages.
+       (isearch--momentary-message): New function.
+       (isearch-toggle-lax-whitespace, isearch-toggle-case-fold)
+       (isearch-toggle-invisible): Use it.
+
+2015-10-28  Artur Malabarba  <address@hidden>
+
+       * lisp/isearch.el: Define all toggles with `isearch-define-mode-toggle'.
+       (isearch-define-mode-toggle): New macro.
+       (isearch-toggle-invisible): Rename to
+       `isearch-define-mode-toggle'.
+       (isearch-toggle-case-fold, isearch-toggle-invisible)
+       (isearch-toggle-regexp, isearch-toggle-lax-whitespace): Define
+       with `isearch-define-mode-toggle'.
+
+2015-10-28  Michael Albinus  <address@hidden>
+
+       Avoid using `add-to-list' on a let-local var in tramp-smb.el
+
+       * lisp/net/tramp-compat.el (tramp-compat-delete-dups): New defun.
+       * lisp/net/tramp-smb.el (tramp-smb-handle-directory-files): Use it.
+
+2015-10-28  Anders Lindgren  <address@hidden>
+
+       Merge branch 'master' of /Volumes/HD2/build/emacs-git-ssh
+
+       Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/emacs
+
+       Merge branch 'master' of /Volumes/HD2/build/emacs-git-ssh
+
+2015-10-28  Michael Albinus  <address@hidden>
+
+       * lisp/net/tramp-smb.el (tramp-smb-handle-directory-files):
+       Revert 692bce5b9eccfae19ae2a5a23a9ccd8d6bf86076, `delete-dups'
+       does not exist in XEmacs 21.4.
+
+2015-10-28  Anders Lindgren  <address@hidden>
+
+       Fixed OS X startup crash
+
+       Input events started to arrive before ns_term_init() was finished.
+       Solved by blocking input.  This also seems to correct the "You
+       can't open the application "Emacs" because it may be damaged or
+       incomplete" error issued when double-clicking on the Emacs
+       application.
+
+       * nsterm.m (ns_constrain_all_frames, ns_init_term): Block input.
+       * nsterm.m (ns_send_appdefined, EmacsApp): Trace output.
+
+2015-10-28  Anders Lindgren  <address@hidden>
+
+       Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/emacs
+
+2015-10-28  Artur Malabarba  <address@hidden>
+
+       * src/process.c (Fget_buffer_process): Improve docstring.
+       Document the fact that it doesn't return dead processes.
+
+2015-10-28  Anders Lindgren  <address@hidden>
+
+       Fix incorrect NextStep tool-bar-mode -- wrong number of rows in frame.
+
+       * nsterm.h (struct ns_output): New flag, in_animation.
+       * nsfns.m (Fx_create_frame): Initialize in_animation flag.
+       * nsmenu.m (free_frame_tool_bar, update_frame_tool_bar): Set
+       in_animation flag around call to "setVisible". Set new tool bar
+       height before call to setVisible.
+       * nsterm.m (x_set_window_size): Don't call [view setRow:
+       andColumns:] as this fools the subsequent call to updateFrameSize
+       from performing the real resize.
+       (windowDidResize): Don't update anything when in_animation is
+       non-zero.
+
+       Trace output.
+
+       * nsmenu.m (free_frame_tool_bar, update_frame_tool_bar)
+       (EmacsToolbar):
+       * nsterm.m (x_set_window_size, updateFrameSize)
+       ([EmacsView setRows: andColumns:])
+
+2015-10-28  Nicolas Petton  <address@hidden>
+
+       * lisp/emacs-lisp/thunk.el (thunk-delay): Fix the macro.
+
+2015-10-28  Tassilo Horn  <address@hidden>
+
+       Prettify TeX macros not ending in a word char
+
+       * lisp/textmodes/tex-mode.el (tex--prettify-symbols-compose-p):
+       Prettify macros which don't end in a word character.
+
+2015-10-27  Dmitry Gutov  <address@hidden>
+
+       Pipe Hg commit descriptions through 'tabindent'
+
+       * lisp/vc/vc-hg.el (vc-hg-log-format): Pipe commit description
+       through 'tabindent'.
+       (vc-hg-log-view-mode): Set tab-width to 2 locally.
+       (http://lists.gnu.org/archive/html/emacs-devel/2015-10/msg02259.html)
+
+2015-10-27  Stefan Monnier  <address@hidden>
+
+       * lisp/net/tramp-smb.el: Avoid using `add-to-list' on a let-local var.
+       (tramp-smb-handle-directory-files): Use `delete-dups'.
+
+       * lisp/net/tramp.el (auto-save-file-name-transforms): Declare.
+
+2015-10-27  Stefan Monnier  <address@hidden>
+
+       * lisp/international/ccl.el: Use lexical-binding.
+       (ccl-compile-if): Remove unused var `false-ic'.
+       (ccl-compile-write-repeat): Remove unused var `i'.
+       (ccl-compile-map-single): Remove unused var `id'.
+       (ccl-dump, ccl-dump-binary): Use explicit let-binding to bind the
+       dynamic var `ccl-code'.
+
+2015-10-27  Stefan Monnier  <address@hidden>
+
+       * lisp/json.el (json-new-object): Optimize trivial `list' call.
+
+2015-10-27  Stefan Monnier  <address@hidden>
+
+       * lisp/help.el: Fix bug with incorrect arglist string.
+       (help-add-fundoc-usage): Don't mistake a mis-formatted string
+       for a list.
+
+2015-10-27  Stefan Monnier  <address@hidden>
+
+       * lisp/gnus/gnus-topic.el: Silence some warnings.
+       (gnus-topic-prepare-topic): Remove unused var `topic'.
+       (gnus-topic-remove-topic): Mark unused arg `hide'.
+       (gnus-tmp-header): Declare.
+       (gnus-topic-goto-missing-group): Remove unused var `entry'.
+       (gnus-topic-unmark-topic): Mark unused arg `dummy'.
+       (gnus-topic-copy-matching): Mark unused arg `copyp'.
+       Move initialization of `topic' into its declaration.
+
+2015-10-27  Stephen Leake  <address@hidden>
+
+       Minor CEDET fixes
+
+       * lisp/cedet/cedet-global.el (cedet-gnu-global-gtags-call):
+       Handle warnings from gtags about invalid options.
+       (cedet-gnu-global-create/update-database): Do incremental update
+       properly.
+
+       * lisp/cedet/ede/generic.el (ede-enable-generic-projects):
+       Get monotone root right.
+
+2015-10-27  Michael Albinus  <address@hidden>
+
+       Fall back to polling in autorevert when needed
+
+       * lisp/autorevert.el (auto-revert-notify-handler): When a
+       `stopped' event arrives from file notification, fall back to polling.
+
+       * test/automated/file-notify-tests.el
+       (file-notify-test03-autorevert): Extend test for polling when file
+       notification ceases to work.
+
+2015-10-27  Dmitry Gutov  <address@hidden>
+
+       Show full commit messages in 'hg log' when appropriate
+
+       * lisp/vc/vc-hg.el (vc-hg-log-format): New variable.
+       (vc-hg-print-log, vc-hg-expanded-log-entry): Use it.
+       (http://lists.gnu.org/archive/html/emacs-devel/2015-10/msg02191.html)
+
+2015-10-27  Nicolas Petton  <address@hidden>
+
+       Use a plain SVG file for the icon
+
+       * etc/images/icons/hicolor/scalable/apps/emacs.svg: Use a plain SVG
+         format instead of the Inkscape SVG format.
+
+2015-10-27  Michael Albinus  <address@hidden>
+
+       Fix subtle bug in auto-revert-tests.el
+
+       * test/automated/auto-revert-tests.el
+       (auto-revert-test02-auto-revert-mode-dired): Narrow *Messages*
+       buffer where it belongs to.  (Bug#21668)
+
+2015-10-26  Nicolas Petton  <address@hidden>
+
+       * lisp/emacs-lisp/map.el: Better docstrings.
+
+       * lisp/emacs-lisp/seq.el: Better docstrings.
+
+       * lisp/emacs-lisp/seq.el: Rename all seq arguments to sequence.
+
+2015-10-26  Phillip Lord  <address@hidden>
+
+       * lisp/emacs-lisp/ert.el: Print results without newline escaping.
+
+2015-10-26  Stephen Leake  <address@hidden>
+
+       Clarify that load-path contents should be directory file names
+
+       * doc/lispref/files.texi (Directory Names): Define and use "directory
+       file name".  Recommend `expand-file-name'.
+
+       * src/lread.c (load-path): Fix doc string; elements are directory file
+       names.
+
+2015-10-26  Eli Zaretskii  <address@hidden>
+
+       Fix simple-test.el test
+
+       * test/automated/simple-test.el (simple-test--dummy-buffer):
+       Make sure indentation doesn't use TABs, otherwise the 6th test
+       might fail.
+
+2015-10-26  Mark Oteiza  <address@hidden>
+
+       * lisp/net/eww.el (eww-bookmark-prepare): Use truncate-string-to-width.
+       `substring' does not account for full width characters.
+
+2015-10-26  Michael Albinus  <address@hidden>
+
+       Further work on `stopped' events in filenotify.el
+
+       * doc/lispref/os.texi (File Notifications): Rework examples.
+
+       * lisp/filenotify.el (file-notify--rm-descriptor): Optional parameter.
+       (file-notify--rm-descriptor, file-notify-callback): Improve check
+       for sending `stopped' event.
+       (file-notify-add-watch): Check for more events for `inotify'.
+
+       * test/automated/file-notify-tests.el
+       (file-notify--test-expected-events): New defvar.
+       (file-notify--test-with-events): Use it.
+       (file-notify--test-cleanup): Make it more robust when deleting
+       directories.
+       (file-notify--test-event-test): Check also for watched directories.
+       (file-notify--test-event-handler): Suppress temporary .#files.
+       (file-notify-test02-events, file-notify-test04-file-validity):
+       Rework `stopped' events.
+       (file-notify-test05-dir-validity): Wait for events when appropriate.
+
+2015-10-26  Artur Malabarba  <address@hidden>
+
+       * src/keyboard.c (post-command-hook): Shorten docstring.
+
+2015-10-26  Tassilo Horn  <address@hidden>
+
+       Fix infinite loop in sh-script's SMIE code
+
+       * lisp/progmodes/sh-script.el (sh-smie-sh-forward-token): Fix infinite
+       loop (bug#21747).
+
+2015-10-25  Artur Malabarba  <address@hidden>
+
+       * lisp/isearch.el (search-default-regexp-mode): Revert to nil.
+       Character-fold search _still_ doesn't play well with
+       lax-whitespace.  So disable it by default (again) for now.
+
+2015-10-25  Artur Malabarba  <address@hidden>
+
+       * lisp/isearch.el: No visual feedback for default search mode.
+       During an isearch where character-folding is the default, we don't
+       want to take up minibuffer space just to tell the user that
+       "Char-fold " is on.  The same goes for other modes, if the user
+       changes the default.  In contrast, if the user toggles OFF the
+       default mode, they should see "Literal", to distinguish it from
+       the default mode.
+       (isearch--describe-regexp-mode): Return "" if describing the
+       default mode, and return "literal " if describing a plain search
+       and it is not default.
+
+2015-10-25  Artur Malabarba  <address@hidden>
+
+       * test/automated/simple-test.el: New file.
+       Define tests for `newline' and `open-line'.
+
+2015-10-25  Artur Malabarba  <address@hidden>
+
+       * lisp/simple.el (open-line): Integrate with electric-indent-mode.
+       Also run `post-self-insert-hook' when called interactively.
+
+2015-10-25  Artur Malabarba  <address@hidden>
+
+       * lisp/simple.el (open-line): Fix docstring.
+       Also explain apparently redundant line.
+
+2015-10-25  Thomas Fitzsimmons  <address@hidden>
+           Alexandru Harsanyi  <address@hidden>
+
+       Sync with soap-client repository, version 3.0.1
+
+       * lisp/net/soap-client.el, lisp/net/soap-inspect.el:
+       Bump version to 3.0.1.
+
+       * lisp/net/soap-client.el, lisp/net/soap-inspect.el: Update home page.
+
+2015-10-25  Eli Zaretskii  <address@hidden>
+
+       * lisp/progmodes/grep.el (grep): Doc fix.  (Bug#21754)
+
+2015-10-25  Artur Malabarba  <address@hidden>
+
+       * src/keyboard.c (post-command-hook): Extend the docstring.
+       Mainly, explain how to use it without hanging Emacs, or giving the
+       impression that it is hanging.  Also mention `pre-command-hook'.
+       (pre-command-hook): Mention `post-command-hook'.
+
+2015-10-25  Artur Malabarba  <address@hidden>
+
+       * lisp/custom.el (custom-declare-variable): Shorten code again.
+       Without using pcase this time.  We can't use pcase because it is
+       loaded after custom in loadup.el.  Also add a comment explaining
+       this to future dummies like me.
+
+2015-10-25  Michael Albinus  <address@hidden>
+
+       * doc/lispref/os.texi (File Notifications): Document `stopped event'.
+
+2015-10-25  Michael Albinus  <address@hidden>
+
+       Introduce `stopped' event in file notification
+
+       * lisp/filenotify.el (file-notify--rm-descriptor): New defun.
+       (file-notify-rm-watch): Use it.
+       (file-notify-callback): Implement `stopped' event.
+       (file-notify-add-watch): Mention `stopped' in the docstring.
+       Check, that upper directory exists.
+
+       * test/automated/file-notify-tests.el (file-notify-test01-add-watch):
+       Add two test cases.
+       (file-notify-test02-events): Handle also `stopped' event.
+       (file-notify-test04-file-validity): Add another test case.
+
 2015-10-25  Paul Eggert  <address@hidden>
 
        Revert commit that broke 'make bootstrap'
@@ -119,8 +1216,8 @@
 
        Update frame title when scrolling the selected window
 
-       * src/window.c (wset_update_mode_line): New function, sets either the
-       window's update_mode_line flag or the global update_mode_lines
+       * src/window.c (wset_update_mode_line): New function, sets either
+       the window's update_mode_line flag or the global update_mode_lines
        variable.
        (Fset_window_start, set_window_buffer, window_scroll_pixel_based)
        (window_scroll_line_based): Call it instead of only setting the
@@ -132,14 +1229,408 @@
 
        * src/window.c (set_window_buffer): If the window is the frame's
        selected window, set update_mode_lines, not the window's
-       update_mode_line flag.  (Bug#21739)
+       update_mode_line flag.
        * src/buffer.c (Fkill_buffer): Undo last change.
        (set_update_modelines_for_buf): Function deleted.
 
 2015-10-24  Thomas Fitzsimmons  <address@hidden>
+           Alexandru Harsanyi  <address@hidden>
 
        Sync with soap-client repository, version 3.0.0
 
+       * lisp/net/soap-client.el, lisp/net/soap-inspect.el:
+       Bump version to 3.0.0.
+
+       * lisp/net/soap-inspect.el: Merge in changes from Emacs master branch.
+
+       * lisp/net/soap-client.el: Merge in changes from Emacs master branch.
+
+       * lisp/net/soap-inspect.el: Shorten first line description.
+
+       * lisp/net/soap-client.el: Make a small whitespace fix.
+
+       * lisp/net/soap-inspect.el: Update copyright years.
+
+       * lisp/net/soap-client.el (soap-encoded-namespaces): Move above
+       first use in soap-encode-xs-element.
+
+       * lisp/net/soap-client.el (soap-type-is-array?): new defun
+       (soap-encode-xs-element): handle array elements in this function
+       (soap-encode-xs-complex-type): flag error if asked to encode an
+       array type, this is handled in `soap-encode-xs-element'
+
+       * lisp/net/soap-inspect.el (soap-inspect-xs-attribute-group):
+       Do not print type for attribute group.
+
+       * lisp/net/soap-inspect.el (soap-sample-value-for-xs-attribute-group)
+       New function.
+       (soap-inspect-xs-attribute-group): Likewise.
+
+       * lisp/net/soap-inspect.el
+       (soap-resolve-references-for-xs-attribute-group): Resolve
+       references of attributes in an attribute group.
+
+       * lisp/net/soap-client.el (soap-decode-xs-attributes): Process attribute
+       type directly, not through soap-wsdl-get.
+
+       * lisp/net/soap-client.el (soap-xs-parse-attribute): Leave reference
+       nil if reference attribute is nil.
+
+       * lisp/net/soap-client.el (soap-resolve-references-for-xs-attribute):
+       Convert XML schema attributes to xsd:string.
+
+       * lisp/net/soap-inspect.el (soap-sample-value-for-xs-attribute):
+       New function.
+       (soap-sample-value-for-xs-simple-type): Prepend attributes to result.
+       (soap-sample-value-for-xs-complex-type): Likewise.
+       (soap-inspect-xs-attribute): New function.
+       (soap-inspect-xs-simple-type): Print attributes.
+       (soap-inspect-xs-complex-type): Likewise.
+
+       * lisp/net/soap-inspect.el (soap-resolve-references-for-xs-simple-type):
+       Resolve references for attributes.
+       (soap-resolve-references-for-xs-complex-type): Likewise.
+
+       * lisp/net/soap-client.el (soap-xml-node-find-matching-child):
+       Rename from soap-xml-node-first-child.
+       (soap-xs-parse-attribute): Call soap-xml-node-find-matching-child.
+       (soap-xs-parse-simple-type): Likewise.
+
+       * lisp/net/soap-client.el (soap-invoke-async): Add error checking.
+
+       * lisp/net/soap-client.el (soap-invoke-internal): New function.
+       (soap-invoke-async): Call soap-invoke-internal.
+       (soap-invoke): Likewise.
+
+       * lisp/net/soap-client.el (soap-invoke-async): Ensure buffer passed to
+       url-retrieve callback is killed.
+
+       * lisp/net/soap-client.el (soap-parse-wsdl-phase-validate-node):
+       Rename function.
+       (soap-parse-wsdl-phase-fetch-imports): Likewise.
+       (soap-parse-wsdl-phase-parse-schema): Likewise.
+       (soap-parse-wsdl-phase-fetch-schema): Likewise.
+       (soap-parse-wsdl-phase-finish-parsing): Likewise.
+       (soap-parse-wsdl): Update calls.
+
+       * lisp/net/soap-client.el (soap-invoke-async): Fix callback invocation.
+
+       * lisp/net/soap-client.el (soap-invoke-async): New function.
+       (soap-invoke): Reimplement using soap-invoke-async.
+
+       * lisp/net/soap-client.el (soap-parse-server-response):
+       Improve docstring.
+       (soap-invoke): Inline call to soap-parse-server-response.
+
+       * lisp/net/soap-client.el (soap-decode-xs-complex-type):
+       Prevent incorrect warning.
+
+       * lisp/net/soap-client.el (soap-parse-server-response):
+       Rename soap-process-url-response.  Destroy the mime part.
+       (soap-invoke): Call soap-parse-server-response.
+
+       * lisp/net/soap-client.el: Update copyright date.
+
+       * lisp/net/soap-client.el: Fix checkdoc issues.
+
+       * lisp/net/soap-client.el: Fix indentation and long lines.
+
+       * lisp/net/soap-client.el (soap-time-format): Remove variable.
+       (soap-encode-xs-basic-type): Simplify date-time format detection.
+       (soap-decode-xs-basic-type): Remove soap-time-format support.
+
+       * lisp/net/soap-client.el (soap-process-url-response): New function.
+       (soap-fetch-xml-from-url): Call soap-process-url-response.
+       (soap-parse-wsdl-phase-1): New function.
+       (soap-parse-wsdl-phase-2): Likewise.
+       (soap-parse-wsdl-phase-3): Likewise.
+       (soap-parse-wsdl-phase-4): Likewise.
+       (soap-parse-wsdl-phase-5): Likewise.
+       (soap-parse-wsdl): Call phase functions.
+
+       * lisp/net/soap-client.el (soap-decode-xs-basic-type):
+       Remove one-argument and call.
+
+       * lisp/net/soap-client.el (soap-decode-date-time): Improve docstring.
+
+       * lisp/net/soap-client.el (soap-xmlschema-imports): Remove variable.
+       (soap-parse-schema): Add wsdl argument.  Look up XML schema
+       imports from wsdl.
+       (soap-load-wsdl): Do not set soap-xmlschema-imports.
+       (soap-parse-wsdl): Get XML schema imports from wsdl.
+
+       * lisp/net/soap-client.el (soap-current-file): Remove variable.
+       (soap-wsdl): Add current-file slot.
+       (soap-fetch-xml-from-url): Add wsdl argument.  Look up current
+       file from wsdl.
+       (soap-fetch-xml-from-file): Likewise.
+       (soap-fetch-xml): Likewise.
+       (soap-load-wsdl): Always create wsdl object first.
+       (soap-parse-wsdl): Pass wsdl to soap-fetch-xml.
+
+       * lisp/net/soap-client.el (soap-xs-element): Add is-group slot.
+       (soap-xs-parse-element): Set is-group slot.
+       (soap-resolve-references-for-xs-element): Skip is-group elements.
+       (soap-xs-complex-type): Add is-group slot.
+       (soap-xs-parse-complex-type): Set is-group slot.
+       (soap-xs-parse-sequence): Parse xsd:group elements.
+       (soap-resolve-references-for-xs-complex-type): Inline elements
+       from referenced xsd:group nodes.
+       (soap-parse-schema): Parse xsd:group nodes.
+
+       * lisp/net/soap-client.el (soap-invoke):
+       Don't set url-http-version to 1.0.
+
+       * lisp/net/soap-client.el (soap-decode-xs-complex-type):
+       Allow choice nodes to accept multiple values.
+
+       * lisp/net/soap-client.el (soap-encode-body): Check parameters argument
+       for extra header values.
+
+       * lisp/net/soap-client.el (soap-well-known-xmlns):
+       Add wsa and wsaw tags.
+       (soap-operation): Add input-action and output-action slots.
+       (soap-parse-operation): Parse wsaw:Action nodes.
+       (soap-encode-body): Encode service-url for WS-Addressing.
+       (soap-create-envelope): Likewise.
+       (soap-invoke): Update soap-create-envelope call to provide
+       service-url argument.
+
+       * lisp/net/soap-client.el (soap-decode-xs-complex-type):
+       Support xsi:type override attribute.
+       (soap-decode-array): Likewise.
+
+       * lisp/net/soap-client.el (soap-parse-schema):
+       Handle location attribute.
+
+       * lisp/net/soap-client.el (soap-decode-type): Check that multiRef
+       matched validation regexp.
+
+       * lisp/net/soap-client.el (soap-encode-xs-simple-type):
+       Encode xsd:list nodes.
+       (soap-decode-xs-simple-type): Decode xsd:list nodes.
+
+       * lisp/net/soap-client.el (soap-get-candidate-elements):
+       Fix reference handling.
+
+       * lisp/net/soap-client.el (soap-xs-simple-type): Add is-list slot.
+       (soap-xs-parse-simple-type): Call soap-xs-add-list for xsd:list nodes.
+       (soap-xs-add-list): New function.
+
+       * lisp/net/soap-client.el (soap-encode-xs-element): When a boolean is
+       expected, interpret nil as "false".
+
+       * lisp/net/soap-client.el (soap-make-xs-basic-types): Add gYearMonth,
+       gYear, gMonthDay, gDay and gMonth.
+
+       * lisp/net/soap-client.el (soap-time-format): New variable.
+       (soap-encode-xs-basic-type): Handle dateTime, time, date,
+       gYearMonth, gYear, gMonthDay, gDay and gMonth.
+       (soap-decode-date-time): New function.
+       (soap-decode-xs-basic-type): Use soap-decode-date-time.
+
+       * lisp/net/soap-client.el (soap-encode-xs-basic-type): Validate value
+       after encoding.
+       (soap-decode-xs-basic-type): Validate value before decoding.
+
+       * lisp/net/soap-client.el (soap-validate-xs-basic-type): New function.
+       (soap-validate-xs-simple-type): Call soap-validate-xs-basic-type.
+
+       * lisp/net/soap-client.el (soap-xs-add-union): Append result to base
+       instead of overwriting it.
+       (soap-validate-xs-simple-type): Add union support.
+
+       * lisp/net/soap-client.el (soap-xs-add-restriction): Translate pattern
+       to Emacs regexp using xsdre-translate.
+       (soap-validate-xs-simple-type): Validate value against pattern.
+
+       * lisp/net/soap-client.el (soap-xs-add-union): Preserve WSDL order of
+       inline simpleType nodes.
+       (soap-decode-type): Handle union types.
+
+       * lisp/net/soap-client.el (soap-decode-xs-attributes): Decode basic-type
+       attributes.
+
+       * lisp/net/soap-client.el (soap-get-xs-attributes-from-groups): Rename
+       from soap-xs-attribute-group-consolidate, all callers updated
+       (soap-get-xs-attributes): Rename from
+       soap-xs-attributes-consolidate, all callers updated
+
+       * lisp/net/soap-client.el (soap-xs-type): Add attribute-group slot.
+       (soap-xs-attribute-group): New type.
+       (soap-xs-parse-attribute-group): New function.
+       (soap-resolve-references-for-xs-attribute-group): Likewise.
+       (soap-xs-add-extension): Handle attribute groups.
+       (soap-resolve-references-for-xs-simple-type): Likewise.
+       (soap-xs-parse-complex-type): Likewise.
+       (soap-xs-parse-extension-or-restriction): Likewise.
+       (soap-resolve-references-for-xs-complex-type): Likewise.
+       (soap-xs-attribute-group-consolidate): New function.
+       (soap-xs-attributes-consolidate): Handle attribute groups.
+       (soap-parse-schema): Likewise.
+
+       * lisp/net/soap-client.el (soap-encode-xs-basic-type):
+       Fix boolean encoding.
+
+       * lisp/net/soap-client.el (soap-encode-xs-complex-type): Print ref
+       element names in warnings.
+
+       * lisp/net/soap-client.el (soap-decode-xs-complex-type): Fix splicing.
+
+       * lisp/net/soap-client.el (soap-decode-xs-complex-type):
+       Eliminate invalid warnings for choice types.
+
+       * lisp/net/soap-client.el (soap-encode-xs-complex-type-attributes):
+       Also encode base type attributes.
+
+       * lisp/net/soap-client.el (soap-encode-xs-complex-type): Fix compilation
+       warning.  Print e-name in warnings, or element if e-name is nil.
+
+       * lisp/net/soap-client.el (soap-xs-element): Add alternatives slot.
+       (soap-xs-parse-element): Set substitution-group.
+       (soap-resolve-references-for-xs-element): Populate alternatives slot.
+       (soap-get-candidate-elements): New function.
+       (soap-encode-xs-complex-type): Iterate through all candidate elements.
+       Handle types with nil type indicator.  Fix warning logic.
+
+       * lisp/net/soap-client.el (soap-current-wsdl): Move declaration
+       earlier in the file to prevent compiler warning.
+
+       * lisp/net/soap-client.el (soap-node-optional): New function.
+       (soap-node-multiple): Likewise.
+       (soap-xs-parse-element): Call soap-node-optional and
+       soap-node-multiple.
+       (soap-xs-complex-type): Add optional? and multiple? slots.
+       (soap-xml-get-children-fq): New function.
+       (soap-xs-element-get-fq-name): Likewise.
+       (soap-xs-complex-type-optional-p): Likewise.
+       (soap-xs-complex-type-multiple-p): Likewise.
+       (soap-xs-attributes-consolidate): Likewise.
+       (soap-decode-xs-attributes): Likewise.
+       (soap-decode-xs-complex-type): Decode types with nil type indicator.
+       Support children that use local namespaces.  Decode attributes.
+       Add type considerations to optional? and multiple? warnings.
+
+       * lisp/net/soap-client.el (soap-xs-parse-extension-or-restriction):
+       Store parsed attributes.
+       (soap-encode-xs-complex-type-attributes): Encode custom attributes.
+
+       * lisp/net/soap-client.el (soap-encode-xs-complex-type-attributes):
+       Don't add the xsi:type attribute (Exchange refuses requests which have
+       this attribute).
+
+       * lisp/net/soap-client.el, soap-inspect.el: Convert to lexical binding,
+       correct compiler warnings about unused function arguments and
+       local variables.
+
+       * lisp/net/soap-client.el (soap-decode-xs-complex-type): Handle nil
+       type indicator.
+       (soap-parse-envelope): Handle response headers.
+       (soap-parse-response): Likewise.  Only return non-nil decoded values.
+
+       * lisp/net/soap-client.el (soap-validate-xs-simple-type):
+       Return validated value.
+
+       * lisp/net/soap-client.el (soap-xs-parse-element)
+       (soap-xs-parse-simple-type)
+       (soap-xs-parse-complex-type)
+       (soap-parse-message)
+       (soap-parse-operation): Add the current namespace to the element
+       being created.
+       (soap-resolve-references-for-xs-element)
+       (soap-resolve-references-for-xs-simple-type)
+       (soap-resolve-references-for-xs-complex-type)
+       (soap-resolve-references-for-operation): Resolve the namespace to
+       the namespace tag.
+       (soap-make-wsdl): specify a namespace tag when creating the xsd
+       and soapenc namespaces
+       (soap-wsdl-resolve-references): don't update namespace tags in
+       elements here
+       (soap-parse-port-type): bind the urn: to soap-target-xmlns
+       (soap-encode-body): don't add nil namespace tags to
+       soap-encoded-namespaces
+
+       * lisp/net/soap-inspect.el: Use `soap-make-wsdl` to construct the object
+       for registering the soap-inspect method.  Make debbugs tests pass.
+       * lisp/net/soap-client.el (soap-decode-any-type): Use soap-l2fq on the
+       type name, also skip string only nodes when decoding a structure.
+       (soap-xs-parse-complex-type): (BUG) Dispatch parsing for choice
+       types too.
+       (soap-encode-body): Grab the header value from the param table.
+
+       * lisp/net/soap-client.el (soap-should-encode-value-for-xs-element):
+       New function.
+       (soap-encode-xs-element): Don't encode nil value unless needed.
+
+       * lisp/net/soap-client.el (soap-bound-operation): New slot `soap-body`.
+       (soap-parse-binding): Parse the message parts required in the body.
+       (soap-encode-body): Encode only the parts that are declared to be
+       part of the body.
+
+       * lisp/net/soap-client.el (soap-encode-xs-element): use the fq name
+       when writing out the tag.
+       (soap-encode-body): Remove hack that inserts the xmlns in the
+       element attributes list.
+
+       * lisp/net/soap-client.el (soap-xs-attribute): Add "default" slot.
+       (soap-xs-parse-attribute): Default slot is set from the XML
+       "fixed" attribute.
+       (soap-encode-xs-complex-type-attributes): Encode any attributes
+       that have a default value.  Also, don't put the xsi:nil attribute
+       when the complex type has no content anyway.
+
+       * lisp/net/soap-client.el (soap-well-known-xmlns):
+       Add the xml namespace.
+       (soap-local-xmlns): Start with the xml namespace.
+       (soap-xml-node-first-child): Skip xsd:annotation nodes too.
+       (soap-make-xs-basic-types): More xsd types added.
+       (soap-encode-xs-basic-type, soap-decode-xs-basic-type):
+       Handle "language", "time", "date", "nonNegativeInteger".
+       (soap-resolve-references-for-xs-element): Don't signal an error if
+       the element does not have a type.
+       (soap-xs-parse-simple-type): Subtypes are handled with ecase,
+       added stum for xsd:list.
+       (soap-xs-add-union): Call soap-l2fq on all union members.
+       (soap-xs-add-extension): Call soap-l2fq on the base member.
+       (soap-resolve-references-for-xs-simple-type): Don't signal an
+       error if the simple type has no base.
+       (soap-resolve-references-for-xs-simple-type): Bugfix, call
+       soap-wsdl-get on each type of the base.
+
+       * lisp/net/soap-client.el (soap-resolve-references-for-xs-attribute):
+       Referenced type can be eiher a simple type or a basic type.
+       (soap-xs-add-restriction)
+       (soap-xs-parse-extension-or-restriction): Use `soap-l2fq' on base.
+       (soap-make-xs-basic-types)
+       (soap-encode-xs-basic-type, soap-decode-xs-basic-type):
+       Add support for more XMLSchema basic types.
+       (soap-current-file, soap-xmlschema-imports): New defvars.
+       (soap-parse-schema): Add locations from xsd:import tags to
+       `soap-xmlschema-imports'.
+       (soap-wsdl): Make destructor private.
+       (soap-make-wsdl): New defun, SOAP-WSDL object constructor.
+       (soap-wsdl-add-alias): Check if we try to replace aliases.
+       (soap-fetch-xml-from-url, soap-fetch-xml-from-file)
+       (soap-fetch-xml): New defuns.
+       (soap-load-wsdl): Update to load the WSDL from either a file or
+       an url.
+       (soap-load-wsdl-from-url): Now an alias to `soap-load-wsdl'.
+       (soap-parse-wsdl): Process wsdl:import tags and imports from
+       `soap-xmlschema-imports'.
+       * lisp/net/soap-client.el (soap-l2wk): Bugfix: call symbolp instead of
+       symbol-name.
+       (soap-l2fq): Make the name part always a string.
+       (soap-name-p): New defun, used for name tests.
+
+       * lisp/net/soap-inspect.el (soap-sample-value-for-xs-complex-type):
+       Supply sample values for choice types with a special tag.
+       * lisp/net/soap-client.el (soap-encode-xs-complex-type):
+       Handle anonymous elements correctly.
+       (soap-encode-value): Accept nodes that have no namespace tag.
+
+       * lisp/net/soap-client.el (soap-invoke): Encode the string for
+       `url-request-data' as UTF-8.  Fixes issue 16.
+
 2015-10-24  Nicolas Petton  <address@hidden>
 
        Update the new icon
@@ -221,7 +1712,7 @@
 
 2015-10-23  Michael Albinus  <address@hidden>
 
-       Fix Bug#21669
+       Fix bug#21669
 
        * lisp/filenotify.el (file-notify-rm-watch): Improve check for
        calling low-level functions.
@@ -865,7 +2356,7 @@
 
 2015-10-17  Mark Oteiza  <address@hidden>
 
-       * lisp/emacs-lisp/eldoc.el: Add back-to-indentation to the command list
+       * lisp/emacs-lisp/eldoc.el: Add back-to-indentation to the command list.
 
 2015-10-17  Eli Zaretskii  <address@hidden>
 
@@ -895,8 +2386,8 @@
 
 2015-10-16  Artur Malabarba  <address@hidden>
 
-       * emacs-lisp/package.el: Reload archive-contents if priorities change
-
+       * lisp/emacs-lisp/package.el: Reload archive-contents if
+       priorities change.
        (package--old-archive-priorities): New variable.
        (package-read-all-archive-contents, package-menu--refresh): Use it
        to decide when the `package-archive-contents' needs to be read
@@ -945,7 +2436,7 @@
 
 2015-10-16  Artur Malabarba  <address@hidden>
 
-       * custom.el (custom-theme-load-path): Demote to defvar
+       * lisp/custom.el (custom-theme-load-path): Demote to defvar.
 
        `custom-theme-load-path' was a defcustom, but it shouldn't be for the
        same reason that `load-path' shouldn't.  Setting it via the customize
@@ -965,8 +2456,7 @@
 
 2015-10-16  Stefan Monnier  <address@hidden>
 
-       * lisp/mpc.el: Rename the new toggling commands
-
+       * lisp/mpc.el: Rename the new toggling commands.
        (mpc-toggle-consume, mpc-toggle-repeat, mpc-toggle-single)
        (mpc-toggle-shuffle): Add "-toggle" in the name.
 
@@ -981,7 +2471,7 @@
 
 2015-10-16  Oleh Krehel  <address@hidden>
 
-       lisp/dired-aux.el (dired-shell-command): Fix compile warning
+       * lisp/dired-aux.el (dired-shell-command): Fix compile warning.
 
 2015-10-16  Oleh Krehel  <address@hidden>
 
@@ -989,18 +2479,18 @@
 
        * lisp/dired-aux.el (dired-check-process): Transform the top-level
          comment into a docstring.
-       (dired-shell-command): New command. This mirrors
+       (dired-shell-command): New command.  This mirrors
        `dired-check-process', but is more user-friendly for passing
        arguments.
        (dired-compress-file-suffixes): Allow to specify the command switches
        along with input (%i) and output (%o) inside the PROGRAM part.
        Add an entry for *.zip files, and update the entry for *.tar.gz files
-       to the new style. Update the docstring.
+       to the new style.  Update the docstring.
        (dired-compress-file): When PROGRAM matches %i or %o, use the new
        logic.
        (dired-update-file-line): Avoid an error when at end of buffer.
 
-       Fixes Bug#21637
+       Fixes bug#21637.
 
 2015-10-16  Eli Zaretskii  <address@hidden>
 
@@ -1098,8 +2588,6 @@
 
 2015-10-14  Warren Lynn  <address@hidden>  (tiny change)
 
-       Fix Bug#21562
-
        * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band):
        Quote argument in proper order.  (Bug#21562)
 
@@ -1197,7 +2685,7 @@
 
        Derive mpc-mode from special-mode
 
-       lisp/mpc.el (mpc-mode-map): Make from sparse keymap. Unbind g.
+       lisp/mpc.el (mpc-mode-map): Make from sparse keymap.  Unbind g.
        (mpc-mode): Derive from special mode.
        (mpc-songs-mode-map): Don't set parent keymap.
 
@@ -1206,8 +2694,8 @@
        Fix error messages for when covers are not found.
 
        The last change to mpc-format let the binding to file call
-       mpc-file-local-copy with nil argument. Instead, employ if-let here so
-       nil bindings don't result in needless computation and errors.
+       mpc-file-local-copy with nil argument.  Instead, employ if-let here
+       so nil bindings don't result in needless computation and errors.
        * lisp/mpc.el: Require 'subr-x at compile time.
        * lisp/mpc.el (mpc-format): Use if-let.
 
@@ -1341,7 +2829,6 @@
 2015-10-13  Michael Albinus  <address@hidden>
 
        * test/automated/file-notify-tests.el (file-notify--test-timeout):
-
        Add docstring.  Increase to 10 seconds for remote
        directories.  (Bug#21669)
 
@@ -1362,7 +2849,7 @@
 
 2015-10-12  Mark Oteiza  <address@hidden>
 
-       Use highlight for current items.
+       Use highlight for current items
 
        * lisp/mpc.el (mpc-select-make-overlay, mpc-tagbrowser-all-select):
        Apply highlight face instead of region face.
@@ -1414,10 +2901,8 @@
 
 2015-10-12  Mike FABIAN  <address@hidden>
 
-       In gui-get-primary-selection use gui--selection-value-internal 
(Bug#20906)
-
-       * lisp/select.el (gui-get-primary-selection): In 
gui-get-primary-selection
-       use gui--selection-value-internal (Bug#20906)
+       * lisp/select.el (gui-get-primary-selection): In
+       gui-get-primary-selection use gui--selection-value-internal (Bug#20906)
 
 2015-10-12  Tassilo Horn  <address@hidden>
 
@@ -1427,14 +2912,14 @@
 
 2015-10-12  Juanma Barranquero  <address@hidden>
 
-       * w32fns.c (get_wm_chars): Increment counter, not pointer.
+       * src/w32fns.c (get_wm_chars): Increment counter, not pointer.
 
 2015-10-11  Nicolas Petton  <address@hidden>
 
        Replace the usage of an obsolete function in auth-source.el
 
-       * lisp/gnus/auth-source.el (auth-source-epa-make-gpg-token): Replace an
-         usage of `epg-context-set-armor' with `setf'.
+       * lisp/gnus/auth-source.el (auth-source-epa-make-gpg-token):
+       Replace an usage of `epg-context-set-armor' with `setf'.
 
 2015-10-11  Nicolas Petton  <address@hidden>
 
@@ -1449,7 +2934,7 @@
 
 2015-10-11  Ken Raeburn  <address@hidden>
 
-       Handle an opaque-move X11 window manager operation more efficiently.
+       Handle an opaque-move X11 window manager operation more efficiently
 
        * src/xterm.c (handle_one_xevent): If a ConfigureNotify event is
        followed by more ConfigureNotify events for the same window, process
@@ -1457,7 +2942,7 @@
 
 2015-10-11  Ken Raeburn  <address@hidden>
 
-       Fix cursor setting for tip frame; re-enable cursor generation.
+       Fix cursor setting for tip frame; re-enable cursor generation
 
        * src/xfns.c (x_create_tip_frame): Include the cursor in the window
        attributes sent when creating the new X window.  Don't skip setting
@@ -1465,7 +2950,7 @@
 
 2015-10-11  Ken Raeburn  <address@hidden>
 
-       Rewrite x_set_mouse_color to sync less.
+       Rewrite x_set_mouse_color to sync less
 
        We can track serial numbers of X requests and correlate error events
        with the associated requests.  This way we can identify errors for
@@ -1482,7 +2967,7 @@
 
 2015-10-11  Ken Raeburn  <address@hidden>
 
-       Add x_catch_errors_with_handler.
+       Add x_catch_errors_with_handler
 
        * src/xterm.c (struct x_error_message_stack): Add new fields for a
        callback function and associated data pointer.
@@ -1496,7 +2981,7 @@
 
 2015-10-11  Ken Raeburn  <address@hidden>
 
-       Introduce x_uncatch_errors_after_check to reduce XSync calls.
+       Introduce x_uncatch_errors_after_check to reduce XSync calls
 
        Both x_had_errors_p and x_check_errors call XSync, so if they're
        immediately followed by x_uncatch_errors, its XSync call will be
@@ -1513,7 +2998,7 @@
 
 2015-10-10  Jay Belanger  <address@hidden>
 
-       Document the optional prefix to `calc-yank'.
+       Document the optional prefix to `calc-yank'
 
        * doc/misc/calc.texi (Yanking into the Stack): Document the optional
        prefix to `calc-yank'.
@@ -1644,7 +3129,8 @@
        names in `oref'.
 
        * lisp/cedet/ede/linux.el: Silence some compiler warnings.
-       (ede-linux-load, ede-project-autoload): Avoid the old-style "name" 
argument.
+       (ede-linux-load, ede-project-autoload): Avoid the old-style
+       "name" argument.
        (ede-linux-find-matching-target): Use field names rather than initarg
        names in `oref'.
 
@@ -1654,9 +3140,8 @@
 
 2015-10-09  Stefan Monnier  <address@hidden>
 
-       * lisp/progmodes/prolog.el: Avoid indenting too much, after ":-"
-
-       (prolog-smie-rules): Try and avoid indenting too far after ":-".
+       * lisp/progmodes/prolog.el (prolog-smie-rules): Try and avoid
+       indenting too far after ":-".
 
 2015-10-09  Eli Zaretskii  <address@hidden>
 
@@ -1669,8 +3154,6 @@
 
 2015-10-09  Martin Rudalics  <address@hidden>
 
-       In adjust_frame_size don't count minibuffer height twice (Bug#21643)
-
        * src/frame.c (adjust_frame_size): In minibuffer-only windows
        don't count minibuffer height twice.  (Bug#21643)
 
@@ -1686,20 +3169,19 @@
 
        Refactor duplicated code; ensure default is in completions
 
-       * lisp/textmodes/reftex-cite.el (reftex--query-search-regexps): New 
function.
+       * lisp/textmodes/reftex-cite.el (reftex--query-search-regexps):
+       New function.
        (reftex-extract-bib-entries): Use it.
        (reftex-extract-bib-entries-from-thebibliography): Use it.
 
 2015-10-09  Vincent Belaïche  <address@hidden>
 
-       Typo in example
-
-       * autotype.texi (Skeletons as Abbrevs): "if" -> "ifst" in the example.
+       * doc/misc/autotype.texi (Skeletons as Abbrevs): "if" -> "ifst"
+       in the example.
 
 2015-10-08  Stefan Monnier  <address@hidden>
 
-       * lisp/calc/calc.el: Silence byte-compiler warnings
-
+       * lisp/calc/calc.el: Silence byte-compiler warnings.
        (calc-scan-for-dels): Use ignore-errors.
        (calc-dispatch, calc-do-dispatch): Make unused arg optional.
        (calc-read-key-sequence): Remove unused var `prompt2'.
@@ -1740,7 +3222,7 @@
 
 2015-10-08  Jay Belanger  <address@hidden>
 
-       Format initial input uniformly.
+       Format initial input uniformly
 
        * lisp/calc/calc.el (calc-digit-start-entry): New function.
        * lisp/calc/calc.el (calcDigit-start):
@@ -1749,7 +3231,7 @@
 
 2015-10-08  Ken Raeburn  <address@hidden>
 
-       Disable non-working pointerColor setting for X tooltip frame.
+       Disable non-working pointerColor setting for X tooltip frame
 
        It generates a bunch of server traffic, but there's some bug wherein
        the new mouse cursor settings don't seem to get used.  In most
@@ -1760,7 +3242,7 @@
 
 2015-10-08  Ken Raeburn  <address@hidden>
 
-       Reduce some unnecessary X calls.
+       Reduce some unnecessary X calls
 
        * src/xfns.c (x_real_pos_and_offsets): Remove a redundant XGetGeometry
        call.  If border width is wanted, get it from the XGetGeometry call
@@ -1771,7 +3253,7 @@
 
 2015-10-08  Ken Raeburn  <address@hidden>
 
-       Reduce color allocation/query traffic in the TrueColor case.
+       Reduce color allocation/query traffic in the TrueColor case
 
        When working with an X visual with TrueColor class, pixel values can
        be generated from the RGB values according to mask value provided by
@@ -1797,7 +3279,7 @@
 
 2015-10-08  Ken Raeburn  <address@hidden>
 
-       Cache XParseColor results in the X display info structure.
+       Cache XParseColor results in the X display info structure
 
        With repeated lookups of foreground and background colors for multiple
        faces per frame, we issue a lot of redundant color name lookups to the
@@ -1818,7 +3300,7 @@
 
 2015-10-07  Stefan Monnier  <address@hidden>
 
-       * src/syntax.c (syms_of_syntax): Make syntax-propertize--done local
+       * src/syntax.c (syms_of_syntax): Make syntax-propertize--done local.
 
 2015-10-07  Eli Zaretskii  <address@hidden>
 
@@ -1836,14 +3318,12 @@
 
 2015-10-07  Artur Malabarba  <address@hidden>
 
-       * test/automated/tabulated-list-test.el: New file
-
+       * test/automated/tabulated-list-test.el: New file.
        Test bug#21639 and some basic functionality.
 
 2015-10-07  Artur Malabarba  <address@hidden>
 
        * lisp/emacs-lisp/tabulated-list.el (tabulated-list-sort):
-
        Check if column can be sorted before trying.  (Bug#21639)
 
 2015-10-07  Nicolas Richard  <address@hidden>
@@ -1854,25 +3334,21 @@
 
 2015-10-07  Martin Rudalics  <address@hidden>
 
-       In resize_frame_windows don't set a top position when resizing 
horizontally.
-
        * src/window.c (resize_frame_windows): Don't set root window's
        top position when resizing horizontally.
 
 2015-10-07  Artur Malabarba  <address@hidden>
 
        * lisp/progmodes/prog-mode.el (prettify-symbols-alist):
-
        Document more possible values.
 
 2015-10-06  Stefan Monnier  <address@hidden>
 
-       * lisp/textmodes/tex-mode.el: Use lexical-binding
+       * lisp/textmodes/tex-mode.el: Use lexical-binding.
 
 2015-10-06  Stefan Monnier  <address@hidden>
 
-       * lisp/indent.el (indent--default-inside-comment): New function
-
+       * lisp/indent.el (indent--default-inside-comment): New function.
        (indent-for-tab-command): Use it for `noindent' indentation.
 
 2015-10-06  Paul Eggert  <address@hidden>
@@ -1890,21 +3366,16 @@
 
 2015-10-06  Tassilo Horn  <address@hidden>
 
-       Add prettified version of \\Bbb{Q}.
-
-       * lisp/textmodes/tex-mode.el (tex--prettify-symbols-alist): Add
-       prettified version for \\Bbb{Q}.
+       * lisp/textmodes/tex-mode.el (tex--prettify-symbols-alist):
+       Add prettified version for \\Bbb{Q}.
 
 2015-10-06  Artur Malabarba  <address@hidden>
 
        * test/automated/package-test.el (package-test-install-single):
-
        Add a test for bug#21625.
 
 2015-10-06  Aaron Ecay  <address@hidden>
 
-       lisp/emacs-lisp/package.el (package-install): Fix name error
-
        * lisp/emacs-lisp/package.el (package-install): Fix error when pkg is
          not a package-desc object.  Also clarify documentation.  (Bug#21625)
 
@@ -1919,8 +3390,6 @@
 
 2015-10-06  Andreas Schwab  <address@hidden>
 
-       Don't use XFASTINT on a negative number
-
        * src/cmds.c (Fself_insert_command): Don't use XFASTINT on a negative
        number.  (Bug#21633)
 
@@ -1932,10 +3401,8 @@
 
 2015-10-05  Eli Zaretskii  <address@hidden>
 
-       Fix composition-function-table for Arabic and Syriac
-
-       * lisp/language/misc-lang.el (composition-function-table): Fix
-       entries for Arabic and Syriac.
+       * lisp/language/misc-lang.el (composition-function-table):
+       Fix entries for Arabic and Syriac.
 
 2015-10-05  Damien Cassou  <address@hidden>
 
@@ -1956,7 +3423,7 @@
 
 2015-10-04  Stefan Monnier  <address@hidden>
 
-       * src/xdisp.c (windows_or_buffers_changed): Improve docstring
+       * src/xdisp.c (windows_or_buffers_changed): Improve docstring.
 
 2015-10-04  Xue Fuqiao  <address@hidden>
 
@@ -1966,16 +3433,17 @@
 
 2015-10-04  YAMAMOTO Mitsuharu  <address@hidden>
 
-       * src/macfont.m (macfont_encode_char, syms_of_macfont): Remove unused 
vars.
+       * src/macfont.m (macfont_encode_char, syms_of_macfont):
+       Remove unused vars.
 
 2015-10-04  Stefan Merten  <address@hidden>
 
        Pull in version numbers from rst.el upstream release.
 
-               * lisp/textmodes/rst.el (rst-cvs-header, rst-svn-rev)
-               (rst-svn-timestamp, rst-official-version)
-               (rst-official-cvs-rev, rst-package-emacs-version-alist):
-               Update version numbers.
+       * lisp/textmodes/rst.el (rst-cvs-header, rst-svn-rev)
+       (rst-svn-timestamp, rst-official-version)
+       (rst-official-cvs-rev, rst-package-emacs-version-alist):
+       Update version numbers.
 
 2015-10-04  Eli Zaretskii  <address@hidden>
 
@@ -2001,7 +3469,7 @@
 
        fix for the case that M17N_FLT_USE_NEW_FEATURE is not defined
 
-       * ftfont.c (ftfont_drive_otf) [not M17N_FLT_USE_NEW_FEATURE]:
+       * src/ftfont.c (ftfont_drive_otf) [not M17N_FLT_USE_NEW_FEATURE]:
        Adjusted for the change of type of elements in the array
        MFLTGlyphString.glyphs.
 
@@ -2017,16 +3485,20 @@
 
 2015-10-04  Vincent Belaïche  <address@hidden>
 
-       Restore blank line before next section, erroneously erased in my 
previous commit
+       Restore blank line before next section, erroneously erased
+       in my previous commit
 
-       * etc/compilation.txt (symbol ant): add an additional trailing blank 
line to this section, so that there are two of them immediately before the next 
section
+       * etc/compilation.txt (symbol ant): Add an additional trailing blank
+       line to this section, so that there are two of them immediately before
+       the next section.
 
 2015-10-04  Vincent Belaïche  <address@hidden>
 
        Support MSW filename style for ant compilation error regexp
 
        * etc/compilation.txt (symbol ant):
-       * lisp/progmodes/compile.el (compilation-error-regexp-alist-alist): 
Support MSW filename style
+       * lisp/progmodes/compile.el (compilation-error-regexp-alist-alist):
+       Support MSW filename style.
 
 2015-10-03  Paul Eggert  <address@hidden>
 
@@ -2052,12 +3524,11 @@
 
 2015-10-03  Andreas Schwab  <address@hidden>
 
-               * src/coding.c (complement_process_encoding_system): Revert last
-               change.
+       * src/coding.c (complement_process_encoding_system): Revert last change.
 
 2015-10-03  Ulf Jasper  <address@hidden>
 
-       Add entry for Ulf Jasper.
+       * admin/MAINTAINERS: Add entry for Ulf Jasper.
 
 2015-10-03  Xue Fuqiao  <address@hidden>
 
@@ -2072,8 +3543,8 @@
        * src/fileio.c (Finsert_file_contents): Remove redundant
        coding-system check.
        (choose_write_coding_system): Likewise.
-       * src/coding.c (complement_process_encoding_system): Check
-       argument for valid coding system.
+       * src/coding.c (complement_process_encoding_system): Check argument
+       for valid coding system.
 
 2015-10-03  Eli Zaretskii  <address@hidden>
 
@@ -2103,8 +3574,8 @@
 
        Adapt to new prettify-symbols-unprettify-at-point default
 
-       * etc/NEWS: Mention that unprettication of symbol at point is off by
-       default.
+       * etc/NEWS: Mention that unprettication of symbol at point is off
+       by default.
 
 2015-10-03  Tassilo Horn  <address@hidden>
 
@@ -2114,12 +3585,11 @@
        channels from Available set" because they did not fix bug#21313.
 
        This reverts commits bfa1aa8e2bdaf14adbbf1e9e824051d3f740694c and
-       27f871907cc24f33a7d12ac3a4ab71a88f0bc554..
+       27f871907cc24f33a7d12ac3a4ab71a88f0bc554.
 
 2015-10-02  Markus Triska  <address@hidden>
 
-       * prolog.el: Update and extend operator table
-
+       * lisp/progmodes/prolog.el: Update and extend operator table.
        (prolog-smie-grammar): Add multifile, public etc.
 
 2015-10-02  Paul Eggert  <address@hidden>
@@ -2130,8 +3600,7 @@
 
 2015-10-02  Stefan Monnier  <address@hidden>
 
-       * lisp/vc/vc-git.el (vc-git-region-history): Handle local changes
-
+       * lisp/vc/vc-git.el (vc-git-region-history): Handle local changes.
        Adjust lto/lfrom when we have uncommitted changes.
 
 2015-10-02  Paul Eggert  <address@hidden>
@@ -2144,7 +3613,7 @@
 
 2015-10-02  Eli Zaretskii  <address@hidden>
 
-       * nt/INSTALL: Update instructions for running autogen.sh
+       * nt/INSTALL: Update instructions for running autogen.sh.
 
        * nt/INSTALL: Point to ezwinports for libXpm binaries.
 
@@ -2194,17 +3663,13 @@
 
 2015-10-01  Stephen Leake  <address@hidden>
 
-       Improve doc strings in dired.c
-
        * src/dired.c (Ffile_name_completion, Ffile_name_all_completions):
        Improve doc string.
 
 2015-10-01  Stephen Leake  <address@hidden>
 
-       Set default base-size in minibuffer-completion-help
-
-       * lisp/minibuffer.el (minibuffer-completion-help): Set default 
base-size,
-       in case completion table does not set it.
+       * lisp/minibuffer.el (minibuffer-completion-help):
+       Set default base-size, in case completion table does not set it.
 
 2015-10-01  Eli Zaretskii  <address@hidden>
 
@@ -2217,15 +3682,15 @@
 
 2015-10-01  Eli Zaretskii  <address@hidden>
 
-       * nt/INSTALL: Document where to find XPM support files
+       * nt/INSTALL: Document where to find XPM support files.
 
 2015-10-01  Tassilo Horn  <address@hidden>
 
        Un- and re-prettification are not exclusive
 
        * lisp/progmodes/prog-mode.el (prettify-symbols--post-command-hook):
-       Re-apply prettification to previous symbol also when unprettifying next
-       one.
+       Re-apply prettification to previous symbol also when unprettifying
+       next one.
 
 2015-10-01  Tassilo Horn  <address@hidden>
 
@@ -2237,10 +3702,9 @@
 2015-09-30  Artur Malabarba  <address@hidden>
 
        * lisp/progmodes/prog-mode.el (prettify-symbols-unprettify-at-point):
-
        Support unprettifying when point is after a symbol.
 
-       * etc/NEWS: Document `prettify-symbols-unprettify-at-point'
+       * etc/NEWS: Document `prettify-symbols-unprettify-at-point'.
 
 2015-09-30  Eli Zaretskii  <address@hidden>
 
@@ -2304,7 +3768,8 @@
 
 2015-09-30  YAMAMOTO Mitsuharu  <address@hidden>
 
-       * src/macfont.m (mac_font_descriptor_supports_languages): Regard "zh" 
as synonym of "zh-Hans".
+       * src/macfont.m (mac_font_descriptor_supports_languages):
+       Regard "zh" as synonym of "zh-Hans".
 
 2015-09-30  YAMAMOTO Mitsuharu  <address@hidden>
 
@@ -2320,20 +3785,22 @@
 
 2015-09-30  Nicolas Petton  <address@hidden>
 
-       * lisp/arc-mode.el (archive-rar-summarize): Better alignment of the 
columns.
+       * lisp/arc-mode.el (archive-rar-summarize): Better alignment
+       of the columns.
 
 2015-09-30  Nicolas Petton  <address@hidden>
 
        Use unar and lsar to handle RAR archives in arc-mode
 
        * lisp/arc-mode.el (archive-rar-extract, archive-extract-by-file): Rely
-       on unar and lsar instead of unrar-free for RAR archives (Bug#17663).
+       on unar and lsar instead of unrar-free for RAR archives (bug#17663).
 
 2015-09-30  Wieland Hoffmann  <address@hidden>  (tiny change)
 
        Clarify :create in auth-source's docs
 
-       * auth-source.el (auth-source-search): Clarify :create's meaning.
+       * lisp/gnus/auth-source.el (auth-source-search):
+       Clarify :create's meaning.
 
 2015-09-30  Phil Sainty  <address@hidden>
 
@@ -2357,16 +3824,14 @@
 
 2015-09-29  Stefan Monnier  <address@hidden>
 
-       * lisp/progmodes/prolog.el: Fix various indentation cases
-
+       * lisp/progmodes/prolog.el: Fix various indentation cases.
        (prolog-operator-chars): New const (add \\).
        (prolog-smie-forward-token, prolog-smie-backward-token): Use it.
        (prolog-smie-rules): Add rules according to bug#21526.
 
 2015-09-29  Stefan Monnier  <address@hidden>
 
-       * lisp/progmodes/sh-script.el: Old "dumb" continued line indent
-
+       * lisp/progmodes/sh-script.el: Old "dumb" continued line indent.
        (sh-indent-after-continuation): Add new value `always' (bug#17620)
        (sh-smie-sh-rules): Remove old handling of continued lines.
        (sh-smie--indent-continuation): New function.
@@ -2374,8 +3839,7 @@
 
 2015-09-29  Stefan Monnier  <address@hidden>
 
-       * lisp/progmodes/octave.el: Use grammar more; Handle enumeration fun
-
+       * lisp/progmodes/octave.el: Use grammar more; Handle enumeration fun.
        Remove redundant :group keyword args.
        (octave-begin-keywords, octave-else-keywords, octave-end-keywords):
        Remove variables.
@@ -2390,19 +3854,19 @@
        distinguish the "enumeration" function and the "end" index from
        their corresponding keywords.
        (octave--block-offset-keywords): New constant.
-       (octave-smie-rules): Use it.  Adjust rules for new global/persistent 
parsing.
+       (octave-smie-rules): Use it.  Adjust rules for new global/persistent
+       parsing.
        (octave-reserved-words): Redefine using octave-smie-grammar.
        (octave-font-lock-keywords): Use octave-smie--funcall-p and
        octave-smie--end-index-p.
 
 2015-09-29  Stefan Monnier  <address@hidden>
 
-       * lisp/emacs-lisp/lisp-mode.el (let-when-compile): Work like let*
+       * lisp/emacs-lisp/lisp-mode.el (let-when-compile): Work like let*.
 
 2015-09-29  Eli Zaretskii  <address@hidden>
 
-       nt/INSTALL: Remove references to GTK site
-
+       * nt/INSTALL: Remove references to GTK site.
        That site no longer offers Windows downloads.
 
 2015-09-29  Eli Zaretskii  <address@hidden>
@@ -2411,13 +3875,13 @@
 
 2015-09-29  Katsumi Yamaoka  <address@hidden>
 
-       * net/shr.el (shr-colorize-region): Allow 88-color tty to use colors.
-       Suggested by Eli Zaretskii.
+       * lisp/net/shr.el (shr-colorize-region): Allow 88-color tty to
+       use colors.  Suggested by Eli Zaretskii.
 
 2015-09-28  Katsumi Yamaoka  <address@hidden>
 
-       * net/shr.el (shr-colorize-region):
-       Don't do it on a system not supporting 256 above colors (bug#21557).
+       * lisp/net/shr.el (shr-colorize-region): Don't do it on a system
+       not supporting 256 above colors (bug#21557).
 
 2015-09-28  Dmitry Gutov  <address@hidden>
 
@@ -2468,21 +3932,19 @@
 
 2015-09-28  Tassilo Horn  <address@hidden>
 
-       Add admin/MAINTAINERS entries
-
        * admin/MAINTAINERS: Add entries for AUCTeX team and myself.
 
-2015-09-28  (tiny change) Arash Esbati  <address@hidden>  (tiny change)
+2015-09-28  Arash Esbati  <address@hidden>  (tiny change)
 
        Improve wrapfig package support and caption parsing
 
-       * lisp/textmodes/reftex-vars.el (reftex-label-alist-builtin): Correct
-       description string and add wraptable environment.
+       * lisp/textmodes/reftex-vars.el (reftex-label-alist-builtin):
+       Correct description string and add wraptable environment.
        (reftex-default-context-regexps): Improve caption regexp.
 
 2015-09-28  Anders Lindgren  <address@hidden>
 
-       Respect value of frame_resize_pixelwise when handling fullscreen state.
+       Respect value of frame_resize_pixelwise when handling fullscreen state
 
        * src/nsterm.m (handleFS): Respect frame_resize_pixelwise when
        setting size increments.
@@ -2504,18 +3966,17 @@
 
 2015-09-26  Alan Mackenzie  <address@hidden>
 
-       Fix follow-scroll-up/down, making them replacements for scroll-up/down.
+       Fix follow-scroll-up/down, making them replacements for scroll-up/down
 
        1. Allow point to move between follow windows in scroll operations.
        2. Fix bug where `right-char' just before EOB caused spurious scrolling,
        when EOB was isolated in the last follow window.
 
-       lisp/follow.el (follow-fixed-window): New variable.
+       * lisp/follow.el (follow-fixed-window): New variable.
        (follow-get-scrolled-point): New function.
        (follow-scrol-up, follow-scroll-down): Add autoload cookies.
-       Reformulate
-       the code.  Put `scroll-command' properties on the functions.  Correct
-       minor errors in ...-down's doc string and code.
+       Reformulate the code.  Put `scroll-command' properties on the functions.
+       Correct minor errors in ...-down's doc string and code.
        (follow-calc-win-end): Amend incomplete doc string.  Use
        `pos-visible-in-window-p' to check whether EOB is in the window.
        (follow-estimate-first-window-start): Correct an off-by-1 error.
@@ -2523,7 +3984,8 @@
 
 2015-09-26  Paul Eggert  <address@hidden>
 
-       * admin/MAINTAINERS: Add self, plus list some more files sans 
maintaners.
+       * admin/MAINTAINERS: Add self, plus list some more files
+       sans maintaners.
 
 2015-09-26  Zachary Kanfer  <address@hidden>  (tiny change)
 
@@ -2534,7 +3996,7 @@
 
 2015-09-26  Eli Zaretskii  <address@hidden>
 
-       * etc/PROBLEMS: Document problems with pasting on MS-Windows
+       * etc/PROBLEMS: Document problems with pasting on MS-Windows.
 
 2015-09-26  Eli Zaretskii  <address@hidden>
 
@@ -2564,15 +4026,13 @@
 
        Remove font-latex specific check
 
-       * lisp/textmodes/tex-mode.el (tex--prettify-symbols-compose-p): Use
-       syntax-ppss data to identify verbatim contents.
+       * lisp/textmodes/tex-mode.el (tex--prettify-symbols-compose-p):
+       Use syntax-ppss data to identify verbatim contents.
 
 2015-09-25  Tassilo Horn  <address@hidden>
 
-       Fix false negatives in tex--prettify-symbols-compose-p.
-
-       * lisp/textmodes/tex-mode.el (tex--prettify-symbols-compose-p): Fix some
-       false negatives.
+       * lisp/textmodes/tex-mode.el (tex--prettify-symbols-compose-p):
+       Fix some false negatives.
 
 2015-09-25  Eli Zaretskii  <address@hidden>
 
@@ -2601,9 +4061,9 @@
 
 2015-09-25  Alan Mackenzie  <address@hidden>
 
-       Resurrect edebug-set-initial-mode, repurposing it to set the global 
mode.
+       Resurrect edebug-set-initial-mode, repurposing it to set the global mode
 
-       lisp/emacs-lisp/edebug.el (edebug-initial-mode-alist): Uncomment, and
+       * lisp/emacs-lisp/edebug.el (edebug-initial-mode-alist): Uncomment, and
        amend to match current modes and functions.
        (edebug-set-initial-mode): Uncomment and change from setting a defun's
        `edebug-initial-mode''s property to setting the variable
@@ -2611,11 +4071,11 @@
        (top level): Create new binding C-x C-a C-m for
        `edebug-set-initial-mode'.
 
-       doc/lispref/edebug.texi (Edebug Execution Modes): document
+       * doc/lispref/edebug.texi (Edebug Execution Modes): Document
        `edebug-set-initial-mode' and its new key binding.
        (Edebug Options): Mention the new command in the pertinent place.
 
-       etc/NEWS: Write entry for this change.
+       * etc/NEWS: Write entry for this change.
 
 2015-09-25  Eli Zaretskii  <address@hidden>
 
@@ -2686,14 +4146,14 @@
 
        Properly quote nested xml comments (Bug#6267) (Bug#20001)
 
-       * nxml-mode.el (nxml-comment-quote-nested): New function
-       (nxml-mode): Set comment-quote-nested-function
+       * lisp/nxml/nxml-mode.el (nxml-comment-quote-nested): New function.
+       (nxml-mode): Set comment-quote-nested-function.
 
 2015-09-23  Ivan Andrus  <address@hidden>
 
        Allow major-modes full control over quoting nested comments
 
-       * newcomment.el (comment-quote-nested-function): New variable.
+       * lisp/newcomment.el (comment-quote-nested-function): New variable.
        (comment-quote-nested-default): New function.
        (comment-quote-nested): Use `comment-quote-nested-function'.
 
@@ -2730,20 +4190,17 @@
 
 2015-09-23  Stefan Monnier  <address@hidden>
 
-       * src/syntax.c: Handle spurious e_property_truncated flag
-
        * src/syntax.c (parse_sexp_propertize): Handle spurious
        e_property_truncated flag.
        (update_syntax_table_forward): Remove invalid assertion.
 
 2015-09-23  Eli Zaretskii  <address@hidden>
 
-       Support ':relative-width' space display spec on text-mode terminals
-
        * src/xdisp.c (produce_stretch_glyph): Support ':relative-width'
        space display spec on text-mode terminals, by calling
-       PRODUCE_GLYPHS instead of x_produce_glyphs.  Remove the 
HAVE_WINDOW_SYSTEM
-       guards from the supporting code, as well as the test for a GUI frame.
+       PRODUCE_GLYPHS instead of x_produce_glyphs.  Remove the
+       HAVE_WINDOW_SYSTEM guards from the supporting code, as well as the
+       test for a GUI frame.
 
 2015-09-23  Oleh Krehel  <address@hidden>
 
@@ -2754,8 +4211,6 @@
 
 2015-09-23  Thomas Fitzsimmons  <address@hidden>
 
-       Do not include authorization header in an HTTP redirect
-
        * lisp/url/url-http.el (url-http-parse-headers): Do not
        automatically include Authorization header in redirect.
        (Bug#21350)
@@ -2782,15 +4237,15 @@
 
 2015-09-22  Stefan Monnier  <address@hidden>
 
-       * prolog.el: Fix indentation of empty line
+       * lisp/progmodes/prolog.el: Fix indentation of empty line
 
        * lisp/emacs-lisp/smie.el (smie-rules-function): Document new
        `empty-line-token' element.
        (smie-indent-empty-line): New function.
        (smie-indent-functions): Add it.
 
-       * lisp/progmodes/prolog.el (prolog-smie-rules): Fix :list-intro behavior
-       and use the new `empty-line-token' element (bug#21526).
+       * lisp/progmodes/prolog.el (prolog-smie-rules): Fix :list-intro
+       behavior and use the new `empty-line-token' element (bug#21526).
        (prolog-mode-variables): Fix comment-start-skip setting to match
        comment-start.
 
@@ -2801,14 +4256,13 @@
 
 2015-09-22  Alan Mackenzie  <address@hidden>
 
-       Make description of `edebug-initial-mode' user friendly.
+       Make description of `edebug-initial-mode' user friendly
 
-       Fixes debbugs#21365.
+       Fixes bug#21365.
 
-       dec/lispref/edebug.texi (Edebug Execution Modes): Change the
-       desscription
-       of `edebug-initial-mode' from that of its implementation to that of its
-       visual effect and use.  Move the paragraph higher up.
+       * dec/lispref/edebug.texi (Edebug Execution Modes): Change the
+       description of `edebug-initial-mode' from that of its implementation
+       to that of its visual effect and use.  Move the paragraph higher up.
 
 2015-09-22  Eli Zaretskii  <address@hidden>
 
@@ -2847,9 +4301,9 @@
 
        Use lunate epsilon for TeX \epsilon
 
-       * lisp/textmodes/tex-mode.el (tex--prettify-symbols-alist): Add
-       \varepsilon using GREEK SMALL LETTER EPSILON, and change \epsilon to use
-       GREEK LUNATE EPSILON SYMBOL
+       * lisp/textmodes/tex-mode.el (tex--prettify-symbols-alist):
+       Add \varepsilon using GREEK SMALL LETTER EPSILON, and change
+       \epsilon to use GREEK LUNATE EPSILON SYMBOL
 
 2015-09-21  Stefan Monnier  <address@hidden>
 
@@ -2878,7 +4332,7 @@
 
 2015-09-21  Paul Eggert  <address@hidden>
 
-       Clarify or replace a few \u escapes.
+       Clarify or replace a few \u escapes
 
        * doc/lispref/nonascii.texi (Character Properties)
        More-detailed commentary for \u escapes.
@@ -2903,9 +4357,9 @@
 
        Signal error on invalid regexp
 
-       * lisp/textmodes/reftex-cite.el (reftex-extract-bib-entries): Signal an
-       error when the user tries searching with a regexp matching the empty
-       string.
+       * lisp/textmodes/reftex-cite.el (reftex-extract-bib-entries):
+       Signal an error when the user tries searching with a regexp
+       matching the empty string.
 
 2015-09-21  Eli Zaretskii  <address@hidden>
 
@@ -2956,16 +4410,16 @@
 
 2015-09-21  Anders Lindgren  <address@hidden>
 
-       Keep upper edge unchanged when changing size of NS frame (Bug#21415)
+       Keep upper edge unchanged when changing size of NS frame
 
        * src/nsterm.m (x_set_window_size): Keep upper frame edge unchanged
        (Bug#21415).
 
 2015-09-20  Stefan Monnier  <address@hidden>
 
-       Subject: * lisp/progmodes/prolog.el: Improve handling of if/then/else
-
-       (prolog-smie-rules): Accomodate standard if/then/else special 
indentation.
+       * lisp/progmodes/prolog.el: Improve handling of if/then/else.
+       (prolog-smie-rules): Accommodate standard if/then/else special
+       indentation.
        (prolog-mode): Add . to electric-indent-chars.
        (prolog-electric--if-then-else): Re-indent the line before adding space
        after the new char (bug#21526).
@@ -2974,12 +4428,13 @@
 
        Add prettify symbols to python-mode
 
-       lisp/progmodes/python.el (python-prettify-symbols-alist): New variable
-       lisp/progmodes/python.el (python-mode): Use it
+       * lisp/progmodes/python.el (python-prettify-symbols-alist):
+       New variable.
+       (python-mode): Use it
 
 2015-09-20  Stefan Monnier  <address@hidden>
 
-       * lisp/emacs-lisp/syntax.el (syntax-begin-function): Make obsolete
+       * lisp/emacs-lisp/syntax.el (syntax-begin-function): Make obsolete.
 
 2015-09-20  Jostein Kjønigsen  <address@hidden>  (tiny change)
 
@@ -2990,7 +4445,8 @@
 
 2015-09-20  Drew Csillag  <address@hidden>
 
-       * m4-mode.el (m4-font-lock-keywords): Fix m4_* highlighting
+       * lisp/progmodes/m4-mode.el (m4-font-lock-keywords):
+       Fix m4_* highlighting.
 
        * lisp/progmodes/m4-mode.el (m4-font-lock-keywords): Fix recognition
        of commands when they have a "m4_" prefix.
@@ -3031,7 +4487,7 @@
        appropriate.
 
        * lisp/net/tramp.el (tramp-handle-file-notify-rm-watch):
-       Use `delete-process'
+       Use `delete-process'.
        (tramp-handle-file-notify-valid-p): Check also, that file or
        directory to be watched still exists.
 
@@ -3074,13 +4530,10 @@
 2015-09-20  Stefan Monnier  <address@hidden>
 
        * lisp/progmodes/js.el (js--syntax-begin-function): Remove.
-
        (js-mode): Don't set syntax-begin-function.
 
 2015-09-20  Stefan Monnier  <address@hidden>
 
-       Don't assume syntax-begin-function is a symbol.
-
        * lisp/font-lock.el (font-lock-compile-keywords): Don't assume
        syntax-begin-function is a symbol.
 
@@ -3106,7 +4559,7 @@
 
 2015-09-19  Artur Malabarba  <address@hidden>
 
-       * lisp/emacs-lisp/timer.el (run-at-time): Docstring formatting
+       * lisp/emacs-lisp/timer.el (run-at-time): Docstring formatting.
 
 2015-09-19  Eli Zaretskii  <address@hidden>
 
@@ -3117,8 +4570,8 @@
 2015-09-19  Simen Heggestøyl  <address@hidden>
 
        Add overflow module to CSS property list
-       * lisp/textmodes/css-mode.el (css-property-ids): Add properties from CSS
-       Overflow Module Level 3.
+       * lisp/textmodes/css-mode.el (css-property-ids): Add properties
+       from CSS Overflow Module Level 3.
 
 2015-09-19  Eli Zaretskii  <address@hidden>
 
@@ -3144,21 +4597,20 @@
 
 2015-09-18  Wilson Snyder  <address@hidden>
 
-       Fix checkdoc warnings.
        * lisp/progmodes/verilog-mode.el (verilog-forward-sexp-function)
        (verilog-decls-princ, verilog-modport-princ)
        (verilog-modi-modport-lookup-one): Fix checkdoc warnings.
 
 2015-09-17  Jay Belanger  <address@hidden>
 
-       Fix the routine for help on Calc's prefixes.
+       Fix the routine for help on Calc's prefixes
        * lisp/calc/calc-ext.el (calc-prefix-help-retry): New variable.
        (calc-do-prefix-help): Use `read-char' to determine the next Calc
        command.
 
 2015-09-17  Stefan Monnier  <address@hidden>
 
-       * lisp/font-lock.el (font-lock-beginning-of-syntax-function): Remove
+       * lisp/font-lock.el (font-lock-beginning-of-syntax-function): Remove.
        (font-lock-fontify-block): Don't let-bind it.
        (font-lock-compile-keywords): Don't use it.
        (font-lock-set-defaults): Don't set it.  Allow the variable alist to
@@ -3248,7 +4700,8 @@
 
 2015-09-17  Eli Zaretskii  <address@hidden>
 
-       * doc/lispref/frames.texi (Cursor Parameters): Document 
'x-stretch-cursor'.
+       * doc/lispref/frames.texi (Cursor Parameters):
+       Document 'x-stretch-cursor'.
 
 2015-09-16  Paul Eggert  <address@hidden>
 
@@ -3263,9 +4716,9 @@
        A few more minor quoting fixes in a script and a text file
 
        Minor quoting fixes in scripts and doc
-       Prefer straight quotes in random script files, as they are not 
converted.
-       Prefer grave quotes in a couple of places in the manual that were missed
-       earlier, as these quotes are converted.
+       Prefer straight quotes in random script files, as they are not
+       converted.  Prefer grave quotes in a couple of places in the manual
+       that were missed earlier, as these quotes are converted.
 
        Minor backslash fixes in manuals and scripts
        * Makefile.in (install-arch-indep):
@@ -3414,22 +4867,20 @@
 
 2015-09-16  Tassilo Horn  <address@hidden>
 
-       Clarify reftex-extra-bindings docs.
+       Clarify reftex-extra-bindings docs
        * lisp/textmodes/reftex-vars.el (reftex-extra-bindings):
        * doc/misc/reftex.texi (Key Bindings): Document that the variable
        only has an effect at load-time.
 
 2015-09-16  Daniel McClanahan  <address@hidden>  (tiny change)
 
-       Fix search argument in ‘lisp--el-match-keyword’ (Bug#21492) (Bug#21493)
        * lisp/emacs-lisp/lisp-mode.el (lisp--el-match-keyword): Fix
        search argument.  (Bug#21492) (Bug#21493)
 
 2015-09-16  Tassilo Horn  <address@hidden>
 
+       * lisp/textmodes/tex-mode.el (tex--prettify-symbols-alist):
        Add pretty symbols for \qquad and \varrho.
-       * lisp/textmodes/tex-mode.el (tex--prettify-symbols-alist): Add pretty
-       symbols for \qquad and \varrho.
 
 2015-09-15  Jay Belanger  <address@hidden>
 
@@ -3439,7 +4890,7 @@
        * lisp/calc/calc-ext.el (calc-init-extensions): Add keybinding for
        `calc-vector-rms', add autoloads for `calc-vector-rms' and
        `calcFunc-rms'.
-       * lisp/calc/calc-map.el (calc-u-oper-keys):  Add entry for
+       * lisp/calc/calc-map.el (calc-u-oper-keys): Add entry for
        `calcFunc-rms'.
        * lisp/calc/calc-menu.el (calc-vectors-menu): Add entry for
        `calc-vector-rms'.
@@ -3449,8 +4900,8 @@
 2015-09-15  Stephen Leake  <address@hidden>
 
        Add monotone EDE generic project
-       * lisp/cedet/ede/generic.el (ede-enable-generic-projects): Add monotone
-       generic project.
+       * lisp/cedet/ede/generic.el (ede-enable-generic-projects):
+       Add monotone generic project.
 
        Revert premature commit
        * doc/lispref/files.texi: Revert premature commit of change to
@@ -3491,7 +4942,7 @@
 
 2015-09-15  Stefan Monnier  <address@hidden>
 
-       * lisp/emacs-lisp/lisp-mode.el (lisp-mode-symbol-regexp): New const
+       * lisp/emacs-lisp/lisp-mode.el (lisp-mode-symbol-regexp): New const.
        Use it everywhere "\\(\\sw\\|\\s_\\|\\\\.\\)+" was used.
        (cl-lib-fdefs): Add defgeneric.
        (cl-kw): Add all elements of eieio-kw and cl-lib-kw.
@@ -3510,7 +4961,7 @@
 
 2015-09-15  Mark Oteiza  <address@hidden>
 
-       lisp/custom.el (load-theme): Only compute hash when needed.
+       * lisp/custom.el (load-theme): Only compute hash when needed.
 
 2015-09-15  Paul Eggert  <address@hidden>
 
@@ -3652,7 +5103,7 @@
        Adapt file-notify-tests.el test cases
        * lisp/filenotify.el (file-notify-rm-watch): Ignore `file-notify-error'.
        * src/inotify.c (Finotify_valid_p): Adapt docstring.
-       * test/automated/file-notify-tests.el ()
+       * test/automated/file-notify-tests.el
        (file-notify-test03-autorevert)
        (file-notify-test04-file-validity)
        (file-notify-test04-file-validity-remote)
@@ -3680,7 +5131,7 @@
 
 2015-09-14  Alan Mackenzie  <address@hidden>
 
-       Replace `cadar' with `cadr/car', since `cadar' is problematic on Emacs.
+       Replace `cadar' with `cadr/car', since `cadar' is problematic on Emacs
        (c-make-init-lang-vars-fun): Replace two occurrences of `cadar' with
        `cadr/car'.
 
@@ -3693,8 +5144,8 @@
 2015-09-14  Alan Mackenzie  <address@hidden>
 
        Elisp mode: Make font-lock and imenu handle escaped characters in 
symbols
-       Fixes debbugs#21449.
-       lisp/emacs-lisp/lisp-mode.el (lisp-imenu-generic-expression)
+       Fixes bug#21449.
+       * lisp/emacs-lisp/lisp-mode.el (lisp-imenu-generic-expression)
        (lisp--el-match-keyword, lisp-el-font-lock-keywords-1)
        (lisp-cl-font-lock-keywords-1, lisp-el-font-lock-keywords-2)
        (lisp-cl-font-lock-keywords-2, lisp-string-in-doc-position-p):
@@ -3708,7 +5159,7 @@
 
 2015-09-14  Tassilo Horn  <address@hidden>
 
-       Fix tests for file-notify-valid-p.
+       Fix tests for file-notify-valid-p
        * test/automated/file-notify-tests.el (file-notify--test-cleanup):
        Use delete-directory to delete file-notify--test-tmpfile if it is
        a directory.  Likewise for file-notify--test-tmpfile1.
@@ -3730,10 +5181,10 @@
 
 2015-09-14  Tassilo Horn  <address@hidden>
 
-       Test file-notify-valid-p.
+       Test file-notify-valid-p
        * test/automated/file-notify-tests.el
-       (file-notify-test04-file-validity, file-notify-test05-dir-validity): New
-       tests.
+       (file-notify-test04-file-validity, file-notify-test05-dir-validity):
+       New tests.
 
 2015-09-13  Eli Zaretskii  <address@hidden>
 
@@ -3763,7 +5214,8 @@
        Problem reported by Ashish SHUKLA in:
        http://lists.gnu.org/archive/html/emacs-devel/2015-09/msg00531.html
        * configure.ac: Check for struct unipair.unicode instead of for
-       <linux/kd.h>, since that’s more specific to what the code actually 
needs.
+       <linux/kd.h>, since that’s more specific to what the code
+       actually needs.
        * src/terminal.c: Use HAVE_STRUCT_UNIPAIR_UNICODE, not HAVE_LINUX_KD_H.
 
        * src/indent.c (Fvertical_motion): Simplify bugfix (Bug#21468).
@@ -3914,7 +5366,7 @@
 2015-09-10  Tassilo Horn  <address@hidden>
 
        Improve file-notify-tests
-       * test/automated/file-notify-tests.el: Use lexical-binding
+       * test/automated/file-notify-tests.el: Use lexical-binding.
        (file-notify--test-cleanup): New function.
        (file-notify-test00-availability, file-notify-test01-add-watch)
        (file-notify-test02-events, file-notify-test03-autorevert): Use it.
@@ -3953,7 +5405,6 @@
 
 2015-09-09  Stefan Monnier  <address@hidden>
 
-       (time-to-seconds, time-less-p): Mark unused vars with underscore
        * lisp/calendar/time-date.el (time-to-seconds, time-less-p):
        Mark unused vars with underscore.
 
@@ -3966,8 +5417,8 @@
 2015-09-09  Tassilo Horn  <address@hidden>
 
        Start checking event types in file-notify tests
-       * test/automated/file-notify-tests.el (file-notify--test-events): New
-       variable.
+       * test/automated/file-notify-tests.el (file-notify--test-events):
+       New variable.
        (file-notify--test-event-handler): Append received event to
        file-notify--test-events for later analysis.
        (file-notify-test02-events): Assert that the expected notifications have
@@ -4014,8 +5465,8 @@
 
 2015-09-09  Stefan Monnier  <address@hidden>
 
-       * lisp/emacs-lisp/cl-generic.el (cl-generic-generalizers): Remove
-       warning.
+       * lisp/emacs-lisp/cl-generic.el (cl-generic-generalizers):
+       Remove warning.
 
 2015-09-09  Eli Zaretskii  <address@hidden>
 
@@ -4031,7 +5482,7 @@
 
 2015-09-09  Phil Sainty  <address@hidden>
 
-       * lisp/emacs-lisp/package.el (package--ensure-init-file)
+       * lisp/emacs-lisp/package.el (package--ensure-init-file):
        More robust check for `package-initialize' calls in init file.
        This function accepts an optional argument, but calls passing
        an argument would not have been detected.
@@ -4408,7 +5859,7 @@
 
 2015-09-07  Artur Malabarba  <address@hidden>
 
-       * lisp/emacs-lisp/package.el: Reduce autoloading before compiling
+       * lisp/emacs-lisp/package.el: Reduce autoloading before compiling.
        (package--autoloads-file-name)
        (package--activate-autoloads-and-load-path): New function.
        (package-activate-1): Delegate autoloading and load-path
@@ -4433,10 +5884,11 @@
 
        * lisp/emacs-lisp/package.el (package-initialize): Set enable-at-startup
        When `package-initialize' is called as part of loading the init file,
-       the user probably doesn't want it to be called again afterwards. In this
-       situation, `package-initialize' now sets `package-enable-at-startup' to
-       nil to prevent that. The user can have the old behaviour by setting this
-       variable to t after the call to `package-initialize'.  (Bug#21423)
+       the user probably doesn't want it to be called again afterwards.
+       In this situation, `package-initialize' now sets
+       `package-enable-at-startup' to nil to prevent that.  The user can have
+       the old behavior by setting this variable to t after the call to
+       `package-initialize'.  (Bug#21423)
        * doc/emacs/package.texi (Package Installation): Document it.
        * doc/lispref/package.texi (Packaging Basics): Document it.
        * etc/NEWS: Document it.
@@ -4444,8 +5896,8 @@
 2015-09-06  Thomas Fitzsimmons  <address@hidden>
 
        Bump version of ntlm.el to 2.00
-       * lisp/net/ntlm.el: Bump version to 2.00.  New maintainer.  Add comm
-       keyword.
+       * lisp/net/ntlm.el: Bump version to 2.00.  New maintainer.
+       Add comm keyword.
 
 2015-09-06  Adam Sjøgren  <address@hidden>
 
@@ -4454,7 +5906,6 @@
 
 2015-09-06  Dmitry Gutov  <address@hidden>
 
-       Allow even one non-regular character before the implicit tag name
        * lisp/progmodes/etags.el (etags-tags-completion-table):
        Allow even one non-regular character before the implicit tag name.
        Reported at http://emacs.stackexchange.com/questions/15269/.
@@ -4462,7 +5913,7 @@
 2015-09-06  Thomas Fitzsimmons  <address@hidden>
 
        Add support for NTLMv2 authentication
-       * net/ntlm.el (ntlm): New customization group.
+       * lisp/net/ntlm.el (ntlm): New customization group.
        (ntlm-compatibility-level): New defcustom.
        (ntlm-compute-timestamp): New function.
        (ntlm-generate-nonce): Likewise.
@@ -4470,7 +5921,7 @@
 
 2015-09-06  Artur Malabarba  <address@hidden>
 
-       * lisp/emacs-lisp/package.el: Rename custom faces
+       * lisp/emacs-lisp/package.el: Rename custom faces.
        All of the recently introduced faces, like `package-name-face', have
        been renamed to no end in `-face' to comply with the convention
        described in (info "(elisp) Defining Faces").
@@ -4491,8 +5942,8 @@
 
 2015-09-06  Eric Abrahamsen  <address@hidden>
 
-       nnimap.el:  Handle nil arg to nnimap-request-group
-       * lisp/gnus/nnimap.el (nnimap-request-group):  Handle nil "info" arg.
+       nnimap.el: Handle nil arg to nnimap-request-group
+       * lisp/gnus/nnimap.el (nnimap-request-group): Handle nil "info" arg.
        This arg isn't always passed in, check it's not nil before making it
        into a list.  The active arg will also be nil if the group is new,
        check for that.
@@ -4524,7 +5975,8 @@
 
        Rename map-contains-key-p and map-some-p
        Remove the "-p" suffix from both function names.
-       * lisp/emacs-lisp/map.el (map-contains-key, map-some): Rename the 
functions.
+       * lisp/emacs-lisp/map.el (map-contains-key, map-some):
+         Rename the functions.
        * test/automated/map-tests.el (test-map-contains-key, test-map-some):
          Update both test functions.
 
@@ -4607,8 +6059,8 @@
        reusing stale face IDs for 'escape-glyph' and 'glyphless-char'
        faces, which could case a segfault if the frame's face cache was
        freed since the last redisplay.  (Bug#21394)
-       * src/xfaces.c (free_realized_faces): Call
-       forget_escape_and_glyphless_faces.
+       * src/xfaces.c (free_realized_faces):
+       Call forget_escape_and_glyphless_faces.
        * src/dispextern.h (forget_escape_and_glyphless_faces): Add prototype.
 
 2015-09-04  Paul Eggert  <address@hidden>
@@ -4670,7 +6122,8 @@
        * src/keyboard.c (kset_echo_prompt): New function.
        (echo_update): Add echo_prompt at the very beginning.
        (read_char): Remove workaround for bug#19875, not needed any more.
-       (read_key_sequence): Set echo_prompt rather than echo_string 
(bug#21403).
+       (read_key_sequence): Set echo_prompt rather than echo_string
+       (bug#21403).
        (mark_kboards): Mark echo_prompt.
 
        Fix disassembly of non-compiled lexical functions (bug#21377)
@@ -4682,16 +6135,15 @@
        (disassemble-internal): Use interactive-form.
        (disassemble-1): Use functionp.
 
-       (tex--prettify-symbols-compose-p): Don't compose in verbatim blocks!
        * lisp/textmodes/tex-mode.el (tex--prettify-symbols-compose-p):
        Don't compose inside verbatim blocks!
 
 2015-09-03  Mark Oteiza  <address@hidden>
 
        * lisp/thingatpt.el (thing-at-point-uri-schemes): Add "man:"
-       (bug#19441)
+       (bug#19441).
 
-       * lisp/mpc.el (mpc--proc-connect): Handle unix sockets (bug#19394)
+       * lisp/mpc.el (mpc--proc-connect): Handle unix sockets (bug#19394).
 
 2015-09-03  Dmitry Gutov  <address@hidden>
 
@@ -4733,16 +6185,17 @@
 2015-09-02  K. Handa  <address@hidden>
 
        Fix typo
-       * ftfont.c (ftfont_drive_otf): otf_positioning_type_components_mask -> 
OTF_positioning_type_components_mask.
+       * src/ftfont.c (ftfont_drive_otf): otf_positioning_type_components_mask
+       -> OTF_positioning_type_components_mask.
 
        Fix previous change
-       * ftfont.c (ftfont_drive_otf): Remember some bits of
+       * src/ftfont.c (ftfont_drive_otf): Remember some bits of
        OTF_Glyph->positioning_type in MFLTGlyphFT->libotf_positioning_type.
 
 2015-09-01  David Caldwell  <address@hidden>  (tiny change)
 
-       * lisp/vc/vc-hooks.el (vc-refresh-state): New command
-       (vc-refresh-state): Rename from vc-find-file-hook and make interactive.
+       * lisp/vc/vc-hooks.el (vc-refresh-state): New command.
+       Rename from vc-find-file-hook and make interactive.
        (vc-find-file-hook): Redefine as obsolete alias.
 
 2015-09-01  Paul Eggert  <address@hidden>
@@ -4752,8 +6205,7 @@
        are supposed to stand for themselves and are not quotes.  Remove
        apostrophes from docstring examples like ‘'(calendar-nth-named-day
        -1 0 10 year)’ that confuse source code with data.  Do some other
-       minor docstring fixups as well, e.g., insert a missing close
-       quote.
+       minor docstring fixups as well, e.g., insert a missing close quote.
 
 2015-09-01  Stefan Monnier  <address@hidden>
 
@@ -4883,8 +6335,8 @@
 
 2015-09-01  K. Handa  <address@hidden>
 
-       Use the new type MFLTGlyphFT for MFLTGlyphString.glyphs.
-       * ftfont.c (MFLTGlyphFT): New type.
+       Use the new type MFLTGlyphFT for MFLTGlyphString.glyphs
+       * src/ftfont.c (MFLTGlyphFT): New type.
        (ftfont_get_glyph_id, ftfont_get_metrics, ftfont_drive_otf)
        (ftfont_shape_by_flt): Make MFLTGlyphFT the actual type of
        elements in the array MFLTGlyphString.glyphs.
@@ -4895,12 +6347,12 @@
        * lisp/progmodes/elisp-mode.el: Clean up FIXMEs, comments.
 
        Delete Emacs 25 test in mode-local.el
-       * lisp/cedet/mode-local.el (describe-mode-local-overload): Fix missed an
-       edit in previous commit.
+       * lisp/cedet/mode-local.el (describe-mode-local-overload):
+       Fix missed an edit in previous commit.
 
        Show all known mode-local overrides in *Help*
-       * lisp/cedet/mode-local.el (describe-mode-local-overload): Assume Emacs
-       25. Add all known mode-local overrides.
+       * lisp/cedet/mode-local.el (describe-mode-local-overload):
+       Assume Emacs 25. Add all known mode-local overrides.
 
 2015-09-01  Katsumi Yamaoka  <address@hidden>
 
@@ -4910,7 +6362,7 @@
 
 2015-08-31  Zachary Kanfer  <address@hidden>  (tiny change)
 
-       * lisp/newcomment.el (comment-dwim): Use `use-region-p'
+       * lisp/newcomment.el (comment-dwim): Use `use-region-p'.
        When the region is active, but is empty (length 0), act as though
        the region was not active; that is, put a comment at the end of
        the line.  (Bug#21119)
@@ -4924,12 +6376,12 @@
 
 2015-08-31  Rüdiger Sonderfeld  <address@hidden>
 
-       hideif.el: Recognize .h++ as C++ header.
+       hideif.el: Recognize .h++ as C++ header
        * lisp/progmodes/hideif.el (hide-ifdef-header-regexp): Add .h++.
 
-       isearch: Document character folding mode.
-       * isearch.el (isearch-forward): Mention `isearch-toggle-character-fold'
-       in doc string.
+       isearch: Document character folding mode
+       * lisp/isearch.el (isearch-forward):
+       Mention `isearch-toggle-character-fold' in doc string.
 
 2015-08-31  Paul Eggert  <address@hidden>
 
@@ -4994,8 +6446,8 @@
        (ede-add-project-autoload): Replace obsolete `eieio-object-name-string'
        with (oref ... name).
        (ede-auto-load-project): Use slot name, not initarg key.
-       * lisp/cedet/ede/generic.el (ede-generic-load,
-       ede-generic-find-matching-target): Use slot name, not initarg key.
+       * lisp/cedet/ede/generic.el (ede-generic-load)
+       (ede-generic-find-matching-target): Use slot name, not initarg key.
        (ede-find-target): Use oref-default on class name.
        (ede-generic-new-autoloader): Delete obsolete name argument to eieio
        class constructor.
@@ -5138,14 +6590,14 @@
 2015-08-30  Xue Fuqiao  <address@hidden>
 
        Minor documentation and NEWS tweak
-       * doc/lispintro/emacs-lisp-intro.texi (fwd-para let): Add an index
-       entry.
-       * NEWS: Fix a typo in character-fold-to-regexp.
+       * doc/lispintro/emacs-lisp-intro.texi (fwd-para let):
+       Add an index entry.
+       * etc/NEWS: Fix a typo in character-fold-to-regexp.
 
 2015-08-30  Michael Albinus  <address@hidden>
 
        * lisp/net/tramp-sh.el (tramp-convert-file-attributes):
-       Revert patch from 2015-08-24.  Tramp shall be have like for local files.
+       Revert patch from 2015-08-24.  Tramp shall behave like for local files.
        * test/automated/tramp-tests.el (tramp-test18-file-attributes):
        Adapt test.
 
@@ -5153,15 +6605,15 @@
 
        Text quoting fixes in cedet, emulation, emacs-lisp
        * lisp/cedet/ede.el (ede-check-project-directory):
-       * lisp/cedet/semantic/analyze/debug.el:
+       * lisp/cedet/semantic/analyze/debug.el
        (semantic-analyzer-debug-insert-include-summary):
        * lisp/cedet/semantic/bovine/c.el (semantic-c-describe-environment):
-       * lisp/cedet/semantic/decorate/include.el:
+       * lisp/cedet/semantic/decorate/include.el
        (semantic-decoration-unknown-include-describe)
        (semantic-decoration-all-include-summary):
        * lisp/cedet/semantic/ia.el (semantic-ia-fast-jump):
        * lisp/emulation/edt.el (edt-load-keys):
-       * lisp/emulation/viper-cmd.el:
+       * lisp/emulation/viper-cmd.el
        (viper-display-current-destructive-command)
        (viper-query-replace, viper-brac-function):
        * lisp/emulation/viper-ex.el (viper-get-ex-token, ex-compile):
@@ -5218,12 +6670,12 @@
        (MAC_FONT_TRAIT_MONO_SPACE, MAC_FONT_TRAIT_COLOR_GLYPHS)
        (MAC_FONT_FORMAT_BITMAP)
        (MAC_CHARACTER_COLLECTION_IDENTITY_MAPPING)
-       (MAC_CHARACTER_COLLECTION_ADOBE_JAPAN1): Remove enumerators.  All
-       uses replaced with definitions.
+       (MAC_CHARACTER_COLLECTION_ADOBE_JAPAN1): Remove enumerators.
+       All uses replaced with definitions.
        (kCTFontTraitItalic, kCTFontTraitBold, kCTFontTraitMonoSpace)
        (kCTFontTraitColorGlyphs, kCTCharacterCollectionIdentityMapping)
-       (kCTCharacterCollectionAdobeJapan1 kCTFontOrientationDefault): Add
-       compatibility enumerators for older versions.
+       (kCTCharacterCollectionAdobeJapan1 kCTFontOrientationDefault):
+       Add compatibility enumerators for older versions.
        (mac_font_descriptor_create_with_attributes)
        (mac_font_descriptor_create_matching_font_descriptors)
        (mac_font_descriptor_create_matching_font_descriptor)
@@ -5240,19 +6692,19 @@
        (mac_font_create_preferred_family_for_attributes)
        (mac_font_get_advance_width_for_glyph)
        (mac_font_get_bounding_rect_for_glyph)
-       (mac_font_create_available_families, mac_font_shape): Remove
-       macros for renamed functions.
+       (mac_font_create_available_families, mac_font_shape):
+       Remove macros for renamed functions.
        (mac_nsctfont_copy_font_descriptor): Remove unused macro.
-       * src/macterm.m (mac_font_descriptor_supports_languages): Rename
-       from mac_ctfont_descriptor_supports_languages.
+       * src/macterm.m (mac_font_descriptor_supports_languages):
+       Rename from mac_ctfont_descriptor_supports_languages.
        (mac_font_create_preferred_family_for_attributes): Rename from
        mac_ctfont_create_preferred_family_for_attributes.
        (mac_font_get_advance_width_for_glyph): Rename from
-       mac_ctfont_get_advance_width_for_glyph.  Use
-       kCTFontOrientationDefault also for older versions.
+       mac_ctfont_get_advance_width_for_glyph.
+       Use kCTFontOrientationDefault also for older versions.
        (mac_font_get_bounding_rect_for_glyph): Rename from
-       mac_ctfont_get_bounding_rect_for_glyph. Use
-       kCTFontOrientationDefault also for older versions.
+       mac_ctfont_get_bounding_rect_for_glyph.
+       Use kCTFontOrientationDefault also for older versions.
        (mac_font_create_available_families): Rename from
        mac_ctfont_create_available_families.
        (mac_font_equal_in_postscript_name): Rename from
@@ -5404,16 +6856,16 @@
        Use the new `seq-into-sequence' in seqs passed to `seq-concatenate' to
        ensure that concatenation happens on sequences only.  This makes it
        possible to use `seq-concatenate' for new types of seqs.
-       * lisp/emacs-lisp/seq.el (seq-into-sequence, seq-concatenate): New
-       function used in `seq-concatenate'.
+       * lisp/emacs-lisp/seq.el (seq-into-sequence, seq-concatenate):
+       New function used in `seq-concatenate'.
        * test/automated/seq-tests.el (test-seq-into-sequence): New unit test
        for seq-into-sequence.
 
 2015-08-26  Stephen Leake  <address@hidden>
 
        Add mode local overrides to xref-find-definitions
-       * lisp/cedet/mode-local.el (xref-mode-local--override-present,
-       xref-mode-local-overload): New; add mode local overrides to
+       * lisp/cedet/mode-local.el (xref-mode-local--override-present)
+       (xref-mode-local-overload): New; add mode local overrides to
        xref-find-definitions.
        * test/automated/elisp-mode-tests.el: Add mode local override tests.
        (xref-elisp-test-run): Handle indented defuns.
@@ -5422,8 +6874,8 @@
        (elisp--xref-find-definitions): Use it.
 
        Add mode local overrides to describe-function
-       * lisp/cedet/mode-local.el (describe-mode-local-overload): New; add mode
-       local overrides to describe-function.
+       * lisp/cedet/mode-local.el (describe-mode-local-overload):
+       New; add mode local overrides to describe-function.
        * etc/NEWS: Document change.
 
 2015-08-26  Paul Eggert  <address@hidden>
@@ -5615,7 +7067,6 @@
        * lisp/gnus/gnus-util.el (gnus-format-message):
        Fix typo when running in older Emacs.
 
-       Prefer directed to neutral quotes
        Prefer directed to neutral quotes in docstings and diagnostics.
        In docstrings, escape apostrophes that would otherwise be translated
        to curved quotes using the newer, simpler rules.
@@ -5704,7 +7155,7 @@
        Treat ' like ’ even when not matching `
        This is simpler and easier to explain, and should encourage better
        typography.  Do this in Electric Quote mode and when translating
-       quotes in docstrings.  Inspired by a suggestion by Dmitry Gutov in:
+       quotes in docstrings.  Inspired by a suggestion by Dmitry Gutov in:
        https://lists.gnu.org/archive/html/emacs-devel/2015-08/msg00806.html
        * doc/emacs/text.texi (Quotation Marks):
        * doc/lispref/help.texi (Keys in Documentation):
@@ -5721,8 +7172,8 @@
 
 2015-08-24  YAMAMOTO Mitsuharu  <address@hidden>
 
-       * src/macfont.m (macfont_create_family_with_symbol): Accept
-       localized names.
+       * src/macfont.m (macfont_create_family_with_symbol):
+       Accept localized names.
 
 2015-08-24  Paul Eggert  <address@hidden>
 
@@ -5837,12 +7288,12 @@
        (do_ewmh_fullscreen, x_ewmh_activate_frame): Adjust for rename.
        (x_check_fullscreen): Call `x_wm_set_size_hint', restore
        `fullscreen' frame parameter.
-       * gtkutil.c (x_wm_set_size_hint): Set size hints when running
+       * src/gtkutil.c (x_wm_set_size_hint): Set size hints when running
        without a window manager.
 
 2015-08-24  Glenn Morris  <address@hidden>
 
-       * lisp/version.el (emacs-version): No longer include build host
+       * lisp/version.el (emacs-version): No longer include build host.
        * doc/lispref/intro.texi (Version Info): Update example.
 
 2015-08-24  Paul Eggert  <address@hidden>
@@ -6003,8 +7454,8 @@
 
        python.el: Defer shell setup code until first interactive prompt
        * lisp/progmodes/python.el
-       (python-shell-comint-watch-for-first-prompt-output-filter): New
-       function.
+       (python-shell-comint-watch-for-first-prompt-output-filter):
+       New function.
        (inferior-python-mode): Use it.
        (python-shell-first-prompt-hook): New hook.
        (python-shell-send-setup-code)
@@ -6030,8 +7481,8 @@
        or printing candidates.
        (python-shell-completion-native-get-completions): Cleanup.
        (python-shell-completion-get-completions): Cleanup.
-       (python-shell-completion-at-point): Perform prompt checks.  Force
-       fallback completion in pdb interactions.
+       (python-shell-completion-at-point): Perform prompt checks.
+       Force fallback completion in pdb interactions.
 
 2015-08-23  Nicolas Petton  <address@hidden>
 
@@ -6045,8 +7496,8 @@
 2015-08-23  Fabián Ezequiel Gallina  <address@hidden>
 
        python.el: Fix prompt detection with user overridden interpreter
-       * lisp/progmodes/python.el (python-shell-prompt-detect): Honor
-       buffer local python-shell-interpreter and
+       * lisp/progmodes/python.el (python-shell-prompt-detect):
+       Honor buffer local python-shell-interpreter and
        python-shell-interpreter-interactive-arg.
 
 2015-08-23  Eli Zaretskii  <address@hidden>
@@ -6066,8 +7517,8 @@
 
 2015-08-23  Xue Fuqiao  <address@hidden>
 
-       * doc/lispintro/emacs-lisp-intro.texi (Switching Buffers): Clarify
-       "invisible window".
+       * doc/lispintro/emacs-lisp-intro.texi (Switching Buffers):
+       Clarify "invisible window".
 
 2015-08-23  Xue Fuqiao  <address@hidden>
 
@@ -6095,7 +7546,7 @@
        python-eldoc-setup-code.  Return non-nil only if docstring is
        found.
 
-       python.el: Increase native completion robustness.
+       python.el: Increase native completion robustness
        * lisp/progmodes/python.el (python-shell-completion-native-setup):
        Make completer print real candidates and just return dummy ones to
        avoid input modification.
@@ -6124,8 +7575,8 @@
 2015-08-22  Eli Zaretskii  <address@hidden>
 
        Support invocation of Hunspell with multiple dictionaries
-       * lisp/textmodes/ispell.el (ispell-parse-hunspell-affix-file): Support
-       lists of dictionaries of the form "DICT1,DICT2,...".
+       * lisp/textmodes/ispell.el (ispell-parse-hunspell-affix-file):
+       Support lists of dictionaries of the form "DICT1,DICT2,...".
        (ispell-hunspell-add-multi-dic): New command.  (Bug#20495)
 
        Minor formatting changes in ispell.el
@@ -6147,19 +7598,16 @@
 
 2015-08-22  Martin Rudalics  <address@hidden>
 
-       In ‘adjust-window-trailing-edge’ fix bug with size-preserved windows.
        * lisp/window.el (adjust-window-trailing-edge): Fix bug where this
        function refused to resize a size-preserved window.
 
 2015-08-22  Eli Zaretskii  <address@hidden>
 
-       Improve documentation of 'window-use-time'
        * doc/lispref/windows.texi (Selecting Windows): Improve
        documentation and indexing of 'window-use-time'.
 
 2015-08-21  Stefan Monnier  <address@hidden>
 
-       * lisp/progmodes/cc-*.el: Fix up commenting style
        * lisp/progmodes/cc-vars.el, lisp/progmodes/cc-styles.el:
        * lisp/progmodes/cc-mode.el, lisp/progmodes/cc-menus.el:
        * lisp/progmodes/cc-langs.el, lisp/progmodes/cc-guess.el:
@@ -6331,7 +7779,7 @@
 
 2015-08-21  Stefan Monnier  <address@hidden>
 
-       * lisp/emacs-lisp/smie.el (smie-indent-current-column): New fun
+       * lisp/emacs-lisp/smie.el (smie-indent-current-column): New fun.
        (smie-indent-exps, smie-indent-keyword): Use it.
        * test/indent/css-mode.css: Test alignment with leading comment.
 
@@ -6350,9 +7798,8 @@
 
 2015-08-21  Eli Zaretskii  <address@hidden>
 
-       A better fix for bug#21303
-       * src/w32uniscribe.c (_WIN32_WINNT): Define to 0x0600.  This is a
-       cleaner fix for Bug#21260 than the previous change.
+       * src/w32uniscribe.c (_WIN32_WINNT): Define to 0x0600.
+       This is a cleaner fix for Bug#21260 than the previous change.
 
 2015-08-21  Paul Eggert  <address@hidden>
 
@@ -6466,11 +7913,11 @@
        frame" instead of "non-minibuffer frame".
 
        Fix frame geometry related text
-       * doc/lispref/frames.texi (Frame Layout): Rename
-       `x-frame-geometry' to `frame-geometry'.
+       * doc/lispref/frames.texi (Frame Layout):
+       Rename `x-frame-geometry' to `frame-geometry'.
        * doc/lispref/frames.texi (Mouse Position):
-       * doc/lispref/windows.texi (Coordinates and Windows): Use
-       `set-mouse-absolute-pixel-position' instead of
+       * doc/lispref/windows.texi (Coordinates and Windows):
+       Use `set-mouse-absolute-pixel-position' instead of
        `x-set-mouse-absolute-pixel-position'.
 
        Sanitize frame geometry related functions
@@ -6502,8 +7949,8 @@
 2015-08-21  Tassilo Horn  <address@hidden>
 
        Add TeX defaults for prettify-symbol-mode
-       * lisp/textmodes/tex-mode.el (tex--prettify-symbols-alist): Rename
-       from tex-prettify-symbols-alist.
+       * lisp/textmodes/tex-mode.el (tex--prettify-symbols-alist):
+       Rename from tex-prettify-symbols-alist.
        (tex--prettify-symbols-compose-p): New function.
        (tex-common-initialization): Use them as prettify-symbols-alist
        and prettify-symbols-compose-predicate.
@@ -6578,11 +8025,11 @@
        * doc/lispref/display.texi (Size of Displayed Text, Line Height)
        (Showing Images): Update references.
        * doc/lispref/elisp.texi (Top): Update node listing.
-       * doc/lispref/frames.texi (Frame Geometry): New node.  Move
-       `Size and Position' section here.
+       * doc/lispref/frames.texi (Frame Geometry): New node.
+       Move `Size and Position' section here.
        (Size Parameters): Update references.
-       (Mouse Position): Update references and nomenclature.  Describe
-       new functions `x-mouse-absolute-pixel-position' and
+       (Mouse Position): Update references and nomenclature.
+       Describe new functions `x-mouse-absolute-pixel-position' and
        `x-set-mouse-absolute-pixel-position'.
        * doc/lispref/windows.texi (Window Sizes): Update references.
        (Resizing Windows): Update references.  Move description of
@@ -6596,12 +8043,11 @@
 2015-08-20  Alan Mackenzie  <address@hidden>
 
        Handling of `c-parse-state'.  Fix low level bug.
-       progmodes/cc-engine.el (c-remove-stale-state-cache-backwards): Add
-       "CASE 3.5" to handle `cache-pos' being only slightly before `here'.
+       * lisp/progmodes/cc-engine.el (c-remove-stale-state-cache-backwards):
+       Add "CASE 3.5" to handle `cache-pos' being only slightly before `here'.
 
 2015-08-20  Andreas Politz  <address@hidden>
 
-       In `widget-color--choose-action' quit *Color* window instead of 
deleting it
        * lisp/wid-edit.el (widget-color--choose-action): Quit *Color*
        window instead of deleting it.
 
@@ -6615,8 +8061,9 @@
 2015-08-20  Tassilo Horn  <address@hidden>
 
        Add a prettify-symbols-alist for (La)TeX
-       * tex-mode.el (tex-prettify-symbols-alist): New variable holding
-       an alist suitable as prettify-symbols-alist in (La)TeX modes.
+       * lisp/textmodes/tex-mode.el (tex-prettify-symbols-alist):
+       New variable holding an alist suitable as prettify-symbols-alist in
+       (La)TeX modes.
 
 2015-08-19  Alan Mackenzie  <address@hidden>
 
@@ -6624,12 +8071,13 @@
        Fixes debbugs#21275.
        In Emacs >= 25, let electric-pair-mode take precedence over
        delete-selection-mode.
-       delsel.el (delete-selection-uses-region-p): New function, previously a
-       lambda expression in a property value for `self-insert-command'.
-       (top-level) Set the `delete-selection' property of `self-insert-command'
-       to `delete-selection-uses-region-p'.
-       progmodes/cc-cmds.el (top-level): Give the `delete-selection' property
-       for c-electric-\(brace\|paren\) the value
+       * lisp/delsel.el (delete-selection-uses-region-p): New function,
+       previously a lambda expression in a property value for
+       `self-insert-command'.
+       (top-level): Set the `delete-selection' property of
+       `self-insert-command' to `delete-selection-uses-region-p'.
+       * lisp/progmodes/cc-cmds.el (top-level): Give the `delete-selection'
+       property for c-electric-\(brace\|paren\) the value
        `delete-selection-uses-region-p' when the latter function exists.
 
 2015-08-19  Paul Eggert  <address@hidden>
@@ -6668,12 +8116,12 @@
 
 2015-08-19  Artur Malabarba  <address@hidden>
 
-       * isearch.el (isearch-search-fun-default): Revert a5bdb87
+       * lisp/isearch.el (isearch-search-fun-default): Revert a5bdb87
        Remove usage of `isearch-lax-whitespace' inside the `iearch-word'
-       clause of `isearch-search-fun-default'. That lax variable does not
+       clause of `isearch-search-fun-default'.  That lax variable does not
        refer to lax-whitespacing.  Related to (bug#21777).
        This reverts commit a5bdb872edb9f031fe041faf9a8c0be432e5f64c.
-       * character-fold.el (character-fold-search): Set to nil.
+       * lisp/character-fold.el (character-fold-search): Set to nil.
        Default to nil for now, until someone implements proper
        lax-whitespacing with char-fold searching.
 
@@ -6734,7 +8182,7 @@
 
 2015-08-19  Martin Rudalics  <address@hidden>
 
-       In w32fns.c condition TITLEBAR_INFO declaration on WINDOWS version.
+       In w32fns.c condition TITLEBAR_INFO declaration on WINDOWS version
        * src/w32fns.c (TITLEBAR_INFO): Make it a typedef so MinGW64
        builds can use the declaration from the system headers.
        (GetTitleBarInfo_Proc, Fx_frame_geometry): Adapt to new
@@ -6933,11 +8381,12 @@
 
 2015-08-17  Lars Magne Ingebrigtsen  <address@hidden>
 
-       * message.el (message-toggle-image-thumbnails): New command.
+       * lisp/gnus/message.el (message-toggle-image-thumbnails): New command.
 
 2015-08-17  Noah Friedman  <address@hidden>
 
-       (blink-matching-open): Restore point before calling minibuffer-message.
+       * lisp/simple.el (blink-matching-open): Restore point before
+       calling minibuffer-message.
 
 2015-08-17  Ronnie Schnell  <address@hidden>
 
@@ -7045,7 +8494,7 @@
        * lisp/simple.el (execute-extended-command)
        (undo-outer-limit-truncate, compose-mail, set-variable)
        (choose-completion-string, define-alternatives):
-       * lisp/startup.el (site-run-file, tty-handle-args, )
+       * lisp/startup.el (site-run-file, tty-handle-args)
        (command-line, command-line-1):
        * lisp/subr.el (noreturn, define-error, add-to-list)
        (read-char-choice):
@@ -7129,7 +8578,7 @@
 
 2015-08-15  Stephen Leake  <address@hidden>
 
-       Allow describe-function helpers to access buffer-local values.
+       Allow describe-function helpers to access buffer-local values
        This will be used by cedet/mode-local.el `describe-mode-local-override'
        on `help-fns-describe-function-functions' in upstream CEDET.
        * lisp/help-fns.el (describe-function-orig-buffer): New, let-bound in
@@ -7153,7 +8602,6 @@
 
 2015-08-15  Dani Moncayo  <address@hidden>
 
-       Remove 'nt/zipdist.bat' (no longer used)
        * nt/zipdist.bat: Remove -- no longer used.
 
 2015-08-15  Jürgen Hötzel  <address@hidden>
@@ -7307,11 +8755,10 @@
 
 2015-08-13  Stefan Monnier  <address@hidden>
 
-       * lisp/progmodes/sh-script.el (sh-mode): Handle .cshrc (bug#21049)
+       * lisp/progmodes/sh-script.el (sh-mode): Handle .cshrc (bug#21049).
 
 2015-08-13  Magnus Henoch  <address@hidden>
 
-       * lisp/progmodes/compile.el: Assume 8-wide TABs (bug#21038)
        * lisp/progmodes/compile.el: Use lexical-binding.
        (compilation-move-to-column): Assume 8-wide TABs (bug#21038).
 
@@ -7351,7 +8798,8 @@
 2015-08-13  Stephen Leake  <address@hidden>
 
        xref-find-definitions: Exclude more generic function items.
-       * lisp/emacs-lisp/cl-generic.el (cl--generic-search-method): Add doc 
string.
+       * lisp/emacs-lisp/cl-generic.el (cl--generic-search-method):
+       Add doc string.
        (cl--generic-find-defgeneric-regexp): New.
        (find-function-regexp-alist): Add it.
        * lisp/emacs-lisp/find-func.el (find-feature-regexp): Move here from
@@ -7359,11 +8807,11 @@
        (find-alias-regexp): Move here from elisp-mode.el, cleaned up.
        (find-function-regexp-alist): Add them.
        * lisp/progmodes/elisp-mode.el:
-       (elisp--xref-format, elisp--xref-format-extra): Change back to defvar 
due
-       to bug#21237.
+       (elisp--xref-format, elisp--xref-format-extra): Change back to
+       defvar due to bug#21237.
        (elisp--xref-find-definitions): Exclude co-located default methods for
-       generic functions. Also exclude implicitly declared defgeneric.
-       (elisp--xref-find-definitions): Handle C source properly. Exclude minor
+       generic functions.  Also exclude implicitly declared defgeneric.
+       (elisp--xref-find-definitions): Handle C source properly.  Exclude minor
        mode variables defined by 'define-minor-mode'.
        * test/automated/elisp-mode-tests.el: Declare generic functions, add
        tests for them.
@@ -7380,10 +8828,10 @@
 
 2015-08-12  Alan Mackenzie  <address@hidden>
 
-       Introduce new macros to cover Emacs's new names in cl-lib.el.
+       Introduce new macros to cover Emacs's new names in cl-lib.el
        This also eliminates `mapcan' warnings in XEmacs.
-       progmodes/cc-defs.el (c--mapcan-status): new variable to characterise
-       [X]Emacs versions.
+       * lisp/progmodes/cc-defs.el (c--mapcan-status): New variable to
+       characterise [X]Emacs versions.
        (top-level): Require either 'cl or 'cl-lib, depending on
        c--mapcan-status.
        Change this back to cc-external-require from an eval-when-compile
@@ -7391,12 +8839,12 @@
        (c--mapcan, c--set-difference, c--intersection, c--macroexpand-all)
        (c--delete-duplicates): New macros which expand into either old or new
        names.
-       (c-make-keywords-re, c-lang-defconst, c-lang-const) Use the new macros
+       (c-make-keywords-re, c-lang-defconst, c-lang-const): Use the new macros
        rather than the old names.
-       progmodes/cc-engine.el (c-declare-lang-variables): Use c--mapcan rather
-       than mapcan.
-       progmodes/cc-fonts.el (c-compose-keywords-list): Use c--mapcan.
-       progmodes/cc-langs.el (top-level): Require either 'cl or 'cl-lib,
+       * lisp/progmodes/cc-engine.el (c-declare-lang-variables): Use c--mapcan
+       rather than mapcan.
+       * lisp/progmodes/cc-fonts.el (c-compose-keywords-list): Use c--mapcan.
+       * lisp/progmodes/cc-langs.el (top-level): Require either 'cl or 'cl-lib,
        depending on c--mapcan-status.
        (c-filter-ops, c-all-op-syntax-tokens, c-assignment-op-regexp)
        (c-type-start-kwds, c-prefix-spec-kwds, c-specifier-key)
@@ -7419,7 +8867,7 @@
 2015-08-12  David Kastrup  <address@hidden>
 
        Deal gracefully with up-events (Bug#19746)
-       * keyboard.c (apply_modifiers_uncached, parse_solitary_modifier)
+       * src/keyboard.c (apply_modifiers_uncached, parse_solitary_modifier)
        (parse_modifiers_uncached): React gracefully to "up-" modifiers:
        those may easily be injected by user-level Lisp code.
        (read_key_sequence): Discard unbound up-events like unbound
@@ -7441,18 +8889,18 @@
 2015-08-12  Richard Stallman  <address@hidden>
 
        Offer to combine multiple To or CC fields.
-       * sendmail.el (mail-combine-fields): New function.
+       * lisp/mail/sendmail.el (mail-combine-fields): New function.
        (mail-send): Call 'mail-combine-fields'.
 
        Don't decrypt encrypted files.
-       * mail-utils.el (mail-file-babyl-p): Bind epa-inhibit to t.
+       * lisp/mail/mail-utils.el (mail-file-babyl-p): Bind epa-inhibit to t.
 
        Handle encrypted mbox files.
-       * rmailout.el (rmail-output-as-mbox): Decrypt and reencrypt the mbox
-       file if necessary.
+       * lisp/mail/rmailout.el (rmail-output-as-mbox): Decrypt and reencrypt
+       the mbox file if necessary.
 
        Re-enable mime processing after decryption.  Add 'decrypt' keyword.
-       * rmail.el (rmail-epa-decrypt-1): New subroutine.
+       * lisp/mail/rmail.el (rmail-epa-decrypt-1): New subroutine.
        (rmail-epa-decrypt): rmail-epa-decrypt-1 broken out.
        In a mime message, reenable Mime and show the parts that
        were shown before.
@@ -7464,12 +8912,12 @@
 
 2015-08-12  Artur Malabarba  <address@hidden>
 
-       * emacs-lisp/lisp-mnt.el (lm-header): Add save-excursion.
+       * lisp/emacs-lisp/lisp-mnt.el (lm-header): Add save-excursion.
 
 2015-08-11  Fabián Ezequiel Gallina  <address@hidden>
 
        Respect python.el imenu when semantic-mode is off
-       Fixes debbugs:21220
+       Fixes bug#21220
        * lisp/cedet/semantic/wisent/python.el: Do not force
        wisent-python-default-setup on python-mode-hook.
 
@@ -7523,7 +8971,7 @@
 
 2015-08-10  Stephen Leake  <address@hidden>
 
-       Rewrite elisp--xref-find-definitions to handle many more cases; add 
tests.
+       Rewrite elisp--xref-find-definitions to handle many more cases; add 
tests
        * lisp/progmodes/elisp-mode.el (elisp--xref-identifier-location):
        Function deleted.
        (elisp--xref-format-cl-defmethod): New defconst.
@@ -7620,7 +9068,6 @@
 
 2015-08-09  Paul Eggert  <address@hidden>
 
-       Remove no-op calls to substitute-command-keys
        * lisp/org/org-src.el (org-edit-src-code)
        (org-edit-fixed-width-region):
        * lisp/simple.el (completion-setup-function):
@@ -7629,8 +9076,7 @@
 
 2015-08-09  Daiki Ueno  <address@hidden>
 
-       Utilize `quit-window' in epa.el
-       * epa.el (epa-exit-buffer-function): Set to `quit-window'.
+       * lisp/epa.el (epa-exit-buffer-function): Set to `quit-window'.
        (Bug#21210)
 
 2015-08-09  Ivan Kanis  <address@hidden>
@@ -7643,7 +9089,7 @@
 
 2015-08-09  Artur Malabarba  <address@hidden>
 
-       * isearch.el (isearch-search-fun-default): (Bug#21164)
+       * lisp/isearch.el (isearch-search-fun-default): (Bug#21164)
        Respect `isearch-lax-whitespace' when searching through
        `isearch-word'.
 
@@ -7707,8 +9153,8 @@
        * src/sysdep.c [HAVE_STACK_OVERFLOW_HANDLING]: Add !WINDOWSNT to
        the condition, as HAVE_STACK_OVERFLOW_HANDLING is now defined for
        the MinGW build, but the code guarded by that is for Posix hosts.
-       * src/keyboard.c (command_loop) [WINDOWSNT]: Call
-       w32_reset_stack_overflow_guard.
+       * src/keyboard.c (command_loop) [WINDOWSNT]:
+       Call w32_reset_stack_overflow_guard.
        * nt/inc/ms-w32.h (sigjmp_buf): New typedef.
        (sigsetjmp): New macro.
        (w32_reset_stack_overflow_guard): Declare the prototype.
@@ -7717,7 +9163,7 @@
 2015-08-07  Phillip Lord  <address@hidden>
 
        Improve error signalling for seq-subseq
-       * lisp/seq.el (seq-subseq): The existing behaviour is to error
+       * lisp/seq.el (seq-subseq): The existing behavior is to error
        when indexes are too large, but to silently ignore numbers which
        are too negative for lists.  String and vector handling errors in
        both cases.  This has been regularized.  Error signaling behavior
@@ -7747,8 +9193,8 @@
 
        Fix typo in lisp/window.el, more `display-buffer-use-some-frame'
        * lisp/window.el: Fix typo that broke build.
-       (display-buffer--action-function-custom-type): Add
-       `display-buffer-use-some-frame'.
+       (display-buffer--action-function-custom-type):
+       Add `display-buffer-use-some-frame'.
        (display-buffer): Add `display-buffer-use-some-frame' to doc string.
 
        Add support for 'inhibit-same-window in 'display-buffer-use-some-frame'
@@ -7830,7 +9276,7 @@
        http://lists.gnu.org/archive/html/emacs-devel/2015-08/msg00152.html
        * lisp/progmodes/xref.el (xref--goto-char): Extract from
        xref--goto-location.
-       (xref--pop-to-location): Use it. Replace xref--goto-location with
+       (xref--pop-to-location): Use it.  Replace xref--goto-location with
        a direct xref-location-marker call.
        (xref--show-location): Likewise.
        (xref--display-position): Use xref--goto-char.
@@ -7839,7 +9285,6 @@
 
 2015-08-04  David Kastrup  <address@hidden>
 
-       Do not overwrite preexisting contents of unread-command-events
        * lisp/vc/emerge.el (emerge-show-file-name):
        * lisp/progmodes/vhdl-mode.el (vhdl-electric-dash)
        (vhdl-comment-insert, vhdl-hooked-abbrev):
@@ -7878,8 +9323,7 @@
        * lisp/double.el (double-translate-key):
        * lisp/comint.el (comint-dynamic-list-input-ring)
        (comint-dynamic-list-completions): Do not overwrite preexisting
-       contents of `unread-command-events' when putting new events into
-       it.
+       contents of `unread-command-events' when putting new events into it.
 
 2015-08-04  Daniel Colascione  <address@hidden>
 
@@ -8109,7 +9553,7 @@
 
 2015-07-31  Artur Malabarba  <address@hidden>
 
-       * lisp/emacs-lisp/tabulated-list.el (tabulated-list-print): Fix bug
+       * lisp/emacs-lisp/tabulated-list.el (tabulated-list-print):
        When updating the very last entry, tabulated-list-print would
        erase it and then try to look at the next one (which obviously
        isn't there).
@@ -8120,8 +9564,8 @@
        * src/w32fns.c (syms_of_w32fns) <w32-use-fallback-wm-chars-method>:
        New variable.
        (w32_wnd_proc): Use it to invoke the old code that processed
-       character keys, as fallback, when this variable is non-nil.  Fix
-       typos in comments.  (Bug#19994)
+       character keys, as fallback, when this variable is non-nil.
+       Fix typos in comments.  (Bug#19994)
 
 2015-07-31  Ilya Zakharevich  <address@hidden>
 
@@ -8162,26 +9606,26 @@
 
 2015-07-30  Stephen Leake  <address@hidden>
 
-       vc-mtn-find-revision handle null rev.
-       * lisp/vc/vc-mtn.el (vc-mtn-find-revision): handle null rev
+       * lisp/vc/vc-mtn.el (vc-mtn-find-revision): Handle null rev.
 
 2015-07-29  Stephen Leake  <address@hidden>
 
        Add docs for display-buffer action display-buffer-use-some-frame
-       * lisp/window.el (display-buffer-use-some-frame): improve doc string
-       * doc/lispref/windows.texi (Display Action Functions): add
-         display-buffer-use-some-frame
-       * etc/NEWS: mention display-buffer-use-some-frame
+       * lisp/window.el (display-buffer-use-some-frame): Improve doc string.
+       * doc/lispref/windows.texi (Display Action Functions):
+       Add display-buffer-use-some-frame.
+       * etc/NEWS: Mention display-buffer-use-some-frame.
 
        Add display-buffer action display-buffer-use-some-frame
-       * lisp/window.el (display-buffer-use-some-frame): new
+       * lisp/window.el (display-buffer-use-some-frame): New.
 
        Handle vc-mtn error more gently
-       * lisp/vc/vc-mtn.el (vc-mtn-mode-line-string): return "" when branch is 
nil
+       * lisp/vc/vc-mtn.el (vc-mtn-mode-line-string): Return "" when
+       branch is nil.
 
 2015-07-29  Michael Albinus  <address@hidden>
 
-       Fix Tramp problems with multihops, and nc.
+       Fix Tramp problems with multihops, and nc
        * lisp/net/tramp-cache.el (tramp-get-file-property)
        (tramp-set-file-property, tramp-flush-file-property)
        (tramp-get-connection-property, tramp-set-connection-property)
@@ -8250,7 +9694,8 @@
 
 2015-07-27  Xue Fuqiao  <address@hidden>
 
-       * doc/lispref/variables.texi (Variable Aliases): Typo fix.  (Bug#21141)
+       * doc/lispref/variables.texi (Variable Aliases): Typo fix.
+       (Bug#21141)
 
 2015-07-27  Paul Eggert  <address@hidden>
 
@@ -8268,8 +9713,7 @@
        * src/w32heap.c (FREEABLE_P): Consider a NULL pointer "not
        freeable".
        (realloc_after_dump, realloc_before_dump, free_before_dump):
-       Handle NULL pointers gracefully, as Emacs now seems to expect
-       that.
+       Handle NULL pointers gracefully, as Emacs now seems to expect that.
 
        Fix Cairo build without PNG
        * src/image.c: Define PNG function when USE_CAIRO is defined, even
@@ -8365,7 +9809,8 @@
 
 2015-07-26  Martin Rudalics  <address@hidden>
 
-       Have `x-frame-geometry' return nil for terminal and initial frames 
(Bug#21132)
+       Have `x-frame-geometry' return nil for terminal and initial
+       frames (Bug#21132)
        * src/nsfns.m (Fx_frame_geometry):
        * src/xfns.c (Fx_frame_geometry): Return nil for initial and
        terminal frames.
@@ -8407,7 +9852,8 @@
 
 2015-07-24  Eli Zaretskii  <address@hidden>
 
-       * INSTALL (DETAILED BUILDING AND INSTALLATION): Mention 
--without-imagemagick.
+       * 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)
@@ -8444,7 +9890,6 @@
 
 2015-07-22  Martin Rudalics  <address@hidden>
 
-       Fix customization type of `even-window-sizes'.
        * lisp/window.el (even-window-sizes): Fix customization type.
 
        Optionally even widths of `display-buffer' windows.  (Bug#21100)
@@ -8465,13 +9910,12 @@
 
 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.
+       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.
 
@@ -8513,12 +9957,14 @@
        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-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.
+       (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.
@@ -8535,14 +9981,15 @@
        (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-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.
+       * 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.
@@ -8579,11 +10026,9 @@
        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'.
 
@@ -8602,14 +10047,13 @@
 
 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.
+       * lisp/progmodes/cfengine.el (cfengine3-mode): Handle nil
+       eldoc-documentation-function.
 
 2015-07-18  Julien Danjou  <address@hidden>
 
@@ -8628,11 +10072,12 @@
 
 2015-07-18  Ivan Andrus  <address@hidden>
 
-       * epg.el (epg--start): Check that gpgconf can be found before calling 
it.
+       * lisp/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.
+       Expose more file types to OS X that Emacs understands
+       * nextstep/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>
 
@@ -8666,15 +10111,15 @@
 
 2015-07-17  Artur Malabarba  <address@hidden>
 
-       * lisp/emacs-lisp/package.el: Fix warnings
+       * 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
+       * 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.
+       (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'.
 
@@ -8710,12 +10155,12 @@
 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.
+       * lisp/net/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.
+       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
@@ -8749,13 +10194,13 @@
 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
+       * lisp/epg-config.el (epg-gpgconf-program): New variable.
+       * lisp/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
+       * lisp/gnus/nnimap.el: Fix my last bogus change.
        Reinstall Stefan Monnier's change that was made in
        <83d824bc4041332f338ad7e5e830f443535aa300>.
 
@@ -8775,11 +10220,12 @@
 
 2015-07-15  Xue Fuqiao  <address@hidden>
 
-       * doc/emacs/frames.texi (Creating Frames): Fix the command `C-x 5 m' 
runs.
+       * doc/emacs/frames.texi (Creating Frames):
+       Fix the command `C-x 5 m' runs.
 
 2015-07-14  Michael Albinus  <address@hidden>
 
-       New autorevert tests.
+       New autorevert tests
        * test/automated/auto-revert-tests.el: New file.
 
 2015-07-14  Paul Eggert  <address@hidden>
@@ -8793,7 +10239,8 @@
 
 2015-07-13  Xue Fuqiao  <address@hidden>
 
-       * doc/emacs/windows.texi (Pop Up Window): Fix the description of `C-x 4 
m'.
+       * doc/emacs/windows.texi (Pop Up Window): Fix the description
+       of `C-x 4 m'.
 
 2015-07-13  YAMAMOTO Mitsuharu  <address@hidden>
 
@@ -8812,8 +10259,8 @@
        (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
+       (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>
@@ -8824,7 +10271,6 @@
        `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.
@@ -8833,7 +10279,7 @@
 
        Add `project-ignores'
        * lisp/progmodes/project.el (project-ignores): New generic
-       function, and an implementation for the VC project type.
+       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.
@@ -8886,7 +10332,8 @@
 
 2015-07-10  YAMAMOTO Mitsuharu  <address@hidden>
 
-       * src/macfont.m (macfont_list): Ignore font families lacking font 
descriptors.
+       * src/macfont.m (macfont_list): Ignore font families lacking
+       font descriptors.
 
 2015-07-09  Dmitry Gutov  <address@hidden>
 
@@ -8896,7 +10343,7 @@
 
        Introduce a Project API
        * lisp/progmodes/project.el: New file.
-       * lisp/cedet/ede.el: (project-try-ede): New function.
+       * 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.
@@ -8915,7 +10362,8 @@
 
 2015-07-09  Nicolas Petton  <address@hidden>
 
-       * test/automated/map-tests.el (test-map-delete-return-value): Uncomment 
test.
+       * 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.
@@ -8950,11 +10398,12 @@
 
        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.
+       sure boundary contains current point.
 
 2015-07-08  Dmitry Gutov  <address@hidden>
 
-       * lisp/progmodes/xref.el (xref-collect-matches): Use `nreverse' in the 
end.
+       * 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
@@ -8992,7 +10441,7 @@
 
 2015-07-08  Nicolas Richard  <address@hidden>
 
-       * lisp/obsolete/landmark.el: Add Obsolete-since header
+       * lisp/obsolete/landmark.el: Add Obsolete-since header.
 
 2015-07-07  Glenn Morris  <address@hidden>
 
@@ -9025,16 +10474,16 @@
 
 2015-07-07  Artur Malabarba  <address@hidden>
 
-       * lisp/emacs-lisp/package.el (package-compute-transaction): Bug fix
+       * lisp/emacs-lisp/package.el (package-compute-transaction):
        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/
+       * 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.
+       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
@@ -9093,8 +10542,8 @@
 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.
+       * 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.
 
@@ -9104,7 +10553,7 @@
 
 2015-07-06  Ken Brown  <address@hidden>
 
-       * src/sysdep.c (handle_sigsegv) [CYGWIN]: Increase STACK_DANGER_ZONE
+       * src/sysdep.c (handle_sigsegv) [CYGWIN]: Increase STACK_DANGER_ZONE.
 
 2015-07-06  Glenn Morris  <address@hidden>
 
@@ -9112,7 +10561,7 @@
 
 2015-07-06  Ken Brown  <address@hidden>
 
-       * src/emacs.c (main): Don't increase the stack size on Cygwin
+       * src/emacs.c (main): Don't increase the stack size on Cygwin.
 
 2015-07-06  Stefan Monnier  <address@hidden>
 
@@ -9125,9 +10574,9 @@
        * 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.
+       `file' arg (bug#20972).  Always use utf-8-emacs.  Use with-temp-buffer
+       and cl-letf.
 
 2015-07-06  Wolfgang Jenkner  <address@hidden>
 
@@ -9163,7 +10612,7 @@
        logic.
 
        python.el: Fix mark-defun behavior  (Bug#19665)
-       * lisp/progmodes/python.el: (python-mark-defun): New function.
+       * 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.
 
@@ -9190,7 +10639,7 @@
        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
+       from any processes.  Revert part of it, and limit the timeout more
        sensibly (Bug#20978).
 
        Refactor timeouts in wait_reading_process_output
@@ -9216,7 +10665,7 @@
 2015-07-05  Ian Kelling  <address@hidden>
 
        accept-process-output fix
-       This is a followon to the fix for Bug#17647 (Bug#20976).
+       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>
@@ -9283,9 +10732,10 @@
        * 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)
+       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.
 
 2015-07-03  Glenn Morris  <address@hidden>
 
@@ -9316,7 +10766,6 @@
 
 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.
 
@@ -9329,20 +10778,19 @@
 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:
+       * 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)
+       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.
 
@@ -9350,7 +10798,7 @@
        * lisp/frame.el (window-divider-mode): Fix doc-string.
        * doc/emacs/frames.texi (Window Dividers): New section.
 
-       Improve accessibility of window dividers.  (Bug#20183)
+       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.
@@ -9389,9 +10837,8 @@
 
 2015-07-01  Nicolas Richard  <address@hidden>
 
-       * lisp/emacs-lisp/seq.el (seq-difference): Fix typo in docstring
+       * 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).
 
@@ -9428,10 +10875,13 @@
 2015-06-30  Paul Eggert  <address@hidden>
 
        Spelling fixes
+       * lisp/character-fold.el (character-fold-search):
+       * lisp/emacs-lisp/package.el (package-hidden-regexps):
+       Fix typos.
 
 2015-06-30  Xue Fuqiao  <address@hidden>
 
-       * doc/emacs/frames.texi (Frame Commands): Typo fix. (Bug#20946)
+       * doc/emacs/frames.texi (Frame Commands): Typo fix.  (Bug#20946)
 
 2015-06-30  Paul Eggert  <address@hidden>
 
@@ -9468,7 +10918,7 @@
 
        * configure.ac (system-configuration-features): Add X11, NS.
 
-       Improve reproducibility of generated loaddefs file.
+       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,
@@ -9476,7 +10926,7 @@
 
 2015-06-30  Artur Malabarba  <address@hidden>
 
-       * lisp/emacs-lisp/package.el (package--remove-hidden): Fix logic
+       * lisp/emacs-lisp/package.el (package--remove-hidden): Fix logic.
        (Bug#20930)
 
 2015-06-30  Nicolas Petton  <address@hidden>
@@ -9518,7 +10968,7 @@
 
 2015-06-30  Artur Malabarba  <address@hidden>
 
-       * lisp/isearch.el (isearch-toggle-word): Fix toggle
+       * lisp/isearch.el (isearch-toggle-word): Fix toggle.
 
        * lisp/emacs-lisp/package.el (package-compute-transaction):
        Don't assume version sorting.
@@ -9529,19 +10979,17 @@
 
 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.
+       * lisp/progmodes/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.
@@ -9557,10 +11005,13 @@
 2015-06-29  Michael R. Mauger  <address@hidden>
 
        Cygwin emacsclient handles w32 file names
+       * lisp/server.el (server-process-filter): Allow Cygwin's
+       emacsclient to be used as a file handler on MS-Windows.
 
 2015-06-29  Katsumi Yamaoka  <address@hidden>
 
-       * lisp/isearch.el (isearch-exit): Don't call isearch-done twice 
(bug#20925).
+       * lisp/isearch.el (isearch-exit): Don't call isearch-done twice
+       (bug#20925).
 
 2015-06-29  Eli Zaretskii  <address@hidden>
 
@@ -9580,7 +11031,8 @@
 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)
+       Otherwise `s p' of f and F will stomp on each other's value.
+       (Bug#20916)
 
 2015-06-29  Artur Malabarba  <address@hidden>
 
@@ -9589,9 +11041,11 @@
 
 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): Use symbol-at-point
+       as additional guess.
 
-       * lisp/emacs-lisp/package.el (describe-package): Convert the guess to a 
string
+       * lisp/emacs-lisp/package.el (describe-package): Convert the guess
+       to a string.
 
 2015-06-28  Paul Eggert  <address@hidden>
 
@@ -9613,8 +11067,7 @@
 
 2015-06-28  Artur Malabarba  <address@hidden>
 
-       * lisp/isearch.el (isearch-mode): Don't char-fold regexps
-       (bug#20913)
+       * lisp/isearch.el (isearch-mode): Don't char-fold regexps (bug#20913).
 
 2015-06-27  Dmitry Gutov  <address@hidden>
 
@@ -9681,15 +11134,16 @@
 
 2015-06-26  Artur Malabarba  <address@hidden>
 
-       * lisp/replace.el (replace-search): Fix regexp case (bug#20901)
+       * 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.
+       `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>
 
@@ -9707,11 +11161,10 @@
 
 2015-06-26  Martin Rudalics  <address@hidden>
 
-       Provide invisible mouse pointers on Windows.  (Bug#6105) (Bug#12922)
+       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.
+       * 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.
@@ -9739,7 +11192,7 @@
 
 2015-06-25  Artur Malabarba  <address@hidden>
 
-       * lisp/character-fold.el (character-fold-table): Reuse `table'
+       * lisp/character-fold.el (character-fold-table): Reuse `table'.
 
 2015-06-25  Paul Eggert  <address@hidden>
 
@@ -9760,8 +11213,8 @@
 
        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'.
+       `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>
 
@@ -9802,7 +11255,7 @@
 
 2015-06-24  Artur Malabarba  <address@hidden>
 
-       * lisp/character-fold.el (character-fold-table): Fix table generation
+       * lisp/character-fold.el (character-fold-table): Fix table generation.
 
 2015-06-24  Glenn Morris  <address@hidden>
 
@@ -9811,7 +11264,7 @@
 
 2015-06-24  Artur Malabarba  <address@hidden>
 
-       * etc/NEWS: Fix mention to old function name
+       * etc/NEWS: Fix mention to old function name.
 
        * lisp/character-fold.el: New file (Bug#20887)
        (character-fold-to-regexp): New function.
@@ -9825,11 +11278,10 @@
 
 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): 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.
 
@@ -9839,14 +11291,15 @@
 
 2015-06-24  Stefan Monnier  <address@hidden>
 
-       * lisp/gnus/nnmaildir.el: Silence lexical warnings
+       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-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'.
@@ -9929,7 +11382,7 @@
 
 2015-06-23  Artur Malabarba  <address@hidden>
 
-       * lisp/isearch.el: Fold many unicode characters to ASCII
+       * 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.
@@ -10002,12 +11455,12 @@
 
 2015-06-22  Artur Malabarba  <address@hidden>
 
-       * lisp/emacs-lisp/package.el: Exclude packages by name
+       * 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
+       * lisp/emacs-lisp/package.el: Rename hide-obsolete to toggle-hiding.
 
 2015-06-22  Eli Zaretskii  <address@hidden>
 
@@ -10116,7 +11569,6 @@
 
 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)
 
@@ -10134,15 +11586,13 @@
 
 2015-06-19  Stephen Berman  <address@hidden>
 
-       (Bug#20832)
        * lisp/calendar/todo-mode.el (todo-show): Don't visit todo file
-       in the minibuffer.
+       in the minibuffer.  (Bug#20832)
 
 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.
+       * lisp/calendar/todo-mode.el (todo-show): Signal an error if buffer
+       for adding new todo file is empty but modified.  (Bug#20832)
 
 2015-06-19  Stefan Monnier  <address@hidden>
 
@@ -10225,12 +11675,12 @@
 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
+       * 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
+       * lisp/cus-start.el (top-level): Add a customization entry for
        `help-quote-translation'.
 
 2015-06-18  Artur Malabarba  <address@hidden>
@@ -10319,7 +11769,7 @@
        * 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/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
@@ -10346,7 +11796,6 @@
 
 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>
@@ -10425,7 +11874,7 @@
        * lisp/files.el (find-alternate-file'): Improve the confirmation
        message to show the buffer name.
 
-       Better docstring for null. (Bug#20815)
+       Better docstring for null.  (Bug#20815)
        * src/data.c (null): Improves the docstring, saying what null returns
        when OBJECT is non-nil.
 
@@ -10448,7 +11897,7 @@
 
 2015-06-16  Stefan Monnier  <address@hidden>
 
-       * lisp/emacs-lisp/pcase.el: Improve docs and error handling
+       * 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
@@ -10512,7 +11961,6 @@
        * 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.
@@ -10561,7 +12009,8 @@
 
 2015-06-15  Paul Eggert  <address@hidden>
 
-       Spelling fixes
+       * test/automated/help-fns.el (abc\\\[universal-argument\]b\`c\'d\\e\"f):
+       (help-fns-test-funny-names): Spelling fixes.
 
 2015-06-14  Glenn Morris  <address@hidden>
 
@@ -10590,9 +12039,9 @@
 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.
+       * 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>
 
@@ -10602,7 +12051,7 @@
 
 2015-06-13  Glenn Morris  <address@hidden>
 
-       Tweaks for getting repository version; a bit more like it was for bzr.
+       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.
@@ -10786,12 +12235,12 @@
 
 2015-06-11  Artur Malabarba  <address@hidden>
 
-       * lisp/let-alist.el (let-alist--deep-dot-search): Fix cons
+       * 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
+       * src/syntax.c (Fbackward_prefix_chars): Reword docstring.
 
 2015-06-10  Glenn Morris  <address@hidden>
 
@@ -10841,9 +12290,10 @@
 
 2015-06-09  Stefan Monnier  <address@hidden>
 
-       * lisp/simple.el (eval-expression): Macroexpand before evaluating 
(bug#20730)
+       * lisp/simple.el (eval-expression): Macroexpand before evaluating
+       (bug#20730).
 
-       * lisp/progmodes/sh-script.el: Better handle nested quotes
+       * 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.
@@ -10874,9 +12324,8 @@
 
 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).
+       * 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.
 
@@ -10894,13 +12343,13 @@
 2015-06-08  Oleh Krehel  <address@hidden>
 
        Add new command checkdoc-package-keywords
-       * lisp/emacs-lisp/checkdoc.el (checkdoc-package-keywords-flag): New
-         defcustom.
+       * 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
+       (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.
 
@@ -10916,15 +12365,13 @@
 
 2015-06-08  Artur Malabarba  <address@hidden>
 
-       * lisp/emacs-lisp/package.el (package-delete): Make interactive
+       * 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)
+       * lisp/emacs-lisp/checkdoc.el (checkdoc-file): New function.
+       (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>
 
@@ -10953,7 +12400,6 @@
 
 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).
 
@@ -10983,7 +12429,7 @@
 
        * 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)
+       command lines computed in grep-compute-defaults.  (Bug#20728)
 
 2015-06-06  Glenn Morris  <address@hidden>
 
@@ -11028,9 +12474,9 @@
        * 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.
+       * 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>
 
@@ -11073,7 +12519,7 @@
 
        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.
+       bindings of the form (KEY PAT) or SYMBOL.  KEY is not quoted.
 
        * lisp/emacs-lisp/map.el (map--dispatch): Better docstring.
 
@@ -11152,9 +12598,9 @@
 
        * 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)
+       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>
 
@@ -11223,13 +12669,13 @@
 
 2015-06-03  Michael Albinus  <address@hidden>
 
-       Instrument file-notify-test.el in order to catch hydra error.
+       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.
+       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)
 
@@ -11277,16 +12723,15 @@
 
 2015-06-02  Michael Albinus  <address@hidden>
 
-       Ensure, that autorevert works for remote files in file-notify-tests.el
+       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)
+       (file-notify-test03-autorevert): Ensure that
+       `visited-file-modtime' has changed.  (Bug#20392)
 
 2015-06-02  Nicolas Petton  <address@hidden>
 
@@ -11324,9 +12769,9 @@
 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)
+       * .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>
 
@@ -11377,8 +12822,8 @@
 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
+       * 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
@@ -11442,7 +12887,6 @@
 
 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):
@@ -11459,7 +12903,7 @@
        Use another default value for tramp-histfile-override
        * lisp/net/tramp-sh.el (tramp-histfile-override):
        Use ".tramp_history" as default.
-       Fixes: debbugs:#20446
+       Fixes bug#20446
 
 2015-05-29  Nicolas Petton  <address@hidden>
 
@@ -11467,7 +12911,7 @@
 
 2015-05-16  Nicolas Petton  <address@hidden>
 
-       * etc/NEWS: Add an entry about map.el
+       * 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
@@ -11477,7 +12921,6 @@
 
 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.
 
@@ -11485,7 +12928,7 @@
 
 2015-04-25  Artur Malabarba  <address@hidden>
 
-       * lisp/emacs-lisp/map.el (map-pairs): Dump redundant lambda
+       * lisp/emacs-lisp/map.el (map-pairs): Dump redundant lambda.
 
 2015-04-25  Nicolas Petton  <address@hidden>
 
@@ -11511,7 +12954,7 @@
 
        * lisp/emacs-lisp/map.el: Better docstring.
 
-       Minor improvement in map-elt.
+       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.
@@ -11528,10 +12971,11 @@
 
        * lisp/emacs-lisp/map.el (map-into): Better error message.
 
-       * lisp/emacs-lisp/map.el: Removes byte-compilation warnings.
+       * lisp/emacs-lisp/map.el: Remove 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.
+       * 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.
@@ -11540,7 +12984,6 @@
 
 2015-05-30  Dmitry Gutov  <address@hidden>
 
-       Make sure there's no explicit tag name
        * lisp/progmodes/etags.el (tag-implicit-name-match-p): Make sure
        there's no explicit tag name (bug#20629).
 
@@ -11584,9 +13027,8 @@
 
 2015-05-30  Eli Zaretskii  <address@hidden>
 
-       Document 'face-ignored-fonts'
-       * doc/emacs/mule.texi (Modifying Fontsets): Document
-       face-ignored-fonts.  (Bug#20628)
+       * doc/emacs/mule.texi (Modifying Fontsets):
+       Document face-ignored-fonts.  (Bug#20628)
 
        Add etags test for the new -Q option
        * test/etags/ETAGS.good_1, test/etags/ETAGS.good_2:
@@ -11629,7 +13071,7 @@
 
 2015-05-30  Michael Albinus  <address@hidden>
 
-       Improve Tramp traces.
+       Improve Tramp traces
        * lisp/net/trampver.el (tramp-repository-get-version): New defun.
        * lisp/net/tramp.el (tramp-debug-message): Use it.
 
@@ -11657,9 +13099,8 @@
 
 2015-05-29  Artur Malabarba  <address@hidden>
 
-       * lisp/emacs-lisp/package.el: Don't load from parent dir
-       (package-load-all-descriptors): Don't load descriptors from
-       directories above the package directories.
+       * lisp/emacs-lisp/package.el (package-load-all-descriptors):
+       Don't load descriptors from directories above the package directories.
 
 2015-05-29  Paul Eggert  <address@hidden>
 
@@ -11671,7 +13112,7 @@
 
 2015-05-29  Michael Albinus  <address@hidden>
 
-       Improve Tramp traces.
+       Improve Tramp traces
        * lisp/net/tramp.el (tramp-call-process-region): New defun.
        * lisp/net/tramp-sh.el (tramp-get-inline-coding): Use it.
 
@@ -11703,14 +13144,13 @@
 
 2015-05-28  Katsumi Yamaoka  <address@hidden>
 
-       gnus-art.el: Re-revert last change
        * lisp/gnus/gnus-art.el (gnus-button-alist): Re-revert last change.
        cf. <http://news.gmane.org/group/gmane.emacs.devel/thread=186896>
 
 2015-05-28  Samer Masterson  <address@hidden>
 
        Show files when `initial-buffer-choice' is non-nil
-       * startup.el (command-line-1): When Emacs is given a file as an
+       * lisp/startup.el (command-line-1): When Emacs is given a file as an
        argument and `initial-buffer-choice' is non-nil, display both the file
        and `initial-buffer-choice'.  For more than one file, show
        `initial-buffer-choice' and *Buffer List*.  Refactor display-changing
@@ -11841,8 +13281,7 @@
 2015-05-27  Stefan Monnier  <address@hidden>
 
        * lisp/isearch.el (isearch--current-buffer): Give a default value.
-
-       Un-revert changes mistakenly dropped by f9fabb2b
+       Un-revert changes mistakenly dropped by f9fabb2b.
 
 2015-05-27  Paul Eggert  <address@hidden>
 
@@ -11867,25 +13306,24 @@
 
 2015-05-27  Dmitry Gutov  <address@hidden>
 
-       Delete the old process in vc-setup-buffer
        * lisp/vc/vc-dispatcher.el (vc-setup-buffer): Delete the old
        process here.
        (vc-do-command): Rather than here (bug#20608).
 
 2015-05-27  Ivan Shmakov  <address@hidden>
 
-       Avoid gratuitous delete-dups in face-at-point.
+       Avoid gratuitous delete-dups in face-at-point
        * lisp/faces.el (face-at-point): Do not compute the properly
        ordered, duplicate-free list if only a single value is
        requested anyway.  (Bug#20519)
 
-       Show the exact C-x 8 RET invocation in describe-char.
+       Show the exact C-x 8 RET invocation in describe-char
        * lisp/descr-text.el (describe-char): Show the exact C-x 8 RET
        invocation instead of a template.  (Bug#20522)
 
 2015-05-27  Artur Malabarba  <address@hidden>
 
-       * lisp/emacs-lisp/package.el: Don't erase tags on refresh
+       * lisp/emacs-lisp/package.el: Don't erase tags on refresh.
        (package-menu--post-refresh): Call `tabulated-list-print' with the
        UPDATE argument.  This only affects the refresh action, the revert
        action still erases tags.
@@ -11899,13 +13337,16 @@
 
 2015-05-27  Michael Albinus  <address@hidden>
 
-       Fix typo in commit 3953c4be2816537be95520605d45b866dc731f4b
+       * lisp/net/tramp.el (tramp-handle-make-auto-save-file-name):
+       Fix typo in "Improve tramp-handle-make-auto-save-file-name"
+       (commit 3953c4be2816537be95520605d45b866dc731f4b).
 
 2015-05-27  Stefan Monnier  <address@hidden>
 
-       * lisp/isearch.el (isearch--current-buffer): New var
+       * lisp/isearch.el (isearch--current-buffer): New var.
        (isearch-update): Set cursor-sensor-inhibit here.
-       (isearch-done): Unset cursor-sensor-inhibit in the right buffer 
(bug#20532).
+       (isearch-done): Unset cursor-sensor-inhibit in the right buffer
+       (bug#20532).
 
        Change inhibit-point-motion-hooks to t
        * src/textprop.c (syms_of_textprop): Default Vinhibit_point_motion_hooks
@@ -11921,7 +13362,8 @@
 2015-05-27  Michael Albinus  <address@hidden>
 
        New test tramp-test30-make-auto-save-file-name
-       * tramp-tests.el (tramp-test30-make-auto-save-file-name): New test.
+       * test/automated/tramp-tests.el
+       (tramp-test30-make-auto-save-file-name): New test.
        (tramp-test31-special-characters)
        (tramp-test31-special-characters-with-stat)
        (tramp-test31-special-characters-with-perl)
@@ -11931,7 +13373,7 @@
        (tramp-test34-recursive-load, tramp-test35-unload): Rename.
 
        Improve tramp-handle-make-auto-save-file-name
-       * tramp.el (tramp-auto-save-directory): Add :tags.
+       * lisp/net/tramp.el (tramp-auto-save-directory): Add :tags.
        (tramp-handle-make-auto-save-file-name): Let native
        `make-auto-save-file-name' use `auto-save-file-name-transforms',
        if `tramp-auto-save-directory' is not set.
@@ -11997,8 +13439,8 @@
 
 2015-05-26  Artur Malabarba  <address@hidden>
 
-       * lisp/emacs-lisp/tabulated-list.el: Don't sort without sorter
-       (tabulated-list-print): Don't sort if sorter is nil
+       * lisp/emacs-lisp/tabulated-list.el (tabulated-list-print):
+       Don't sort if sorter is nil.
 
 2015-05-26  Michael Albinus  <address@hidden>
 
@@ -12006,7 +13448,6 @@
        * lisp/net/tramp-sh.el (tramp-set-auto-save): Remove it.  There
        are major modes which set `auto-save-mode' on their own rules;
        Tramp shall not overwrite such settings.
-       (Bug#20621)
 
 2015-05-26  Glenn Morris  <address@hidden>
 
@@ -12018,7 +13459,7 @@
 
 2015-05-25  Philipp Stephani  <address@hidden>
 
-       * lisp/term/xterm.el: Add gui-get-selection support via OSC-52
+       * lisp/term/xterm.el: Add gui-get-selection support via OSC-52.
        (xterm--extra-capabilities-type): Add `getSelection'.
        (xterm--query): Add `no-async' argument.
        (xterm--init-activate-get-selection): New function.
@@ -12036,7 +13477,6 @@
 
 2015-05-25  Daniel Colascione  <address@hidden>
 
-       Add C-language keyword constants to C++
        * lisp/progmodes/cc-langs.el (c-constant-kwds): Add C-language
        keyword constants to C++.
 
@@ -12051,7 +13491,7 @@
 
 2015-05-25  Michael Albinus  <address@hidden>
 
-       Improve fix of debbugs:20634 in tramp-sh.el
+       Improve fix of bug#20634 in tramp-sh.el
 
 2015-05-25  Eli Zaretskii  <address@hidden>
 
@@ -12096,8 +13536,8 @@
 2015-05-25  Lars Magne Ingebrigtsen  <address@hidden>
 
        Make erc timestamps visible again
-       * lisp/erc/erc-stamp.el (erc-munge-invisibility-spec): Make
-       timestamps visible again (if requested).
+       * lisp/erc/erc-stamp.el (erc-munge-invisibility-spec):
+       Make timestamps visible again (if requested).
 
 2015-05-25  Eli Zaretskii  <address@hidden>
 
@@ -12107,35 +13547,36 @@
 
 2015-05-25  Stefan Monnier  <address@hidden>
 
-       * lisp/emacs-lisp/cl-macs.el (cl-tagbody): Scope cl--tagbody-alist
+       * lisp/emacs-lisp/cl-macs.el (cl-tagbody): Scope cl--tagbody-alist.
        (Bug#20639)
 
 2015-05-25  Michael Albinus  <address@hidden>
 
-       Fix typo in 89035e247591c8d688fce922b7079881aa110f33
+       * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-via-buffer):
+       Fix typo in "Inhibit `epa-file-handler' in Tramp"
+       (commit 89035e247591c8d688fce922b7079881aa110f33).
 
 2015-05-25  Orivej Desh  <address@hidden>  (tiny change)
 
        Fix IPv6 addresses in Tramp
        * lisp/net/tramp-sh.el (tramp-make-copy-program-file-name):
-       Add sqare brackets around host name.
+       Add square brackets around host name.
 
 2015-05-25  Michael Albinus  <address@hidden>
 
-       Inhibit `epa-file-handler' in Tramp
-       (Bug#20634)
+       Inhibit `epa-file-handler' in Tramp (Bug#20634)
        * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-via-buffer)
        (tramp-sh-handle-insert-file-contents-literally): Inhibit also
        `epa-file-handler'.
 
 2015-05-24  Stefan Monnier  <address@hidden>
 
-       * lisp/emacs-lisp/pcase.el: Use PAT rather than UPAT in docstring
+       * lisp/emacs-lisp/pcase.el: Use PAT rather than UPAT in docstring.
        (pcase-let): Document the behavior in case the pattern doesn't match.
 
 2015-05-24  Artur Malabarba  <address@hidden>
 
-       * lisp/emacs-lisp/tabulated-list.el: New optional print method
+       * lisp/emacs-lisp/tabulated-list.el: New optional print method.
        (tabulated-list-print): New optional argument, UPDATE.  If
        non-nil, the list is printed by only adding and deleting the
        changed entries, instead of erasing the whole buffer.  This method
@@ -12143,7 +13584,7 @@
        * doc/lispref/modes.texi (Tabulated List Mode): Document it.
        * etc/NEWS: Document it.
 
-       * lisp/emacs-lisp/tabulated-list.el: Improve printing
+       * lisp/emacs-lisp/tabulated-list.el: Improve printing.
        (tabulated-list--get-sorter): New function.
        (tabulated-list-print): Restore window-line when remember-pos is
        passed and optimize away the `nreverse'.
@@ -12253,11 +13694,11 @@
 
 2015-05-23  Stefan Monnier  <address@hidden>
 
-       * lisp/pcmpl-cvs.el (pcmpl-cvs-entries): Don't assume CVS/Entries 
exists.
+       * lisp/pcmpl-cvs.el (pcmpl-cvs-entries): Don't assume
+       CVS/Entries exists.
 
        * lisp/progmodes/xref.el (xref-find-apropos): Use read-string.
 
-       tags-completion-at-point-function: Don't trust the find-tag function
        * lisp/progmodes/etags.el (tags-completion-at-point-function):
        Don't trust the find-tag function.
 
@@ -12338,14 +13779,14 @@
 
 2015-05-23  Eli Zaretskii  <address@hidden>
 
-       Revert "Fix etags Bug#20629 that broke C++ support."
+       Revert "Fix etags Bug#20629 that broke C++ support"
        This reverts commit 13dd9d4f7e75d2c78aa5537cef09de03663e9748.
 
 2015-05-23  Jan D  <address@hidden>
 
-       Fix etags Bug#20629 that broke C++ support.
-       * etags.el (etags-xref-find-definitions-tag-order): Revert commit
-       from Sun May 10 (Bug#20629).
+       Fix etags Bug#20629 that broke C++ support
+       * lisp/progmodes/etags.el (etags-xref-find-definitions-tag-order):
+       Revert commit from Sun May 10 (Bug#20629).
 
        Merge branch 'cairo'.
        Main work done by YAMAMOTO Mitsuharu <address@hidden>.
@@ -12353,7 +13794,7 @@
 
        Merge branch 'master' into cairo
 
-       Fixes to compile cairo branch without cairo.
+       Fixes to compile cairo branch without cairo
        * src/gtkutil.c (xg_update_scrollbar_pos): x_clear_area takes frame as
        first argument.
        * src/xterm.c (handle_one_xevent): Surround x_cr_destroy_surface with
@@ -12361,7 +13802,7 @@
 
 2015-05-23  Artur Malabarba  <address@hidden>
 
-       * lisp/emacs-lisp/package.el: Always update selected-packages
+       * lisp/emacs-lisp/package.el: Always update selected-packages.
        (package--update-selected-packages): New function.
        (package-menu-execute): Use it before starting the transaction,
        this way the list of selected packages is updated even when the
@@ -12410,11 +13851,11 @@
 
 2015-05-22  Artur Malabarba  <address@hidden>
 
-       * lisp/emacs-lisp/package.el (package-selected-packages): Fix doc
+       * lisp/emacs-lisp/package.el (package-selected-packages): Fix doc.
 
 2015-05-22  Glenn Morris  <address@hidden>
 
-       Generate admin/charsets Makefile via configure, and make more portable.
+       Generate admin/charsets Makefile via configure, and make more portable
        * configure.ac (SUBDIR_MAKEFILES): Add admin/charsets/Makefile.
        (admin/charsets/Makefile): Generate it.
        * admin/charsets/Makefile.in: Rename from Makefile.
@@ -12448,7 +13889,7 @@
        * lisp/autorevert.el: Use lexical-binding.  Fix hook usage.
        (global-auto-revert-ignore-buffer, auto-revert-notify-modified-p)
        (auto-revert-notify-watch-descriptor): Use defvar-local.
-       (find-file-hook, auto-revert-tail-mode, )
+       (find-file-hook, auto-revert-tail-mode)
        (auto-revert-notify-add-watch): Use setq-local.
        (auto-revert-notify-add-watch): Don't call make-local-variable on
        kill-buffer-hook (bug#20601).
@@ -12458,23 +13899,26 @@
        Change defgeneric so it doesn't completely redefine the function
        * lisp/emacs-lisp/cl-generic.el (cl-generic-define): Don't throw away
        previously defined methods.
-       (cl-generic-define-method): Let-bind purify-flag instead of using 
`fset'.
+       (cl-generic-define-method): Let-bind purify-flag instead of
+       using `fset'.
        (cl--generic-prefill-dispatchers): Only define during compilation.
        (cl-method-qualifiers): Remove redundant alias.
        (help-fns-short-filename): Silence byte-compiler.
-       * test/automated/cl-generic-tests.el: Adjust to new defgeneric 
semantics.
+       * test/automated/cl-generic-tests.el:
+       Adjust to new defgeneric semantics.
 
 2015-05-21  Artur Malabarba  <address@hidden>
 
-       (package-menu-execute): Remove reference to remove-dups
+       * lisp/emacs-lisp/package.el (package-menu-execute):
+       Remove reference to remove-dups.
 
 2015-05-21  kwhite  <address@hidden>
 
-       * lisp/erc/erc.el: Hide network/channel messages
+       * lisp/erc/erc.el: Hide network/channel messages.
        (erc-network-hide-list, etc-channel-hide-list): New lists to define
        message types per network/channel.
-       (erc-add-targets): New function to parse list of targets
-       (erc-hide-current-message-p): Modified to check for new targets
+       (erc-add-targets): New function to parse list of targets.
+       (erc-hide-current-message-p): Modified to check for new targets.
 
 2015-05-21  Paul Eggert  <address@hidden>
 
@@ -12491,22 +13935,22 @@
 
 2015-05-21  Artur Malabarba  <address@hidden>
 
-       * lisp/emacs-lisp/package.el: Fix selected-package logic
+       * lisp/emacs-lisp/package.el: Fix selected-package logic.
        (package-menu-execute): Mark as selected all non-upgrade packages
        being installed.
        (package-menu--perform-transaction): Don't mark anything.
 
-       * lisp/emacs-lisp/package.el: Mode-line progress report
+       * lisp/emacs-lisp/package.el: Mode-line progress report.
        (package-menu--transaction-status): New variable.
        (package-menu-mode, package-menu--perform-transaction): Use it.
 
-       * lisp/emacs-lisp/package.el: Better transaction messages
+       * lisp/emacs-lisp/package.el: Better transaction messages.
        (package-menu--partition-transaction): New function.
-       (package-menu--prompt-transaction-p, package-menu-execute): Use
-       it.
+       (package-menu--prompt-transaction-p, package-menu-execute):
+       Use it.
        (package-menu--perform-transaction): Don't do any messaging.
 
-       * lisp/emacs-lisp/package.el: Revert async package transactions
+       * lisp/emacs-lisp/package.el: Revert async package transactions.
        (package-menu-async): Update doc.
        (package-install-from-archive, package-download-transaction)
        (package-install, package-menu--perform-transaction)
@@ -12523,16 +13967,17 @@
 
 2015-05-20  Bozhidar Batsov  <address@hidden>
 
-       Improve parameter name
+       * lisp/emacs-lisp/subr-x.el (hash-table-empty-p):
+       Improve parameter name.
 
-       Add new inline function `hash-table-empty-p'
+       * lisp/emacs-lisp/subr-x.el (hash-table-empty-p): New inline function.
 
 2015-05-20  Paul Eggert  <address@hidden>
 
        Don't require help-fns when not needed
        * lisp/emacs-lisp/autoload.el, lisp/emacs-lisp/advice.el:
        * lisp/emacs-lisp/elint.el:
-       Don't require help-fns at the top level.
+       Don't require help-fns at the top level
        * lisp/emacs-lisp/advice.el (ad-arglist):
        * lisp/emacs-lisp/cl-macs.el (cl--transform-lambda):
        Don't require help-fns.  (Bug#17001)
@@ -12561,9 +14006,9 @@
        Add let-when-compile macro instead of using pcase-let
        * lisp/subr.el (let-when-compile): New let-like macro that makes its
        bindings known to macros like `eval-when-compile' in the body.
-       * lisp/emacs-lisp/lisp-mode.el: Change the top-level `pcase-let' to a
-         `let-when-compile'. Also comment out the unused lexical var
-         `el-kws-re'.
+       * lisp/emacs-lisp/lisp-mode.el: Change the top-level `pcase-let' to
+       a `let-when-compile'.  Also comment out the unused lexical var
+       `el-kws-re'.
        The change greatly improves readability, while providing almost the
        same (even shorter) byte code: instead of pre-evaluating 10 variables,
        tossing them into a list, and destructuring that list a full screen
@@ -12572,11 +14017,11 @@
 
 2015-05-20  Artur Malabarba  <address@hidden>
 
-       * lisp/emacs-lisp/package.el: "Delete" button in Help buffer
+       * lisp/emacs-lisp/package.el: "Delete" button in Help buffer.
        (package-delete-button-action): New function.
        (describe-package-1): Add Delete button.
 
-       * lisp/emacs-lisp/package.el: Better dependency description
+       * lisp/emacs-lisp/package.el: Better dependency description.
        (package--used-elsewhere-p): New optional arg, ALL, and return
        package-desc objects instead of names.
        (package-delete): Update accordingly.
@@ -12586,15 +14031,15 @@
 
        Fix handling and doc-string of FRAME arg of `other-buffer' (Bug#20533)
        * src/buffer.c (Fother_buffer): Argument FRAME must denote a live frame.
-       Fix doc-string (Bug#20533).
+       Fix doc-string.
 
        Improve `switch-to-buffer' in strongly dedicated windows (Bug#20472)
        * lisp/window.el (switch-to-buffer-in-dedicated-window): New option.
        (switch-to-buffer): If the selected window is strongly dedicated
-       to its buffer, signal error before prompting for buffer name.  Handle
-       `switch-to-buffer-in-dedicated-window'.  (Bug#20472)
-       * doc/lispref/windows.texi (Switching Buffers): Document
-       `switch-to-buffer-in-dedicated-window'.
+       to its buffer, signal error before prompting for buffer name.
+       Handle `switch-to-buffer-in-dedicated-window'.
+       * doc/lispref/windows.texi (Switching Buffers):
+       Document `switch-to-buffer-in-dedicated-window'.
 
 2015-05-19  Paul Eggert  <address@hidden>
 
@@ -12676,7 +14121,8 @@
 
 2015-05-19  Stefan Monnier  <address@hidden>
 
-       * emacs-lisp/generator.el (cps--gensym, cps--transform-1): Silence 
compiler
+       * lisp/emacs-lisp/generator.el (cps--gensym, cps--transform-1):
+       Silence compiler.
 
 2015-05-19  Paul Eggert  <address@hidden>
 
@@ -12715,14 +14161,15 @@
        (icomplete-minibuffer-map): Bind C-j to it.
        (icomplete-forward-completions, icomplete-backward-completions):
        Mention the new command in the docstring.
-       * lisp/minibuffer.el (minibuffer-force-complete-and-exit): Revert
-       the previous fix for bug#17545.
+       * lisp/minibuffer.el (minibuffer-force-complete-and-exit):
+       Revert the previous fix for bug#17545.
 
 2015-05-19  Martin Rudalics  <address@hidden>
 
        Fix last commit
 
-       In Elisp manual explain how to override window manager positioning 
(Bug#20552)
+       In Elisp manual explain how to override window manager positioning
+       (Bug#20552)
        * doc/lispref/frames.texi (Position Parameters): Give example of
        how to override a window manager positioning decision.
 
@@ -12732,12 +14179,11 @@
        * doc/lispref/frames.texi (Minibuffers and Frames)
        (Deleting Frames): Explain "surrogate minibuffer frames".
 
-       In w32heap.c bump DUMPED_HEAP_SIZE to 19/12 MB
-       * emacs-git/quick/src/w32heap.c (DUMPED_HEAP_SIZE): Bump to 19/12 MB.
+       * src/w32heap.c (DUMPED_HEAP_SIZE): Bump to 19/12 MB.
 
 2015-05-18  Glenn Morris  <address@hidden>
 
-       Add option to ignore commit lines matching a pattern in ChangeLog.
+       Add option to ignore commit lines matching a pattern in ChangeLog
        * build-aux/gitlog-to-changelog: Add --ignore-line option.
        * build-aux/gitlog-to-emacslog: Ignore lines matching '^; '.
 
@@ -12802,7 +14248,7 @@
 
        Allow checkdoc to be called in batch
        * lisp/emacs-lisp/checkdoc.el (checkdoc-error): When `noninteractive'
-         is non-nil, echo the error with `warn'.
+       is non-nil, echo the error with `warn'.
        How it can be used in -batch:
        (with-current-buffer (find-file "checkdoc.el")
          (checkdoc-current-buffer t))
@@ -12873,7 +14319,7 @@
 
        Merge branch 'master' into cairo
 
-       Add PBM support for cairo.
+       Add PBM support for cairo
        * src/image.c (xcolor_to_argb32): New function.
        (get_spec_bg_or_alpha_as_argb): Call xcolor_to_argb32.
        (pbm_load, png_load_body, jpeg_load_body, gif_load): Only use
@@ -12882,13 +14328,12 @@
 
 2015-04-12  Jan D  <address@hidden>
 
-       x_free_cr_resources: Renamed from x_prepare_for_xlibdraw.
-       * src/xterm.c (x_free_cr_resources): Renamed from 
x_prepare_for_xlibdraw.
+       * src/xterm.c (x_free_cr_resources): Rename from x_prepare_for_xlibdraw.
        (x_cr_draw_frame, x_cr_export_frames, x_shift_glyphs_for_insert)
        (x_free_frame_resources): Rename x_prepare_for_xlibdraw to
        x_free_cr_resources.
 
-       Handle specified bg in images.  Use generic libpng code for PNG:s.
+       Handle specified bg in images.  Use generic libpng code for PNGs.
        * src/image.c (get_spec_bg_or_alpha_as_argb)
        (create_cairo_image_surface): New functions when USE_CAIRO.
        (xpm_load): Call the above functions.  Handle XPM without mask
@@ -12899,26 +14344,26 @@
        (jpeg_load_body): Call create_cairo_image_surface.
        (gif_load, svg_load_image): Handle specified background, call
        create_cairo_image_surface.
-       * src/xterm.c (x_draw_image_glyph_string): Added missing USE_CAIRO.
+       * src/xterm.c (x_draw_image_glyph_string): Add missing USE_CAIRO.
 
 2015-04-11  Jan D  <address@hidden>
 
-       Support GIF and Tiff with cairo.
+       Support GIF and TIFF with cairo
        * configure.ac: Allow jpeg with cairo.
        Allow tiff and gif with cairo.
        * src/image.c (jpeg_load_body): Create cairo image surface if USE_CAIRO.
        (tiff_load): Create cairo image surface if USE_CAIRO.
        (gif_load): Ditto.
 
-       Support JPEG with USE_CAIRO.
+       Support JPEG with USE_CAIRO
        * configure.ac: Allow jpeg with cairo.
        * src/image.c (jpeg_load_body): Create cairo image surface if USE_CAIRO.
 
 2015-04-05  Jan D  <address@hidden>
 
-       Support RSVG and cairo.
+       Support RSVG and cairo
        * configure.ac: Allow rsvg with cairo.  Move back HAVE_RSVG.
-       * src/dispextern.h (struct image): add cr_data2 if cairo.
+       * src/dispextern.h (struct image): Add cr_data2 if cairo.
        * src/image.c: #undef COLOR_TABLE_SUPPORT when USE_CAIRO.
        (x_clear_image): Free cr_data and cr_data2 if set.
        (xpm_load): Assign data to cr_data2.
@@ -12926,7 +14371,7 @@
 
 2015-04-03  Jan D  <address@hidden>
 
-       Introduce limited Xpm support (32 bit ZPixmap) for Cairo.
+       Introduce limited Xpm support (32 bit ZPixmap) for Cairo
        * configure.ac (HAVE_RSVG): Move after cairo.
        (USE_CAIRO): Disable rsvg, don't disable Xpm.
        * src/image.c (prepare_image_for_display): Don't load if USE_CAIRO.
@@ -12949,37 +14394,39 @@
 
 2015-02-19  YAMAMOTO Mitsuharu  <address@hidden>
 
-       * ftcrfont.c (ftcrfont_draw): Don't flush when drawing to screen.
+       * src/ftcrfont.c (ftcrfont_draw): Don't flush when drawing to screen.
 
 2015-02-16  YAMAMOTO Mitsuharu  <address@hidden>
 
        Draw outermost line using black relief and erase corners also for cairo.
-       * xterm.c [USE_CAIRO]: Include math.h.
+       * src/xterm.c [USE_CAIRO]: Include math.h.
        (enum corners) [USE_CAIRO]: New enum.
        (x_erase_corners_for_relief) [USE_CAIRO]: New function.
        (x_draw_relief_rect) [USE_CAIRO]: Use it.  If box width is larger
        than 1, draw the outermost line using the black relief.
 
-       * xterm.c (x_fill_trapezoid_for_relief): Remove unnecessary 
cairo_close_path.
+       * src/xterm.c (x_fill_trapezoid_for_relief):
+       Remove unnecessary cairo_close_path.
 
 2015-02-15  YAMAMOTO Mitsuharu  <address@hidden>
 
-       * xterm.c (x_draw_relief_rect) [USE_CAIRO]: Reset clipping.
+       * src/xterm.c (x_draw_relief_rect) [USE_CAIRO]: Reset clipping.
 
-       * xterm.c (x_draw_stretch_glyph_string): Call x_reset_clip_rectangles 
instead of XSetClipMask.
+       * src/xterm.c (x_draw_stretch_glyph_string):
+       Call x_reset_clip_rectangles instead of XSetClipMask.
 
        Use int instead of unsigned int for width and height args.
-       * xterm.c (x_cr_draw_image, x_fill_rectangle, x_draw_rectangle)
+       * src/xterm.c (x_cr_draw_image, x_fill_rectangle, x_draw_rectangle)
        (x_fill_trapezoid_for_relief): Use int instead of unsigned int for
        width and height args.
 
        Modernize k&r cairo-related function declarations.
-       * gtkutil.c (xg_page_setup_dialog, xg_get_page_setup, draw_page)
+       * src/gtkutil.c (xg_page_setup_dialog, xg_get_page_setup, draw_page)
        (xg_print_frames_dialog): Modernize k&r declarations.
-       * xfns.c (Fx_export_frames, Fx_page_setup_dialog, Fx_get_page_setup)
+       * src/xfns.c (Fx_export_frames, Fx_page_setup_dialog, Fx_get_page_setup)
        (Fx_print_frames_dialog): Modernize k&r declarations.
-       * xterm.c (x_gc_get_ext_data, x_extension_initialize, x_begin_cr_clip)
-       (x_end_cr_clip, x_set_cr_source_with_gc_foreground)
+       * src/xterm.c (x_gc_get_ext_data, x_extension_initialize)
+       (x_begin_cr_clip, x_end_cr_clip, x_set_cr_source_with_gc_foreground)
        (x_set_cr_source_with_gc_background, x_cr_define_fringe_bitmap)
        (x_cr_destroy_fringe_bitmap, x_cr_draw_frame, x_cr_accumulate_data)
        (x_cr_destroy, x_cr_export_frames, x_prepare_for_xlibdraw)
@@ -12988,21 +14435,23 @@
        (x_clear_area): Modernize k&r declarations.
 
        Implement wave-style variant of underlining for cairo.
-       * xterm.c (x_draw_horizontal_wave) [USE_CAIRO]: New function.
+       * src/xterm.c (x_draw_horizontal_wave) [USE_CAIRO]: New function.
        (x_draw_underwave) [USE_CAIRO]: Use it.
 
-       * xterm.c (x_draw_window_divider): Use x_fill_rectangle instead of 
XFillRectangle.
+       * src/xterm.c (x_draw_window_divider): Use x_fill_rectangle
+       instead of XFillRectangle.
 
 2015-02-13  YAMAMOTO Mitsuharu  <address@hidden>
 
-       Fix fringe bitmap initialization for cairo.
-       * fringe.c (init_fringe_bitmap) [USE_CAIRO]: Adjust bitmap data for
-       cairo image surface.
-       * xterm.c (x_cr_define_fringe_bitmap): Call cairo_surface_mark_dirty.
+       Fix fringe bitmap initialization for cairo
+       * src/fringe.c (init_fringe_bitmap) [USE_CAIRO]: Adjust bitmap
+       data for cairo image surface.
+       * src/xterm.c (x_cr_define_fringe_bitmap):
+       Call cairo_surface_mark_dirty.
 
 2015-02-11  Jan D  <address@hidden>
 
-       Add cairo drawing.
+       Add cairo drawing
        * configure.ac (with-cairo): New option.
        (USE_CAIRO): Default to yes for Gtk+ 3.  Add code to test for cairo,
        set CAIRO_CFLAGS, CAIRO_LIBS.  Add ftcrfonto to FONT_OBJ if cairo.
@@ -13025,8 +14474,8 @@
        (ftfont_open): Build font object and call ftfont_open2.
        * src/ftfont.h (ftfont_open2, ftfont_info_size): Declare.
        * src/gtkutil.c (xg_clear_under_internal_border)
-       (xg_update_scrollbar_pos, xg_update_horizontal_scrollbar_pos): Only
-       queue_draw if not cairo.  Change args to x_clear_area.
+       (xg_update_scrollbar_pos, xg_update_horizontal_scrollbar_pos):
+       Only queue_draw if not cairo.  Change args to x_clear_area.
        (xg_get_font): Use Qftcr when using cairo, Qxft otherwise.
        (xg_page_setup_dialog, xg_get_page_setup, draw_page)
        (xg_print_frames_dialog): New functions for printing.
@@ -13040,8 +14489,7 @@
        * src/xfns.c: New section Printing.
        (x-export-frames, x-page-setup-dialog, x-get-page-setup)
        (x-print-frames-dialog): New printing functions.
-       (Fx_create_frame, x_create_tip_frame): Register ftcrfont if
-       cairo.
+       (Fx_create_frame, x_create_tip_frame): Register ftcrfont if cairo.
        (syms_of_xfns): Defsym Qorientation, Qtop_margin, Qbottom_margin,
        Qportrait, Qlandscape, Qreverse_portrait, Qreverse_landscape).
        (syms_of_xfns): Provide cairo and defvar cairo-version-string.
@@ -13073,12 +14521,12 @@
        (x_set_glyph_string_clipping)
        (x_set_glyph_string_clipping_exactly): Use x_set_clip_rectangles
        instead of XSetClipRectangles.
-       (x_clear_glyph_string_rect, x_draw_glyph_string_background): Use
-       x_fill_rectangle instead of XFillRectangle.
+       (x_clear_glyph_string_rect, x_draw_glyph_string_background):
+       Use x_fill_rectangle instead of XFillRectangle.
        (x_draw_glyph_string_foreground)
        (x_draw_composite_glyph_string_foreground)
-       (x_draw_glyphless_glyph_string_foreground): Use x_draw_rectangle instead
-       of XDrawRectangle.
+       (x_draw_glyphless_glyph_string_foreground): Use x_draw_rectangle
+       instead of XDrawRectangle.
        (x_draw_relief_rect): Add code for USE_CAIRO.
        Call x_reset_clip_rectangles instead of XSetClipMask.
        (x_draw_box_rect): x_set_clip_rectangles instead of XSetClipRectangles,
@@ -13142,15 +14590,11 @@
        test for curved quotes being displayable, after switching the
        terminal encoding.  (Bug#20545)
 
-2015-05-17  Paul Eggert  <address@hidden>
-
-       Spelling fixes
-
 2015-05-17  Jan D  <address@hidden>
 
-       Add comment that x_shift_glyphs_for_insert is never called.
-       * xterm.c (x_shift_glyphs_for_insert, x_redisplay_interface): Add
-       comment that this function is never called.
+       Add comment that x_shift_glyphs_for_insert is never called
+       * src/xterm.c (x_shift_glyphs_for_insert, x_redisplay_interface):
+       Add comment that this function is never called.
 
 2015-05-16  Glenn Morris  <address@hidden>
 
@@ -13180,7 +14624,7 @@
 
 2015-05-16  Glenn Morris  <address@hidden>
 
-       Small src/Makefile simplification.
+       Small src/Makefile simplification
        * src/lisp.mk (shortlisp): Rename from lisp, remove $lispsource prefix.
        * src/Makefile.in (lisp): Derive from shortlisp.
        ($(etc)/DOC): Use $shortlisp rather than parsing lisp.mk.
@@ -13195,11 +14639,9 @@
 
 2015-05-16  Dmitry Gutov  <address@hidden>
 
-       Use `unless' to have one fewer `not'
        * lisp/vc/vc-git.el (vc-git-resolve-when-done): Use `unless' to
        have one fewer `not'.
 
-       Remove redundant :group declarations from vc-git.el
        * lisp/vc/vc-git.el (vc-git-diff-switches)
        (vc-git-annotate-switches, vc-git-resolve-conflicts)
        (vc-git-program, vc-git-root-log-format): Remove the redundant
@@ -13222,9 +14664,9 @@
 
 2015-05-16  Artur Malabarba  <address@hidden>
 
-       * lisp/emacs-lisp/tabulated-list.el: Don't error on nil header-string
+       * lisp/emacs-lisp/tabulated-list.el: Don't error on null header-string.
        (tabulated-list-init-header): Document new behavior.
-       (tabulated-list-print-fake-header): No nothing if
+       (tabulated-list-print-fake-header): Do nothing if
        `tabulated-list--header-string' is nil.
        (tabulated-list--header-string): Add a docstring.
        * doc/lispref/modes.texi (Tabulated List Mode): Document it.
@@ -13234,11 +14676,11 @@
 
        Revert "Fix cps--gensym"
        * lisp/emacs-lisp/generator.el (cps--gensym): Revert commit
-         fbda511ab8069d0115eafca411a43353b85431b1 on 2015-05-14.
+       fbda511ab8069d0115eafca411a43353b85431b1 on 2015-05-14.
 
 2015-05-15  Glenn Morris  <address@hidden>
 
-       Replace AC_SUBST_FILE in configure with include in Makefiles.
+       Replace AC_SUBST_FILE in configure with include in Makefiles
        * configure.ac (DEPDIR, MKDEPDIR, deps_frag, lwlib_deps_frag)
        (oldxmenu_deps_frag, lisp_frag): Remove output variables/files.
        (AUTO_DEPEND): New output variable.
@@ -13256,7 +14698,7 @@
        (deps_frag): Replace by conditional include.
        * src/autodeps.mk: Remove file.
 
-       Tweak japanese.el's loading of dependencies.
+       Tweak japanese.el's loading of dependencies
        * lisp/loadup.el: Explicitly load cp51932 and eucjp-ms.
        * lisp/language/japanese.el: Use require rather than load.
        * lisp/international/cp51932.el, lisp/international/eucjp-ms.el:
@@ -13266,14 +14708,14 @@
 
 2015-05-15  Jan D  <address@hidden>
 
-       Fix NS warnings.
-       * nsmenu.m (ns_popup_dialog)
-       * nsimage.m (initFromXBM:width:height:fg:bg:)
-       * nsfns.m (Fx_create_frame): Remove unused variables.
+       Fix NS warnings
+       * src/nsmenu.m (ns_popup_dialog)
+       * src/nsimage.m (initFromXBM:width:height:fg:bg:)
+       * src/nsfns.m (Fx_create_frame): Remove unused variables.
        (Fns_read_file_name): Initialize fname, remove ret.
-       * nsterm.m (ns_draw_window_cursor): Handle DEFAULT_CURSOR in switch.
-       (ns_get_color, ns_set_horizontal_scroll_bar, keyDown): Remove unused
-       variable.
+       * src/nsterm.m (ns_draw_window_cursor): Handle DEFAULT_CURSOR in switch.
+       (ns_get_color, ns_set_horizontal_scroll_bar, keyDown):
+       Remove unused variable.
        (init): Add parantesis in if.
        (ns_create_terminal): Assign set_horizontal_scroll_bar_hook.
 
@@ -13285,30 +14727,29 @@
 
 2015-05-15  Eli Zaretskii  <address@hidden>
 
-       Support de-alt dictionary with Aspell.
        * lisp/textmodes/ispell.el (ispell-aspell-find-dictionary):
        Support Aspell dictionaries with names like "de-alt".  (Bug#20581)
 
 2015-05-15  Jan Djärv  <address@hidden>
 
-       cus-start.el: Add ns-confirm-quit.
-       * cus-start.el: Add ns-confirm-quit.
+       * lisp/cus-start.el: Add ns-confirm-quit.
 
-       Fix warnings on OSX 10.10.
-       * nsfns.m (MODAL_OK_RESPONSE): New define for different OSX versions.
+       Fix warnings on OSX 10.10
+       * src/nsfns.m (MODAL_OK_RESPONSE): New define for different
+       OSX versions.
        (Fns_read_file_name): Check against MODAL_OK_RESPONSE.
        (compute_tip_xy): Use convertRectToScreen for OSX >= 10.7
-       * nsmenu.m (initWithContentRect:styleMask:backing:defer:)
-       * nsimage.m (allocInitFromFile, setPixmapData): Only call
+       * src/nsmenu.m (initWithContentRect:styleMask:backing:defer:)
+       * src/nsimage.m (allocInitFromFile, setPixmapData): Only call
        setScalesWhenResized for OSX < 10.6.
-       * nsterm.h (EmacsScroller): Declare scrollerWidth.
-       * nsterm.m (ns_copy_bits): New function that does not use deprecated
-       NSCopyBits.
+       * src/nsterm.h (EmacsScroller): Declare scrollerWidth.
+       * src/nsterm.m (ns_copy_bits): New function that does not use
+       deprecated NSCopyBits.
        (ns_scroll_run, ns_shift_glyphs_for_insert): Call ns_copy_bits.
        (runAlertPanel): New function.
        (applicationShouldTerminate:): Call runAlertPanel.
-       (initFrameFromEmacs, toggleFullScreen:): Only call useOptimizedDrawing
-       for OSX < 10.10.
+       (initFrameFromEmacs, toggleFullScreen:): Only call
+       useOptimizedDrawing for OSX < 10.10.
        (initFrameFromEmacs:): Only call allocateGState for OSX < 10.10.
        (windowWillUseStandardFrame:defaultFrame:): Cast arg to abs to int.
        (draggingEntered:): Returns NSDragOperation.
@@ -13316,33 +14757,33 @@
 
 2015-05-15  Artur Malabarba  <address@hidden>
 
-       * lisp/emacs-lisp/package.el: Don't ensure-init during startup
+       * lisp/emacs-lisp/package.el: Don't ensure-init during startup.
        (package--init-file-ensured): New variable.
        (package-initialize, package--ensure-init-file): Use it.
 
 2015-05-15  Jan Djärv  <address@hidden>
 
-       Honor :fore/background for XBM on NS (Bug#14969).
-       * nsterm.h (EmacsImage): Add xbm_fg, remove initFromSkipXBM,
+       Honor :fore/background for XBM on NS (Bug#14969)
+       * src/nsterm.h (EmacsImage): Add xbm_fg, remove initFromSkipXBM,
        initFromXBM takes bg, fg args, remove flip arg.
        (ns_image_from_XBM): Add bg, fg args.
-       * image.c (x_create_bitmap_from_data)
+       * src/image.c (x_create_bitmap_from_data)
        (Create_Pixmap_From_Bitmap_Data): ns_image_from_XBM takes bg, fg args.
-       * nsimage.m (ns_image_from_XBM): Add fg, bg args, pass to initFromXBM.
-       Remove flip arg.
+       * src/nsimage.m (ns_image_from_XBM): Add fg, bg args, pass to
+       initFromXBM.  Remove flip arg.
        (initFromSkipXBM): Move code to initFromXBM.
        (initFromXBM): Actually set fg and bg, instead of playing alpha games.
-       Use fg, bg from args (Bug#14969).  Remove if (length) section, was 
always
-       false.
+       Use fg, bg from args (Bug#14969).  Remove if (length) section, was
+       always false.
        Remove bit flipping (bitPat, swt), generated incorrect images when
        width/height wasn't a multiple of 8.
        (setXBMColor:): Modify planes by comparing to saved xbm_fg.
-       * nsterm.m (ns_draw_fringe_bitmap): initFromXBM takes fg, bg args, 
remove
-       flip arg.
+       * src/nsterm.m (ns_draw_fringe_bitmap): initFromXBM takes fg, bg args,
+       remove flip arg.
 
 2015-05-15  Artur Malabarba  <address@hidden>
 
-       * lisp/emacs-lisp/package.el: Be more careful with the init file
+       * lisp/emacs-lisp/package.el: Be more careful with the init file.
        (package--ensure-init-file): Check that user-init-file is set,
        exists, is readable, and is writable.  (Bug#20584)
        Also expand the docstring.
@@ -13350,15 +14791,15 @@
 2015-05-14  Wilson Snyder  <address@hidden>
 
        Sync with upstream verilog-mode revision 6232468
-       * lisp/progmodes/verilog-mode.el 
(verilog-font-lock-grouping-keywords-face)
+       * lisp/progmodes/verilog-mode.el
+       (verilog-font-lock-grouping-keywords-face)
        (verilog-highlight-grouping-keywords): Fix use of face when
-       `verilog-highlight-grouping-keywords' set.  Reported by Jeff
-       Pompa.
+       `verilog-highlight-grouping-keywords' set.  Reported by Jeff Pompa.
        (verilog-auto-reset): Fix AUTORESET to ignore member resets if
-       parent is reset, bug906. Reported by Ken Schmidt.
+       parent is reset, bug906.  Reported by Ken Schmidt.
        (verilog-auto-inout-module): Add fourth regexp argument to
-       AUTOINOUTMODULE and AUTOINOUTCOMP for signals to not match,
-       bug856. Reported by John Tillema.
+       AUTOINOUTMODULE and AUTOINOUTCOMP for signals to not match, bug856.
+       Reported by John Tillema.
        (verilog-auto-inst-port): Fix AUTOINST interfaces to not show
        modport if signal attachment is itself a modport.  Reported by
        Matthew Lovell.
@@ -13379,37 +14820,36 @@
        (verilog-auto-end-comment-lines-re)
        (verilog-end-block-ordered-re, verilog-set-auto-endcomments):
        Automatically comment property/endproperty blocks to match other
-       similar blocks like sequence/endsequence, function/endfunction,
-       etc. Reported by Alex Reed.
+       similar blocks like sequence/endsequence, function/endfunction, etc.
+       Reported by Alex Reed.
        (verilog-set-auto-endcomments): Detect the function- or task-name
-       when auto-commenting blocks that lack an explicit
-       portlist. Reported by Alex Reed.
+       when auto-commenting blocks that lack an explicit portlist.
+       Reported by Alex Reed.
        (verilog-auto, verilog-auto-insert-last): Add AUTOINSERTLAST to
-       allow post-AUTO user fixups, bug826. Reported by Dennis
-       Muhlestein.
+       allow post-AUTO user fixups, bug826.  Reported by Dennis Muhlestein.
        (verilog-no-indent-begin-re): When `verilog-indent-begin-after-if'
        is nil, fix indenting initial/final to match always statements,
-       bug825. Reported by Tim Clapp.
+       bug825.  Reported by Tim Clapp.
        (verilog-extended-complete-re): Fix indentation of DPI-C imports
-       with c_identifiers, and DPI-C imports, bug557. Reported by ZeDong
+       with c_identifiers, and DPI-C imports, bug557.  Reported by ZeDong
        Mao and Jason Forkey.
        (verilog-read-decls): Fix parsing typed interfaces.  Fix
        AUTOINOUTMODPORT missing types.  Reported by Stephan Bourduas.
        Fix localparam not being ignored in AUTOINSTPARAM,
-       bug889. Reported by Shannon Hill.
+       bug889.  Reported by Shannon Hill.
        (verilog-auto-output-every): Add regexp to AUTOOUTPUTEVERY,
        bug793.  Reported by Pierre-David Pfister.
-       (verilog-auto-arg-format, verilog-auto-arg-ports): Add
-       verilog-auto-arg-format to support newlines in AUTOARG. Reported
-       by Jie Xiao.
+       (verilog-auto-arg-format, verilog-auto-arg-ports):
+       Add verilog-auto-arg-format to support newlines in AUTOARG.
+       Reported by Jie Xiao.
        (verilog-batch-execute-func): Do not batch re-auto files loaded by
-       Local Variables. Fix printing "no changes to be saved" with
-       verilog-batch. Reported by Dan Dever.
+       Local Variables.  Fix printing "no changes to be saved" with
+       verilog-batch.  Reported by Dan Dever.
        (verilog-auto-inout-module): Fix AUTOINOUTMODULE not inserting
        interface-only modules, bug721.  Reported by Dean Hoyt.
        Author: Alex Reed <address@hidden>
-       * lisp/progmodes/verilog-mode.el (verilog-beg-of-statement): Don't
-       treat '<keyword>:<identifier>' as the start of a labeled
+       * lisp/progmodes/verilog-mode.el (verilog-beg-of-statement):
+       Don't treat '<keyword>:<identifier>' as the start of a labeled
        statement, bug905.  Reported by Enzo Chi.
        (verilog-directive-re, verilog-compiler-directives)
        (verilog-keywords): Match full set of IEEE 2012-1800 compiler
@@ -13420,18 +14860,18 @@
        (verilog-optional-signed-range-re, verilog-optional-signed-re):
        Fix incorrect indentation/alignment of unsigned declarations,
        bug897.
-       (verilog-looking-back, verilog-in-attribute-p): Fix labling of
+       (verilog-looking-back, verilog-in-attribute-p): Fix labeling of
        always constructs, bug895.
-       (verilog-calc-1): Fix verilog-mode constraint indentation,
-       bug324. Reported by Eric Mastromarchi.
+       (verilog-calc-1): Fix verilog-mode constraint indentation, bug324.
+       Reported by Eric Mastromarchi.
        (verilog-beg-of-statement): Fix indenting for some forms of
        constraintsm bug433.  Reported by Brad Parker.  Fix indentation of
-       continued assignment incorrect if first line ends with ']',
-       bug437. Reported by Dan Dever.  Fix indention of cover inside an
-       ifdef, bug 862. Reported by Bernd Beuster Fix labeling do-while
+       continued assignment incorrect if first line ends with ']', bug437.
+       Reported by Dan Dever.  Fix indention of cover inside an
+       ifdef, bug 862.  Reported by Bernd Beuster.  Fix labeling do-while
        blocks, bug842.
-       (verilog-preprocessor-re): Fix fork/end UNMATCHED warning,
-       bug859. Reported by Kaushal Modi.
+       (verilog-preprocessor-re): Fix fork/end UNMATCHED warning, bug859.
+       Reported by Kaushal Modi.
        (verilog-set-auto-endcomments): Fix endlabel end comments, bug888.
        (verilog-backward-token): Fix indenting sensitivity lists with
        named events, bug840.  Reed.
@@ -13446,7 +14886,7 @@
        result is valid (Bug#20432).
        (xg_frame_set_char_size, xg_update_scrollbar_pos):
        Calculate scale only if needed.
-       show ASCII approximations instead.
+       Show ASCII approximations instead.
 
 2015-05-14  Eli Zaretskii  <address@hidden>
 
@@ -13455,24 +14895,24 @@
        functions on initial-frame frame.  (Bug#20565)
 
        Fix selective diff browsing in Ediff
-       * lisp/vc/ediff-util.el (ediff-focus-on-regexp-matches): Go to the
-       beginning of the region before searching for the
+       * lisp/vc/ediff-util.el (ediff-focus-on-regexp-matches):
+       Go to the beginning of the region before searching for the
        ediff-regexp-focus-* regexps.  (Bug#20568)
 
 2015-05-14  Jan D  <address@hidden>
 
-       Fixes Bug#20142.
-       * gtkutil.c (delete_cb): Don't send delete event here, it does arrive
-       in the main loop, even for Gtk 3 (Bug#20142).
+       Fixes bug#20142
+       * src/gtkutil.c (delete_cb): Don't send delete event here, it does
+       arrive in the main loop, even for Gtk 3 (Bug#20142).
 
        Don't access display after i/o error (Bug#19147).
-       * xterm.c (x_connection_closed): Add third arg ioerror.
+       * src/xterm.c (x_connection_closed): Add third arg ioerror.
        If ioerror, set display to 0 (Bug#19147).
        (x_error_quitter): Call x_connection_closed with third arg false.
        (x_io_error_quitter): Call x_connection_closed with third arg true.
 
        Handle GTK_SCALE, fixes Bug#20432.
-       * gtkutil.c (xg_get_gdk_scale): New function.
+       * src/gtkutil.c (xg_get_gdk_scale): New function.
        (xg_frame_set_char_size)
        (x_wm_set_size_hint, xg_get_default_scrollbar_width)
        (xg_get_default_scrollbar_height)
@@ -13481,7 +14921,6 @@
 
 2015-05-13  Leo Liu  <address@hidden>
 
-       Fix cps--gensym
        * lisp/emacs-lisp/generator.el (cps--gensym): Fix.
 
 2015-05-13  Glenn Morris  <address@hidden>
@@ -13496,8 +14935,8 @@
        * src/lisp.mk (lisp): Add emacs-lisp/cl-generic.elc.
        * lisp/emacs-lisp/cl-generic.el (cl-generic-define-method):
        Avoid defalias for closures which are not immutable.
-       (cl--generic-prefill-dispatchers): New macro.  Use it to prefill the
-       dispatchers table with various entries.
+       (cl--generic-prefill-dispatchers): New macro.  Use it to prefill
+       the dispatchers table with various entries.
        * lisp/emacs-lisp/ert.el (emacs-lisp-mode-hook):
        * lisp/emacs-lisp/seq.el (emacs-lisp-mode-hook): Use add-hook.
 
@@ -13516,7 +14955,7 @@
        * lisp/progmodes/tcl.el (tcl-filter):
        Handle comint-prompt-read-only like gud.el does.  (Bug#20549)
 
-       Add basic VC push support.
+       Add basic VC push support
        * lisp/vc/vc.el (vc-push): New autoloaded command.
        * lisp/vc/vc-hooks.el (vc-prefix-map, vc-menu-map): Add vc-push.
        * lisp/vc/vc-bzr.el (vc-bzr--pushpull): New, factored from vc-bzr-pull.
@@ -13578,9 +15017,11 @@
        (cl-generic-define-method): Use it as well, and add support for
        context args.
        (cl--generic-get-dispatcher): Handle &context dispatch.
-       (cl--generic-cache-miss): `dispatch-arg' can now be a context 
expression.
+       (cl--generic-cache-miss): `dispatch-arg' can now be a
+       context expression.
        (cl--generic-dispatchers): Pre-fill.
-       * test/automated/cl-generic-tests.el (sm-generic-test-12-context): New 
test.
+       * test/automated/cl-generic-tests.el (sm-generic-test-12-context):
+       New test.
 
 2015-05-11  Glenn Morris  <address@hidden>
 
@@ -13592,7 +15033,8 @@
        * lisp/term/rxvt.el: Require term/xterm.
        (rxvt-function-map): Use xterm-rxvt-function-map.
        (rxvt-standard-colors): Move before first use.
-       (terminal-init-rxvt): Use xterm--push-map and 
xterm-register-default-colors.
+       (terminal-init-rxvt): Use xterm--push-map and
+       xterm-register-default-colors.
        (rxvt-rgb-convert-to-16bit, rxvt-register-default-colors): Remove.
        * lisp/term/xterm.el (xterm-rxvt-function-map): New var.
        Move shared bindings between rxvt and xterm to it.
@@ -13614,10 +15056,6 @@
        * Makefile.in (emacslog): Remove srcdir.
        (ChangeLog): Update for the above.
 
-2015-05-11  Paul Eggert  <address@hidden>
-
-       Spelling fix
-
 2015-05-10  Fabián Ezequiel Gallina  <address@hidden>
 
        python.el: better limit for looking-back calls
@@ -13627,8 +15065,8 @@
 2015-05-10  Stefan Monnier  <address@hidden>
 
        CEDET (srecode-insert-fcn): Fix use of oref on a class
-       * lisp/cedet/srecode/insert.el (srecode-insert-fcn): Fix use of oref on
-       a class.  Reported by Pierre Lorenzon.
+       * lisp/cedet/srecode/insert.el (srecode-insert-fcn): Fix use of oref
+       on a class.  Reported by Pierre Lorenzon.
        (srecode-template-inserter-point): Remove declaration.
 
        CEDET (srecode-create-dictionary): Avoid obsolete object name
@@ -13723,9 +15161,10 @@
 
 2015-05-10  Jan D  <address@hidden>
 
-       Draw composite string correctly (Bug#20537).
-       * nsterm.m (ns_draw_composite_glyph_string_foreground): New function.
-       (ns_draw_glyph_string): Call it (Bug#20537).
+       Draw composite string correctly (Bug#20537)
+       * src/nsterm.m (ns_draw_composite_glyph_string_foreground):
+       New function.
+       (ns_draw_glyph_string): Call it.
 
 2015-05-09  Eli Zaretskii  <address@hidden>
 
@@ -13748,20 +15187,20 @@
 
        * build-aux/gitlog-to-emacslog: Add "for earlier changes" to footer.
 
-       Add command-line option-parsing to gitlog-to-emacslog.
+       Add command-line option-parsing to gitlog-to-emacslog
        * build-aux/gitlog-to-emacslog: Add command-line options.
        By default, refuse to remove an existing output file.
        * Makefile.in (CHANGELOG): Update default.
        (ChangeLog): Do not test for existing file.
        (change-history-nocommit): Ensure temp file does not exist.
 
-       Quieten --without-x compilation.
+       Quieten --without-x compilation
        * lisp/term/common-win.el: Provide a feature.
        * lisp/term/x-win.el (term/common-win): Require it.
 
        * lisp/dired-aux.el (dired-do-print): Require lpr.
 
-       Quieten compilation, eg in --without-x builds.
+       Quieten compilation, eg in --without-x builds
        * lisp/dired-aux.el (lpr-printer-switch):
        * lisp/frame.el (tool-bar-height):
        * lisp/linum.el (font-info):
@@ -13785,19 +15224,19 @@
 
 2015-05-08  Nicolas Richard  <address@hidden>
 
-       help--binding-locus: Document argument POSITION.
-       * lisp/help.el (help--binding-locus): Document argument POSITION. 
(bug#20530)
+       * lisp/help.el (help--binding-locus): Document argument POSITION.
+       (Bug#20530)
 
 2015-05-08  Paul Eggert  <address@hidden>
 
-       Merge from gnulib.
+       Merge from gnulib
        * doc/misc/texinfo.tex: Get latest version.
 
 2015-05-08  Oleh Krehel  <address@hidden>
 
        ffap.el (ffap-read-file-or-url): Fix completing-read call
        * lisp/ffap.el (ffap-read-file-or-url): The HIST argument of
-         `completing-read' should be a symbol.
+       `completing-read' should be a symbol.
 
 2015-05-08  Eli Zaretskii  <address@hidden>
 
@@ -13826,23 +15265,22 @@
 
 2015-05-07  Artur Malabarba  <address@hidden>
 
-       * lisp/emacs-lisp/subr-x.el (if-let): Fix debug spec
+       * lisp/emacs-lisp/subr-x.el (if-let): Fix debug spec.
        Support the case when BINDINGS is a single tuple.  (Bug#20525)
 
-       * etc/NEWS: Fix typo in commit 14bb519
+       * etc/NEWS: Fix typo in previous commit
+       (14bb519f1034ddb38ce375cbad7095d9b07f8b26).
 
 2015-05-07  Jan D  <address@hidden>
 
-       Warn for multiple display crash for all Gtk+ versions.
-       * configure.ac: Warn for multiple display crash for all Gtk+
-       versions.  Output URL to Gtk+ bug (Bug#20452).
+       * configure.ac: Warn for multiple display crash for all Gtk+ versions.
+       Output URL to Gtk+ bug (Bug#20452).
 
-       ns-win.el (ns-paste-secondary): Use gui-get-selection.
-       * ns-win.el (ns-paste-secondary): Use gui-get-selection.
+       * lisp/term/ns-win.el (ns-paste-secondary): Use gui-get-selection.
 
 2015-05-07  Artur Malabarba  <address@hidden>
 
-       * lisp/emacs-lisp/package.el: New "external" package status
+       * lisp/emacs-lisp/package.el: New "external" package status.
        An external package is any installed package that's not built-in
        and not from `package-user-dir', which usually means it's from an
        entry in `package-directory-list'.  They are treated much like
@@ -13856,7 +15294,7 @@
 
 2015-05-06  Stefan Monnier  <address@hidden>
 
-       * lisp/mail/rmail.el: Use lexical-binding
+       * lisp/mail/rmail.el: Use lexical-binding.
        (rmail-bury): Remove unused var `buffer-to-bury'.
        (rmail-get-new-mail): Remove unused vars `opoint' and `success'.
        (rmail-parse-url): Remove unused var `proto', `user', and `host'.
@@ -13873,7 +15311,7 @@
 
        * Makefile.in (change-history-commit): Add missing piece of previous.
 
-       Avoid unnecessary bumping of Makefile.in's timestamp.
+       Avoid unnecessary bumping of Makefile.in's timestamp
        * Makefile.in (gen_origin): Move to gitlog-to-emacslog.
        (emacslog): New variable.
        (ChangeLog): Use $emacslog.  Don't pass $gen_origin.
@@ -13900,7 +15338,6 @@
 
        * lisp/subr.el (delete-dups): Pre-size the hashtable.
 
-       (define-modify-macro): Make sure cl--arglist-args is defined
        * lisp/emacs-lisp/cl.el (define-modify-macro): Make sure
        cl--arglist-args is defined (bug#20517).
 
@@ -13910,14 +15347,13 @@
 
 2015-05-06  Dmitry Gutov  <address@hidden>
 
-       Only cancel timer when it is non-nil
        * lisp/cedet/pulse.el (pulse-momentary-unhighlight): Only cancel
        timer when it is non-nil
        (http://lists.gnu.org/archive/html/emacs-devel/2015-05/msg00223.html).
 
 2015-05-06  Glenn Morris  <address@hidden>
 
-       Quieten cedet compilation
+       Quieten CEDET compilation
        * lisp/cedet/semantic/db-el.el (semanticdb-elisp-sym->tag):
        Invert fboundp test to quieten on current Emacs.
        * lisp/cedet/ede/config.el (ede-shell-run-something)
@@ -13932,7 +15368,7 @@
 
 2015-05-06  Oleh Krehel  <address@hidden>
 
-       lisp/subr.el (delete-dups): Avoid nreverse.
+       * lisp/subr.el (delete-dups): Avoid nreverse.
 
 2015-05-06  Artur Malabarba  <address@hidden>
 
@@ -13944,10 +15380,11 @@
 
 2015-05-06  Stefan Monnier  <address@hidden>
 
-       * lisp/emacs-lisp/testcover.el: Don't use edebug--read (bug#20487)
+       * lisp/emacs-lisp/testcover.el: Don't use edebug--read (bug#20487).
        * lisp/emacs-lisp/testcover.el: Use lexical-binding.
-       (testcover--read): Rename from testcover-read.  Change calling 
convention.
-       Use edebug-read-and-maybe-wrap-form now that edebug-read is gone.
+       (testcover--read): Rename from testcover-read.  Change calling
+       convention.  Use edebug-read-and-maybe-wrap-form now that edebug-read
+       is gone.
        (testcover-start): Use add-function.  Move edebug-all-defs binding to
        testcover--read.
        (testcover-this-defun): Tighten scope of edebug-all-defs binding.
@@ -13956,9 +15393,8 @@
 
 2015-05-06  Oleh Krehel  <address@hidden>
 
-       lisp/subr.el (delete-dups): Use a hash table
        * lisp/subr.el (delete-dups): When there are more than 100 candidates,
-         use a hash table. This can result in ~500 times speed-up for typical
+         use a hash table.  This can result in ~500 times speed-up for typical
          collections of size 5000, like that of `load-library'.
 
 2015-05-06  Stefan Monnier  <address@hidden>
@@ -13969,8 +15405,8 @@
        * lisp/cedet/semantic/bovine/gcc.el (semantic-gcc-setup): Remove unused
        var `prefix'.
 
-       * lisp/cedet/semantic/symref/grep.el: Fix unused var warnings
-       * lisp/cedet/semantic/symref/grep.el (grepflags, greppattern): Declare.
+       * lisp/cedet/semantic/symref/grep.el: Fix unused var warnings.
+       (grepflags, greppattern): Declare.
        (semantic-symref-perform-search): Remove unused var `pat'.
 
        CEDET (srecode-compile-inserter): Avoid `oref' on classes
@@ -13983,17 +15419,16 @@
        Clean up pulse.el a little
        * lisp/cedet/pulse.el (pulse): Remove.
        (pulse-momentary-timer): Save instead of the stop time.
-       (pulse-momentary-highlight-overlay): Call
-       pulse-momentary-unhighlight first thing. Treat
-       pulse-momentary-overlay as a single value, not a list. Save the
-       created timer. Only pass the stop time to the timer.
+       (pulse-momentary-highlight-overlay):
+       Call pulse-momentary-unhighlight first thing.
+       Treat pulse-momentary-overlay as a single value, not a list.
+       Save the created timer.  Only pass the stop time to the timer.
        (pulse-tick): Update accordingly.
        (pulse-momentary-unhighlight): Treat pulse-momentary-overlay as a
-       single value. Cancel the timer.
+       single value.  Cancel the timer.
 
 2015-05-06  Tassilo Horn  <address@hidden>
 
-       Support the biblatex journaltitle field
        * lisp/textmodes/reftex-cite.el (reftex-format-bib-entry):
        Support the biblatex journaltitle field.
 
@@ -14021,17 +15456,17 @@
 
        Add semantic/symref/grep file patterns for ruby-mode
        * lisp/cedet/semantic/symref/grep.el
-       (semantic-symref-filepattern-alist): Add patterns for
-       ruby-mode. Clarify the docstring.
+       (semantic-symref-filepattern-alist): Add patterns for ruby-mode.
+       Clarify the docstring.
 
        Don't require match
        * lisp/progmodes/xref.el (xref--read-identifier): Don't require
-       match. That doesn't work for every command, and some identifier
+       match.  That doesn't work for every command, and some identifier
        completion tables are bound to be imperfect anyway.
 
 2015-05-05  Stefan Monnier  <address@hidden>
 
-       * lisp/cedet/semantic/grammar.el: Fix compiler warnings (bug#20505)
+       * lisp/cedet/semantic/grammar.el: Fix compiler warnings (bug#20505).
        (semantic-grammar--template-expand): New function.
        (semantic-grammar-header, semantic-grammar-footer): Use it.
        (semantic-grammar--lex-block-specs): Remove unused var `block-spec'.
@@ -14068,19 +15503,14 @@
        * test/automated/seq-tests.el: Add a test for parsing and binding
        `&rest' in `seq-let'.
 
-2015-05-05  Paul Eggert  <address@hidden>
-
-       Spelling fixes
-
-2015-05-05  (tiny change) Pierre Lorenzon  <address@hidden>
-
-       * eieio-custom.el (eieio-object-value-get): Add missing increment
-       (Bug#20467)
+2015-05-05  Pierre Lorenzon  <address@hidden>  (tiny change)
 
+       * lisp/emacs-lisp/eieio-custom.el (eieio-object-value-get):
+       Add missing increment (Bug#20467).
        (eieio-object-value-create): Adjust to new slots representation
-       (Bug#20467)
-       * eieio-custom.el (eieio-object-value-create):
-       Fix missed adjustment to new representation of slots metadata.
+       (Bug#20467).
+       (eieio-object-value-create): Fix missed adjustment to new
+       representation of slots metadata.
 
 2015-05-05  Nicolas Petton  <address@hidden>
 
@@ -14103,13 +15533,11 @@
 
 2015-05-04  Dmitry Gutov  <address@hidden>
 
-       Buttonize the whole line, including the number at the beginning
        * lisp/progmodes/xref.el (xref--location-at-point): Revert the
        previous change.
        (xref--insert-xrefs): Buttonize the whole line, including the
        number at the beginning.
 
-       Make sure we're inside the let bindings
        * lisp/progmodes/elisp-mode.el (elisp-completion-at-point):
        Make sure we're inside the let bindings.
        * test/automated/elisp-mode-tests.el
@@ -14187,7 +15615,6 @@
 
 2015-05-04  Dmitry Gutov  <address@hidden>
 
-       Highlight both type and symbol name
        * lisp/progmodes/elisp-mode.el (elisp--xref-find-definitions):
        Highlight both type and symbol name.
 
@@ -14202,7 +15629,9 @@
 
 2015-05-04  Daniel Colascione  <address@hidden>
 
-       Fix previous commit
+       * lisp/simple.el (save-mark-and-excursion--save)
+       (save-mark-and-excursion--restore): Fix previous commit
+       (255a011f0ecf004b31c59945b10154b10fac3af1).
 
 2015-05-04  Dmitry Gutov  <address@hidden>
 
@@ -14217,25 +15646,25 @@
 
 2015-05-04  Daniel Colascione  <address@hidden>
 
-       Add `save-mark-and-excursion', which has the old `save-excursion' 
behavior
-       * doc/lispref/positions.texi (Excursions): Document
-       `save-mark-and-excursion'.
-       * lisp/font-lock.el (font-lock-fontify-block): Use
-       `save-mark-and-excursion' instead of `save-excursion', restoring
-       Emacs 24 behavior.
+       Add `save-mark-and-excursion', which has the old
+       `save-excursion' behavior
+       * doc/lispref/positions.texi (Excursions):
+       Document `save-mark-and-excursion'.
+       * lisp/font-lock.el (font-lock-fontify-block):
+       Use `save-mark-and-excursion' instead of `save-excursion',
+       restoring Emacs 24 behavior.
        * lisp/simple.el (save-mark-and-excursion--save)
        (save-mark-and-excursion--restore): New functions.
        (save-mark-and-excursion): New user macro.
-       * src/editfns.c (Fsave_excursion): Mention
-       `save-mark-and-excursion' in `save-excursion' documentation.
+       * src/editfns.c (Fsave_excursion): Mention `save-mark-and-excursion'
+       in `save-excursion' documentation.
 
 2015-05-04  Dmitry Gutov  <address@hidden>
 
-       Classify lone symbol inside let varlist as variable
        * lisp/progmodes/elisp-mode.el (elisp-completion-at-point):
        Classify lone symbol inside let varlist as variable.
-       * test/automated/elisp-mode-tests.el 
(completest-variables-in-let-bindings):
-       New test.
+       * test/automated/elisp-mode-tests.el
+       (completest-variables-in-let-bindings): New test.
 
        Add xref-pulse-on-jump
        * lisp/cedet/pulse.el (pulse-momentary-highlight-one-line):
@@ -14248,7 +15677,7 @@
 
 2015-05-04  Stefan Monnier  <address@hidden>
 
-       * lisp/org/org-{macs,list}.el: Fix lexical warnings
+       lisp/org/org-{macs,list}.el: Fix lexical warnings
        * lisp/org/org-list.el (org-list-struct): Remove unused var `ind'.
        (org-list-get-next-item, org-list-get-prev-item)
        (org-list-get-children): Mark unused arg `struct'.
@@ -14284,17 +15713,16 @@
 
 2015-05-04  Artur Malabarba  <address@hidden>
 
-       * lisp/emacs-lisp/package.el: Remove `package--silence' variable
+       * lisp/emacs-lisp/package.el: Remove `package--silence' variable.
        (package-import-keyring, package-refresh-contents)
        (package-compute-transaction, package--save-selected-packages)
        (package-install-from-archive, package-delete)
-       (package-menu--perform-transaction): Use `inhibit-message'
-       instead.
+       (package-menu--perform-transaction): Use `inhibit-message' instead.
        (package--compile): Set `warning-minimum-level' to :error.
 
 2015-05-03  Stefan Monnier  <address@hidden>
 
-       * lisp/term/screen.el (xterm-screen-extra-capabilities): New custom
+       * lisp/term/screen.el (xterm-screen-extra-capabilities): New custom.
        (terminal-init-screen): Use it (bug#20356).
        * lisp/term/xterm.el: Provide `term/xterm' instead of `xterm'.
        (xterm--extra-capabilities-type): New const.
@@ -14303,7 +15731,6 @@
 
 2015-05-03  Dmitry Gutov  <address@hidden>
 
-       xref--insert-xrefs: Tweak the faces
        * lisp/progmodes/xref.el (xref--insert-xrefs): Tweak the faces.
        Always insert a newline at the end (to avoid mouse-face background
        tail at the last line).
@@ -14327,12 +15754,12 @@
 2015-05-02  Michael Vehrs  <address@hidden>
 
        Fix display of keyboard layouts for right-to-left scripts
-       * lisp/international/quail.el (quail-insert-kbd-layout): Force
-       left-to-right paragraph direction.
+       * lisp/international/quail.el (quail-insert-kbd-layout):
+       Force left-to-right paragraph direction.
 
 2015-05-02  K. Handa  <address@hidden>
 
-       * cmds.c (internal_self_insert): When we insert spaces for
+       * src/cmds.c (internal_self_insert): When we insert spaces for
        padding, set point before the padding spaces, not after them.
 
 2015-05-02  Nicolas Petton  <address@hidden>
@@ -14342,7 +15769,8 @@
 2015-05-02  Dmitry Gutov  <address@hidden>
 
        Fix etags-xref-find for references
-       * lisp/progmodes/elisp-mode.el (elisp--xref-find-references): Use 
`cl-mapcan'.
+       * lisp/progmodes/elisp-mode.el (elisp--xref-find-references):
+       Use `cl-mapcan'.
        * lisp/progmodes/etags.el (etags-xref-find): Ditto.  Prompt for
        directory if no tags tables are loaded (bug#19468).
 
@@ -14462,7 +15890,7 @@
 
 2015-05-01  Pontus Michael  <address@hidden>
 
-       * lisp/simple.el (blink-matching-open): Better behavior in minibuffer
+       * lisp/simple.el (blink-matching-open): Better behavior in minibuffer.
 
 2015-05-01  Glenn Morris  <address@hidden>
 
@@ -14478,8 +15906,8 @@
 
 2015-05-01  K. Handa  <address@hidden>
 
-       * mule-cmds.el (input-method-use-echo-area): Change :type to
-       'boolean.
+       * lisp/international/mule-cmds.el (input-method-use-echo-area):
+       Change :type to 'boolean.
 
 2015-05-01  Lars Magne Ingebrigtsen  <address@hidden>
 
@@ -14493,7 +15921,6 @@
 
 2015-05-01  Jan D  <address@hidden>
 
-       (ns-get-cut-buffer-internal): Remove this alias.
        * lisp/term/ns-win.el (ns-get-cut-buffer-internal): Remove this alias.
 
 2015-04-30  Glenn Morris  <address@hidden>
@@ -14513,7 +15940,7 @@
        * lisp/term/ns-win.el (ns-own-selection-internal)
        (ns-disown-selection-internal, ns-selection-owner-p)
        (ns-selection-exists-p, ns-get-selection):
-       Declare for compiler..
+       Declare for compiler.
 
        Function declaration updates prompted by 'make check-declare'
        * lisp/emacs-lisp/package.el (lm-homepage):
@@ -14554,7 +15981,7 @@
 
 2015-04-30  Artur Malabarba  <address@hidden>
 
-       * lisp/emacs-lisp/package.el: Some speed optimizations on menu refresh
+       * lisp/emacs-lisp/package.el: Some speed optimizations on menu refresh.
        (package-menu--print-info): Obsolete.
        (package-menu--print-info-simple): New function.
        (package-menu--refresh): Use it, simplify code, and improve
@@ -14562,7 +15989,7 @@
        * lisp/emacs-lisp/tabulated-list.el (tabulated-list-print-entry):
        Tiny performance improvement.
 
-       * lisp/emacs-lisp/package.el (package--message): inhibit-message
+       * lisp/emacs-lisp/package.el (package--message): inhibit-message.
 
 2015-04-29  Paul Eggert  <address@hidden>
 
@@ -14579,8 +16006,8 @@
 2015-04-29  Helmut Eller  <address@hidden>
 
        Set next-error-* in xref--xref-buffer-mode
-       * xref.el (xref--xref-buffer-mode): Set `next-error-function' and
-       `next-error-last-buffer'.
+       * lisp/progmodes/xref.el (xref--xref-buffer-mode):
+       Set `next-error-function' and `next-error-last-buffer'.
        (xref--next-error-function): New function.
        (http://lists.gnu.org/archive/html/emacs-devel/2015-04/msg01311.html)
 
@@ -14592,7 +16019,7 @@
 
 2015-04-29  Artur Malabarba  <address@hidden>
 
-       * lisp/emacs-lisp/package.el: Use pushnew for downloads in progress
+       * lisp/emacs-lisp/package.el: Use pushnew for downloads in progress.
        (package--download-and-read-archives): Use pushnew instead of
        append.  If something terrible happened during a previous
        download, simply refreshing should now make things work again.
@@ -14620,11 +16047,11 @@
 
 2015-04-29  Sam Steingold  <address@hidden>
 
-       bury RCIRC buffers when there is no activity
-       lisp/net/rcirc.el (rcirc-non-irc-buffer): remove
-       (rcirc-bury-buffers): new function
-       (rcirc-next-active-buffer): when there is no new activity, use
-       `rcirc-bury-buffers' to hide all RCIRC buffers
+       Bury RCIRC buffers when there is no activity
+       * lisp/net/rcirc.el (rcirc-non-irc-buffer): Remove.
+       (rcirc-bury-buffers): New function.
+       (rcirc-next-active-buffer): When there is no new activity, use
+       `rcirc-bury-buffers' to hide all RCIRC buffers.
 
 2015-04-29  Krzysztof Jurewicz  <address@hidden>  (tiny change)
 
@@ -14641,17 +16068,17 @@
 
 2015-04-29  Artur Malabarba  <address@hidden>
 
-       * lisp/emacs-lisp/bytecomp.el: Use `inhibit-message'
-       (byte-compile--message): Use `inhibit-message' instead of hiding
-       the previous message with (message nil).
+       * lisp/emacs-lisp/bytecomp.el (byte-compile--message):
+       Use `inhibit-message' instead of hiding the previous message
+       with (message nil).
 
 2015-04-29  Oleh Krehel  <address@hidden>
 
        Remove the deprecated INTERNAL_FIELD macro by expanding it
        * src/lisp.h (INTERNAL_FIELD): Remove.
        (DEFVAR_KBOARD): Modify accordingly.
-       * alloc.c, buffer.c, buffer.h, category.c, keyboard.c, keyboard.h:
-       * syntax.c: Adjust users.
+       * src/alloc.c, src/buffer.c, src/buffer.h, src/category.c:
+       * src/keyboard.c, src/keyboard.h, src/syntax.c: Adjust users.
        * src/buffer.c (compact_buffer): Use BVAR.
 
 2015-04-29  Glenn Morris  <address@hidden>
@@ -14741,7 +16168,7 @@
 2015-04-27  Thomas Fitzsimmons  <address@hidden>
 
        Change default location of EUDC options file
-       * NEWS: Document change to EUDC options file's default location.
+       * etc/NEWS: Document change to EUDC options file's default location.
        * lisp/net/eudc-vars.el (eudc-options-file): Use
        `locate-user-emacs-file' to change default options file location.
 
@@ -14771,7 +16198,7 @@
 
        Bump version of seq.el to 1.5
        * lisp/emacs-lisp/seq.el (seq-doseq): Remove undocumented return value
-         from seq-doseq.  Bump version number of seq.el.
+       from seq-doseq.  Bump version number of seq.el.
 
 2015-04-27  Glenn Morris  <address@hidden>
 
@@ -14817,7 +16244,7 @@
        (reftex--pro-or-de, reftex--start-line, reftex--mark-line):
        Add `reftex--' prefix.  Fix all users.
        (reftex-toc-promote-prepare): Use _ for dummy variable.
-       (reftex-toc-restore-region): Rename `m
+       (reftex-toc-restore-region): Rename `m.
 
 2015-04-27  Eli Zaretskii  <address@hidden>
 
@@ -14826,8 +16253,8 @@
        last change.  (Bug#20429)
 
        Fix redisplay of frame after loading new fonts
-       * src/xdisp.c (redisplay_internal): When retrying redisplay of a
-       frame because new fonts were loaded, disable all redisplay
+       * src/xdisp.c (redisplay_internal): When retrying redisplay of
+       a frame because new fonts were loaded, disable all redisplay
        optimizations on that frame by calling SET_FRAME_GARBAGED.
        (Bug#20410)
 
@@ -14836,15 +16263,13 @@
        * lisp/info.el (Info-menu): Properly provide the `default'
        (Bug#20391)
 
-       * elisp-mode.el: Catch errors from `documentation'
-       (Bug#20418)
        * lisp/progmodes/elisp-mode.el (elisp--get-fnsym-args-string):
-       Catch errors from documentation.
+       Catch errors from documentation (bug#20418).
        (emacs-lisp-mode-abbrev-table): Remove redundant defvar.
 
 2015-04-26  Stefan Monnier  <address@hidden>
 
-       lisp/emacs-lisp/package.el: Move variables to silence byte-compiler
+       * lisp/emacs-lisp/package.el: Move variables to silence byte-compiler.
        Remove redundant ":group 'package".
 
 2015-04-26  Eli Zaretskii  <address@hidden>
@@ -14867,20 +16292,20 @@
        apostrophe character, i.e. insert the sequence '``
        (quote-backquote-backquote), commonly useful in portuguese, for
        instance.
-       * tex-mode.el (tex-insert-quote): Add ?' to the list of preceding
-       chars making `tex-insert-quote' be in the "opening" context.
+       * lisp/textmodes/tex-mode.el (tex-insert-quote): Add ?' to the list of
+       preceding chars making `tex-insert-quote' be in the "opening" context.
 
 2015-04-25  Dmitry Gutov  <address@hidden>
 
        Pass `id' to `completing-read' as def instead of initial input
-       * xref.el (xref--read-identifier): Pass `id' to `completing-read'
-       as the default value instead of initial input
+       * lisp/progmodes/xref.el (xref--read-identifier): Pass `id' to
+       `completing-read' as the default value instead of initial input
        (http://lists.gnu.org/archive/html/emacs-devel/2015-04/msg01182.html).
 
 2015-04-25  Paul Eggert  <address@hidden>
 
        Don't freeze with unreadable processes
-       Don't freeze if an exiting process can't be read from. (Bug#19860).
+       Don't freeze if an exiting process can't be read from.  (Bug#19860).
        This fixes a bug I introduced in
        2014-07-08T07:24:address@hidden@cs.ucla.edu
        "* process.c: Add sanity checks for file descriptors."
@@ -14892,7 +16317,7 @@
 2015-04-25  Alan Mackenzie  <address@hidden>
 
        Fix change from 2015-04-22 "On C-y, stop some text property entries ..."
-       * lisp/subr.el (remove-yank-excluded-properties): put
+       * lisp/subr.el (remove-yank-excluded-properties): Put
        `with-silent-modifications' around only the last three lines of code.
 
 2015-04-25  Artur Malabarba  <address@hidden>
@@ -14900,11 +16325,11 @@
        * lisp/emacs-lisp/package.el (package-all-keywords): Don't cache
        (package--all-keywords): Deleted variable.
 
-       * etc/NEWS: Document package-hiding functionality
+       * etc/NEWS: Document package-hiding functionality.
 
 2015-04-25  Eli Zaretskii  <address@hidden>
 
-       lisp/window.el (recenter-last-op): Doc fix.  (Bug#20419)
+       * lisp/window.el (recenter-last-op): Doc fix.  (Bug#20419)
 
        Clarify the doc string of 'replace-regexp-in-string'
        * lisp/subr.el (replace-regexp-in-string): Doc fix.  (Bug#20395)
@@ -14971,7 +16396,7 @@
 
 2015-04-24  Stefan Monnier  <address@hidden>
 
-       * lisp/emacs-lisp/seq.el (seq-doseq): Tighten the code
+       * lisp/emacs-lisp/seq.el (seq-doseq): Tighten the code.
        (seq-doseq): Fix out-of-scope binding.
        Don't call `seq-length at every iteration.
        Reduce `if's from 3 to 2 per iteration.
@@ -15031,7 +16456,8 @@
 2015-04-22  Thomas Fitzsimmons  <address@hidden>
 
        Improve EUDC manual
-       * eudc.texi (Troubleshooting): New LDAP troubleshooting subsection.
+       * doc/misc/eudc.texi (Troubleshooting):
+       New LDAP troubleshooting subsection.
 
 2015-04-22  Paul Eggert  <address@hidden>
 
@@ -15050,7 +16476,7 @@
        `inhibit_message' is non-zero.
        * etc/NEWS: Add an entry.
        * doc/lispref/display.texi: Add an entry for `inhibit-message',
-         mention it in `message'.
+       mention it in `message'.
 
 2015-04-22  Martin Rudalics  <address@hidden>
 
@@ -15066,15 +16492,15 @@
 
 2015-04-22  Artur Malabarba  <address@hidden>
 
-       * lisp/files.el (basic-save-buffer): Fix argument
+       * lisp/files.el (basic-save-buffer): Fix argument.
 
-       * lisp/cus-edit.el (custom-file): Consider init-file-had-error
+       * lisp/cus-edit.el (custom-file): Consider init-file-had-error.
        In case `(and (null custom-file) init-file-had-error)' do the same
        thing we'd do if `(null user-init-file)', which is to either error out
        or return nil.  This is in line with `custom-save-all' which would
-       throw an error in that situation. (bug#20355)
+       throw an error in that situation.  (Bug#20355)
 
-       * lisp/emacs-lisp/package.el: Hide lower-priority packages in menu
+       * lisp/emacs-lisp/package.el: Hide lower-priority packages in menu.
        (package-menu-hide-low-priority): New variable, see its doc.
        (package-archive-priorities): Update doc.
        (package-desc-priority): New function.
@@ -15082,7 +16508,7 @@
        (package--remove-hidden): New function.
        (package-menu--refresh): Use it.
 
-       * lisp/emacs-lisp/package.el: Implement displaying obsolete packages
+       * lisp/emacs-lisp/package.el: Implement displaying obsolete packages.
        (package-menu--hide-obsolete): New variable.
        (package--remove-hidden): Use it.
        (package-menu-hide-obsolete): New interactive function to toggle
@@ -15098,20 +16524,20 @@
 2015-04-22  Alan Mackenzie  <address@hidden>
 
        On C-y, stop some text property entries being written into 
buffer-undo-list
-       lisp/subr.el (remove-yank-excluded-properties): enclose the code in
+       * lisp/subr.el (remove-yank-excluded-properties): Enclose the code in
        `with-silent-modifications'.
 
 2015-04-22  Martin Rudalics  <address@hidden>
 
-       In display-buffer-record-window record selected window if necessary.
+       In display-buffer-record-window record selected window if necessary
        * lisp/window.el (display-buffer-record-window): Store selected window
        if it differs from 3rd element of 'quit-restore' parameter (Bug#20353).
 
 2015-04-22  Tassilo Horn  <address@hidden>
 
        Fix reftex-citation bug
-       * reftex-cite.el (reftex-extract-bib-entries): Fix
-       `wrong-type-argument stringp nil' error that occurs when AUCTeX
+       * lisp/textmodes/reftex-cite.el (reftex-extract-bib-entries):
+       Fix `wrong-type-argument stringp nil' error that occurs when AUCTeX
        integration is enabled and there are no citations in the document
        so far.
 
@@ -15137,16 +16563,16 @@
 2015-04-21  Daniel Colascione  <address@hidden>
 
        Unbreak no-op buffer save message
-       * lisp/files.el (save-buffer): Pass interactive flag to 
`basic-save-buffer`
-       (basic-save-buffer): Accept called-interactively as an argument instead 
of
-       directly invoking called-interactively-p, which will always yield nil
-       in that context.
+       * lisp/files.el (basic-save-buffer): Accept called-interactively as
+       an argument instead of directly invoking called-interactively-p,
+       which will always yield nil in that context.
 
 2015-04-21  Alan Mackenzie  <address@hidden>
 
-       CC Mode: Do nothing in before/after-change-functions for text property 
changes
+       CC Mode: Do nothing in before/after-change-functions for text
+       property changes
        Fixes bug#20266.
-       lisp/progmodes/cc-mode.el (c-basic-common-init): Make
+       * lisp/progmodes/cc-mode.el (c-basic-common-init): Make
        yank-handled-properties buffer local, and remove 'category from it.
        (c-called-from-text-property-change-p): New function.
        (c-before-change): Don't do anything if a call of the new function
@@ -15158,7 +16584,7 @@
 
 2015-04-20  Stefan Monnier  <address@hidden>
 
-       Fix byte-compiler warnings about looking-back.
+       Fix byte-compiler warnings about looking-back
        * lisp/vc/log-view.el (log-view-end-of-defun-1):
        * lisp/textmodes/tex-mode.el (latex-forward-sexp-1):
        * lisp/textmodes/reftex-ref.el (reftex-goto-label):
@@ -15198,7 +16624,8 @@
 
        * lisp/loadup.el (custom-current-group-alist): Reset before dumping.
 
-       * lisp/startup.el (command-line) <site-run-file>: Avoid rogue value in 
emacs -Q.
+       * lisp/startup.el (command-line) <site-run-file>: Avoid rogue value
+       in emacs -Q.
 
 2015-04-20  Ludovic Courtès  <address@hidden>
 
@@ -15215,7 +16642,8 @@
 
 2015-04-20  Artur Malabarba  <address@hidden>
 
-       * lisp/emacs-lisp/package.el: Filter by multiple keywords and cache 
keywords
+       * lisp/emacs-lisp/package.el: Filter by multiple keywords and
+       cache keywords.
        (package-menu-filter): Accept a list of keywords.
        (package--all-keywords): New variable to cache known keywords.
        (package-all-keywords): Populate it if necessary.
@@ -15263,7 +16691,6 @@
 
 2015-04-19  Dmitry Gutov  <address@hidden>
 
-       Call `smerge-start-session' even when dealing with a stash conflict
        * lisp/vc/vc-git.el (vc-git-find-file-hook):
        Call `smerge-start-session' even when dealing with a stash
        conflict (bug#20292).
@@ -15272,7 +16699,7 @@
 
        Add option to eshell/clear to clear scrollback.
        * lisp/eshell/esh-mode.el (eshell/clear-scrollback): New function.
-       (eshell/clear): Add an optional SCROLLBACK argument. If non-nil,
+       (eshell/clear): Add an optional SCROLLBACK argument.  If non-nil,
        scrollback contents are cleared.
        * etc/NEWS: Describe change.
        * doc/misc/eshell.texi: Add entry for `clear'.
@@ -15289,7 +16716,7 @@
        Set `coding-system-for-read' explicitly to 'utf-8 when reading the
        downloaded and cached archive-contents files, so that non-ASCII
        characters in package descriptions are displayed correctly in the
-       `list-packages' menu. (Bug#20231)
+       `list-packages' menu.  (Bug#20231)
 
 2015-04-19  Dmitry Gutov  <address@hidden>
 
@@ -15331,8 +16758,8 @@
 
 2015-04-18  Tom Willemse  <address@hidden>  (tiny change)
 
-       * lisp/elec-pair.el (electric-pair-post-self-insert-function): Do not 
use `chomp' as a function.
-       (Bug#19505)
+       * lisp/elec-pair.el (electric-pair-post-self-insert-function):
+       Do not use `chomp' as a function.  (Bug#19505)
 
 2015-04-18  Glenn Morris  <address@hidden>
 
@@ -15355,7 +16782,8 @@
 
 2015-04-18  Nicolas Petton  <address@hidden>
 
-       * lisp/emacs-lisp/seq.el (seq-concatenate, seq-into): Better error 
messages.
+       * lisp/emacs-lisp/seq.el (seq-concatenate, seq-into):
+       Better error messages.
 
 2015-04-18  Ivan Radanov Ivanov  <address@hidden>  (tiny change)
 
@@ -15368,7 +16796,7 @@
 2015-04-17  Thomas Fitzsimmons  <address@hidden>
 
        Improve EUDC manual
-       * eudc.texi (LDAP Configuration): Mention simple and SASL
+       * doc/misc/eudc.texi (LDAP Configuration): Mention simple and SASL
        authentication schemes.  Add index items.  Shorten example server
        name.
 
@@ -15378,14 +16806,15 @@
        * lisp/progmodes/elisp-mode.el (elisp--xref-identifier-location):
        Don't show both feature and function with the same name.
 
-       (elisp--xref-identifier-location): Skip variable, if it's also a 
functiong
+       (elisp--xref-identifier-location): Skip variable, if it's also
+       a function
        * lisp/progmodes/elisp-mode.el (elisp--xref-identifier-location):
        Avoid returning both the variable and the function for the same
        minor mode.
 
 2015-04-17  Wolfgang Jenkner  <address@hidden>
 
-       Fix fontification of keywords clobbered by the prompt.
+       Fix fontification of keywords clobbered by the prompt
        * lisp/comint.el (comint-output-filter): Remove the uses of
        with-silent-modifications I introduced as part of the last change.
        This fixes, e.g., erratically missing highlighting when running
@@ -15394,16 +16823,17 @@
 
 2015-04-17  Glenn Morris  <address@hidden>
 
-       * admin/authors.el (authors-valid-file-names, 
authors-renamed-files-alist): Additions.
+       * admin/authors.el (authors-valid-file-names)
+       (authors-renamed-files-alist): Additions.
 
 2015-04-17  Stefan Monnier  <address@hidden>
 
-       * lisp/indent.el (indent-region): Don't deactivate the mark
+       * lisp/indent.el (indent-region): Don't deactivate the mark.
        (Bug#20357)
 
 2015-04-17  Sam Steingold  <address@hidden>
 
-       lisp/net/rcirc.el (defun-rcirc-command): mark `target' as ignorable
+       * lisp/net/rcirc.el (defun-rcirc-command): Mark `target' as ignorable.
 
 2015-04-16  Leo Liu  <address@hidden>
 
@@ -15411,7 +16841,8 @@
 
 2015-04-16  Stefan Monnier  <address@hidden>
 
-       * lisp/erc/erc-pcomplete.el (erc-pcomplete): Don't use `pcomplete' any 
more.
+       * lisp/erc/erc-pcomplete.el (erc-pcomplete):
+       Don't use `pcomplete' any more.
 
 2015-04-16  Glenn Morris  <address@hidden>
 
@@ -15424,8 +16855,8 @@
 
 2015-04-16  Glenn Morris  <address@hidden>
 
-       * lisp/replace.el (query-replace-from-to-separator): Delay 
initialization
-       to avoid rogue setting after startup.
+       * lisp/replace.el (query-replace-from-to-separator):
+       Delay initialization to avoid rogue setting after startup.
 
 2015-04-16  Paul Eggert  <address@hidden>
 
@@ -15445,7 +16876,6 @@
 
 2015-04-15  Stefan Monnier  <address@hidden>
 
-       (looking-back): Make the second arg non-optional.
        * lisp/subr.el (substitute-key-definition-key, special-form-p)
        (macrop): Drop deprecated second arg to indirect-function.
        (looking-back): Make the second arg non-optional.
@@ -15504,7 +16934,8 @@
        Fix recent cus-start changes that added customize-rogues
        * lisp/cus-start.el (custom-delayed-init-variables): Initialize the
        vars early.
-       * lisp/loadup.el ("cus-start"): Move to the end to reduce 
customize-rogue.
+       * lisp/loadup.el ("cus-start"): Move to the end to reduce
+       customize-rogue.
 
 2015-04-15  Nicolas Petton  <address@hidden>
 
@@ -15516,7 +16947,8 @@
 
        * src/lread.c (intern_1): Make sure we'd find the symbol we add
        (Bug#20334)
-       * src/xfaces.c (resolve_face_name): Don't use `intern' with 
Lisp_Strings.
+       * src/xfaces.c (resolve_face_name): Don't use `intern' with
+       Lisp_Strings.
 
 2015-04-15  Glenn Morris  <address@hidden>
 
@@ -15525,7 +16957,7 @@
 2015-04-15  Lars Magne Ingebrigtsen  <address@hidden>
 
        Clean up gnus-uu saving code slightly
-       * gnus-uu.el (gnus-uu-save-article): Make the
+       * lisp/gnus/gnus-uu.el (gnus-uu-save-article): Make the
        save-restriction/widen calls make more sense.
 
 2015-04-15  Paul Eggert  <address@hidden>
@@ -15558,8 +16990,8 @@
 2015-04-14  Nicolas Petton  <address@hidden>
 
        Add seq-intersection and seq-difference to the seq library
-       * lisp/emacs-lisp/seq.el (seq-intersection, seq-difference): New
-       functions.
+       * lisp/emacs-lisp/seq.el (seq-intersection, seq-difference):
+       New functions.
        * test/automated/seq-tests.el: Add tests for seq-intersection and
        seq-difference.
        * doc/lispref/sequences.texi: Add documentation for seq-intersection
@@ -15567,7 +16999,8 @@
 
 2015-04-14  Stefan Monnier  <address@hidden>
 
-       * eieio-core.el (class-abstract-p): Don't inline, to avoid leaking 
internals
+       * lisp/emacs-lisp/eieio-core.el (class-abstract-p): Don't inline,
+       to avoid leaking internals.
 
 2015-04-14  Sam Steingold  <address@hidden>
 
@@ -15664,12 +17097,12 @@
 
 2015-04-13  Sam Steingold  <address@hidden>
 
-       package--ensure-init-file: widen before looking for 
"(package-initialize)"
+       package--ensure-init-file: widen before looking for
+       "(package-initialize)"
 
 2015-04-13  Dmitry Gutov  <address@hidden>
 
-       Change diff-switches default to `-u'
-       (Bug#20290)
+       Change diff-switches default to `-u' (Bug#20290)
        * doc/emacs/files.texi (Comparing Files): Document the new default
        value of `diff-switches'.
        * doc/emacs/trouble.texi (Sending Patches): Document the preference
@@ -15685,27 +17118,27 @@
 
 2015-04-13  Katsumi Yamaoka  <address@hidden>
 
-       Use gmm-called-interactively-p in Gnus
-       * lisp/gnus/gnus-topic.el (gnus-topic-mode): Use 
gmm-called-interactively-p.
+       * lisp/gnus/gnus-topic.el (gnus-topic-mode):
+       Use gmm-called-interactively-p.
 
 2015-04-13  Stefan Monnier  <address@hidden>
 
        * lisp/loadup.el ("cus-start"): Load it after loaddefs.el
        (Bug#20321)
-       * lisp/cus-start.el (read-buffer-function): Don't advertize
+       * lisp/cus-start.el (read-buffer-function): Don't advertise
        iswitchb-read-buffer any more.
        (iswitchb): Don't tweak this obsolete group any more.
 
 2015-04-13  Artur Malabarba  <address@hidden>
 
-       * lisp/emacs-lisp/package.el: Fix package--ensure-init-file
+       * lisp/emacs-lisp/package.el: Fix package--ensure-init-file.
 
-       * lisp/emacs-lisp/cl-macs.el (cl-defstruct): Implement docstrings
+       * lisp/emacs-lisp/cl-macs.el (cl-defstruct): Implement docstrings.
        Adding a string after a constructor's argument list will use
        that string as the constructor function docstring.  If this string
        is absent but the struct itself was given a docstring, use that as
        the constructor's docstring.
-       Fixes (bug#17284).
+       Fixes bug#17284.
 
 2015-04-13  Stefan Monnier  <address@hidden>
 
@@ -15808,7 +17241,7 @@
 
        * lisp/emacs-lisp/pcase.el (pcase-dolist): Autoload as well.
 
-       * doc/misc/eieio.texi: Don't advertize now obsolete constructs
+       * doc/misc/eieio.texi: Don't advertise now obsolete constructs
 
        Collapse successive char deletions in the undo log
        * src/cmds.c (remove_excessive_undo_boundaries): New function,
@@ -15818,8 +17251,8 @@
        * src/keyboard.c (syms_of_keyboard): `top-level' shouldn't be special.
 
        xterm and OSC 52: Add NEWS entry, and tweak the code
-       * lisp/term/xterm.el (gui-set-selection) <nil>: Move method definition 
to
-       top-level.
+       * lisp/term/xterm.el (gui-set-selection) <nil>: Move method definition
+       to top-level.
        (terminal-init-xterm-activate-set-selection): Set a terminal property.
        (xterm--set-selection): Use it instead of checking the value of
        `terminal-initted'.  Don't use string-bytes.
@@ -15828,21 +17261,20 @@
 
        xterm.el: Implement OSC-52 functionality for setting the X selection
        * lisp/term/xterm.el (xterm-max-cut-length): New var.
-       (xterm--set-selection, terminal-init-xterm-activate-set-selection): New 
funs.
+       (xterm--set-selection, terminal-init-xterm-activate-set-selection):
+       New funs.
        (terminal-init-xterm, xterm--version-handler): Use them.
 
 2015-04-13  Stefan Monnier  <address@hidden>
 
        Remove left over code from when we used an obsolete/loaddefs.el file
-       * lisp/subr.el (do-after-load-evaluation): Remove left over code from 
when
-       we used an obsolete/loaddefs.el file.
+       * lisp/subr.el (do-after-load-evaluation): Remove left over code from
+       when we used an obsolete/loaddefs.el file.
 
-       * cedet/semantic/fw.el: Use declare.
-       * cedet/semantic/fw.el (semantic-exit-on-input)
+       * lisp/cedet/semantic/fw.el (semantic-exit-on-input)
        (semanticdb-without-unloaded-file-searches): Use declare.
        (semantic-fw-add-edebug-spec): Remove.
 
-       (completion-lisp-mode-hook): Use completion-separator-chars
        * lisp/completion.el (completion-lisp-mode-hook):
        Use completion-separator-chars rather than local key binding.
 
@@ -15897,13 +17329,14 @@
 
 2015-04-12  Artur Malabarba  <address@hidden>
 
-       * test/automated/package-test.el (with-package-test): Kill Packages 
buffer
+       * test/automated/package-test.el (with-package-test):
+       Kill Packages buffer.
 
-       * lisp/emacs-lisp/package.el: Improve transaction y-or-n prompt
+       * lisp/emacs-lisp/package.el: Improve transaction y-or-n prompt.
        (package-menu--prompt-transaction-p): Prompt for "Delete" first,
        "Upgrade" last, and use capitalized instead of all-caps.
 
-       * lisp/emacs-lisp/package.el: Completely silence async operations
+       * lisp/emacs-lisp/package.el: Completely silence async operations.
        (package--make-autoloads-and-stuff): Silence autoloads.
        (package--save-selected-packages): New function, silences
        `customize-save-variable'.
@@ -15915,10 +17348,10 @@
 
        Use delay-mode-hooks when visiting the init-file
        * lisp/emacs-lisp/package.el (package--ensure-init-file):
-       delay-mode-hooks
-       * lisp/cus-edit.el (custom-save-all): delay-mode-hooks
+       delay-mode-hooks.
+       * lisp/cus-edit.el (custom-save-all): delay-mode-hooks.
 
-       * lisp/files.el: Only message when saving if save-silently is nil
+       * lisp/files.el: Only message when saving if save-silently is nil.
        (save-silently): New variable.
        (files--message): New function.
        (find-file-noselect, save-buffer, basic-save-buffer)
@@ -15934,11 +17367,12 @@
        (pcase-defmacro): Support debug declarations.
        * lisp/emacs-lisp/cl-macs.el (cl-struct) <pcase-defmacro>:
        * lisp/emacs-lisp/eieio.el (eieio) <pcase-defmacro>:
-       * lisp/emacs-lisp/pcase.el (\`): <pcase-defmacro>: Add debug 
declaration.
+       * lisp/emacs-lisp/pcase.el (\`): <pcase-defmacro>:
+       Add debug declaration.
 
        pcase.el: Edebug support for `app' and vector patterns
        * lisp/emacs-lisp/pcase.el (pcase-FUN): New edebug spec.
-       (pcase-UPAT): Use it. Support `app' patterns.
+       (pcase-UPAT): Use it.  Support `app' patterns.
        (pcase-QPAT): Support vector patterns.
 
        edebug.el: Disambiguate vector specifications
@@ -15962,11 +17396,12 @@
 
 2015-04-12  Artur Malabarba  <address@hidden>
 
-       * lisp/emacs-lisp/package.el (list-packages): Avoid redundant generate
+       * lisp/emacs-lisp/package.el (list-packages): Avoid redundant generate.
 
-       * lisp/emacs-lisp/package.el (list-packages): Call refresh in right 
buffer
+       * lisp/emacs-lisp/package.el (list-packages): Call refresh in
+       right buffer.
 
-       * lisp/emacs-lisp/bytecomp.el: Silence noninteractive compilations
+       * lisp/emacs-lisp/bytecomp.el: Silence noninteractive compilations.
        (byte-compile--interactive): New var.
        (byte-compile--message): New function.
        (byte-compile-log-1, byte-force-recompile)
@@ -15975,7 +17410,7 @@
        (byte-compile-file-form-defmumble, byte-compile)
        (byte-compile-file-form-defalias, display-call-tree): Use it.
 
-       * lisp/files.el: Don't message when nothing happened
+       * lisp/files.el: Don't message when nothing happened.
        (save-some-buffers, basic-save-buffer): Before messaging to say
        "nothing was saved" check if (called-interactively-p 'any).
 
@@ -15993,7 +17428,7 @@
 2015-04-11  Paul Eggert  <address@hidden>
 
        Use bool for boolean in window.c
-       * src/window.c: Omit unnecessary static function decls.
+       * src/window.c: Omit unnecessary static function decls.
        (adjust_window_count, select_window, Fselect_window)
        (window_body_width, Fwindow_body_height, Fwindow_body_width)
        (set_window_hscroll, check_window_containing, Fwindow_at)
@@ -16032,29 +17467,29 @@
        * lisp/emacs-lisp/autoload.el (autoload-find-file)
        (autoload-find-generated-file): Use delay-mode-hooks.
 
-       * lisp/emacs-lisp/package.el: Improve `package-menu-refresh'
+       * lisp/emacs-lisp/package.el: Improve `package-menu-refresh'.
        (package-menu-refresh): Respect async and do new package checking.
        (list-packages): Use `package-menu-refresh' instead of repeating code.
 
-       * lisp/emacs-lisp/package.el: Improve package-menu-quick-help
+       * lisp/emacs-lisp/package.el: Improve package-menu-quick-help.
        (package--quick-help-keys): New variable.
        (package--prettify-quick-help-key): New function.
        (package-menu-quick-help): Use it.
 
-       * lisp/emacs-lisp/package.el: Fix initially wrong compat table
-       (package--build-compatibility-table): require finder
+       * lisp/emacs-lisp/package.el: Fix initially wrong compat table.
+       (package--build-compatibility-table): Require finder.
 
-       * test/automated/package-test.el: Fix new test
+       * test/automated/package-test.el: Fix new test.
 
-       * lisp/emacs-lisp/package.el: Silence async operations
+       * lisp/emacs-lisp/package.el: Silence async operations.
        (package--silence): New variable.
        (package--message): New function.
        (package-import-keyring, package-refresh-contents)
        (package-compute-transaction, package-install, package-delete)
        (package-menu--perform-transaction, package-menu-execute): Use it.
 
-       * test/automated/package-test.el: Test async functionality
-       (package-test-update-archives-async): New test
+       * test/automated/package-test.el: Test async functionality.
+       (package-test-update-archives-async): New test.
 
 2015-04-11  Daiki Ueno  <address@hidden>
 
@@ -16106,7 +17541,7 @@
 2015-04-11  Daiki Ueno  <address@hidden>
 
        Respect more keyword args in `make-process'
-       * process.c (Fmake_process): Respect `:sentinel' and `:filter'
+       * src/process.c (Fmake_process): Respect `:sentinel' and `:filter'
        keywords as documented.
 
 2015-04-10  Dmitry Gutov  <address@hidden>
@@ -16220,16 +17655,16 @@
 
 2015-04-09  Stefan Monnier  <address@hidden>
 
-       * abbrev.el (define-abbrev-table): Refine last change.
+       * lisp/abbrev.el (define-abbrev-table): Refine last change.
 
-       cl-lib.el: Partial revert of "2015-04-05 Rationalize c[ad]+r"
        * lisp/emacs-lisp/cl-lib.el: Partial revert of "2015-04-05 Rationalize
        use of c[ad]+r", so as to keep the "cl-" prefix on all
        cl-lib definitions.
 
-       * vhdl-mode.el (vhdl-prepare-search-2): Use inhibit-point-motion-hooks
+       * lisp/progmodes/vhdl-mode.el (vhdl-prepare-search-2):
+       Use inhibit-point-motion-hooks.
 
-       * lisp/cedet/semantic: Remove some dead code
+       * lisp/cedet/semantic: Remove some dead code.
        * lisp/cedet/semantic/util-modes.el
        (semantic-stickyfunc-header-line-format): Emacs<22 is not supported
        any more.
@@ -16263,11 +17698,10 @@
 
 2015-04-09  Artur Malabarba  <address@hidden>
 
-       * lisp/emacs-lisp/package.el: Use mode-line-process for notification
+       * lisp/emacs-lisp/package.el: Use mode-line-process for notification.
 
 2015-04-09  Dmitry Gutov  <address@hidden>
 
-       (log-edit-insert-changelog-entries): Don't add newline after the last 
entry
        * lisp/vc/log-edit.el (log-edit-insert-changelog-entries):
        Don't add newline after the last entry.
 
@@ -16280,12 +17714,13 @@
 
 2015-04-09  Stefan Monnier  <address@hidden>
 
-       etc/NEWS: Add missing entry for "Stop messing with the EMACS env var"
+       * etc/NEWS: Add missing entry for "Stop messing with the EMACS env var".
 
 2015-04-09  Michael Albinus  <address@hidden>
 
        Stop messing with the EMACS env var
-       * misc.texi (Interactive Shell): Remove description of EMACS env var.
+       * doc/emacs/misc.texi (Interactive Shell): Remove description of
+       EMACS env var.
 
 2015-04-09  Paul Eggert  <address@hidden>
 
@@ -16416,10 +17851,8 @@
 
 2015-04-08  Stefan Monnier  <address@hidden>
 
-       (eieio-copy-parents-into-subclass): Fix inheritance of initargs
-       (Bug#20270)
        * lisp/emacs-lisp/eieio-core.el (eieio-copy-parents-into-subclass):
-       Fix inheritance of initargs.
+       Fix inheritance of initargs.  (Bug#20270)
 
 2015-04-08  Artur Malabarba  <address@hidden>
 
@@ -16433,13 +17866,13 @@
 
 2015-04-08  Eli Zaretskii  <address@hidden>
 
-       * src/eval.c (init_eval_once): Bump max_lisp_eval_depth to 800
+       * src/eval.c (init_eval_once): Bump max_lisp_eval_depth to 800.
        (Bug#17517)
 
 2015-04-08  Michael Albinus  <address@hidden>
 
-       Fix nasty scoping bug in tramp-cache.el
-       * lisp/net/tramp-cache.el (tramp-flush-file-property): Fix nasty 
scoping bug.
+       * lisp/net/tramp-cache.el (tramp-flush-file-property):
+       Fix nasty scoping bug.
 
 2015-04-08  Tassilo Horn  <address@hidden>
 
@@ -16451,10 +17884,8 @@
 
 2015-04-07  Dmitry Gutov  <address@hidden>
 
-       ffap: Support environment variable expansion in file names
-       (Bug#19839)
        * lisp/ffap.el (ffap-string-at-point-mode-alist): Support
-       environment variable expansion in file names.
+       environment variable expansion in file names.  (Bug#19839)
 
 2015-04-07  Paul Eggert  <address@hidden>
 
@@ -16483,9 +17914,10 @@
 2015-04-07  Alan Mackenzie  <address@hidden>
 
        Always mark "<" and ">" in #include directives with text properties.
-       * lisp/progmodes/c-fonts.el (c-cpp-matchers): Replace a font-lock 
"anchored
-       matcher" with an invocation of c-make-font-lock-search-function to allow
-       fontification when there's no trailing space on an "#include <..>" line.
+       * lisp/progmodes/c-fonts.el (c-cpp-matchers): Replace a font-lock
+       "anchored matcher" with an invocation of
+       c-make-font-lock-search-function to allow fontification when there's
+       no trailing space on an "#include <..>" line.
 
 2015-04-07  Paul Eggert  <address@hidden>
 
@@ -16535,7 +17967,7 @@
 
 This file records repository revisions from
 commit 9d56a21e6a696ad19ac65c4b405aeca44785884a (exclusive) to
-commit 0afbc5b2a2cda9fe12246bf62567162ae2577160 (inclusive).
+commit 8a8613bcf4227dfe46a694b761e9575bdf6ca2ce (inclusive).
 See ChangeLog.1 for earlier changes.
 
 ;; Local Variables:
diff --git a/admin/MAINTAINERS b/admin/MAINTAINERS
index 322803b..dc6c0d2 100644
--- a/admin/MAINTAINERS
+++ b/admin/MAINTAINERS
@@ -46,12 +46,6 @@ Stefan Monnier
        minibuffer completion
        lisp/outline.el
 
-Jay Belanger
-        Calc
-            lisp/calc/*
-            etc/calccard.tex
-            doc/misc/calc.texi
-
 Bastien Guerry
         Org
             lisp/org/*
@@ -87,7 +81,11 @@ Simen Heggestøyl
 
 Nicolas Petton
        lisp/emacs-lisp/map.el
+       test/automated/map-tests.el
        lisp/emacs-lisp/seq.el
+       test/automated/seq-tests.el
+       lisp/emacs-lisp/thunk.el
+       test/automated/thunk-tests.el
 
 The GNU AUCTeX maintainers (address@hidden)
        RefTeX
diff --git a/admin/notes/repo b/admin/notes/repo
index b27a3f4..3ab3da7 100644
--- a/admin/notes/repo
+++ b/admin/notes/repo
@@ -41,8 +41,8 @@ preferable not to merge from master until you are done with 
the
 feature.  Unless you really need some change that was done on the
 master while you were developing on the branch, you don't really need
 those merges; just merge once, when you are done with the feature, and
-Bazaar will take care of the rest.  Bazaar is much better in this than
-CVS, so interim merges are unnecessary.
+Git will take care of the rest.  Git is much better in this than CVS,
+so interim merges are unnecessary.
 
 Or use shelves; or rebase; or do something else.  See the thread for
 yet another fun excursion into the exciting world of version control.
diff --git a/build-aux/msys-to-w32 b/build-aux/msys-to-w32
index f8a0a81..d30047f 100755
--- a/build-aux/msys-to-w32
+++ b/build-aux/msys-to-w32
@@ -96,7 +96,7 @@ do
        # translate the existing part and append the rest
        w32p=$(cd "${p1}" && pwd -W)
        remainder=${p#$p1}
-       w32p+=/${remainder#/}
+       w32p=${w32p%/}/${remainder#/}
     fi
 
     w32pathlist="${w32pathlist};${w32p}"
diff --git a/configure.ac b/configure.ac
index d285c25..216bd14 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3154,6 +3154,21 @@ if test "${HAVE_X11}" = "yes"; then
   fi
 fi
 
+if test "${HAVE_X11}" = "yes"; then
+  AC_CHECK_HEADER(X11/Xlib-xcb.h,
+    AC_CHECK_LIB(xcb, xcb_translate_coordinates, HAVE_XCB=yes))
+  if test "${HAVE_XCB}" = "yes"; then
+    AC_CHECK_LIB(X11-xcb, XGetXCBConnection, HAVE_X11_XCB=yes)
+    if test "${HAVE_X11_XCB}" = "yes"; then
+      AC_DEFINE(USE_XCB, 1,
+[Define to 1 if you have the XCB library and X11-XCB library for mixed
+   X11/XCB programming.])
+      XCB_LIBS="-lX11-xcb -lxcb"
+      AC_SUBST(XCB_LIBS)
+    fi
+  fi
+fi
+
 ### Use -lXpm if available, unless '--with-xpm=no'.
 ### mingw32 doesn't use -lXpm, since it loads the library dynamically.
 ### In the Cygwin-w32 build, we need to use /usr/include/noX/X11/xpm.h
diff --git a/doc/emacs/ack.texi b/doc/emacs/ack.texi
index eebab8a..1c88e97 100644
--- a/doc/emacs/ack.texi
+++ b/doc/emacs/ack.texi
@@ -949,6 +949,14 @@ Jens Petersen wrote @file{find-func.el}, which makes it 
easy to find
 the source code for an Emacs Lisp function or variable.
 
 @item
+Nicolas Petton wrote @file{map.el}, a library providing
+map-manipulation functions that work on alists, hash-table and arrays;
address@hidden, a library providing advanced sequence manipulation
+functions and macros; and @file{thunk.el}, a library providing
+functions and macros to delay the evaluation of forms.  He also
+created the new icon in Emacs 25.
+
address@hidden
 Daniel Pfeiffer wrote @file{conf-mode.el}, a mode for editing
 configuration files; @file{copyright.el}, a package for updating
 copyright notices in files; @file{executable.el}, a package for
@@ -1341,15 +1349,16 @@ Rodney Whitby and Reto Zimmermann wrote 
@file{vhdl-mode.el}, a major
 mode for editing VHDL source code.
 
 @item
-John Wiegley wrote @file{align.el}, a set of commands for aligning text
-according to regular-expression based rules; @file{isearchb.el} for fast
-buffer switching; @file{timeclock.el}, a package for keeping track of
-time spent on projects; the Bahá'í calendar support;
address@hidden, a programmable completion facility;
address@hidden, a mode for jotting down things to remember;
address@hidden, an address book backend for the Emacs Unified
-Directory Client; and @code{eshell}, a command shell implemented
-entirely in Emacs Lisp.  He also contributed to Org mode (q.v.).
+John Wiegley was the Emacs maintainer from Emacs 25 onwards.  He wrote
address@hidden, a set of commands for aligning text according to
+regular-expression based rules; @file{isearchb.el} for fast buffer
+switching; @file{timeclock.el}, a package for keeping track of time
+spent on projects; the Bahá'í calendar support; @file{pcomplete.el}, a
+programmable completion facility; @file{remember.el}, a mode for
+jotting down things to remember; @file{eudcb-mab.el}, an address book
+backend for the Emacs Unified Directory Client; and @code{eshell}, a
+command shell implemented entirely in Emacs Lisp.  He also contributed
+to Org mode (q.v.).
 
 @item
 Mike Williams wrote @file{thingatpt.el}, a library of functions for
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi
index 76c7261..8441c88 100644
--- a/doc/emacs/custom.texi
+++ b/doc/emacs/custom.texi
@@ -1290,7 +1290,11 @@ accomplished with @dfn{directory-local variables}.
 named @address@hidden On MS-DOS, the name of this file
 should be @file{_dir-locals.el}, due to limitations of the DOS
 filesystems.  If the filesystem is limited to 8+3 file names, the name
-of the file will be truncated by the OS to @file{_dir-loc.el}.  } in a
+of the file will be truncated by the OS to @file{_dir-loc.el}.
address@hidden You can also use files like @file{.dir-locals2.el}, which
+are loaded in addition.  This is useful when @file{.dir-locals.el} is
+under version control in a shared repository and can't be used for
+personal customizations.  } in a
 directory.  Whenever Emacs visits any file in that directory or any of
 its subdirectories, it will apply the directory-local variables
 specified in @file{.dir-locals.el}, as though they had been defined as
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi
index 65a97a4..9a1b2cd 100644
--- a/doc/lispref/files.texi
+++ b/doc/lispref/files.texi
@@ -3081,12 +3081,12 @@ making connections when they don't exist.
 @end defun
 
 @defun unhandled-file-name-directory filename
-This function returns the name of a directory that is not magic.  It
-uses the directory part of @var{filename} if that is not magic.  For a
-magic file name, it invokes the file name handler, which therefore
-decides what value to return.  If @var{filename} is not accessible
-from a local process, then the file name handler should indicate it by
-returning @code{nil}.
+This function returns the name of a directory that is not magic.  For
+a non-magic @var{filename} it returns the corresponding directory name
+(@pxref{Directory Names}).  For a magic @var{filename}, it invokes the
+file name handler, which therefore decides what value to return.  If
address@hidden is not accessible from a local process, then the file
+name handler should indicate that by returning @code{nil}.
 
 This is useful for running a subprocess; every subprocess must have a
 non-magic directory to serve as its current directory, and this function
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi
index 7050df8..f3c4e29 100644
--- a/doc/lispref/os.texi
+++ b/doc/lispref/os.texi
@@ -2323,10 +2323,11 @@ Emacs is restarted by the session manager.
 @cindex notifications, on desktop
 
 Emacs is able to send @dfn{notifications} on systems that support the
-freedesktop.org Desktop Notifications Specification.  In order to use
-this functionality, Emacs must have been compiled with D-Bus support,
-and the @code{notifications} library must be loaded.  @xref{Top, ,
-D-Bus,dbus,D-Bus integration in Emacs}.
+freedesktop.org Desktop Notifications Specification and on MS-Windows.
+In order to use this functionality on Posix hosts, Emacs must have
+been compiled with D-Bus support, and the @code{notifications} library
+must be loaded.  @xref{Top, , D-Bus,dbus,D-Bus integration in Emacs}.
+The following function is supported when D-Bus support is available:
 
 @defun notifications-notify &rest params
 This function sends a notification to the desktop via D-Bus,
@@ -2559,6 +2560,79 @@ If @var{spec_version} is @code{nil}, the server supports 
a
 specification prior to @samp{"1.0"}.
 @end defun
 
address@hidden tray notifications, MS-Windows
+When Emacs runs on MS-Windows as a GUI session, it supports a small
+subset of the D-Bus notifications functionality via a native
+primitive:
+
address@hidden w32-notification-notify &rest params
+This function displays an MS-Windows tray notification as specified by
address@hidden  MS-Windows tray notifications are displayed in a
+balloon from an icon in the notification area of the taskbar.
+
+Value is the integer unique ID of the notification that can be used to
+remove the notification using @code{w32-notification-close}, described
+below.  If the function fails, the return value is @code{nil}.
+
+The arguments @var{params} are specified as keyword/value pairs.  All the
+parameters are optional, but if no parameters are specified, the
+function will do nothing and return @code{nil}.
+
+The following parameters are supported:
+
address@hidden @code
address@hidden :icon @var{icon}
+Display @var{icon} in the system tray.  If @var{icon} is a string, it
+should specify a file name from which to load the icon; the specified
+file should be a @file{.ico} Windows icon file.  If @var{icon} is not
+a string, or if this parameter is not specified, the standard Emacs
+icon will be used.
+
address@hidden :tip @var{tip}
+Use @var{tip} as the tooltip for the notification.  If @var{tip} is a
+string, this is the text of a tooltip that will be shown when the
+mouse pointer hovers over the tray icon added by the notification.  If
address@hidden is not a string, or if this parameter is not specified, the
+default tooltip text is @samp{Emacs notification}.  The tooltip text can
+be up to 127 characters long (63 on Windows versions before W2K).
+Longer strings will be truncated.
+
address@hidden :level @var{level}
+Notification severity level, one of @code{info}, @code{warning}, or
address@hidden  If given, the value determines the icon displayed to the
+left of the notification title, but only if the @code{:title} parameter
+(see below) is also specified and is a string.
+
address@hidden :title @var{title}
+The title of the notification.  If @var{title} is a string, it is
+displayed in a larger font immediately above the body text.  The title
+text can be up to 63 characters long; longer text will be truncated.
+
address@hidden :body @var{body}
+The body of the notification.  If @var{body} is a string, it specifies
+the text of the notification message.  Use embedded newlines to
+control how the text is broken into lines.  The body text can be up to
+255 characters long, and will be truncated if it's longer.  Unlike
+with D-Bus, the body text should be plain text, with no markup.
address@hidden table
+
+Note that versions of Windows before W2K support only @code{:icon} and
address@hidden:tip}.  The other parameters can be passed, but they will be
+ignored on those old systems.
+
+There can be at most one active notification at any given time.  An
+active notification must be removed by calling
address@hidden before a new one can be shown.
address@hidden defun
+
+To remove the notification and its icon from the taskbar, use the
+following function:
+
address@hidden w32-notification-close id
+This function removes the tray notification given by its unique
address@hidden
address@hidden defun
+
 @node File Notifications
 @section Notifications on File Changes
 @cindex file notifications
@@ -2813,7 +2887,7 @@ of setting this variable for supporting images on 
MS-Windows:
         (svg "librsvg-2-2.dll")
         (gdk-pixbuf "libgdk_pixbuf-2.0-0.dll")
         (glib "libglib-2.0-0.dll")
-       (gobject "libgobject-2.0-0.dll")))
+        (gobject "libgobject-2.0-0.dll")))
 @end example
 
 Note that image types @code{pbm} and @code{xbm} do not need entries in
diff --git a/doc/lispref/sequences.texi b/doc/lispref/sequences.texi
index 84a7c32..66d88e4 100644
--- a/doc/lispref/sequences.texi
+++ b/doc/lispref/sequences.texi
@@ -467,18 +467,18 @@ built-in sequence types, @code{seq-length} behaves like 
@code{length}.
 @xref{Definition of length}.
 @end defun
 
address@hidden seq-p sequence
address@hidden seqp sequence
   This function returns address@hidden if @var{sequence} is a sequence
 (a list or array), or any additional type of sequence defined via
 @file{seq.el} generic functions.
 
 @example
 @group
-(seq-p [1 2])
+(seqp [1 2])
 @result{} t
 @end group
 @group
-(seq-p 2)
+(seqp 2)
 @result{} nil
 @end group
 @end example
diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi
index 143de82..f8685d9 100644
--- a/doc/lispref/strings.texi
+++ b/doc/lispref/strings.texi
@@ -584,8 +584,8 @@ determined by the lexicographic order of the characters 
contained in
 relations between these characters.  Usually, it is defined by the
 @var{locale} environment Emacs is running with.
 
-For example, punctuation and whitespace characters might be considered
-less significant for @ref{Sorting,,sorting}.
+For example, punctuation and whitespace characters might be ignored
+for sorting (@pxref{Sequence Functions}):
 
 @example
 @group
@@ -594,6 +594,9 @@ less significant for @ref{Sorting,,sorting}.
 @end group
 @end example
 
+This behavior is system-dependent; punctuation and whitespace are
+never ignored on Cygwin, regardless of locale.
+
 The optional argument @var{locale}, a string, overrides the setting of
 your current locale identifier for collation.  The value is system
 dependent; a @var{locale} @code{"en_US.UTF-8"} is applicable on POSIX
diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi
index 1d92094..5a2cae0 100644
--- a/doc/lispref/variables.texi
+++ b/doc/lispref/variables.texi
@@ -1765,20 +1765,33 @@ variables: by putting them in a special file, or by 
defining a
 @dfn{project class} for that directory.
 
 @defvr Constant dir-locals-file
-This constant is the name of the file where Emacs expects to find the
-directory-local variables.  The name of the file is
address@hidden@footnote{
-The MS-DOS version of Emacs uses @file{_dir-locals.el} instead, due to
+This constant is a wildcard pattern matching the name of files where
+Emacs expects to find directory-local variables.  Its value is
address@hidden@footnote{
+The MS-DOS version of Emacs uses @file{_dir-locals*.el} instead, due to
 limitations of the DOS filesystems.
-}.  A file by that name in a directory causes Emacs to apply its
-settings to any file in that directory or any of its subdirectories
-(optionally, you can exclude subdirectories; see below).
-If some of the subdirectories have their own @file{.dir-locals.el}
-files, Emacs uses the settings from the deepest file it finds starting
-from the file's directory and moving up the directory tree.  The file
-specifies local variables as a specially formatted list; see
address@hidden Variables, , Per-directory Local Variables, emacs, The
-GNU Emacs Manual}, for more details.
+}, and the most common file name to use is @file{.dir-locals.el}.
+
+Any file matching this name pattern in a directory causes Emacs to
+apply its settings when visiting files in that directory or any of its
+subdirectories (optionally, you can exclude subdirectories; see
+below).
+If some of the subdirectories have their own file matching
address@hidden, Emacs uses the settings from the deepest file
+it finds starting from the file's directory and moving up the
+directory tree.  The file specifies local variables as a specially
+formatted list; see @ref{Directory Variables, , Per-directory Local
+Variables, emacs, The GNU Emacs Manual}, for more details.
+
+If the same directory contains multiple such files (for instance,
address@hidden and @file{.dir-locals2.el}), then all of them
+are used in @code{string<} order.  This means that, if two files
+specify different values for the same variable, the file sorted after
+will override the value of the previous file (for instance, values in
address@hidden override those in @file{.dir-locals.el}).  Note
+that, because of how lexicographic order works, values in
address@hidden are overridden by values in @file{.dir-locals2.el}.
+This can be avoided by using @file{.dir-locals02.el} instead.
 @end defvr
 
 @defun hack-dir-local-variables
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index 1da2d1c..357247e 100644
--- a/doc/lispref/windows.texi
+++ b/doc/lispref/windows.texi
@@ -3899,7 +3899,7 @@ visible in some window:
 @group
 (let ((edges (window-absolute-body-pixel-edges))
       (position (pos-visible-in-window-p nil nil t)))
-  (x-set-mouse-absolute-pixel-position
+  (set-mouse-absolute-pixel-position
    (+ (nth 0 edges) (nth 0 position))
    (+ (nth 1 edges) (nth 1 position))))
 @end group
diff --git a/doc/misc/cc-mode.texi b/doc/misc/cc-mode.texi
index b93bc8f..9b488cb 100644
--- a/doc/misc/cc-mode.texi
+++ b/doc/misc/cc-mode.texi
@@ -6860,7 +6860,7 @@ to change some of the actual values.
 @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 @node    Performance Issues, Limitations and Known Bugs, Sample Init File, Top
 @comment node-name, next, previous, up
address@hidden Performance Issues
address@hidden Performance Issues
 @cindex performance
 @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
@@ -6969,7 +6969,7 @@ more info.
 @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 @node    Limitations and Known Bugs, FAQ, Performance Issues, Top
 @comment node-name, next, previous, up
address@hidden Limitations and Known Bugs
address@hidden Limitations and Known Bugs
 @cindex limitations
 @cindex bugs
 @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex
index c75ddd6..f555ce3 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-10-17.11}
+\def\texinfoversion{2015-10-29.16}
 %
 % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@@ -4685,7 +4685,6 @@ end
   % The space after the comma will end up in the temporary definition
   % that we make for arg2 (see \parsemargdef ff.).  We want all this to be
   % expanded for the sake of the index, so we end up just seeing "bar".
-  \let\xeatspaces = \eatspaces
   \let\xprocessmacroarg\eatspaces
 }
 
@@ -5229,7 +5228,7 @@ end
 }
 \def\entrybreak{\unskip\space\ignorespaces}%
 \def\doentry{%
-    % Save the text of the entry in a \vtop.
+    % Save the text of the entry
     \global\setbox\boxA=\hbox\bgroup
     \bgroup % Instead of the swallowed brace.
       \noindent
@@ -5245,10 +5244,9 @@ end
     \global\setbox\boxA=\hbox\bgroup\unhbox\boxA
     % #1 is the page number.
     %
-    % The following is kludged to not output a line of dots in the index if
-    % there are no page numbers.  The next person who breaks this will be
-    % cursed by a Unix daemon.
-    \setbox\boxB = \hbox{#1}%
+    % Get the width of the page numbers, and only use
+    % leaders if they are present.
+    \global\setbox\boxB = \hbox{#1}%
     \ifdim\wd\boxB = 0pt
       \null\nobreak\hfill\ %
     \else
@@ -5263,56 +5261,67 @@ end
       \fi
     \fi
     \egroup % end \boxA
-    \global\setbox\entryindexbox=\vtop\bgroup\noindent
-    % We want the text of the entries to be aligned to the left, and the
-    % page numbers to be aligned to the right.
-    %
-    \advance\leftskip by 0pt plus 1fil
-    \advance\leftskip by 0pt plus -1fill
-    \rightskip = 0pt plus -1fil
-    \advance\rightskip by 0pt plus 1fill
-    % Cause last line, which could consist of page numbers on their own if the 
-    % list of page numbers is long, to be aligned to the right.
-    \parfillskip=0pt plus -1fill
-    %
-    \hangindent=1em
-    %
-    \advance\rightskip by \entryrightmargin
-    % Determine how far we can stretch into the margin.
-    % This allows, e.g., "Appendix H  GNU Free Documentation License" to fit
-    % on one line.
-    \advance \parfillskip by 0pt minus .6\entryrightmargin
-    %
-    \ifdim\wd\boxA > \hsize % If the entry doesn't fit in one line
-    \ifdim\dimen@ > 0.9\hsize   % due to long index text
-      \dimen@ = 0.6\dimen@ % Try to split the text roughly evenly
-      address@hidden = \hsize
-      \advance address@hidden by -1em
-      \ifnum\dimen@>address@hidden
-        % If the entry is too long, use the whole line
-        \dimen@ = address@hidden
+    \ifdim\wd\boxB = 0pt
+      \global\setbox\entryindexbox=\box\boxA
+    \else
+    \global\setbox\entryindexbox=\vbox\bgroup\noindent
+      % We want the text of the entries to be aligned to the left, and the
+      % page numbers to be aligned to the right.
+      %
+      \advance\leftskip by 0pt plus 1fil
+      \advance\leftskip by 0pt plus -1fill
+      \rightskip = 0pt plus -1fil
+      \advance\rightskip by 0pt plus 1fill
+      % Cause last line, which could consist of page numbers on their own
+      % if the list of page numbers is long, to be aligned to the right.
+      \parfillskip=0pt plus -1fill
+      %
+      \hangindent=1em
+      %
+      \advance\rightskip by \entryrightmargin
+      % Determine how far we can stretch into the margin.
+      % This allows, e.g., "Appendix H  GNU Free Documentation License" to
+      % fit on one line in @letterpaper format.
+      \ifdim\entryrightmargin>2.1em
+        address@hidden
       \else
-        % Cause stretch of 1fill at the end of the first line, to avoid
-        % extra spacing in a short first line.
-        \hskip 0pt plus 1fill
+        address@hidden
       \fi
-      \parshape = 2 0pt \dimen@ 1em address@hidden
-      % Ideally we'd add a finite glue at the end of the first line only, but
-      % TeX doesn't seem to provide a way to do such a thing.
-    \fi\fi
-    \unhbox\boxA
-    %
-    % Do not prefer a separate line ending with a hyphen to fewer lines.
-    \finalhyphendemerits = 0
-    %
-    % Word spacing - no stretch
-    \spaceskip=\fontdimen2\font minus \fontdimen4\font
-    %
-    \linepenalty=1000  % Discourage line breaks.
-    \hyphenpenalty=10000  % Discourage hyphenation.
-    %
-    \par % format the paragraph
-    \egroup % The \vtop
+      \advance \parfillskip by 0pt minus address@hidden
+      %
+      address@hidden = \hsize
+      address@hidden by -1\leftskip
+      address@hidden by -1\entryrightmargin
+      address@hidden by address@hidden
+      \ifdim\wd\boxA > address@hidden % If the entry doesn't fit in one line
+      \ifdim\dimen@ > address@hidden   % due to long index text
+        \dimen@ = 0.7\dimen@ % Try to split the text roughly evenly
+        address@hidden = \hsize
+        \advance address@hidden by -1em
+        \ifnum\dimen@>address@hidden
+          % If the entry is too long, use the whole line
+          \dimen@ = address@hidden
+        \fi
+        \advance\leftskip by 0pt plus 1fill % ragged right
+        \advance \dimen@ by 1\rightskip
+        \parshape = 2 0pt \dimen@ 1em address@hidden
+        % Ideally we'd add a finite glue at the end of the first line only, but
+        % TeX doesn't seem to provide a way to do such a thing.
+      \fi\fi
+      \unhbox\boxA
+      %
+      % Do not prefer a separate line ending with a hyphen to fewer lines.
+      \finalhyphendemerits = 0
+      %
+      % Word spacing - no stretch
+      \spaceskip=\fontdimen2\font minus \fontdimen4\font
+      %
+      \linepenalty=1000  % Discourage line breaks.
+      \hyphenpenalty=5000  % Discourage hyphenation.
+      %
+      \par % format the paragraph
+    \egroup % The \vbox
+    \fi
   \endgroup
   % delay text of entry until after penalty
   \bgroup\aftergroup\insertindexentrybox
@@ -5324,8 +5333,8 @@ end
 
 \newbox\entryindexbox
 \def\insertindexentrybox{%
-\lineskip=.8ex plus .6ex % This comes into effect when the \vtop has a large 
-                         % depth due to the paragraph in it having several 
+\lineskip=.7ex plus .5ex % This comes into effect when the \vbox has a large 
+                         % height due to the paragraph in it having several 
                          % lines.
 \box\entryindexbox}
 
@@ -5382,6 +5391,8 @@ end
 
 \newbox\partialpage
 \newdimen\doublecolumnhsize
+\newdimen\doublecolumntopgap
+\doublecolumntopgap = 0pt
 
 \newtoks\savedtopmark % Used in \begindoublecolumns
 \newtoks\savedfirstmark
@@ -5449,7 +5460,11 @@ end
   %
   % Double the \vsize as well.  (We don't need a separate register here,
   % since nobody clobbers \vsize.)
+  \global\doublecolumntopgap = \topskip
+  \global\advance\doublecolumntopgap by -1\baselineskip
+  \global\advance\vsize by -1\doublecolumntopgap
   \vsize = 2\vsize
+  \topskip=0pt
 }
 
 % The double-column output routine for all double-column pages except
@@ -5478,10 +5493,13 @@ end
   %
   \hsize = \doublecolumnhsize
   \wd0=\hsize \wd2=\hsize
-  \hbox to\pagewidth{\box0\hfil\box2}%
+  \vbox{%
+    \vskip\doublecolumntopgap
+    \hbox to\pagewidth{\box0\hfil\box2}}%
 }
-%
-% All done with double columns.
+
+
+% Finished with with double columns.
 \def\enddoublecolumns{%
   % The following penalty ensures that the page builder is exercised
   % _before_ we change the output routine.  This is necessary in the
@@ -7594,7 +7612,6 @@ end
 % Argument is macro body with arguments substituted
 \def\scanmacro#1{%
   \newlinechar`\^^M
-  \let\xeatspaces\eatspaces
   % Reduce doubled backslashes to one
   \def\xprocessmacroarg{\passargtomacro\eatspaces}%
   %
@@ -9758,7 +9775,7 @@ directory should work if nowhere else does.}
        \gdef\UTFviiiTmp{#2}%
       % 
       \expandafter\ifx\csname uni:#1\endcsname \relax \else
-       \errmessage{Internal error, already defined: #1}%
+       \message{Internal error, already defined: #1}%
       \fi
       %
       % define an additional control sequence for this code point.
@@ -10108,8 +10125,82 @@ directory should work if nowhere else does.}
 
   \DeclareUnicodeCharacter{02DB}{\ogonek{ }}
 
-  % Greek letters
+  % Greek letters upper case
+  \DeclareUnicodeCharacter{0391}{{\it A}}
+  \DeclareUnicodeCharacter{0392}{{\it B}}
+  \DeclareUnicodeCharacter{0393}{\ensuremath{\mit\Gamma}}
+  \DeclareUnicodeCharacter{0394}{\ensuremath{\mit\Delta}}
+  \DeclareUnicodeCharacter{0395}{{\it E}}
+  \DeclareUnicodeCharacter{0396}{{\it Z}}
+  \DeclareUnicodeCharacter{0397}{{\it H}}
+  \DeclareUnicodeCharacter{0398}{\ensuremath{\mit\Theta}}
+  \DeclareUnicodeCharacter{0399}{{\it I}}
+  \DeclareUnicodeCharacter{039A}{{\it K}}
+  \DeclareUnicodeCharacter{039B}{\ensuremath{\mit\Lambda}}
+  \DeclareUnicodeCharacter{039C}{{\it M}}
+  \DeclareUnicodeCharacter{039D}{{\it N}}
+  \DeclareUnicodeCharacter{039E}{\ensuremath{\mit\Xi}}
+  \DeclareUnicodeCharacter{039F}{{\it O}}
+  \DeclareUnicodeCharacter{03A0}{\ensuremath{\mit\Pi}}
+  \DeclareUnicodeCharacter{03A1}{{\it P}}
+  %\DeclareUnicodeCharacter{03A2}{} % none - corresponds to final sigma
+  \DeclareUnicodeCharacter{03A3}{\ensuremath{\mit\Sigma}}
+  \DeclareUnicodeCharacter{03A4}{{\it T}}
+  \DeclareUnicodeCharacter{03A5}{\ensuremath{\mit\Upsilon}}
+  \DeclareUnicodeCharacter{03A6}{\ensuremath{\mit\Phi}}
+  \DeclareUnicodeCharacter{03A7}{{\it X}}
+  \DeclareUnicodeCharacter{03A8}{\ensuremath{\mit\Psi}}
+  \DeclareUnicodeCharacter{03A9}{\ensuremath{\mit\Omega}}
+
+  % Vowels with accents
+  \DeclareUnicodeCharacter{0390}{\ensuremath{\ddot{\acute\iota}}}
+  \DeclareUnicodeCharacter{03AC}{\ensuremath{\acute\alpha}}
+  \DeclareUnicodeCharacter{03AD}{\ensuremath{\acute\epsilon}}
+  \DeclareUnicodeCharacter{03AE}{\ensuremath{\acute\eta}}
+  \DeclareUnicodeCharacter{03AF}{\ensuremath{\acute\iota}}
+  \DeclareUnicodeCharacter{03B0}{\ensuremath{\acute{\ddot\upsilon}}}
+
+  % Standalone accent
+  \DeclareUnicodeCharacter{0384}{\ensuremath{\acute{\ }}}
+
+  % Greek letters lower case
+  \DeclareUnicodeCharacter{03B1}{\ensuremath\alpha}
+  \DeclareUnicodeCharacter{03B2}{\ensuremath\beta}
+  \DeclareUnicodeCharacter{03B3}{\ensuremath\gamma}
+  \DeclareUnicodeCharacter{03B4}{\ensuremath\delta}
+  \DeclareUnicodeCharacter{03B5}{\ensuremath\epsilon}
+  \DeclareUnicodeCharacter{03B6}{\ensuremath\zeta}
+  \DeclareUnicodeCharacter{03B7}{\ensuremath\eta}
+  \DeclareUnicodeCharacter{03B8}{\ensuremath\theta}
+  \DeclareUnicodeCharacter{03B9}{\ensuremath\iota}
+  \DeclareUnicodeCharacter{03BA}{\ensuremath\kappa}
+  \DeclareUnicodeCharacter{03BB}{\ensuremath\lambda}
+  \DeclareUnicodeCharacter{03BC}{\ensuremath\mu}
+  \DeclareUnicodeCharacter{03BD}{\ensuremath\nu}
+  \DeclareUnicodeCharacter{03BE}{\ensuremath\xi}
+  \DeclareUnicodeCharacter{03BF}{{\it o}} % omicron
   \DeclareUnicodeCharacter{03C0}{\ensuremath\pi}
+  \DeclareUnicodeCharacter{03C1}{\ensuremath\rho}
+  \DeclareUnicodeCharacter{03C2}{\ensuremath\varsigma}
+  \DeclareUnicodeCharacter{03C3}{\ensuremath\sigma}
+  \DeclareUnicodeCharacter{03C4}{\ensuremath\tau}
+  \DeclareUnicodeCharacter{03C5}{\ensuremath\upsilon}
+  \DeclareUnicodeCharacter{03C6}{\ensuremath\phi}
+  \DeclareUnicodeCharacter{03C7}{\ensuremath\chi}
+  \DeclareUnicodeCharacter{03C8}{\ensuremath\psi}
+  \DeclareUnicodeCharacter{03C9}{\ensuremath\omega}
+
+  % More Greek vowels with accents
+  \DeclareUnicodeCharacter{03CA}{\ensuremath{\ddot\iota}}
+  \DeclareUnicodeCharacter{03CB}{\ensuremath{\ddot\upsilon}}
+  \DeclareUnicodeCharacter{03CC}{\ensuremath{\acute o}}
+  \DeclareUnicodeCharacter{03CD}{\ensuremath{\acute\upsilon}}
+  \DeclareUnicodeCharacter{03CE}{\ensuremath{\acute\omega}}
+
+  % Variant Greek letters
+  \DeclareUnicodeCharacter{03D1}{\ensuremath\vartheta}
+  \DeclareUnicodeCharacter{03D6}{\ensuremath\varpi}
+  \DeclareUnicodeCharacter{03F1}{\ensuremath\varrho}
 
   \DeclareUnicodeCharacter{1E02}{\dotaccent{B}}
   \DeclareUnicodeCharacter{1E03}{\dotaccent{b}}
@@ -10265,7 +10356,7 @@ directory should work if nowhere else does.}
   \DeclareUnicodeCharacter{2203}{\ensuremath\exists}
   \DeclareUnicodeCharacter{2208}{\ensuremath\in}
   \DeclareUnicodeCharacter{2212}{\minus}
-  \DeclareUnicodeCharacter{2217}{\point}
+  \DeclareUnicodeCharacter{2217}{\ast}
   \DeclareUnicodeCharacter{221E}{\ensuremath\infty}
   \DeclareUnicodeCharacter{2225}{\ensuremath\parallel}
   \DeclareUnicodeCharacter{2227}{\ensuremath\wedge}
@@ -10276,6 +10367,138 @@ directory should work if nowhere else does.}
   \DeclareUnicodeCharacter{2282}{\ensuremath\subset}
   \DeclareUnicodeCharacter{2287}{\ensuremath\supseteq}
 
+  \DeclareUnicodeCharacter{2016}{\ensuremath\Vert}
+  \DeclareUnicodeCharacter{2032}{\ensuremath\prime}
+  \DeclareUnicodeCharacter{210F}{\ensuremath\hbar}
+  \DeclareUnicodeCharacter{2111}{\ensuremath\Im}
+  \DeclareUnicodeCharacter{2113}{\ensuremath\ell}
+  \DeclareUnicodeCharacter{2118}{\ensuremath\wp}
+  \DeclareUnicodeCharacter{211C}{\ensuremath\Re}
+  \DeclareUnicodeCharacter{2127}{\ensuremath\mho}
+  \DeclareUnicodeCharacter{2135}{\ensuremath\aleph}
+  \DeclareUnicodeCharacter{2190}{\ensuremath\leftarrow}
+  \DeclareUnicodeCharacter{2191}{\ensuremath\uparrow}
+  \DeclareUnicodeCharacter{2193}{\ensuremath\downarrow}
+  \DeclareUnicodeCharacter{2194}{\ensuremath\leftrightarrow}
+  \DeclareUnicodeCharacter{2195}{\ensuremath\updownarrow}
+  \DeclareUnicodeCharacter{2196}{\ensuremath\nwarrow}
+  \DeclareUnicodeCharacter{2197}{\ensuremath\nearrow}
+  \DeclareUnicodeCharacter{2198}{\ensuremath\searrow}
+  \DeclareUnicodeCharacter{2199}{\ensuremath\swarrow}
+  \DeclareUnicodeCharacter{21A6}{\ensuremath\mapsto}
+  \DeclareUnicodeCharacter{21A9}{\ensuremath\hookleftarrow}
+  \DeclareUnicodeCharacter{21AA}{\ensuremath\hookrightarrow}
+  \DeclareUnicodeCharacter{21BC}{\ensuremath\leftharpoonup}
+  \DeclareUnicodeCharacter{21BD}{\ensuremath\leftharpoondown}
+  \DeclareUnicodeCharacter{21BE}{\ensuremath\upharpoonright}
+  \DeclareUnicodeCharacter{21C0}{\ensuremath\rightharpoonup}
+  \DeclareUnicodeCharacter{21C1}{\ensuremath\rightharpoondown}
+  \DeclareUnicodeCharacter{21CC}{\ensuremath\rightleftharpoons}
+  \DeclareUnicodeCharacter{21D0}{\ensuremath\Leftarrow}
+  \DeclareUnicodeCharacter{21D1}{\ensuremath\Uparrow}
+  \DeclareUnicodeCharacter{21D3}{\ensuremath\Downarrow}
+  \DeclareUnicodeCharacter{21D4}{\ensuremath\Leftrightarrow}
+  \DeclareUnicodeCharacter{21D5}{\ensuremath\Updownarrow}
+  \DeclareUnicodeCharacter{21DD}{\ensuremath\leadsto}
+  \DeclareUnicodeCharacter{2201}{\ensuremath\complement}
+  \DeclareUnicodeCharacter{2202}{\ensuremath\partial}
+  \DeclareUnicodeCharacter{2205}{\ensuremath\emptyset}
+  \DeclareUnicodeCharacter{2207}{\ensuremath\nabla}
+  \DeclareUnicodeCharacter{2209}{\ensuremath\notin}
+  \DeclareUnicodeCharacter{220B}{\ensuremath\owns}
+  \DeclareUnicodeCharacter{220F}{\ensuremath\prod}
+  \DeclareUnicodeCharacter{2210}{\ensuremath\coprod}
+  \DeclareUnicodeCharacter{2211}{\ensuremath\sum}
+  \DeclareUnicodeCharacter{2213}{\ensuremath\mp}
+  \DeclareUnicodeCharacter{2218}{\ensuremath\circ}
+  \DeclareUnicodeCharacter{221A}{\ensuremath\surd}
+  \DeclareUnicodeCharacter{221D}{\ensuremath\propto}
+  \DeclareUnicodeCharacter{2220}{\ensuremath\angle}
+  \DeclareUnicodeCharacter{2223}{\ensuremath\mid}
+  \DeclareUnicodeCharacter{2228}{\ensuremath\vee}
+  \DeclareUnicodeCharacter{222A}{\ensuremath\cup}
+  \DeclareUnicodeCharacter{222B}{\ensuremath\smallint}
+  \DeclareUnicodeCharacter{222E}{\ensuremath\oint}
+  \DeclareUnicodeCharacter{223C}{\ensuremath\sim}
+  \DeclareUnicodeCharacter{2240}{\ensuremath\wr}
+  \DeclareUnicodeCharacter{2243}{\ensuremath\simeq}
+  \DeclareUnicodeCharacter{2245}{\ensuremath\cong}
+  \DeclareUnicodeCharacter{2248}{\ensuremath\approx}
+  \DeclareUnicodeCharacter{224D}{\ensuremath\asymp}
+  \DeclareUnicodeCharacter{2250}{\ensuremath\doteq}
+  \DeclareUnicodeCharacter{2260}{\ensuremath\neq}
+  \DeclareUnicodeCharacter{226A}{\ensuremath\ll}
+  \DeclareUnicodeCharacter{226B}{\ensuremath\gg}
+  \DeclareUnicodeCharacter{227A}{\ensuremath\prec}
+  \DeclareUnicodeCharacter{227B}{\ensuremath\succ}
+  \DeclareUnicodeCharacter{2283}{\ensuremath\supset}
+  \DeclareUnicodeCharacter{2286}{\ensuremath\subseteq}
+  \DeclareUnicodeCharacter{228E}{\ensuremath\uplus}
+  \DeclareUnicodeCharacter{228F}{\ensuremath\sqsubset}
+  \DeclareUnicodeCharacter{2290}{\ensuremath\sqsupset}
+  \DeclareUnicodeCharacter{2291}{\ensuremath\sqsubseteq}
+  \DeclareUnicodeCharacter{2292}{\ensuremath\sqsupseteq}
+  \DeclareUnicodeCharacter{2293}{\ensuremath\sqcap}
+  \DeclareUnicodeCharacter{2294}{\ensuremath\sqcup}
+  \DeclareUnicodeCharacter{2295}{\ensuremath\oplus}
+  \DeclareUnicodeCharacter{2296}{\ensuremath\ominus}
+  \DeclareUnicodeCharacter{2297}{\ensuremath\otimes}
+  \DeclareUnicodeCharacter{2298}{\ensuremath\oslash}
+  \DeclareUnicodeCharacter{2299}{\ensuremath\odot}
+  \DeclareUnicodeCharacter{22A2}{\ensuremath\vdash}
+  \DeclareUnicodeCharacter{22A3}{\ensuremath\dashv}
+  \DeclareUnicodeCharacter{22A4}{\ensuremath\ptextop}
+  \DeclareUnicodeCharacter{22A5}{\ensuremath\bot}
+  \DeclareUnicodeCharacter{22A8}{\ensuremath\models}
+  \DeclareUnicodeCharacter{22B4}{\ensuremath\unlhd}
+  \DeclareUnicodeCharacter{22B5}{\ensuremath\unrhd}
+  \DeclareUnicodeCharacter{22C0}{\ensuremath\bigwedge}
+  \DeclareUnicodeCharacter{22C1}{\ensuremath\bigvee}
+  \DeclareUnicodeCharacter{22C2}{\ensuremath\bigcap}
+  \DeclareUnicodeCharacter{22C3}{\ensuremath\bigcup}
+  \DeclareUnicodeCharacter{22C4}{\ensuremath\diamond}
+  \DeclareUnicodeCharacter{22C5}{\ensuremath\cdot}
+  \DeclareUnicodeCharacter{22C6}{\ensuremath\star}
+  \DeclareUnicodeCharacter{22C8}{\ensuremath\bowtie}
+  \DeclareUnicodeCharacter{2308}{\ensuremath\lceil}
+  \DeclareUnicodeCharacter{2309}{\ensuremath\rceil}
+  \DeclareUnicodeCharacter{230A}{\ensuremath\lfloor}
+  \DeclareUnicodeCharacter{230B}{\ensuremath\rfloor}
+  \DeclareUnicodeCharacter{2322}{\ensuremath\frown}
+  \DeclareUnicodeCharacter{2323}{\ensuremath\smile}
+
+  \DeclareUnicodeCharacter{25A1}{\ensuremath\Box}
+  \DeclareUnicodeCharacter{25B3}{\ensuremath\triangle}
+  \DeclareUnicodeCharacter{25B7}{\ensuremath\triangleright}
+  \DeclareUnicodeCharacter{25BD}{\ensuremath\bigtriangledown}
+  \DeclareUnicodeCharacter{25C1}{\ensuremath\triangleleft}
+  \DeclareUnicodeCharacter{25C7}{\ensuremath\Diamond}
+  \DeclareUnicodeCharacter{2660}{\ensuremath\spadesuit}
+  \DeclareUnicodeCharacter{2661}{\ensuremath\heartsuit}
+  \DeclareUnicodeCharacter{2662}{\ensuremath\diamondsuit}
+  \DeclareUnicodeCharacter{2663}{\ensuremath\clubsuit}
+  \DeclareUnicodeCharacter{266D}{\ensuremath\flat}
+  \DeclareUnicodeCharacter{266E}{\ensuremath\natural}
+  \DeclareUnicodeCharacter{266F}{\ensuremath\sharp}
+  \DeclareUnicodeCharacter{26AA}{\ensuremath\bigcirc}
+  \DeclareUnicodeCharacter{27B9}{\ensuremath\rangle}
+  \DeclareUnicodeCharacter{27C2}{\ensuremath\perp}
+  \DeclareUnicodeCharacter{27E8}{\ensuremath\langle}
+  \DeclareUnicodeCharacter{27F5}{\ensuremath\longleftarrow}
+  \DeclareUnicodeCharacter{27F6}{\ensuremath\longrightarrow}
+  \DeclareUnicodeCharacter{27F7}{\ensuremath\longleftrightarrow}
+  \DeclareUnicodeCharacter{27FC}{\ensuremath\longmapsto}
+  \DeclareUnicodeCharacter{29F5}{\ensuremath\setminus}
+  \DeclareUnicodeCharacter{2A00}{\ensuremath\bigodot}
+  \DeclareUnicodeCharacter{2A01}{\ensuremath\bigoplus}
+  \DeclareUnicodeCharacter{2A02}{\ensuremath\bigotimes}
+  \DeclareUnicodeCharacter{2A04}{\ensuremath\biguplus}
+  \DeclareUnicodeCharacter{2A06}{\ensuremath\bigsqcup}
+  \DeclareUnicodeCharacter{2A1D}{\ensuremath\Join}
+  \DeclareUnicodeCharacter{2A3F}{\ensuremath\amalg}
+  \DeclareUnicodeCharacter{2AAF}{\ensuremath\preceq}
+  \DeclareUnicodeCharacter{2AB0}{\ensuremath\succeq}
+
   \global\mathchardef\checkmark="1370 % actually the square root sign
   \DeclareUnicodeCharacter{2713}{\ensuremath\checkmark}
 }% end of \utfeightchardefs
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi
index 8673b00..07d34bd 100644
--- a/doc/misc/tramp.texi
+++ b/doc/misc/tramp.texi
@@ -1062,6 +1062,16 @@ Therefore, your @value{emacsname} must have D-Bus 
integration,
 @pxref{Top, , D-Bus, dbus}.
 
 @table @asis
address@hidden @option{afp}
address@hidden method afp
address@hidden afp method
+
+Access to Mac OS X volumes via the Apple Filing Protocol is offered by
+this method.  The access must always be performed with a leading
+volume (share) name, like @address@hidden, user, host, /volume}}.
+
+
+
 @item @option{dav}
 @cindex method dav
 @cindex method davs
@@ -1107,9 +1117,10 @@ FUSE, it also needs the SYNCE-GVFS plugin.
 @vindex tramp-gvfs-methods
 @defopt tramp-gvfs-methods
 This custom option, a list, defines the external methods which shall
-be used with address@hidden  Per default, these are @option{dav},
address@hidden, @option{obex}, @option{sftp} and @option{synce}.  Other
-possible values are @option{ftp} and @option{smb}.
+be used with address@hidden  Per default, these are @option{afp},
address@hidden, @option{davs}, @option{obex}, @option{sftp} and
address@hidden  Other possible values are @option{ftp} and
address@hidden
 @end defopt
 @end ifset
 
diff --git a/etc/NEWS b/etc/NEWS
index 47a4bae..46910b0 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -103,6 +103,9 @@ and can contain escape sequences for command keys, quotes, 
and the like.
 
 * Changes in Emacs 25.1
 
+** Any file of the form .dir-locals*.el is now considered a dir-local
+   file, and multiple can be used in the same directory. See the
+   variable `dir-locals-file' for more information.
 ** `xref-find-definitions' and `describe-function' now display
    information about mode local overrides (defined by
    cedet/mode-local.el `define-overloadable-function' and
@@ -321,10 +324,18 @@ standards.
 
 * Changes in Specialized Modes and Packages in Emacs 25.1
 
+** New function `bookmark-set-no-overwrite' bound to C-x r M.
+It raises an error if a bookmark of that name already exists,
+unlike `bookmark-set' which silently updates an existing bookmark.
+
 ** JSON
 ---
 *** `json-pretty-print' and `json-pretty-print-buffer' now maintain
 the ordering of object keys by default.
+---
+*** New commands `json-pretty-print-ordered' and
+`json-pretty-print-buffer-ordered' pretty prints JSON objects with
+object keys sorted alphabetically.
 
 ** You can recompute the VC state of a file buffer with `M-x vc-refresh-state'
 ** Prog mode has some support for multi-mode indentation.
@@ -671,6 +682,10 @@ plist will contain a :peer element that has the output of
 ** Tramp
 
 +++
+*** New connection method "afp", which allows to access Mac OS X
+volumes via the Apple Filing Protocol.
+
++++
 *** New connection method "nc", which allows to access dumb busyboxes.
 
 +++
@@ -907,6 +922,9 @@ alists, hash-table and arrays.  All functions are prefixed 
with
 ** The `thunk' library provides functions and macros to control the
 evaluation of forms.
 
+** js-jsx-mode (a minor variant of js-mode) provides indentation
+support for JSX, an XML-like syntax extension to ECMAScript.
+
 
 * Incompatible Lisp Changes in Emacs 25.1
 
@@ -1034,6 +1052,11 @@ The new behavior is compatible with Common Lisp and with 
XEmacs.
 This change does not affect Lisp code intended to be portable to
 Emacs 24.2 and earlier, which did not support unary ‘/’.
 
++++
+** The `default-directory' value doesn't have to end slash.  To make
+that happen, `unhandled-file-name-directory' now defaults to calling
+`file-name-as-directory'.
+
 
 * Lisp Changes in Emacs 25.1
 
diff --git a/etc/PROBLEMS b/etc/PROBLEMS
index 1b48318..0f76bfc 100644
--- a/etc/PROBLEMS
+++ b/etc/PROBLEMS
@@ -2044,6 +2044,36 @@ security reasons.  The solution is to close the Web 
browser while
 working in Emacs, or to add emacs.exe to the list of applications that
 are allowed to use the clipboard when the Web browser is open.
 
+** "Pinning" Emacs to the taskbar doesn't work on Windows 10
+
+"Doesn't work" here means that if you invoke Emacs by clicking on the
+pinned icon, a separate button appears on the taskbar, instead of the
+expected effect of the icon you clicked on being converted to that
+button.
+
+First, be sure to edit the Properties of the pinned icon to invoke
+runemacs.exe, not emacs.exe.  (The latter will cause an extra cmd
+window to appear when you invoke Emacs from the pinned icon.)
+
+But the real cause of the problem is the fact that the pinned icon
+(which is really a shortcut in a special directory) lacks a unique
+application-defined Application User Model ID (AppUserModelID) that
+identifies the current process to the taskbar.  This identifier allows
+an application to group its associated processes and windows under a
+single taskbar button.  Emacs on Windows specifies a unique
+AppUserModelID when it starts, but Windows 10, unlike previous
+versions of MS-Windows, does not propagate that ID to the pinned icon.
+
+To work around this, use some utility, such as 'win7appid', to set the
+AppUserModelID of the pinned icon to the string "Gnu.Emacs".  The
+shortcut files corresponding to icons you pinned are stored by Windows
+in the following subdirectory of your user's directory (by default
+C:\Users\<UserName>\):
+
+ AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar
+
+Look for the file 'emacs.lnk' there.
+
 ** Windows 95 and networking.
 
 To support server sockets, Emacs loads ws2_32.dll.  If this file is
diff --git a/etc/TODO b/etc/TODO
index 87c53b6..946a4fe 100644
--- a/etc/TODO
+++ b/etc/TODO
@@ -1244,6 +1244,15 @@ systems for HTML/XML files automatically."
 
 **** Leverage char-displayable-p.
 
+** RefTeX
+
+*** Provide a wdired-like mode for editing RefTeX TOC buffers.
+As a first step, renaming of sections could be supported.  Ultimately,
+it would be great if it also supported moving sections, e.g., by
+killing and yanking or providing org-mode like "move section
+upwards/downwards" commands.  However, that's not so easy in the
+presence of multi-file documents.
+
 * Internal changes
 
 ** Cleanup all the GC_ mark bit stuff -- there is no longer any distinction
diff --git a/etc/emacs-buffer.gdb b/etc/emacs-buffer.gdb
index cdcb666..8f6c321 100644
--- a/etc/emacs-buffer.gdb
+++ b/etc/emacs-buffer.gdb
@@ -33,7 +33,7 @@
 # 'ysave-buffer', and 'ybuffer-contents'.  The 'y' prefix avoids any
 # namespace collisions with emacs/src/.gdbinit.
 
-# Since the internal data structures in Emacs occasionally from time to
+# Since the internal data structures in Emacs change from time to
 # time, you should use the version of this file that came with your
 # particular Emacs version; older versions might not work anymore.
 
@@ -213,8 +213,12 @@ define ydump-buffer
       set $endptr = $beg + $buf->gpt_byte - 1
       dump binary memory $arg1 $beg $endptr
     else
-      dump   binary memory $arg1 $beg $gap-1
-      append binary memory $arg1 $gap_end $end
+      if $gap - $beg > 1
+        dump   binary memory $arg1 $beg $gap-1
+        append binary memory $arg1 $gap_end $end
+      else
+        dump   binary memory $arg1 $gap_end $end
+      end
       set $endptr = $end
     end
   end
diff --git a/etc/themes/tsdh-dark-theme.el b/etc/themes/tsdh-dark-theme.el
index 1d4326e..e3cf3db 100644
--- a/etc/themes/tsdh-dark-theme.el
+++ b/etc/themes/tsdh-dark-theme.el
@@ -20,11 +20,11 @@
 ;;; Code:
 
 (deftheme tsdh-dark
-  "Minor tweaks to the Emacs dark-background defaults.
-Used and created by Tassilo Horn.")
+  "A dark theme used and created by Tassilo Horn.")
 
 (custom-theme-set-faces
  'tsdh-dark
+ '(aw-leading-char-face ((t (:background "gray30" :foreground "red" :weight 
bold))))
  '(default ((t (:background "gray20" :foreground "white smoke"))))
  '(diff-added ((t (:inherit diff-changed :background "dark green"))) t)
  '(diff-changed ((t (:background "midnight blue"))) t)
@@ -34,6 +34,7 @@ Used and created by Tassilo Horn.")
  '(diff-removed ((t (:inherit diff-changed :background "dark red"))) t)
  '(dired-directory ((t (:foreground "DodgerBlue" :weight bold))))
  '(error ((t (:foreground "deep pink" :weight bold))))
+ '(eshell-prompt ((t (:inherit font-lock-function-name-face :weight bold))))
  '(font-lock-builtin-face ((t (:foreground "chartreuse2"))))
  '(font-lock-comment-face ((t (:foreground "peru"))))
  '(font-lock-constant-face ((t (:foreground "dodger blue"))))
@@ -44,15 +45,21 @@ Used and created by Tassilo Horn.")
  '(font-lock-string-face ((t (:foreground "light salmon"))))
  '(font-lock-type-face ((t (:foreground "medium purple"))))
  '(font-lock-variable-name-face ((t (:foreground "yellow green"))))
- '(font-lock-warning-face ((t (:foreground "hot pink"))))
+ '(font-lock-warning-face ((t (:foreground "hot pink" :weight bold))))
  '(gnus-button ((t (:inherit button))))
  '(gnus-cite-1 ((t (:foreground "dark turquoise"))) t)
  '(gnus-group-mail-1 ((t (:inherit gnus-group-mail-1-empty :weight bold))))
- '(gnus-group-mail-1-empty ((t (:foreground "#00CC00"))))
+ '(gnus-group-mail-1-empty ((t (:foreground "turquoise1"))))
+ '(gnus-group-mail-2 ((t (:inherit gnus-group-mail-2-empty :weight bold))))
+ '(gnus-group-mail-2-empty ((t (:foreground "turquoise3"))))
  '(gnus-group-mail-3 ((t (:inherit gnus-group-mail-3-empty :weight bold))))
- '(gnus-group-mail-3-empty ((t (:foreground "#009999"))))
+ '(gnus-group-mail-3-empty ((t (:foreground "turquoise4"))))
+ '(gnus-group-news-1 ((t (:inherit gnus-group-news-1-empty :weight bold))))
+ '(gnus-group-news-1-empty ((t (:foreground "SpringGreen1"))))
+ '(gnus-group-news-2 ((t (:inherit gnus-group-news-2-empty :weight bold))))
+ '(gnus-group-news-2-empty ((t (:foreground "SpringGreen3"))))
  '(gnus-group-news-3 ((t (:inherit gnus-group-news-3-empty :weight bold))))
- '(gnus-group-news-3-empty ((t (:foreground "light green"))))
+ '(gnus-group-news-3-empty ((t (:foreground "SpringGreen4"))))
  '(gnus-header-content ((t (:foreground "#A64B00"))))
  '(gnus-header-name ((t (:weight bold))))
  '(gnus-header-subject ((t (:foreground "#A64B00" :weight bold))))
@@ -68,6 +75,11 @@ Used and created by Tassilo Horn.")
  '(ido-first-match ((t (:foreground "turquoise" :weight bold))))
  '(ido-only-match ((t (:foreground "medium spring green" :weight bold))))
  '(ido-subdir ((t (:inherit dired-directory :weight normal))))
+ '(ivy-current-match ((t (:inherit highlight))))
+ '(ivy-minibuffer-match-face-1 ((t (:background "gray50" :weight normal))))
+ '(ivy-minibuffer-match-face-2 ((t (:background "gold3" :weight bold))))
+ '(ivy-minibuffer-match-face-4 ((t (:background "forest green" :weight bold))))
+ '(ivy-remote ((t (:foreground "deep sky blue" :slant italic))))
  '(lusty-file-face ((t (:foreground "SpringGreen1"))) t)
  '(magit-header ((t (:box 1 :weight bold))))
  '(magit-section-title ((t (:inherit magit-header :background "dark slate 
blue"))))
@@ -115,6 +127,7 @@ Used and created by Tassilo Horn.")
  '(secondary-selection ((t (:background "#333366" :foreground "#f6f3e8"))))
  '(show-paren-match ((t (:background "DeepSkyBlue4"))))
  '(show-paren-mismatch ((t (:background "dark magenta"))))
+ '(swiper-match-face-1 ((t (:background "gray35"))))
  '(th-sentence-hl-face ((t (:weight bold))))
  '(widget-field ((t (:box (:line-width 2 :color "grey75" :style 
pressed-button)))))
  '(window-number-face ((t (:foreground "red" :weight bold)))))
diff --git a/etc/tutorials/TUTORIAL.translators 
b/etc/tutorials/TUTORIAL.translators
index 25897d7..2747d39 100644
--- a/etc/tutorials/TUTORIAL.translators
+++ b/etc/tutorials/TUTORIAL.translators
@@ -53,9 +53,9 @@ Author:     Pieter Schoenmakers <address@hidden>
 Maintainer: Pieter Schoenmakers <address@hidden>
 
 * TUTORIAL.pl:
-Author:     Beatę Wierzchołowską <address@hidden>
-            Janusz S. Bien <address@hidden>
-Maintainer: Radoslaw Moszczynski <address@hidden>
+Author:     Beata Wierzchołowska <address@hidden>
+            Janusz S. Bień <address@hidden>
+Maintainer: Radosław Moszczyński <address@hidden>
 
 * TUTORIAL.pt_BR:
 Author:     Marcelo Toledo <address@hidden>
diff --git a/lib/intprops.h b/lib/intprops.h
index f85ccad..8fff86d 100644
--- a/lib/intprops.h
+++ b/lib/intprops.h
@@ -22,8 +22,7 @@
 
 #include <limits.h>
 
-/* Return an integer value, converted to the same type as the integer
-   expression E after integer type promotion.  V is the unconverted value.  */
+/* Return a value with the common real type of E and V and the value of V.  */
 #define _GL_INT_CONVERT(e, v) (0 * (e) + (v))
 
 /* Act like _GL_INT_CONVERT (E, -V) but work around a bug in IRIX 6.5 cc; see
@@ -48,12 +47,12 @@
 /* True if the signed integer expression E uses two's complement.  */
 #define _GL_INT_TWOS_COMPLEMENT(e) (~ _GL_INT_CONVERT (e, 0) == -1)
 
-/* True if the arithmetic type T is signed.  */
+/* True if the real type T is signed.  */
 #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
 
-/* Return 1 if the integer expression E, after integer promotion, has
-   a signed type.  */
-#define _GL_INT_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0)
+/* Return 1 if the real expression E, after promotion, has a
+   signed or floating type.  */
+#define EXPR_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0)
 
 
 /* Minimum and maximum values for integer types and expressions.  These
@@ -76,11 +75,11 @@
 /* The maximum and minimum values for the type of the expression E,
    after integer promotion.  E should not have side effects.  */
 #define _GL_INT_MINIMUM(e)                                              \
-  (_GL_INT_SIGNED (e)                                                   \
+  (EXPR_SIGNED (e)                                                      \
    ? - _GL_INT_TWOS_COMPLEMENT (e) - _GL_SIGNED_INT_MAXIMUM (e)         \
    : _GL_INT_CONVERT (e, 0))
 #define _GL_INT_MAXIMUM(e)                                              \
-  (_GL_INT_SIGNED (e)                                                   \
+  (EXPR_SIGNED (e)                                                      \
    ? _GL_SIGNED_INT_MAXIMUM (e)                                         \
    : _GL_INT_NEGATE_CONVERT (e, 1))
 #define _GL_SIGNED_INT_MAXIMUM(e)                                       \
@@ -263,22 +262,28 @@
     : (a) % - (b))                                                      \
    == 0)
 
-
-/* Integer overflow checks.
+/* Check for integer overflow, and report low order bits of answer.
 
    The INT_<op>_OVERFLOW macros return 1 if the corresponding C operators
    might not yield numerically correct answers due to arithmetic overflow.
-   They work correctly on all known practical hosts, and do not rely
+   The INT_<op>_WRAPV macros also store the low-order bits of the answer.
+   These macros work correctly on all known practical hosts, and do not rely
    on undefined behavior due to signed arithmetic overflow.
 
-   Example usage:
+   Example usage, assuming A and B are long int:
 
-     long int i = ...;
-     long int j = ...;
-     if (INT_MULTIPLY_OVERFLOW (i, j))
-       printf ("multiply would overflow");
-     else
-       printf ("product is %ld", i * j);
+     long int result = INT_MULTIPLY_WRAPV (a, b);
+     printf ("result is %ld (%s)\n", result,
+             INT_MULTIPLY_OVERFLOW (a, b) ? "after overflow" : "no overflow");
+
+   Example usage with WRAPV flavor:
+
+     long int result;
+     bool overflow = INT_MULTIPLY_WRAPV (a, b, &result);
+     printf ("result is %ld (%s)\n", result,
+             overflow ? "after overflow" : "no overflow");
+
+   Restrictions on these macros:
 
    These macros do not check for all possible numerical problems or
    undefined or unspecified behavior: they do not check for division
@@ -287,6 +292,9 @@
    These macros may evaluate their arguments zero or multiple times, so the
    arguments should not have side effects.
 
+   The WRAPV macros are not constant expressions.  They support only
+   +, binary -, and *.  The result type must be signed.
+
    These macros are tuned for their last argument being a constant.
 
    Return 1 if the integer expressions A * B, A - B, -A, A * B, A / B,
@@ -317,4 +325,104 @@
                       _GL_INT_MINIMUM (0 * (b) + (a)),          \
                       _GL_INT_MAXIMUM (0 * (b) + (a)))
 
+/* Compute A + B, A - B, A * B, respectively, storing the result into *R.
+   Return 1 if the result overflows.  See above for restrictions.  */
+#define INT_ADD_WRAPV(a, b, r) \
+  _GL_INT_OP_WRAPV (a, b, r, +, __builtin_add_overflow, INT_ADD_OVERFLOW)
+#define INT_SUBTRACT_WRAPV(a, b, r) \
+  _GL_INT_OP_WRAPV (a, b, r, -, __builtin_sub_overflow, INT_SUBTRACT_OVERFLOW)
+#define INT_MULTIPLY_WRAPV(a, b, r) \
+  _GL_INT_OP_WRAPV (a, b, r, *, __builtin_mul_overflow, INT_MULTIPLY_OVERFLOW)
+
+#ifndef __has_builtin
+# define __has_builtin(x) 0
+#endif
+
+/* Nonzero if this compiler has GCC bug 68193 or Clang bug 25390.  See:
+   https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68193
+   https://llvm.org/bugs/show_bug.cgi?id=25390
+   For now, assume all versions of GCC-like compilers generate bogus
+   warnings for _Generic.  This matters only for older compilers that
+   lack __builtin_add_overflow.  */
+#if __GNUC__
+# define _GL__GENERIC_BOGUS 1
+#else
+# define _GL__GENERIC_BOGUS 0
+#endif
+
+/* Store A <op> B into *R, where OP specifies the operation.
+   BUILTIN is the builtin operation, and OVERFLOW the overflow predicate.
+   See above for restrictions.  */
+#if 5 <= __GNUC__ || __has_builtin (__builtin_add_overflow)
+# define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) builtin (a, b, r)
+#elif 201112 <= __STDC_VERSION__ && !_GL__GENERIC_BOGUS
+# define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) \
+   (_Generic \
+    (*(r), \
+     signed char: \
+       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned char, \
+                        signed char, SCHAR_MIN, SCHAR_MAX), \
+     short int: \
+       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned short int, \
+                        short int, SHRT_MIN, SHRT_MAX), \
+     int: \
+       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+                        int, INT_MIN, INT_MAX), \
+     long int: \
+       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
+                        long int, LONG_MIN, LONG_MAX), \
+     long long int: \
+       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \
+                        long long int, LLONG_MIN, LLONG_MAX)))
+#else
+# define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) \
+   (sizeof *(r) == sizeof (signed char) \
+    ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned char, \
+                       signed char, SCHAR_MIN, SCHAR_MAX) \
+    : sizeof *(r) == sizeof (short int) \
+    ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned short int, \
+                       short int, SHRT_MIN, SHRT_MAX) \
+    : sizeof *(r) == sizeof (int) \
+    ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+                       int, INT_MIN, INT_MAX) \
+    : _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow))
+# ifdef LLONG_MAX
+#  define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \
+    (sizeof *(r) == sizeof (long int) \
+     ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
+                        long int, LONG_MIN, LONG_MAX) \
+     : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \
+                        long long int, LLONG_MIN, LLONG_MAX))
+# else
+#  define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \
+    _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
+                     long int, LONG_MIN, LONG_MAX))
+# endif
+#endif
+
+/* Store the low-order bits of A <op> B into *R, where the operation
+   is given by OP.  Use the unsigned type UT for calculation to avoid
+   overflow problems.  *R's type is T, with extremal values TMIN and
+   TMAX.  T must be a signed integer type.  */
+#define _GL_INT_OP_CALC(a, b, r, op, overflow, ut, t, tmin, tmax) \
+  (sizeof ((a) op (b)) < sizeof (t) \
+   ? _GL_INT_OP_CALC1 ((t) (a), (t) (b), r, op, overflow, ut, t, tmin, tmax) \
+   : _GL_INT_OP_CALC1 (a, b, r, op, overflow, ut, t, tmin, tmax))
+#define _GL_INT_OP_CALC1(a, b, r, op, overflow, ut, t, tmin, tmax) \
+  ((overflow (a, b) \
+    || (EXPR_SIGNED ((a) op (b)) && ((a) op (b)) < (tmin)) \
+    || (tmax) < ((a) op (b))) \
+   ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t, tmin, tmax), 1) \
+   : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t, tmin, tmax), 0))
+
+/* Return A <op> B, where the operation is given by OP.  Use the
+   unsigned type UT for calculation to avoid overflow problems.
+   Convert the result to type T without overflow by subtracting TMIN
+   from large values before converting, and adding it afterwards.
+   Compilers can optimize all the operations except OP.  */
+#define _GL_INT_OP_WRAPV_VIA_UNSIGNED(a, b, op, ut, t, tmin, tmax) \
+  (((ut) (a) op (ut) (b)) <= (tmax) \
+   ? (t) ((ut) (a) op (ut) (b)) \
+   : ((t) (((ut) (a) op (ut) (b)) - (tmin)) + (tmin)))
+
 #endif /* _GL_INTPROPS_H */
diff --git a/lib/stdalign.in.h b/lib/stdalign.in.h
index ce1e793..b16ccc8 100644
--- a/lib/stdalign.in.h
+++ b/lib/stdalign.in.h
@@ -104,7 +104,7 @@
          ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__)                 \
          : __GNUC__)                                            \
         || __HP_cc || __HP_aCC || __IBMC__ || __IBMCPP__        \
-        || __ICC || 0x5110 <= __SUNPRO_C)
+        || __ICC || 0x590 <= __SUNPRO_C)
 #  define _Alignas(a) __attribute__ ((__aligned__ (a)))
 # elif 1300 <= _MSC_VER
 #  define _Alignas(a) __declspec (align (a))
diff --git a/lib/timespec-add.c b/lib/timespec-add.c
index 255489e..e8f6aac 100644
--- a/lib/timespec-add.c
+++ b/lib/timespec-add.c
@@ -33,36 +33,39 @@ timespec_add (struct timespec a, struct timespec b)
   int ns = a.tv_nsec + b.tv_nsec;
   int nsd = ns - TIMESPEC_RESOLUTION;
   int rns = ns;
+  time_t tmin = TYPE_MINIMUM (time_t);
+  time_t tmax = TYPE_MAXIMUM (time_t);
 
   if (0 <= nsd)
     {
       rns = nsd;
-      if (rs == TYPE_MAXIMUM (time_t))
-        {
-          if (0 <= bs)
-            goto high_overflow;
-          bs++;
-        }
-      else
+      if (bs < tmax)
+        bs++;
+      else if (rs < 0)
         rs++;
+      else
+        goto high_overflow;
     }
 
-  if (INT_ADD_OVERFLOW (rs, bs))
+  /* INT_ADD_WRAPV is not appropriate since time_t might be unsigned.
+     In theory time_t might be narrower than int, so plain
+     INT_ADD_OVERFLOW does not suffice.  */
+  if (! INT_ADD_OVERFLOW (rs, bs) && tmin <= rs + bs && rs + bs <= tmax)
+    rs += bs;
+  else
     {
       if (rs < 0)
         {
-          rs = TYPE_MINIMUM (time_t);
+          rs = tmin;
           rns = 0;
         }
       else
         {
         high_overflow:
-          rs = TYPE_MAXIMUM (time_t);
+          rs = tmax;
           rns = TIMESPEC_RESOLUTION - 1;
         }
     }
-  else
-    rs += bs;
 
   return make_timespec (rs, rns);
 }
diff --git a/lib/timespec-sub.c b/lib/timespec-sub.c
index c574375..392ec15 100644
--- a/lib/timespec-sub.c
+++ b/lib/timespec-sub.c
@@ -33,36 +33,39 @@ timespec_sub (struct timespec a, struct timespec b)
   time_t bs = b.tv_sec;
   int ns = a.tv_nsec - b.tv_nsec;
   int rns = ns;
+  time_t tmin = TYPE_MINIMUM (time_t);
+  time_t tmax = TYPE_MAXIMUM (time_t);
 
   if (ns < 0)
     {
       rns = ns + TIMESPEC_RESOLUTION;
-      if (rs == TYPE_MINIMUM (time_t))
-        {
-          if (bs <= 0)
-            goto low_overflow;
-          bs--;
-        }
-      else
+      if (bs < tmax)
+        bs++;
+      else if (- TYPE_SIGNED (time_t) < rs)
         rs--;
+      else
+        goto low_overflow;
     }
 
-  if (INT_SUBTRACT_OVERFLOW (rs, bs))
+  /* INT_SUBTRACT_WRAPV is not appropriate since time_t might be unsigned.
+     In theory time_t might be narrower than int, so plain
+     INT_SUBTRACT_OVERFLOW does not suffice.  */
+  if (! INT_SUBTRACT_OVERFLOW (rs, bs) && tmin <= rs - bs && rs - bs <= tmax)
+    rs -= bs;
+  else
     {
       if (rs < 0)
         {
         low_overflow:
-          rs = TYPE_MINIMUM (time_t);
+          rs = tmin;
           rns = 0;
         }
       else
         {
-          rs = TYPE_MAXIMUM (time_t);
+          rs = tmax;
           rns = TIMESPEC_RESOLUTION - 1;
         }
     }
-  else
-    rs -= bs;
 
   return make_timespec (rs, rns);
 }
diff --git a/lisp/ChangeLog.17 b/lisp/ChangeLog.17
index 8a255d7..d717a4d 100644
--- a/lisp/ChangeLog.17
+++ b/lisp/ChangeLog.17
@@ -4146,7 +4146,7 @@
 2014-12-14  Steve Purcell  <address@hidden>  (tiny change)
 
        * emacs-lisp/package.el (package-menu-mode): Use an extra column
-       for the "Version" column, to accomodate date-and-time-based versions.
+       for the "Version" column, to accommodate date-and-time-based versions.
 
 2014-12-14  Cameron Desautels  <address@hidden>
 
@@ -8700,9 +8700,9 @@
        (python-shell-prompt-detect)
        (python-shell-prompt-validate-regexps): New functions.
        (python-shell-prompt-set-calculated-regexps): New function.
-       (inferior-python-mode): Use it.  Also honor overriden
+       (inferior-python-mode): Use it.  Also honor overridden
        python-shell-interpreter and python-shell-interpreter-args.
-       (python-shell-make-comint): Honor overriden
+       (python-shell-make-comint): Honor overridden
        python-shell-interpreter and python-shell-interpreter-args.
        (python-shell-get-or-create-process): Make it testable by allowing
        to call run-python non-interactively.
@@ -10975,9 +10975,9 @@
 
        * faces.el (face-spec-recalc): Apply X resources only after the
        defface spec has been applied. Thus, X resources are no longer
-       overriden by the defface spec which also fixes issues on win32 where
+       overridden by the defface spec which also fixes issues on win32 where
        the toolbar coloring was wrong because it is set through X resources
-       and was (wrongfully) overriden.  (Bug#16694)
+       and was (wrongfully) overridden.  (Bug#16694)
 
 2014-04-30  Stefan Monnier  <address@hidden>
 
diff --git a/lisp/abbrev.el b/lisp/abbrev.el
index f372a28..43a905b 100644
--- a/lisp/abbrev.el
+++ b/lisp/abbrev.el
@@ -580,6 +580,8 @@ An obsolete but still supported calling form is:
                   ,@(if (cadr props) (list :system (cadr props))))))
   (unless (plist-get props :count)
     (setq props (plist-put props :count 0)))
+  (setq props (plist-put props :abbrev-table-modiff
+                         (abbrev-table-get table :abbrev-table-modiff)))
   (let ((system-flag (plist-get props :system))
         (sym (intern name table)))
     ;; Don't override a prior user-defined abbrev with a system abbrev,
diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el
index cf071e2..83aadc9 100644
--- a/lisp/arc-mode.el
+++ b/lisp/arc-mode.el
@@ -395,6 +395,7 @@ file.  Archive and member name will be added."
     (define-key map "o" 'archive-extract-other-window)
     (define-key map "p" 'archive-previous-line)
     (define-key map "\C-p" 'archive-previous-line)
+    (define-key map [?\S-\ ] 'archive-previous-line)
     (define-key map [up] 'archive-previous-line)
     (define-key map "r" 'archive-rename-entry)
     (define-key map "u" 'archive-unflag)
diff --git a/lisp/bookmark.el b/lisp/bookmark.el
index e931025..0729bdd 100644
--- a/lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -196,6 +196,7 @@ A non-nil value may result in truncated bookmark names."
 
 ;;;###autoload (define-key ctl-x-r-map "b" 'bookmark-jump)
 ;;;###autoload (define-key ctl-x-r-map "m" 'bookmark-set)
+;;;###autoload (define-key ctl-x-r-map "M" 'bookmark-set-no-overwrite)
 ;;;###autoload (define-key ctl-x-r-map "l" 'bookmark-bmenu-list)
 
 ;;;###autoload
@@ -204,6 +205,7 @@ A non-nil value may result in truncated bookmark names."
     ;; Read the help on all of these functions for details...
     (define-key map "x" 'bookmark-set)
     (define-key map "m" 'bookmark-set) ;"m"ark
+    (define-key map "M" 'bookmark-set-no-overwrite) ;"M"aybe mark
     (define-key map "j" 'bookmark-jump)
     (define-key map "g" 'bookmark-jump) ;"g"o
     (define-key map "o" 'bookmark-jump-other-window)
@@ -754,31 +756,19 @@ This expects to be called from `point-min' in a bookmark 
file."
     (define-key map "\C-w" 'bookmark-yank-word)
     map))
 
-;;;###autoload
-(defun bookmark-set (&optional name no-overwrite)
-  "Set a bookmark named NAME at the current location.
-If name is nil, then prompt the user.
-
-With a prefix arg (non-nil NO-OVERWRITE), do not overwrite any
-existing bookmark that has the same name as NAME, but instead push the
-new bookmark onto the bookmark alist.  The most recently set bookmark
-with name NAME is thus the one in effect at any given time, but the
-others are still there, should the user decide to delete the most
-recent one.
+(defun bookmark-set-internal (prompt name overwrite-or-push)
+  "Interactively set a bookmark named NAME at the current location.
 
-To yank words from the text of the buffer and use them as part of the
-bookmark name, type C-w while setting a bookmark.  Successive C-w's
-yank successive words.
+Begin the interactive prompt with PROMPT, followed by a space, a
+generated default name in parentheses, a colon and a space.
 
-Typing C-u inserts (at the bookmark name prompt) the name of the last
-bookmark used in the document where the new bookmark is being set;
-this helps you use a single bookmark name to track progress through a
-large document.  If there is no prior bookmark for this document, then
-C-u inserts an appropriate name based on the buffer or file.
-
-Use \\[bookmark-delete] to remove bookmarks (you give it a name and
-it removes only the first instance of a bookmark with that name from
-the list of bookmarks.)"
+If OVERWRITE-OR-PUSH is nil, then error if there is already a
+bookmark named NAME; if `overwrite', then replace any existing
+bookmark if there is one; if `push' then push the new bookmark
+onto the bookmark alist.  The `push' behavior means that among
+bookmarks named NAME, this most recently set one becomes the one in
+effect, but the others are still there, in order, if the topmost one
+is ever deleted."
   (interactive (list nil current-prefix-arg))
   (unwind-protect
        (let* ((record (bookmark-make-record))
@@ -807,12 +797,24 @@ the list of bookmarks.)"
          (let ((str
                 (or name
                     (read-from-minibuffer
-                     (format "Set bookmark (%s): " default)
+                     (format "%s (default: \"%s\"): " prompt default)
                      nil
                      bookmark-minibuffer-read-name-map
                      nil nil defaults))))
            (and (string-equal str "") (setq str default))
-           (bookmark-store str (cdr record) no-overwrite)
+
+           (cond
+            ((eq overwrite-or-push nil)
+             (if (bookmark-get-bookmark str t)
+                 (error "A bookmark named \"%s\" already exists." str)
+               (bookmark-store str (cdr record) nil)))
+            ((eq overwrite-or-push 'overwrite)
+             (bookmark-store str (cdr record) nil))
+            ((eq overwrite-or-push 'push)
+             (bookmark-store str (cdr record) t))
+            (t
+             (error "Unrecognized value for `overwrite-or-push': %S"
+                    overwrite-or-push)))
 
            ;; Ask for an annotation buffer for this bookmark
            (when bookmark-use-annotations
@@ -821,6 +823,68 @@ the list of bookmarks.)"
     (setq bookmark-current-buffer nil)))
 
 
+;;;###autoload
+(defun bookmark-set (&optional name no-overwrite)
+  "Set a bookmark named NAME at the current location.
+If NAME is nil, then prompt the user.
+
+With a prefix arg (non-nil NO-OVERWRITE), do not overwrite any
+existing bookmark that has the same name as NAME, but instead push the
+new bookmark onto the bookmark alist.  The most recently set bookmark
+with name NAME is thus the one in effect at any given time, but the
+others are still there, should the user decide to delete the most
+recent one.
+
+To yank words from the text of the buffer and use them as part of the
+bookmark name, type C-w while setting a bookmark.  Successive C-w's
+yank successive words.
+
+Typing C-u inserts (at the bookmark name prompt) the name of the last
+bookmark used in the document where the new bookmark is being set;
+this helps you use a single bookmark name to track progress through a
+large document.  If there is no prior bookmark for this document, then
+C-u inserts an appropriate name based on the buffer or file.
+
+Use \\[bookmark-delete] to remove bookmarks (you give it a name and
+it removes only the first instance of a bookmark with that name from
+the list of bookmarks.)"
+  (interactive (list nil current-prefix-arg))
+  (let ((prompt
+         (if no-overwrite "Set bookmark" "Set bookmark unconditionally")))
+    (bookmark-set-internal prompt name (if no-overwrite 'push 'overwrite))))
+
+;;;###autoload
+(defun bookmark-set-no-overwrite (&optional name push-bookmark)
+  "Set a bookmark named NAME at the current location.
+If NAME is nil, then prompt the user.
+
+If a bookmark named NAME already exists and prefix argument
+PUSH-BOOKMARK is non-nil, then push the new bookmark onto the
+bookmark alist.  Pushing it means that among bookmarks named
+NAME, this one becomes the one in effect, but the others are
+still there, in order, and become effective again if the user
+ever deletes the most recent one.
+
+Otherwise, if a bookmark named NAME already exists but PUSH-BOOKMARK
+is nil, raise an error.
+
+To yank words from the text of the buffer and use them as part of the
+bookmark name, type C-w while setting a bookmark.  Successive C-w's
+yank successive words.
+
+Typing C-u inserts (at the bookmark name prompt) the name of the last
+bookmark used in the document where the new bookmark is being set;
+this helps you use a single bookmark name to track progress through a
+large document.  If there is no prior bookmark for this document, then
+C-u inserts an appropriate name based on the buffer or file.
+
+Use \\[bookmark-delete] to remove bookmarks (you give it a name and
+it removes only the first instance of a bookmark with that name from
+the list of bookmarks.)"
+  (interactive (list nil current-prefix-arg))
+  (bookmark-set-internal "Set bookmark" name (if push-bookmark 'push nil)))
+
+
 (defun bookmark-kill-line (&optional newline-too)
   "Kill from point to end of line.
 If optional arg NEWLINE-TOO is non-nil, delete the newline too.
diff --git a/lisp/calc/calc-aent.el b/lisp/calc/calc-aent.el
index f4754c7..3cc9d69 100644
--- a/lisp/calc/calc-aent.el
+++ b/lisp/calc/calc-aent.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc.
 
 ;; Author: Dave Gillespie <address@hidden>
-;; Maintainer: Jay Belanger <address@hidden>
 
 ;; This file is part of GNU Emacs.
 
diff --git a/lisp/calc/calc-alg.el b/lisp/calc/calc-alg.el
index ebc5ba6..b163992 100644
--- a/lisp/calc/calc-alg.el
+++ b/lisp/calc/calc-alg.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <address@hidden>
-;; Maintainer: Jay Belanger  <address@hidden>
 
 ;; This file is part of GNU Emacs.
 
diff --git a/lisp/calc/calc-arith.el b/lisp/calc/calc-arith.el
index de27c56..12cc5d3 100644
--- a/lisp/calc/calc-arith.el
+++ b/lisp/calc/calc-arith.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <address@hidden>
-;; Maintainer: Jay Belanger <address@hidden>
 
 ;; This file is part of GNU Emacs.
 
diff --git a/lisp/calc/calc-bin.el b/lisp/calc/calc-bin.el
index 9a1e524..b22aea1 100644
--- a/lisp/calc/calc-bin.el
+++ b/lisp/calc/calc-bin.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <address@hidden>
-;; Maintainer: Jay Belanger <address@hidden>
 
 ;; This file is part of GNU Emacs.
 
diff --git a/lisp/calc/calc-comb.el b/lisp/calc/calc-comb.el
index 4e52a3b..5faa1a3 100644
--- a/lisp/calc/calc-comb.el
+++ b/lisp/calc/calc-comb.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <address@hidden>
-;; Maintainer: Jay Belanger <address@hidden>
 
 ;; This file is part of GNU Emacs.
 
diff --git a/lisp/calc/calc-cplx.el b/lisp/calc/calc-cplx.el
index edcd3c2..1b99d56 100644
--- a/lisp/calc/calc-cplx.el
+++ b/lisp/calc/calc-cplx.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <address@hidden>
-;; Maintainer: Jay Belanger <address@hidden>
 
 ;; This file is part of GNU Emacs.
 
diff --git a/lisp/calc/calc-embed.el b/lisp/calc/calc-embed.el
index d0efe53..fe23408 100644
--- a/lisp/calc/calc-embed.el
+++ b/lisp/calc/calc-embed.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <address@hidden>
-;; Maintainer: Jay Belanger <address@hidden>
 
 ;; This file is part of GNU Emacs.
 
diff --git a/lisp/calc/calc-ext.el b/lisp/calc/calc-ext.el
index 9adf66f..6edc266 100644
--- a/lisp/calc/calc-ext.el
+++ b/lisp/calc/calc-ext.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <address@hidden>
-;; Maintainer: Jay Belanger <address@hidden>
 
 ;; This file is part of GNU Emacs.
 
diff --git a/lisp/calc/calc-fin.el b/lisp/calc/calc-fin.el
index 76c34e6..a31859d 100644
--- a/lisp/calc/calc-fin.el
+++ b/lisp/calc/calc-fin.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <address@hidden>
-;; Maintainer: Jay Belanger <address@hidden>
 
 ;; This file is part of GNU Emacs.
 
diff --git a/lisp/calc/calc-forms.el b/lisp/calc/calc-forms.el
index 08fa5ce..63674a1 100644
--- a/lisp/calc/calc-forms.el
+++ b/lisp/calc/calc-forms.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <address@hidden>
-;; Maintainer: Jay Belanger <address@hidden>
 
 ;; This file is part of GNU Emacs.
 
diff --git a/lisp/calc/calc-frac.el b/lisp/calc/calc-frac.el
index 830bafe..ddf6762 100644
--- a/lisp/calc/calc-frac.el
+++ b/lisp/calc/calc-frac.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <address@hidden>
-;; Maintainer: Jay Belanger <address@hidden>
 
 ;; This file is part of GNU Emacs.
 
diff --git a/lisp/calc/calc-funcs.el b/lisp/calc/calc-funcs.el
index 51922c8..b96cbd5 100644
--- a/lisp/calc/calc-funcs.el
+++ b/lisp/calc/calc-funcs.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <address@hidden>
-;; Maintainer: Jay Belanger <address@hidden>
 
 ;; This file is part of GNU Emacs.
 
diff --git a/lisp/calc/calc-graph.el b/lisp/calc/calc-graph.el
index 20b0249..4ae6ec5 100644
--- a/lisp/calc/calc-graph.el
+++ b/lisp/calc/calc-graph.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <address@hidden>
-;; Maintainer: Jay Belanger <address@hidden>
 
 ;; This file is part of GNU Emacs.
 
diff --git a/lisp/calc/calc-help.el b/lisp/calc/calc-help.el
index 33cb1c1..36e09b9 100644
--- a/lisp/calc/calc-help.el
+++ b/lisp/calc/calc-help.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <address@hidden>
-;; Maintainer: Jay Belanger <address@hidden>
 
 ;; This file is part of GNU Emacs.
 
diff --git a/lisp/calc/calc-incom.el b/lisp/calc/calc-incom.el
index b2856b9..14de2ca 100644
--- a/lisp/calc/calc-incom.el
+++ b/lisp/calc/calc-incom.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <address@hidden>
-;; Maintainer: Jay Belanger <address@hidden>
 
 ;; This file is part of GNU Emacs.
 
diff --git a/lisp/calc/calc-keypd.el b/lisp/calc/calc-keypd.el
index 18e900d..6980cd6 100644
--- a/lisp/calc/calc-keypd.el
+++ b/lisp/calc/calc-keypd.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <address@hidden>
-;; Maintainer: Jay Belanger <address@hidden>
 
 ;; This file is part of GNU Emacs.
 
diff --git a/lisp/calc/calc-lang.el b/lisp/calc/calc-lang.el
index 9436606..4b1c4f5 100644
--- a/lisp/calc/calc-lang.el
+++ b/lisp/calc/calc-lang.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <address@hidden>
-;; Maintainer: Jay Belanger <address@hidden>
 
 ;; This file is part of GNU Emacs.
 
diff --git a/lisp/calc/calc-macs.el b/lisp/calc/calc-macs.el
index 9730d30..e6bc2de 100644
--- a/lisp/calc/calc-macs.el
+++ b/lisp/calc/calc-macs.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <address@hidden>
-;; Maintainer: Jay Belanger <address@hidden>
 
 ;; This file is part of GNU Emacs.
 
diff --git a/lisp/calc/calc-map.el b/lisp/calc/calc-map.el
index d2c9da8..9bf391a 100644
--- a/lisp/calc/calc-map.el
+++ b/lisp/calc/calc-map.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <address@hidden>
-;; Maintainer: Jay Belanger <address@hidden>
 
 ;; This file is part of GNU Emacs.
 
diff --git a/lisp/calc/calc-math.el b/lisp/calc/calc-math.el
index e7d073a..5e6c14a 100644
--- a/lisp/calc/calc-math.el
+++ b/lisp/calc/calc-math.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <address@hidden>
-;; Maintainer: Jay Belanger <address@hidden>
 
 ;; This file is part of GNU Emacs.
 
diff --git a/lisp/calc/calc-menu.el b/lisp/calc/calc-menu.el
index 8610090..4a3ad87 100644
--- a/lisp/calc/calc-menu.el
+++ b/lisp/calc/calc-menu.el
@@ -2,8 +2,6 @@
 
 ;; Copyright (C) 2007-2015 Free Software Foundation, Inc.
 
-;; Maintainer: Jay Belanger <address@hidden>
-
 ;; This file is part of GNU Emacs.
 
 ;; GNU Emacs is free software: you can redistribute it and/or modify
diff --git a/lisp/calc/calc-misc.el b/lisp/calc/calc-misc.el
index aa0ccb7..6acda2b 100644
--- a/lisp/calc/calc-misc.el
+++ b/lisp/calc/calc-misc.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <address@hidden>
-;; Maintainer: Jay Belanger <address@hidden>
 
 ;; This file is part of GNU Emacs.
 
diff --git a/lisp/calc/calc-mode.el b/lisp/calc/calc-mode.el
index 3ed9612..6c986b2 100644
--- a/lisp/calc/calc-mode.el
+++ b/lisp/calc/calc-mode.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <address@hidden>
-;; Maintainer: Jay Belanger <address@hidden>
 
 ;; This file is part of GNU Emacs.
 
diff --git a/lisp/calc/calc-mtx.el b/lisp/calc/calc-mtx.el
index b8c5ff9..75e33ca 100644
--- a/lisp/calc/calc-mtx.el
+++ b/lisp/calc/calc-mtx.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <address@hidden>
-;; Maintainer: Jay Belanger <address@hidden>
 
 ;; This file is part of GNU Emacs.
 
diff --git a/lisp/calc/calc-nlfit.el b/lisp/calc/calc-nlfit.el
index 8e0eb73..41dc8f4 100644
--- a/lisp/calc/calc-nlfit.el
+++ b/lisp/calc/calc-nlfit.el
@@ -2,8 +2,6 @@
 
 ;; Copyright (C) 2007-2015 Free Software Foundation, Inc.
 
-;; Maintainer: Jay Belanger <address@hidden>
-
 ;; This file is part of GNU Emacs.
 
 ;; GNU Emacs is free software: you can redistribute it and/or modify
diff --git a/lisp/calc/calc-poly.el b/lisp/calc/calc-poly.el
index 1dab3c4..bd9a9f9 100644
--- a/lisp/calc/calc-poly.el
+++ b/lisp/calc/calc-poly.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <address@hidden>
-;; Maintainer: Jay Belanger <address@hidden>
 
 ;; This file is part of GNU Emacs.
 
diff --git a/lisp/calc/calc-prog.el b/lisp/calc/calc-prog.el
index 8d97bc6..0d55823 100644
--- a/lisp/calc/calc-prog.el
+++ b/lisp/calc/calc-prog.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <address@hidden>
-;; Maintainer: Jay Belanger <address@hidden>
 
 ;; This file is part of GNU Emacs.
 
diff --git a/lisp/calc/calc-rewr.el b/lisp/calc/calc-rewr.el
index e57a6b4..4ab0f44 100644
--- a/lisp/calc/calc-rewr.el
+++ b/lisp/calc/calc-rewr.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <address@hidden>
-;; Maintainer: Jay Belanger <address@hidden>
 
 ;; This file is part of GNU Emacs.
 
diff --git a/lisp/calc/calc-rules.el b/lisp/calc/calc-rules.el
index 4489f66..c4e2f2b 100644
--- a/lisp/calc/calc-rules.el
+++ b/lisp/calc/calc-rules.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <address@hidden>
-;; Maintainer: Jay Belanger <address@hidden>
 
 ;; This file is part of GNU Emacs.
 
diff --git a/lisp/calc/calc-sel.el b/lisp/calc/calc-sel.el
index ec104ee..8130bae 100644
--- a/lisp/calc/calc-sel.el
+++ b/lisp/calc/calc-sel.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <address@hidden>
-;; Maintainer: Jay Belanger <address@hidden>
 
 ;; This file is part of GNU Emacs.
 
diff --git a/lisp/calc/calc-stat.el b/lisp/calc/calc-stat.el
index a797db2..b9b8028 100644
--- a/lisp/calc/calc-stat.el
+++ b/lisp/calc/calc-stat.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <address@hidden>
-;; Maintainer: Jay Belanger <address@hidden>
 
 ;; This file is part of GNU Emacs.
 
diff --git a/lisp/calc/calc-store.el b/lisp/calc/calc-store.el
index 2684e62..fa2bf07 100644
--- a/lisp/calc/calc-store.el
+++ b/lisp/calc/calc-store.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <address@hidden>
-;; Maintainer: Jay Belanger <address@hidden>
 
 ;; This file is part of GNU Emacs.
 
diff --git a/lisp/calc/calc-stuff.el b/lisp/calc/calc-stuff.el
index 91ef259a..81be0b8 100644
--- a/lisp/calc/calc-stuff.el
+++ b/lisp/calc/calc-stuff.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <address@hidden>
-;; Maintainer: Jay Belanger <address@hidden>
 
 ;; This file is part of GNU Emacs.
 
diff --git a/lisp/calc/calc-trail.el b/lisp/calc/calc-trail.el
index 9417f7f..441c122 100644
--- a/lisp/calc/calc-trail.el
+++ b/lisp/calc/calc-trail.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <address@hidden>
-;; Maintainer: Jay Belanger <address@hidden>
 
 ;; This file is part of GNU Emacs.
 
diff --git a/lisp/calc/calc-undo.el b/lisp/calc/calc-undo.el
index 28c1679..6d4473c 100644
--- a/lisp/calc/calc-undo.el
+++ b/lisp/calc/calc-undo.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <address@hidden>
-;; Maintainer: Jay Belanger <address@hidden>
 
 ;; This file is part of GNU Emacs.
 
diff --git a/lisp/calc/calc-units.el b/lisp/calc/calc-units.el
index a450d8f..403f008 100644
--- a/lisp/calc/calc-units.el
+++ b/lisp/calc/calc-units.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <address@hidden>
-;; Maintainer: Jay Belanger <address@hidden>
 
 ;; This file is part of GNU Emacs.
 
diff --git a/lisp/calc/calc-vec.el b/lisp/calc/calc-vec.el
index cd15770..61bcb41 100644
--- a/lisp/calc/calc-vec.el
+++ b/lisp/calc/calc-vec.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <address@hidden>
-;; Maintainer: Jay Belanger <address@hidden>
 
 ;; This file is part of GNU Emacs.
 
diff --git a/lisp/calc/calc-yank.el b/lisp/calc/calc-yank.el
index 5105ba9..37efadd 100644
--- a/lisp/calc/calc-yank.el
+++ b/lisp/calc/calc-yank.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <address@hidden>
-;; Maintainer: Jay Belanger <address@hidden>
 
 ;; This file is part of GNU Emacs.
 
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el
index e44226d..07ea4fc 100644
--- a/lisp/calc/calc.el
+++ b/lisp/calc/calc.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <address@hidden>
-;; Maintainer: Jay Belanger <address@hidden>
 ;; Keywords: convenience, extensions
 
 ;; This file is part of GNU Emacs.
@@ -487,7 +486,7 @@ to be identified as that note."
   "Face used to show the selected portion of a formula."
   :group 'calc)
 
-(defvar calc-bug-address "address@hidden"
+(defvar calc-bug-address "address@hidden"
   "Address of the maintainer of Calc, for use by `report-calc-bug'.")
 
 (defvar calc-scan-for-dels t
diff --git a/lisp/calc/calcalg2.el b/lisp/calc/calcalg2.el
index 55064a3..23c972c 100644
--- a/lisp/calc/calcalg2.el
+++ b/lisp/calc/calcalg2.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <address@hidden>
-;; Maintainer: Jay Belanger <address@hidden>
 
 ;; This file is part of GNU Emacs.
 
diff --git a/lisp/calc/calcalg3.el b/lisp/calc/calcalg3.el
index 957f120..a9c8eef 100644
--- a/lisp/calc/calcalg3.el
+++ b/lisp/calc/calcalg3.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <address@hidden>
-;; Maintainer: Jay Belanger <address@hidden>
 
 ;; This file is part of GNU Emacs.
 
diff --git a/lisp/calc/calccomp.el b/lisp/calc/calccomp.el
index 119f419..81a035d 100644
--- a/lisp/calc/calccomp.el
+++ b/lisp/calc/calccomp.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <address@hidden>
-;; Maintainer: Jay Belanger <address@hidden>
 
 ;; This file is part of GNU Emacs.
 
diff --git a/lisp/calc/calcsel2.el b/lisp/calc/calcsel2.el
index ace2684..df86e2d 100644
--- a/lisp/calc/calcsel2.el
+++ b/lisp/calc/calcsel2.el
@@ -3,7 +3,6 @@
 ;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <address@hidden>
-;; Maintainer: Jay Belanger <address@hidden>
 
 ;; This file is part of GNU Emacs.
 
diff --git a/lisp/character-fold.el b/lisp/character-fold.el
index 223a2cd..0e156c5 100644
--- a/lisp/character-fold.el
+++ b/lisp/character-fold.el
@@ -157,4 +157,6 @@ BOUND NOERROR COUNT are passed to `re-search-backward'."
   (interactive "sSearch: ")
   (re-search-backward (character-fold-to-regexp string) bound noerror count))
 
+(provide 'character-fold)
+
 ;;; character-fold.el ends here
diff --git a/lisp/dired.el b/lisp/dired.el
index c3cad0c..9ec39af 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -1542,7 +1542,8 @@ Do so according to the former subdir alist 
OLD-SUBDIR-ALIST."
     (define-key map "<" 'dired-prev-dirline)
     (define-key map ">" 'dired-next-dirline)
     (define-key map "^" 'dired-up-directory)
-    (define-key map " "  'dired-next-line)
+    (define-key map " " 'dired-next-line)
+    (define-key map [?\S-\ ] 'dired-previous-line)
     (define-key map [remap next-line] 'dired-next-line)
     (define-key map [remap previous-line] 'dired-previous-line)
     ;; hiding
@@ -2031,7 +2032,7 @@ Otherwise, toggle `read-only-mode'."
 (defun dired-next-line (arg)
   "Move down lines then position at filename.
 Optional prefix ARG says how many lines to move; default is one line."
-  (interactive "p")
+  (interactive "^p")
   (let ((line-move-visual)
        (goal-column))
     (line-move arg t))
@@ -2044,7 +2045,7 @@ Optional prefix ARG says how many lines to move; default 
is one line."
 (defun dired-previous-line (arg)
   "Move up lines then position at filename.
 Optional prefix ARG says how many lines to move; default is one line."
-  (interactive "p")
+  (interactive "^p")
   (dired-next-line (- (or arg 1))))
 
 (defun dired-next-dirline (arg &optional opoint)
@@ -3495,6 +3496,9 @@ OLD and NEW are both characters used to mark files."
   (interactive)
   (dired-unmark-all-files ?\r))
 
+;; Bound in dired-unmark-all-files
+(defvar dired-unmark-all-files-query)
+
 (defun dired-unmark-all-files (mark &optional arg)
   "Remove a specific mark (or any mark) from every file.
 After this command, type the mark character to remove,
@@ -3505,6 +3509,7 @@ Type \\[help-command] at that time for help."
   (save-excursion
     (let* ((count 0)
           (inhibit-read-only t) case-fold-search
+           dired-unmark-all-files-query
           (string (format "\n%c" mark))
           (help-form "\
 Type SPC or `y' to unmark one file, DEL or `n' to skip to next,
@@ -3516,7 +3521,8 @@ Type SPC or `y' to unmark one file, DEL or `n' to skip to 
next,
        (if (or (not arg)
                (let ((file (dired-get-filename t t)))
                  (and file
-                      (dired-query 'query "Unmark file `%s'? "
+                      (dired-query 'dired-unmark-all-files-query
+                                   "Unmark file `%s'? "
                                    file))))
            (progn (subst-char-in-region (1- (point)) (point)
                                         (preceding-char) ?\s)
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index d138eff..db200f3 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -1901,7 +1901,10 @@ With argument ARG, insert value in current buffer after 
the form."
                   (let ((read-with-symbol-positions (current-buffer))
                         (read-symbol-positions-list nil))
                     (displaying-byte-compile-warnings
-                     (byte-compile-sexp (read (current-buffer)))))
+                     (byte-compile-sexp
+                       (eval-sexp-add-defvars
+                        (read (current-buffer))
+                        byte-compile-read-position))))
                    lexical-binding)))
       (cond (arg
             (message "Compiling from buffer... done.")
diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el
index dd01ebe..9e6102c 100644
--- a/lisp/emacs-lisp/cl-generic.el
+++ b/lisp/emacs-lisp/cl-generic.el
@@ -80,7 +80,7 @@
 
 ;; TODO:
 ;;
-;; - A generic "filter" generalizer (e.g. could be used to cleanly adds methods
+;; - A generic "filter" generalizer (e.g. could be used to cleanly add methods
 ;;   to cl-generic-combine-methods with a specializer that says it applies only
 ;;   when some particular qualifier is used).
 ;; - A way to dispatch on the context (e.g. the major-mode, some global
@@ -101,14 +101,33 @@
 (cl-defstruct (cl--generic-generalizer
                (:constructor nil)
                (:constructor cl-generic-make-generalizer
-                (priority tagcode-function specializers-function)))
+                (name priority tagcode-function specializers-function)))
+  (name nil :type string)
   (priority nil :type integer)
   tagcode-function
   specializers-function)
 
-(defconst cl--generic-t-generalizer
-  (cl-generic-make-generalizer
-   0 (lambda (_name) nil) (lambda (_tag) '(t))))
+
+(defmacro cl-generic-define-generalizer
+    (name priority tagcode-function specializers-function)
+  "Define a new kind of generalizer.
+NAME is the name of the variable that will hold it.
+PRIORITY defines which generalizer takes precedence.
+  The catch-all generalizer has priority 0.
+  Then `eql' generalizer has priority 100.
+TAGCODE-FUNCTION takes as first argument a varname and should return
+  a chunk of code that computes the tag of the value held in that variable.
+  Further arguments are reserved for future use.
+SPECIALIZERS-FUNCTION takes as first argument a tag value TAG
+  and should return a list of specializers that match TAG.
+  Further arguments are reserved for future use."
+  (declare (indent 1) (debug (symbolp body)))
+  `(defconst ,name
+     (cl-generic-make-generalizer
+      ',name ,priority ,tagcode-function ,specializers-function)))
+
+(cl-generic-define-generalizer cl--generic-t-generalizer
+   0 (lambda (_name &rest _) nil) (lambda (_tag &rest _) '(t)))
 
 (cl-defstruct (cl--generic-method
                (:constructor nil)
@@ -144,16 +163,18 @@
 (defmacro cl--generic (name)
   `(get ,name 'cl--generic))
 
-(defun cl-generic-ensure-function (name)
+(defun cl-generic-ensure-function (name &optional noerror)
   (let (generic
         (origname name))
     (while (and (null (setq generic (cl--generic name)))
                 (fboundp name)
+                (null noerror)
                 (symbolp (symbol-function name)))
       (setq name (symbol-function name)))
     (unless (or (not (fboundp name))
                 (autoloadp (symbol-function name))
-                (and (functionp name) generic))
+                (and (functionp name) generic)
+                noerror)
       (error "%s is already defined as something else than a generic function"
              origname))
     (if generic
@@ -220,7 +241,7 @@ BODY, if present, is used as the body of a default method.
 
 ;;;###autoload
 (defun cl-generic-define (name args options)
-  (pcase-let* ((generic (cl-generic-ensure-function name))
+  (pcase-let* ((generic (cl-generic-ensure-function name 'noerror))
                (`(,spec-args . ,_) (cl--generic-split-args args))
                (mandatory (mapcar #'car spec-args))
                (apo (assq :argument-precedence-order options)))
@@ -245,6 +266,15 @@ BODY, if present, is used as the body of a default method.
 This macro can only be used within the lexical scope of a cl-generic method."
   (error "cl-generic-current-method-specializers used outside of a method"))
 
+(defmacro cl-generic-define-context-rewriter (name args &rest body)
+  "Define a special kind of context named NAME.
+Whenever a context specializer of the form (NAME . ARGS) appears,
+the specializer used will be the one returned by BODY."
+  (declare (debug (&define name lambda-list def-body)) (indent defun))
+  `(eval-and-compile
+     (put ',name 'cl-generic--context-rewriter
+          (lambda ,args ,@body))))
+
 (eval-and-compile         ;Needed while compiling the cl-defmethod calls below!
   (defun cl--generic-fgrep (vars sexp)    ;Copied from pcase.el.
     "Check which of the symbols VARS appear in SEXP."
@@ -271,6 +301,11 @@ This macro can only be used within the lexical scope of a 
cl-generic method."
                 ((let 'context mandatory)
                  (unless (consp arg)
                    (error "Invalid &context arg: %S" arg))
+                 (let* ((name (car arg))
+                        (rewriter
+                         (and (symbolp name)
+                              (get name 'cl-generic--context-rewriter))))
+                   (if rewriter (setq arg (apply rewriter (cdr arg)))))
                  (push `((&context . ,(car arg)) . ,(cadr arg)) specializers)
                  nil)
                 (`(,name . ,type)
@@ -418,8 +453,12 @@ which case this method will be invoked when the argument 
is `eql' to VAL.
         (setq i (1+ i))))
     ;; We used to (setcar me method), but that can cause false positives in
     ;; the hash-consing table of the method-builder (bug#20644).
-    ;; See the related FIXME in cl--generic-build-combined-method.
-    (setf (cl--generic-method-table generic) (cons method (delq (car me) mt)))
+    ;; See also the related FIXME in cl--generic-build-combined-method.
+    (setf (cl--generic-method-table generic)
+          (if (null me)
+              (cons method mt)
+            ;; Keep the ordering; important for methods with :extra qualifiers.
+            (mapcar (lambda (x) (if (eq x (car me)) method x)) mt)))
     (cl-pushnew `(cl-defmethod . (,(cl--generic-name generic) . ,specializers))
                 current-load-list :test #'equal)
     ;; FIXME: Try to avoid re-constructing a new function if the old one
@@ -623,16 +662,19 @@ FUN is the function that should be called when METHOD 
calls
           (setq fun (cl-generic-call-method generic method fun)))
         fun)))))
 
+(defun cl--generic-arg-specializer (method dispatch-arg)
+  (or (if (integerp dispatch-arg)
+          (nth dispatch-arg
+               (cl--generic-method-specializers method))
+        (cdr (assoc dispatch-arg
+                    (cl--generic-method-specializers method))))
+      t))
+
 (defun cl--generic-cache-miss (generic
                                dispatch-arg dispatches-left methods-left types)
   (let ((methods '()))
     (dolist (method methods-left)
-      (let* ((specializer (or (if (integerp dispatch-arg)
-                                  (nth dispatch-arg
-                                       (cl--generic-method-specializers 
method))
-                                (cdr (assoc dispatch-arg
-                                            (cl--generic-method-specializers 
method))))
-                              t))
+      (let* ((specializer (cl--generic-arg-specializer method dispatch-arg))
              (m (member specializer types)))
         (when m
           (push (cons (length m) method) methods))))
@@ -682,10 +724,12 @@ The METHODS list is sorted from most specific first to 
most generic last.
 The function can use `cl-generic-call-method' to create functions that call 
those
 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)
+(unless (ignore-errors (cl-generic-generalizers t))
+  ;; Temporary definition to let the next defmethod succeed.
+  (fset 'cl-generic-generalizers
+        (lambda (specializer)
+          (if (eq t specializer) (list cl--generic-t-generalizer))))
+  (fset 'cl-generic-combine-methods #'cl--generic-standard-method-combination))
 
 (cl-defmethod cl-generic-generalizers (specializer)
   "Support for the catch-all t specializer."
@@ -940,10 +984,9 @@ The value returned is a list of elements of the form
 
 (defvar cl--generic-head-used (make-hash-table :test #'eql))
 
-(defconst cl--generic-head-generalizer
-  (cl-generic-make-generalizer
-   80 (lambda (name) `(gethash (car-safe ,name) cl--generic-head-used))
-   (lambda (tag) (if (eq (car-safe tag) 'head) (list tag)))))
+(cl-generic-define-generalizer cl--generic-head-generalizer
+  80 (lambda (name &rest _) `(gethash (car-safe ,name) cl--generic-head-used))
+  (lambda (tag &rest _) (if (eq (car-safe tag) 'head) (list tag))))
 
 (cl-defmethod cl-generic-generalizers :extra "head" (specializer)
   "Support for the `(head VAL)' specializers."
@@ -961,10 +1004,9 @@ The value returned is a list of elements of the form
 
 (defvar cl--generic-eql-used (make-hash-table :test #'eql))
 
-(defconst cl--generic-eql-generalizer
-  (cl-generic-make-generalizer
-   100 (lambda (name) `(gethash ,name cl--generic-eql-used))
-   (lambda (tag) (if (eq (car-safe tag) 'eql) (list tag)))))
+(cl-generic-define-generalizer cl--generic-eql-generalizer
+  100 (lambda (name &rest _) `(gethash ,name cl--generic-eql-used))
+  (lambda (tag &rest _) (if (eq (car-safe tag) 'eql) (list tag))))
 
 (cl-defmethod cl-generic-generalizers ((specializer (head eql)))
   "Support for the `(eql VAL)' specializers."
@@ -976,7 +1018,7 @@ The value returned is a list of elements of the form
 
 ;;; Support for cl-defstructs specializers.
 
-(defun cl--generic-struct-tag (name)
+(defun cl--generic-struct-tag (name &rest _)
   ;; It's tempting to use (and (vectorp ,name) (aref ,name 0))
   ;; but that would suffer from some problems:
   ;; - the vector may have size 0.
@@ -1007,16 +1049,15 @@ The value returned is a list of elements of the form
                            (cl--class-parents class)))))
     (nreverse parents)))
 
-(defun cl--generic-struct-specializers (tag)
+(defun cl--generic-struct-specializers (tag &rest _)
   (and (symbolp tag) (boundp tag)
        (let ((class (symbol-value tag)))
          (when (cl-typep class 'cl-structure-class)
            (cl--generic-class-parents class)))))
 
-(defconst cl--generic-struct-generalizer
-  (cl-generic-make-generalizer
-   50 #'cl--generic-struct-tag
-   #'cl--generic-struct-specializers))
+(cl-generic-define-generalizer cl--generic-struct-generalizer
+  50 #'cl--generic-struct-tag
+  #'cl--generic-struct-specializers)
 
 (cl-defmethod cl-generic-generalizers :extra "cl-struct" (type)
   "Support for dispatch on cl-struct types."
@@ -1056,11 +1097,11 @@ The value returned is a list of elements of the form
     (sequence)
     (number)))
 
-(defconst cl--generic-typeof-generalizer
-  (cl-generic-make-generalizer
-   ;; FIXME: We could also change `type-of' to return `null' for nil.
-   10 (lambda (name) `(if ,name (type-of ,name) 'null))
-   (lambda (tag) (and (symbolp tag) (assq tag cl--generic-typeof-types)))))
+(cl-generic-define-generalizer cl--generic-typeof-generalizer
+  ;; FIXME: We could also change `type-of' to return `null' for nil.
+  10 (lambda (name &rest _) `(if ,name (type-of ,name) 'null))
+  (lambda (tag &rest _)
+    (and (symbolp tag) (assq tag cl--generic-typeof-types))))
 
 (cl-defmethod cl-generic-generalizers :extra "typeof" (type)
   "Support for dispatch on builtin types."
@@ -1079,6 +1120,37 @@ The value returned is a list of elements of the form
 
 (cl--generic-prefill-dispatchers 0 integer)
 
+;;; Dispatch on major mode.
+
+;; Two parts:
+;; - first define a specializer (derived-mode <mode>) to match symbols
+;;   representing major modes, while obeying the major mode hierarchy.
+;; - then define a context-rewriter so you can write
+;;   "&context (major-mode c-mode)" rather than
+;;   "&context (major-mode (derived-mode c-mode))".
+
+(defun cl--generic-derived-specializers (mode &rest _)
+  ;; FIXME: Handle (derived-mode <mode1> ... <modeN>)
+  (let ((specializers ()))
+    (while mode
+      (push `(derived-mode ,mode) specializers)
+      (setq mode (get mode 'derived-mode-parent)))
+    (nreverse specializers)))
+
+(cl-generic-define-generalizer cl--generic-derived-generalizer
+  90 (lambda (name) `(and (symbolp ,name) (functionp ,name) ,name))
+  #'cl--generic-derived-specializers)
+
+(cl-defmethod cl-generic-generalizers ((_specializer (head derived-mode)))
+  "Support for the `(derived-mode MODE)' specializers."
+  (list cl--generic-derived-generalizer))
+
+(cl-generic-define-context-rewriter major-mode (mode &rest modes)
+  `(major-mode ,(if (consp mode)
+                    ;;E.g. could be (eql ...)
+                    (progn (cl-assert (null modes)) mode)
+                  `(derived-mode ,mode . ,modes))))
+
 ;; Local variables:
 ;; generated-autoload-file: "cl-loaddefs.el"
 ;; End:
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index c42094f..80f0cd7 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -2730,7 +2730,7 @@ non-nil value, that slot cannot be set via `setf'.
                            slots defaults)))
        (push `(cl-defsubst ,cname
                    (&cl-defs (nil ,@descs) ,@args)
-                 ,(if (stringp doc) (list doc)
+                 ,(if (stringp doc) doc
                     (format "Constructor for objects of type `%s'." name))
                  ,@(if (cl--safe-expr-p `(progn ,@(mapcar #'cl-second descs)))
                        '((declare (side-effect-free t))))
diff --git a/lisp/emacs-lisp/cl-seq.el b/lisp/emacs-lisp/cl-seq.el
index 3aea67a..5f0f088 100644
--- a/lisp/emacs-lisp/cl-seq.el
+++ b/lisp/emacs-lisp/cl-seq.el
@@ -849,7 +849,7 @@ to avoid corrupting the original LIST1 and LIST2.
                (memq (car cl-list1) cl-list2))
              (push (car cl-list1) cl-res))
          (pop cl-list1))
-       cl-res))))
+        (nreverse cl-res)))))
 
 ;;;###autoload
 (defun cl-nset-difference (cl-list1 cl-list2 &rest cl-keys)
diff --git a/lisp/emacs-lisp/cursor-sensor.el b/lisp/emacs-lisp/cursor-sensor.el
index 1d1780b..2fc7a0d 100644
--- a/lisp/emacs-lisp/cursor-sensor.el
+++ b/lisp/emacs-lisp/cursor-sensor.el
@@ -113,7 +113,7 @@
            ;; non-sticky on both ends, but that means get-pos-property might
            ;; never see it.
            (new (or (get-char-property point 'cursor-sensor-functions)
-                    (unless (bobp)
+                    (unless (= point 1)
                       (get-char-property (1- point) 
'cursor-sensor-functions))))
            (old (window-parameter window 'cursor-sensor--last-state))
            (oldposmark (car old))
diff --git a/lisp/emacs-lisp/eieio-compat.el b/lisp/emacs-lisp/eieio-compat.el
index 386ff2f..06e65b9 100644
--- a/lisp/emacs-lisp/eieio-compat.el
+++ b/lisp/emacs-lisp/eieio-compat.el
@@ -124,7 +124,7 @@ Summary:
        (defgeneric ,method ,args)
        (eieio--defmethod ',method ',key ',class #',code))))
 
-(defun eieio--generic-static-symbol-specializers (tag)
+(defun eieio--generic-static-symbol-specializers (tag &rest _)
   (cl-assert (or (null tag) (eieio--class-p tag)))
   (when (eieio--class-p tag)
     (let ((superclasses (eieio--generic-subclass-specializers tag))
@@ -134,27 +134,25 @@ Summary:
        (push `(eieio--static ,(cadr superclass)) specializers))
       (nreverse specializers))))
 
-(defconst eieio--generic-static-symbol-generalizer
-  (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) (cl--find-class ,name)))
-   #'eieio--generic-static-symbol-specializers))
-(defconst eieio--generic-static-object-generalizer
-  (cl-generic-make-generalizer
-   ;; Give it a slightly higher priority than `class' so that the
-   ;; interleaved list comes before the class's non-interleaved list.
-   51 #'cl--generic-struct-tag
-   (lambda (tag)
-     (and (symbolp tag) (boundp tag) (setq tag (symbol-value tag))
-          (eieio--class-p tag)
-          (let ((superclasses (eieio--class-precedence-list tag))
-                (specializers ()))
-            (dolist (superclass superclasses)
-              (setq superclass (eieio--class-name superclass))
-              (push superclass specializers)
-              (push `(eieio--static ,superclass) specializers))
-            (nreverse specializers))))))
+(cl-generic-define-generalizer eieio--generic-static-symbol-generalizer
+  ;; Give it a slightly higher priority than `subclass' so that the
+  ;; interleaved list comes before subclass's non-interleaved list.
+  61 (lambda (name &rest _) `(and (symbolp ,name) (cl--find-class ,name)))
+  #'eieio--generic-static-symbol-specializers)
+(cl-generic-define-generalizer eieio--generic-static-object-generalizer
+  ;; Give it a slightly higher priority than `class' so that the
+  ;; interleaved list comes before the class's non-interleaved list.
+  51 #'cl--generic-struct-tag
+  (lambda (tag &rest _)
+    (and (symbolp tag) (boundp tag) (setq tag (symbol-value tag))
+         (eieio--class-p tag)
+         (let ((superclasses (eieio--class-precedence-list tag))
+               (specializers ()))
+           (dolist (superclass superclasses)
+             (setq superclass (eieio--class-name superclass))
+             (push superclass specializers)
+             (push `(eieio--static ,superclass) specializers))
+           (nreverse specializers)))))
 
 (cl-defmethod cl-generic-generalizers ((_specializer (head eieio--static)))
   (list eieio--generic-static-symbol-generalizer
diff --git a/lisp/emacs-lisp/eieio-core.el b/lisp/emacs-lisp/eieio-core.el
index e3f7b11..dcaaab6 100644
--- a/lisp/emacs-lisp/eieio-core.el
+++ b/lisp/emacs-lisp/eieio-core.el
@@ -1059,16 +1059,15 @@ method invocation orders of the involved classes."
 
 ;;;; General support to dispatch based on the type of the argument.
 
-(defconst eieio--generic-generalizer
-  (cl-generic-make-generalizer
-   ;; Use the exact same tagcode as for cl-struct, so that methods
-   ;; that dispatch on both kinds of objects get to share this
-   ;; part of the dispatch code.
-   50 #'cl--generic-struct-tag
-   (lambda (tag)
-        (and (symbolp tag) (boundp tag) (eieio--class-p (symbol-value tag))
-             (mapcar #'eieio--class-name
-                     (eieio--class-precedence-list (symbol-value tag)))))))
+(cl-generic-define-generalizer eieio--generic-generalizer
+  ;; Use the exact same tagcode as for cl-struct, so that methods
+  ;; that dispatch on both kinds of objects get to share this
+  ;; part of the dispatch code.
+  50 #'cl--generic-struct-tag
+  (lambda (tag &rest _)
+    (and (symbolp tag) (boundp tag) (eieio--class-p (symbol-value tag))
+         (mapcar #'eieio--class-name
+                 (eieio--class-precedence-list (symbol-value tag))))))
 
 (cl-defmethod cl-generic-generalizers :extra "class" (specializer)
   ;; CLHS says:
@@ -1088,22 +1087,21 @@ method invocation orders of the involved classes."
 ;; would not make much sense (e.g. to which argument should it apply?).
 ;; Instead, we add a new "subclass" specializer.
 
-(defun eieio--generic-subclass-specializers (tag)
+(defun eieio--generic-subclass-specializers (tag &rest _)
   (when (eieio--class-p tag)
     (mapcar (lambda (class)
               `(subclass ,(eieio--class-name class)))
             (eieio--class-precedence-list tag))))
 
-(defconst eieio--generic-subclass-generalizer
-  (cl-generic-make-generalizer
-   60 (lambda (name) `(and (symbolp ,name) (cl--find-class ,name)))
-   #'eieio--generic-subclass-specializers))
+(cl-generic-define-generalizer eieio--generic-subclass-generalizer
+  60 (lambda (name &rest _) `(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" 
"ea8c7f24ed47c6b71ac37cbdae1c9931")
+;;;### (autoloads nil "eieio-compat" "eieio-compat.el" 
"11dd361fd4c1c625de90a39977936236")
 ;;; Generated autoloads from eieio-compat.el
 
 (autoload 'eieio--defalias "eieio-compat" "\
diff --git a/lisp/emacs-lisp/map.el b/lisp/emacs-lisp/map.el
index 5ef51f1..98a3565 100644
--- a/lisp/emacs-lisp/map.el
+++ b/lisp/emacs-lisp/map.el
@@ -58,7 +58,7 @@ unquoted form.
 
 ARGS can also be a list of symbols, which stands for ('SYMBOL
 SYMBOL)."
-  `(and (pred map-p)
+  `(and (pred mapp)
         ,@(map--make-pcase-bindings args)))
 
 (defmacro map-let (keys map &rest body)
@@ -155,7 +155,7 @@ MAP can be a list, hash-table or array."
 
 Map can be a nested map composed of alists, hash-tables and arrays."
   (or (seq-reduce (lambda (acc key)
-                    (when (map-p acc)
+                    (when (mapp acc)
                       (map-elt acc key)))
                   keys
                   map)
@@ -239,7 +239,7 @@ MAP can be a list, hash-table or array."
   (map-filter (lambda (key val) (not (funcall pred key val)))
               map))
 
-(defun map-p (map)
+(defun mapp (map)
   "Return non-nil if MAP is a map (list, hash-table or array)."
   (or (listp map)
       (hash-table-p map)
@@ -279,9 +279,9 @@ MAP can be a list, hash-table or array."
 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)
+              (or (funcall pred key value)
+                  (throw 'map--break nil)))
+            map)
     t))
 
 (defun map-merge (type &rest maps)
@@ -291,8 +291,23 @@ 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)))
+                (setf (map-elt result key) value))
+              (pop maps)))
+    (map-into result type)))
+
+(defun map-merge-with (type function &rest maps)
+  "Merge into a map of type TYPE all the key/value pairs in MAPS.
+When two maps contain the same key, call FUNCTION on the two
+values and use the value returned by it.
+MAP can be a list, hash-table or array."
+  (let (result)
+    (while maps
+      (map-apply (lambda (key value)
+                (setf (map-elt result key)
+                      (if (map-contains-key result key)
+                          (funcall function (map-elt result key) value)
+                        value)))
+              (pop maps)))
     (map-into result type)))
 
 (defun map-into (map type)
diff --git a/lisp/emacs-lisp/pcase.el b/lisp/emacs-lisp/pcase.el
index 8bcb447..bf6550d 100644
--- a/lisp/emacs-lisp/pcase.el
+++ b/lisp/emacs-lisp/pcase.el
@@ -107,7 +107,7 @@
 
 ;;;###autoload
 (defmacro pcase (exp &rest cases)
-  "Perform ML-style pattern matching on EXP.
+  "Eval EXP and perform ML-style pattern matching on that value.
 CASES is a list of elements of the form (PATTERN CODE...).
 
 Patterns can take the following forms:
@@ -115,7 +115,7 @@ Patterns can take the following forms:
   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
+  \\='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.
@@ -131,11 +131,11 @@ FUN can take the form
                         which is the value being matched.
 So a FUN of the form SYMBOL is equivalent to one of the form (FUN).
 FUN can refer to variables bound earlier in the pattern.
-FUN is assumed to be pure, i.e. it can be dropped if its result is not used,
-and two identical calls can be merged into one.
 E.g. you can match pairs where the cdr is larger than the car with a pattern
 like \\=`(,a . ,(pred (< a))) or, with more checks:
 \\=`(,(and a (pred numberp)) . ,(and (pred numberp) (pred (< a))))
+FUN is assumed to be pure, i.e. it can be dropped if its result is not used,
+and two identical calls can be merged into one.
 
 Additional patterns can be defined via `pcase-defmacro'.
 Currently, the following patterns are provided this way:"
diff --git a/lisp/emacs-lisp/seq.el b/lisp/emacs-lisp/seq.el
index 6826509..456efd0 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: 2.2
+;; Version: 2.3
 ;; Package: seq
 
 ;; Maintainer: address@hidden
@@ -46,7 +46,7 @@
 ;; - `seq-elt'
 ;; - `seq-length'
 ;; - `seq-do'
-;; - `seq-p'
+;; - `seqp'
 ;; - `seq-subseq'
 ;; - `seq-into-sequence'
 ;; - `seq-copy'
@@ -79,7 +79,7 @@ corresponding element of SEQUENCE.
 
 Extra elements of the sequence are ignored if fewer PATTERNS are
 given, and the match does not fail."
-  `(and (pred seq-p)
+  `(and (pred seqp)
         ,@(seq--make-pcase-bindings patterns)))
 
 (defmacro seq-let (args sequence &rest body)
@@ -117,7 +117,7 @@ Return SEQUENCE."
 
 (defalias 'seq-each #'seq-do)
 
-(cl-defgeneric seq-p (sequence)
+(cl-defgeneric seqp (sequence)
   "Return non-nil if SEQUENCE is a sequence, nil otherwise."
   (sequencep sequence))
 
@@ -433,7 +433,7 @@ SEQUENCE must be a sequence of numbers or markers."
   "Return a list of `(seq ...)' pcase patterns from the argument list ARGS."
   (cons 'seq
         (seq-map (lambda (elt)
-                   (if (seq-p elt)
+                   (if (seqp elt)
                        (seq--make-pcase-patterns elt)
                      elt))
                  args)))
diff --git a/lisp/emacs-lisp/smie.el b/lisp/emacs-lisp/smie.el
index f305025..738bddd 100644
--- a/lisp/emacs-lisp/smie.el
+++ b/lisp/emacs-lisp/smie.el
@@ -169,13 +169,13 @@
           (cl-incf smie-warning-count))
       (puthash key val table))))
 
-(put 'smie-precs->prec2 'pure t)
 (defun smie-precs->prec2 (precs)
   "Compute a 2D precedence table from a list of precedences.
 PRECS should be a list, sorted by precedence (e.g. \"+\" will
 come before \"*\"), of elements of the form \(left OP ...)
 or (right OP ...) or (nonassoc OP ...) or (assoc OP ...).  All operators in
 one of those elements share the same precedence level and associativity."
+  (declare (pure t))
   (let ((prec2-table (make-hash-table :test 'equal)))
     (dolist (prec precs)
       (dolist (op (cdr prec))
@@ -193,8 +193,8 @@ one of those elements share the same precedence level and 
associativity."
                 (smie-set-prec2tab prec2-table other-op op op1)))))))
     prec2-table))
 
-(put 'smie-merge-prec2s 'pure t)
 (defun smie-merge-prec2s (&rest tables)
+  (declare (pure t))
   (if (null (cdr tables))
       (car tables)
     (let ((prec2 (make-hash-table :test 'equal)))
@@ -209,7 +209,6 @@ one of those elements share the same precedence level and 
associativity."
                  table))
       prec2)))
 
-(put 'smie-bnf->prec2 'pure t)
 (defun smie-bnf->prec2 (bnf &rest resolvers)
   "Convert the BNF grammar into a prec2 table.
 BNF is a list of nonterminal definitions of the form:
@@ -232,6 +231,7 @@ Conflicts can be resolved via RESOLVERS, which is a list of 
elements that can
 be either:
 - a precs table (see `smie-precs->prec2') to resolve conflicting constraints,
 - a constraint (T1 REL T2) where REL is one of = < or >."
+  (declare (pure t))
   ;; FIXME: Add repetition operator like (repeat <separator> <elems>).
   ;; Maybe also add (or <elem1> <elem2>...) for things like
   ;; (exp (exp (or "+" "*" "=" ..) exp)).
@@ -503,11 +503,11 @@ CSTS is a list of pairs representing arcs in a graph."
 ;;                     (t (cl-assert (eq v '=))))))))
 ;;            prec2))
 
-(put 'smie-prec2->grammar 'pure t)
 (defun smie-prec2->grammar (prec2)
   "Take a 2D precedence table and turn it into an alist of precedence levels.
 PREC2 is a table as returned by `smie-precs->prec2' or
 `smie-bnf->prec2'."
+  (declare (pure t))
   ;; For each operator, we create two "variables" (corresponding to
   ;; the left and right precedence level), which are represented by
   ;; cons cells.  Those are the very cons cells that appear in the
diff --git a/lisp/emacs-lisp/syntax.el b/lisp/emacs-lisp/syntax.el
index 95ed775..d446a2c 100644
--- a/lisp/emacs-lisp/syntax.el
+++ b/lisp/emacs-lisp/syntax.el
@@ -328,7 +328,7 @@ The return value is a function suitable for 
`syntax-propertize-function'."
 ;;; Link syntax-propertize with syntax.c.
 
 (defvar syntax-propertize-chunks
-  ;; We're not sure how far we'll go.  In my tests, using chunks of 20000
+  ;; We're not sure how far we'll go.  In my tests, using chunks of 2000
   ;; brings to overhead to something negligible.  Passing ‘charpos’ directly
   ;; also works (basically works line-by-line) but results in an overhead which
   ;; I thought was a bit too high (like around 50%).
@@ -336,7 +336,8 @@ The return value is a function suitable for 
`syntax-propertize-function'."
 
 (defun internal--syntax-propertize (charpos)
   ;; FIXME: Called directly from C.
-  (syntax-propertize (min (+ syntax-propertize-chunks charpos) (point-max))))
+  (save-match-data
+    (syntax-propertize (min (+ syntax-propertize-chunks charpos) 
(point-max)))))
 
 ;;; Incrementally compute and memoize parser state.
 
@@ -376,12 +377,10 @@ This function should move the cursor back to some 
syntactically safe
 point (where the PPSS is equivalent to nil).")
 (make-obsolete-variable 'syntax-begin-function nil "25.1")
 
-(defvar syntax-ppss-cache nil
+(defvar-local syntax-ppss-cache nil
   "List of (POS . PPSS) pairs, in decreasing POS order.")
-(make-variable-buffer-local 'syntax-ppss-cache)
-(defvar syntax-ppss-last nil
+(defvar-local syntax-ppss-last nil
   "Cache of (LAST-POS . LAST-PPSS).")
-(make-variable-buffer-local 'syntax-ppss-last)
 
 (defalias 'syntax-ppss-after-change-function 'syntax-ppss-flush-cache)
 (defun syntax-ppss-flush-cache (beg &rest ignored)
diff --git a/lisp/epg.el b/lisp/epg.el
index aa79c7d..71a83c3 100644
--- a/lisp/epg.el
+++ b/lisp/epg.el
@@ -551,6 +551,8 @@ callback data (if any)."
 (defun epg-errors-to-string (errors)
   (mapconcat #'epg-error-to-string errors "; "))
 
+(declare-function pinentry-start "pinentry" (&optional quiet))
+
 (defun epg--start (context args)
   "Start `epg-gpg-program' in a subprocess with given ARGS."
   (if (and (epg-context-process context)
@@ -614,7 +616,7 @@ callback data (if any)."
                   (re-search-forward
                     "^allow-emacs-pinentry:\\(?:.*:\\)\\{8\\}1"
                     nil t))))
-      (pinentry-start))
+      (pinentry-start 'quiet))
     (setq process-environment
          (cons (format "INSIDE_EMACS=%s,epg" emacs-version)
                process-environment))
diff --git a/lisp/erc/ChangeLog.2 b/lisp/erc/ChangeLog.2
index 8dce508..80ee3bb 100644
--- a/lisp/erc/ChangeLog.2
+++ b/lisp/erc/ChangeLog.2
@@ -1,3 +1,8 @@
+2015-11-07  Kelvin White  <address@hidden>
+
+       * erc-pcomplete.el (pcomplete-erc-nicks): Fix bug for tab complete
+       (bug#18771)
+
 2015-03-25  Stefan Monnier  <address@hidden>
 
        * erc.el (erc-switch-to-buffer): Fix last change (bug#20187).
diff --git a/lisp/erc/erc-pcomplete.el b/lisp/erc/erc-pcomplete.el
index e46ac68..4ad5d2e 100644
--- a/lisp/erc/erc-pcomplete.el
+++ b/lisp/erc/erc-pcomplete.el
@@ -225,9 +225,10 @@ If optional argument IGNORE-SELF is non-nil, don't return 
the current nick."
                  (erc-get-channel-user-list)))
         (nicks nil))
     (dolist (user users)
-      (unless (and ignore-self
-                   (string= (erc-server-user-nickname (car user))
-                            (erc-current-nick)))
+      (unless (or (not user)
+                  (and ignore-self
+                       (string= (erc-server-user-nickname (car user))
+                                (erc-current-nick))))
         (setq nicks (cons (concat (erc-server-user-nickname (car user))
                                   postfix)
                           nicks))))
diff --git a/lisp/faces.el b/lisp/faces.el
index de8a0b5..f96df05 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -1958,39 +1958,42 @@ Return nil if there is no face."
         (delete-dups (nreverse faces))
       (car (last faces)))))
 
-(defun foreground-color-at-point ()
-  "Return the foreground color of the character after point."
+(defun faces--attribute-at-point (attribute &optional attribute-unnamed)
+  "Return the face ATTRIBUTE at point.
+ATTRIBUTE is a keyword.
+If ATTRIBUTE-UNNAMED is non-nil, it is a symbol to look for in
+unnamed faces (e.g, `foreground-color')."
   ;; `face-at-point' alone is not sufficient.  It only gets named faces.
   ;; Need also pick up any face properties that are not associated with named 
faces.
-  (let ((face (or (face-at-point)
-                 (get-char-property (point) 'read-face-name)
-                 (get-char-property (point) 'face))))
-    (cond ((and face (symbolp face))
-          (let ((value (face-foreground face nil 'default)))
-            (if (member value '("unspecified-fg" "unspecified-bg"))
-                nil
-              value)))
-         ((consp face)
-          (cond ((memq 'foreground-color face) (cdr (memq 'foreground-color 
face)))
-                ((memq ':foreground face) (cadr (memq ':foreground face)))))
-         (t nil))))                    ; Invalid face value.
+  (let ((faces (or (get-char-property (point) 'read-face-name)
+                   ;; If `font-lock-mode' is on, `font-lock-face' takes 
precedence.
+                   (and font-lock-mode
+                        (get-char-property (point) 'font-lock-face))
+                   (get-char-property (point) 'face)))
+        (found nil))
+    (dolist (face (if (listp faces) faces (list faces)))
+      (cond (found)
+            ((and face (symbolp face))
+             (let ((value (face-attribute-specified-or
+                           (face-attribute face attribute nil t)
+                           nil)))
+               (unless (member value '(nil "unspecified-fg" "unspecified-bg"))
+                 (setq found value))))
+            ((consp face)
+             (setq found (cond ((and attribute-unnamed
+                                     (memq attribute-unnamed face))
+                                (cdr (memq attribute-unnamed face)))
+                               ((memq attribute face) (cadr (memq attribute 
face))))))))
+    (or found
+        (face-attribute 'default attribute))))
+
+(defun foreground-color-at-point ()
+  "Return the foreground color of the character after point."
+  (faces--attribute-at-point :foreground 'foreground-color))
 
 (defun background-color-at-point ()
   "Return the background color of the character after point."
-  ;; `face-at-point' alone is not sufficient.  It only gets named faces.
-  ;; Need also pick up any face properties that are not associated with named 
faces.
-  (let ((face (or (face-at-point)
-                 (get-char-property (point) 'read-face-name)
-                 (get-char-property (point) 'face))))
-    (cond ((and face (symbolp face))
-          (let ((value (face-background face nil 'default)))
-            (if (member value '("unspecified-fg" "unspecified-bg"))
-                nil
-              value)))
-         ((consp face)
-          (cond ((memq 'background-color face) (cdr (memq 'background-color 
face)))
-                ((memq ':background face) (cadr (memq ':background face)))))
-         (t nil))))                    ; Invalid face value.
+  (faces--attribute-at-point :background 'background-color))
 
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
diff --git a/lisp/filenotify.el b/lisp/filenotify.el
index 6a180a8..4c5d43f 100644
--- a/lisp/filenotify.el
+++ b/lisp/filenotify.el
@@ -62,7 +62,7 @@ WHAT is a file or directory name to be removed, needed just 
for `inotify'."
       ;; Send `stopped' event.
       (dolist (entry (cdr registered))
        (funcall (cdr entry)
-                `(,(file-notify--descriptor desc) stopped
+                `(,descriptor stopped
                   ,(or (and (stringp (car entry))
                             (expand-file-name (car entry) dir))
                        dir))))
@@ -100,17 +100,19 @@ It is a form ((DESCRIPTOR ACTION FILE [FILE1-OR-COOKIE]) 
CALLBACK).")
 
 (defun file-notify--event-file-name (event)
   "Return file name of file notification event, or nil."
-  (expand-file-name
-   (or  (and (stringp (nth 2 event)) (nth 2 event)) "")
-   (car (gethash (car event) file-notify-descriptors))))
+  (directory-file-name
+   (expand-file-name
+    (or  (and (stringp (nth 2 event)) (nth 2 event)) "")
+    (car (gethash (car event) file-notify-descriptors)))))
 
 ;; Only `gfilenotify' could return two file names.
 (defun file-notify--event-file1-name (event)
   "Return second file name of file notification event, or nil.
 This is available in case a file has been moved."
   (and (stringp (nth 3 event))
-       (expand-file-name
-       (nth 3 event) (car (gethash (car event) file-notify-descriptors)))))
+       (directory-file-name
+        (expand-file-name
+         (nth 3 event) (car (gethash (car event) file-notify-descriptors))))))
 
 ;; Cookies are offered by `inotify' only.
 (defun file-notify--event-cookie (event)
@@ -121,14 +123,17 @@ This is available in case a file has been moved."
 ;; `inotify' returns the same descriptor when the file (directory)
 ;; uses the same inode.  We want to distinguish, and apply a virtual
 ;; descriptor which make the difference.
-(defun file-notify--descriptor (descriptor)
+(defun file-notify--descriptor (desc file)
   "Return the descriptor to be used in `file-notify-*-watch'.
 For `gfilenotify' and `w32notify' it is the same descriptor as
 used in the low-level file notification package."
-  (if (and (natnump descriptor) (eq file-notify--library 'inotify))
-      (cons descriptor
-            (car (cadr (gethash descriptor file-notify-descriptors))))
-    descriptor))
+  (if (and (natnump desc) (eq file-notify--library 'inotify))
+      (cons desc
+            (and (stringp file)
+                 (car (assoc
+                       (file-name-nondirectory file)
+                       (gethash desc file-notify-descriptors)))))
+    desc))
 
 ;; The callback function used to map between specific flags of the
 ;; respective file notifications, and the ones we return.
@@ -208,9 +213,11 @@ EVENT is the cadr of the event in 
`file-notify-handle-event'
                               (car file-notify--pending-event)))
                   ;; If the source is handled by another watch, we
                   ;; must fire the rename event there as well.
-                  (when (not (equal (file-notify--descriptor desc)
+                  (when (not (equal (file-notify--descriptor desc file1)
                                     (file-notify--descriptor
-                                     (caar file-notify--pending-event))))
+                                     (caar file-notify--pending-event)
+                                     (file-notify--event-file-name
+                                      file-notify--pending-event))))
                     (setq pending-event
                           `((,(caar file-notify--pending-event)
                              renamed ,file ,file1)
@@ -221,7 +228,10 @@ EVENT is the cadr of the event in 
`file-notify-handle-event'
         ;; Apply pending callback.
         (when pending-event
           (setcar
-           (car pending-event) (file-notify--descriptor (caar pending-event)))
+           (car pending-event)
+           (file-notify--descriptor
+            (caar pending-event)
+            (file-notify--event-file-name file-notify--pending-event)))
           (funcall (cadr pending-event) (car pending-event))
           (setq pending-event nil))
 
@@ -255,14 +265,15 @@ EVENT is the cadr of the event in 
`file-notify-handle-event'
          (if file1
              (funcall
               callback
-              `(,(file-notify--descriptor desc) ,action ,file ,file1))
+              `(,(file-notify--descriptor desc file) ,action ,file ,file1))
            (funcall
             callback
-            `(,(file-notify--descriptor desc) ,action ,file)))))
+            `(,(file-notify--descriptor desc file) ,action ,file)))))
 
       ;; Modify `file-notify-descriptors'.
       (when stopped
-        (file-notify--rm-descriptor (file-notify--descriptor desc) file)))))
+        (file-notify--rm-descriptor
+         (file-notify--descriptor desc file) file)))))
 
 ;; `gfilenotify' and `w32notify' return a unique descriptor for every
 ;; `file-notify-add-watch', while `inotify' returns a unique
@@ -373,7 +384,8 @@ FILE is the name of the file whose event is being reported."
      file-notify-descriptors)
 
     ;; Return descriptor.
-    (file-notify--descriptor desc)))
+    (file-notify--descriptor
+     desc (unless (file-directory-p file) (file-name-nondirectory file)))))
 
 (defun file-notify-rm-watch (descriptor)
   "Remove an existing watch specified by its DESCRIPTOR.
@@ -394,7 +406,7 @@ DESCRIPTOR should be an object returned by 
`file-notify-add-watch'."
             (if handler
                 ;; A file name handler could exist even if there is no local
                 ;; file notification support.
-                (funcall handler 'file-notify-rm-watch desc)
+                (funcall handler 'file-notify-rm-watch descriptor)
 
               (funcall
                (cond
diff --git a/lisp/files-x.el b/lisp/files-x.el
index a130ffc..cf9fe91 100644
--- a/lisp/files-x.el
+++ b/lisp/files-x.el
@@ -429,18 +429,25 @@ from the MODE alist ignoring the input argument VALUE."
   (catch 'exit
     (unless enable-local-variables
       (throw 'exit (message "Directory-local variables are disabled")))
-    (let ((variables-file (or (and (buffer-file-name)
-                                  (not (file-remote-p (buffer-file-name)))
-                                  (dir-locals-find-file (buffer-file-name)))
-                             dir-locals-file))
+    (let ((variables-file (and (buffer-file-name)
+                               (not (file-remote-p (buffer-file-name)))
+                               (dir-locals-find-file (buffer-file-name))))
          variables)
-      (if (consp variables-file)       ; result from cache
-         ;; If cache element has an mtime, assume it came from a file.
-         ;; Otherwise, assume it was set directly.
-         (setq variables-file (if (nth 2 variables-file)
-                                  (expand-file-name dir-locals-file
-                                                    (car variables-file))
-                                (cadr variables-file))))
+      (setq variables-file
+            ;; If there are several .dir-locals, the user probably
+            ;; wants to edit the last one (the highest priority).
+            (cond ((stringp variables-file)
+                   (car (last (dir-locals--all-files variables-file))))
+                  ((consp variables-file)      ; result from cache
+                   ;; If cache element has an mtime, assume it came from a 
file.
+                   ;; Otherwise, assume it was set directly.
+                   (if (nth 2 variables-file)
+                       (car (last (dir-locals--all-files (car 
variables-file))))
+                     (cadr variables-file)))
+                  ;; Try to make a proper file-name.  This doesn't cover all
+                  ;; wildcards, but it covers the default value of 
`dir-locals-file'.
+                  (t (replace-regexp-in-string
+                      "\\*" "" (replace-regexp-in-string  "\\?" "-" 
dir-locals-file)))))
       ;; I can't be bothered to handle this case right now.
       ;; Dir locals were set directly from a class.  You need to
       ;; directly modify the class in dir-locals-class-alist.
diff --git a/lisp/files.el b/lisp/files.el
index b25994c..fdda9b2 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -2283,18 +2283,7 @@ unless NOMODES is non-nil."
       (view-mode-enter))
     (run-hooks 'find-file-hook)))
 
-(defmacro report-errors (format &rest body)
-  "Eval BODY and turn any error into a FORMAT message.
-FORMAT can have a %s escape which will be replaced with the actual error.
-If `debug-on-error' is set, errors are not caught, so that you can
-debug them.
-Avoid using a large BODY since it is duplicated."
-  (declare (debug t) (indent 1))
-  `(if debug-on-error
-       (progn . ,body)
-     (condition-case err
-        (progn . ,body)
-       (error (message ,format (prin1-to-string err))))))
+(define-obsolete-function-alias 'report-errors 'with-demoted-errors "25.1")
 
 (defun normal-mode (&optional find-file)
   "Choose the major mode for this buffer automatically.
@@ -2315,9 +2304,9 @@ in that case, this function acts as if 
`enable-local-variables' were t."
   (let ((enable-local-variables (or (not find-file) enable-local-variables)))
     ;; FIXME this is less efficient than it could be, since both
     ;; s-a-m and h-l-v may parse the same regions, looking for "mode:".
-    (report-errors "File mode specification error: %s"
+    (with-demoted-errors "File mode specification error: %s"
       (set-auto-mode))
-    (report-errors "File local-variables error: %s"
+    (with-demoted-errors "File local-variables error: %s"
       (hack-local-variables)))
   ;; Turn font lock off and on, to make sure it takes account of
   ;; whatever file local variables are relevant to it.
@@ -3316,7 +3305,7 @@ local variables, but directory-local variables may still 
be applied."
        result)
     (unless mode-only
       (setq file-local-variables-alist nil)
-      (report-errors "Directory-local variables error: %s"
+      (with-demoted-errors "Directory-local variables error: %s"
        ;; Note this is a no-op if enable-local-variables is nil.
        (hack-dir-local-variables)))
     ;; This entire function is basically a no-op if enable-local-variables
@@ -3659,7 +3648,7 @@ Return the new variables list."
       (error
        ;; The file's content might be invalid (e.g. have a merge conflict), but
        ;; that shouldn't prevent the user from opening the file.
-       (message ".dir-locals error: %s" (error-message-string err))
+       (message "%s error: %s" dir-locals-file (error-message-string err))
        nil))))
 
 (defun dir-locals-set-directory-class (directory class &optional mtime)
@@ -3709,10 +3698,33 @@ VARIABLES list of the class.  The list is processed in 
order.
   applied by recursively following these rules."
   (setf (alist-get class dir-locals-class-alist) variables))
 
-(defconst dir-locals-file ".dir-locals.el"
-  "File that contains directory-local variables.
-It has to be constant to enforce uniform values
-across different environments and users.")
+(defconst dir-locals-file ".dir-locals*.el"
+  "Pattern for files that contain directory-local variables.
+It has to be constant to enforce uniform values across different
+environments and users.
+
+Multiple dir-locals files in the same directory are loaded in
+`string<' order.
+See Info node `(elisp)Directory Local Variables' for details.")
+
+(defun dir-locals--all-files (file-or-dir)
+  "Return a list of all readable dir-locals files matching FILE-OR-DIR.
+If FILE-OR-DIR is a file pattern, expand wildcards in it and
+return a sorted list of the results.  If it is a directory name,
+return a sorted list of all files matching `dir-locals-file' in
+this directory.
+The returned list is sorted by `string<' order."
+  (require 'seq)
+  (let ((default-directory (if (file-directory-p file-or-dir)
+                               file-or-dir
+                             default-directory)))
+    (seq-filter (lambda (f) (and (file-readable-p f)
+                            (file-regular-p f)))
+                (file-expand-wildcards
+                 (cond ((not (file-directory-p file-or-dir)) file-or-dir)
+                       ((eq system-type 'ms-dos) (dosified-file-name 
dir-locals-file))
+                       (t dir-locals-file))
+                 'full))))
 
 (defun dir-locals-find-file (file)
   "Find the directory-local variables for FILE.
@@ -3730,75 +3742,93 @@ If not, the cache entry is cleared so that the file 
will be re-read.
 This function returns either nil (no directory local variables found),
 or the matching entry from `dir-locals-directory-cache' (a list),
 or the full path to the `dir-locals-file' (a string) in the case
-of no valid cache entry."
+of no valid cache entry.  If `dir-locals-file' contains
+wildcards, then the return value is not a proper filename, it is
+an absolute version of `dir-locals-file' which is guaranteed to
+expand to at least one file."
   (setq file (expand-file-name file))
-  (let* ((dir-locals-file-name
-         (if (eq system-type 'ms-dos)
-             (dosified-file-name dir-locals-file)
-           dir-locals-file))
-        (locals-file (locate-dominating-file file dir-locals-file-name))
-        (dir-elt nil))
+  (let* ((locals-dir (locate-dominating-file (file-name-directory file)
+                                             #'dir-locals--all-files))
+         locals-file dir-elt)
     ;; `locate-dominating-file' may have abbreviated the name.
-    (and locals-file
-        (setq locals-file (expand-file-name dir-locals-file-name locals-file)))
-        ;; Let dir-locals-read-from-file inform us via demoted-errors
-        ;; about unreadable files, etc.
-        ;; Maybe we'd want to keep searching though - that is
-        ;; a locate-dominating-file issue.
-;;;     (or (not (file-readable-p locals-file))
-;;;         (not (file-regular-p locals-file)))
-;;;     (setq locals-file nil))
+    (when locals-dir
+      (setq locals-dir (expand-file-name locals-dir))
+      (setq locals-file (expand-file-name (if (eq system-type 'ms-dos)
+                                              (dosified-file-name 
dir-locals-file)
+                                            dir-locals-file)
+                                          locals-dir)))
     ;; Find the best cached value in `dir-locals-directory-cache'.
     (dolist (elt dir-locals-directory-cache)
       (when (and (string-prefix-p (car elt) file
-                                 (memq system-type
-                                       '(windows-nt cygwin ms-dos)))
-                (> (length (car elt)) (length (car dir-elt))))
-       (setq dir-elt elt)))
+                                  (memq system-type
+                                        '(windows-nt cygwin ms-dos)))
+                 (> (length (car elt)) (length (car dir-elt))))
+        (setq dir-elt elt)))
     (if (and dir-elt
-            (or (null locals-file)
-                (<= (length (file-name-directory locals-file))
-                    (length (car dir-elt)))))
-       ;; Found a potential cache entry.  Check validity.
-       ;; A cache entry with no MTIME is assumed to always be valid
-       ;; (ie, set directly, not from a dir-locals file).
-       ;; Note, we don't bother to check that there is a matching class
-       ;; element in dir-locals-class-alist, since that's done by
-       ;; dir-locals-set-directory-class.
-       (if (or (null (nth 2 dir-elt))
-               (let ((cached-file (expand-file-name dir-locals-file-name
-                                                    (car dir-elt))))
-                 (and (file-readable-p cached-file)
-                      (equal (nth 2 dir-elt)
-                             (nth 5 (file-attributes cached-file))))))
-           ;; This cache entry is OK.
-           dir-elt
-         ;; This cache entry is invalid; clear it.
-         (setq dir-locals-directory-cache
-               (delq dir-elt dir-locals-directory-cache))
-         ;; Return the first existing dir-locals file.  Might be the same
-         ;; as dir-elt's, might not (eg latter might have been deleted).
-         locals-file)
+             (or (null locals-dir)
+                 (<= (length locals-dir)
+                     (length (car dir-elt)))))
+        ;; Found a potential cache entry.  Check validity.
+        ;; A cache entry with no MTIME is assumed to always be valid
+        ;; (ie, set directly, not from a dir-locals file).
+        ;; Note, we don't bother to check that there is a matching class
+        ;; element in dir-locals-class-alist, since that's done by
+        ;; dir-locals-set-directory-class.
+        (if (or (null (nth 2 dir-elt))
+                (let ((cached-files (dir-locals--all-files (car dir-elt))))
+                  ;; The entry MTIME should match the most recent
+                  ;; MTIME among matching files.
+                  (and cached-files
+                       (= (time-to-seconds (nth 2 dir-elt))
+                          (apply #'max (mapcar (lambda (f) (time-to-seconds 
(nth 5 (file-attributes f))))
+                                               cached-files))))))
+            ;; This cache entry is OK.
+            dir-elt
+          ;; This cache entry is invalid; clear it.
+          (setq dir-locals-directory-cache
+                (delq dir-elt dir-locals-directory-cache))
+          ;; Return the first existing dir-locals file.  Might be the same
+          ;; as dir-elt's, might not (eg latter might have been deleted).
+          locals-file)
       ;; No cache entry.
       locals-file)))
 
 (defun dir-locals-read-from-file (file)
   "Load a variables FILE and register a new class and instance.
-FILE is the name of the file holding the variables to apply.
+FILE is the absolute name of the file holding the variables to
+apply.  It may contain wildcards.
 The new class name is the same as the directory in which FILE
 is found.  Returns the new class name."
-  (with-temp-buffer
+  (require 'map)
+  (let* ((dir-name (file-name-directory file))
+         (class-name (intern dir-name))
+         (files (dir-locals--all-files file))
+         (read-circle nil)
+         (success nil)
+         (variables))
     (with-demoted-errors "Error reading dir-locals: %S"
-      (insert-file-contents file)
-      (unless (zerop (buffer-size))
-        (let* ((dir-name (file-name-directory file))
-               (class-name (intern dir-name))
-               (variables (let ((read-circle nil))
-                            (read (current-buffer)))))
-          (dir-locals-set-class-variables class-name variables)
-          (dir-locals-set-directory-class dir-name class-name
-                                          (nth 5 (file-attributes file)))
-          class-name)))))
+      (dolist (file files)
+        (with-temp-buffer
+          (insert-file-contents file)
+          (condition-case-unless-debug nil
+              (setq variables
+                    (map-merge-with 'list (lambda (a b) (map-merge 'list a b))
+                                    variables
+                                    (read (current-buffer))))
+            (end-of-file nil))))
+      (setq success t))
+    (dir-locals-set-class-variables class-name variables)
+    (dir-locals-set-directory-class
+     dir-name class-name
+     (seconds-to-time
+      (if success
+          (apply #'max (mapcar (lambda (file)
+                                 (time-to-seconds (nth 5 (file-attributes 
file))))
+                               files))
+        ;; If there was a problem, use the values we could get but
+        ;; don't let the cache prevent future reads.
+        0)))
+    class-name))
 
 (defcustom enable-remote-dir-locals nil
   "Non-nil means dir-local variables will be applied to remote files."
@@ -3821,17 +3851,17 @@ This does nothing if either `enable-local-variables' or
                 (not (file-remote-p (or (buffer-file-name)
                                         default-directory)))))
     ;; Find the variables file.
-    (let ((variables-file (dir-locals-find-file
-                           (or (buffer-file-name) default-directory)))
+    (let ((file-pattern-or-cache (dir-locals-find-file
+                                  (or (buffer-file-name) default-directory)))
          (class nil)
          (dir-name nil))
       (cond
-       ((stringp variables-file)
-       (setq dir-name (file-name-directory variables-file)
-             class (dir-locals-read-from-file variables-file)))
-       ((consp variables-file)
-       (setq dir-name (nth 0 variables-file))
-       (setq class (nth 1 variables-file))))
+       ((stringp file-pattern-or-cache)
+       (setq dir-name (file-name-directory file-pattern-or-cache)
+             class (dir-locals-read-from-file file-pattern-or-cache)))
+       ((consp file-pattern-or-cache)
+       (setq dir-name (nth 0 file-pattern-or-cache))
+       (setq class (nth 1 file-pattern-or-cache))))
       (when class
        (let ((variables
               (dir-locals-collect-variables
@@ -6053,6 +6083,7 @@ by `sh' are supported."
 (defun file-expand-wildcards (pattern &optional full)
   "Expand wildcard pattern PATTERN.
 This returns a list of file names which match the pattern.
+Files are sorted in `string<' order.
 
 If PATTERN is written as an absolute file name,
 the values are absolute also.
diff --git a/lisp/frame.el b/lisp/frame.el
index b9e63d5..f024065 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -33,8 +33,12 @@ The window system startup file should add its frame creation
 function to this method, which should take an alist of parameters
 as its argument.")
 
-(cl-defmethod frame-creation-function (params
-                                       &context (window-system (eql nil)))
+(cl-generic-define-context-rewriter window-system (value)
+  ;; If `value' is a `consp', it's probably an old-style specializer,
+  ;; so just use it, and anyway `eql' isn't very useful on cons cells.
+  `(window-system ,(if (consp value) value `(eql ,value))))
+
+(cl-defmethod frame-creation-function (params &context (window-system nil))
   ;; It's tempting to get rid of tty-create-frame-with-faces and turn it into
   ;; this method (i.e. move this method to faces.el), but faces.el is loaded
   ;; much earlier from loadup.el (before cl-generic and even before
@@ -2227,6 +2231,17 @@ See also `toggle-frame-maximized'."
 (make-obsolete-variable
  'window-system-version "it does not give useful information." "24.3")
 
+;; Variables which should trigger redisplay of the current buffer.
+(setq redisplay--variables (make-hash-table :test 'eq :size 10))
+(mapc (lambda (var)
+        (puthash var 1 redisplay--variables))
+      '(line-spacing
+        overline-margin
+        line-prefix
+        wrap-prefix
+        bidi-paragraph-direction
+        bidi-display-reordering))
+
 (provide 'frame)
 
 ;;; frame.el ends here
diff --git a/lisp/gnus/auth-source.el b/lisp/gnus/auth-source.el
index 304bfa9..9d842c0 100644
--- a/lisp/gnus/auth-source.el
+++ b/lisp/gnus/auth-source.el
@@ -159,6 +159,7 @@ let-binding."
           auth-source-protocols))
 
 (defvar auth-source-creation-defaults nil
+  ;; FIXME: AFAICT this is not set (or let-bound) anywhere!
   "Defaults for creating token values.  Usually let-bound.")
 
 (defvar auth-source-creation-prompts nil
@@ -176,7 +177,7 @@ let-binding."
           (const :tag "Never save" nil)
           (const :tag "Ask" ask)))
 
-;; TODO: make the default (setq auth-source-netrc-use-gpg-tokens `((,(if 
(boundp 'epa-file-auto-mode-alist-entry) (car (symbol-value 
'epa-file-auto-mode-alist-entry)) "\\.gpg\\'") never) (t gpg)))
+;; TODO: make the default (setq auth-source-netrc-use-gpg-tokens `((,(if 
(boundp 'epa-file-auto-mode-alist-entry) (car epa-file-auto-mode-alist-entry) 
"\\.gpg\\'") never) (t gpg)))
 ;; TODO: or maybe leave as (setq auth-source-netrc-use-gpg-tokens 'never)
 
 (defcustom auth-source-netrc-use-gpg-tokens 'never
@@ -194,8 +195,7 @@ Note that if EPA/EPG is not available, this should NOT be 
used."
                            (const :tag "Match anything" t)
                            (const :tag "The EPA encrypted file extensions"
                                   ,(if (boundp 'epa-file-auto-mode-alist-entry)
-                                       (car (symbol-value
-                                             'epa-file-auto-mode-alist-entry))
+                                       (car epa-file-auto-mode-alist-entry)
                                      "\\.gpg\\'"))
                            (regexp :tag "Regular expression"))
                    (choice :tag "What to do"
@@ -448,15 +448,15 @@ with \"[a/b/c] \" if CHOICES is \(?a ?b ?c)."
           (plist-get entry :source)
           :source (plist-get entry :source)
           :type 'plstore
-          :search-function 'auth-source-plstore-search
-          :create-function 'auth-source-plstore-create
+          :search-function #'auth-source-plstore-search
+          :create-function #'auth-source-plstore-create
           :data (plstore-open (plist-get entry :source)))
        (auth-source-backend
         (plist-get entry :source)
         :source (plist-get entry :source)
         :type 'netrc
-        :search-function 'auth-source-netrc-search
-        :create-function 'auth-source-netrc-create)))
+        :search-function #'auth-source-netrc-search
+        :create-function #'auth-source-netrc-create)))
 
     ;; the MacOS Keychain
     ((and
@@ -482,8 +482,8 @@ with \"[a/b/c] \" if CHOICES is \(?a ?b ?c)."
         (format "Mac OS Keychain (%s)" source)
         :source source
         :type keychain-type
-        :search-function 'auth-source-macos-keychain-search
-        :create-function 'auth-source-macos-keychain-create)))
+        :search-function #'auth-source-macos-keychain-search
+        :create-function #'auth-source-macos-keychain-create)))
 
     ;; the Secrets API.  We require the package, in order to have a
     ;; defined value for `secrets-enabled'.
@@ -509,8 +509,8 @@ with \"[a/b/c] \" if CHOICES is \(?a ?b ?c)."
             (format "Secrets API (%s)" source)
             :source source
             :type 'secrets
-            :search-function 'auth-source-secrets-search
-            :create-function 'auth-source-secrets-create)
+            :search-function #'auth-source-secrets-search
+            :create-function #'auth-source-secrets-create)
          (auth-source-do-warn
           "auth-source-backend-parse: no Secrets API, ignoring spec: %S" entry)
          (auth-source-backend
@@ -522,8 +522,7 @@ with \"[a/b/c] \" if CHOICES is \(?a ?b ?c)."
     (t
      (auth-source-do-warn
       "auth-source-backend-parse: invalid backend spec: %S" entry)
-     (auth-source-backend
-      "Empty"
+     (make-instance 'auth-source-backend
       :source ""
       :type 'ignore)))))
 
@@ -546,7 +545,7 @@ parameters."
 ;; (mapcar 'auth-source-backend-parse auth-sources)
 
 (defun* auth-source-search (&rest spec
-                                  &key type max host user port secret
+                                  &key max
                                   require create delete
                                   &allow-other-keys)
   "Search or modify authentication backends according to SPEC.
@@ -695,7 +694,7 @@ must call it to obtain the actual value."
          ;; note that we may have cached results but found is still nil
          ;; (there were no results from the search)
          (found (auth-source-recall spec))
-         filtered-backends accessor-key backend)
+         filtered-backends)
 
     (if (and cached auth-source-do-cache)
         (auth-source-do-debug
@@ -714,13 +713,13 @@ must call it to obtain the actual value."
       (dolist (backend backends)
         (dolist (key keys)
           ;; ignore invalid slots
-          (condition-case signal
-              (unless (eval `(auth-source-search-collection
-                              (plist-get spec key)
-                              (oref backend ,key)))
+          (condition-case nil
+              (unless (auth-source-search-collection
+                       (plist-get spec key)
+                       (slot-value backend key))
                 (setq filtered-backends (delq backend filtered-backends))
                 (return))
-            (invalid-slot-name))))
+            (invalid-slot-name nil))))
 
       (auth-source-do-trivia
        "auth-source-search: found %d backends matching %S"
@@ -771,7 +770,7 @@ must call it to obtain the actual value."
         (let* ((bmatches (apply
                           (slot-value backend 'search-function)
                           :backend backend
-                          :type (slot-value backend :type)
+                          :type (slot-value backend 'type)
                           ;; note we're overriding whatever the spec
                           ;; has for :max, :require, :create, and :delete
                           :max max
@@ -783,8 +782,8 @@ must call it to obtain the actual value."
             (auth-source-do-trivia
              "auth-source-search-backend: got %d (max %d) in %s:%s matching %S"
              (length bmatches) max
-             (slot-value backend :type)
-             (slot-value backend :source)
+             (slot-value backend 'type)
+             (slot-value backend 'source)
              spec)
             (setq matches (append matches bmatches))))))
     matches))
@@ -795,9 +794,7 @@ must call it to obtain the actual value."
 ;; (auth-source-search :host "nonesuch" :type 'netrc :K 1)
 ;; (auth-source-search :host "nonesuch" :type 'secrets)
 
-(defun* auth-source-delete (&rest spec
-                                  &key delete
-                                  &allow-other-keys)
+(defun auth-source-delete (&rest spec)
   "Delete entries from the authentication backends according to SPEC.
 Calls `auth-source-search' with the :delete property in SPEC set to t.
 The backend may not actually delete the entries.
@@ -866,7 +863,7 @@ Returns t or nil for forgotten or not found."
 ;; (auth-source-recall '(:host t))
 ;; (auth-source-forget+ :host t)
 
-(defun* auth-source-forget+ (&rest spec &allow-other-keys)
+(defun auth-source-forget+ (&rest spec)
   "Forget any cached data matching SPEC.  Returns forgotten count.
 
 This is not a full `auth-source-search' spec but works similarly.
@@ -948,9 +945,7 @@ while \(:host t) would find all host entries."
   (cdr (assoc key alist)))
 
 ;; (auth-source-netrc-parse :file "~/.authinfo.gpg")
-(defun* auth-source-netrc-parse (&rest
-                                 spec
-                                 &key file max host user port delete require
+(defun* auth-source-netrc-parse (&key file max host user port require
                                  &allow-other-keys)
   "Parse FILE and return a list of all entries in the file.
 Note that the MAX parameter is used so we can exit the parse early."
@@ -1113,7 +1108,7 @@ Note that the MAX parameter is used so we can exit the 
parse early."
 
 (defvar auth-source-passphrase-alist nil)
 
-(defun auth-source-token-passphrase-callback-function (context key-id file)
+(defun auth-source-token-passphrase-callback-function (_context _key-id file)
   (let* ((file (file-truename file))
         (entry (assoc file auth-source-passphrase-alist))
         passphrase)
@@ -1139,14 +1134,15 @@ Note that the MAX parameter is used so we can exit the 
parse early."
 FILE is the file from which we obtained this token."
   (when (string-match "^gpg:\\(.+\\)" secret)
     (setq secret (base64-decode-string (match-string 1 secret))))
-  (let ((context (epg-make-context 'OpenPGP))
-        plain)
+  (let ((context (epg-make-context 'OpenPGP)))
     (epg-context-set-passphrase-callback
      context
      (cons #'auth-source-token-passphrase-callback-function
            file))
     (epg-decrypt-string context secret)))
 
+(defvar pp-escape-newlines)
+
 ;; (insert (auth-source-epa-make-gpg-token "mysecret" "~/.netrc"))
 (defun auth-source-epa-make-gpg-token (secret file)
   (let ((context (epg-make-context 'OpenPGP))
@@ -1165,6 +1161,9 @@ FILE is the file from which we obtained this token."
                       (point-min)
                       (point-max))))))
 
+(defun auto-source--symbol-keyword (symbol)
+  (intern (format ":%s" symbol)))
+
 (defun auth-source-netrc-normalize (alist filename)
   (mapcar (lambda (entry)
             (let (ret item)
@@ -1198,7 +1197,7 @@ FILE is the file from which we obtained this token."
                                   (setq lexv (funcall token-decoder lexv)))
                                 lexv))))
                   (setq ret (plist-put ret
-                                       (intern (concat ":" k))
+                                       (auto-source--symbol-keyword k)
                                        v))))
               ret))
           alist))
@@ -1208,7 +1207,7 @@ FILE is the file from which we obtained this token."
 
 (defun* auth-source-netrc-search (&rest
                                   spec
-                                  &key backend require create delete
+                                  &key backend require create
                                   type max host user port
                                   &allow-other-keys)
   "Given a property list SPEC, return search matches from the :backend.
@@ -1221,7 +1220,6 @@ See `auth-source-search' for details on SPEC."
                   (auth-source-netrc-parse
                    :max max
                    :require require
-                   :delete delete
                    :file (oref backend source)
                    :host (or host t)
                    :user (or user t)
@@ -1255,7 +1253,7 @@ See `auth-source-search' for details on SPEC."
 
 (defun* auth-source-netrc-create (&rest spec
                                         &key backend
-                                        secret host user port create
+                                        host port create
                                         &allow-other-keys)
   (let* ((base-required '(host user port secret))
          ;; we know (because of an assertion in auth-source-search) that the
@@ -1276,23 +1274,23 @@ See `auth-source-search' for details on SPEC."
     ;; fill in the valist with whatever data we may have from the search
     ;; we complete the first value if it's a list and use the value otherwise
     (dolist (br base-required)
-      (when (symbol-value br)
-        (let ((br-choice (cond
-                          ;; all-accepting choice (predicate is t)
-                          ((eq t (symbol-value br)) nil)
-                          ;; just the value otherwise
-                          (t (symbol-value br)))))
-          (when br-choice
-            (auth-source--aput valist br br-choice)))))
+      (let ((val (plist-get spec (auto-source--symbol-keyword br))))
+        (when val
+          (let ((br-choice (cond
+                            ;; all-accepting choice (predicate is t)
+                            ((eq t val) nil)
+                            ;; just the value otherwise
+                            (t val))))
+            (when br-choice
+              (auth-source--aput valist br br-choice))))))
 
     ;; for extra required elements, see if the spec includes a value for them
     (dolist (er create-extra)
-      (let ((name (concat ":" (symbol-name er)))
+      (let ((k (auto-source--symbol-keyword er))
             (keys (loop for i below (length spec) by 2
                         collect (nth i spec))))
-        (dolist (k keys)
-          (when (equal (symbol-name k) name)
-            (auth-source--aput valist er (plist-get spec k))))))
+        (when (memq k keys)
+          (auth-source--aput valist er (plist-get spec k)))))
 
     ;; for each required element
     (dolist (r required)
@@ -1300,7 +1298,7 @@ See `auth-source-search' for details on SPEC."
              ;; take the first element if the data is a list
              (data (or (auth-source-netrc-element-or-first data)
                        (plist-get current-data
-                                  (intern (format ":%s" r) obarray))))
+                                  (auto-source--symbol-keyword r))))
              ;; this is the default to be offered
              (given-default (auth-source--aget
                              auth-source-creation-defaults r))
@@ -1347,7 +1345,7 @@ See `auth-source-search' for details on SPEC."
         (setq data (or data
                        (if (eq r 'secret)
                            ;; Special case prompt for passwords.
-                           ;; TODO: make the default (setq 
auth-source-netrc-use-gpg-tokens `((,(if (boundp 
'epa-file-auto-mode-alist-entry) (car (symbol-value 
'epa-file-auto-mode-alist-entry)) "\\.gpg\\'") nil) (t gpg)))
+                           ;; TODO: make the default (setq 
auth-source-netrc-use-gpg-tokens `((,(if (boundp 
'epa-file-auto-mode-alist-entry) (car epa-file-auto-mode-alist-entry) 
"\\.gpg\\'") nil) (t gpg)))
                            ;; TODO: or maybe leave as (setq 
auth-source-netrc-use-gpg-tokens 'never)
                            (let* ((ep (format "Use GPG password tokens in %s?" 
file))
                                   (gpg-encrypt
@@ -1363,7 +1361,10 @@ See `auth-source-search' for details on SPEC."
                                          (when (or (eq (car item) t)
                                                    (string-match (car item) 
file))
                                            (setq ret (cdr item))
-                                           (setq check nil)))))
+                                           (setq check nil)))
+                                       ;; FIXME: `ret' unused.
+                                       ;; Should we return it here?
+                                       ))
                                     (t 'never)))
                                   (plain (or (eval default) (read-passwd 
prompt))))
                              ;; ask if we don't know what to do (in which case
@@ -1387,7 +1388,7 @@ See `auth-source-search' for details on SPEC."
 
         (when data
           (setq artificial (plist-put artificial
-                                      (intern (concat ":" (symbol-name r)))
+                                      (auto-source--symbol-keyword r)
                                       (if (eq r 'secret)
                                           (lexical-let ((data data))
                                             (lambda () data))
@@ -1540,8 +1541,7 @@ list, it matches the original pattern."
 
 (defun* auth-source-secrets-search (&rest
                                     spec
-                                    &key backend create delete label
-                                    type max host user port
+                                    &key backend create delete label max
                                     &allow-other-keys)
   "Search the Secrets API; spec is like `auth-source'.
 
@@ -1638,10 +1638,7 @@ authentication tokens:
                         items)))
     items))
 
-(defun* auth-source-secrets-create (&rest
-                                    spec
-                                    &key backend type max host user port
-                                    &allow-other-keys)
+(defun auth-source-secrets-create (&rest spec)
   ;; TODO
   ;; (apply 'secrets-create-item (auth-get-source entry) name passwd spec)
   (debug spec))
@@ -1664,8 +1661,8 @@ authentication tokens:
 
 (defun* auth-source-macos-keychain-search (&rest
                                     spec
-                                    &key backend create delete label
-                                    type max host user port
+                                    &key backend create delete
+                                    type max
                                     &allow-other-keys)
   "Search the MacOS Keychain; spec is like `auth-source'.
 
@@ -1681,7 +1678,7 @@ For the internet keychain type, the :label key searches 
the
 item's labels (\"-l LABEL\" passed to \"/usr/bin/security\").
 Similarly, :host maps to \"-s HOST\", :user maps to \"-a USER\",
 and :port maps to \"-P PORT\" or \"-r PROT\"
-(note PROT has to be a 4-character string).
+\(note PROT has to be a 4-character string).
 
 For the generic keychain type, the :label key searches the item's
 labels (\"-l LABEL\" passed to \"/usr/bin/security\").
@@ -1752,8 +1749,7 @@ entries for git.gnus.org:
                         items)))
     items))
 
-(defun* auth-source-macos-keychain-search-items (coll type max
-                                                      &rest spec
+(defun* auth-source-macos-keychain-search-items (coll _type _max
                                                       &key label type
                                                       host user port
                                                       &allow-other-keys)
@@ -1815,22 +1811,19 @@ entries for git.gnus.org:
 
 (defun auth-source-macos-keychain-result-append (result generic k v)
   (push v result)
-  (setq k (cond
-           ((equal k "acct") "user")
-           ;; for generic keychains, creator is host, service is port
-           ((and generic (equal k "crtr")) "host")
-           ((and generic (equal k "svce")) "port")
-           ;; for internet keychains, protocol is port, server is host
-           ((and (not generic) (equal k "ptcl")) "port")
-           ((and (not generic) (equal k "srvr")) "host")
-           (t k)))
-
-  (push (intern (format ":%s" k)) result))
-
-(defun* auth-source-macos-keychain-create (&rest
-                                           spec
-                                           &key backend type max host user port
-                                           &allow-other-keys)
+  (push (auto-source--symbol-keyword
+         (cond
+          ((equal k "acct") "user")
+          ;; for generic keychains, creator is host, service is port
+          ((and generic (equal k "crtr")) "host")
+          ((and generic (equal k "svce")) "port")
+          ;; for internet keychains, protocol is port, server is host
+          ((and (not generic) (equal k "ptcl")) "port")
+          ((and (not generic) (equal k "srvr")) "host")
+          (t k)))
+        result))
+
+(defun auth-source-macos-keychain-create (&rest spec)
   ;; TODO
   (debug spec))
 
@@ -1838,8 +1831,8 @@ entries for git.gnus.org:
 
 (defun* auth-source-plstore-search (&rest
                                     spec
-                                    &key backend create delete label
-                                    type max host user port
+                                    &key backend create delete
+                                    max
                                     &allow-other-keys)
   "Search the PLSTORE; spec is like `auth-source'."
   (let* ((store (oref backend data))
@@ -1914,7 +1907,7 @@ entries for git.gnus.org:
 
 (defun* auth-source-plstore-create (&rest spec
                                           &key backend
-                                          secret host user port create
+                                          host port create
                                           &allow-other-keys)
   (let* ((base-required '(host user port secret))
          (base-secret '(secret))
@@ -1925,8 +1918,6 @@ entries for git.gnus.org:
                                                 :host host
                                                 :port port)))
          (required (append base-required create-extra))
-         (file (oref backend source))
-         (add "")
          ;; `valist' is an alist
          valist
          ;; `artificial' will be returned if no creation is needed
@@ -1937,23 +1928,23 @@ entries for git.gnus.org:
     ;; fill in the valist with whatever data we may have from the search
     ;; we complete the first value if it's a list and use the value otherwise
     (dolist (br base-required)
-      (when (symbol-value br)
-        (let ((br-choice (cond
-                          ;; all-accepting choice (predicate is t)
-                          ((eq t (symbol-value br)) nil)
-                          ;; just the value otherwise
-                          (t (symbol-value br)))))
-          (when br-choice
-            (auth-source--aput valist br br-choice)))))
+      (let ((val (plist-get spec (auto-source--symbol-keyword br))))
+        (when val
+          (let ((br-choice (cond
+                            ;; all-accepting choice (predicate is t)
+                            ((eq t val) nil)
+                            ;; just the value otherwise
+                            (t val))))
+            (when br-choice
+              (auth-source--aput valist br br-choice))))))
 
     ;; for extra required elements, see if the spec includes a value for them
     (dolist (er create-extra)
-      (let ((name (concat ":" (symbol-name er)))
+      (let ((k (auto-source--symbol-keyword er))
             (keys (loop for i below (length spec) by 2
                         collect (nth i spec))))
-        (dolist (k keys)
-          (when (equal (symbol-name k) name)
-            (auth-source--aput valist er (plist-get spec k))))))
+        (when (memq k keys)
+          (auth-source--aput valist er (plist-get spec k)))))
 
     ;; for each required element
     (dolist (r required)
@@ -1961,7 +1952,7 @@ entries for git.gnus.org:
              ;; take the first element if the data is a list
              (data (or (auth-source-netrc-element-or-first data)
                        (plist-get current-data
-                                  (intern (format ":%s" r) obarray))))
+                                  (auto-source--symbol-keyword r))))
              ;; this is the default to be offered
              (given-default (auth-source--aget
                              auth-source-creation-defaults r))
@@ -2021,10 +2012,10 @@ entries for git.gnus.org:
           (if (member r base-secret)
               (setq secret-artificial
                     (plist-put secret-artificial
-                               (intern (concat ":" (symbol-name r)))
+                               (auto-source--symbol-keyword r)
                                data))
             (setq artificial (plist-put artificial
-                                        (intern (concat ":" (symbol-name r)))
+                                        (auto-source--symbol-keyword r)
                                         data))))))
     (plstore-put (oref backend data)
                  (sha1 (format "address@hidden:%s"
@@ -2075,9 +2066,9 @@ MODE can be \"login\" or \"password\"."
 
   (let* ((listy (listp mode))
          (mode (if listy mode (list mode)))
-         (cname (if username
-                    (format "%s %s:%s %s" mode host port username)
-                  (format "%s %s:%s" mode host port)))
+         ;; (cname (if username
+         ;;            (format "%s %s:%s %s" mode host port username)
+         ;;          (format "%s %s:%s" mode host port)))
          (search (list :host host :port port))
          (search (if username (append search (list :user username)) search))
          (search (if create-missing
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index d4ca655..be0554f 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -2220,6 +2220,7 @@ increase the score of each group you read."
   "\M-\C-e" gnus-summary-expire-articles-now
   "\177" gnus-summary-delete-article
   [delete] gnus-summary-delete-article
+  [backspace] gnus-summary-delete-article
   "m" gnus-summary-move-article
   "r" gnus-summary-respool-article
   "w" gnus-summary-edit-article
diff --git a/lisp/gnus/mm-url.el b/lisp/gnus/mm-url.el
index 6d5f2a3..ecc5ac4 100644
--- a/lisp/gnus/mm-url.el
+++ b/lisp/gnus/mm-url.el
@@ -392,17 +392,18 @@ spaces.  Die Die Die."
   (if (consp chunk)
       (setq chunk (cdr chunk)))
 
-  (mapconcat
-   (lambda (char)
-     (cond
-      ((= char ?  ) "+")
-      ((memq char mm-url-unreserved-chars) (char-to-string char))
-      (t (upcase (format "%%%02x" char)))))
-   (mm-encode-coding-string chunk
-                           (if (fboundp 'find-coding-systems-string)
-                               (car (find-coding-systems-string chunk))
-                             buffer-file-coding-system))
-   ""))
+  (if chunk
+      (mapconcat
+       (lambda (char)
+        (cond
+         ((= char ?  ) "+")
+         ((memq char mm-url-unreserved-chars) (char-to-string char))
+         (t (upcase (format "%%%02x" char)))))
+       (mm-encode-coding-string chunk
+                               (if (fboundp 'find-coding-systems-string)
+                                   (car (find-coding-systems-string chunk))
+                                 buffer-file-coding-system))
+       "")))
 
 (defun mm-url-encode-www-form-urlencoded (pairs)
   "Return PAIRS encoded for forms."
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index 945b4d5..4e0bfee 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -623,7 +623,12 @@ FILE is the file where FUNCTION was probably defined."
                                           real-function key-bindings-buffer)))
             (run-hook-with-args 'help-fns-describe-function-functions function)
             (insert "\n"
-                    (or doc "Not documented."))))))))
+                    (or doc "Not documented."))
+            ;; Avoid asking the user annoying questions if she decides
+            ;; to save the help buffer, when her locale's codeset
+            ;; isn't UTF-8.
+            (unless (memq text-quoting-style '(straight grave))
+              (set-buffer-file-coding-system 'utf-8))))))))
 
 ;; Add defaults to `help-fns-describe-function-functions'.
 (add-hook 'help-fns-describe-function-functions #'help-fns--obsolete)
@@ -902,29 +907,36 @@ if it is given a local binding.\n"))))
                                             (buffer-file-name buffer)))
                                       (dir-locals-find-file
                                        (buffer-file-name buffer))))
-                          (dir-file t))
+                          (is-directory nil))
                      (princ (substitute-command-keys
                              "  This variable's value is directory-local"))
-                     (if (null file)
-                         (princ ".\n")
-                       (princ ", set ")
-                        (if (consp file) ; result from cache
-                            ;; If the cache element has an mtime, we
-                            ;; assume it came from a file.
-                            (if (nth 2 file)
-                                (setq file (expand-file-name
-                                            dir-locals-file (car file)))
-                              ;; Otherwise, assume it was set directly.
-                              (setq file (car file)
-                                    dir-file nil)))
-                       (princ (substitute-command-keys
-                                (if dir-file
-                                    "by the file\n  `"
-                                  "for the directory\n  `")))
+                      (when (consp file) ; result from cache
+                        ;; If the cache element has an mtime, we
+                        ;; assume it came from a file.
+                        (if (nth 2 file)
+                            (setq file (expand-file-name
+                                        dir-locals-file (car file)))
+                          ;; Otherwise, assume it was set directly.
+                          (setq file (car file)
+                                is-directory t)))
+                      (if (null file)
+                          (princ ".\n")
+                        (princ ", set ")
+                        (let ((files (file-expand-wildcards file)))
+                          (princ (substitute-command-keys
+                                  (cond
+                                   (is-directory "for the directory\n  `")
+                                   ;; Many files matched.
+                                   ((cdr files)
+                                    (setq file (file-name-directory (car 
files)))
+                                    (format "by a file\n  matching `%s' in the 
directory\n  `"
+                                            dir-locals-file))
+                                   (t (setq file (car files))
+                                      "by the file\n  `"))))
                        (with-current-buffer standard-output
                          (insert-text-button
                           file 'type 'help-dir-local-var-def
-                          'help-args (list variable file)))
+                             'help-args (list variable file))))
                        (princ (substitute-command-keys "'.\n"))))
                  (princ (substitute-command-keys
                          "  This variable's value is file-local.\n"))))
@@ -968,7 +980,7 @@ file-local variable.\n")
                    (re-search-backward
                     (concat "\\(" customize-label "\\)") nil t)
                    (help-xref-button 1 'help-customize-variable variable))))
-             ;; Note variable's version or package version
+             ;; Note variable's version or package version.
              (let ((output (describe-variable-custom-version-info variable)))
                (when output
                  (terpri)
diff --git a/lisp/hexl.el b/lisp/hexl.el
index 499253e..20a48bc 100644
--- a/lisp/hexl.el
+++ b/lisp/hexl.el
@@ -294,7 +294,7 @@ in hexl format.
 
 A sample format:
 
-  HEX ADDR: 0001 0203 0405 0607 0809 0a0b 0c0d 0e0f     ASCII-TEXT
+  HEX ADDR: 0011 2233 4455 6677 8899 aabb ccdd eeff     ASCII-TEXT
   --------  ---- ---- ---- ---- ---- ---- ---- ----  ----------------
   00000000: 5468 6973 2069 7320 6865 786c 2d6d 6f64  This is hexl-mod
   00000010: 652e 2020 4561 6368 206c 696e 6520 7265  e.  Each line re
diff --git a/lisp/ielm.el b/lisp/ielm.el
index 183f8a6..b035432 100644
--- a/lisp/ielm.el
+++ b/lisp/ielm.el
@@ -217,7 +217,7 @@ This variable is buffer-local.")
 
 (defun ielm-indent-line nil
   "Indent the current line as Lisp code if it is not a prompt line."
-  (when (save-excursion (comint-bol) (bolp))
+  (when (save-excursion (comint-bol t) (bolp))
     (lisp-indent-line)))
 
 ;;; Working buffer manipulation
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 915255b..9f8ba8d 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -31,11 +31,7 @@
 ;; is completed.  It uses a recursive-edit to behave this way.
 
 ;; The key bindings active within isearch-mode are defined below in
-;; `isearch-mode-map' which is given bindings close to the default
-;; characters of the original isearch.el.  With `isearch-mode',
-;; however, you can bind multi-character keys and it should be easier
-;; to add new commands.  One bug though: keys with meta-prefix cannot
-;; be longer than two chars.  Also see minibuffer-local-isearch-map
+;; `isearch-mode-map'.  Also see minibuffer-local-isearch-map
 ;; for bindings active during `isearch-edit-string'.
 
 ;; isearch-mode should work even if you switch windows with the mouse,
@@ -222,7 +218,7 @@ Default value, nil, means edit the string instead."
 
 (autoload 'character-fold-to-regexp "character-fold")
 
-(defcustom search-default-regexp-mode nil
+(defcustom search-default-regexp-mode #'character-fold-to-regexp
   "Default mode to use when starting isearch.
 Value is nil, t, or a function.
 
@@ -958,7 +954,7 @@ used to set the value of `isearch-regexp-function'."
   "This is called after every isearch command to update the display.
 The last thing it does is to run `isearch-update-post-hook'."
   (unless (eq (current-buffer) isearch--current-buffer)
-    (when isearch--current-buffer
+    (when (buffer-live-p isearch--current-buffer)
       (with-current-buffer isearch--current-buffer
         (setq cursor-sensor-inhibit (delq 'isearch cursor-sensor-inhibit))))
     (setq isearch--current-buffer (current-buffer))
diff --git a/lisp/json.el b/lisp/json.el
index b23d12a..0214a3e 100644
--- a/lisp/json.el
+++ b/lisp/json.el
@@ -52,6 +52,8 @@
 
 ;;; Code:
 
+(require 'map)
+
 ;; Parameters
 
 (defvar json-object-type 'alist
@@ -111,6 +113,24 @@ Used only when `json-encoding-pretty-print' is non-nil.")
   "If non-nil, ] and } closings will be formatted lisp-style,
 without indentation.")
 
+(defvar json-encoding-object-sort-predicate nil
+  "Sorting predicate for JSON object keys during encoding.
+If nil, no sorting is performed.  Else, JSON object keys are
+ordered by the specified sort predicate during encoding.  For
+instance, setting this to `string<' will have JSON object keys
+ordered alphabetically.")
+
+(defvar json-pre-element-read-function nil
+  "Function called (if non-nil) by `json-read-array' and
+`json-read-object' right before reading a JSON array or object,
+respectively.  The function is called with one argument, which is
+the current JSON key.")
+
+(defvar json-post-element-read-function nil
+  "Function called (if non-nil) by `json-read-array' and
+`json-read-object' right after reading a JSON array or object,
+respectively.")
+
 
 
 ;;; Utilities
@@ -148,6 +168,15 @@ Unlike `reverse', this keeps the property-value pairs 
intact."
         (push prop res)))
     res))
 
+(defun json--plist-to-alist (plist)
+  "Return an alist of the property-value pairs in PLIST."
+  (let (res)
+    (while plist
+      (let ((prop (pop plist))
+            (val (pop plist)))
+        (push (cons prop val) res)))
+    (nreverse res)))
+
 (defmacro json--with-indentation (body)
   `(let ((json--encoding-current-indentation
           (if json-encoding-pretty-print
@@ -196,6 +225,61 @@ Unlike `reverse', this keeps the property-value pairs 
intact."
 
 
 
+;;; Paths
+
+(defvar json--path '()
+  "Used internally by `json-path-to-position' to keep track of
+the path during recursive calls to `json-read'.")
+
+(defun json--record-path (key)
+  "Record the KEY to the current JSON path.
+Used internally by `json-path-to-position'."
+  (push (cons (point) key) json--path))
+
+(defun json--check-position (position)
+  "Check if the last parsed JSON structure passed POSITION.
+Used internally by `json-path-to-position'."
+  (let ((start (caar json--path)))
+    (when (< start position (+ (point) 1))
+      (throw :json-path (list :path (nreverse (mapcar #'cdr json--path))
+                              :match-start start
+                              :match-end (point)))))
+  (pop json--path))
+
+(defun json-path-to-position (position &optional string)
+  "Return the path to the JSON element at POSITION.
+
+When STRING is provided, return the path to the position in the
+string, else to the position in the current buffer.
+
+The return value is a property list with the following
+properties:
+
+:path        -- A list of strings and numbers forming the path to
+                the JSON element at the given position.  Strings
+                denote object names, while numbers denote array
+                indexes.
+
+:match-start -- Position where the matched JSON element begins.
+
+:match-end   -- Position where the matched JSON element ends.
+
+This can for instance be useful to determine the path to a JSON
+element in a deeply nested structure."
+  (save-excursion
+    (unless string
+      (goto-char (point-min)))
+    (let* ((json--path '())
+           (json-pre-element-read-function #'json--record-path)
+           (json-post-element-read-function
+            (apply-partially #'json--check-position position))
+           (path (catch :json-path
+                   (if string
+                       (json-read-from-string string)
+                     (json-read)))))
+      (when (plist-get path :path)
+        path))))
+
 ;;; Keywords
 
 (defvar json-keywords '("true" "false" "null")
@@ -403,7 +487,12 @@ Please see the documentation of `json-object-type' and 
`json-key-type'."
       (if (char-equal (json-peek) ?:)
           (json-advance)
         (signal 'json-object-format (list ":" (json-peek))))
+      (json-skip-whitespace)
+      (when json-pre-element-read-function
+        (funcall json-pre-element-read-function key))
       (setq value (json-read))
+      (when json-post-element-read-function
+        (funcall json-post-element-read-function))
       (setq elements (json-add-to-object elements key value))
       (json-skip-whitespace)
       (unless (char-equal (json-peek) ?})
@@ -421,32 +510,39 @@ Please see the documentation of `json-object-type' and 
`json-key-type'."
 
 (defun json-encode-hash-table (hash-table)
   "Return a JSON representation of HASH-TABLE."
-  (format "{%s%s}"
-          (json-join
-           (let (r)
-             (json--with-indentation
-              (maphash
-               (lambda (k v)
-                 (push (format
-                        (if json-encoding-pretty-print
-                            "%s%s: %s"
-                          "%s%s:%s")
-                        json--encoding-current-indentation
-                        (json-encode-key k)
-                        (json-encode v))
-                       r))
-               hash-table))
-             r)
-           json-encoding-separator)
-          (if (or (not json-encoding-pretty-print)
-                  json-encoding-lisp-style-closings)
-              ""
-            json--encoding-current-indentation)))
+  (if json-encoding-object-sort-predicate
+      (json-encode-alist (map-into hash-table 'list))
+    (format "{%s%s}"
+            (json-join
+             (let (r)
+               (json--with-indentation
+                (maphash
+                 (lambda (k v)
+                   (push (format
+                          (if json-encoding-pretty-print
+                              "%s%s: %s"
+                            "%s%s:%s")
+                          json--encoding-current-indentation
+                          (json-encode-key k)
+                          (json-encode v))
+                         r))
+                 hash-table))
+               r)
+             json-encoding-separator)
+            (if (or (not json-encoding-pretty-print)
+                    json-encoding-lisp-style-closings)
+                ""
+              json--encoding-current-indentation))))
 
 ;; List encoding (including alists and plists)
 
 (defun json-encode-alist (alist)
   "Return a JSON representation of ALIST."
+  (when json-encoding-object-sort-predicate
+    (setq alist
+          (sort alist (lambda (a b)
+                        (funcall json-encoding-object-sort-predicate
+                                 (car a) (car b))))))
   (format "{%s%s}"
           (json-join
            (json--with-indentation
@@ -466,25 +562,27 @@ Please see the documentation of `json-object-type' and 
`json-key-type'."
 
 (defun json-encode-plist (plist)
   "Return a JSON representation of PLIST."
-  (let (result)
-    (json--with-indentation
-      (while plist
-        (push (concat
-               json--encoding-current-indentation
-               (json-encode-key (car plist))
-               (if json-encoding-pretty-print
-                   ": "
-                 ":")
-               (json-encode (cadr plist)))
-              result)
-        (setq plist (cddr plist))))
-    (concat "{"
-            (json-join (nreverse result) json-encoding-separator)
-            (if (and json-encoding-pretty-print
-                     (not json-encoding-lisp-style-closings))
+  (if json-encoding-object-sort-predicate
+      (json-encode-alist (json--plist-to-alist plist))
+    (let (result)
+      (json--with-indentation
+       (while plist
+         (push (concat
                 json--encoding-current-indentation
-              "")
-            "}")))
+                (json-encode-key (car plist))
+                (if json-encoding-pretty-print
+                    ": "
+                  ":")
+                (json-encode (cadr plist)))
+               result)
+         (setq plist (cddr plist))))
+      (concat "{"
+              (json-join (nreverse result) json-encoding-separator)
+              (if (and json-encoding-pretty-print
+                       (not json-encoding-lisp-style-closings))
+                  json--encoding-current-indentation
+                "")
+              "}"))))
 
 (defun json-encode-list (list)
   "Return a JSON representation of LIST.
@@ -509,7 +607,12 @@ become JSON objects."
   ;; read values until "]"
   (let (elements)
     (while (not (char-equal (json-peek) ?\]))
+      (json-skip-whitespace)
+      (when json-pre-element-read-function
+        (funcall json-pre-element-read-function (length elements)))
       (push (json-read) elements)
+      (when json-post-element-read-function
+        (funcall json-post-element-read-function))
       (json-skip-whitespace)
       (unless (char-equal (json-peek) ?\])
         (if (char-equal (json-peek) ?,)
@@ -622,6 +725,18 @@ Advances point just past JSON object."
           (txt (delete-and-extract-region begin end)))
       (insert (json-encode (json-read-from-string txt))))))
 
+(defun json-pretty-print-buffer-ordered ()
+  "Pretty-print current buffer with object keys ordered."
+  (interactive)
+  (let ((json-encoding-object-sort-predicate 'string<))
+    (json-pretty-print-buffer)))
+
+(defun json-pretty-print-ordered (begin end)
+  "Pretty-print the region with object keys ordered."
+  (interactive "r")
+  (let ((json-encoding-object-sort-predicate 'string<))
+    (json-pretty-print begin end)))
+
 (provide 'json)
 
 ;;; json.el ends here
diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el
index e3e620c..d8f627a 100644
--- a/lisp/ldefs-boot.el
+++ b/lisp/ldefs-boot.el
@@ -1480,8 +1480,8 @@ Special commands:
 
 ;;;***
 
-;;;### (autoloads nil "auth-source" "gnus/auth-source.el" (22027
-;;;;;;  46774 676310 591000))
+;;;### (autoloads nil "auth-source" "gnus/auth-source.el" (22067
+;;;;;;  17342 158157 143000))
 ;;; Generated autoloads from gnus/auth-source.el
 
 (defvar auth-source-cache-expiry 7200 "\
@@ -1656,8 +1656,8 @@ should be non-nil).
 
 ;;;***
 
-;;;### (autoloads nil "autorevert" "autorevert.el" (21980 16567 365544
-;;;;;;  893000))
+;;;### (autoloads nil "autorevert" "autorevert.el" (22065 61995 826407
+;;;;;;  852000))
 ;;; Generated autoloads from autorevert.el
 
 (autoload 'auto-revert-mode "autorevert" "\
@@ -2742,8 +2742,8 @@ Like `bug-reference-mode', but only buttonize in comments 
and strings.
 
 ;;;***
 
-;;;### (autoloads nil "bytecomp" "emacs-lisp/bytecomp.el" (22011
-;;;;;;  58553 361858 469000))
+;;;### (autoloads nil "bytecomp" "emacs-lisp/bytecomp.el" (22067
+;;;;;;  17342 138157 143000))
 ;;; 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)
@@ -2898,7 +2898,7 @@ from the cursor position.
 
 ;;;***
 
-;;;### (autoloads nil "calc" "calc/calc.el" (22026 25907 527502 692000))
+;;;### (autoloads nil "calc" "calc/calc.el" (22039 37934 737599 199000))
 ;;; Generated autoloads from calc/calc.el
  (define-key ctl-x-map "*" 'calc-dispatch)
 
@@ -3007,8 +3007,8 @@ See the documentation for `calculator-mode' for more 
information.
 
 ;;;***
 
-;;;### (autoloads nil "calendar" "calendar/calendar.el" (22026 25907
-;;;;;;  535502 692000))
+;;;### (autoloads nil "calendar" "calendar/calendar.el" (22042 14122
+;;;;;;  205169 136000))
 ;;; Generated autoloads from calendar/calendar.el
 
 (autoload 'calendar "calendar" "\
@@ -3179,8 +3179,8 @@ the absolute file name of the file if STYLE-NAME is nil.
 
 ;;;***
 
-;;;### (autoloads nil "cc-mode" "progmodes/cc-mode.el" (22021 7991
-;;;;;;  65719 83000))
+;;;### (autoloads nil "cc-mode" "progmodes/cc-mode.el" (22040 58794
+;;;;;;  688259 771000))
 ;;; Generated autoloads from progmodes/cc-mode.el
 
 (autoload 'c-initialize-cc-mode "cc-mode" "\
@@ -3399,8 +3399,8 @@ and exists only for compatibility reasons.
 
 ;;;***
 
-;;;### (autoloads nil "ccl" "international/ccl.el" (21998 46517 74024
-;;;;;;  649000))
+;;;### (autoloads nil "ccl" "international/ccl.el" (22064 41137 985468
+;;;;;;  395000))
 ;;; Generated autoloads from international/ccl.el
 
 (autoload 'ccl-compile "ccl" "\
@@ -3409,9 +3409,9 @@ Return the compiled code of CCL-PROGRAM as a vector of 
integers.
 \(fn CCL-PROGRAM)" nil nil)
 
 (autoload 'ccl-dump "ccl" "\
-Disassemble compiled CCL-CODE.
+Disassemble compiled CCL-code CODE.
 
-\(fn CCL-CODE)" nil nil)
+\(fn CODE)" nil nil)
 
 (autoload 'declare-ccl-program "ccl" "\
 Declare NAME as a name of CCL program.
@@ -3750,25 +3750,15 @@ Choose `cfengine2-mode' or `cfengine3-mode' by buffer 
contents.
 
 ;;;***
 
-;;;### (autoloads nil "character-fold" "character-fold.el" (21973
-;;;;;;  43315 242113 285000))
+;;;### (autoloads nil "character-fold" "character-fold.el" (22068
+;;;;;;  38191 905155 451000))
 ;;; Generated autoloads from character-fold.el
 
-(defvar character-fold-search nil "\
-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
+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)
 
@@ -4233,7 +4223,7 @@ is run).
 
 ;;;***
 
-;;;### (autoloads nil "color" "color.el" (22026 25907 555502 692000))
+;;;### (autoloads nil "color" "color.el" (22055 26158 710447 352000))
 ;;; Generated autoloads from color.el
 
 (autoload 'color-name-to-rgb "color" "\
@@ -4390,8 +4380,8 @@ on third call it again advances points to the next 
difference and so on.
 
 ;;;***
 
-;;;### (autoloads nil "compile" "progmodes/compile.el" (22015 55603
-;;;;;;  789705 321000))
+;;;### (autoloads nil "compile" "progmodes/compile.el" (22032 64681
+;;;;;;  370838 183000))
 ;;; Generated autoloads from progmodes/compile.el
 
 (defvar compilation-mode-hook nil "\
@@ -5064,8 +5054,8 @@ with empty strings removed.
 
 ;;;***
 
-;;;### (autoloads nil "css-mode" "textmodes/css-mode.el" (22014 34736
-;;;;;;  811840 613000))
+;;;### (autoloads nil "css-mode" "textmodes/css-mode.el" (22038 17067
+;;;;;;  867243 731000))
 ;;; Generated autoloads from textmodes/css-mode.el
 
 (autoload 'css-mode "css-mode" "\
@@ -5140,7 +5130,7 @@ Activates the region if needed.  Only lasts until the 
region is deactivated.
 ;;;***
 
 ;;;### (autoloads nil "cursor-sensor" "emacs-lisp/cursor-sensor.el"
-;;;;;;  (21804 59688 154807 989000))
+;;;;;;  (22069 62806 562804 836000))
 ;;; Generated autoloads from emacs-lisp/cursor-sensor.el
 
 (autoload 'cursor-intangible-mode "cursor-sensor" "\
@@ -6421,7 +6411,7 @@ Optional arguments are passed to `dig-invoke'.
 
 ;;;***
 
-;;;### (autoloads nil "dired" "dired.el" (21998 46624 946024 649000))
+;;;### (autoloads nil "dired" "dired.el" (22067 17342 118157 143000))
 ;;; Generated autoloads from dired.el
 
 (defvar dired-listing-switches (purecopy "-al") "\
@@ -6776,8 +6766,8 @@ Locate SOA record and increment the serial field.
 
 ;;;***
 
-;;;### (autoloads nil "doc-view" "doc-view.el" (21716 41663 456033
-;;;;;;  27000))
+;;;### (autoloads nil "doc-view" "doc-view.el" (22058 2348 742214
+;;;;;;  951000))
 ;;; Generated autoloads from doc-view.el
 
 (autoload 'doc-view-mode-p "doc-view" "\
@@ -7617,7 +7607,7 @@ With prefix arg NOCONFIRM, execute current line as-is 
without editing.
 
 ;;;***
 
-;;;### (autoloads nil "ede" "cedet/ede.el" (21996 4784 796983 429000))
+;;;### (autoloads nil "ede" "cedet/ede.el" (22040 58794 676259 771000))
 ;;; Generated autoloads from cedet/ede.el
 (push (purecopy '(ede 1 2)) package--builtin-versions)
 
@@ -8135,8 +8125,8 @@ BUFFER is put back into its original major mode.
 
 ;;;***
 
-;;;### (autoloads nil "eieio-core" "emacs-lisp/eieio-core.el" (22009
-;;;;;;  58952 307546 645000))
+;;;### (autoloads nil "eieio-core" "emacs-lisp/eieio-core.el" (22067
+;;;;;;  17342 150157 143000))
 ;;; Generated autoloads from emacs-lisp/eieio-core.el
 (push (purecopy '(eieio-core 1 4)) package--builtin-versions)
 
@@ -8210,8 +8200,8 @@ This is suitable as an entry on `find-file-hook' or 
appropriate mode hooks.
 
 ;;;***
 
-;;;### (autoloads nil "elint" "emacs-lisp/elint.el" (21998 46516
-;;;;;;  994024 649000))
+;;;### (autoloads nil "elint" "emacs-lisp/elint.el" (22030 22952
+;;;;;;  921158 467000))
 ;;; Generated autoloads from emacs-lisp/elint.el
 
 (autoload 'elint-file "elint" "\
@@ -8309,8 +8299,8 @@ Other values are interpreted as usual.
 
 ;;;***
 
-;;;### (autoloads nil "emacsbug" "mail/emacsbug.el" (21989 31537
-;;;;;;  887825 721000))
+;;;### (autoloads nil "emacsbug" "mail/emacsbug.el" (22030 22952
+;;;;;;  933158 467000))
 ;;; Generated autoloads from mail/emacsbug.el
 
 (autoload 'report-emacs-bug "emacsbug" "\
@@ -9272,8 +9262,8 @@ Add a file to `erc-xdcc-files'.
 
 ;;;***
 
-;;;### (autoloads nil "ert" "emacs-lisp/ert.el" (22011 58553 409858
-;;;;;;  469000))
+;;;### (autoloads nil "ert" "emacs-lisp/ert.el" (22063 20273 739891
+;;;;;;  395000))
 ;;; Generated autoloads from emacs-lisp/ert.el
 
 (autoload 'ert-deftest "ert" "\
@@ -9355,8 +9345,8 @@ Kill all test buffers that are still live.
 
 ;;;***
 
-;;;### (autoloads nil "esh-mode" "eshell/esh-mode.el" (22003 64432
-;;;;;;  600146 533000))
+;;;### (autoloads nil "esh-mode" "eshell/esh-mode.el" (22065 61995
+;;;;;;  862407 852000))
 ;;; Generated autoloads from eshell/esh-mode.el
 
 (autoload 'eshell-mode "esh-mode" "\
@@ -10034,7 +10024,7 @@ fourth arg NOSEP non-nil inhibits this.
 
 ;;;***
 
-;;;### (autoloads nil "eww" "net/eww.el" (22011 58553 761858 469000))
+;;;### (autoloads nil "eww" "net/eww.el" (22063 20273 743891 395000))
 ;;; Generated autoloads from net/eww.el
 
 (defvar eww-suggest-uris '(eww-links-at-point url-get-url-at-point 
eww-current-url) "\
@@ -10570,8 +10560,8 @@ the name is considered already unique; only the second 
substitution
 
 ;;;***
 
-;;;### (autoloads nil "filenotify" "filenotify.el" (22019 52657 867929
-;;;;;;  676000))
+;;;### (autoloads nil "filenotify" "filenotify.el" (22069 62806 562804
+;;;;;;  836000))
 ;;; Generated autoloads from filenotify.el
 
 (autoload 'file-notify-handle-event "filenotify" "\
@@ -11648,8 +11638,8 @@ Interactively, reads the register using 
`register-read-with-preview'.
 
 ;;;***
 
-;;;### (autoloads nil "gdb-mi" "progmodes/gdb-mi.el" (22029 2088
-;;;;;;  514685 339000))
+;;;### (autoloads nil "gdb-mi" "progmodes/gdb-mi.el" (22030 22952
+;;;;;;  977158 467000))
 ;;; Generated autoloads from progmodes/gdb-mi.el
 
 (defvar gdb-enable-debug nil "\
@@ -12770,8 +12760,8 @@ Retrieve MAIL-ADDRESS gravatar and returns it.
 
 ;;;***
 
-;;;### (autoloads nil "grep" "progmodes/grep.el" (22027 46774 676310
-;;;;;;  591000))
+;;;### (autoloads nil "grep" "progmodes/grep.el" (22061 64938 520287
+;;;;;;  963000))
 ;;; Generated autoloads from progmodes/grep.el
 
 (defvar grep-window-height nil "\
@@ -12853,20 +12843,23 @@ Sets `grep-last-buffer' and 
`compilation-window-height'.
 \(fn)" nil nil)
 
 (autoload 'grep "grep" "\
-Run grep, with user-specified args, and collect output in a buffer.
-While grep runs asynchronously, you can use \\[next-error] (M-x next-error),
-or \\<grep-mode-map>\\[compile-goto-error] in the *grep* buffer, to go to the 
lines where grep found
-matches.  To kill the grep job before it finishes, type \\[kill-compilation].
+Run Grep with user-specified COMMAND-ARGS, collect output in a buffer.
+While Grep runs asynchronously, you can use \\[next-error] (M-x next-error),
+or \\<grep-mode-map>\\[compile-goto-error] in the *grep* buffer, to go to the 
lines where Grep found
+matches.  To kill the Grep job before it finishes, type \\[kill-compilation].
+
+Noninteractively, COMMAND-ARGS should specify the Grep command-line
+arguments.
 
 For doing a recursive `grep', see the `rgrep' command.  For running
-`grep' in a specific directory, see `lgrep'.
+Grep in a specific directory, see `lgrep'.
 
 This command uses a special history list for its COMMAND-ARGS, so you
 can easily repeat a grep command.
 
-A prefix argument says to default the argument based upon the current
-tag the cursor is over, substituting it into the last grep command
-in the grep command history (or into `grep-command' if that history
+A prefix argument says to default the COMMAND-ARGS based on the current
+tag the cursor is over, substituting it into the last Grep command
+in the Grep command history (or into `grep-command' if that history
 list is empty).
 
 \(fn COMMAND-ARGS)" t nil)
@@ -13364,8 +13357,8 @@ different regions.  With numeric argument ARG, behaves 
like
 
 ;;;***
 
-;;;### (autoloads nil "help-fns" "help-fns.el" (22011 58553 601858
-;;;;;;  469000))
+;;;### (autoloads nil "help-fns" "help-fns.el" (22067 17342 162157
+;;;;;;  143000))
 ;;; Generated autoloads from help-fns.el
 
 (autoload 'describe-function "help-fns" "\
@@ -13582,7 +13575,7 @@ Provide help for current mode.
 
 ;;;***
 
-;;;### (autoloads nil "hexl" "hexl.el" (21985 34484 226705 925000))
+;;;### (autoloads nil "hexl" "hexl.el" (22056 47028 723798 795000))
 ;;; Generated autoloads from hexl.el
 
 (autoload 'hexl-mode "hexl" "\
@@ -14429,8 +14422,8 @@ bound to the current value of the filter.
 
 ;;;***
 
-;;;### (autoloads nil "ibuffer" "ibuffer.el" (22026 25907 595502
-;;;;;;  692000))
+;;;### (autoloads nil "ibuffer" "ibuffer.el" (22032 64681 350838
+;;;;;;  183000))
 ;;; Generated autoloads from ibuffer.el
 
 (autoload 'ibuffer-list-buffers "ibuffer" "\
@@ -15022,7 +15015,7 @@ DEF, if non-nil, is the default value.
 
 ;;;***
 
-;;;### (autoloads nil "ielm" "ielm.el" (21980 16567 705544 893000))
+;;;### (autoloads nil "ielm" "ielm.el" (22067 17342 170157 143000))
 ;;; Generated autoloads from ielm.el
 
 (autoload 'ielm "ielm" "\
@@ -15050,7 +15043,7 @@ the mode if ARG is omitted or nil, and toggle it if ARG 
is `toggle'.
 
 ;;;***
 
-;;;### (autoloads nil "image" "image.el" (22011 58553 641858 469000))
+;;;### (autoloads nil "image" "image.el" (22048 52907 35535 316000))
 ;;; Generated autoloads from image.el
 
 (autoload 'image-type-from-data "image" "\
@@ -15680,7 +15673,7 @@ of `inferior-lisp-program').  Runs the hooks from
 
 ;;;***
 
-;;;### (autoloads nil "info" "info.el" (22011 58553 645858 469000))
+;;;### (autoloads nil "info" "info.el" (22056 47028 727798 795000))
 ;;; 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 
[...]
@@ -15940,8 +15933,8 @@ Perform completion on file preceding point.
 
 ;;;***
 
-;;;### (autoloads nil "info-xref" "info-xref.el" (21978 61237 550488
-;;;;;;  269000))
+;;;### (autoloads nil "info-xref" "info-xref.el" (22030 22952 929158
+;;;;;;  467000))
 ;;; Generated autoloads from info-xref.el
 (push (purecopy '(info-xref 3)) package--builtin-versions)
 
@@ -16569,8 +16562,8 @@ by `jka-compr-installed'.
 
 ;;;***
 
-;;;### (autoloads nil "js" "progmodes/js.el" (22026 25907 635502
-;;;;;;  692000))
+;;;### (autoloads nil "js" "progmodes/js.el" (22069 62806 682804
+;;;;;;  836000))
 ;;; Generated autoloads from progmodes/js.el
 (push (purecopy '(js 9)) package--builtin-versions)
 
@@ -16578,13 +16571,26 @@ by `jka-compr-installed'.
 Major mode for editing JavaScript.
 
 \(fn)" t nil)
+
+(autoload 'js-jsx-mode "js" "\
+Major mode for editing JSX.
+
+To customize the indentation for this mode, set the SGML offset
+variables (`sgml-basic-offset', `sgml-attribute-offset' et al)
+locally, like so:
+
+  (defun set-jsx-indentation ()
+    (setq-local sgml-basic-offset js-indent-level))
+  (add-hook 'js-jsx-mode-hook #'set-jsx-indentation)
+
+\(fn)" t nil)
  (defalias 'javascript-mode 'js-mode)
 
 (dolist (name (list "node" "nodejs" "gjs" "rhino")) (add-to-list 
'interpreter-mode-alist (cons (purecopy name) 'js-mode)))
 
 ;;;***
 
-;;;### (autoloads nil "json" "json.el" (21998 46517 78024 649000))
+;;;### (autoloads nil "json" "json.el" (22064 41137 993468 395000))
 ;;; Generated autoloads from json.el
 (push (purecopy '(json 1 4)) package--builtin-versions)
 
@@ -17817,8 +17823,8 @@ Default bookmark handler for Man buffers.
 
 ;;;***
 
-;;;### (autoloads nil "map" "emacs-lisp/map.el" (21996 4784 808983
-;;;;;;  429000))
+;;;### (autoloads nil "map" "emacs-lisp/map.el" (22063 20273 739891
+;;;;;;  395000))
 ;;; Generated autoloads from emacs-lisp/map.el
 (push (purecopy '(map 1 0)) package--builtin-versions)
 
@@ -18199,7 +18205,7 @@ delete the draft message.
 
 ;;;***
 
-;;;### (autoloads nil "mh-e" "mh-e/mh-e.el" (22011 58553 749858 469000))
+;;;### (autoloads nil "mh-e" "mh-e/mh-e.el" (22030 22952 945158 467000))
 ;;; Generated autoloads from mh-e/mh-e.el
 (push (purecopy '(mh-e 8 6)) package--builtin-versions)
 
@@ -18660,8 +18666,8 @@ body) or \"attachment\" (separate from the body).
 
 ;;;***
 
-;;;### (autoloads nil "mode-local" "cedet/mode-local.el" (22011 58553
-;;;;;;  245858 469000))
+;;;### (autoloads nil "mode-local" "cedet/mode-local.el" (22030 22952
+;;;;;;  905158 467000))
 ;;; Generated autoloads from cedet/mode-local.el
 
 (put 'define-overloadable-function 'doc-string-elt 3)
@@ -18776,7 +18782,7 @@ To test this function, evaluate:
 
 ;;;***
 
-;;;### (autoloads nil "mpc" "mpc.el" (22002 43570 536887 749000))
+;;;### (autoloads nil "mpc" "mpc.el" (22050 8240 94934 108000))
 ;;; Generated autoloads from mpc.el
 
 (autoload 'mpc "mpc" "\
@@ -19384,8 +19390,8 @@ running already.
 
 ;;;***
 
-;;;### (autoloads nil "newst-treeview" "net/newst-treeview.el" (21998
-;;;;;;  46517 110024 649000))
+;;;### (autoloads nil "newst-treeview" "net/newst-treeview.el" (22030
+;;;;;;  22952 973158 467000))
 ;;; Generated autoloads from net/newst-treeview.el
 
 (autoload 'newsticker-treeview "newst-treeview" "\
@@ -19433,7 +19439,7 @@ This command does not work if you use short group names.
 
 ;;;***
 
-;;;### (autoloads nil "nnml" "gnus/nnml.el" (21948 40114 266686 453000))
+;;;### (autoloads nil "nnml" "gnus/nnml.el" (22054 5291 911134 163000))
 ;;; Generated autoloads from gnus/nnml.el
 
 (autoload 'nnml-generate-nov-databases "nnml" "\
@@ -19490,9 +19496,9 @@ closing requests for requests that are used in matched 
pairs.
 
 ;;;***
 
-;;;### (autoloads nil "ntlm" "net/ntlm.el" (21997 25649 666447 325000))
+;;;### (autoloads nil "ntlm" "net/ntlm.el" (22069 62806 678804 836000))
 ;;; Generated autoloads from net/ntlm.el
-(push (purecopy '(ntlm 2 0)) package--builtin-versions)
+(push (purecopy '(ntlm 2 0 0)) package--builtin-versions)
 
 ;;;***
 
@@ -20343,8 +20349,8 @@ See the command `outline-mode' for more information on 
this mode.
 
 ;;;***
 
-;;;### (autoloads nil "package" "emacs-lisp/package.el" (22000 31493
-;;;;;;  736082 901000))
+;;;### (autoloads nil "package" "emacs-lisp/package.el" (22059 23214
+;;;;;;  33660 839000))
 ;;; Generated autoloads from emacs-lisp/package.el
 (push (purecopy '(package 1 0 1)) package--builtin-versions)
 
@@ -20388,7 +20394,7 @@ downloads in the background.
 
 (autoload 'package-install "package" "\
 Install the package PKG.
-PKG can be a package-desc or the package name of one the available packages
+PKG can be a package-desc or a symbol naming one of the available packages
 in an archive in `package-archives'.  Interactively, prompt for its name.
 
 If called interactively or if DONT-SELECT nil, add PKG to
@@ -20883,7 +20889,7 @@ Setup `shell-mode' to use pcomplete.
 
 ;;;***
 
-;;;### (autoloads nil "pcvs" "vc/pcvs.el" (21985 34484 302705 925000))
+;;;### (autoloads nil "pcvs" "vc/pcvs.el" (22065 61995 886407 852000))
 ;;; Generated autoloads from vc/pcvs.el
 
 (autoload 'cvs-checkout "pcvs" "\
@@ -21878,8 +21884,8 @@ Return the project instance in DIR or 
`default-directory'.
 
 ;;;***
 
-;;;### (autoloads nil "prolog" "progmodes/prolog.el" (22027 46774
-;;;;;;  684310 591000))
+;;;### (autoloads nil "prolog" "progmodes/prolog.el" (22040 58794
+;;;;;;  692259 771000))
 ;;; Generated autoloads from progmodes/prolog.el
 
 (autoload 'prolog-mode "prolog" "\
@@ -22187,8 +22193,8 @@ Optional argument FACE specifies the face to do the 
highlighting.
 
 ;;;***
 
-;;;### (autoloads nil "python" "progmodes/python.el" (22026 25907
-;;;;;;  639502 692000))
+;;;### (autoloads nil "python" "progmodes/python.el" (22069 62806
+;;;;;;  686804 836000))
 ;;; Generated autoloads from progmodes/python.el
 (push (purecopy '(python 0 25 1)) package--builtin-versions)
 
@@ -22821,8 +22827,8 @@ For true \"word wrap\" behavior, use `visual-line-mode' 
instead.
 
 ;;;***
 
-;;;### (autoloads nil "reftex" "textmodes/reftex.el" (22026 25907
-;;;;;;  655502 692000))
+;;;### (autoloads nil "reftex" "textmodes/reftex.el" (22056 47028
+;;;;;;  787798 795000))
 ;;; Generated autoloads from textmodes/reftex.el
 (autoload 'reftex-citation "reftex-cite" nil t)
 (autoload 'reftex-all-document-files "reftex-parse")
@@ -23572,8 +23578,8 @@ Toggle the use of ROT13 encoding for the current window.
 
 ;;;***
 
-;;;### (autoloads nil "rst" "textmodes/rst.el" (22026 25907 659502
-;;;;;;  692000))
+;;;### (autoloads nil "rst" "textmodes/rst.el" (22034 20008 325500
+;;;;;;  287000))
 ;;; Generated autoloads from textmodes/rst.el
  (add-to-list 'auto-mode-alist (purecopy '("\\.re?st\\'" . rst-mode)))
 
@@ -24481,14 +24487,14 @@ Like `mail' command, but display mail buffer in 
another frame.
 
 ;;;***
 
-;;;### (autoloads nil "seq" "emacs-lisp/seq.el" (22026 25907 583502
-;;;;;;  692000))
+;;;### (autoloads nil "seq" "emacs-lisp/seq.el" (22065 61995 842407
+;;;;;;  852000))
 ;;; Generated autoloads from emacs-lisp/seq.el
-(push (purecopy '(seq 2 0)) package--builtin-versions)
+(push (purecopy '(seq 2 2)) package--builtin-versions)
 
 ;;;***
 
-;;;### (autoloads nil "server" "server.el" (21998 46517 270024 649000))
+;;;### (autoloads nil "server" "server.el" (22056 47028 775798 795000))
 ;;; Generated autoloads from server.el
 
 (put 'server-host 'risky-local-variable t)
@@ -24665,8 +24671,8 @@ To work around that, do:
 
 ;;;***
 
-;;;### (autoloads nil "sh-script" "progmodes/sh-script.el" (22027
-;;;;;;  46774 688310 591000))
+;;;### (autoloads nil "sh-script" "progmodes/sh-script.el" (22061
+;;;;;;  64938 532287 963000))
 ;;; Generated autoloads from progmodes/sh-script.el
 (push (purecopy '(sh-script 2 0 6)) package--builtin-versions)
 (put 'sh-shell 'safe-local-variable 'symbolp)
@@ -24866,7 +24872,7 @@ Otherwise, one argument `-i' is passed to the shell.
 
 ;;;***
 
-;;;### (autoloads nil "shr" "net/shr.el" (22026 25907 631502 692000))
+;;;### (autoloads nil "shr" "net/shr.el" (22047 32042 328736 723000))
 ;;; Generated autoloads from net/shr.el
 
 (autoload 'shr-render-region "shr" "\
@@ -25210,6 +25216,20 @@ then `snmpv2-mode-hook'.
 
 ;;;***
 
+;;;### (autoloads nil "soap-client" "net/soap-client.el" (22061 64938
+;;;;;;  516287 963000))
+;;; Generated autoloads from net/soap-client.el
+(push (purecopy '(soap-client 3 0 1)) package--builtin-versions)
+
+;;;***
+
+;;;### (autoloads nil "soap-inspect" "net/soap-inspect.el" (22061
+;;;;;;  64938 516287 963000))
+;;; Generated autoloads from net/soap-inspect.el
+(push (purecopy '(soap-client 3 0 1)) package--builtin-versions)
+
+;;;***
+
 ;;;### (autoloads nil "solar" "calendar/solar.el" (21849 48176 337264
 ;;;;;;  443000))
 ;;; Generated autoloads from calendar/solar.el
@@ -27091,7 +27111,7 @@ Normally input is edited in Emacs and sent a line at a 
time.
 
 ;;;***
 
-;;;### (autoloads nil "term" "term.el" (22011 58553 997858 469000))
+;;;### (autoloads nil "term" "term.el" (22042 14122 209169 136000))
 ;;; Generated autoloads from term.el
 
 (autoload 'make-term "term" "\
@@ -27170,8 +27190,8 @@ tetris-mode keybindings:
 
 ;;;***
 
-;;;### (autoloads nil "tex-mode" "textmodes/tex-mode.el" (22026 25907
-;;;;;;  663502 692000))
+;;;### (autoloads nil "tex-mode" "textmodes/tex-mode.el" (22064 41138
+;;;;;;  13468 395000))
 ;;; Generated autoloads from textmodes/tex-mode.el
 
 (defvar tex-shell-file-name nil "\
@@ -27724,6 +27744,13 @@ In dired, call the setroot program on the image at 
point.
 
 ;;;***
 
+;;;### (autoloads nil "thunk" "emacs-lisp/thunk.el" (22064 41137
+;;;;;;  961468 395000))
+;;; Generated autoloads from emacs-lisp/thunk.el
+(push (purecopy '(thunk 1 0)) package--builtin-versions)
+
+;;;***
+
 ;;;### (autoloads nil "tibet-util" "language/tibet-util.el" (21670
 ;;;;;;  32331 385639 720000))
 ;;; Generated autoloads from language/tibet-util.el
@@ -28446,8 +28473,7 @@ the output buffer or changing the window configuration.
 
 ;;;***
 
-;;;### (autoloads nil "tramp" "net/tramp.el" (22015 55603 713705
-;;;;;;  321000))
+;;;### (autoloads nil "tramp" "net/tramp.el" (22064 41138 9468 395000))
 ;;; Generated autoloads from net/tramp.el
 
 (defvar tramp-mode t "\
@@ -29114,8 +29140,8 @@ overriding the value of `url-gateway-method'.
 
 ;;;***
 
-;;;### (autoloads nil "url-handlers" "url/url-handlers.el" (22011
-;;;;;;  58554 85858 469000))
+;;;### (autoloads nil "url-handlers" "url/url-handlers.el" (22065
+;;;;;;  61995 878407 852000))
 ;;; Generated autoloads from url/url-handlers.el
 
 (defvar url-handler-mode nil "\
@@ -30015,8 +30041,8 @@ should be applied to the background or to the 
foreground.
 
 ;;;***
 
-;;;### (autoloads nil "vc-bzr" "vc/vc-bzr.el" (22014 34736 819840
-;;;;;;  613000))
+;;;### (autoloads nil "vc-bzr" "vc/vc-bzr.el" (22064 41138 13468
+;;;;;;  395000))
 ;;; Generated autoloads from vc/vc-bzr.el
 
 (defconst vc-bzr-admin-dirname ".bzr" "\
@@ -30032,8 +30058,8 @@ Name of the format file in a .bzr directory.")
 
 ;;;***
 
-;;;### (autoloads nil "vc-cvs" "vc/vc-cvs.el" (22014 34736 823840
-;;;;;;  613000))
+;;;### (autoloads nil "vc-cvs" "vc/vc-cvs.el" (22064 41138 17468
+;;;;;;  395000))
 ;;; Generated autoloads from vc/vc-cvs.el
 (defun vc-cvs-registered (f)
   "Return non-nil if file F is registered with CVS."
@@ -30044,8 +30070,8 @@ Name of the format file in a .bzr directory.")
 
 ;;;***
 
-;;;### (autoloads nil "vc-dir" "vc/vc-dir.el" (21842 40083 319216
-;;;;;;  272000))
+;;;### (autoloads nil "vc-dir" "vc/vc-dir.el" (22055 26158 818447
+;;;;;;  352000))
 ;;; Generated autoloads from vc/vc-dir.el
 
 (autoload 'vc-dir "vc-dir" "\
@@ -30093,8 +30119,8 @@ case, and the process object in the asynchronous case.
 
 ;;;***
 
-;;;### (autoloads nil "vc-git" "vc/vc-git.el" (22014 34736 835840
-;;;;;;  613000))
+;;;### (autoloads nil "vc-git" "vc/vc-git.el" (22064 41138 17468
+;;;;;;  395000))
 ;;; Generated autoloads from vc/vc-git.el
  (defun vc-git-registered (file)
   "Return non-nil if FILE is registered with git."
@@ -30105,7 +30131,7 @@ case, and the process object in the asynchronous case.
 
 ;;;***
 
-;;;### (autoloads nil "vc-hg" "vc/vc-hg.el" (22014 34736 835840 613000))
+;;;### (autoloads nil "vc-hg" "vc/vc-hg.el" (22064 41138 21468 395000))
 ;;; Generated autoloads from vc/vc-hg.el
  (defun vc-hg-registered (file)
   "Return non-nil if FILE is registered with hg."
@@ -30116,8 +30142,8 @@ case, and the process object in the asynchronous case.
 
 ;;;***
 
-;;;### (autoloads nil "vc-mtn" "vc/vc-mtn.el" (22014 34736 839840
-;;;;;;  613000))
+;;;### (autoloads nil "vc-mtn" "vc/vc-mtn.el" (22064 41138 21468
+;;;;;;  395000))
 ;;; Generated autoloads from vc/vc-mtn.el
 
 (defconst vc-mtn-admin-dir "_MTN" "\
@@ -30180,8 +30206,8 @@ For a description of possible values, see 
`vc-check-master-templates'.")
 
 ;;;***
 
-;;;### (autoloads nil "vc-svn" "vc/vc-svn.el" (22011 58554 97858
-;;;;;;  469000))
+;;;### (autoloads nil "vc-svn" "vc/vc-svn.el" (22064 41138 21468
+;;;;;;  395000))
 ;;; Generated autoloads from vc/vc-svn.el
  (defun vc-svn-registered (f)
   (let ((admin-dir (cond ((and (eq system-type 'windows-nt)
@@ -31918,7 +31944,7 @@ Default MODIFIER is 'shift.
 
 ;;;***
 
-;;;### (autoloads nil "winner" "winner.el" (22009 58952 311546 645000))
+;;;### (autoloads nil "winner" "winner.el" (22030 22953 17158 467000))
 ;;; Generated autoloads from winner.el
 
 (defvar winner-mode nil "\
@@ -32191,37 +32217,37 @@ Zone out, completely.
 ;;;;;;  "calc/calc-fin.el" "calc/calc-forms.el" "calc/calc-frac.el"
 ;;;;;;  "calc/calc-funcs.el" "calc/calc-graph.el" "calc/calc-help.el"
 ;;;;;;  "calc/calc-incom.el" "calc/calc-keypd.el" "calc/calc-lang.el"
-;;;;;;  "calc/calc-loaddefs.el" "calc/calc-macs.el" "calc/calc-map.el"
-;;;;;;  "calc/calc-math.el" "calc/calc-menu.el" "calc/calc-misc.el"
-;;;;;;  "calc/calc-mode.el" "calc/calc-mtx.el" "calc/calc-nlfit.el"
-;;;;;;  "calc/calc-poly.el" "calc/calc-prog.el" "calc/calc-rewr.el"
-;;;;;;  "calc/calc-rules.el" "calc/calc-sel.el" "calc/calc-stat.el"
-;;;;;;  "calc/calc-store.el" "calc/calc-stuff.el" "calc/calc-trail.el"
-;;;;;;  "calc/calc-units.el" "calc/calc-vec.el" "calc/calc-yank.el"
-;;;;;;  "calc/calcalg2.el" "calc/calcalg3.el" "calc/calccomp.el"
-;;;;;;  "calc/calcsel2.el" "calendar/cal-bahai.el" "calendar/cal-coptic.el"
-;;;;;;  "calendar/cal-french.el" "calendar/cal-html.el" "calendar/cal-islam.el"
-;;;;;;  "calendar/cal-iso.el" "calendar/cal-julian.el" 
"calendar/cal-loaddefs.el"
-;;;;;;  "calendar/cal-mayan.el" "calendar/cal-menu.el" "calendar/cal-move.el"
-;;;;;;  "calendar/cal-persia.el" "calendar/cal-tex.el" "calendar/cal-x.el"
-;;;;;;  "calendar/diary-loaddefs.el" "calendar/hol-loaddefs.el" "cdl.el"
-;;;;;;  "cedet/cedet-cscope.el" "cedet/cedet-files.el" "cedet/cedet-global.el"
-;;;;;;  "cedet/cedet-idutils.el" "cedet/ede/auto.el" 
"cedet/ede/autoconf-edit.el"
-;;;;;;  "cedet/ede/base.el" "cedet/ede/config.el" "cedet/ede/cpp-root.el"
-;;;;;;  "cedet/ede/custom.el" "cedet/ede/detect.el" "cedet/ede/dired.el"
-;;;;;;  "cedet/ede/emacs.el" "cedet/ede/files.el" "cedet/ede/generic.el"
-;;;;;;  "cedet/ede/linux.el" "cedet/ede/loaddefs.el" "cedet/ede/locate.el"
-;;;;;;  "cedet/ede/make.el" "cedet/ede/makefile-edit.el" "cedet/ede/pconf.el"
-;;;;;;  "cedet/ede/pmake.el" "cedet/ede/proj-archive.el" 
"cedet/ede/proj-aux.el"
-;;;;;;  "cedet/ede/proj-comp.el" "cedet/ede/proj-elisp.el" 
"cedet/ede/proj-info.el"
-;;;;;;  "cedet/ede/proj-misc.el" "cedet/ede/proj-obj.el" 
"cedet/ede/proj-prog.el"
-;;;;;;  "cedet/ede/proj-scheme.el" "cedet/ede/proj-shared.el" 
"cedet/ede/proj.el"
-;;;;;;  "cedet/ede/project-am.el" "cedet/ede/shell.el" "cedet/ede/simple.el"
-;;;;;;  "cedet/ede/source.el" "cedet/ede/speedbar.el" "cedet/ede/srecode.el"
-;;;;;;  "cedet/ede/system.el" "cedet/ede/util.el" "cedet/semantic/analyze.el"
-;;;;;;  "cedet/semantic/analyze/complete.el" "cedet/semantic/analyze/debug.el"
-;;;;;;  "cedet/semantic/analyze/fcn.el" "cedet/semantic/analyze/refs.el"
-;;;;;;  "cedet/semantic/bovine.el" "cedet/semantic/bovine/c.el" 
"cedet/semantic/bovine/debug.el"
+;;;;;;  "calc/calc-macs.el" "calc/calc-map.el" "calc/calc-math.el"
+;;;;;;  "calc/calc-menu.el" "calc/calc-misc.el" "calc/calc-mode.el"
+;;;;;;  "calc/calc-mtx.el" "calc/calc-nlfit.el" "calc/calc-poly.el"
+;;;;;;  "calc/calc-prog.el" "calc/calc-rewr.el" "calc/calc-rules.el"
+;;;;;;  "calc/calc-sel.el" "calc/calc-stat.el" "calc/calc-store.el"
+;;;;;;  "calc/calc-stuff.el" "calc/calc-trail.el" "calc/calc-units.el"
+;;;;;;  "calc/calc-vec.el" "calc/calc-yank.el" "calc/calcalg2.el"
+;;;;;;  "calc/calcalg3.el" "calc/calccomp.el" "calc/calcsel2.el"
+;;;;;;  "calendar/cal-bahai.el" "calendar/cal-coptic.el" 
"calendar/cal-french.el"
+;;;;;;  "calendar/cal-html.el" "calendar/cal-islam.el" "calendar/cal-iso.el"
+;;;;;;  "calendar/cal-julian.el" "calendar/cal-loaddefs.el" 
"calendar/cal-mayan.el"
+;;;;;;  "calendar/cal-menu.el" "calendar/cal-move.el" "calendar/cal-persia.el"
+;;;;;;  "calendar/cal-tex.el" "calendar/cal-x.el" "calendar/diary-loaddefs.el"
+;;;;;;  "calendar/hol-loaddefs.el" "cdl.el" "cedet/cedet-cscope.el"
+;;;;;;  "cedet/cedet-files.el" "cedet/cedet-global.el" "cedet/cedet-idutils.el"
+;;;;;;  "cedet/ede/auto.el" "cedet/ede/autoconf-edit.el" "cedet/ede/base.el"
+;;;;;;  "cedet/ede/config.el" "cedet/ede/cpp-root.el" "cedet/ede/custom.el"
+;;;;;;  "cedet/ede/detect.el" "cedet/ede/dired.el" "cedet/ede/emacs.el"
+;;;;;;  "cedet/ede/files.el" "cedet/ede/generic.el" "cedet/ede/linux.el"
+;;;;;;  "cedet/ede/locate.el" "cedet/ede/make.el" "cedet/ede/makefile-edit.el"
+;;;;;;  "cedet/ede/pconf.el" "cedet/ede/pmake.el" "cedet/ede/proj-archive.el"
+;;;;;;  "cedet/ede/proj-aux.el" "cedet/ede/proj-comp.el" 
"cedet/ede/proj-elisp.el"
+;;;;;;  "cedet/ede/proj-info.el" "cedet/ede/proj-misc.el" 
"cedet/ede/proj-obj.el"
+;;;;;;  "cedet/ede/proj-prog.el" "cedet/ede/proj-scheme.el" 
"cedet/ede/proj-shared.el"
+;;;;;;  "cedet/ede/proj.el" "cedet/ede/project-am.el" "cedet/ede/shell.el"
+;;;;;;  "cedet/ede/simple.el" "cedet/ede/source.el" "cedet/ede/speedbar.el"
+;;;;;;  "cedet/ede/srecode.el" "cedet/ede/system.el" "cedet/ede/util.el"
+;;;;;;  "cedet/semantic/analyze.el" "cedet/semantic/analyze/complete.el"
+;;;;;;  "cedet/semantic/analyze/debug.el" "cedet/semantic/analyze/fcn.el"
+;;;;;;  "cedet/semantic/analyze/refs.el" "cedet/semantic/bovine.el"
+;;;;;;  "cedet/semantic/bovine/c.el" "cedet/semantic/bovine/debug.el"
 ;;;;;;  "cedet/semantic/bovine/el.el" "cedet/semantic/bovine/gcc.el"
 ;;;;;;  "cedet/semantic/bovine/make.el" "cedet/semantic/bovine/scm.el"
 ;;;;;;  "cedet/semantic/chart.el" "cedet/semantic/complete.el" 
"cedet/semantic/ctxt.el"
@@ -32236,13 +32262,13 @@ Zone out, completely.
 ;;;;;;  "cedet/semantic/fw.el" "cedet/semantic/grammar-wy.el" 
"cedet/semantic/grammar.el"
 ;;;;;;  "cedet/semantic/html.el" "cedet/semantic/ia-sb.el" 
"cedet/semantic/ia.el"
 ;;;;;;  "cedet/semantic/idle.el" "cedet/semantic/imenu.el" 
"cedet/semantic/java.el"
-;;;;;;  "cedet/semantic/lex-spp.el" "cedet/semantic/lex.el" 
"cedet/semantic/loaddefs.el"
-;;;;;;  "cedet/semantic/mru-bookmark.el" "cedet/semantic/sb.el" 
"cedet/semantic/scope.el"
-;;;;;;  "cedet/semantic/senator.el" "cedet/semantic/sort.el" 
"cedet/semantic/symref.el"
-;;;;;;  "cedet/semantic/symref/cscope.el" "cedet/semantic/symref/filter.el"
-;;;;;;  "cedet/semantic/symref/global.el" "cedet/semantic/symref/grep.el"
-;;;;;;  "cedet/semantic/symref/idutils.el" "cedet/semantic/symref/list.el"
-;;;;;;  "cedet/semantic/tag-file.el" "cedet/semantic/tag-ls.el" 
"cedet/semantic/tag-write.el"
+;;;;;;  "cedet/semantic/lex-spp.el" "cedet/semantic/lex.el" 
"cedet/semantic/mru-bookmark.el"
+;;;;;;  "cedet/semantic/sb.el" "cedet/semantic/scope.el" 
"cedet/semantic/senator.el"
+;;;;;;  "cedet/semantic/sort.el" "cedet/semantic/symref.el" 
"cedet/semantic/symref/cscope.el"
+;;;;;;  "cedet/semantic/symref/filter.el" "cedet/semantic/symref/global.el"
+;;;;;;  "cedet/semantic/symref/grep.el" "cedet/semantic/symref/idutils.el"
+;;;;;;  "cedet/semantic/symref/list.el" "cedet/semantic/tag-file.el"
+;;;;;;  "cedet/semantic/tag-ls.el" "cedet/semantic/tag-write.el"
 ;;;;;;  "cedet/semantic/tag.el" "cedet/semantic/texi.el" 
"cedet/semantic/util-modes.el"
 ;;;;;;  "cedet/semantic/util.el" "cedet/semantic/wisent.el" 
"cedet/semantic/wisent/comp.el"
 ;;;;;;  "cedet/semantic/wisent/java-tags.el" 
"cedet/semantic/wisent/javascript.el"
@@ -32252,56 +32278,55 @@ Zone out, completely.
 ;;;;;;  "cedet/srecode/el.el" "cedet/srecode/expandproto.el" 
"cedet/srecode/extract.el"
 ;;;;;;  "cedet/srecode/fields.el" "cedet/srecode/filters.el" 
"cedet/srecode/find.el"
 ;;;;;;  "cedet/srecode/getset.el" "cedet/srecode/insert.el" 
"cedet/srecode/java.el"
-;;;;;;  "cedet/srecode/loaddefs.el" "cedet/srecode/map.el" 
"cedet/srecode/mode.el"
-;;;;;;  "cedet/srecode/semantic.el" "cedet/srecode/srt.el" 
"cedet/srecode/table.el"
-;;;;;;  "cedet/srecode/template.el" "cedet/srecode/texi.el" "cus-dep.el"
-;;;;;;  "dframe.el" "dired-aux.el" "dired-x.el" "dom.el" "dos-fns.el"
-;;;;;;  "dos-vars.el" "dos-w32.el" "dynamic-setting.el" 
"emacs-lisp/avl-tree.el"
-;;;;;;  "emacs-lisp/bindat.el" "emacs-lisp/byte-opt.el" 
"emacs-lisp/cl-extra.el"
-;;;;;;  "emacs-lisp/cl-loaddefs.el" "emacs-lisp/cl-macs.el" 
"emacs-lisp/cl-seq.el"
-;;;;;;  "emacs-lisp/cl.el" "emacs-lisp/eieio-base.el" 
"emacs-lisp/eieio-compat.el"
-;;;;;;  "emacs-lisp/eieio-custom.el" "emacs-lisp/eieio-datadebug.el"
-;;;;;;  "emacs-lisp/eieio-opt.el" "emacs-lisp/eieio-speedbar.el"
-;;;;;;  "emacs-lisp/generator.el" "emacs-lisp/lisp-mnt.el" 
"emacs-lisp/package-x.el"
-;;;;;;  "emacs-lisp/smie.el" "emacs-lisp/subr-x.el" "emacs-lisp/tcover-ses.el"
-;;;;;;  "emacs-lisp/tcover-unsafep.el" "emulation/cua-gmrk.el" 
"emulation/edt-lk201.el"
-;;;;;;  "emulation/edt-mapper.el" "emulation/edt-pc.el" 
"emulation/edt-vt100.el"
-;;;;;;  "emulation/viper-cmd.el" "emulation/viper-ex.el" 
"emulation/viper-init.el"
-;;;;;;  "emulation/viper-keym.el" "emulation/viper-macs.el" 
"emulation/viper-mous.el"
-;;;;;;  "emulation/viper-util.el" "erc/erc-backend.el" "erc/erc-goodies.el"
-;;;;;;  "erc/erc-ibuffer.el" "erc/erc-lang.el" "eshell/em-alias.el"
-;;;;;;  "eshell/em-banner.el" "eshell/em-basic.el" "eshell/em-cmpl.el"
-;;;;;;  "eshell/em-dirs.el" "eshell/em-glob.el" "eshell/em-hist.el"
-;;;;;;  "eshell/em-ls.el" "eshell/em-pred.el" "eshell/em-prompt.el"
-;;;;;;  "eshell/em-rebind.el" "eshell/em-script.el" "eshell/em-smart.el"
-;;;;;;  "eshell/em-term.el" "eshell/em-tramp.el" "eshell/em-unix.el"
-;;;;;;  "eshell/em-xtra.el" "eshell/esh-arg.el" "eshell/esh-cmd.el"
-;;;;;;  "eshell/esh-ext.el" "eshell/esh-groups.el" "eshell/esh-io.el"
-;;;;;;  "eshell/esh-module.el" "eshell/esh-opt.el" "eshell/esh-proc.el"
-;;;;;;  "eshell/esh-util.el" "eshell/esh-var.el" "ezimage.el" "format-spec.el"
-;;;;;;  "fringe.el" "generic-x.el" "gnus/compface.el" "gnus/gnus-async.el"
-;;;;;;  "gnus/gnus-bcklg.el" "gnus/gnus-cite.el" "gnus/gnus-cloud.el"
-;;;;;;  "gnus/gnus-cus.el" "gnus/gnus-demon.el" "gnus/gnus-dup.el"
-;;;;;;  "gnus/gnus-eform.el" "gnus/gnus-ems.el" "gnus/gnus-icalendar.el"
-;;;;;;  "gnus/gnus-int.el" "gnus/gnus-logic.el" "gnus/gnus-mh.el"
-;;;;;;  "gnus/gnus-salt.el" "gnus/gnus-score.el" "gnus/gnus-srvr.el"
-;;;;;;  "gnus/gnus-topic.el" "gnus/gnus-undo.el" "gnus/gnus-util.el"
-;;;;;;  "gnus/gnus-uu.el" "gnus/gnus-vm.el" "gnus/gssapi.el" 
"gnus/ietf-drums.el"
-;;;;;;  "gnus/legacy-gnus-agent.el" "gnus/mail-parse.el" "gnus/mail-prsvr.el"
-;;;;;;  "gnus/mail-source.el" "gnus/mailcap.el" "gnus/messcompat.el"
-;;;;;;  "gnus/mm-archive.el" "gnus/mm-bodies.el" "gnus/mm-decode.el"
-;;;;;;  "gnus/mm-util.el" "gnus/mm-view.el" "gnus/mml-sec.el" 
"gnus/mml-smime.el"
-;;;;;;  "gnus/nnagent.el" "gnus/nnbabyl.el" "gnus/nndir.el" "gnus/nndraft.el"
-;;;;;;  "gnus/nneething.el" "gnus/nngateway.el" "gnus/nnheader.el"
-;;;;;;  "gnus/nnimap.el" "gnus/nnir.el" "gnus/nnmail.el" "gnus/nnmaildir.el"
-;;;;;;  "gnus/nnmairix.el" "gnus/nnmbox.el" "gnus/nnmh.el" "gnus/nnnil.el"
-;;;;;;  "gnus/nnoo.el" "gnus/nnregistry.el" "gnus/nnrss.el" "gnus/nnspool.el"
-;;;;;;  "gnus/nntp.el" "gnus/nnvirtual.el" "gnus/nnweb.el" "gnus/registry.el"
-;;;;;;  "gnus/rfc1843.el" "gnus/rfc2045.el" "gnus/rfc2047.el" "gnus/rfc2231.el"
-;;;;;;  "gnus/rtree.el" "gnus/sieve-manage.el" "gnus/smime.el" 
"gnus/spam-stat.el"
-;;;;;;  "gnus/spam-wash.el" "hex-util.el" "hfy-cmap.el" "ibuf-ext.el"
-;;;;;;  "international/charscript.el" "international/fontset.el"
-;;;;;;  "international/iso-ascii.el" "international/ja-dic-cnv.el"
+;;;;;;  "cedet/srecode/map.el" "cedet/srecode/mode.el" 
"cedet/srecode/semantic.el"
+;;;;;;  "cedet/srecode/srt.el" "cedet/srecode/table.el" 
"cedet/srecode/template.el"
+;;;;;;  "cedet/srecode/texi.el" "cus-dep.el" "dframe.el" "dired-aux.el"
+;;;;;;  "dired-x.el" "dom.el" "dos-fns.el" "dos-vars.el" "dos-w32.el"
+;;;;;;  "dynamic-setting.el" "emacs-lisp/avl-tree.el" "emacs-lisp/bindat.el"
+;;;;;;  "emacs-lisp/byte-opt.el" "emacs-lisp/cl-extra.el" 
"emacs-lisp/cl-macs.el"
+;;;;;;  "emacs-lisp/cl-seq.el" "emacs-lisp/cl.el" "emacs-lisp/eieio-base.el"
+;;;;;;  "emacs-lisp/eieio-compat.el" "emacs-lisp/eieio-custom.el"
+;;;;;;  "emacs-lisp/eieio-datadebug.el" "emacs-lisp/eieio-opt.el"
+;;;;;;  "emacs-lisp/eieio-speedbar.el" "emacs-lisp/generator.el"
+;;;;;;  "emacs-lisp/lisp-mnt.el" "emacs-lisp/package-x.el" "emacs-lisp/smie.el"
+;;;;;;  "emacs-lisp/subr-x.el" "emacs-lisp/tcover-ses.el" 
"emacs-lisp/tcover-unsafep.el"
+;;;;;;  "emulation/cua-gmrk.el" "emulation/edt-lk201.el" 
"emulation/edt-mapper.el"
+;;;;;;  "emulation/edt-pc.el" "emulation/edt-vt100.el" "emulation/viper-cmd.el"
+;;;;;;  "emulation/viper-ex.el" "emulation/viper-init.el" 
"emulation/viper-keym.el"
+;;;;;;  "emulation/viper-macs.el" "emulation/viper-mous.el" 
"emulation/viper-util.el"
+;;;;;;  "erc/erc-backend.el" "erc/erc-goodies.el" "erc/erc-ibuffer.el"
+;;;;;;  "erc/erc-lang.el" "eshell/em-alias.el" "eshell/em-banner.el"
+;;;;;;  "eshell/em-basic.el" "eshell/em-cmpl.el" "eshell/em-dirs.el"
+;;;;;;  "eshell/em-glob.el" "eshell/em-hist.el" "eshell/em-ls.el"
+;;;;;;  "eshell/em-pred.el" "eshell/em-prompt.el" "eshell/em-rebind.el"
+;;;;;;  "eshell/em-script.el" "eshell/em-smart.el" "eshell/em-term.el"
+;;;;;;  "eshell/em-tramp.el" "eshell/em-unix.el" "eshell/em-xtra.el"
+;;;;;;  "eshell/esh-arg.el" "eshell/esh-cmd.el" "eshell/esh-ext.el"
+;;;;;;  "eshell/esh-io.el" "eshell/esh-module.el" "eshell/esh-opt.el"
+;;;;;;  "eshell/esh-proc.el" "eshell/esh-util.el" "eshell/esh-var.el"
+;;;;;;  "ezimage.el" "format-spec.el" "fringe.el" "generic-x.el"
+;;;;;;  "gnus/compface.el" "gnus/gnus-async.el" "gnus/gnus-bcklg.el"
+;;;;;;  "gnus/gnus-cite.el" "gnus/gnus-cloud.el" "gnus/gnus-cus.el"
+;;;;;;  "gnus/gnus-demon.el" "gnus/gnus-dup.el" "gnus/gnus-eform.el"
+;;;;;;  "gnus/gnus-ems.el" "gnus/gnus-icalendar.el" "gnus/gnus-int.el"
+;;;;;;  "gnus/gnus-logic.el" "gnus/gnus-mh.el" "gnus/gnus-salt.el"
+;;;;;;  "gnus/gnus-score.el" "gnus/gnus-srvr.el" "gnus/gnus-topic.el"
+;;;;;;  "gnus/gnus-undo.el" "gnus/gnus-util.el" "gnus/gnus-uu.el"
+;;;;;;  "gnus/gnus-vm.el" "gnus/gssapi.el" "gnus/ietf-drums.el" 
"gnus/legacy-gnus-agent.el"
+;;;;;;  "gnus/mail-parse.el" "gnus/mail-prsvr.el" "gnus/mail-source.el"
+;;;;;;  "gnus/mailcap.el" "gnus/messcompat.el" "gnus/mm-archive.el"
+;;;;;;  "gnus/mm-bodies.el" "gnus/mm-decode.el" "gnus/mm-util.el"
+;;;;;;  "gnus/mm-view.el" "gnus/mml-sec.el" "gnus/mml-smime.el" 
"gnus/nnagent.el"
+;;;;;;  "gnus/nnbabyl.el" "gnus/nndir.el" "gnus/nndraft.el" "gnus/nneething.el"
+;;;;;;  "gnus/nngateway.el" "gnus/nnheader.el" "gnus/nnimap.el" "gnus/nnir.el"
+;;;;;;  "gnus/nnmail.el" "gnus/nnmaildir.el" "gnus/nnmairix.el" 
"gnus/nnmbox.el"
+;;;;;;  "gnus/nnmh.el" "gnus/nnnil.el" "gnus/nnoo.el" "gnus/nnregistry.el"
+;;;;;;  "gnus/nnrss.el" "gnus/nnspool.el" "gnus/nntp.el" "gnus/nnvirtual.el"
+;;;;;;  "gnus/nnweb.el" "gnus/registry.el" "gnus/rfc1843.el" "gnus/rfc2045.el"
+;;;;;;  "gnus/rfc2047.el" "gnus/rfc2231.el" "gnus/rtree.el" 
"gnus/sieve-manage.el"
+;;;;;;  "gnus/smime.el" "gnus/spam-stat.el" "gnus/spam-wash.el" "hex-util.el"
+;;;;;;  "hfy-cmap.el" "ibuf-ext.el" "international/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"
@@ -32340,43 +32365,43 @@ Zone out, completely.
 ;;;;;;  "net/imap.el" "net/ldap.el" "net/mairix.el" "net/newsticker.el"
 ;;;;;;  "net/nsm.el" "net/rfc2104.el" "net/sasl-cram.el" "net/sasl-digest.el"
 ;;;;;;  "net/sasl-scram-rfc.el" "net/sasl.el" "net/shr-color.el"
-;;;;;;  "net/soap-client.el" "net/soap-inspect.el" "net/socks.el"
-;;;;;;  "net/tls.el" "net/tramp-adb.el" "net/tramp-cache.el" 
"net/tramp-cmds.el"
-;;;;;;  "net/tramp-compat.el" "net/tramp-gvfs.el" "net/tramp-gw.el"
-;;;;;;  "net/tramp-loaddefs.el" "net/tramp-sh.el" "net/tramp-smb.el"
-;;;;;;  "net/tramp-uu.el" "net/trampver.el" "net/zeroconf.el" 
"notifications.el"
-;;;;;;  "nxml/nxml-enc.el" "nxml/nxml-maint.el" "nxml/nxml-ns.el"
-;;;;;;  "nxml/nxml-outln.el" "nxml/nxml-parse.el" "nxml/nxml-rap.el"
-;;;;;;  "nxml/nxml-util.el" "nxml/rng-dt.el" "nxml/rng-loc.el" 
"nxml/rng-maint.el"
-;;;;;;  "nxml/rng-match.el" "nxml/rng-parse.el" "nxml/rng-pttrn.el"
-;;;;;;  "nxml/rng-uri.el" "nxml/rng-util.el" "nxml/xsd-regexp.el"
-;;;;;;  "org/ob-C.el" "org/ob-R.el" "org/ob-asymptote.el" "org/ob-awk.el"
-;;;;;;  "org/ob-calc.el" "org/ob-clojure.el" "org/ob-comint.el" 
"org/ob-core.el"
-;;;;;;  "org/ob-css.el" "org/ob-ditaa.el" "org/ob-dot.el" 
"org/ob-emacs-lisp.el"
-;;;;;;  "org/ob-eval.el" "org/ob-exp.el" "org/ob-fortran.el" 
"org/ob-gnuplot.el"
-;;;;;;  "org/ob-haskell.el" "org/ob-io.el" "org/ob-java.el" "org/ob-js.el"
-;;;;;;  "org/ob-keys.el" "org/ob-latex.el" "org/ob-ledger.el" 
"org/ob-lilypond.el"
-;;;;;;  "org/ob-lisp.el" "org/ob-lob.el" "org/ob-makefile.el" 
"org/ob-matlab.el"
-;;;;;;  "org/ob-maxima.el" "org/ob-mscgen.el" "org/ob-ocaml.el" 
"org/ob-octave.el"
-;;;;;;  "org/ob-org.el" "org/ob-perl.el" "org/ob-picolisp.el" 
"org/ob-plantuml.el"
-;;;;;;  "org/ob-python.el" "org/ob-ref.el" "org/ob-ruby.el" "org/ob-sass.el"
-;;;;;;  "org/ob-scala.el" "org/ob-scheme.el" "org/ob-screen.el" "org/ob-sh.el"
-;;;;;;  "org/ob-shen.el" "org/ob-sql.el" "org/ob-sqlite.el" "org/ob-table.el"
-;;;;;;  "org/ob-tangle.el" "org/ob.el" "org/org-archive.el" "org/org-attach.el"
-;;;;;;  "org/org-bbdb.el" "org/org-bibtex.el" "org/org-clock.el"
-;;;;;;  "org/org-crypt.el" "org/org-ctags.el" "org/org-datetree.el"
-;;;;;;  "org/org-docview.el" "org/org-element.el" "org/org-entities.el"
-;;;;;;  "org/org-eshell.el" "org/org-faces.el" "org/org-feed.el"
-;;;;;;  "org/org-footnote.el" "org/org-gnus.el" "org/org-habit.el"
-;;;;;;  "org/org-id.el" "org/org-indent.el" "org/org-info.el" 
"org/org-inlinetask.el"
-;;;;;;  "org/org-install.el" "org/org-irc.el" "org/org-list.el" 
"org/org-loaddefs.el"
-;;;;;;  "org/org-macro.el" "org/org-mhe.el" "org/org-mobile.el" 
"org/org-mouse.el"
-;;;;;;  "org/org-pcomplete.el" "org/org-plot.el" "org/org-protocol.el"
-;;;;;;  "org/org-rmail.el" "org/org-src.el" "org/org-table.el" 
"org/org-timer.el"
-;;;;;;  "org/org-w3m.el" "org/ox-ascii.el" "org/ox-beamer.el" "org/ox-html.el"
-;;;;;;  "org/ox-icalendar.el" "org/ox-latex.el" "org/ox-man.el" "org/ox-md.el"
-;;;;;;  "org/ox-odt.el" "org/ox-org.el" "org/ox-publish.el" "org/ox-texinfo.el"
-;;;;;;  "org/ox.el" "play/gametree.el" "progmodes/ada-prj.el" 
"progmodes/cc-align.el"
+;;;;;;  "net/socks.el" "net/tls.el" "net/tramp-adb.el" "net/tramp-cache.el"
+;;;;;;  "net/tramp-cmds.el" "net/tramp-compat.el" "net/tramp-gvfs.el"
+;;;;;;  "net/tramp-gw.el" "net/tramp-loaddefs.el" "net/tramp-sh.el"
+;;;;;;  "net/tramp-smb.el" "net/tramp-uu.el" "net/trampver.el" 
"net/zeroconf.el"
+;;;;;;  "notifications.el" "nxml/nxml-enc.el" "nxml/nxml-maint.el"
+;;;;;;  "nxml/nxml-ns.el" "nxml/nxml-outln.el" "nxml/nxml-parse.el"
+;;;;;;  "nxml/nxml-rap.el" "nxml/nxml-util.el" "nxml/rng-dt.el" 
"nxml/rng-loc.el"
+;;;;;;  "nxml/rng-maint.el" "nxml/rng-match.el" "nxml/rng-parse.el"
+;;;;;;  "nxml/rng-pttrn.el" "nxml/rng-uri.el" "nxml/rng-util.el"
+;;;;;;  "nxml/xsd-regexp.el" "org/ob-C.el" "org/ob-R.el" "org/ob-asymptote.el"
+;;;;;;  "org/ob-awk.el" "org/ob-calc.el" "org/ob-clojure.el" "org/ob-comint.el"
+;;;;;;  "org/ob-core.el" "org/ob-css.el" "org/ob-ditaa.el" "org/ob-dot.el"
+;;;;;;  "org/ob-emacs-lisp.el" "org/ob-eval.el" "org/ob-exp.el" 
"org/ob-fortran.el"
+;;;;;;  "org/ob-gnuplot.el" "org/ob-haskell.el" "org/ob-io.el" "org/ob-java.el"
+;;;;;;  "org/ob-js.el" "org/ob-keys.el" "org/ob-latex.el" "org/ob-ledger.el"
+;;;;;;  "org/ob-lilypond.el" "org/ob-lisp.el" "org/ob-lob.el" 
"org/ob-makefile.el"
+;;;;;;  "org/ob-matlab.el" "org/ob-maxima.el" "org/ob-mscgen.el"
+;;;;;;  "org/ob-ocaml.el" "org/ob-octave.el" "org/ob-org.el" "org/ob-perl.el"
+;;;;;;  "org/ob-picolisp.el" "org/ob-plantuml.el" "org/ob-python.el"
+;;;;;;  "org/ob-ref.el" "org/ob-ruby.el" "org/ob-sass.el" "org/ob-scala.el"
+;;;;;;  "org/ob-scheme.el" "org/ob-screen.el" "org/ob-sh.el" "org/ob-shen.el"
+;;;;;;  "org/ob-sql.el" "org/ob-sqlite.el" "org/ob-table.el" "org/ob-tangle.el"
+;;;;;;  "org/ob.el" "org/org-archive.el" "org/org-attach.el" "org/org-bbdb.el"
+;;;;;;  "org/org-bibtex.el" "org/org-clock.el" "org/org-crypt.el"
+;;;;;;  "org/org-ctags.el" "org/org-datetree.el" "org/org-docview.el"
+;;;;;;  "org/org-element.el" "org/org-entities.el" "org/org-eshell.el"
+;;;;;;  "org/org-faces.el" "org/org-feed.el" "org/org-footnote.el"
+;;;;;;  "org/org-gnus.el" "org/org-habit.el" "org/org-id.el" 
"org/org-indent.el"
+;;;;;;  "org/org-info.el" "org/org-inlinetask.el" "org/org-install.el"
+;;;;;;  "org/org-irc.el" "org/org-list.el" "org/org-macro.el" "org/org-mhe.el"
+;;;;;;  "org/org-mobile.el" "org/org-mouse.el" "org/org-pcomplete.el"
+;;;;;;  "org/org-plot.el" "org/org-protocol.el" "org/org-rmail.el"
+;;;;;;  "org/org-src.el" "org/org-table.el" "org/org-timer.el" "org/org-w3m.el"
+;;;;;;  "org/ox-ascii.el" "org/ox-beamer.el" "org/ox-html.el" 
"org/ox-icalendar.el"
+;;;;;;  "org/ox-latex.el" "org/ox-man.el" "org/ox-md.el" "org/ox-odt.el"
+;;;;;;  "org/ox-org.el" "org/ox-publish.el" "org/ox-texinfo.el" "org/ox.el"
+;;;;;;  "play/gametree.el" "progmodes/ada-prj.el" "progmodes/cc-align.el"
 ;;;;;;  "progmodes/cc-awk.el" "progmodes/cc-bytecomp.el" "progmodes/cc-cmds.el"
 ;;;;;;  "progmodes/cc-defs.el" "progmodes/cc-fonts.el" "progmodes/cc-langs.el"
 ;;;;;;  "progmodes/cc-menus.el" "progmodes/ebnf-abn.el" "progmodes/ebnf-bnf.el"
@@ -32399,7 +32424,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") (22026 26004 435502 692000))
+;;;;;;  "x-dnd.el") (22069 63623 894804 836000))
 
 ;;;***
 
diff --git a/lisp/loadup.el b/lisp/loadup.el
index fef111f..f0caa8b 100644
--- a/lisp/loadup.el
+++ b/lisp/loadup.el
@@ -73,7 +73,7 @@
 
 (if (eq t purify-flag)
     ;; Hash consing saved around 11% of pure space in my tests.
-    (setq purify-flag (make-hash-table :test 'equal :size 70000)))
+    (setq purify-flag (make-hash-table :test 'equal :size 80000)))
 
 (message "Using load-path %s" load-path)
 
diff --git a/lisp/net/ntlm.el b/lisp/net/ntlm.el
index ff7e79e..acfa005 100644
--- a/lisp/net/ntlm.el
+++ b/lisp/net/ntlm.el
@@ -5,7 +5,7 @@
 ;; Author: Taro Kawagishi <address@hidden>
 ;; Maintainer: Thomas Fitzsimmons <address@hidden>
 ;; Keywords: NTLM, SASL, comm
-;; Version: 2.00
+;; Version: 2.0.0
 ;; Created: February 2001
 
 ;; This file is part of GNU Emacs.
diff --git a/lisp/net/pinentry.el b/lisp/net/pinentry.el
index eaa9fa4..0037006 100644
--- a/lisp/net/pinentry.el
+++ b/lisp/net/pinentry.el
@@ -151,16 +151,20 @@ If local sockets are not supported, this is nil.")
       (apply query-function (concat desc "\n" prompt) query-args))))
 
 ;;;###autoload
-(defun pinentry-start ()
+(defun pinentry-start (&optional quiet)
   "Start a Pinentry service.
 
 Once the environment is properly set, subsequent invocations of
-the gpg command will interact with Emacs for passphrase input."
+the gpg command will interact with Emacs for passphrase input.
+
+If the optional QUIET argument is non-nil, messages at startup
+will not be shown."
   (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")
+      (unless quiet
+        (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.
diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index 58deaea..a48d098 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -203,6 +203,12 @@ cid: URL as the argument.")
       (goto-char begin)
       (shr-insert-document dom))))
 
+(defun shr--have-one-fringe-p ()
+  "Return non-nil if we know at least one of the fringes has non-zero width."
+  (and (fboundp 'fringe-columns)
+       (or (not (zerop (fringe-columns 'right)))
+           (not (zerop (fringe-columns 'left))))))
+
 ;;;###autoload
 (defun shr-insert-document (dom)
   "Render the parsed document DOM into the current buffer.
@@ -230,19 +236,13 @@ DOM should be a parse tree as generated by
                                (if (not shr-use-fonts)
                                    (- (window-body-width) 1
                                        (if (and (null shr-width)
-                                                (or (zerop
-                                                     (fringe-columns 'right))
-                                                    (zerop
-                                                     (fringe-columns 'left))))
+                                                (not (shr--have-one-fringe-p)))
                                            0
                                          1))
                                  (- (window-body-width nil t)
                                      (* 2 (frame-char-width))
                                      (if (and (null shr-width)
-                                              (or (zerop
-                                                   (fringe-columns 'right))
-                                                  (zerop
-                                                   (fringe-columns 'left))))
+                                              (not (shr--have-one-fringe-p)))
                                          (* (frame-char-width) 2)
                                        0))))))
     (shr-descend dom)
@@ -466,8 +466,7 @@ size, and full-buffer size."
                                    ;; to usurp one column for the
                                    ;; continuation glyph.
                                    (if (and (null shr-width)
-                                            (or (zerop (fringe-columns 'right))
-                                                (zerop (fringe-columns 
'left))))
+                                            (not (shr--have-one-fringe-p)))
                                        (* (frame-char-width) 2)
                                      0))))
        (shr-insert text)
diff --git a/lisp/net/soap-client.el b/lisp/net/soap-client.el
index 264a39c..71d4245 100644
--- a/lisp/net/soap-client.el
+++ b/lisp/net/soap-client.el
@@ -1,14 +1,15 @@
-;;;; soap-client.el -- Access SOAP web services       -*- lexical-binding: t 
-*-
+;;; soap-client.el --- Access SOAP web services       -*- lexical-binding: t 
-*-
 
 ;; Copyright (C) 2009-2015 Free Software Foundation, Inc.
 
 ;; Author: Alexandru Harsanyi <address@hidden>
 ;; Author: Thomas Fitzsimmons <address@hidden>
 ;; Created: December, 2009
-;; Version: 3.0.1
+;; Version: 3.0.2
 ;; Keywords: soap, web-services, comm, hypermedia
 ;; Package: soap-client
 ;; Homepage: https://github.com/alex-hhh/emacs-soap-client
+;; Package-Requires: ((cl-lib "0.5"))
 
 ;; This file is part of GNU Emacs.
 
@@ -43,6 +44,7 @@
 ;;; Code:
 
 (eval-when-compile (require 'cl))
+(require 'cl-lib)
 
 (require 'xml)
 (require 'xsd-regexp)
@@ -57,8 +59,8 @@
 
 (defsubst soap-warning (message &rest args)
   "Display a warning MESSAGE with ARGS, using the 'soap-client warning type."
-  (display-warning 'soap-client (apply #'format-message message args)
-                   :warning))
+  ;; Do not use #'format-message, to support older Emacs versions.
+  (display-warning 'soap-client (apply #'format message args) :warning))
 
 (defgroup soap-client nil
   "Access SOAP web services from Emacs."
@@ -390,7 +392,7 @@ binding) but the same name."
 
 ;; SOAP WSDL documents use XML Schema to define the types that are part of the
 ;; message exchange.  We include here an XML schema model with a parser and
-;; serializer/deserialiser.
+;; serializer/deserializer.
 
 (defstruct (soap-xs-type (:include soap-element))
   id
@@ -710,7 +712,7 @@ This is a specialization of `soap-decode-type' for
 (defun soap-xs-element-type (element)
   "Retrieve the type of ELEMENT.
 This is normally stored in the TYPE^ slot, but if this element
-contains a reference, we retrive the type of the reference."
+contains a reference, retrieve the type of the reference."
   (if (soap-xs-element-reference element)
       (soap-xs-element-type (soap-xs-element-reference element))
     (soap-xs-element-type^ element)))
@@ -1246,9 +1248,9 @@ See also `soap-wsdl-resolve-references'."
               (error (push (cadr error-object) messages))))
           (when messages
             (error (mapconcat 'identity (nreverse messages) "; and: "))))
-      (cl-flet ((fail-with-message (format value)
-                                   (push (format format value) messages)
-                                   (throw 'invalid nil)))
+      (cl-labels ((fail-with-message (format value)
+                                    (push (format format value) messages)
+                                    (throw 'invalid nil)))
         (catch 'invalid
           (let ((enumeration (soap-xs-simple-type-enumeration type)))
             (when (and (> (length enumeration) 1)
@@ -1989,7 +1991,7 @@ This is a specialization of `soap-decode-type' for
   )
 
 (defun soap-make-wsdl (origin)
-  "Create a new WSDL document, loaded from ORIGIN, and intialize it."
+  "Create a new WSDL document, loaded from ORIGIN, and initialize it."
   (let ((wsdl (soap-make-wsdl^ :origin origin)))
 
     ;; Add the XSD types to the wsdl document
@@ -2753,7 +2755,14 @@ decode function to perform the actual decoding."
 
 ;;;; Soap Envelope parsing
 
-(define-error 'soap-error "SOAP error")
+(if (fboundp 'define-error)
+    (define-error 'soap-error "SOAP error")
+  ;; Support older Emacs versions that do not have define-error, so
+  ;; that soap-client can remain unchanged in GNU ELPA.
+  (put 'soap-error
+       'error-conditions
+       '(error soap-error))
+  (put 'soap-error 'error-message "SOAP error"))
 
 (defun soap-parse-envelope (node operation wsdl)
   "Parse the SOAP envelope in NODE and return the response.
diff --git a/lisp/net/soap-inspect.el b/lisp/net/soap-inspect.el
index f6c7da6..a443041 100644
--- a/lisp/net/soap-inspect.el
+++ b/lisp/net/soap-inspect.el
@@ -1,10 +1,9 @@
-;;;; soap-inspect.el -- Interactive WSDL inspector    -*- lexical-binding: t 
-*-
+;;; soap-inspect.el --- Interactive WSDL inspector    -*- lexical-binding: t 
-*-
 
 ;; Copyright (C) 2010-2015 Free Software Foundation, Inc.
 
 ;; Author: Alexandru Harsanyi <address@hidden>
 ;; Created: October 2010
-;; Version: 3.0.1
 ;; Keywords: soap, web-services, comm, hypermedia
 ;; Package: soap-client
 ;; Homepage: https://github.com/alex-hhh/emacs-soap-client
@@ -334,7 +333,7 @@ soap-xs-attribute-group, in the current buffer."
       (insert "\t")
       (soap-insert-describe-button type)))
   (when (soap-xs-simple-type-enumeration type)
-    (insert "\nEnumeraton values: ")
+    (insert "\nEnumeration values: ")
     (dolist (e (soap-xs-simple-type-enumeration type))
       (insert "\n\t")
       (pp e)))
diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el
index 88dea6a..178b3a0 100644
--- a/lisp/net/tramp-adb.el
+++ b/lisp/net/tramp-adb.el
@@ -117,11 +117,11 @@ It is used for TCP/IP devices."
     (file-acl . ignore)
     (file-attributes . tramp-adb-handle-file-attributes)
     (file-directory-p . tramp-adb-handle-file-directory-p)
-    ;; `file-equal-p' performed by default handler.
+    (file-equal-p . tramp-handle-file-equal-p)
     ;; FIXME: This is too sloppy.
     (file-executable-p . tramp-handle-file-exists-p)
     (file-exists-p . tramp-handle-file-exists-p)
-    ;; `file-in-directory-p' performed by default handler.
+    (file-in-directory-p . tramp-handle-file-in-directory-p)
     (file-local-copy . tramp-adb-handle-file-local-copy)
     (file-modes . tramp-handle-file-modes)
     (file-name-all-completions . tramp-adb-handle-file-name-all-completions)
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el
index 177ccfc..c5a6075 100644
--- a/lisp/net/tramp-gvfs.el
+++ b/lisp/net/tramp-gvfs.el
@@ -48,7 +48,7 @@
 ;; comments.
 
 ;; The custom option `tramp-gvfs-methods' contains the list of
-;; supported connection methods.  Per default, these are "dav",
+;; supported connection methods.  Per default, these are "afp", "dav",
 ;; "davs", "obex", "sftp" and "synce".  Note that with "obex" it might
 ;; be necessary to pair with the other bluetooth device, if it hasn't
 ;; been done already.  There might be also some few seconds delay in
@@ -78,7 +78,7 @@
 
 ;; For hostname completion, information is retrieved either from the
 ;; bluez daemon (for the "obex" method), the hal daemon (for the
-;; "synce" method), or from the zeroconf daemon (for the "dav",
+;; "synce" method), or from the zeroconf daemon (for the "afp", "dav",
 ;; "davs", and "sftp" methods).  The zeroconf daemon is pre-configured
 ;; to discover services in the "local" domain.  If another domain
 ;; shall be used for discovering services, the custom option
@@ -110,11 +110,12 @@
   (require 'custom))
 
 ;;;###tramp-autoload
-(defcustom tramp-gvfs-methods '("dav" "davs" "obex" "sftp" "synce")
+(defcustom tramp-gvfs-methods '("afp" "dav" "davs" "obex" "sftp" "synce")
   "List of methods for remote files, accessed with GVFS."
   :group 'tramp
-  :version "23.2"
-  :type '(repeat (choice (const "dav")
+  :version "25.1"
+  :type '(repeat (choice (const "afp")
+                        (const "dav")
                         (const "davs")
                         (const "ftp")
                         (const "obex")
@@ -231,7 +232,8 @@ It has been changed in GVFS 1.14.")
 ;;     ARRAY BYTE          mount_prefix
 ;;     ARRAY
 ;;       STRUCT                    mount_spec_item
-;;         STRING            key (server, share, type, user, host, port)
+;;         STRING            key (type, user, domain, host, server,
+;;                                 share, volume, port, ssl)
 ;;         ARRAY BYTE        value
 ;;   ARRAY BYTE           default_location     Since GVFS 1.5 only !!!
 
@@ -428,10 +430,10 @@ Every entry is a list (NAME ADDRESS).")
     (file-acl . ignore)
     (file-attributes . tramp-gvfs-handle-file-attributes)
     (file-directory-p . tramp-gvfs-handle-file-directory-p)
-    ;; `file-equal-p' performed by default handler.
+    (file-equal-p . tramp-handle-file-equal-p)
     (file-executable-p . tramp-gvfs-handle-file-executable-p)
     (file-exists-p . tramp-handle-file-exists-p)
-    ;; `file-in-directory-p' performed by default handler.
+    (file-in-directory-p . tramp-handle-file-in-directory-p)
     (file-local-copy . tramp-gvfs-handle-file-local-copy)
     (file-modes . tramp-handle-file-modes)
     (file-name-all-completions . tramp-gvfs-handle-file-name-all-completions)
@@ -770,7 +772,7 @@ file names."
       (unless (tramp-run-real-handler 'file-name-absolute-p (list localname))
        (setq localname (concat "/" localname)))
       ;; We do not pass "/..".
-      (if (string-equal "smb" method)
+      (if (string-match "^\\(afp\\|smb\\)$" method)
          (when (string-match "^/[^/]+\\(/\\.\\./?\\)" localname)
            (setq localname (replace-match "/" t t localname 1)))
        (when (string-match "^/\\.\\./?" localname)
@@ -806,81 +808,72 @@ file names."
            (when (re-search-forward "attributes:" nil t)
              ;; ... directory or symlink
              (goto-char (point-min))
-             (setq dirp (if (re-search-forward "type:\\s-+directory" nil t) t))
+             (setq dirp (if (re-search-forward "type: directory" nil t) t))
              (goto-char (point-min))
              (setq res-symlink-target
                    (if (re-search-forward
-                        "standard::symlink-target:\\s-+\\(.*\\)$" nil t)
+                        "standard::symlink-target: \\(.+\\)$" nil t)
                        (match-string 1)))
              ;; ... number links
              (goto-char (point-min))
              (setq res-numlinks
-                   (if (re-search-forward
-                        "unix::nlink:\\s-+\\([0-9]+\\)" nil t)
+                   (if (re-search-forward "unix::nlink: \\([0-9]+\\)" nil t)
                        (string-to-number (match-string 1)) 0))
              ;; ... uid and gid
              (goto-char (point-min))
              (setq res-uid
-                   (or (if (eq id-format 'integer)
-                           (if (re-search-forward
-                                "unix::uid:\\s-+\\([0-9]+\\)" nil t)
-                               (string-to-number (match-string 1)))
-                         (if (re-search-forward
-                              "owner::user:\\s-+\\(\\S-+\\)" nil t)
-                             (match-string 1)))
-                       (tramp-get-local-uid id-format)))
+                   (if (eq id-format 'integer)
+                       (if (re-search-forward "unix::uid: \\([0-9]+\\)" nil t)
+                           (string-to-number (match-string 1))
+                         -1)
+                     (if (re-search-forward "owner::user: \\(.+\\)$" nil t)
+                         (match-string 1)
+                       "UNKNOWN")))
              (setq res-gid
-                   (or (if (eq id-format 'integer)
-                           (if (re-search-forward
-                                "unix::gid:\\s-+\\([0-9]+\\)" nil t)
-                               (string-to-number (match-string 1)))
-                         (if (re-search-forward
-                              "owner::group:\\s-+\\(\\S-+\\)" nil t)
-                             (match-string 1)))
-                       (tramp-get-local-gid id-format)))
+                   (if (eq id-format 'integer)
+                       (if (re-search-forward "unix::gid: \\([0-9]+\\)" nil t)
+                           (string-to-number (match-string 1))
+                         -1)
+                     (if (re-search-forward "owner::group: \\(.+\\)$" nil t)
+                         (match-string 1)
+                       "UNKNOWN")))
              ;; ... last access, modification and change time
              (goto-char (point-min))
              (setq res-access
-                   (if (re-search-forward
-                        "time::access:\\s-+\\([0-9]+\\)" nil t)
+                   (if (re-search-forward "time::access: \\([0-9]+\\)" nil t)
                        (seconds-to-time (string-to-number (match-string 1)))
                      '(0 0)))
              (goto-char (point-min))
              (setq res-mod
-                   (if (re-search-forward
-                        "time::modified:\\s-+\\([0-9]+\\)" nil t)
+                   (if (re-search-forward "time::modified: \\([0-9]+\\)" nil t)
                        (seconds-to-time (string-to-number (match-string 1)))
                      '(0 0)))
              (goto-char (point-min))
              (setq res-change
-                   (if (re-search-forward
-                        "time::changed:\\s-+\\([0-9]+\\)" nil t)
+                   (if (re-search-forward "time::changed: \\([0-9]+\\)" nil t)
                        (seconds-to-time (string-to-number (match-string 1)))
                      '(0 0)))
              ;; ... size
              (goto-char (point-min))
              (setq res-size
-                   (if (re-search-forward
-                        "standard::size:\\s-+\\([0-9]+\\)" nil t)
+                   (if (re-search-forward "standard::size: \\([0-9]+\\)" nil t)
                        (string-to-number (match-string 1)) 0))
              ;; ... file mode flags
              (goto-char (point-min))
              (setq res-filemodes
-                   (if (re-search-forward "unix::mode:\\s-+\\([0-9]+\\)" nil t)
+                   (if (re-search-forward "unix::mode: \\([0-9]+\\)" nil t)
                        (tramp-file-mode-from-int
                         (string-to-number (match-string 1)))
                      (if dirp "drwx------" "-rwx------")))
              ;; ... inode and device
              (goto-char (point-min))
              (setq res-inode
-                   (if (re-search-forward
-                        "unix::inode:\\s-+\\([0-9]+\\)" nil t)
+                   (if (re-search-forward "unix::inode: \\([0-9]+\\)" nil t)
                        (string-to-number (match-string 1))
                      (tramp-get-inode v)))
              (goto-char (point-min))
              (setq res-device
-                   (if (re-search-forward
-                        "unix::device:\\s-+\\([0-9]+\\)" nil t)
+                   (if (re-search-forward "unix::device: \\([0-9]+\\)" nil t)
                        (string-to-number (match-string 1))
                      (tramp-get-device v)))
 
@@ -1346,12 +1339,14 @@ ADDRESS can have the form \"xx:xx:xx:xx:xx:xx\" or 
\"[xx:xx:xx:xx:xx:xx]\"."
                    (cadr (assoc "port" (cadr mount-spec)))))
             (ssl (tramp-gvfs-dbus-byte-array-to-string
                   (cadr (assoc "ssl" (cadr mount-spec)))))
-            (prefix (concat (tramp-gvfs-dbus-byte-array-to-string
-                             (car mount-spec))
-                            (tramp-gvfs-dbus-byte-array-to-string
-                             (cadr (assoc "share" (cadr mount-spec)))))))
-       (when (string-match "^smb" method)
-         (setq method "smb"))
+            (prefix (concat
+                     (tramp-gvfs-dbus-byte-array-to-string
+                      (car mount-spec))
+                     (tramp-gvfs-dbus-byte-array-to-string
+                      (or (cadr (assoc "share" (cadr mount-spec)))
+                          (cadr (assoc "volume" (cadr mount-spec))))))))
+       (when (string-match "^\\(afp\\|smb\\)" method)
+         (setq method (match-string 1 method)))
        (when (string-equal "obex" method)
          (setq host (tramp-bluez-device host)))
        (when (and (string-equal "dav" method) (string-equal "true" ssl))
@@ -1428,12 +1423,15 @@ ADDRESS can have the form \"xx:xx:xx:xx:xx:xx\" or 
\"[xx:xx:xx:xx:xx:xx]\"."
                     (cadr (assoc "port" (cadr mount-spec)))))
              (ssl (tramp-gvfs-dbus-byte-array-to-string
                    (cadr (assoc "ssl" (cadr mount-spec)))))
-             (prefix (concat (tramp-gvfs-dbus-byte-array-to-string
-                              (car mount-spec))
-                             (tramp-gvfs-dbus-byte-array-to-string
-                              (cadr (assoc "share" (cadr mount-spec)))))))
-        (when (string-match "^smb" method)
-          (setq method "smb"))
+             (prefix (concat
+                      (tramp-gvfs-dbus-byte-array-to-string
+                       (car mount-spec))
+                      (tramp-gvfs-dbus-byte-array-to-string
+                       (or
+                        (cadr (assoc "share" (cadr mount-spec)))
+                        (cadr (assoc "volume" (cadr mount-spec))))))))
+        (when (string-match "^\\(afp\\|smb\\)" method)
+          (setq method (match-string 1 method)))
         (when (string-equal "obex" method)
           (setq host (tramp-bluez-device host)))
         (when (and (string-equal "dav" method) (string-equal "true" ssl))
@@ -1473,16 +1471,16 @@ It was \"a(say)\", but has changed to \"a{sv})\"."
         (host (tramp-file-name-real-host vec))
         (port (tramp-file-name-port vec))
         (localname (tramp-file-name-localname vec))
-        (ssl (if (string-match "^davs" method) "true" "false"))
+        (share (when (string-match "^/?\\([^/]+\\)" localname)
+                 (match-string 1 localname)))
+        (ssl (when (string-match "^davs" method) "true" "false"))
         (mount-spec
           `(:array
             ,@(cond
                ((string-equal "smb" method)
-                (string-match "^/?\\([^/]+\\)" localname)
                 (list (tramp-gvfs-mount-spec-entry "type" "smb-share")
                       (tramp-gvfs-mount-spec-entry "server" host)
-                      (tramp-gvfs-mount-spec-entry
-                      "share" (match-string 1 localname))))
+                      (tramp-gvfs-mount-spec-entry "share" share)))
                ((string-equal "obex" method)
                 (list (tramp-gvfs-mount-spec-entry "type" method)
                       (tramp-gvfs-mount-spec-entry
@@ -1491,6 +1489,10 @@ It was \"a(say)\", but has changed to \"a{sv})\"."
                 (list (tramp-gvfs-mount-spec-entry "type" "dav")
                       (tramp-gvfs-mount-spec-entry "host" host)
                       (tramp-gvfs-mount-spec-entry "ssl" ssl)))
+               ((string-equal "afp" method)
+                (list (tramp-gvfs-mount-spec-entry "type" "afp-volume")
+                      (tramp-gvfs-mount-spec-entry "host" host)
+                      (tramp-gvfs-mount-spec-entry "volume" share)))
                (t
                 (list (tramp-gvfs-mount-spec-entry "type" method)
                       (tramp-gvfs-mount-spec-entry "host" host))))
@@ -1546,6 +1548,10 @@ connection if a previous connection has died for some 
reason."
                 (string-equal localname "/"))
        (tramp-error vec 'file-error "Filename must contain a Windows share"))
 
+      (when (and (string-equal method "afp")
+                (string-equal localname "/"))
+       (tramp-error vec 'file-error "Filename must contain an AFP volume"))
+
       (with-tramp-progress-reporter
          vec 3
          (if (zerop (length user))
@@ -1716,14 +1722,7 @@ be used."
 
 ;; D-Bus zeroconf functions.
 
-(defun tramp-zeroconf-parse-workstation-device-names (_ignore)
-  "Return a list of (user host) tuples allowed to access."
-  (mapcar
-   (lambda (x)
-     (list nil (zeroconf-service-host x)))
-   (zeroconf-list-services "_workstation._tcp")))
-
-(defun tramp-zeroconf-parse-webdav-device-names (_ignore)
+(defun tramp-zeroconf-parse-device-names (service)
   "Return a list of (user host) tuples allowed to access."
   (mapcar
    (lambda (x)
@@ -1739,18 +1738,64 @@ be used."
           (setq user (match-string 1 (car text))))
         (setq text (cdr text)))
        (list user host)))
-   (zeroconf-list-services "_webdav._tcp")))
-
-;; Add completion function for SFTP, DAV and DAVS methods.
-(when (and tramp-gvfs-enabled
-          (member zeroconf-service-avahi (dbus-list-known-names :system)))
+   (zeroconf-list-services service)))
+
+(defun tramp-gvfs-parse-device-names (service)
+  "Return a list of (user host) tuples allowed to access.
+This uses \"avahi-browse\" in case D-Bus is not enabled in Avahi."
+  (let ((result
+        (split-string
+         (shell-command-to-string (format "avahi-browse -trkp %s" service))
+         "[\n\r]+" 'omit "^\\+;.*$")))
+    (tramp-compat-delete-dups
+     (mapcar
+      (lambda (x)
+       (let* ((list (split-string x ";"))
+              (host (nth 6 list))
+              (port (nth 8 list))
+              (text (split-string (nth 9 list) "\" \"" 'omit "\""))
+              user)
+;        (when (and port (not (string-equal port "0")))
+;          (setq host (format "%s%s%s" host tramp-prefix-port-regexp port)))
+         ;; A user is marked in a TXT field like "u=guest".
+         (while text
+           (when (string-match "u=\\(.+\\)$" (car text))
+             (setq user (match-string 1 (car text))))
+           (setq text (cdr text)))
+         (list user host)))
+      result))))
+
+;; Add completion functions for AFP, DAV, DAVS, SFTP and SMB methods.
+(when tramp-gvfs-enabled
   (zeroconf-init tramp-gvfs-zeroconf-domain)
-  (tramp-set-completion-function
-   "sftp" '((tramp-zeroconf-parse-workstation-device-names "")))
-  (tramp-set-completion-function
-   "dav" '((tramp-zeroconf-parse-webdav-device-names "")))
-  (tramp-set-completion-function
-   "davs" '((tramp-zeroconf-parse-webdav-device-names ""))))
+  (if (zeroconf-list-service-types)
+      (progn
+       (tramp-set-completion-function
+        "afp" '((tramp-zeroconf-parse-device-names "_afpovertcp._tcp")))
+       (tramp-set-completion-function
+        "dav" '((tramp-zeroconf-parse-device-names "_webdav._tcp")))
+       (tramp-set-completion-function
+        "davs" '((tramp-zeroconf-parse-device-names "_webdav._tcp")))
+       (tramp-set-completion-function
+        "sftp" '((tramp-zeroconf-parse-device-names "_ssh._tcp")
+                 (tramp-zeroconf-parse-device-names "_workstation._tcp")))
+       (when (member "smb" tramp-gvfs-methods)
+         (tramp-set-completion-function
+          "smb" '((tramp-zeroconf-parse-device-names "_smb._tcp")))))
+
+    (when (executable-find "avahi-browse")
+      (tramp-set-completion-function
+       "afp" '((tramp-gvfs-parse-device-names "_afpovertcp._tcp")))
+      (tramp-set-completion-function
+       "dav" '((tramp-gvfs-parse-device-names "_webdav._tcp")))
+      (tramp-set-completion-function
+       "davs" '((tramp-gvfs-parse-device-names "_webdav._tcp")))
+      (tramp-set-completion-function
+       "sftp" '((tramp-gvfs-parse-device-names "_ssh._tcp")
+               (tramp-gvfs-parse-device-names "_workstation._tcp")))
+      (when (member "smb" tramp-gvfs-methods)
+       (tramp-set-completion-function
+        "smb" '((tramp-gvfs-parse-device-names "_smb._tcp")))))))
 
 
 ;; D-Bus SYNCE functions.
@@ -1795,7 +1840,7 @@ They are retrieved from the hal daemon."
 
 ;;; TODO:
 
-;; * Host name completion via smb-server or smb-network.
+;; * Host name completion via afp-server, smb-server or smb-network.
 ;; * Check how two shares of the same SMB server can be mounted in
 ;;   parallel.
 ;; * Apply SDP on bluetooth devices, in order to filter out obex
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 1753c73..f5ff6a7 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -993,10 +993,10 @@ of command line.")
     (file-acl . tramp-sh-handle-file-acl)
     (file-attributes . tramp-sh-handle-file-attributes)
     (file-directory-p . tramp-sh-handle-file-directory-p)
-    ;; `file-equal-p' performed by default handler.
+    (file-equal-p . tramp-handle-file-equal-p)
     (file-executable-p . tramp-sh-handle-file-executable-p)
     (file-exists-p . tramp-sh-handle-file-exists-p)
-    ;; `file-in-directory-p' performed by default handler.
+    (file-in-directory-p . tramp-handle-file-in-directory-p)
     (file-local-copy . tramp-sh-handle-file-local-copy)
     (file-modes . tramp-handle-file-modes)
     (file-name-all-completions . tramp-sh-handle-file-name-all-completions)
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el
index c956795..65c77eb 100644
--- a/lisp/net/tramp-smb.el
+++ b/lisp/net/tramp-smb.el
@@ -232,10 +232,10 @@ See `tramp-actions-before-shell' for more info.")
     (file-acl . tramp-smb-handle-file-acl)
     (file-attributes . tramp-smb-handle-file-attributes)
     (file-directory-p .  tramp-smb-handle-file-directory-p)
-    ;; `file-equal-p' performed by default handler.
+    (file-file-equal-p . tramp-handle-file-equal-p)
     (file-executable-p . tramp-handle-file-exists-p)
     (file-exists-p . tramp-handle-file-exists-p)
-    ;; `file-in-directory-p' performed by default handler.
+    (file-in-directory-p . tramp-handle-file-in-directory-p)
     (file-local-copy . tramp-smb-handle-file-local-copy)
     (file-modes . tramp-handle-file-modes)
     (file-name-all-completions . tramp-smb-handle-file-name-all-completions)
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 2f811bb..42a9e3d 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -1765,14 +1765,18 @@ Example:
        (setcdr v (delete (car v) (cdr v))))
       ;; Check for function and file or registry key.
       (unless (and (functionp (nth 0 (car v)))
-                  (if (string-match "^HKEY_CURRENT_USER" (nth 1 (car v)))
-                      ;; Windows registry.
-                      (and (memq system-type '(cygwin windows-nt))
-                           (zerop
-                            (tramp-call-process
-                             v "reg" nil nil nil "query" (nth 1 (car v)))))
-                    ;; Configuration file.
-                    (file-exists-p (nth 1 (car v)))))
+                  (cond
+                   ;; Windows registry.
+                   ((string-match "^HKEY_CURRENT_USER" (nth 1 (car v)))
+                    (and (memq system-type '(cygwin windows-nt))
+                         (zerop
+                          (tramp-call-process
+                           v "reg" nil nil nil "query" (nth 1 (car v))))))
+                   ;; Zeroconf service type.
+                   ((string-match
+                     "^_[[:alpha:]]+\\._[[:alpha:]]+$" (nth 1 (car v))))
+                   ;; Configuration file.
+                   (t (file-exists-p (nth 1 (car v))))))
        (setq r (delete (car v) r)))
       (setq v (cdr v)))
 
@@ -2906,10 +2910,30 @@ User is always nil."
   (and (file-directory-p filename)
        (file-readable-p filename)))
 
+(defun tramp-handle-file-equal-p (filename1 filename2)
+  "Like `file-equalp-p' for Tramp files."
+  ;; Native `file-equalp-p' calls `file-truename', which requires a
+  ;; remote connection.  This can be avoided, if FILENAME1 and
+  ;; FILENAME2 are not located on the same remote host.
+  (when (string-equal
+        (file-remote-p (expand-file-name filename1))
+        (file-remote-p (expand-file-name filename2)))
+    (tramp-run-real-handler 'file-equal-p (list filename1 filename2))))
+
 (defun tramp-handle-file-exists-p (filename)
   "Like `file-exists-p' for Tramp files."
   (not (null (file-attributes filename))))
 
+(defun tramp-handle-file-in-directory-p (filename directory)
+  "Like `file-in-directory-p' for Tramp files."
+  ;; Native `file-in-directory-p' calls `file-truename', which
+  ;; requires a remote connection.  This can be avoided, if FILENAME
+  ;; and DIRECTORY are not located on the same remote host.
+  (when (string-equal
+        (file-remote-p (expand-file-name filename))
+        (file-remote-p (expand-file-name directory)))
+    (tramp-run-real-handler 'file-in-directory-p (list filename directory))))
+
 (defun tramp-handle-file-modes (filename)
   "Like `file-modes' for Tramp files."
   (let ((truename (or (file-truename filename) filename)))
diff --git a/lisp/obarray.el b/lisp/obarray.el
new file mode 100644
index 0000000..a93c9a9
--- /dev/null
+++ b/lisp/obarray.el
@@ -0,0 +1,66 @@
+;;; obarray.el --- obarray functions -*- lexical-binding: t -*-
+
+;; Copyright (C) 2015 Free Software Foundation, Inc.
+
+;; Maintainer: address@hidden
+;; Keywords: obarray functions
+;; Package: emacs
+
+;; 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 provides function for working with obarrays.
+
+;;; Code:
+
+(defconst obarray-default-size 59
+  "The value 59 is an arbitrary prime number that gives a good hash.")
+
+(defun obarray-make (&optional size)
+  "Return a new obarray of size SIZE or `obarray-default-size'."
+  (let ((size (or size obarray-default-size)))
+    (if (< 0 size)
+        (make-vector size 0)
+      (signal 'wrong-type-argument '(size 0)))))
+
+(defun obarrayp (object)
+  "Return t if OBJECT is an obarray."
+  (and (vectorp object)
+       (< 0 (length object))))
+
+;; Don’t use obarray as a variable name to avoid shadowing.
+(defun obarray-get (ob name)
+  "Return symbol named NAME if it is contained in obarray OB.
+Return nil otherwise."
+  (intern-soft name ob))
+
+(defun obarray-put (ob name)
+  "Return symbol named NAME from obarray OB.
+Creates and adds the symbol if doesn't exist."
+  (intern name ob))
+
+(defun obarray-remove (ob name)
+  "Remove symbol named NAME if it is contained in obarray OB.
+Return t on success, nil otherwise."
+  (unintern name ob))
+
+(defun obarray-map (fn ob)
+  "Call function FN on every symbol in obarray OB and return nil."
+  (mapatoms fn ob))
+
+(provide 'obarray)
+;;; obarray.el ends here
diff --git a/lisp/proced.el b/lisp/proced.el
index bf7ce24..502a90e 100644
--- a/lisp/proced.el
+++ b/lisp/proced.el
@@ -463,6 +463,7 @@ Important: the match ends just after the marker.")
     (define-key km "\C-n" 'next-line)
     (define-key km "\C-p" 'previous-line)
     (define-key km "\C-?" 'previous-line)
+    (define-key km [?\S-\ ] 'previous-line)
     (define-key km [down] 'next-line)
     (define-key km [up] 'previous-line)
     ;; marking
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index 6382b14..6572cee 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -1449,13 +1449,12 @@ This function does not do any hidden buffer changes."
       ;; same line.
       (re-search-forward "\\=\\s *[\n\r]" start t)
 
-      (if (if (let (open-paren-in-column-0-is-defun-start) (forward-comment 
-1))
+      (if (if (forward-comment -1)
              (if (eolp)
                  ;; If forward-comment above succeeded and we're at eol
                  ;; then the newline we moved over above didn't end a
                  ;; line comment, so we give it another go.
-                 (let (open-paren-in-column-0-is-defun-start)
-                   (forward-comment -1))
+                 (forward-comment -1)
                t))
 
          ;; Emacs <= 20 and XEmacs move back over the closer of a
@@ -1482,7 +1481,7 @@ comment at the start of cc-engine.el for more info."
            ;; return t when moving backwards at bob.
            (not (bobp))
 
-           (if (let (open-paren-in-column-0-is-defun-start moved-comment)
+           (if (let (moved-comment)
                  (while
                      (and (not (setq moved-comment (forward-comment -1)))
                      ;; Cope specifically with ^M^J here -
@@ -2524,6 +2523,20 @@ comment at the start of cc-engine.el for more info."
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Defuns which analyze the buffer, yet don't change `c-state-cache'.
+(defun c-get-fallback-scan-pos (here)
+  ;; Return a start position for building `c-state-cache' from
+  ;; scratch.  This will be at the top level, 2 defuns back.
+  (save-excursion
+    ;; Go back 2 bods, but ignore any bogus positions returned by
+    ;; beginning-of-defun (i.e. open paren in column zero).
+    (goto-char here)
+    (let ((cnt 2))
+      (while (not (or (bobp) (zerop cnt)))
+       (c-beginning-of-defun-1)        ; Pure elisp BOD.
+       (if (eq (char-after) ?\{)
+           (setq cnt (1- cnt)))))
+    (point)))
+
 (defun c-state-balance-parens-backwards (here- here+ top)
   ;; Return the position of the opening paren/brace/bracket before HERE- which
   ;; matches the outermost close p/b/b between HERE+ and TOP.  Except when
@@ -2584,22 +2597,46 @@ comment at the start of cc-engine.el for more info."
   ;; o - ('backward nil) - scan backwards (from HERE).
   ;; o - ('back-and-forward START-POINT) - like 'forward, but when HERE is 
earlier
   ;;     than GOOD-POS.
+  ;; o - ('BOD START-POINT) - scan forwards from START-POINT, which is at the
+  ;;   top level.
   ;; o - ('IN-LIT nil) - point is inside the literal containing point-min.
   (let ((cache-pos (c-get-cache-scan-pos here))        ; highest position 
below HERE in cache (or 1)
-       strategy            ; 'forward, 'backward, or 'IN-LIT.
-       start-point)
+       BOD-pos             ; position of 2nd BOD before HERE.
+       strategy            ; 'forward, 'backward, 'BOD, or 'IN-LIT.
+       start-point
+       how-far)                        ; putative scanning distance.
     (setq good-pos (or good-pos (c-state-get-min-scan-pos)))
     (cond
      ((< here (c-state-get-min-scan-pos))
-      (setq strategy 'IN-LIT))
+      (setq strategy 'IN-LIT
+           start-point nil
+           cache-pos nil
+           how-far 0))
      ((<= good-pos here)
       (setq strategy 'forward
-           start-point (max good-pos cache-pos)))
+           start-point (max good-pos cache-pos)
+           how-far (- here start-point)))
      ((< (- good-pos here) (- here cache-pos)) ; FIXME!!! ; apply some sort of 
weighting.
-      (setq strategy 'backward))
+      (setq strategy 'backward
+           how-far (- good-pos here)))
      (t
       (setq strategy 'back-and-forward
-           start-point cache-pos)))
+           start-point cache-pos
+           how-far (- here start-point))))
+
+    ;; Might we be better off starting from the top level, two defuns back,
+    ;; instead?  This heuristic no longer works well in C++, where
+    ;; declarations inside namespace brace blocks are frequently placed at
+    ;; column zero.  (2015-11-10): Remove the condition on C++ Mode.
+    (when (and (or (not (memq 'col-0-paren c-emacs-features))
+                  open-paren-in-column-0-is-defun-start)
+              ;; (not (c-major-mode-is 'c++-mode))
+              (> how-far c-state-cache-too-far))
+      (setq BOD-pos (c-get-fallback-scan-pos here)) ; somewhat EXPENSIVE!!!
+      (if (< (- here BOD-pos) how-far)
+         (setq strategy 'BOD
+               start-point BOD-pos)))
+
     (list strategy start-point)))
 
 
@@ -3227,8 +3264,7 @@ comment at the start of cc-engine.el for more info."
     ;; Truncate `c-state-cache' and set `c-state-cache-good-pos' to a value
     ;; below `here'.  To maintain its consistency, we may need to insert a new
     ;; brace pair.
-    (let (open-paren-in-column-0-is-defun-start
-         (here-bol (c-point 'bol here))
+    (let ((here-bol (c-point 'bol here))
          too-high-pa             ; recorded {/(/[ next above here, or nil.
          dropped-cons            ; was the last removed element a brace pair?
          pa)
@@ -3299,7 +3335,6 @@ comment at the start of cc-engine.el for more info."
   ;; This function might do hidden buffer changes.
   (let* ((here (point))
         (here-bopl (c-point 'bopl))
-        open-paren-in-column-0-is-defun-start
         strategy            ; 'forward, 'backward etc..
         ;; Candidate positions to start scanning from:
         cache-pos           ; highest position below HERE already existing in
@@ -3320,9 +3355,13 @@ comment at the start of cc-engine.el for more info."
          strategy (car res)
          start-point (cadr res))
 
+    (when (eq strategy 'BOD)
+      (setq c-state-cache nil
+           c-state-cache-good-pos start-point))
+
     ;; SCAN!
     (cond
-     ((memq strategy '(forward back-and-forward))
+     ((memq strategy '(forward back-and-forward BOD))
       (setq res (c-remove-stale-state-cache start-point here here-bopl))
       (setq cache-pos (car res)
            scan-backward-pos (cadr res)
@@ -9571,7 +9610,6 @@ comment at the start of cc-engine.el for more info."
     (c-save-buffer-state
        ((indent-point (point))
         (case-fold-search nil)
-        open-paren-in-column-0-is-defun-start
         ;; A whole ugly bunch of various temporary variables.  Have
         ;; to declare them here since it's not possible to declare
         ;; a variable with only the scope of a cond test and the
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index 1b6a233..a46ee15 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -1098,10 +1098,9 @@ Note that the style variables are always made local to 
the buffer."
                              (buffer-substring-no-properties beg end)))))))
 
          (if c-get-state-before-change-functions
-             (let (open-paren-in-column-0-is-defun-start)
-               (mapc (lambda (fn)
-                       (funcall fn beg end))
-                     c-get-state-before-change-functions)))
+             (mapc (lambda (fn)
+                     (funcall fn beg end))
+                   c-get-state-before-change-functions))
          )))
     ;; The following must be done here rather than in `c-after-change' because
     ;; newly inserted parens would foul up the invalidation algorithm.
@@ -1132,7 +1131,7 @@ Note that the style variables are always made local to 
the buffer."
 
   (unless (c-called-from-text-property-change-p)
     (setq c-just-done-before-change nil)
-    (c-save-buffer-state (case-fold-search 
open-paren-in-column-0-is-defun-start)
+    (c-save-buffer-state (case-fold-search)
       ;; When `combine-after-change-calls' is used we might get calls
       ;; with regions outside the current narrowing.  This has been
       ;; observed in Emacs 20.7.
@@ -1268,8 +1267,7 @@ Note that the style variables are always made local to 
the buffer."
   ;;
   ;; Type a space in the first blank line, and the fontification of the next
   ;; line was fouled up by context fontification.
-  (let (new-beg new-end new-region case-fold-search
-               open-paren-in-column-0-is-defun-start)
+  (let (new-beg new-end new-region case-fold-search)
     (if (and c-in-after-change-fontification
             (< beg c-new-END) (> end c-new-BEG))
        ;; Region and the latest after-change fontification region overlap.
diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index bdc304e..af2ea56 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/progmodes/elisp-mode.el
@@ -230,7 +230,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)
+  (defvar project-library-roots-function)
   (lisp-mode-variables nil nil 'elisp)
   (add-hook 'after-load-functions #'elisp--font-lock-flush-elisp-buffers)
   (setq-local electric-pair-text-pairs
@@ -242,7 +242,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)
+  (setq-local project-library-roots-function #'elisp-library-roots)
   (add-hook 'completion-at-point-functions
             #'elisp-completion-at-point nil 'local))
 
@@ -801,7 +801,8 @@ non-nil result supercedes the xrefs produced by
 
     xrefs))
 
-(declare-function project-search-path "project")
+(declare-function project-library-roots "project")
+(declare-function project-roots "project")
 (declare-function project-current "project")
 
 (defun elisp--xref-find-references (symbol)
@@ -809,7 +810,10 @@ non-nil result supercedes the xrefs produced by
   (cl-mapcan
    (lambda (dir)
      (xref-collect-references symbol dir))
-   (project-search-path (project-current))))
+   (let ((pr (project-current t)))
+     (append
+      (project-roots pr)
+      (project-library-roots pr)))))
 
 (defun elisp--xref-find-apropos (regexp)
   (apply #'nconc
@@ -846,7 +850,7 @@ non-nil result supercedes the xrefs produced by
 (cl-defmethod xref-location-group ((l xref-elisp-location))
   (xref-elisp-location-file l))
 
-(defun elisp-search-path ()
+(defun elisp-library-roots ()
   (defvar package-user-dir)
   (cons package-user-dir load-path))
 
@@ -1120,7 +1124,6 @@ character)."
      (eval (eval-sexp-add-defvars (elisp--preceding-sexp)) lexical-binding)
      eval-last-sexp-arg-internal)))
 
-
 (defun elisp--eval-last-sexp-print-value (value &optional 
eval-last-sexp-arg-internal)
   (let ((unabbreviated (let ((print-length nil) (print-level nil))
                         (prin1-to-string value)))
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el
index 0d5fc3a..38c5cc2 100644
--- a/lisp/progmodes/etags.el
+++ b/lisp/progmodes/etags.el
@@ -2098,7 +2098,10 @@ for \\[find-tag] (which see)."
   (cl-mapcan
    (lambda (dir)
      (xref-collect-references symbol dir))
-   (project-search-path (project-current))))
+   (let ((pr (project-current t)))
+     (append
+      (project-roots pr)
+      (project-library-roots pr)))))
 
 (defun etags--xref-find-definitions (pattern &optional regexp?)
   ;; This emulates the behaviour of `find-tag-in-order' but instead of
@@ -2154,7 +2157,7 @@ for \\[find-tag] (which see)."
   (with-slots (tag-info) l
     (nth 1 tag-info)))
 
-(defun etags-search-path ()
+(defun etags-library-roots ()
   (mapcar #'file-name-directory tags-table-list))
 
 
diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el
index 5c938fd..0e333f1 100644
--- a/lisp/progmodes/f90.el
+++ b/lisp/progmodes/f90.el
@@ -1452,7 +1452,7 @@ if all else fails."
     (not (or (looking-at "end")
              (looking-at "\\(do\\|if\\|else\\(if\\|where\\)?\
 \\|select[ \t]*\\(case\\|type\\)\\|case\\|where\\|forall\\|\
-block\\|critical\\|enum\\)\\_>")
+block\\|critical\\|enum\\|associate\\)\\_>")
              (looking-at "\\(program\\|\\(?:sub\\)?module\\|\
 \\(?:abstract[ \t]*\\)?interface\\|block[ \t]*data\\)\\_>")
              (looking-at "\\(contains\\|\\(?:\\sw\\|\\s_\\)+[ \t]*:\\)")
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el
index 5a4f383..3ce1c17 100644
--- a/lisp/progmodes/js.el
+++ b/lisp/progmodes/js.el
@@ -52,6 +52,7 @@
 (require 'imenu)
 (require 'moz nil t)
 (require 'json nil t)
+(require 'sgml-mode)
 
 (eval-when-compile
   (require 'cl-lib)
@@ -1998,6 +1999,193 @@ indentation is aligned to that column."
            (+ js-indent-level js-expr-indent-offset))
           (t 0))))
 
+;;; JSX Indentation
+
+(defsubst js--jsx-find-before-tag ()
+  "Find where JSX starts.
+
+Assume JSX appears in the following instances:
+- Inside parentheses, when returned or as the first argument
+  to a function, and after a newline
+- When assigned to variables or object properties, but only
+  on a single line
+- As the N+1th argument to a function
+
+This is an optimized version of (re-search-backward \"[(,]\n\"
+nil t), except set point to the end of the match.  This logic
+executes up to the number of lines in the file, so it should be
+really fast to reduce that impact."
+  (let (pos)
+    (while (and (> (point) (point-min))
+                (not (progn
+                       (end-of-line 0)
+                       (when (or (eq (char-before) 40)   ; (
+                                 (eq (char-before) 44))  ; ,
+                         (setq pos (1- (point))))))))
+    pos))
+
+(defconst js--jsx-end-tag-re
+  (concat "</" sgml-name-re ">\\|/>")
+  "Find the end of a JSX element.")
+
+(defconst js--jsx-after-tag-re "[),]"
+  "Find where JSX ends.
+This complements the assumption of where JSX appears from
+`js--jsx-before-tag-re', which see.")
+
+(defun js--jsx-indented-element-p ()
+  "Determine if/how the current line should be indented as JSX.
+
+Return `first' for the first JSXElement on its own line.
+Return `nth' for subsequent lines of the first JSXElement.
+Return `expression' for an embedded JS expression.
+Return `after' for anything after the last JSXElement.
+Return nil for non-JSX lines.
+
+Currently, JSX indentation supports the following styles:
+
+- Single-line elements (indented like normal JS):
+
+  var element = <div></div>;
+
+- Multi-line elements (enclosed in parentheses):
+
+  function () {
+    return (
+      <div>
+        <div></div>
+      </div>
+    );
+ }
+
+- Function arguments:
+
+  React.render(
+    <div></div>,
+    document.querySelector('.root')
+  );"
+  (let ((current-pos (point))
+        (current-line (line-number-at-pos))
+        last-pos
+        before-tag-pos before-tag-line
+        tag-start-pos tag-start-line
+        tag-end-pos tag-end-line
+        after-tag-line
+        parens paren type)
+    (save-excursion
+      (and
+       ;; Determine if we're inside a jsx element
+       (progn
+         (end-of-line)
+         (while (and (not tag-start-pos)
+                     (setq last-pos (js--jsx-find-before-tag)))
+           (while (forward-comment 1))
+           (when (= (char-after) 60) ; <
+             (setq before-tag-pos last-pos
+                   tag-start-pos (point)))
+           (goto-char last-pos))
+         tag-start-pos)
+       (progn
+         (setq before-tag-line (line-number-at-pos before-tag-pos)
+               tag-start-line (line-number-at-pos tag-start-pos))
+         (and
+          ;; A "before" line which also starts an element begins with js, so
+          ;; indent it like js
+          (> current-line before-tag-line)
+          ;; Only indent the jsx lines like jsx
+          (>= current-line tag-start-line)))
+       (cond
+        ;; Analyze bounds if there are any
+        ((progn
+           (while (and (not tag-end-pos)
+                       (setq last-pos (re-search-forward js--jsx-end-tag-re 
nil t)))
+             (while (forward-comment 1))
+             (when (looking-at js--jsx-after-tag-re)
+               (setq tag-end-pos last-pos)))
+           tag-end-pos)
+         (setq tag-end-line (line-number-at-pos tag-end-pos)
+               after-tag-line (line-number-at-pos after-tag-line))
+         (or (and
+              ;; Ensure we're actually within the bounds of the jsx
+              (<= current-line tag-end-line)
+              ;; An "after" line which does not end an element begins with
+              ;; js, so indent it like js
+              (<= current-line after-tag-line))
+             (and
+              ;; Handle another case where there could be e.g. comments after
+              ;; the element
+              (> current-line tag-end-line)
+              (< current-line after-tag-line)
+              (setq type 'after))))
+        ;; They may not be any bounds (yet)
+        (t))
+       ;; Check if we're inside an embedded multi-line js expression
+       (cond
+        ((not type)
+         (goto-char current-pos)
+         (end-of-line)
+         (setq parens (nth 9 (syntax-ppss)))
+         (while (and parens (not type))
+           (setq paren (car parens))
+           (cond
+            ((and (>= paren tag-start-pos)
+                  ;; Curly bracket indicates the start of an embedded 
expression
+                  (= (char-after paren) 123) ; {
+                  ;; The first line of the expression is indented like sgml
+                  (> current-line (line-number-at-pos paren))
+                  ;; Check if within a closing curly bracket (if any)
+                  ;; (exclusive, as the closing bracket is indented like sgml)
+                  (cond
+                   ((progn
+                      (goto-char paren)
+                      (ignore-errors (let (forward-sexp-function)
+                                       (forward-sexp))))
+                    (< current-line (line-number-at-pos)))
+                   (t)))
+             ;; Indicate this guy will be indented specially
+             (setq type 'expression))
+            (t (setq parens (cdr parens)))))
+         t)
+        (t))
+       (cond
+        (type)
+        ;; Indent the first jsx thing like js so we can indent future jsx 
things
+        ;; like sgml relative to the first thing
+        ((= current-line tag-start-line) 'first)
+        ('nth))))))
+
+(defmacro js--as-sgml (&rest body)
+  "Execute BODY as if in sgml-mode."
+  `(with-syntax-table sgml-mode-syntax-table
+     (let (forward-sexp-function
+           parse-sexp-lookup-properties)
+       ,@body)))
+
+(defun js--expression-in-sgml-indent-line ()
+  "Indent the current line as JavaScript or SGML (whichever is farther)."
+  (let* (indent-col
+         (savep (point))
+         ;; Don't whine about errors/warnings when we're indenting.
+         ;; This has to be set before calling parse-partial-sexp below.
+         (inhibit-point-motion-hooks t)
+         (parse-status (save-excursion
+                         (syntax-ppss (point-at-bol)))))
+    ;; Don't touch multiline strings.
+    (unless (nth 3 parse-status)
+      (setq indent-col (save-excursion
+                         (back-to-indentation)
+                         (if (>= (point) savep) (setq savep nil))
+                         (js--as-sgml (sgml-calculate-indent))))
+      (if (null indent-col)
+          'noindent
+        ;; Use whichever indentation column is greater, such that the sgml
+        ;; column is effectively a minimum
+        (setq indent-col (max (js--proper-indentation parse-status)
+                              (+ indent-col js-indent-level)))
+        (if savep
+            (save-excursion (indent-line-to indent-col))
+          (indent-line-to indent-col))))))
+
 (defun js-indent-line ()
   "Indent the current line as JavaScript."
   (interactive)
@@ -2008,6 +2196,25 @@ indentation is aligned to that column."
       (indent-line-to (js--proper-indentation parse-status))
       (when (> offset 0) (forward-char offset)))))
 
+(defun js-jsx-indent-line ()
+  "Indent the current line as JSX (with SGML offsets).
+i.e., customize JSX element indentation with `sgml-basic-offset',
+`sgml-attribute-offset' et al."
+  (interactive)
+  (let ((indentation-type (js--jsx-indented-element-p)))
+    (cond
+     ((eq indentation-type 'expression)
+      (js--expression-in-sgml-indent-line))
+     ((or (eq indentation-type 'first)
+          (eq indentation-type 'after))
+      ;; Don't treat this first thing as a continued expression (often a "<" or
+      ;; ">" causes this misinterpretation)
+      (cl-letf (((symbol-function #'js--continued-expression-p) 'ignore))
+        (js-indent-line)))
+     ((eq indentation-type 'nth)
+      (js--as-sgml (sgml-indent-line)))
+     (t (js-indent-line)))))
+
 ;;; Filling
 
 (defvar js--filling-paragraph nil)
@@ -3566,6 +3773,20 @@ If one hasn't been set, or if it's stale, prompt for a 
new one."
   ;;(syntax-propertize (point-max))
   )
 
+;;;###autoload
+(define-derived-mode js-jsx-mode js-mode "JSX"
+  "Major mode for editing JSX.
+
+To customize the indentation for this mode, set the SGML offset
+variables (`sgml-basic-offset', `sgml-attribute-offset' et al)
+locally, like so:
+
+  (defun set-jsx-indentation ()
+    (setq-local sgml-basic-offset js-indent-level))
+  (add-hook 'js-jsx-mode-hook #'set-jsx-indentation)"
+  :group 'js
+  (setq-local indent-line-function #'js-jsx-indent-line))
+
 ;;;###autoload (defalias 'javascript-mode 'js-mode)
 
 (eval-after-load 'folding
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index 186840a..398339e 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -21,9 +21,10 @@
 
 ;; 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.
+;; root, related project directories, and library directories.  This
+;; list is to be extended in future versions.
 ;;
-;; The goal is to make it easy for Lisp programs to operate on the
+;; The goal is to make it easier for Lisp programs to operate on the
 ;; current project, without having to know which package handles
 ;; detection of that project type, parsing its config files, etc.
 
@@ -31,63 +32,94 @@
 
 (require 'cl-generic)
 
-(defvar project-find-functions (list #'project-try-vc
-                                     #'project-ask-user)
+(defvar project-find-functions (list #'project-try-vc)
   "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 root directories.
+;; FIXME: Using the current approach, major modes are supposed to set
+;; this variable to a buffer-local value.  So we don't have access to
+;; the "library roots" of language A from buffers of language B, which
+;; seems desirable in multi-language projects, at least for some
+;; potential uses, like "jump to a file in project or library".
+;;
+;; We can add a second argument to this function: a file extension, or
+;; a language name.  Some projects will know the set of languages used
+;; in them; for others, like VC-based projects, we'll need
+;; auto-detection.  I see two options:
+;;
+;; - That could be implemented as a separate second hook, with a
+;;   list of functions that return file extensions.
+;;
+;; - This variable will be turned into a hook with "append" semantics,
+;;   and each function in it will perform auto-detection when passed
+;;   nil instead of an actual file extension.  Then this hook will, in
+;;   general, be modified globally, and not from major mode functions.
+(defvar project-library-roots-function 'etags-library-roots
+  "Function that returns a list of library roots.
 
-The directories in which we can recursively 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, or so on.
+It should return a list of directories that contain source files
+related to 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.  This variable is
-normally set by the major mode.  Used in the default
-implementation of `project-search-path'.")
+The directory names should be absolute.  Used in the default
+implementation of `project-library-roots'.")
 
 ;;;###autoload
-(defun project-current (&optional dir)
-  "Return the project instance in DIR or `default-directory'."
+(defun project-current (&optional maybe-prompt dir)
+  "Return the project instance in DIR or `default-directory'.
+When no project found in DIR, and MAYBE-PROMPT is non-nil, ask
+the user for a different directory to look in."
   (unless dir (setq dir default-directory))
+  (let ((pr (project--find-in-directory dir)))
+    (cond
+     (pr)
+     (maybe-prompt
+      (setq dir (read-directory-name "Choose the project directory: " dir nil 
t)
+            pr (project--find-in-directory dir))
+      (unless pr
+        (user-error "No project found in `%s'" dir))))
+    pr))
+
+(defun project--find-in-directory (dir)
   (run-hook-with-args-until-success 'project-find-functions dir))
 
 ;; FIXME: Add MODE argument, like in `ede-source-paths'?
-(cl-defgeneric project-search-path (project)
-  "Return the list of source root directories.
-Any directory roots where source (or header, etc) files used by
-the current project may be found, inside or outside of the
-current project tree(s).  The directory names should be absolute.
-
-Unless it really knows better, a specialized implementation
-should take into account the value returned by
-`project-search-path-function' and call
-`project-prune-directories' on the result."
-  (project-prune-directories
-   (append
-    ;; We don't know the project layout, like where the sources are,
-    ;; so we simply include the roots.
-    (project-roots project)
-    (funcall project-search-path-function))))
+(cl-defgeneric project-library-roots (project)
+  "Return the list of library roots for PROJECT.
+
+It's the list of directories outside of the project that contain
+related source files.
+
+Project-specific version of `project-library-roots-function',
+which see.  Unless it knows better, a specialized implementation
+should use the value returned by that function."
+  (project-subtract-directories
+   (project-combine-directories
+    (funcall project-library-roots-function))
+   (project-roots project)))
 
 (cl-defgeneric project-roots (project)
-  "Return the list of directory roots related to the current project.
-It should include the current project root, as well as the roots
-of any other currently open projects, if they're meant to be
-edited together.  The directory names should be absolute.")
+  "Return the list of directory roots belonging to the current project.
+
+Most often it's just one directory, which contains the project
+file and everything else in the project.  But in more advanced
+configurations, a project can span multiple directories.
+
+The rule of thumb for whether to include a directory here, and not
+in `project-library-roots', is whether its contents are meant to
+be edited together with the rest of the project.
+
+The directory names should be absolute.")
 
 (cl-defgeneric project-ignores (_project _dir)
   "Return the list of glob patterns to ignore inside DIR.
 Patterns can match both regular files and directories.
 To root an entry, start it with `./'.  To match directories only,
-end it with `/'.  DIR must be either one of `project-roots', or
-an element of `project-search-path'."
+end it with `/'.  DIR must be one of `project-roots' or
+`project-library-roots'."
   (require 'grep)
   (defvar grep-find-ignored-files)
   (nconc
@@ -101,8 +133,8 @@ an element of `project-search-path'."
   "Project implementation using the VC package."
   :group 'tools)
 
-(defcustom project-vc-search-path nil
-  "List ot directories to include in `project-search-path'.
+(defcustom project-vc-library-roots nil
+  "List ot directories to include in `project-library-roots'.
 The file names can be absolute, or relative to the project root."
   :type '(repeat file)
   :safe 'listp)
@@ -121,13 +153,16 @@ The file names can be absolute, or relative to the 
project root."
 (cl-defmethod project-roots ((project (head vc)))
   (list (cdr project)))
 
-(cl-defmethod project-search-path ((project (head vc)))
-  (append
-   (let ((root (cdr project)))
-     (mapcar
-      (lambda (dir) (expand-file-name dir root))
-      (project--value-in-dir 'project-vc-search-path root)))
-   (cl-call-next-method)))
+(cl-defmethod project-library-roots ((project (head vc)))
+  (project-subtract-directories
+   (project-combine-directories
+    (append
+     (let ((root (cdr project)))
+       (mapcar
+        (lambda (dir) (file-name-as-directory (expand-file-name dir root)))
+        (project--value-in-dir 'project-vc-library-roots root)))
+     (funcall project-library-roots-function)))
+   (project-roots project)))
 
 (cl-defmethod project-ignores ((project (head vc)) dir)
   (let* ((root (cdr project))
@@ -144,19 +179,16 @@ The file names can be absolute, or relative to the 
project root."
      (project--value-in-dir 'project-vc-ignores root)
      (cl-call-next-method))))
 
-(defun project-ask-user (dir)
-  (cons 'user (read-directory-name "Project root: " dir nil t)))
-
-(cl-defmethod project-roots ((project (head user)))
-  (list (cdr project)))
-
-(defun project-prune-directories (dirs)
-  "Returns a copy of DIRS sorted, without subdirectories or non-existing ones."
+(defun project-combine-directories (&rest lists-of-dirs)
+  "Return a sorted and culled list of directory names.
+Appends the elements of LISTS-OF-DIRS together, removes
+non-existing directories, as well as directories a parent of
+whose is already in the list."
   (let* ((dirs (sort
                 (mapcar
                  (lambda (dir)
                    (file-name-as-directory (expand-file-name dir)))
-                 dirs)
+                 (apply #'append lists-of-dirs))
                 #'string<))
          (ref dirs))
     ;; Delete subdirectories from the list.
@@ -166,11 +198,66 @@ The file names can be absolute, or relative to the 
project root."
         (setq ref (cdr ref))))
     (cl-delete-if-not #'file-exists-p dirs)))
 
+(defun project-subtract-directories (files dirs)
+  "Return a list of elements from FILES that are outside of DIRS.
+DIRS must contain directory names."
+  ;; Sidestep the issue of expanded/abbreviated file names here.
+  (cl-set-difference files dirs :test #'file-in-directory-p))
+
 (defun project--value-in-dir (var dir)
   (with-temp-buffer
     (setq default-directory dir)
     (hack-dir-local-variables-non-file-buffer)
     (symbol-value var)))
 
+(declare-function grep-read-files "grep")
+(declare-function xref-collect-matches "xref")
+(declare-function xref--show-xrefs "xref")
+
+;;;###autoload
+(defun project-find-regexp (regexp)
+  "Find all matches for REGEXP in the current project.
+With \\[universal-argument] prefix, you can specify the directory
+to search in, and the file name pattern to search for."
+  (interactive (list (project--read-regexp)))
+  (let* ((pr (project-current t))
+         (dirs (if current-prefix-arg
+                   (list (read-directory-name "Base directory: "
+                                              nil default-directory t))
+                 (project-roots pr))))
+    (project--find-regexp-in dirs regexp pr)))
+
+;;;###autoload
+(defun project-or-libraries-find-regexp (regexp)
+  "Find all matches for REGEXP in the current project or libraries.
+With \\[universal-argument] prefix, you can specify the file name
+pattern to search for."
+  (interactive (list (project--read-regexp)))
+  (let* ((pr (project-current t))
+         (dirs (append
+                (project-roots pr)
+                (project-library-roots pr))))
+    (project--find-regexp-in dirs regexp pr)))
+
+(defun project--read-regexp ()
+  (defvar xref-identifier-at-point-function)
+  (require 'xref)
+  (read-regexp "Find regexp"
+               (funcall xref-identifier-at-point-function)))
+
+(defun project--find-regexp-in (dirs regexp project)
+  (require 'grep)
+  (let* ((files (if current-prefix-arg
+                    (grep-read-files regexp)
+                  "*"))
+         (xrefs (cl-mapcan
+                 (lambda (dir)
+                   (xref-collect-matches regexp files dir
+                                         (project-ignores project dir)))
+                 dirs)))
+    (unless xrefs
+      (user-error "No matches for: %s" regexp))
+    (xref--show-xrefs xrefs nil)))
+
 (provide 'project)
 ;;; project.el ends here
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 6ff12b5..b6f7da6 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -490,8 +490,8 @@ The type returned can be `comment', `string' or `paren'."
 
 (defsubst python-syntax-closing-paren-p ()
   "Return non-nil if char after point is a closing paren."
-  (= (syntax-class (syntax-after (point)))
-     (syntax-class (string-to-syntax ")"))))
+  (eql (syntax-class (syntax-after (point)))
+       (syntax-class (string-to-syntax ")"))))
 
 (define-obsolete-function-alias
   'python-info-ppss-context #'python-syntax-context "24.3")
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index 7eff1f1..89a0604 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -56,6 +56,9 @@
 (require 'pcase)
 (require 'project)
 
+(eval-when-compile
+  (require 'semantic/symref)) ;; for hit-lines slot
+
 (defgroup xref nil "Cross-referencing commands"
   :group 'tools)
 
@@ -92,7 +95,7 @@ This is typically the filename.")
 Line numbers start from 1 and columns from 0.")
 
 (defun xref-make-file-location (file line column)
-  "Create and return a new xref-file-location."
+  "Create and return a new `xref-file-location'."
   (make-instance 'xref-file-location :file file :line line :column column))
 
 (cl-defmethod xref-location-marker ((l xref-file-location))
@@ -117,7 +120,7 @@ Line numbers start from 1 and columns from 0.")
    (position :type fixnum :initarg :position)))
 
 (defun xref-make-buffer-location (buffer position)
-  "Create and return a new xref-buffer-location."
+  "Create and return a new `xref-buffer-location'."
   (make-instance 'xref-buffer-location :buffer buffer :position position))
 
 (cl-defmethod xref-location-marker ((l xref-buffer-location))
@@ -138,7 +141,7 @@ indicate errors, e.g. when we know that a function exists 
but the
 actual location is not known.")
 
 (defun xref-make-bogus-location (message)
-  "Create and return a new xref-bogus-location."
+  "Create and return a new `xref-bogus-location'."
   (make-instance 'xref-bogus-location :message message))
 
 (cl-defmethod xref-location-marker ((l xref-bogus-location))
@@ -162,7 +165,7 @@ to the reference's target."))
 somewhere.")
 
 (defun xref-make (summary location)
-  "Create and return a new xref item.
+  "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))
@@ -183,7 +186,7 @@ somewhere.")
           end-column)))
 
 (defun xref-make-match (summary end-column location)
-  "Create and return a new xref match item.
+  "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'."
@@ -411,20 +414,6 @@ WINDOW controls how the buffer is displayed:
 (defvar-local xref--display-history nil
   "List of pairs (BUFFER . WINDOW), for temporarily displayed buffers.")
 
-(defvar-local xref--temporary-buffers nil
-  "List of buffers created by xref code.")
-
-(defvar-local xref--current nil
-  "Non-nil if this buffer was once current, except while displaying xrefs.
-Used for temporary buffers.")
-
-(defvar xref--inhibit-mark-current nil)
-
-(defun xref--mark-selected ()
-  (unless xref--inhibit-mark-current
-    (setq xref--current t))
-  (remove-hook 'buffer-list-update-hook #'xref--mark-selected t))
-
 (defun xref--save-to-history (buf win)
   (let ((restore (window-parameter win 'quit-restore)))
     ;; Save the new entry if the window displayed another buffer
@@ -446,15 +435,9 @@ Used for temporary buffers.")
 
 (defun xref--show-location (location)
   (condition-case err
-      (let ((bl (buffer-list))
-            (xref--inhibit-mark-current t)
-            (marker (xref-location-marker location)))
-        (let ((buf (marker-buffer marker)))
-          (unless (memq buf bl)
-            ;; Newly created.
-            (add-hook 'buffer-list-update-hook #'xref--mark-selected nil t)
-            (push buf xref--temporary-buffers))
-          (xref--display-position marker t buf)))
+      (let* ((marker (xref-location-marker location))
+             (buf (marker-buffer marker)))
+        (xref--display-position marker t buf))
     (user-error (message (error-message-string err)))))
 
 (defun xref-show-location-at-point ()
@@ -591,8 +574,7 @@ Used for temporary buffers.")
 (defun xref-quit (&optional kill)
   "Bury temporarily displayed buffers, then quit the current window.
 
-If KILL is non-nil, kill all buffers that were created in the
-process of showing xrefs, and also kill the current buffer.
+If KILL is non-nil, also kill the current buffer.
 
 The buffers that the user has otherwise interacted with in the
 meantime are preserved."
@@ -604,13 +586,6 @@ meantime are preserved."
       (when (and (window-live-p win)
                  (eq buf (window-buffer win)))
         (quit-window nil win)))
-    (when kill
-      (let ((xref--inhibit-mark-current t)
-            kill-buffer-query-functions)
-        (dolist (buf xref--temporary-buffers)
-          (unless (buffer-local-value 'xref--current buf)
-            (kill-buffer buf)))
-        (setq xref--temporary-buffers nil)))
     (quit-window kill window)))
 
 (defconst xref-buffer-name "*xref*"
@@ -633,7 +608,7 @@ meantime are preserved."
 
 (defun xref--insert-xrefs (xref-alist)
   "Insert XREF-ALIST in the current-buffer.
-XREF-ALIST is of the form ((GROUP . (XREF ...)) ...).  Where
+XREF-ALIST is of the form ((GROUP . (XREF ...)) ...), where
 GROUP is a string for decoration purposes and XREF is an
 `xref-item' object."
   (require 'compile) ; For the compilation faces.
@@ -684,15 +659,13 @@ Return an alist of the form ((FILENAME . (XREF ...)) 
...)."
         (pop-to-buffer (current-buffer))
         (goto-char (point-min))
         (setq xref--window (assoc-default 'window alist))
-        (setq xref--temporary-buffers (assoc-default 'temporary-buffers alist))
-        (dolist (buf xref--temporary-buffers)
-          (with-current-buffer buf
-            (add-hook 'buffer-list-update-hook #'xref--mark-selected nil t)))
         (current-buffer)))))
 
 
 ;; This part of the UI seems fairly uncontroversial: it reads the
 ;; identifier and deals with the single definition case.
+;; (FIXME: do we really want this case to be handled like that in
+;; "find references" and "find regexp searches"?)
 ;;
 ;; The controversial multiple definitions case is handed off to
 ;; xref-show-xrefs-function.
@@ -704,21 +677,15 @@ Return an alist of the form ((FILENAME . (XREF ...)) 
...)."
 
 (defvar xref--read-pattern-history nil)
 
-(defun xref--show-xrefs (input kind arg window)
-  (let* ((bl (buffer-list))
-         (xrefs (funcall xref-find-function kind arg))
-         (tb (cl-set-difference (buffer-list) bl)))
-    (cond
-     ((null xrefs)
-      (user-error "No %s found for: %s" (symbol-name kind) input))
-     ((not (cdr xrefs))
-      (xref-push-marker-stack)
-      (xref--pop-to-location (car xrefs) window))
-     (t
-      (xref-push-marker-stack)
-      (funcall xref-show-xrefs-function xrefs
-               `((window . ,window)
-                 (temporary-buffers . ,tb)))))))
+(defun xref--show-xrefs (xrefs window)
+  (cond
+   ((not (cdr xrefs))
+    (xref-push-marker-stack)
+    (xref--pop-to-location (car xrefs) window))
+   (t
+    (xref-push-marker-stack)
+    (funcall xref-show-xrefs-function xrefs
+             `((window . ,window))))))
 
 (defun xref--prompt-p (command)
   (or (eq xref-prompt-for-identifier t)
@@ -746,8 +713,14 @@ Return an alist of the form ((FILENAME . (XREF ...)) ...)."
 
 ;;; Commands
 
+(defun xref--find-xrefs (input kind arg window)
+  (let ((xrefs (funcall xref-find-function kind arg)))
+    (unless xrefs
+      (user-error "No %s found for: %s" (symbol-name kind) input))
+    (xref--show-xrefs xrefs window)))
+
 (defun xref--find-definitions (id window)
-  (xref--show-xrefs id 'definitions id window))
+  (xref--find-xrefs id 'definitions id window))
 
 ;;;###autoload
 (defun xref-find-definitions (identifier)
@@ -781,36 +754,7 @@ display the list in a buffer."
   "Find references to the identifier at point.
 With prefix argument, prompt for the identifier."
   (interactive (list (xref--read-identifier "Find references of: ")))
-  (xref--show-xrefs identifier 'references identifier nil))
-
-;; TODO: Rename and move to project-find-regexp, as soon as idiomatic
-;; usage of xref from other packages has stabilized.
-;;;###autoload
-(defun xref-find-regexp (regexp)
-  "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: ")))
-  (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
-                  (append
-                   (project-roots proj)
-                   (project-search-path proj)))))
-         (xref-find-function
-          (lambda (_kind regexp)
-            (cl-mapcan
-             (lambda (dir)
-               (xref-collect-matches regexp files dir
-                                     (project-ignores proj dir)))
-             dirs))))
-    (xref--show-xrefs regexp 'matches regexp nil)))
+  (xref--find-xrefs identifier 'references identifier nil))
 
 (declare-function apropos-parse-pattern "apropos" (pattern))
 
@@ -822,7 +766,7 @@ The argument has the same meaning as in `apropos'."
                       "Search for pattern (word list or regexp): "
                       nil 'xref--read-pattern-history)))
   (require 'apropos)
-  (xref--show-xrefs pattern 'apropos
+  (xref--find-xrefs pattern 'apropos
                     (apropos-parse-pattern
                      (if (string-equal (regexp-quote pattern) pattern)
                          ;; Split into words
@@ -866,7 +810,6 @@ and just use etags."
 
 (declare-function semantic-symref-find-references-by-name "semantic/symref")
 (declare-function semantic-find-file-noselect "semantic/fw")
-(declare-function grep-read-files "grep")
 (declare-function grep-expand-template "grep")
 
 (defun xref-collect-references (symbol dir)
diff --git a/lisp/simple.el b/lisp/simple.el
index f6c580f..b115a2a 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -609,8 +609,7 @@ buffer if the variable `delete-trailing-lines' is non-nil."
             (start (or start (point-min))))
         (goto-char start)
         (while (re-search-forward "\\s-$" end-marker t)
-          (save-match-data
-            (skip-syntax-backward "-" (line-beginning-position)))
+          (skip-syntax-backward "-" (line-beginning-position))
           ;; Don't delete formfeeds, even if they are considered whitespace.
           (if (looking-at-p ".*\f")
               (goto-char (match-end 0)))
@@ -906,8 +905,8 @@ With numeric arg N, put point N/10 of the way from the 
beginning.
 If the buffer is narrowed, this command uses the beginning of the
 accessible part of the buffer.
 
-If Transient Mark mode is disabled, leave mark at previous
-position, unless a \\[universal-argument] prefix is supplied."
+Push mark at previous position, unless either a \\[universal-argument] prefix
+is supplied, or Transient Mark mode is enabled and the mark is active."
   (declare (interactive-only "use `(goto-char (point-min))' instead."))
   (interactive "^P")
   (or (consp arg)
@@ -930,8 +929,8 @@ With numeric arg N, put point N/10 of the way from the end.
 If the buffer is narrowed, this command uses the end of the
 accessible part of the buffer.
 
-If Transient Mark mode is disabled, leave mark at previous
-position, unless a \\[universal-argument] prefix is supplied."
+Push mark at previous position, unless either a \\[universal-argument] prefix
+is supplied, or Transient Mark mode is enabled and the mark is active."
   (declare (interactive-only "use `(goto-char (point-max))' instead."))
   (interactive "^P")
   (or (consp arg) (region-active-p) (push-mark))
@@ -2769,6 +2768,143 @@ with < or <= based on USE-<."
             '(0 . 0)))
     '(0 . 0)))
 
+;;; Default undo-boundary addition
+;;
+;; This section adds a new undo-boundary at either after a command is
+;; called or in some cases on a timer called after a change is made in
+;; any buffer.
+(defvar-local undo-auto--last-boundary-cause nil
+  "Describe the cause of the last undo-boundary.
+
+If `explicit', the last boundary was caused by an explicit call to
+`undo-boundary', that is one not called by the code in this
+section.
+
+If it is equal to `timer', then the last boundary was inserted
+by `undo-auto--boundary-timer'.
+
+If it is equal to `command', then the last boundary was inserted
+automatically after a command, that is by the code defined in
+this section.
+
+If it is equal to a list, then the last boundary was inserted by
+an amalgamating command.  The car of the list is the number of
+times an amalgamating command has been called, and the cdr are the
+buffers that were changed during the last command.")
+
+(defvar undo-auto--current-boundary-timer nil
+  "Current timer which will run `undo-auto--boundary-timer' or nil.
+
+If set to non-nil, this will effectively disable the timer.")
+
+(defvar undo-auto--this-command-amalgamating nil
+  "Non-nil if `this-command' should be amalgamated.
+This variable is set to nil by `undo-auto--boundaries' and is set
+by `undo-auto--amalgamate'." )
+
+(defun undo-auto--needs-boundary-p ()
+  "Return non-nil if `buffer-undo-list' needs a boundary at the start."
+  (car-safe buffer-undo-list))
+
+(defun undo-auto--last-boundary-amalgamating-number ()
+  "Return the number of amalgamating last commands or nil.
+Amalgamating commands are, by default, either
+`self-insert-command' and `delete-char', but can be any command
+that calls `undo-auto--amalgamate'."
+  (car-safe undo-auto--last-boundary-cause))
+
+(defun undo-auto--ensure-boundary (cause)
+  "Add an `undo-boundary' to the current buffer if needed.
+REASON describes the reason that the boundary is being added; see
+`undo-auto--last-boundary' for more information."
+  (when (and
+         (undo-auto--needs-boundary-p))
+    (let ((last-amalgamating
+           (undo-auto--last-boundary-amalgamating-number)))
+      (undo-boundary)
+      (setq undo-auto--last-boundary-cause
+            (if (eq 'amalgamate cause)
+                (cons
+                 (if last-amalgamating (1+ last-amalgamating) 0)
+                 undo-auto--undoably-changed-buffers)
+              cause)))))
+
+(defun undo-auto--boundaries (cause)
+  "Check recently changed buffers and add a boundary if necessary.
+REASON describes the reason that the boundary is being added; see
+`undo-last-boundary' for more information."
+  (dolist (b undo-auto--undoably-changed-buffers)
+          (when (buffer-live-p b)
+            (with-current-buffer b
+              (undo-auto--ensure-boundary cause))))
+  (setq undo-auto--undoably-changed-buffers nil))
+
+(defun undo-auto--boundary-timer ()
+  "Timer which will run `undo--auto-boundary-timer'."
+  (setq undo-auto--current-boundary-timer nil)
+  (undo-auto--boundaries 'timer))
+
+(defun undo-auto--boundary-ensure-timer ()
+  "Ensure that the `undo-auto-boundary-timer' is set."
+  (unless undo-auto--current-boundary-timer
+    (setq undo-auto--current-boundary-timer
+          (run-at-time 10 nil #'undo-auto--boundary-timer))))
+
+(defvar undo-auto--undoably-changed-buffers nil
+  "List of buffers that have changed recently.
+
+This list is maintained by `undo-auto--undoable-change' and
+`undo-auto--boundaries' and can be affected by changes to their
+default values.
+
+See also `undo-auto--buffer-undoably-changed'.")
+
+(defun undo-auto--add-boundary ()
+  "Add an `undo-boundary' in appropriate buffers."
+  (undo-auto--boundaries
+   (if undo-auto--this-command-amalgamating
+       'amalgamate
+     'command))
+  (setq undo-auto--this-command-amalgamating nil))
+
+(defun undo-auto--amalgamate ()
+  "Amalgamate undo if necessary.
+This function can be called after an amalgamating command.  It
+removes the previous `undo-boundary' if a series of such calls
+have been made.  By default `self-insert-command' and
+`delete-char' are the only amalgamating commands, although this
+function could be called by any command wishing to have this
+behaviour."
+  (let ((last-amalgamating-count
+         (undo-auto--last-boundary-amalgamating-number)))
+    (setq undo-auto--this-command-amalgamating t)
+    (when
+        last-amalgamating-count
+      (if
+          (and
+           (< last-amalgamating-count 20)
+           (eq this-command last-command))
+          ;; Amalgamate all buffers that have changed.
+          (dolist (b (cdr undo-auto--last-boundary-cause))
+            (when (buffer-live-p b)
+              (with-current-buffer
+                  b
+                (when
+                    ;; The head of `buffer-undo-list' is nil.
+                    ;; `car-safe' doesn't work because
+                    ;; `buffer-undo-list' need not be a list!
+                    (and (listp buffer-undo-list)
+                         (not (car buffer-undo-list)))
+                  (setq buffer-undo-list
+                        (cdr buffer-undo-list))))))
+        (setq undo-auto--last-boundary-cause 0)))))
+
+(defun undo-auto--undoable-change ()
+  "Called after every undoable buffer change."
+  (add-to-list 'undo-auto--undoably-changed-buffers (current-buffer))
+  (undo-auto--boundary-ensure-timer))
+;; End auto-boundary section
+
 (defcustom undo-ask-before-discard nil
   "If non-nil ask about discarding undo info for the current command.
 Normally, Emacs discards the undo info for the current command if
@@ -6498,7 +6634,8 @@ current object."
       (setq pos1 (funcall aux -1))
       (goto-char (car pos1))
       (setq pos2 (funcall aux arg))
-      (transpose-subr-1 pos1 pos2)))))
+      (transpose-subr-1 pos1 pos2)
+      (goto-char (+ (car pos2) (- (cdr pos1) (car pos1))))))))
 
 (defun transpose-subr-1 (pos1 pos2)
   (when (> (car pos1) (cdr pos1)) (setq pos1 (cons (cdr pos1) (car pos1))))
diff --git a/lisp/startup.el b/lisp/startup.el
index 3385567..1346310 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -720,7 +720,7 @@ Window system startup files should add their own function 
to this
 method, which should parse the command line arguments.  Those
 pertaining to the window system should be processed and removed
 from the returned command line.")
-(cl-defmethod handle-args-function (args &context (window-system (eql nil)))
+(cl-defmethod handle-args-function (args &context (window-system nil))
   (tty-handle-args args))
 
 (cl-defgeneric window-system-initialization (&optional _display)
diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el
index 373f812..0b3e3bd 100644
--- a/lisp/term/ns-win.el
+++ b/lisp/term/ns-win.el
@@ -848,7 +848,7 @@ See the documentation of `create-fontset-from-fontset-spec' 
for the format.")
 
 ;; Do the actual Nextstep Windows setup here; the above code just
 ;; defines functions and variables that we use now.
-(cl-defmethod window-system-initialization (&context (window-system (eql ns))
+(cl-defmethod window-system-initialization (&context (window-system ns)
                                             &optional _display)
   "Initialize Emacs for Nextstep (Cocoa / GNUstep) windowing."
   (cl-assert (not ns-initialized))
@@ -922,10 +922,10 @@ See the documentation of 
`create-fontset-from-fontset-spec' for the format.")
 
 ;; Any display name is OK.
 (add-to-list 'display-format-alist '(".*" . ns))
-(cl-defmethod handle-args-function (args &context (window-system (eql ns)))
+(cl-defmethod handle-args-function (args &context (window-system ns))
   (x-handle-args args))
 
-(cl-defmethod frame-creation-function (params &context (window-system (eql 
ns)))
+(cl-defmethod frame-creation-function (params &context (window-system ns))
   (x-create-frame-with-faces params))
 
 (declare-function ns-own-selection-internal "nsselect.m" (selection value))
@@ -935,20 +935,20 @@ See the documentation of 
`create-fontset-from-fontset-spec' for the format.")
 (declare-function ns-get-selection "nsselect.m" (selection-symbol target-type))
 
 (cl-defmethod gui-backend-set-selection (selection value
-                                         &context (window-system (eql ns)))
+                                         &context (window-system ns))
   (if value (ns-own-selection-internal selection value)
     (ns-disown-selection-internal selection)))
 
 (cl-defmethod gui-backend-selection-owner-p (selection
-                                             &context (window-system (eql ns)))
+                                             &context (window-system ns))
   (ns-selection-owner-p selection))
 
 (cl-defmethod gui-backend-selection-exists-p (selection
-                                              &context (window-system (eql 
ns)))
+                                              &context (window-system ns))
   (ns-selection-exists-p selection))
 
 (cl-defmethod gui-backend-get-selection (selection-symbol target-type
-                                         &context (window-system (eql ns)))
+                                         &context (window-system ns))
   (ns-get-selection selection-symbol target-type))
 
 (provide 'ns-win)
diff --git a/lisp/term/pc-win.el b/lisp/term/pc-win.el
index e8aaa1a..d2afaba 100644
--- a/lisp/term/pc-win.el
+++ b/lisp/term/pc-win.el
@@ -221,7 +221,7 @@ the operating system.")
 
 ;; gui-get-selection is used in select.el
 (cl-defmethod gui-backend-get-selection (_selection-symbol _target-type
-                                         &context (window-system (eql pc)))
+                                         &context (window-system pc))
   "Return the value of the current selection.
 Consult the selection.  Treat empty strings as if they were unset."
   ;; Don't die if x-get-selection signals an error.
@@ -231,11 +231,11 @@ Consult the selection.  Treat empty strings as if they 
were unset."
 (declare-function w16-selection-exists-p "w16select.c")
 ;; gui-selection-owner-p is used in simple.el.
 (cl-defmethod gui-backend-selection-exists-p (selection
-                                              &context (window-system (eql 
pc)))
+                                              &context (window-system pc))
   (w16-selection-exists-p selection))
 
 (cl-defmethod gui-backend-selection-owner-p (selection
-                                             &context (window-system (eql pc)))
+                                             &context (window-system pc))
   (w16-selection-owner-p selection))
 
 (defun w16-selection-owner-p (_selection)
@@ -258,7 +258,7 @@ Consult the selection.  Treat empty strings as if they were 
unset."
 (declare-function w16-set-clipboard-data "w16select.c"
                  (string &optional ignored))
 (cl-defmethod gui-backend-set-selection (selection value
-                                         &context (window-system (eql pc)))
+                                         &context (window-system pc))
   (if (not value)
       (if (w16-selection-owner-p selection)
           t)
@@ -333,7 +333,7 @@ Errors out because it is not supposed to be called, ever."
         (window-system)))
 
 ;; window-system-initialization is called by startup.el:command-line.
-(cl-defmethod window-system-initialization (&context (window-system (eql pc))
+(cl-defmethod window-system-initialization (&context (window-system pc)
                                             &optional _display)
   "Initialization function for the `pc' \"window system\"."
   (or (eq (window-system) 'pc)
@@ -377,12 +377,12 @@ Errors out because it is not supposed to be called, ever."
   (run-hooks 'terminal-init-msdos-hook))
 
 ;; frame-creation-function is called by frame.el:make-frame.
-(cl-defmethod frame-creation-function (params &context (window-system (eql 
pc)))
+(cl-defmethod frame-creation-function (params &context (window-system pc))
   (msdos-create-frame-with-faces params))
 
 ;; We don't need anything beyond tty-handle-args for handling
 ;; command-line argument; see startup.el.
-(cl-defmethod handle-args-function (args &context (window-system (eql pc)))
+(cl-defmethod handle-args-function (args &context (window-system pc))
   (tty-handle-args args))
 
 ;; ---------------------------------------------------------------------------
diff --git a/lisp/term/w32-win.el b/lisp/term/w32-win.el
index 8bbc3dd..181fd49 100644
--- a/lisp/term/w32-win.el
+++ b/lisp/term/w32-win.el
@@ -290,7 +290,7 @@ See the documentation of `create-fontset-from-fontset-spec' 
for the format.")
 (declare-function x-parse-geometry "frame.c" (string))
 (defvar x-command-line-resources)
 
-(cl-defmethod window-system-initialization (&context (window-system (eql w32))
+(cl-defmethod window-system-initialization (&context (window-system w32)
                                             &optional _display)
   "Initialize Emacs for W32 GUI frames."
   (cl-assert (not w32-initialized))
@@ -377,10 +377,10 @@ See the documentation of 
`create-fontset-from-fontset-spec' for the format.")
   (setq w32-initialized t))
 
 (add-to-list 'display-format-alist '("\\`w32\\'" . w32))
-(cl-defmethod handle-args-function (args &context (window-system (eql w32)))
+(cl-defmethod handle-args-function (args &context (window-system w32))
   (x-handle-args args))
 
-(cl-defmethod frame-creation-function (params &context (window-system (eql 
w32)))
+(cl-defmethod frame-creation-function (params &context (window-system w32))
   (x-create-frame-with-faces params))
 
 ;;;; Selections
@@ -408,19 +408,19 @@ See the documentation of 
`create-fontset-from-fontset-spec' for the format.")
        (get 'x-selections (or selection 'PRIMARY))))
 
 (cl-defmethod gui-backend-set-selection (type value
-                                         &context (window-system (eql w32)))
+                                         &context (window-system w32))
   (w32--set-selection type value))
 
 (cl-defmethod gui-backend-get-selection (type data-type
-                                         &context (window-system (eql w32)))
+                                         &context (window-system w32))
   (w32--get-selection type data-type))
 
 (cl-defmethod gui-backend-selection-owner-p (selection
-                                             &context (window-system (eql 
w32)))
+                                             &context (window-system w32))
   (w32--selection-owner-p selection))
 
 (cl-defmethod gui-backend-selection-exists-p (selection
-                                              &context (window-system (eql 
w32)))
+                                              &context (window-system w32))
   (w32-selection-exists-p selection))
 
 (when (eq system-type 'windows-nt)
@@ -428,19 +428,19 @@ See the documentation of 
`create-fontset-from-fontset-spec' for the format.")
   ;; We could move those cl-defmethods outside of the `when' and use
   ;; "&context (system-type (eql windows-nt))" instead!
   (cl-defmethod gui-backend-set-selection (type value
-                                           &context (window-system (eql nil)))
+                                           &context (window-system nil))
     (w32--set-selection type value))
 
   (cl-defmethod gui-backend-get-selection (type data-type
-                                           &context (window-system (eql nil)))
+                                           &context (window-system nil))
     (w32--get-selection type data-type))
 
   (cl-defmethod gui-backend-selection-owner-p (selection
-                                               &context (window-system (eql 
nil)))
+                                               &context (window-system nil))
     (w32--selection-owner-p selection))
 
   (cl-defmethod gui-selection-exists-p (selection
-                                        &context (window-system (eql nil)))
+                                        &context (window-system nil))
     (w32-selection-exists-p selection)))
 
 ;; The "Windows" keys on newer keyboards bring up the Start menu
diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el
index 5eb6f11..690401e 100644
--- a/lisp/term/x-win.el
+++ b/lisp/term/x-win.el
@@ -1197,7 +1197,7 @@ This returns an error if any Emacs frames are X frames."
 (defvar x-display-name)
 (defvar x-command-line-resources)
 
-(cl-defmethod window-system-initialization (&context (window-system (eql x))
+(cl-defmethod window-system-initialization (&context (window-system x)
                                             &optional display)
   "Initialize Emacs for X frames and open the first connection to an X server."
   (cl-assert (not x-initialized))
@@ -1327,27 +1327,27 @@ This returns an error if any Emacs frames are X frames."
                  (selection-symbol target-type &optional time-stamp terminal))
 
 (add-to-list 'display-format-alist '("\\`[^:]*:[0-9]+\\(\\.[0-9]+\\)?\\'" . x))
-(cl-defmethod handle-args-function (args &context (window-system (eql x)))
+(cl-defmethod handle-args-function (args &context (window-system x))
   (x-handle-args args))
 
-(cl-defmethod frame-creation-function (params &context (window-system (eql x)))
+(cl-defmethod frame-creation-function (params &context (window-system x))
   (x-create-frame-with-faces params))
 
 (cl-defmethod gui-backend-set-selection (selection value
-                                         &context (window-system (eql x)))
+                                         &context (window-system x))
   (if value (x-own-selection-internal selection value)
     (x-disown-selection-internal selection)))
 
 (cl-defmethod gui-backend-selection-owner-p (selection
-                                             &context (window-system (eql x)))
+                                             &context (window-system x))
   (x-selection-owner-p selection))
 
 (cl-defmethod gui-backend-selection-exists-p (selection
-                                              &context (window-system (eql x)))
+                                              &context (window-system x))
   (x-selection-exists-p selection))
 
 (cl-defmethod gui-backend-get-selection (selection-symbol target-type
-                                         &context (window-system (eql x))
+                                         &context (window-system x)
                                          &optional time-stamp terminal)
   (x-get-selection-internal selection-symbol target-type time-stamp terminal))
 
diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el
index 300e494..00ed027 100644
--- a/lisp/term/xterm.el
+++ b/lisp/term/xterm.el
@@ -821,7 +821,7 @@ We run the first FUNCTION whose STRING matches the input 
events."
 
 (cl-defmethod gui-backend-get-selection
     (type data-type
-     &context (window-system (eql nil))
+     &context (window-system nil)
               ;; Only applies to terminals which have it enabled.
               ((terminal-parameter nil 'xterm--get-selection) (eql t)))
   (unless (eq data-type 'STRING)
@@ -844,7 +844,7 @@ We run the first FUNCTION whose STRING matches the input 
events."
 
 (cl-defmethod gui-backend-set-selection
     (type data
-     &context (window-system (eql nil))
+     &context (window-system nil)
               ;; Only applies to terminals which have it enabled.
               ((terminal-parameter nil 'xterm--set-selection) (eql t)))
   "Copy DATA to the X selection using the OSC 52 escape sequence.
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index 0b13759..c9d347d 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -3291,6 +3291,7 @@ There might be text before point."
     ("\\rightthreetimes" . ?⋌)
     ("\\risingdotseq" . ?≓)
     ("\\rtimes" . ?⋊)
+    ("\\times" . ?×)
     ("\\sbs" . ?﹨)
     ("\\searrow" . ?↘)
     ("\\setminus" . ?∖)
diff --git a/lisp/url/url-handlers.el b/lisp/url/url-handlers.el
index 845195e..a5d9f37 100644
--- a/lisp/url/url-handlers.el
+++ b/lisp/url/url-handlers.el
@@ -223,7 +223,7 @@ the arguments that would have been passed to OPERATION."
         ;; which really stands for "/".
         ;; FIXME: maybe we should check that the host part is "" or "localhost"
         ;; or some name that represents the local host?
-        (or (file-name-directory (url-filename url)) "/")
+        (or (file-name-as-directory (url-filename url)) "/")
       ;; All other URLs are not expected to be directly accessible from
       ;; a local process.
       nil)))
diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el
index 9b2711d..caedbd9 100644
--- a/lisp/vc/vc-bzr.el
+++ b/lisp/vc/vc-bzr.el
@@ -517,7 +517,7 @@ in the branch repository (or whose status not be 
determined)."
     ;; elisp function to remerge from the .BASE/OTHER/THIS files.
     (smerge-start-session)
     (add-hook 'after-save-hook 'vc-bzr-resolve-when-done nil t)
-    (message "There are unresolved conflicts in this file")))
+    (vc-message-unresolved-conflicts buffer-file-name)))
 
 (defun vc-bzr-version-dirstate (dir)
   "Try to return as a string the bzr revision ID of directory DIR.
diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el
index 9b15e64..3b3fb68 100644
--- a/lisp/vc/vc-dir.el
+++ b/lisp/vc/vc-dir.el
@@ -271,6 +271,7 @@ See `run-hooks'."
     (define-key map " " 'vc-dir-next-line)
     (define-key map "\t" 'vc-dir-next-directory)
     (define-key map "p" 'vc-dir-previous-line)
+    (define-key map [?\S-\ ] 'vc-dir-previous-line)
     (define-key map [backtab] 'vc-dir-previous-directory)
     ;;; Rebind paragraph-movement commands.
     (define-key map "\M-}" 'vc-dir-next-directory)
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index 27898a9..8bf37f0 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -841,7 +841,7 @@ This prompts for a branch to merge from."
     (smerge-start-session)
     (when vc-git-resolve-conflicts
       (add-hook 'after-save-hook 'vc-git-resolve-when-done nil 'local))
-    (message "There are unresolved conflicts in this file")))
+    (vc-message-unresolved-conflicts buffer-file-name)))
 
 ;;; HISTORY FUNCTIONS
 
diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el
index f9957c1..92b0c31 100644
--- a/lisp/vc/vc-hg.el
+++ b/lisp/vc/vc-hg.el
@@ -535,7 +535,7 @@ REV is the revision to check out into WORKFILE."
     (vc-file-setprop buffer-file-name 'vc-state 'conflict)
     (smerge-start-session)
     (add-hook 'after-save-hook 'vc-hg-resolve-when-done nil t)
-    (message "There are unresolved conflicts in this file")))
+    (vc-message-unresolved-conflicts buffer-file-name)))
 
 
 ;; Modeled after the similar function in vc-bzr.el
diff --git a/lisp/vc/vc-svn.el b/lisp/vc/vc-svn.el
index 4ef63a2..de58fb9 100644
--- a/lisp/vc/vc-svn.el
+++ b/lisp/vc/vc-svn.el
@@ -686,7 +686,7 @@ and that it passes `vc-svn-global-switches' to it before 
FLAGS."
       ;; use conflict markers in which case we don't really know what to do.
       ;; So let's just punt for now.
       nil)
-    (message "There are unresolved conflicts in this file")))
+    (vc-message-unresolved-conflicts buffer-file-name)))
 
 (defun vc-svn-parse-status (&optional filename)
   "Parse output of \"svn status\" command in the current buffer.
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index f08e562..178b5f0 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -1433,8 +1433,9 @@ Argument BACKEND is the backend you are using."
    (lambda (str)
      ;; Commented or empty lines.
      (string-match-p "\\`\\(?:#\\|[ \t\r\n]*\\'\\)" str))
-   (vc--read-lines
-    (vc-call-backend backend 'find-ignore-file file))))
+   (let ((file (vc-call-backend backend 'find-ignore-file file)))
+     (and (file-exists-p file)
+          (vc--read-lines file)))))
 
 (defun vc--read-lines (file)
   "Return a list of lines of FILE."
@@ -2068,6 +2069,13 @@ changes from the current branch."
     (message "File contains conflicts.")))
 
 ;;;###autoload
+(defun vc-message-unresolved-conflicts (filename)
+  "Display a message indicating unresolved conflicts in FILENAME."
+  ;; This enables all VC backends to give a standard, recognizable
+  ;; conflict message that indicates which file is conflicted.
+  (message "There are unresolved conflicts in %s" filename))
+
+;;;###autoload
 (defalias 'vc-resolve-conflicts 'smerge-ediff)
 
 ;; TODO: This is OK but maybe we could integrate it better.
diff --git a/src/Makefile.in b/src/Makefile.in
index 875a317..859bc1b 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -128,8 +128,9 @@ address@hidden@
 
 address@hidden@ @LIBJPEG@ @LIBPNG@ @LIBGIF@ @LIBXPM@
 
address@hidden@
 address@hidden@
-LIBX_EXTRA=-lX11 $(XFT_LIBS)
+LIBX_EXTRA=-lX11 $(XCB_LIBS) $(XFT_LIBS)
 
 FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
 FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
diff --git a/src/alloc.c b/src/alloc.c
index 7c33687..bee7cd1 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -430,6 +430,7 @@ XFLOAT_INIT (Lisp_Object f, double n)
   XFLOAT (f)->u.data = n;
 }
 
+#ifdef DOUG_LEA_MALLOC
 static bool
 pointers_fit_in_lispobj_p (void)
 {
@@ -446,6 +447,7 @@ mmap_lisp_allowed_p (void)
      regions.  */
   return pointers_fit_in_lispobj_p () && !might_dump;
 }
+#endif
 
 /* Head of a circularly-linked list of extant finalizers. */
 static struct Lisp_Finalizer finalizers;
@@ -800,9 +802,10 @@ void *
 xnmalloc (ptrdiff_t nitems, ptrdiff_t item_size)
 {
   eassert (0 <= nitems && 0 < item_size);
-  if (min (PTRDIFF_MAX, SIZE_MAX) / item_size < nitems)
+  ptrdiff_t nbytes;
+  if (INT_MULTIPLY_WRAPV (nitems, item_size, &nbytes) || SIZE_MAX < nbytes)
     memory_full (SIZE_MAX);
-  return xmalloc (nitems * item_size);
+  return xmalloc (nbytes);
 }
 
 
@@ -813,9 +816,10 @@ void *
 xnrealloc (void *pa, ptrdiff_t nitems, ptrdiff_t item_size)
 {
   eassert (0 <= nitems && 0 < item_size);
-  if (min (PTRDIFF_MAX, SIZE_MAX) / item_size < nitems)
+  ptrdiff_t nbytes;
+  if (INT_MULTIPLY_WRAPV (nitems, item_size, &nbytes) || SIZE_MAX < nbytes)
     memory_full (SIZE_MAX);
-  return xrealloc (pa, nitems * item_size);
+  return xrealloc (pa, nbytes);
 }
 
 
@@ -846,33 +850,43 @@ void *
 xpalloc (void *pa, ptrdiff_t *nitems, ptrdiff_t nitems_incr_min,
         ptrdiff_t nitems_max, ptrdiff_t item_size)
 {
+  ptrdiff_t n0 = *nitems;
+  eassume (0 < item_size && 0 < nitems_incr_min && 0 <= n0 && -1 <= 
nitems_max);
+
   /* The approximate size to use for initial small allocation
      requests.  This is the largest "small" request for the GNU C
      library malloc.  */
   enum { DEFAULT_MXFAST = 64 * sizeof (size_t) / 4 };
 
   /* If the array is tiny, grow it to about (but no greater than)
-     DEFAULT_MXFAST bytes.  Otherwise, grow it by about 50%.  */
-  ptrdiff_t n = *nitems;
-  ptrdiff_t tiny_max = DEFAULT_MXFAST / item_size - n;
-  ptrdiff_t half_again = n >> 1;
-  ptrdiff_t incr_estimate = max (tiny_max, half_again);
-
-  /* Adjust the increment according to three constraints: NITEMS_INCR_MIN,
+     DEFAULT_MXFAST bytes.  Otherwise, grow it by about 50%.
+     Adjust the growth according to three constraints: NITEMS_INCR_MIN,
      NITEMS_MAX, and what the C language can represent safely.  */
-  ptrdiff_t C_language_max = min (PTRDIFF_MAX, SIZE_MAX) / item_size;
-  ptrdiff_t n_max = (0 <= nitems_max && nitems_max < C_language_max
-                    ? nitems_max : C_language_max);
-  ptrdiff_t nitems_incr_max = n_max - n;
-  ptrdiff_t incr = max (nitems_incr_min, min (incr_estimate, nitems_incr_max));
 
-  eassert (0 < item_size && 0 < nitems_incr_min && 0 <= n && -1 <= nitems_max);
+  ptrdiff_t n, nbytes;
+  if (INT_ADD_WRAPV (n0, n0 >> 1, &n))
+    n = PTRDIFF_MAX;
+  if (0 <= nitems_max && nitems_max < n)
+    n = nitems_max;
+
+  ptrdiff_t adjusted_nbytes
+    = ((INT_MULTIPLY_WRAPV (n, item_size, &nbytes) || SIZE_MAX < nbytes)
+       ? min (PTRDIFF_MAX, SIZE_MAX)
+       : nbytes < DEFAULT_MXFAST ? DEFAULT_MXFAST : 0);
+  if (adjusted_nbytes)
+    {
+      n = adjusted_nbytes / item_size;
+      nbytes = adjusted_nbytes - adjusted_nbytes % item_size;
+    }
+
   if (! pa)
     *nitems = 0;
-  if (nitems_incr_max < incr)
+  if (n - n0 < nitems_incr_min
+      && (INT_ADD_WRAPV (n0, nitems_incr_min, &n)
+         || (0 <= nitems_max && nitems_max < n)
+         || INT_MULTIPLY_WRAPV (n, item_size, &nbytes)))
     memory_full (SIZE_MAX);
-  n += incr;
-  pa = xrealloc (pa, n * item_size);
+  pa = xrealloc (pa, nbytes);
   *nitems = n;
   return pa;
 }
@@ -2102,9 +2116,8 @@ INIT must be an integer that represents a character.  */)
       EMACS_INT string_len = XINT (length);
       unsigned char *p, *beg, *end;
 
-      if (string_len > STRING_BYTES_MAX / len)
+      if (INT_MULTIPLY_WRAPV (len, string_len, &nbytes))
        string_overflow ();
-      nbytes = len * string_len;
       val = make_uninit_multibyte_string (string_len, nbytes);
       for (beg = SDATA (val), p = beg, end = beg + nbytes; p < end; p += len)
        {
@@ -5315,11 +5328,35 @@ compact_font_cache_entry (Lisp_Object entry)
             are not marked too.  But we must be sure that nothing is
             marked within OBJ before we really drop it.  */
          for (i = 0; i < size; i++)
-           if (VECTOR_MARKED_P (XFONT_ENTITY (AREF (XCDR (obj), i))))
-             break;
+            {
+              Lisp_Object objlist;
+
+              if (VECTOR_MARKED_P (XFONT_ENTITY (AREF (XCDR (obj), i))))
+                break;
+
+              objlist = AREF (AREF (XCDR (obj), i), FONT_OBJLIST_INDEX);
+              for (; CONSP (objlist); objlist = XCDR (objlist))
+                {
+                  Lisp_Object val = XCAR (objlist);
+                  struct font *font = XFONT_OBJECT (val);
+
+                  if (!NILP (AREF (val, FONT_TYPE_INDEX))
+                      && VECTOR_MARKED_P(font))
+                    break;
+                }
+              if (CONSP (objlist))
+               {
+                 /* Found a marked font, bail out.  */
+                 break;
+               }
+            }
 
          if (i == size)
-           drop = 1;
+           {
+             /* No marked fonts were found, so this entire font
+                entity can be dropped.  */
+             drop = 1;
+           }
        }
       if (drop)
        *prev = XCDR (tail);
diff --git a/src/buffer.c b/src/buffer.c
index f4c7e81..9f18bd6 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -3251,9 +3251,9 @@ record_overlay_string (struct sortstrlist *ssl, 
Lisp_Object str,
   else
     nbytes = SBYTES (str);
 
-  if (INT_ADD_OVERFLOW (ssl->bytes, nbytes))
+  if (INT_ADD_WRAPV (ssl->bytes, nbytes, &nbytes))
     memory_full (SIZE_MAX);
-  ssl->bytes += nbytes;
+  ssl->bytes = nbytes;
 
   if (STRINGP (str2))
     {
@@ -3265,9 +3265,9 @@ record_overlay_string (struct sortstrlist *ssl, 
Lisp_Object str,
       else
        nbytes = SBYTES (str2);
 
-      if (INT_ADD_OVERFLOW (ssl->bytes, nbytes))
+      if (INT_ADD_WRAPV (ssl->bytes, nbytes, &nbytes))
        memory_full (SIZE_MAX);
-      ssl->bytes += nbytes;
+      ssl->bytes = nbytes;
     }
 }
 
@@ -3363,9 +3363,8 @@ overlay_strings (ptrdiff_t pos, struct window *w, 
unsigned char **pstr)
       unsigned char *p;
       ptrdiff_t total;
 
-      if (INT_ADD_OVERFLOW (overlay_heads.bytes, overlay_tails.bytes))
+      if (INT_ADD_WRAPV (overlay_heads.bytes, overlay_tails.bytes, &total))
        memory_full (SIZE_MAX);
-      total = overlay_heads.bytes + overlay_tails.bytes;
       if (total > overlay_str_len)
        overlay_str_buf = xpalloc (overlay_str_buf, &overlay_str_len,
                                   total - overlay_str_len, -1, 1);
@@ -4487,6 +4486,23 @@ report_overlay_modification (Lisp_Object start, 
Lisp_Object end, bool after,
     Lisp_Object *copy;
     ptrdiff_t i;
 
+    if (size)
+      {
+       Lisp_Object ovl
+         = XVECTOR (last_overlay_modification_hooks)->contents[1];
+
+       /* If the buffer of the first overlay in the array doesn't
+          match the current buffer, then these modification hooks
+          should not be run in this buffer.  This could happen when
+          some code calls some insdel functions, such as del_range_1,
+          with the PREPARE argument false -- in that case this
+          function is never called to record the overlay modification
+          hook functions in the last_overlay_modification_hooks
+          array, so anything we find there is not ours.  */
+       if (XMARKER (OVERLAY_START (ovl))->buffer != current_buffer)
+         return;
+      }
+
     USE_SAFE_ALLOCA;
     SAFE_ALLOCA_LISP (copy, size);
     memcpy (copy, XVECTOR (last_overlay_modification_hooks)->contents,
@@ -5745,7 +5761,7 @@ visual lines rather than logical lines.  See the 
documentation of
 
   DEFVAR_PER_BUFFER ("default-directory", &BVAR (current_buffer, directory),
                     Qstringp,
-                    doc: /* Name of default directory of current buffer.  
Should end with slash.
+                    doc: /* Name of default directory of current buffer.
 To interactively change the default directory, use command `cd'.  */);
 
   DEFVAR_PER_BUFFER ("auto-fill-function", &BVAR (current_buffer, 
auto_fill_function),
diff --git a/src/casefiddle.c b/src/casefiddle.c
index 8755353..b94ea8e 100644
--- a/src/casefiddle.c
+++ b/src/casefiddle.c
@@ -114,15 +114,15 @@ casify_object (enum case_action flag, Lisp_Object obj)
       ptrdiff_t i, i_byte, size = SCHARS (obj);
       int len;
       USE_SAFE_ALLOCA;
-      ptrdiff_t o_size = (size < STRING_BYTES_BOUND / MAX_MULTIBYTE_LENGTH
-                         ? size * MAX_MULTIBYTE_LENGTH
-                         : STRING_BYTES_BOUND);
+      ptrdiff_t o_size;
+      if (INT_MULTIPLY_WRAPV (size, MAX_MULTIBYTE_LENGTH, &o_size))
+       o_size = PTRDIFF_MAX;
       unsigned char *dst = SAFE_ALLOCA (o_size);
       unsigned char *o = dst;
 
       for (i = i_byte = 0; i < size; i++, i_byte += len)
        {
-         if (o_size - (o - dst) < MAX_MULTIBYTE_LENGTH)
+         if (o_size - MAX_MULTIBYTE_LENGTH < o - dst)
            string_overflow ();
          c = STRING_CHAR_AND_LENGTH (SDATA (obj) + i_byte, len);
          if (inword && flag != CASE_CAPITALIZE_UP)
diff --git a/src/ccl.c b/src/ccl.c
index bf2aa12..9792717 100644
--- a/src/ccl.c
+++ b/src/ccl.c
@@ -2071,12 +2071,10 @@ usage: (ccl-execute-on-string CCL-PROGRAM STATUS STRING 
&optional CONTINUE UNIBY
     }
 
   buf_magnification = ccl.buf_magnification ? ccl.buf_magnification : 1;
-
-  if ((min (PTRDIFF_MAX, SIZE_MAX) - 256) / buf_magnification < str_bytes)
+  outbufsize = str_bytes;
+  if (INT_MULTIPLY_WRAPV (buf_magnification, outbufsize, &outbufsize)
+      || INT_ADD_WRAPV (256, outbufsize, &outbufsize))
     memory_full (SIZE_MAX);
-  outbufsize = (ccl.buf_magnification
-               ? str_bytes * ccl.buf_magnification + 256
-               : str_bytes + 256);
   outp = outbuf = xmalloc (outbufsize);
 
   consumed_chars = consumed_bytes = 0;
diff --git a/src/character.c b/src/character.c
index 3e2bf1e..bc2fa4a 100644
--- a/src/character.c
+++ b/src/character.c
@@ -25,14 +25,10 @@ along with GNU Emacs.  If not, see 
<http://www.gnu.org/licenses/>.  */
 /* At first, see the document in `character.h' to understand the code
    in this file.  */
 
-#ifdef emacs
 #include <config.h>
-#endif
 
 #include <stdio.h>
 
-#ifdef emacs
-
 #include <sys/types.h>
 #include <intprops.h>
 #include "lisp.h"
@@ -41,12 +37,6 @@ along with GNU Emacs.  If not, see 
<http://www.gnu.org/licenses/>.  */
 #include "composite.h"
 #include "disptab.h"
 
-#else  /* not emacs */
-
-#include "mulelib.h"
-
-#endif /* emacs */
-
 /* Char-table of information about which character to unify to which
    Unicode character.  Mainly used by the macro MAYBE_UNIFY_CHAR.  */
 Lisp_Object Vchar_unify_table;
@@ -302,9 +292,8 @@ char_width (int c, struct Lisp_Char_Table *dp)
            if (CHARACTERP (ch))
              {
                int w = CHAR_WIDTH (XFASTINT (ch));
-               if (INT_ADD_OVERFLOW (width, w))
+               if (INT_ADD_WRAPV (width, w, &width))
                  string_overflow ();
-               width += w;
              }
          }
     }
@@ -349,20 +338,16 @@ c_string_width (const unsigned char *str, ptrdiff_t len, 
int precision,
       int c = STRING_CHAR_AND_LENGTH (str + i_byte, bytes);
       ptrdiff_t thiswidth = char_width (c, dp);
 
-      if (precision <= 0)
-       {
-         if (INT_ADD_OVERFLOW (width, thiswidth))
-           string_overflow ();
-       }
-      else if (precision - width < thiswidth)
+      if (0 < precision && precision - width < thiswidth)
        {
          *nchars = i;
          *nbytes = i_byte;
          return width;
        }
+      if (INT_ADD_WRAPV (thiswidth, width, &width))
+       string_overflow ();
       i++;
       i_byte += bytes;
-      width += thiswidth;
   }
 
   if (precision > 0)
@@ -436,22 +421,16 @@ lisp_string_width (Lisp_Object string, ptrdiff_t 
precision,
          thiswidth = char_width (c, dp);
        }
 
-      if (precision <= 0)
-       {
-#ifdef emacs
-         if (INT_ADD_OVERFLOW (width, thiswidth))
-           string_overflow ();
-#endif
-       }
-      else if (precision - width < thiswidth)
+      if (0 < precision && precision - width < thiswidth)
        {
          *nchars = i;
          *nbytes = i_byte;
          return width;
        }
+      if (INT_ADD_WRAPV (thiswidth, width, &width))
+       string_overflow ();
       i += chars;
       i_byte += bytes;
-      width += thiswidth;
     }
 
   if (precision > 0)
@@ -657,9 +636,8 @@ count_size_as_multibyte (const unsigned char *str, 
ptrdiff_t len)
   for (bytes = 0; str < endp; str++)
     {
       int n = *str < 0x80 ? 1 : 2;
-      if (INT_ADD_OVERFLOW (bytes, n))
+      if (INT_ADD_WRAPV (bytes, n, &bytes))
         string_overflow ();
-      bytes += n;
     }
   return bytes;
 }
@@ -795,6 +773,7 @@ string_escape_byte8 (Lisp_Object string)
   ptrdiff_t nbytes = SBYTES (string);
   bool multibyte = STRING_MULTIBYTE (string);
   ptrdiff_t byte8_count;
+  ptrdiff_t thrice_byte8_count, uninit_nchars, uninit_nbytes;
   const unsigned char *src, *src_end;
   unsigned char *dst;
   Lisp_Object val;
@@ -808,23 +787,23 @@ string_escape_byte8 (Lisp_Object string)
   if (byte8_count == 0)
     return string;
 
+  if (INT_MULTIPLY_WRAPV (byte8_count, 3, &thrice_byte8_count))
+    string_overflow ();
+
   if (multibyte)
     {
-      if ((MOST_POSITIVE_FIXNUM - nchars) / 3 < byte8_count
-         || (STRING_BYTES_BOUND - nbytes) / 2 < byte8_count)
-       string_overflow ();
-
       /* Convert 2-byte sequence of byte8 chars to 4-byte octal.  */
-      val = make_uninit_multibyte_string (nchars + byte8_count * 3,
-                                         nbytes + byte8_count * 2);
+      if (INT_ADD_WRAPV (nchars, thrice_byte8_count, &uninit_nchars)
+         || INT_ADD_WRAPV (nbytes, 2 * byte8_count, &uninit_nbytes))
+       string_overflow ();
+      val = make_uninit_multibyte_string (uninit_nchars, uninit_nbytes);
     }
   else
     {
-      if ((STRING_BYTES_BOUND - nbytes) / 3 < byte8_count)
-       string_overflow ();
-
       /* Convert 1-byte sequence of byte8 chars to 4-byte octal.  */
-      val = make_uninit_string (nbytes + byte8_count * 3);
+      if (INT_ADD_WRAPV (thrice_byte8_count, nbytes, &uninit_nbytes))
+       string_overflow ();
+      val = make_uninit_string (uninit_nbytes);
     }
 
   src = SDATA (string);
@@ -981,8 +960,6 @@ character is not ASCII nor 8-bit character, an error is 
signaled.  */)
   return make_number (c);
 }
 
-#ifdef emacs
-
 /* Return true if C is an alphabetic character.  */
 bool
 alphabeticp (int c)
@@ -1131,5 +1108,3 @@ See The Unicode Standard for the meaning of those values. 
 */);
   /* The correct char-table is setup in characters.el.  */
   Vunicode_category_table = Qnil;
 }
-
-#endif /* emacs */
diff --git a/src/cmds.c b/src/cmds.c
index 0afc023..167ebb7 100644
--- a/src/cmds.c
+++ b/src/cmds.c
@@ -218,36 +218,6 @@ to t.  */)
   return Qnil;
 }
 
-static int nonundocount;
-
-static void
-remove_excessive_undo_boundaries (void)
-{
-  bool remove_boundary = true;
-
-  if (!EQ (Vthis_command, KVAR (current_kboard, Vlast_command)))
-    nonundocount = 0;
-
-  if (NILP (Vexecuting_kbd_macro))
-    {
-      if (nonundocount <= 0 || nonundocount >= 20)
-       {
-         remove_boundary = false;
-         nonundocount = 0;
-       }
-      nonundocount++;
-    }
-
-  if (remove_boundary
-      && CONSP (BVAR (current_buffer, undo_list))
-      && NILP (XCAR (BVAR (current_buffer, undo_list)))
-      /* Only remove auto-added boundaries, not boundaries
-        added by explicit calls to undo-boundary.  */
-      && EQ (BVAR (current_buffer, undo_list), last_undo_boundary))
-    /* Remove the undo_boundary that was just pushed.  */
-    bset_undo_list (current_buffer, XCDR (BVAR (current_buffer, undo_list)));
-}
-
 DEFUN ("delete-char", Fdelete_char, Sdelete_char, 1, 2, "p\nP",
        doc: /* Delete the following N characters (previous if N is negative).
 Optional second arg KILLFLAG non-nil means kill instead (save in kill ring).
@@ -263,7 +233,7 @@ because it respects values of `delete-active-region' and 
`overwrite-mode'.  */)
   CHECK_NUMBER (n);
 
   if (eabs (XINT (n)) < 2)
-    remove_excessive_undo_boundaries ();
+    call0 (Qundo_auto__amalgamate);
 
   pos = PT + XINT (n);
   if (NILP (killflag))
@@ -309,20 +279,19 @@ At the end, it runs `post-self-insert-hook'.  */)
     error ("Negative repetition argument %"pI"d", XINT (n));
 
   if (XFASTINT (n) < 2)
-    remove_excessive_undo_boundaries ();
+    call0 (Qundo_auto__amalgamate);
 
   /* Barf if the key that invoked this was not a character.  */
   if (!CHARACTERP (last_command_event))
     bitch_at_user ();
-  else
-    {
-      int character = translate_char (Vtranslation_table_for_input,
-                                     XINT (last_command_event));
-      int val = internal_self_insert (character, XFASTINT (n));
-      if (val == 2)
-       nonundocount = 0;
-      frame_make_pointer_invisible (SELECTED_FRAME ());
-    }
+  else {
+    int character = translate_char (Vtranslation_table_for_input,
+                                   XINT (last_command_event));
+    int val = internal_self_insert (character, XFASTINT (n));
+    if (val == 2)
+      Fset (Qundo_auto__this_command_amalgamating, Qnil);
+    frame_make_pointer_invisible (SELECTED_FRAME ());
+  }
 
   return Qnil;
 }
@@ -525,6 +494,10 @@ internal_self_insert (int c, EMACS_INT n)
 void
 syms_of_cmds (void)
 {
+  DEFSYM (Qundo_auto__amalgamate, "undo-auto--amalgamate");
+  DEFSYM (Qundo_auto__this_command_amalgamating,
+          "undo-auto--this-command-amalgamating");
+
   DEFSYM (Qkill_forward_chars, "kill-forward-chars");
 
   /* A possible value for a buffer's overwrite-mode variable.  */
@@ -554,7 +527,6 @@ keys_of_cmds (void)
 {
   int n;
 
-  nonundocount = 0;
   initial_define_key (global_map, Ctl ('I'), "self-insert-command");
   for (n = 040; n < 0177; n++)
     initial_define_key (global_map, n, "self-insert-command");
diff --git a/src/coding.c b/src/coding.c
index 0b42a36..85b97ce 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -1008,11 +1008,12 @@ coding_change_destination (struct coding_system *coding)
 static void
 coding_alloc_by_realloc (struct coding_system *coding, ptrdiff_t bytes)
 {
-  if (STRING_BYTES_BOUND - coding->dst_bytes < bytes)
+  ptrdiff_t newbytes;
+  if (INT_ADD_WRAPV (coding->dst_bytes, bytes, &newbytes)
+      || SIZE_MAX < newbytes)
     string_overflow ();
-  coding->destination = xrealloc (coding->destination,
-                                 coding->dst_bytes + bytes);
-  coding->dst_bytes += bytes;
+  coding->destination = xrealloc (coding->destination, newbytes);
+  coding->dst_bytes = newbytes;
 }
 
 static void
@@ -7048,14 +7049,12 @@ produce_chars (struct coding_system *coding, 
Lisp_Object translation_table,
              if ((dst_end - dst) / MAX_MULTIBYTE_LENGTH < to_nchars)
                {
                  eassert (growable_destination (coding));
-                 if (((min (PTRDIFF_MAX, SIZE_MAX) - (buf_end - buf))
-                      / MAX_MULTIBYTE_LENGTH)
-                     < to_nchars)
+                 ptrdiff_t dst_size;
+                 if (INT_MULTIPLY_WRAPV (to_nchars, MAX_MULTIBYTE_LENGTH,
+                                         &dst_size)
+                     || INT_ADD_WRAPV (buf_end - buf, dst_size, &dst_size))
                    memory_full (SIZE_MAX);
-                 dst = alloc_destination (coding,
-                                          buf_end - buf
-                                          + MAX_MULTIBYTE_LENGTH * to_nchars,
-                                          dst);
+                 dst = alloc_destination (coding, dst_size, dst);
                  if (EQ (coding->src_object, coding->dst_object))
                    {
                      coding_set_source (coding);
diff --git a/src/data.c b/src/data.c
index 5382b01..5154604 100644
--- a/src/data.c
+++ b/src/data.c
@@ -1240,6 +1240,7 @@ set_internal (Lisp_Object symbol, Lisp_Object newval, 
Lisp_Object where,
        return;
     }
 
+  maybe_set_redisplay (symbol);
   sym = XSYMBOL (symbol);
 
  start:
@@ -2408,6 +2409,33 @@ DEFUN ("/=", Fneq, Sneq, 2, 2, 0,
   return arithcompare (num1, num2, ARITH_NOTEQUAL);
 }
 
+/* Convert the integer I to a cons-of-integers, where I is not in
+   fixnum range.  */
+
+#define INTBIG_TO_LISP(i, extremum)                                \
+  (eassert (FIXNUM_OVERFLOW_P (i)),                                \
+   (! (FIXNUM_OVERFLOW_P ((extremum) >> 16)                        \
+       && FIXNUM_OVERFLOW_P ((i) >> 16))                           \
+    ? Fcons (make_number ((i) >> 16), make_number ((i) & 0xffff))   \
+    : ! (FIXNUM_OVERFLOW_P ((extremum) >> 16 >> 24)                \
+        && FIXNUM_OVERFLOW_P ((i) >> 16 >> 24))                    \
+    ? Fcons (make_number ((i) >> 16 >> 24),                        \
+            Fcons (make_number ((i) >> 16 & 0xffffff),             \
+                   make_number ((i) & 0xffff)))                    \
+    : make_float (i)))
+
+Lisp_Object
+intbig_to_lisp (intmax_t i)
+{
+  return INTBIG_TO_LISP (i, INTMAX_MIN);
+}
+
+Lisp_Object
+uintbig_to_lisp (uintmax_t i)
+{
+  return INTBIG_TO_LISP (i, UINTMAX_MAX);
+}
+
 /* Convert the cons-of-integers, integer, or float value C to an
    unsigned value with maximum value MAX.  Signal an error if C does not
    have a valid format or is out of range.  */
@@ -2630,30 +2658,16 @@ arith_driver (enum arithop code, ptrdiff_t nargs, 
Lisp_Object *args)
       switch (code)
        {
        case Aadd:
-         if (INT_ADD_OVERFLOW (accum, next))
-           {
-             overflow = 1;
-             accum &= INTMASK;
-           }
-         accum += next;
+         overflow |= INT_ADD_WRAPV (accum, next, &accum);
          break;
        case Asub:
-         if (INT_SUBTRACT_OVERFLOW (accum, next))
-           {
-             overflow = 1;
-             accum &= INTMASK;
-           }
-         accum = argnum ? accum - next : nargs == 1 ? - next : next;
+         if (! argnum)
+           accum = nargs == 1 ? - next : next;
+         else
+           overflow |= INT_SUBTRACT_WRAPV (accum, next, &accum);
          break;
        case Amult:
-         if (INT_MULTIPLY_OVERFLOW (accum, next))
-           {
-             EMACS_UINT a = accum, b = next, ab = a * b;
-             overflow = 1;
-             accum = ab & INTMASK;
-           }
-         else
-           accum *= next;
+         overflow |= INT_MULTIPLY_WRAPV (accum, next, &accum);
          break;
        case Adiv:
          if (! (argnum || nargs == 1))
@@ -2662,7 +2676,10 @@ arith_driver (enum arithop code, ptrdiff_t nargs, 
Lisp_Object *args)
            {
              if (next == 0)
                xsignal0 (Qarith_error);
-             accum /= next;
+             if (INT_DIVIDE_OVERFLOW (accum, next))
+               overflow = true;
+             else
+               accum /= next;
            }
          break;
        case Alogand:
diff --git a/src/dispnew.c b/src/dispnew.c
index d965a51..6fcc9c7 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -1335,10 +1335,8 @@ realloc_glyph_pool (struct glyph_pool *pool, struct dim 
matrix_dim)
               || matrix_dim.width != pool->ncolumns);
 
   /* Enlarge the glyph pool.  */
-  needed = matrix_dim.width;
-  if (INT_MULTIPLY_OVERFLOW (needed, matrix_dim.height))
+  if (INT_MULTIPLY_WRAPV (matrix_dim.height, matrix_dim.width, &needed))
     memory_full (SIZE_MAX);
-  needed *= matrix_dim.height;
   if (needed > pool->nglyphs)
     {
       ptrdiff_t old_nglyphs = pool->nglyphs;
@@ -1698,7 +1696,8 @@ required_matrix_height (struct window *w)
 
   if (FRAME_WINDOW_P (f))
     {
-      int ch_height = FRAME_SMALLEST_FONT_HEIGHT (f);
+      /* http://lists.gnu.org/archive/html/emacs-devel/2015-11/msg00194.html  
*/
+      int ch_height = max (FRAME_SMALLEST_FONT_HEIGHT (f), 1);
       int window_pixel_height = window_box_height (w) + eabs (w->vscroll);
 
       return (((window_pixel_height + ch_height - 1)
@@ -1724,7 +1723,8 @@ required_matrix_width (struct window *w)
   struct frame *f = XFRAME (w->frame);
   if (FRAME_WINDOW_P (f))
     {
-      int ch_width = FRAME_SMALLEST_CHAR_WIDTH (f);
+      /* http://lists.gnu.org/archive/html/emacs-devel/2015-11/msg00194.html  
*/
+      int ch_width = max (FRAME_SMALLEST_CHAR_WIDTH (f), 1);
 
       /* Compute number of glyphs needed in a glyph row.  */
       return (((WINDOW_PIXEL_WIDTH (w) + ch_width - 1)
@@ -6104,15 +6104,15 @@ init_display (void)
     struct frame *sf = SELECTED_FRAME ();
     int width = FRAME_TOTAL_COLS (sf);
     int height = FRAME_TOTAL_LINES (sf);
+    int area;
 
     /* If these sizes are so big they cause overflow, just ignore the
        change.  It's not clear what better we could do.  The rest of
        the code assumes that (width + 2) * height * sizeof (struct glyph)
        does not overflow and does not exceed PTRDIFF_MAX or SIZE_MAX.  */
-    if (INT_ADD_OVERFLOW (width, 2)
-       || INT_MULTIPLY_OVERFLOW (width + 2, height)
-       || (min (PTRDIFF_MAX, SIZE_MAX) / sizeof (struct glyph)
-           < (width + 2) * height))
+    if (INT_ADD_WRAPV (width, 2, &area)
+       || INT_MULTIPLY_WRAPV (height, area, &area)
+       || min (PTRDIFF_MAX, SIZE_MAX) / sizeof (struct glyph) < area)
       fatal ("screen size %dx%d too big", width, height);
   }
 
diff --git a/src/editfns.c b/src/editfns.c
index 050eb2a..316d940 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -3887,9 +3887,12 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool 
message)
   ptrdiff_t formatlen = SBYTES (args[0]);
 
   /* Allocate the info and discarded tables.  */
-  if ((SIZE_MAX - formatlen) / sizeof (struct info) <= nargs)
+  ptrdiff_t alloca_size;
+  if (INT_MULTIPLY_WRAPV (nargs, sizeof *info, &alloca_size)
+      || INT_ADD_WRAPV (sizeof *info, alloca_size, &alloca_size)
+      || INT_ADD_WRAPV (formatlen, alloca_size, &alloca_size)
+      || SIZE_MAX < alloca_size)
     memory_full (SIZE_MAX);
-  size_t alloca_size = (nargs + 1) * sizeof *info + formatlen;
   /* info[0] is unused.  Unused elements have -1 for start.  */
   info = SAFE_ALLOCA (alloca_size);
   memset (info, 0, alloca_size);
diff --git a/src/fileio.c b/src/fileio.c
index 428093b..6cda1e3 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -450,7 +450,7 @@ DEFUN ("unhandled-file-name-directory", 
Funhandled_file_name_directory,
 A `directly usable' directory name is one that may be used without the
 intervention of any file handler.
 If FILENAME is a directly usable file itself, return
-(file-name-directory FILENAME).
+(file-name-as-directory FILENAME).
 If FILENAME refers to a file which is not accessible from a local process,
 then this should return nil.
 The `call-process' and `start-process' functions use this function to
@@ -469,7 +469,7 @@ get a current directory to run processes in.  */)
       return STRINGP (handled_name) ? handled_name : Qnil;
     }
 
-  return Ffile_name_directory (filename);
+  return Ffile_name_as_directory (filename);
 }
 
 /* Maximum number of bytes that DST will be longer than SRC
diff --git a/src/fns.c b/src/fns.c
index f545066..4695666 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -2389,9 +2389,9 @@ ARRAY is a vector, string, char-table, or bool-vector.  
*/)
          unsigned char str[MAX_MULTIBYTE_LENGTH];
          int len = CHAR_STRING (charval, str);
          ptrdiff_t size_byte = SBYTES (array);
+         ptrdiff_t product;
 
-         if (INT_MULTIPLY_OVERFLOW (SCHARS (array), len)
-             || SCHARS (array) * len != size_byte)
+         if (INT_MULTIPLY_WRAPV (size, len, &product) || product != size_byte)
            error ("Attempt to change byte length of a string");
          for (idx = 0; idx < size_byte; idx++)
            *p++ = str[idx % len];
diff --git a/src/ftfont.c b/src/ftfont.c
index fb1addb..57ded17 100644
--- a/src/ftfont.c
+++ b/src/ftfont.c
@@ -2561,20 +2561,21 @@ ftfont_shape_by_flt (Lisp_Object lgstring, struct font 
*font,
        }
     }
 
-  if (INT_MAX / 2 < len)
+  int len2;
+  if (INT_MULTIPLY_WRAPV (len, 2, &len2))
     memory_full (SIZE_MAX);
 
   if (gstring.allocated == 0)
     {
       gstring.glyph_size = sizeof (MFLTGlyphFT);
-      gstring.glyphs = xnmalloc (len * 2, sizeof (MFLTGlyphFT));
-      gstring.allocated = len * 2;
+      gstring.glyphs = xnmalloc (len2, sizeof (MFLTGlyphFT));
+      gstring.allocated = len2;
     }
-  else if (gstring.allocated < len * 2)
+  else if (gstring.allocated < len2)
     {
-      gstring.glyphs = xnrealloc (gstring.glyphs, len * 2,
+      gstring.glyphs = xnrealloc (gstring.glyphs, len2,
                                  sizeof (MFLTGlyphFT));
-      gstring.allocated = len * 2;
+      gstring.allocated = len2;
     }
   glyphs = (MFLTGlyphFT *) (gstring.glyphs);
   memset (glyphs, 0, len * sizeof (MFLTGlyphFT));
@@ -2624,11 +2625,12 @@ ftfont_shape_by_flt (Lisp_Object lgstring, struct font 
*font,
       int result = mflt_run (&gstring, 0, len, &flt_font_ft.flt_font, flt);
       if (result != -2)
        break;
-      if (INT_MAX / 2 < gstring.allocated)
+      int len2;
+      if (INT_MULTIPLY_WRAPV (gstring.allocated, 2, &len2))
        memory_full (SIZE_MAX);
       gstring.glyphs = xnrealloc (gstring.glyphs,
                                  gstring.allocated, 2 * sizeof (MFLTGlyphFT));
-      gstring.allocated *= 2;
+      gstring.allocated = len2;
     }
   if (gstring.used > LGSTRING_GLYPH_LEN (lgstring))
     return Qnil;
diff --git a/src/gfilenotify.c b/src/gfilenotify.c
index 2057f88..8660f41 100644
--- a/src/gfilenotify.c
+++ b/src/gfilenotify.c
@@ -110,6 +110,7 @@ dir_monitor_callback (GFileMonitor *monitor,
 
       /* Cancel monitor if file or directory is deleted.  */
       if (!NILP (Fmember (symbol, list2 (Qdeleted, Qmoved))) &&
+         (strcmp (name, SSDATA (XCAR (XCDR (watch_object)))) == 0) &&
          !g_file_monitor_is_cancelled (monitor))
        g_file_monitor_cancel (monitor);
     }
diff --git a/src/gnutls.c b/src/gnutls.c
index 864cac5..0c69b00 100644
--- a/src/gnutls.c
+++ b/src/gnutls.c
@@ -781,10 +781,11 @@ static Lisp_Object
 gnutls_hex_string (unsigned char *buf, ptrdiff_t buf_size, const char *prefix)
 {
   ptrdiff_t prefix_length = strlen (prefix);
-  if ((STRING_BYTES_BOUND - prefix_length) / 3 < buf_size)
+  ptrdiff_t retlen;
+  if (INT_MULTIPLY_WRAPV (buf_size, 3, &retlen)
+      || INT_ADD_WRAPV (prefix_length - (buf_size != 0), retlen, &retlen))
     string_overflow ();
-  Lisp_Object ret = make_uninit_string (prefix_length + 3 * buf_size
-                                       - (buf_size != 0));
+  Lisp_Object ret = make_uninit_string (retlen);
   char *string = SSDATA (ret);
   strcpy (string, prefix);
 
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 701bcab..90683eb 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -517,9 +517,12 @@ get_utf8_string (const char *str)
       if (cp) g_free (cp);
 
       len = strlen (str);
-      if ((min (PTRDIFF_MAX, SIZE_MAX) - len - 1) / 4 < nr_bad)
+      ptrdiff_t alloc;
+      if (INT_MULTIPLY_WRAPV (nr_bad, 4, &alloc)
+         || INT_ADD_WRAPV (len + 1, alloc, &alloc)
+         || SIZE_MAX < alloc)
        memory_full (SIZE_MAX);
-      up = utf8_str = xmalloc (len + nr_bad * 4 + 1);
+      up = utf8_str = xmalloc (alloc);
       p = (unsigned char *)str;
 
       while (! (cp = g_locale_to_utf8 ((char *)p, -1, &bytes_read,
diff --git a/src/image.c b/src/image.c
index 928eb5c..544435e 100644
--- a/src/image.c
+++ b/src/image.c
@@ -3508,6 +3508,14 @@ x_create_bitmap_from_xpm_data (struct frame *f, const 
char **bits)
   attrs.valuemask |= XpmVisual;
   attrs.valuemask |= XpmColormap;
 
+#ifdef ALLOC_XPM_COLORS
+  attrs.color_closure = f;
+  attrs.alloc_color = xpm_alloc_color;
+  attrs.free_colors = xpm_free_colors;
+  attrs.valuemask |= XpmAllocColor | XpmFreeColors | XpmColorClosure;
+  xpm_init_color_cache (f, &attrs);
+#endif
+
   rc = XpmCreatePixmapFromData (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
                                (char **) bits, &bitmap, &mask, &attrs);
   if (rc != XpmSuccess)
@@ -3526,6 +3534,9 @@ x_create_bitmap_from_xpm_data (struct frame *f, const 
char **bits)
   dpyinfo->bitmaps[id - 1].depth = attrs.depth;
   dpyinfo->bitmaps[id - 1].refcount = 1;
 
+#ifdef ALLOC_XPM_COLORS
+  xpm_free_color_cache ();
+#endif
   XpmFreeAttributes (&attrs);
   return id;
 }
@@ -4662,13 +4673,16 @@ x_to_xcolors (struct frame *f, struct image *img, bool 
rgb_p)
   int x, y;
   XColor *colors, *p;
   XImagePtr_or_DC ximg;
+  ptrdiff_t nbytes;
 #ifdef HAVE_NTGUI
   HGDIOBJ prev;
 #endif /* HAVE_NTGUI */
 
-  if (img->height > min (PTRDIFF_MAX, SIZE_MAX) / sizeof *colors / img->width)
+  if (INT_MULTIPLY_WRAPV (sizeof *colors, img->width, &nbytes)
+      || INT_MULTIPLY_WRAPV (img->height, nbytes, &nbytes)
+      || SIZE_MAX < nbytes)
     memory_full (SIZE_MAX);
-  colors = xmalloc (sizeof *colors * img->width * img->height);
+  colors = xmalloc (nbytes);
 
   /* Get the X image or create a memory device context for IMG. */
   ximg = image_get_x_image_or_dc (f, img, 0, &prev);
@@ -4801,15 +4815,17 @@ x_detect_edges (struct frame *f, struct image *img, int 
*matrix, int color_adjus
   XColor *colors = x_to_xcolors (f, img, 1);
   XColor *new, *p;
   int x, y, i, sum;
+  ptrdiff_t nbytes;
 
   for (i = sum = 0; i < 9; ++i)
     sum += eabs (matrix[i]);
 
 #define COLOR(A, X, Y) ((A) + (Y) * img->width + (X))
 
-  if (img->height > min (PTRDIFF_MAX, SIZE_MAX) / sizeof *new / img->width)
+  if (INT_MULTIPLY_WRAPV (sizeof *new, img->width, &nbytes)
+      || INT_MULTIPLY_WRAPV (img->height, nbytes, &nbytes))
     memory_full (SIZE_MAX);
-  new = xmalloc (sizeof *new * img->width * img->height);
+  new = xmalloc (nbytes);
 
   for (y = 0; y < img->height; ++y)
     {
@@ -5898,6 +5914,7 @@ png_load_body (struct frame *f, struct image *img, struct 
png_load_context *c)
   png_uint_32 row_bytes;
   bool transparent_p;
   struct png_memory_storage tbr;  /* Data to be read */
+  ptrdiff_t nbytes;
 
 #ifdef USE_CAIRO
   unsigned char *data = 0;
@@ -6102,10 +6119,10 @@ png_load_body (struct frame *f, struct image *img, 
struct png_load_context *c)
   row_bytes = png_get_rowbytes (png_ptr, info_ptr);
 
   /* Allocate memory for the image.  */
-  if (height > min (PTRDIFF_MAX, SIZE_MAX) / sizeof *rows
-      || row_bytes > min (PTRDIFF_MAX, SIZE_MAX) / sizeof *pixels / height)
+  if (INT_MULTIPLY_WRAPV (row_bytes, sizeof *pixels, &nbytes)
+      || INT_MULTIPLY_WRAPV (nbytes, height, &nbytes))
     memory_full (SIZE_MAX);
-  c->pixels = pixels = xmalloc (sizeof *pixels * row_bytes * height);
+  c->pixels = pixels = xmalloc (nbytes);
   c->rows = rows = xmalloc (height * sizeof *rows);
   for (i = 0; i < height; ++i)
     rows[i] = pixels + i * row_bytes;
diff --git a/src/keyboard.c b/src/keyboard.c
index 235f4c3..92ef21a 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -1230,9 +1230,6 @@ static int read_key_sequence (Lisp_Object *, int, 
Lisp_Object,
                               bool, bool, bool, bool);
 static void adjust_point_for_property (ptrdiff_t, bool);
 
-/* The last boundary auto-added to buffer-undo-list.  */
-Lisp_Object last_undo_boundary;
-
 Lisp_Object
 command_loop_1 (void)
 {
@@ -1448,13 +1445,10 @@ command_loop_1 (void)
               }
 #endif
 
-           {
-             Lisp_Object undo = BVAR (current_buffer, undo_list);
-             Fundo_boundary ();
-             last_undo_boundary
-               = (EQ (undo, BVAR (current_buffer, undo_list))
-                  ? Qnil : BVAR (current_buffer, undo_list));
-           }
+            /* Ensure that we have added appropriate undo-boundaries as a
+               result of changes from the last command. */
+            call0 (Qundo_auto__add_boundary);
+
             call1 (Qcommand_execute, Vthis_command);
 
 #ifdef HAVE_WINDOW_SYSTEM
@@ -10924,6 +10918,8 @@ syms_of_keyboard (void)
   DEFSYM (Qpre_command_hook, "pre-command-hook");
   DEFSYM (Qpost_command_hook, "post-command-hook");
 
+  DEFSYM (Qundo_auto__add_boundary, "undo-auto--add-boundary");
+
   DEFSYM (Qdeferred_action_function, "deferred-action-function");
   DEFSYM (Qdelayed_warnings_hook, "delayed-warnings-hook");
   DEFSYM (Qfunction_key, "function-key");
diff --git a/src/keymap.c b/src/keymap.c
index c988d12..67a4a10 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -853,7 +853,9 @@ store_in_keymap (Lisp_Object keymap, register Lisp_Object 
idx, Lisp_Object def)
                XSETCDR (elt, def);
                return def;
              }
-           else if (CONSP (idx) && CHARACTERP (XCAR (idx)))
+           else if (CONSP (idx)
+                    && CHARACTERP (XCAR (idx))
+                    && CHARACTERP (XCAR (elt)))
              {
                int from = XFASTINT (XCAR (idx));
                int to = XFASTINT (XCDR (idx));
@@ -1984,9 +1986,10 @@ For an approximate inverse of this, see `kbd'.  */)
     size += XINT (Flength (prefix));
 
   /* This has one extra element at the end that we don't pass to Fconcat.  */
-  if (min (PTRDIFF_MAX, SIZE_MAX) / word_size / 4 < size)
+  EMACS_INT size4;
+  if (INT_MULTIPLY_WRAPV (size, 4, &size4))
     memory_full (SIZE_MAX);
-  SAFE_ALLOCA_LISP (args, size * 4);
+  SAFE_ALLOCA_LISP (args, size4);
 
   /* In effect, this computes
      (mapconcat 'single-key-description keys " ")
diff --git a/src/lisp.h b/src/lisp.h
index ff6e7a1..63dadef 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -3351,17 +3351,9 @@ extern Lisp_Object arithcompare (Lisp_Object num1, 
Lisp_Object num2,
 #define INTEGER_TO_CONS(i)                                         \
   (! FIXNUM_OVERFLOW_P (i)                                         \
    ? make_number (i)                                               \
-   : ! ((FIXNUM_OVERFLOW_P (INTMAX_MIN >> 16)                      \
-        || FIXNUM_OVERFLOW_P (UINTMAX_MAX >> 16))                  \
-       && FIXNUM_OVERFLOW_P ((i) >> 16))                           \
-   ? Fcons (make_number ((i) >> 16), make_number ((i) & 0xffff))    \
-   : ! ((FIXNUM_OVERFLOW_P (INTMAX_MIN >> 16 >> 24)                \
-        || FIXNUM_OVERFLOW_P (UINTMAX_MAX >> 16 >> 24))            \
-       && FIXNUM_OVERFLOW_P ((i) >> 16 >> 24))                     \
-   ? Fcons (make_number ((i) >> 16 >> 24),                         \
-           Fcons (make_number ((i) >> 16 & 0xffffff),              \
-                  make_number ((i) & 0xffff)))                     \
-   : make_float (i))
+   : EXPR_SIGNED (i) ? intbig_to_lisp (i) : uintbig_to_lisp (i))
+extern Lisp_Object intbig_to_lisp (intmax_t);
+extern Lisp_Object uintbig_to_lisp (uintmax_t);
 
 /* Convert the Emacs representation CONS back to an integer of type
    TYPE, storing the result the variable VAR.  Signal an error if CONS
@@ -4022,7 +4014,6 @@ extern void syms_of_casetab (void);
 extern Lisp_Object echo_message_buffer;
 extern struct kboard *echo_kboard;
 extern void cancel_echoing (void);
-extern Lisp_Object last_undo_boundary;
 extern bool input_pending;
 #ifdef HAVE_STACK_OVERFLOW_HANDLING
 extern sigjmp_buf return_to_command_loop;
@@ -4453,40 +4444,24 @@ extern void *record_xmalloc (size_t) 
ATTRIBUTE_ALLOC_SIZE ((1));
     }                                  \
   } while (false)
 
-
-/* Return floor (NBYTES / WORD_SIZE).  */
-
-INLINE ptrdiff_t
-lisp_word_count (ptrdiff_t nbytes)
-{
-  if (-1 >> 1 == -1)
-    switch (word_size + 0)
-      {
-      case 2: return nbytes >> 1;
-      case 4: return nbytes >> 2;
-      case 8: return nbytes >> 3;
-      case 16: return nbytes >> 4;
-      default: break;
-      }
-  return nbytes / word_size - (nbytes % word_size < 0);
-}
-
 /* SAFE_ALLOCA_LISP allocates an array of Lisp_Objects.  */
 
 #define SAFE_ALLOCA_LISP(buf, nelt)                           \
   do {                                                        \
-    if ((nelt) <= lisp_word_count (sa_avail))                 \
-      (buf) = AVAIL_ALLOCA ((nelt) * word_size);              \
-    else if ((nelt) <= min (PTRDIFF_MAX, SIZE_MAX) / word_size) \
+    ptrdiff_t alloca_nbytes;                                  \
+    if (INT_MULTIPLY_WRAPV (nelt, word_size, &alloca_nbytes)   \
+       || SIZE_MAX < alloca_nbytes)                           \
+      memory_full (SIZE_MAX);                                 \
+    else if (alloca_nbytes <= sa_avail)                               \
+      (buf) = AVAIL_ALLOCA (alloca_nbytes);                   \
+    else                                                      \
       {                                                               \
        Lisp_Object arg_;                                      \
-       (buf) = xmalloc ((nelt) * word_size);                  \
+       (buf) = xmalloc (alloca_nbytes);                       \
        arg_ = make_save_memory (buf, nelt);                   \
        sa_must_free = true;                                   \
        record_unwind_protect (free_save_value, arg_);         \
       }                                                               \
-    else                                                      \
-      memory_full (SIZE_MAX);                                 \
   } while (false)
 
 
diff --git a/src/lread.c b/src/lread.c
index 1119f3f..c4456f3 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -2120,6 +2120,15 @@ read0 (Lisp_Object readcharfun)
 static ptrdiff_t read_buffer_size;
 static char *read_buffer;
 
+/* Grow the read buffer by at least MAX_MULTIBYTE_LENGTH bytes.  */
+
+static void
+grow_read_buffer (void)
+{
+  read_buffer = xpalloc (read_buffer, &read_buffer_size,
+                        MAX_MULTIBYTE_LENGTH, -1, 1);
+}
+
 /* Read a \-escape sequence, assuming we already read the `\'.
    If the escape sequence forces unibyte, return eight-bit char.  */
 
@@ -2985,10 +2994,7 @@ read1 (Lisp_Object readcharfun, int *pch, bool 
first_in_list)
            if (end - p < MAX_MULTIBYTE_LENGTH)
              {
                ptrdiff_t offset = p - read_buffer;
-               if (min (PTRDIFF_MAX, SIZE_MAX) / 2 < read_buffer_size)
-                 memory_full (SIZE_MAX);
-               read_buffer = xrealloc (read_buffer, read_buffer_size * 2);
-               read_buffer_size *= 2;
+               grow_read_buffer ();
                p = read_buffer + offset;
                end = read_buffer + read_buffer_size;
              }
@@ -3119,10 +3125,7 @@ read1 (Lisp_Object readcharfun, int *pch, bool 
first_in_list)
              if (end - p < MAX_MULTIBYTE_LENGTH)
                {
                  ptrdiff_t offset = p - read_buffer;
-                 if (min (PTRDIFF_MAX, SIZE_MAX) / 2 < read_buffer_size)
-                   memory_full (SIZE_MAX);
-                 read_buffer = xrealloc (read_buffer, read_buffer_size * 2);
-                 read_buffer_size *= 2;
+                 grow_read_buffer ();
                  p = read_buffer + offset;
                  end = read_buffer + read_buffer_size;
                }
@@ -3149,10 +3152,7 @@ read1 (Lisp_Object readcharfun, int *pch, bool 
first_in_list)
          if (p == end)
            {
              ptrdiff_t offset = p - read_buffer;
-             if (min (PTRDIFF_MAX, SIZE_MAX) / 2 < read_buffer_size)
-               memory_full (SIZE_MAX);
-             read_buffer = xrealloc (read_buffer, read_buffer_size * 2);
-             read_buffer_size *= 2;
+             grow_read_buffer ();
              p = read_buffer + offset;
              end = read_buffer + read_buffer_size;
            }
@@ -4480,9 +4480,11 @@ were read in.  */);
   DEFVAR_LISP ("load-path", Vload_path,
               doc: /* List of directories to search for files to load.
 Each element is a string (directory file name) or nil (meaning
-`default-directory').  Initialized during startup as described in Info
-node `(elisp)Library Search'.  Use `directory-file-name' when adding items
-to this path.  */);
+`default-directory').
+Initialized during startup as described in Info node `(elisp)Library Search'.
+Use `directory-file-name' when adding items to this path.  However, Lisp
+programs that process this list should tolerate directories both with
+and without trailing slashes.  */);
 
   DEFVAR_LISP ("load-suffixes", Vload_suffixes,
               doc: /* List of suffixes for (compiled or source) Emacs Lisp 
files.
diff --git a/src/macros.c b/src/macros.c
index d963838..7c6ab2e 100644
--- a/src/macros.c
+++ b/src/macros.c
@@ -184,16 +184,11 @@ store_kbd_macro_char (Lisp_Object c)
     {
       if (kb->kbd_macro_ptr - kb->kbd_macro_buffer == kb->kbd_macro_bufsize)
        {
-         ptrdiff_t ptr_offset, end_offset, nbytes;
-
-         ptr_offset = kb->kbd_macro_ptr - kb->kbd_macro_buffer;
-         end_offset = kb->kbd_macro_end - kb->kbd_macro_buffer;
-         if (min (PTRDIFF_MAX, SIZE_MAX) / sizeof *kb->kbd_macro_buffer / 2
-             < kb->kbd_macro_bufsize)
-           memory_full (SIZE_MAX);
-         nbytes = kb->kbd_macro_bufsize * (2 * sizeof *kb->kbd_macro_buffer);
-         kb->kbd_macro_buffer = xrealloc (kb->kbd_macro_buffer, nbytes);
-         kb->kbd_macro_bufsize *= 2;
+         ptrdiff_t ptr_offset = kb->kbd_macro_ptr - kb->kbd_macro_buffer;
+         ptrdiff_t end_offset = kb->kbd_macro_end - kb->kbd_macro_buffer;
+         kb->kbd_macro_buffer = xpalloc (kb->kbd_macro_buffer,
+                                         &kb->kbd_macro_bufsize,
+                                         1, -1, sizeof *kb->kbd_macro_buffer);
          kb->kbd_macro_ptr = kb->kbd_macro_buffer + ptr_offset;
          kb->kbd_macro_end = kb->kbd_macro_buffer + end_offset;
        }
diff --git a/src/minibuf.c b/src/minibuf.c
index 31b6946..727a70b 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -229,12 +229,7 @@ read_minibuf_noninteractive (Lisp_Object map, Lisp_Object 
initial,
          if (hide_char)
            fprintf (stdout, "%c", hide_char);
          if (len == size)
-           {
-             if (STRING_BYTES_BOUND / 2 < size)
-               memory_full (SIZE_MAX);
-             size *= 2;
-             line = xrealloc (line, size);
-           }
+           line = xpalloc (line, &size, 1, -1, sizeof *line);
          line[len++] = c;
        }
     }
diff --git a/src/nsimage.m b/src/nsimage.m
index e76a7db..bdaf6a4 100644
--- a/src/nsimage.m
+++ b/src/nsimage.m
@@ -202,10 +202,13 @@ ns_set_alpha (void *img, int x, int y, unsigned char a)
 }
 
 
+/* Create image from monochrome bitmap. If both FG and BG are 0
+   (black), set the background to white and make it transparent. */
 - initFromXBM: (unsigned char *)bits width: (int)w height: (int)h
            fg: (unsigned long)fg bg: (unsigned long)bg
 {
   unsigned char *planes[5];
+  unsigned char bg_alpha = 0xff;
 
   [self initWithSize: NSMakeSize (w, h)];
 
@@ -219,7 +222,10 @@ ns_set_alpha (void *img, int x, int y, unsigned char a)
   [bmRep getBitmapDataPlanes: planes];
 
   if (fg == 0 && bg == 0)
-    bg = 0xffffff;
+    {
+      bg = 0xffffff;
+      bg_alpha = 0;
+    }
 
   {
     /* pull bits out to set the (bytewise) alpha mask */
@@ -244,21 +250,22 @@ ns_set_alpha (void *img, int x, int y, unsigned char a)
           c = *s++;
           for (k = 0; i < w && k < 8; ++k, ++i)
             {
-              *alpha++ = 0xff;
-              if (c & 1)
+              if (c & 0x80)
                 {
                   *rr++ = fgr;
                   *gg++ = fgg;
                   *bb++ = fgb;
+                  *alpha++ = 0xff;
                 }
               else
                 {
                   *rr++ = bgr;
                   *gg++ = bgg;
                   *bb++ = bgb;
+                  *alpha++ = bg_alpha;
                 }
               idx++;
-              c >>= 1;
+              c <<= 1;
             }
         }
   }
diff --git a/src/nsterm.h b/src/nsterm.h
index 3fb8cfc..1b330f0 100644
--- a/src/nsterm.h
+++ b/src/nsterm.h
@@ -126,7 +126,7 @@ nsterm.m  : 6718: [ 4453]  | | | | +->> (X:0 Y:0)/(W:1600 
H:1177)
 
    Here, "ns_fullscreen_hook" calls "handleFS", which is turn calls
    "performZoom".  This function calls "[super performZoom]", which
-   isn't annoted (so it doesn't show up in the trace).  However, it
+   isn't annotated (so it doesn't show up in the trace).  However, it
    calls "zoom" which is annotated so it is part of the call trace.
    Later, the method "windowWillUseStandardFrame" and the function
    "setFSValue" are called.  The lines with "+---" contain extra
@@ -230,7 +230,7 @@ void nstrace_leave(int *);
 
 /* Function enter macros.
 
-   NSTRACE (fmt, ...) -- Enable trace output in curent block
+   NSTRACE (fmt, ...) -- Enable trace output in current block
                          (typically a function).  Accepts printf-style
                          arguments.
 
diff --git a/src/nsterm.m b/src/nsterm.m
index 925e9af..5c39d5c 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -839,6 +839,9 @@ static NSRect constrain_frame_rect(NSRect frameRect)
 
 static void
 ns_constrain_all_frames (void)
+/* --------------------------------------------------------------------------
+     Ensure that the menu bar doesn't cover any frames.
+   -------------------------------------------------------------------------- 
*/
 {
   Lisp_Object tail, frame;
 
@@ -851,10 +854,14 @@ ns_constrain_all_frames (void)
       struct frame *f = XFRAME (frame);
       if (FRAME_NS_P (f))
         {
-          NSView *view = FRAME_NS_VIEW (f);
+          EmacsView *view = FRAME_NS_VIEW (f);
 
-          [[view window] setFrame:constrain_frame_rect([[view window] frame])
-                          display:NO];
+          if (![view isFullscreen])
+            {
+              [[view window]
+                setFrame:constrain_frame_rect([[view window] frame])
+                 display:NO];
+            }
         }
     }
 
@@ -862,10 +869,11 @@ ns_constrain_all_frames (void)
 }
 
 
-/* Show or hide the menu bar, based on user setting.  */
-
 static void
 ns_update_auto_hide_menu_bar (void)
+/* --------------------------------------------------------------------------
+     Show or hide the menu bar, based on user setting.
+   -------------------------------------------------------------------------- 
*/
 {
 #ifdef NS_IMPL_COCOA
   NSTRACE ("ns_update_auto_hide_menu_bar");
@@ -2456,11 +2464,31 @@ ns_draw_fringe_bitmap (struct window *w, struct 
glyph_row *row,
     External (RIF); fringe-related
    -------------------------------------------------------------------------- 
*/
 {
+  /* Fringe bitmaps comes in two variants, normal and periodic.  A
+     periodic bitmap is used to create a continuous pattern.  Since a
+     bitmap is rendered one text line at a time, the start offset (dh)
+     of the bitmap varies.  Concretely, this is used for the empty
+     line indicator.
+
+     For a bitmap, "h + dh" is the full height and is always
+     invariant.  For a normal bitmap "dh" is zero.
+
+     For example, when the period is three and the full height is 72
+     the following combinations exists:
+
+       h=72 dh=0
+       h=71 dh=1
+       h=70 dh=2 */
+
   struct frame *f = XFRAME (WINDOW_FRAME (w));
   struct face *face = p->face;
   static EmacsImage **bimgs = NULL;
   static int nBimgs = 0;
 
+  NSTRACE ("ns_draw_fringe_bitmap");
+  NSTRACE_MSG ("which:%d cursor:%d overlay:%d width:%d height:%d period:%d",
+               p->which, p->cursor_p, p->overlay_p, p->wd, p->h, p->dh);
+
   /* grow bimgs if needed */
   if (nBimgs < max_used_fringe_bitmap)
     {
@@ -2493,19 +2521,24 @@ ns_draw_fringe_bitmap (struct window *w, struct 
glyph_row *row,
 
       if (!img)
         {
-          unsigned short *bits = p->bits + p->dh;
-          int len = p->h;
+          // Note: For "periodic" images, allocate one EmacsImage for
+          // the base image, and use it for all dh:s.
+          unsigned short *bits = p->bits;
+          int full_height = p->h + p->dh;
           int i;
-          unsigned char *cbits = xmalloc (len);
+          unsigned char *cbits = xmalloc (full_height);
 
-          for (i = 0; i < len; i++)
-            cbits[i] = ~(bits[i] & 0xff);
-          img = [[EmacsImage alloc] initFromXBM: cbits width: 8 height: p->h
+          for (i = 0; i < full_height; i++)
+            cbits[i] = bits[i];
+          img = [[EmacsImage alloc] initFromXBM: cbits width: 8
+                                         height: full_height
                                              fg: 0 bg: 0];
           bimgs[p->which - 1] = img;
           xfree (cbits);
         }
 
+      NSTRACE_RECT ("r", r);
+
       NSRectClip (r);
       /* Since we composite the bitmap instead of just blitting it, we need
          to erase the whole background. */
@@ -2523,9 +2556,15 @@ ns_draw_fringe_bitmap (struct window *w, struct 
glyph_row *row,
         [img setXBMColor: bm_color];
       }
 
+      // Note: For periodic images, the full image height is "h + hd".
+      // By using the height h, a suitable part of the image is used.
+      NSRect fromRect = NSMakeRect(0, 0, p->wd, p->h);
+
+      NSTRACE_RECT ("fromRect", fromRect);
+
 #ifdef NS_IMPL_COCOA
       [img drawInRect: r
-              fromRect: NSZeroRect
+              fromRect: fromRect
              operation: NSCompositeSourceOver
               fraction: 1.0
            respectFlipped: YES
@@ -6228,7 +6267,10 @@ not_in_argv (NSString *arg)
       wr = NSMakeRect (0, 0, neww, newh);
       NSTRACE_RECT ("setFrame", wr);
       [view setFrame: wr];
-      [self windowDidMove:nil];   // Update top/left.
+      // to do: consider using [NSNotificationCenter postNotificationName:].
+      [self windowDidMove: // Update top/left.
+             [NSNotification notificationWithName:NSWindowDidMoveNotification
+                                           object:[view window]]];
     }
   else
     {
@@ -6311,7 +6353,7 @@ not_in_argv (NSString *arg)
 
   /* Restrict the new size to the text gird.
 
-     Don't restict the width if the user only adjusted the height, and
+     Don't restrict the width if the user only adjusted the height, and
      vice versa.  (Without this, the frame would shrink, and move
      slightly, if the window was resized by dragging one of its
      borders.) */
@@ -6341,7 +6383,11 @@ not_in_argv (NSString *arg)
 - (void)windowDidResize: (NSNotification *)notification
 {
   NSTRACE ("windowDidResize");
-
+  if (!FRAME_LIVE_P (emacsframe))
+    {
+      NSTRACE_MSG ("Ignored (frame dead)");
+      return;
+    }
   if (emacsframe->output_data.ns->in_animation)
     {
       NSTRACE_MSG ("Ignored (in animation)");
@@ -6820,12 +6866,26 @@ not_in_argv (NSString *arg)
 }
 #endif
 
+#if !defined (NS_IMPL_COCOA) || MAC_OS_X_VERSION_MAX_ALLOWED < 
MAC_OS_X_VERSION_10_7
+#define NSWindowDidEnterFullScreenNotification 
"NSWindowDidEnterFullScreenNotification"
+#endif
+
 - (void)windowWillEnterFullScreen:(NSNotification *)notification
 {
+  [self windowWillEnterFullScreen];
+}
+- (void)windowWillEnterFullScreen /* provided for direct calls */
+{
   NSTRACE ("windowWillEnterFullScreen");
   fs_before_fs = fs_state;
 }
 
+- (void)windowDidEnterFullScreen /* provided for direct calls */
+{
+  [self windowDidEnterFullScreen:
+             [NSNotification 
notificationWithName:NSWindowDidEnterFullScreenNotification
+                                           object:[self window]]];
+}
 - (void)windowDidEnterFullScreen:(NSNotification *)notification
 {
   NSTRACE ("windowDidEnterFullScreen");
@@ -6862,16 +6922,34 @@ not_in_argv (NSString *arg)
 
 - (void)windowWillExitFullScreen:(NSNotification *)notification
 {
-  NSTRACE ("windowWillExitFullScreen");
+  [self windowWillExitFullScreen];
+}
 
+- (void)windowWillExitFullScreen /* provided for direct calls */
+{
+  NSTRACE ("windowWillExitFullScreen");
+  if (!FRAME_LIVE_P (emacsframe))
+    {
+      NSTRACE_MSG ("Ignored (frame dead)");
+      return;
+    }
   if (next_maximized != -1)
     fs_before_fs = next_maximized;
 }
 
 - (void)windowDidExitFullScreen:(NSNotification *)notification
 {
-  NSTRACE ("windowDidExitFullScreen");
+  [self windowDidExitFullScreen];
+}
 
+- (void)windowDidExitFullScreen /* provided for direct calls */
+{
+  NSTRACE ("windowDidExitFullScreen");
+  if (!FRAME_LIVE_P (emacsframe))
+    {
+      NSTRACE_MSG ("Ignored (frame dead)");
+      return;
+    }
   [self setFSValue: fs_before_fs];
   fs_before_fs = -1;
 #ifdef HAVE_NATIVE_FS
@@ -7000,13 +7078,13 @@ not_in_argv (NSString *arg)
 
       nonfs_window = w;
 
-      [self windowWillEnterFullScreen:nil];
+      [self windowWillEnterFullScreen];
       [fw makeKeyAndOrderFront:NSApp];
       [fw makeFirstResponder:self];
       [w orderOut:self];
       r = [fw frameRectForContentRect:[screen frame]];
       [fw setFrame: r display:YES animate:ns_use_fullscreen_animation];
-      [self windowDidEnterFullScreen:nil];
+      [self windowDidEnterFullScreen];
       [fw display];
     }
   else
@@ -7034,11 +7112,13 @@ not_in_argv (NSString *arg)
       if (FRAME_EXTERNAL_TOOL_BAR (f))
         FRAME_TOOLBAR_HEIGHT (f) = tobar_height;
 
-      [self windowWillExitFullScreen:nil];
+      // to do: consider using [NSNotificationCenter postNotificationName:] to 
send notifications.
+
+      [self windowWillExitFullScreen];
       [fw setFrame: [w frame] display:YES animate:ns_use_fullscreen_animation];
       [fw close];
       [w makeKeyAndOrderFront:NSApp];
-      [self windowDidExitFullScreen:nil];
+      [self windowDidExitFullScreen];
       [self updateFrameSize:YES];
     }
 }
@@ -7527,7 +7607,7 @@ not_in_argv (NSString *arg)
 /* Constrain size and placement of a frame.
 
    By returning the original "frameRect", the frame is not
-   contrained. This can lead to unwanted situations where, for
+   constrained. This can lead to unwanted situations where, for
    example, the menu bar covers the frame.
 
    The default implementation (accessed using "super") constrains the
@@ -7583,7 +7663,7 @@ not_in_argv (NSString *arg)
 
 #if 0
   // Native zoom done using the standard zoom animation.  Size of the
-  // resulting frame reduced to accomodate the Dock and, if present,
+  // resulting frame reduced to accommodate the Dock and, if present,
   // the menu-bar.
   [super zoom:sender];
 
@@ -7597,8 +7677,8 @@ not_in_argv (NSString *arg)
   //
   // This works for all practical purposes.  (The only minor oddity is
   // when transiting from full-height frame to a maximized, the
-  // animation reduces the height of the frame slighty (to the 4
-  // pixels needed to accomodate the Doc) before it snaps back into
+  // animation reduces the height of the frame slightly (to the 4
+  // pixels needed to accommodate the Doc) before it snaps back into
   // full height.  The user would need a very trained eye to spot
   // this.)
   NSScreen * screen = [self screen];
@@ -7638,8 +7718,8 @@ not_in_argv (NSString *arg)
         }
     }
 #else
-  // Non-native zoom which is done instantaneous.  The resulting frame
-  // covert the entire scrren, except the menu-bar, if present.
+  // Non-native zoom which is done instantaneously.  The resulting frame
+  // covers the entire screen, except the menu-bar, if present.
   NSScreen * screen = [self screen];
   if (screen != nil)
     {
diff --git a/src/term.c b/src/term.c
index 9b1e7ca..6ab611d 100644
--- a/src/term.c
+++ b/src/term.c
@@ -532,15 +532,13 @@ encode_terminal_code (struct glyph *src, int src_len,
      multibyte-form.  But, it may be enlarged on demand if
      Vglyph_table contains a string or a composite glyph is
      encountered.  */
-  if (min (PTRDIFF_MAX, SIZE_MAX) / MAX_MULTIBYTE_LENGTH < src_len)
+  if (INT_MULTIPLY_WRAPV (src_len, MAX_MULTIBYTE_LENGTH, &required))
     memory_full (SIZE_MAX);
-  required = src_len;
-  required *= MAX_MULTIBYTE_LENGTH;
   if (encode_terminal_src_size < required)
-    {
-      encode_terminal_src = xrealloc (encode_terminal_src, required);
-      encode_terminal_src_size = required;
-    }
+    encode_terminal_src = xpalloc (encode_terminal_src,
+                                  &encode_terminal_src_size,
+                                  required - encode_terminal_src_size,
+                                  -1, sizeof *encode_terminal_src);
 
   charset_list = coding_charset_list (coding);
 
diff --git a/src/tparam.c b/src/tparam.c
index 02047db..3a64059 100644
--- a/src/tparam.c
+++ b/src/tparam.c
@@ -167,9 +167,9 @@ tparam1 (const char *string, char *outstring, int len,
                        doup++, append_len_incr = strlen (up);
                      else
                        doleft++, append_len_incr = strlen (left);
-                     if (INT_ADD_OVERFLOW (append_len, append_len_incr))
+                     if (INT_ADD_WRAPV (append_len_incr,
+                                        append_len, &append_len))
                        memory_full (SIZE_MAX);
-                     append_len += append_len_incr;
                    }
                }
              *op++ = tem ? tem : 0200;
diff --git a/src/undo.c b/src/undo.c
index e0924b2..214beae 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -23,10 +23,6 @@ along with GNU Emacs.  If not, see 
<http://www.gnu.org/licenses/>.  */
 #include "lisp.h"
 #include "buffer.h"
 
-/* Last buffer for which undo information was recorded.  */
-/* BEWARE: This is not traced by the GC, so never dereference it!  */
-static struct buffer *last_undo_buffer;
-
 /* Position of point last time we inserted a boundary.  */
 static struct buffer *last_boundary_buffer;
 static ptrdiff_t last_boundary_position;
@@ -38,6 +34,12 @@ static ptrdiff_t last_boundary_position;
    an undo-boundary.  */
 static Lisp_Object pending_boundary;
 
+static void
+run_undoable_change (void)
+{
+  call0 (Qundo_auto__undoable_change);
+}
+
 /* Record point as it was at beginning of this command (if necessary)
    and prepare the undo info for recording a change.
    PT is the position of point that will naturally occur as a result of the
@@ -56,15 +58,7 @@ record_point (ptrdiff_t pt)
   if (NILP (pending_boundary))
     pending_boundary = Fcons (Qnil, Qnil);
 
-  if ((current_buffer != last_undo_buffer)
-      /* Don't call Fundo_boundary for the first change.  Otherwise we
-        risk overwriting last_boundary_position in Fundo_boundary with
-        PT of the current buffer and as a consequence not insert an
-        undo boundary because last_boundary_position will equal pt in
-        the test at the end of the present function (Bug#731).  */
-      && (MODIFF > SAVE_MODIFF))
-    Fundo_boundary ();
-  last_undo_buffer = current_buffer;
+  run_undoable_change ();
 
   at_boundary = ! CONSP (BVAR (current_buffer, undo_list))
                 || NILP (XCAR (BVAR (current_buffer, undo_list)));
@@ -136,9 +130,7 @@ record_marker_adjustments (ptrdiff_t from, ptrdiff_t to)
   if (NILP (pending_boundary))
     pending_boundary = Fcons (Qnil, Qnil);
 
-  if (current_buffer != last_undo_buffer)
-    Fundo_boundary ();
-  last_undo_buffer = current_buffer;
+  run_undoable_change ();
 
   for (m = BUF_MARKERS (current_buffer); m; m = m->next)
     {
@@ -225,10 +217,6 @@ record_first_change (void)
   if (EQ (BVAR (current_buffer, undo_list), Qt))
     return;
 
-  if (current_buffer != last_undo_buffer)
-    Fundo_boundary ();
-  last_undo_buffer = current_buffer;
-
   if (base_buffer->base_buffer)
     base_buffer = base_buffer->base_buffer;
 
@@ -247,7 +235,6 @@ record_property_change (ptrdiff_t beg, ptrdiff_t length,
 {
   Lisp_Object lbeg, lend, entry;
   struct buffer *obuf = current_buffer, *buf = XBUFFER (buffer);
-  bool boundary = false;
 
   if (EQ (BVAR (buf, undo_list), Qt))
     return;
@@ -256,15 +243,10 @@ record_property_change (ptrdiff_t beg, ptrdiff_t length,
   if (NILP (pending_boundary))
     pending_boundary = Fcons (Qnil, Qnil);
 
-  if (buf != last_undo_buffer)
-    boundary = true;
-  last_undo_buffer = buf;
-
   /* Switch temporarily to the buffer that was changed.  */
-  current_buffer = buf;
+  set_buffer_internal (buf);
 
-  if (boundary)
-    Fundo_boundary ();
+  run_undoable_change ();
 
   if (MODIFF <= SAVE_MODIFF)
     record_first_change ();
@@ -275,7 +257,8 @@ record_property_change (ptrdiff_t beg, ptrdiff_t length,
   bset_undo_list (current_buffer,
                  Fcons (entry, BVAR (current_buffer, undo_list)));
 
-  current_buffer = obuf;
+  /* Reset the buffer */
+  set_buffer_internal (obuf);
 }
 
 DEFUN ("undo-boundary", Fundo_boundary, Sundo_boundary, 0, 0, 0,
@@ -305,6 +288,8 @@ but another undo command will undo to the previous 
boundary.  */)
     }
   last_boundary_position = PT;
   last_boundary_buffer = current_buffer;
+
+  Fset (Qundo_auto__last_boundary_cause, Qexplicit);
   return Qnil;
 }
 
@@ -380,7 +365,6 @@ truncate_undo_list (struct buffer *b)
       && !NILP (Vundo_outer_limit_function))
     {
       Lisp_Object tem;
-      struct buffer *temp = last_undo_buffer;
 
       /* Normally the function this calls is undo-outer-limit-truncate.  */
       tem = call1 (Vundo_outer_limit_function, make_number (size_so_far));
@@ -391,10 +375,6 @@ truncate_undo_list (struct buffer *b)
          unbind_to (count, Qnil);
          return;
        }
-      /* That function probably used the minibuffer, and if so, that
-        changed last_undo_buffer.  Change it back so that we don't
-        force next change to make an undo boundary here.  */
-      last_undo_buffer = temp;
     }
 
   if (CONSP (next))
@@ -452,6 +432,9 @@ void
 syms_of_undo (void)
 {
   DEFSYM (Qinhibit_read_only, "inhibit-read-only");
+  DEFSYM (Qundo_auto__undoable_change, "undo-auto--undoable-change");
+  DEFSYM (Qundo_auto__last_boundary_cause, "undo-auto--last-boundary-cause");
+  DEFSYM (Qexplicit, "explicit");
 
   /* Marker for function call undo list elements.  */
   DEFSYM (Qapply, "apply");
@@ -459,7 +442,6 @@ syms_of_undo (void)
   pending_boundary = Qnil;
   staticpro (&pending_boundary);
 
-  last_undo_buffer = NULL;
   last_boundary_buffer = NULL;
 
   defsubr (&Sundo_boundary);
diff --git a/src/unexelf.c b/src/unexelf.c
index 483da6e..c10c7f2 100644
--- a/src/unexelf.c
+++ b/src/unexelf.c
@@ -40,347 +40,6 @@ what you give them.   Help stamp out software-hoarding!  */
  * On some machines, an existing old_name file is required.
  *
  */
-
-/* Even more heavily modified by address@hidden of Dell Computer Co.
- * ELF support added.
- *
- * Basic theory: the data space of the running process needs to be
- * dumped to the output file.  Normally we would just enlarge the size
- * of .data, scooting everything down.  But we can't do that in ELF,
- * because there is often something between the .data space and the
- * .bss space.
- *
- * In the temacs dump below, notice that the Global Offset Table
- * (.got) and the Dynamic link data (.dynamic) come between .data1 and
- * .bss.  It does not work to overlap .data with these fields.
- *
- * The solution is to create a new .data segment.  This segment is
- * filled with data from the current process.  Since the contents of
- * various sections refer to sections by index, the new .data segment
- * is made the last in the table to avoid changing any existing index.
-
- * This is an example of how the section headers are changed.  "Addr"
- * is a process virtual address.  "Offset" is a file offset.
-
-raid:/nfs/raid/src/dist-18.56/src> dump -h temacs
-
-temacs:
-
-           **** SECTION HEADER TABLE ****
- [No]    Type    Flags   Addr         Offset       Size          Name
-         Link    Info    Adralgn      Entsize
-
- [1]     1       2       0x80480d4    0xd4         0x13          .interp
-         0       0       0x1          0
-
- [2]     5       2       0x80480e8    0xe8         0x388         .hash
-         3       0       0x4          0x4
-
- [3]     11      2       0x8048470    0x470        0x7f0         .dynsym
-         4       1       0x4          0x10
-
- [4]     3       2       0x8048c60    0xc60        0x3ad         .dynstr
-         0       0       0x1          0
-
- [5]     9       2       0x8049010    0x1010       0x338         .rel.plt
-         3       7       0x4          0x8
-
- [6]     1       6       0x8049348    0x1348       0x3           .init
-         0       0       0x4          0
-
- [7]     1       6       0x804934c    0x134c       0x680         .plt
-         0       0       0x4          0x4
-
- [8]     1       6       0x80499cc    0x19cc       0x3c56f       .text
-         0       0       0x4          0
-
- [9]     1       6       0x8085f3c    0x3df3c      0x3           .fini
-         0       0       0x4          0
-
- [10]    1       2       0x8085f40    0x3df40      0x69c         .rodata
-         0       0       0x4          0
-
- [11]    1       2       0x80865dc    0x3e5dc      0xd51         .rodata1
-         0       0       0x4          0
-
- [12]    1       3       0x8088330    0x3f330      0x20afc       .data
-         0       0       0x4          0
-
- [13]    1       3       0x80a8e2c    0x5fe2c      0x89d         .data1
-         0       0       0x4          0
-
- [14]    1       3       0x80a96cc    0x606cc      0x1a8         .got
-         0       0       0x4          0x4
-
- [15]    6       3       0x80a9874    0x60874      0x80          .dynamic
-         4       0       0x4          0x8
-
- [16]    8       3       0x80a98f4    0x608f4      0x449c        .bss
-         0       0       0x4          0
-
- [17]    2       0       0            0x608f4      0x9b90        .symtab
-         18      371     0x4          0x10
-
- [18]    3       0       0            0x6a484      0x8526        .strtab
-         0       0       0x1          0
-
- [19]    3       0       0            0x729aa      0x93          .shstrtab
-         0       0       0x1          0
-
- [20]    1       0       0            0x72a3d      0x68b7        .comment
-         0       0       0x1          0
-
- raid:/nfs/raid/src/dist-18.56/src> dump -h xemacs
-
- xemacs:
-
-            **** SECTION HEADER TABLE ****
- [No]    Type    Flags   Addr         Offset       Size          Name
-         Link    Info    Adralgn      Entsize
-
- [1]     1       2       0x80480d4    0xd4         0x13          .interp
-         0       0       0x1          0
-
- [2]     5       2       0x80480e8    0xe8         0x388         .hash
-         3       0       0x4          0x4
-
- [3]     11      2       0x8048470    0x470        0x7f0         .dynsym
-         4       1       0x4          0x10
-
- [4]     3       2       0x8048c60    0xc60        0x3ad         .dynstr
-         0       0       0x1          0
-
- [5]     9       2       0x8049010    0x1010       0x338         .rel.plt
-         3       7       0x4          0x8
-
- [6]     1       6       0x8049348    0x1348       0x3           .init
-         0       0       0x4          0
-
- [7]     1       6       0x804934c    0x134c       0x680         .plt
-         0       0       0x4          0x4
-
- [8]     1       6       0x80499cc    0x19cc       0x3c56f       .text
-         0       0       0x4          0
-
- [9]     1       6       0x8085f3c    0x3df3c      0x3           .fini
-         0       0       0x4          0
-
- [10]    1       2       0x8085f40    0x3df40      0x69c         .rodata
-         0       0       0x4          0
-
- [11]    1       2       0x80865dc    0x3e5dc      0xd51         .rodata1
-         0       0       0x4          0
-
- [12]    1       3       0x8088330    0x3f330      0x20afc       .data
-         0       0       0x4          0
-
- [13]    1       3       0x80a8e2c    0x5fe2c      0x89d         .data1
-         0       0       0x4          0
-
- [14]    1       3       0x80a96cc    0x606cc      0x1a8         .got
-         0       0       0x4          0x4
-
- [15]    6       3       0x80a9874    0x60874      0x80          .dynamic
-         4       0       0x4          0x8
-
- [16]    8       3       0x80c6800    0x7d800      0             .bss
-         0       0       0x4          0
-
- [17]    2       0       0            0x7d800      0x9b90        .symtab
-         18      371     0x4          0x10
-
- [18]    3       0       0            0x87390      0x8526        .strtab
-         0       0       0x1          0
-
- [19]    3       0       0            0x8f8b6      0x93          .shstrtab
-         0       0       0x1          0
-
- [20]    1       0       0            0x8f949      0x68b7        .comment
-         0       0       0x1          0
-
- [21]    1       3       0x80a98f4    0x608f4      0x1cf0c       .data
-         0       0       0x4          0
-
-  * This is an example of how the file header is changed.  "Shoff" is
-  * the section header offset within the file.  Since that table is
-  * after the new .data section, it is moved.  "Shnum" is the number of
-  * sections, which we increment.
-  *
-  * "Phoff" is the file offset to the program header.  "Phentsize" and
-  * "Shentsz" are the program and section header entries sizes respectively.
-  * These can be larger than the apparent struct sizes.
-
- raid:/nfs/raid/src/dist-18.56/src> dump -f temacs
-
- temacs:
-
-                     **** ELF HEADER ****
- Class        Data       Type         Machine     Version
- Entry        Phoff      Shoff        Flags       Ehsize
- Phentsize    Phnum      Shentsz      Shnum       Shstrndx
-
- 1            1          2            3           1
- 0x80499cc    0x34       0x792f4      0           0x34
- 0x20         5          0x28         21          19
-
- raid:/nfs/raid/src/dist-18.56/src> dump -f xemacs
-
- xemacs:
-
-                     **** ELF HEADER ****
- Class        Data       Type         Machine     Version
- Entry        Phoff      Shoff        Flags       Ehsize
- Phentsize    Phnum      Shentsz      Shnum       Shstrndx
-
- 1            1          2            3           1
- 0x80499cc    0x34       0x96200      0           0x34
- 0x20         5          0x28         22          19
-
-  * These are the program headers.  "Offset" is the file offset to the
-  * segment.  "Vaddr" is the memory load address.  "Filesz" is the
-  * segment size as it appears in the file, and "Memsz" is the size in
-  * memory.  Below, the third segment is the code and the fourth is the
-  * data: the difference between Filesz and Memsz is .bss
-
- raid:/nfs/raid/src/dist-18.56/src> dump -o temacs
-
- temacs:
-  ***** PROGRAM EXECUTION HEADER *****
- Type        Offset      Vaddr       Paddr
- Filesz      Memsz       Flags       Align
-
- 6           0x34        0x8048034   0
- 0xa0        0xa0        5           0
-
- 3           0xd4        0           0
- 0x13        0           4           0
-
- 1           0x34        0x8048034   0
- 0x3f2f9     0x3f2f9     5           0x1000
-
- 1           0x3f330     0x8088330   0
- 0x215c4     0x25a60     7           0x1000
-
- 2           0x60874     0x80a9874   0
- 0x80        0           7           0
-
- raid:/nfs/raid/src/dist-18.56/src> dump -o xemacs
-
- xemacs:
-  ***** PROGRAM EXECUTION HEADER *****
- Type        Offset      Vaddr       Paddr
- Filesz      Memsz       Flags       Align
-
- 6           0x34        0x8048034   0
- 0xa0        0xa0        5           0
-
- 3           0xd4        0           0
- 0x13        0           4           0
-
- 1           0x34        0x8048034   0
- 0x3f2f9     0x3f2f9     5           0x1000
-
- 1           0x3f330     0x8088330   0
- 0x3e4d0     0x3e4d0     7           0x1000
-
- 2           0x60874     0x80a9874   0
- 0x80        0           7           0
-
-
- */
-
-/* Modified by address@hidden of Motorola Inc.
- *
- * The above mechanism does not work if the unexeced ELF file is being
- * re-layout by other applications (such as `strip'). All the applications
- * that re-layout the internal of ELF will layout all sections in ascending
- * order of their file offsets. After the re-layout, the data2 section will
- * still be the LAST section in the section header vector, but its file offset
- * is now being pushed far away down, and causes part of it not to be mapped
- * in (ie. not covered by the load segment entry in PHDR vector), therefore
- * causes the new binary to fail.
- *
- * The solution is to modify the unexec algorithm to insert the new data2
- * section header right before the new bss section header, so their file
- * offsets will be in the ascending order. Since some of the section's (all
- * sections AFTER the bss section) indexes are now changed, we also need to
- * modify some fields to make them point to the right sections. This is done
- * by macro PATCH_INDEX. All the fields that need to be patched are:
- *
- * 1. ELF header e_shstrndx field.
- * 2. section header sh_link and sh_info field.
- * 3. symbol table entry st_shndx field.
- *
- * The above example now should look like:
-
-           **** SECTION HEADER TABLE ****
- [No]    Type    Flags   Addr         Offset       Size          Name
-         Link    Info    Adralgn      Entsize
-
- [1]     1       2       0x80480d4    0xd4         0x13          .interp
-         0       0       0x1          0
-
- [2]     5       2       0x80480e8    0xe8         0x388         .hash
-         3       0       0x4          0x4
-
- [3]     11      2       0x8048470    0x470        0x7f0         .dynsym
-         4       1       0x4          0x10
-
- [4]     3       2       0x8048c60    0xc60        0x3ad         .dynstr
-         0       0       0x1          0
-
- [5]     9       2       0x8049010    0x1010       0x338         .rel.plt
-         3       7       0x4          0x8
-
- [6]     1       6       0x8049348    0x1348       0x3           .init
-         0       0       0x4          0
-
- [7]     1       6       0x804934c    0x134c       0x680         .plt
-         0       0       0x4          0x4
-
- [8]     1       6       0x80499cc    0x19cc       0x3c56f       .text
-         0       0       0x4          0
-
- [9]     1       6       0x8085f3c    0x3df3c      0x3           .fini
-         0       0       0x4          0
-
- [10]    1       2       0x8085f40    0x3df40      0x69c         .rodata
-         0       0       0x4          0
-
- [11]    1       2       0x80865dc    0x3e5dc      0xd51         .rodata1
-         0       0       0x4          0
-
- [12]    1       3       0x8088330    0x3f330      0x20afc       .data
-         0       0       0x4          0
-
- [13]    1       3       0x80a8e2c    0x5fe2c      0x89d         .data1
-         0       0       0x4          0
-
- [14]    1       3       0x80a96cc    0x606cc      0x1a8         .got
-         0       0       0x4          0x4
-
- [15]    6       3       0x80a9874    0x60874      0x80          .dynamic
-         4       0       0x4          0x8
-
- [16]    1       3       0x80a98f4    0x608f4      0x1cf0c       .data
-         0       0       0x4          0
-
- [17]    8       3       0x80c6800    0x7d800      0             .bss
-         0       0       0x4          0
-
- [18]    2       0       0            0x7d800      0x9b90        .symtab
-         19      371     0x4          0x10
-
- [19]    3       0       0            0x87390      0x8526        .strtab
-         0       0       0x1          0
-
- [20]    3       0       0            0x8f8b6      0x93          .shstrtab
-         0       0       0x1          0
-
- [21]    1       0       0            0x8f949      0x68b7        .comment
-         0       0       0x1          0
-
- */
 
 /* We do not use mmap because that fails with NFS.
    Instead we read the whole file, modify it, and write it out.  */
@@ -535,29 +194,6 @@ verify ((! TYPE_SIGNED (ElfW (Half))
 /* Get the address of a particular section or program header entry,
  * accounting for the size of the entries.
  */
-/*
-   On PPC Reference Platform running Solaris 2.5.1
-   the plt section is also of type NOBI like the bss section.
-   (not really stored) and therefore sections after the bss
-   section start at the plt offset. The plt section is always
-   the one just before the bss section.
-   Thus, we modify the test from
-      if (NEW_SECTION_H (nn).sh_offset >= new_data2_offset)
-   to
-      if (NEW_SECTION_H (nn).sh_offset >=
-               OLD_SECTION_H (old_bss_index-1).sh_offset)
-   This is just a hack. We should put the new data section
-   before the .plt section.
-   And we should not have this routine at all but use
-   the libelf library to read the old file and create the new
-   file.
-   The changed code is minimal and depends on prep set in m/prep.h
-   Erik Deumens
-   Quantum Theory Project
-   University of Florida
-   address@hidden
-   Apr 23, 1996
-   */
 
 static void *
 entry_address (void *section_h, ptrdiff_t idx, ptrdiff_t entsize)
@@ -570,59 +206,18 @@ entry_address (void *section_h, ptrdiff_t idx, ptrdiff_t 
entsize)
   (*(ElfW (Shdr) *) entry_address (old_section_h, n, old_file_h->e_shentsize))
 #define NEW_SECTION_H(n) \
   (*(ElfW (Shdr) *) entry_address (new_section_h, n, new_file_h->e_shentsize))
-#define NEW_PROGRAM_H(n) \
-  (*(ElfW (Phdr) *) entry_address (new_program_h, n, new_file_h->e_phentsize))
+#define OLD_PROGRAM_H(n) \
+  (*(ElfW (Phdr) *) entry_address (old_program_h, n, old_file_h->e_phentsize))
 
-#define PATCH_INDEX(n) ((n) += old_bss_index <= (n))
 typedef unsigned char byte;
 
-/* Round X up to a multiple of Y.  */
-
-static ElfW (Addr)
-round_up (ElfW (Addr) x, ElfW (Addr) y)
-{
-  ElfW (Addr) rem = x % y;
-  if (rem == 0)
-    return x;
-  return x - rem + y;
-}
-
-/* Return the index of the section named NAME.
-   SECTION_NAMES, FILE_NAME and FILE_H give information
-   about the file we are looking in.
-
-   If we don't find the section NAME, that is a fatal error
-   if NOERROR is false; return -1 if NOERROR is true.  */
-
-static ptrdiff_t
-find_section (const char *name, const char *section_names, const char 
*file_name,
-             ElfW (Ehdr) *old_file_h, ElfW (Shdr) *old_section_h,
-             bool noerror)
-{
-  ptrdiff_t idx;
-
-  for (idx = 1; idx < old_file_h->e_shnum; idx++)
-    {
-      char const *found_name = section_names + OLD_SECTION_H (idx).sh_name;
-#ifdef UNEXELF_DEBUG
-      fprintf (stderr, "Looking for %s - found %s\n", name, found_name);
-#endif
-      if (strcmp (name, found_name) == 0)
-       return idx;
-    }
-
-  if (! noerror)
-    fatal ("Can't find %s in %s", name, file_name);
-  return -1;
-}
-
 /* ****************************************************************
  * unexec
  *
  * driving logic.
  *
- * In ELF, this works by replacing the old .bss section with a new
- * .data section, and inserting an empty .bss immediately afterwards.
+ * In ELF, this works by replacing the old bss SHT_NOBITS section with
+ * a new, larger, SHT_PROGBITS section.
  *
  */
 void
@@ -647,22 +242,16 @@ unexec (const char *new_name, const char *old_name)
   ElfW (Phdr) *old_program_h, *new_program_h;
   ElfW (Shdr) *old_section_h, *new_section_h;
 
-  /* Point to the section name table in the old file.  */
-  char *old_section_names;
+  /* Point to the section name table.  */
+  char *old_section_names, *new_section_names;
 
+  ElfW (Phdr) *old_bss_seg, *new_bss_seg;
   ElfW (Addr) old_bss_addr, new_bss_addr;
   ElfW (Word) old_bss_size, new_data2_size;
-  ElfW (Off)  new_data2_offset;
-  ElfW (Addr) new_data2_addr;
-  ElfW (Off)  old_bss_offset;
-  ElfW (Word) new_data2_incr;
-
-  ptrdiff_t n, nn;
-  ptrdiff_t old_bss_index, old_sbss_index, old_plt_index;
-  ptrdiff_t old_data_index, new_data2_index;
-#if defined _SYSTYPE_SYSV || defined __sgi
-  ptrdiff_t old_mdebug_index;
-#endif
+  ElfW (Off) old_bss_offset, new_data2_offset;
+
+  ptrdiff_t n;
+  ptrdiff_t old_bss_index;
   struct stat stat_buf;
   off_t old_file_size;
 
@@ -706,78 +295,44 @@ unexec (const char *new_name, const char *old_name)
   old_section_names = (char *) old_base
     + OLD_SECTION_H (old_file_h->e_shstrndx).sh_offset;
 
-  /* Find the mdebug section, if any.  */
-
-#if defined _SYSTYPE_SYSV || defined __sgi
-  old_mdebug_index = find_section (".mdebug", old_section_names,
-                                  old_name, old_file_h, old_section_h, 1);
-#endif
-
-  /* Find the old .bss section.  Figure out parameters of the new
-     data2 and bss sections.  */
-
-  old_bss_index = find_section (".bss", old_section_names,
-                               old_name, old_file_h, old_section_h, 0);
-
-  old_sbss_index = find_section (".sbss", old_section_names,
-                                old_name, old_file_h, old_section_h, 1);
-  if (old_sbss_index != -1)
-    if (OLD_SECTION_H (old_sbss_index).sh_type != SHT_NOBITS)
-      old_sbss_index = -1;
-
-  /* PowerPC64 has .plt in the BSS section.  */
-  old_plt_index = find_section (".plt", old_section_names,
-                               old_name, old_file_h, old_section_h, 1);
-  if (old_plt_index != -1)
-    if (OLD_SECTION_H (old_plt_index).sh_type != SHT_NOBITS)
-      old_plt_index = -1;
-
-  if (old_sbss_index == -1 && old_plt_index == -1)
-    {
-      old_bss_addr = OLD_SECTION_H (old_bss_index).sh_addr;
-      old_bss_size = OLD_SECTION_H (old_bss_index).sh_size;
-      old_bss_offset = OLD_SECTION_H (old_bss_index).sh_offset;
-      new_data2_index = old_bss_index;
-    }
-  else if (old_plt_index != -1
-          && (old_sbss_index == -1
-              || (OLD_SECTION_H (old_sbss_index).sh_addr
-                  > OLD_SECTION_H (old_plt_index).sh_addr)))
+  /* Find the PT_LOAD header covering the highest address.  This
+     segment will be where bss sections are located, past p_filesz.  */
+  old_bss_seg = 0;
+  for (n = old_file_h->e_phnum; --n >= 0; )
     {
-      old_bss_addr = OLD_SECTION_H (old_plt_index).sh_addr;
-      old_bss_size = OLD_SECTION_H (old_bss_index).sh_size
-       + OLD_SECTION_H (old_plt_index).sh_size;
-      if (old_sbss_index != -1)
-       old_bss_size += OLD_SECTION_H (old_sbss_index).sh_size;
-      old_bss_offset = OLD_SECTION_H (old_plt_index).sh_offset;
-      new_data2_index = old_plt_index;
+      ElfW (Phdr) *seg = &OLD_PROGRAM_H (n);
+      if (seg->p_type == PT_LOAD
+         && (old_bss_seg == 0
+             || seg->p_vaddr > old_bss_seg->p_vaddr))
+       old_bss_seg = seg;
     }
-  else
+
+  /* Note that old_bss_addr may be lower than the first bss section
+     address, since the section may need aligning.  */
+  old_bss_addr = old_bss_seg->p_vaddr + old_bss_seg->p_filesz;
+  old_bss_offset = old_bss_seg->p_offset + old_bss_seg->p_filesz;
+  old_bss_size = old_bss_seg->p_memsz - old_bss_seg->p_filesz;
+
+  /* Find the last bss style section in the bss segment range.  */
+  old_bss_index = -1;
+  for (n = old_file_h->e_shnum; --n > 0; )
     {
-      old_bss_addr = OLD_SECTION_H (old_sbss_index).sh_addr;
-      old_bss_size = OLD_SECTION_H (old_bss_index).sh_size
-       + OLD_SECTION_H (old_sbss_index).sh_size;
-      old_bss_offset = OLD_SECTION_H (old_sbss_index).sh_offset;
-      new_data2_index = old_sbss_index;
+      ElfW (Shdr) *shdr = &OLD_SECTION_H (n);
+      if (shdr->sh_type == SHT_NOBITS
+         && shdr->sh_addr >= old_bss_addr
+         && shdr->sh_addr + shdr->sh_size <= old_bss_addr + old_bss_size
+         && (old_bss_index == -1
+             || OLD_SECTION_H (old_bss_index).sh_addr < shdr->sh_addr))
+       old_bss_index = n;
     }
 
-  /* Find the old .data section.  Figure out parameters of
-     the new data2 and bss sections.  */
-
-  old_data_index = find_section (".data", old_section_names,
-                                old_name, old_file_h, old_section_h, 0);
+  if (old_bss_index == -1)
+    fatal ("no bss section found");
 
   new_break = sbrk (0);
   new_bss_addr = (ElfW (Addr)) new_break;
-  new_data2_addr = old_bss_addr;
   new_data2_size = new_bss_addr - old_bss_addr;
-  new_data2_offset = OLD_SECTION_H (old_data_index).sh_offset
-    + (new_data2_addr - OLD_SECTION_H (old_data_index).sh_addr);
-  /* This is the amount by which the sections following the bss sections
-     must be shifted in the image.  It can differ from new_data2_size if
-     the end of the old .data section (and thus the offset of the .bss
-     section) was unaligned.  */
-  new_data2_incr = new_data2_size + (new_data2_offset - old_bss_offset);
+  new_data2_offset = old_bss_offset;
 
 #ifdef UNEXELF_DEBUG
   fprintf (stderr, "old_bss_index %td\n", old_bss_index);
@@ -785,10 +340,8 @@ unexec (const char *new_name, const char *old_name)
   DEBUG_LOG (old_bss_size);
   DEBUG_LOG (old_bss_offset);
   DEBUG_LOG (new_bss_addr);
-  DEBUG_LOG (new_data2_addr);
   DEBUG_LOG (new_data2_size);
   DEBUG_LOG (new_data2_offset);
-  DEBUG_LOG (new_data2_incr);
 #endif
 
   if (new_bss_addr < old_bss_addr + old_bss_size)
@@ -802,7 +355,7 @@ unexec (const char *new_name, const char *old_name)
   if (new_file < 0)
     fatal ("Can't creat (%s): %s", new_name, strerror (errno));
 
-  new_file_size = old_file_size + old_file_h->e_shentsize + new_data2_incr;
+  new_file_size = old_file_size + new_data2_size;
 
   if (ftruncate (new_file, new_file_size))
     fatal ("Can't ftruncate (%s): %s", new_name, strerror (errno));
@@ -812,26 +365,24 @@ unexec (const char *new_name, const char *old_name)
   if (new_base == MAP_FAILED)
     fatal ("Can't allocate buffer for %s: %s", old_name, strerror (errno));
 
-  new_file_h = (ElfW (Ehdr) *) new_base;
-  new_program_h = (ElfW (Phdr) *) ((byte *) new_base + old_file_h->e_phoff);
-  new_section_h = (ElfW (Shdr) *)
-    ((byte *) new_base + old_file_h->e_shoff + new_data2_incr);
-
   /* Make our new file, program and section headers as copies of the
      originals.  */
 
+  new_file_h = (ElfW (Ehdr) *) new_base;
   memcpy (new_file_h, old_file_h, old_file_h->e_ehsize);
-  memcpy (new_program_h, old_program_h,
-         old_file_h->e_phnum * old_file_h->e_phentsize);
 
-  /* Modify the e_shstrndx if necessary. */
-  PATCH_INDEX (new_file_h->e_shstrndx);
+  /* Fix up file header.  Section header is further away now.  */
+
+  if (new_file_h->e_shoff >= old_bss_offset)
+    new_file_h->e_shoff += new_data2_size;
 
-  /* Fix up file header.  We'll add one section.  Section header is
-     further away now.  */
+  new_program_h = (ElfW (Phdr) *) ((byte *) new_base + new_file_h->e_phoff);
+  new_section_h = (ElfW (Shdr) *) ((byte *) new_base + new_file_h->e_shoff);
 
-  new_file_h->e_shoff += new_data2_incr;
-  new_file_h->e_shnum += 1;
+  memcpy (new_program_h, old_program_h,
+         old_file_h->e_phnum * old_file_h->e_phentsize);
+  memcpy (new_section_h, old_section_h,
+         old_file_h->e_shnum * old_file_h->e_shentsize);
 
 #ifdef UNEXELF_DEBUG
   DEBUG_LOG (old_file_h->e_shoff);
@@ -840,188 +391,71 @@ unexec (const char *new_name, const char *old_name)
   fprintf (stderr, "New section count %td\n", (ptrdiff_t) new_file_h->e_shnum);
 #endif
 
-  /* Fix up a new program header.  Extend the writable data segment so
-     that the bss area is covered too. Find that segment by looking
-     for a segment that ends just before the .bss area.  Make sure
-     that no segments are above the new .data2.  Put a loop at the end
-     to adjust the offset and address of any segment that is above
-     data2, just in case we decide to allow this later.  */
-
-  for (n = new_file_h->e_phnum; --n >= 0; )
-    {
-      /* Compute maximum of all requirements for alignment of section.  */
-      ElfW (Word) alignment = (NEW_PROGRAM_H (n)).p_align;
-      if ((OLD_SECTION_H (old_bss_index)).sh_addralign > alignment)
-       alignment = OLD_SECTION_H (old_bss_index).sh_addralign;
-
-#ifdef __sgi
-         /* According to address@hidden (Karsten Kuenne)
-            and address@hidden (Alexandre Oliva), on IRIX 5.2, we
-            always get "Program segment above .bss" when dumping
-            when the executable doesn't have an sbss section.  */
-      if (old_sbss_index != -1)
-#endif /* __sgi */
-      if (NEW_PROGRAM_H (n).p_vaddr + NEW_PROGRAM_H (n).p_filesz
-         > (old_sbss_index == -1
-            ? old_bss_addr
-            : round_up (old_bss_addr, alignment)))
-         fatal ("Program segment above .bss in %s", old_name);
-
-      if (NEW_PROGRAM_H (n).p_type == PT_LOAD
-         && (round_up ((NEW_PROGRAM_H (n)).p_vaddr
-                       + (NEW_PROGRAM_H (n)).p_filesz,
-                       alignment)
-             == round_up (old_bss_addr, alignment)))
-       break;
-    }
-  if (n < 0)
-    fatal ("Couldn't find segment next to .bss in %s", old_name);
-
-  /* Make sure that the size includes any padding before the old .bss
-     section.  */
-  NEW_PROGRAM_H (n).p_filesz = new_bss_addr - NEW_PROGRAM_H (n).p_vaddr;
-  NEW_PROGRAM_H (n).p_memsz = NEW_PROGRAM_H (n).p_filesz;
+  /* Fix up program header.  Extend the writable data segment so
+     that the bss area is covered too.  */
 
-#if 0 /* Maybe allow section after data2 - does this ever happen? */
-  for (n = new_file_h->e_phnum; --n >= 0; )
-    {
-      if (NEW_PROGRAM_H (n).p_vaddr
-         && NEW_PROGRAM_H (n).p_vaddr >= new_data2_addr)
-       NEW_PROGRAM_H (n).p_vaddr += new_data2_size - old_bss_size;
-
-      if (NEW_PROGRAM_H (n).p_offset >= new_data2_offset)
-       NEW_PROGRAM_H (n).p_offset += new_data2_incr;
-    }
-#endif
+  new_bss_seg = new_program_h + (old_bss_seg - old_program_h);
+  new_bss_seg->p_filesz = new_bss_addr - new_bss_seg->p_vaddr;
+  new_bss_seg->p_memsz = new_bss_seg->p_filesz;
 
-  /* Fix up section headers based on new .data2 section.  Any section
-     whose offset or virtual address is after the new .data2 section
-     gets its value adjusted.  .bss size becomes zero and new address
-     is set.  data2 section header gets added by copying the existing
-     .data header and modifying the offset, address and size.  */
+  /* Copy over what we have in memory now for the bss area. */
+  memcpy (new_base + new_data2_offset, (caddr_t) old_bss_addr, new_data2_size);
 
-  /* Walk through all section headers, insert the new data2 section right
-     before the new bss section. */
-  for (n = 1, nn = 1; n < old_file_h->e_shnum; n++, nn++)
+  /* Walk through all section headers, copying data and updating.  */
+  for (n = 1; n < old_file_h->e_shnum; n++)
     {
       caddr_t src;
-      /* If it is (s)bss section, insert the new data2 section before it.  */
-      /* new_data2_index is the index of either old_sbss or old_bss, that was
-        chosen as a section for new_data2.   */
-      if (n == new_data2_index)
-       {
-         /* Steal the data section header for this data2 section. */
-         memcpy (&NEW_SECTION_H (nn), &OLD_SECTION_H (old_data_index),
-                 new_file_h->e_shentsize);
-
-         NEW_SECTION_H (nn).sh_addr = new_data2_addr;
-         NEW_SECTION_H (nn).sh_offset = new_data2_offset;
-         NEW_SECTION_H (nn).sh_size = new_data2_size;
-         /* Use the bss section's alignment. This will assure that the
-            new data2 section always be placed in the same spot as the old
-            bss section by any other application. */
-         NEW_SECTION_H (nn).sh_addralign = OLD_SECTION_H (n).sh_addralign;
-
-         /* Now copy over what we have in the memory now. */
-         memcpy (NEW_SECTION_H (nn).sh_offset + new_base,
-                 (caddr_t) OLD_SECTION_H (n).sh_addr,
-                 new_data2_size);
-         nn++;
-       }
+      ElfW (Shdr) *old_shdr = &OLD_SECTION_H (n);
+      ElfW (Shdr) *new_shdr = &NEW_SECTION_H (n);
 
-      memcpy (&NEW_SECTION_H (nn), &OLD_SECTION_H (n),
-             old_file_h->e_shentsize);
-
-      if (n == old_bss_index
-         /* The new bss and sbss section's size is zero, and its file offset
-            and virtual address should be off by NEW_DATA2_SIZE.  */
-         || n == old_sbss_index || n == old_plt_index
-         )
-       {
-         /* NN should be `old_s?bss_index + 1' at this point. */
-         NEW_SECTION_H (nn).sh_offset = new_data2_offset + new_data2_size;
-         NEW_SECTION_H (nn).sh_addr = new_data2_addr + new_data2_size;
-         /* Let the new bss section address alignment be the same as the
-            section address alignment followed the old bss section, so
-            this section will be placed in exactly the same place. */
-         NEW_SECTION_H (nn).sh_addralign = OLD_SECTION_H (nn).sh_addralign;
-         NEW_SECTION_H (nn).sh_size = 0;
-       }
-      else
+      if (new_shdr->sh_type == SHT_NOBITS
+         && new_shdr->sh_addr >= old_bss_addr
+         && (new_shdr->sh_addr + new_shdr->sh_size
+             <= old_bss_addr + old_bss_size))
        {
-         /* Any section that was originally placed after the .bss
-            section should now be off by NEW_DATA2_INCR.  If a
-            section overlaps the .bss section, consider it to be
-            placed after the .bss section.  Overlap can occur if the
-            section just before .bss has less-strict alignment; this
-            was observed between .symtab and .bss on Solaris 2.5.1
-            (sparc) with GCC snapshot 960602.
-
-> dump -h temacs
-
-temacs:
-
-          **** SECTION HEADER TABLE ****
-[No]   Type    Flags   Addr         Offset       Size          Name
-       Link    Info    Adralgn      Entsize
-
-[22]   1       3       0x335150     0x315150     0x4           .data.rel.local
-       0       0       0x4          0
-
-[23]   8       3       0x335158     0x315158     0x42720       .bss
-       0       0       0x8          0
-
-[24]   2       0       0            0x315154     0x1c9d0       .symtab
-       25      1709    0x4          0x10
-         */
-
-         if (NEW_SECTION_H (nn).sh_offset >= old_bss_offset
-             || (NEW_SECTION_H (nn).sh_offset + NEW_SECTION_H (nn).sh_size
-                 > new_data2_offset))
-           NEW_SECTION_H (nn).sh_offset += new_data2_incr;
-
-         /* Any section that was originally placed after the section
-            header table should now be off by the size of one section
-            header table entry.  */
-         if (NEW_SECTION_H (nn).sh_offset > new_file_h->e_shoff)
-           NEW_SECTION_H (nn).sh_offset += new_file_h->e_shentsize;
+         /* This section now has file backing.  */
+         new_shdr->sh_type = SHT_PROGBITS;
+
+         /* SHT_NOBITS sections do not need a valid sh_offset, so it
+            might be incorrect.  Write the correct value.  */
+         new_shdr->sh_offset = (new_shdr->sh_addr - new_bss_seg->p_vaddr
+                                + new_bss_seg->p_offset);
+
+         /* If this is was a SHT_NOBITS .plt section, then it is
+            probably a PowerPC PLT.  If it is PowerPC64 ELFv1 then
+            glibc ld.so doesn't initialize the toc pointer word.  A
+            non-zero toc pointer word can defeat Power7 thread safety
+            during lazy update of a PLT entry.  This only matters if
+            emacs becomes multi-threaded.  */
+         if (strcmp (old_section_names + new_shdr->sh_name, ".plt") == 0)
+           memset (new_shdr->sh_offset + new_base, 0, new_shdr->sh_size);
+
+         /* Extend the size of the last bss section to cover dumped
+            data.  */
+         if (n == old_bss_index)
+           new_shdr->sh_size = new_bss_addr - new_shdr->sh_addr;
+
+         /* We have already copied this section from the current
+            process.  */
+         continue;
        }
 
-      /* If any section hdr refers to the section after the new .data
-        section, make it refer to next one because we have inserted
-        a new section in between.  */
-
-      PATCH_INDEX (NEW_SECTION_H (nn).sh_link);
-      /* For symbol tables, info is a symbol table index,
-        so don't change it.  */
-      if (NEW_SECTION_H (nn).sh_type != SHT_SYMTAB
-         && NEW_SECTION_H (nn).sh_type != SHT_DYNSYM)
-       PATCH_INDEX (NEW_SECTION_H (nn).sh_info);
-
-      if (old_sbss_index != -1)
-       if (!strcmp (old_section_names + NEW_SECTION_H (nn).sh_name, ".sbss"))
-         {
-           NEW_SECTION_H (nn).sh_offset =
-             round_up (NEW_SECTION_H (nn).sh_offset,
-                       NEW_SECTION_H (nn).sh_addralign);
-           NEW_SECTION_H (nn).sh_type = SHT_PROGBITS;
-         }
+      /* Any section that was originally placed after the .bss
+        section should now be offset by NEW_DATA2_SIZE.  */
+      if (new_shdr->sh_offset >= old_bss_offset)
+       new_shdr->sh_offset += new_data2_size;
 
       /* Now, start to copy the content of sections.  */
-      if (NEW_SECTION_H (nn).sh_type == SHT_NULL
-         || NEW_SECTION_H (nn).sh_type == SHT_NOBITS)
+      if (new_shdr->sh_type == SHT_NULL
+         || new_shdr->sh_type == SHT_NOBITS)
        continue;
 
-      /* Write out the sections. .data and .data1 (and data2, called
-        ".data" in the strings table) get copied from the current process
-        instead of the old file.  */
-      if (!strcmp (old_section_names + NEW_SECTION_H (n).sh_name, ".data")
-         || !strcmp ((old_section_names + NEW_SECTION_H (n).sh_name),
-                     ".sdata")
-         || !strcmp ((old_section_names + NEW_SECTION_H (n).sh_name),
-                     ".lit4")
-         || !strcmp ((old_section_names + NEW_SECTION_H (n).sh_name),
-                     ".lit8")
+      /* Some sections are copied from the current process instead of
+        the old file.  */
+      if (!strcmp (old_section_names + new_shdr->sh_name, ".data")
+         || !strcmp (old_section_names + new_shdr->sh_name, ".sdata")
+         || !strcmp (old_section_names + new_shdr->sh_name, ".lit4")
+         || !strcmp (old_section_names + new_shdr->sh_name, ".lit8")
          /* The conditional bit below was in Oliva's original code
             (1999-08-25) and seems to have been dropped by mistake
             subsequently.  It prevents a crash at startup under X in
@@ -1043,68 +477,41 @@ temacs:
             loader, but I never got anywhere with an SGI support call
             seeking clues.  -- fx 2002-11-29.  */
 #ifdef IRIX6_5
-         || !strcmp ((old_section_names + NEW_SECTION_H (n).sh_name),
-                     ".got")
+         || !strcmp (old_section_names + new_shdr->sh_name, ".got")
 #endif
-         || !strcmp ((old_section_names + NEW_SECTION_H (n).sh_name),
-                     ".sdata1")
-         || !strcmp ((old_section_names + NEW_SECTION_H (n).sh_name),
-                     ".data1")
-         || !strcmp ((old_section_names + NEW_SECTION_H (n).sh_name),
-                     ".sbss"))
-       src = (caddr_t) OLD_SECTION_H (n).sh_addr;
+         || !strcmp (old_section_names + new_shdr->sh_name, ".sdata1")
+         || !strcmp (old_section_names + new_shdr->sh_name, ".data1"))
+       src = (caddr_t) old_shdr->sh_addr;
       else
-       src = old_base + OLD_SECTION_H (n).sh_offset;
-
-      memcpy (NEW_SECTION_H (nn).sh_offset + new_base, src,
-             NEW_SECTION_H (nn).sh_size);
+       src = old_base + old_shdr->sh_offset;
 
-#if defined __alpha__ && !defined __OpenBSD__
-      /* Update Alpha COFF symbol table: */
-      if (strcmp (old_section_names + OLD_SECTION_H (n).sh_name, ".mdebug")
-         == 0)
-       {
-         pHDRR symhdr = (pHDRR) (NEW_SECTION_H (nn).sh_offset + new_base);
-
-         symhdr->cbLineOffset += new_data2_size;
-         symhdr->cbDnOffset += new_data2_size;
-         symhdr->cbPdOffset += new_data2_size;
-         symhdr->cbSymOffset += new_data2_size;
-         symhdr->cbOptOffset += new_data2_size;
-         symhdr->cbAuxOffset += new_data2_size;
-         symhdr->cbSsOffset += new_data2_size;
-         symhdr->cbSsExtOffset += new_data2_size;
-         symhdr->cbFdOffset += new_data2_size;
-         symhdr->cbRfdOffset += new_data2_size;
-         symhdr->cbExtOffset += new_data2_size;
-       }
-#endif /* __alpha__ && !__OpenBSD__ */
+      memcpy (new_shdr->sh_offset + new_base, src, new_shdr->sh_size);
 
-#if defined (_SYSTYPE_SYSV)
-      if (NEW_SECTION_H (nn).sh_type == SHT_MIPS_DEBUG
-         && old_mdebug_index != -1)
+#if (defined __alpha__ && !defined __OpenBSD__) || defined _SYSTYPE_SYSV
+      /* Update Alpha and MIPS COFF debug symbol table.  */
+      if (strcmp (old_section_names + new_shdr->sh_name, ".mdebug") == 0
+         && new_shdr->sh_offset - old_shdr->sh_offset != 0
+#if defined _SYSTYPE_SYSV
+         && new_shdr->sh_type == SHT_MIPS_DEBUG
+#endif
+         )
        {
-         ptrdiff_t new_offset = NEW_SECTION_H (nn).sh_offset;
-         ptrdiff_t old_offset = OLD_SECTION_H (old_mdebug_index).sh_offset;
-         ptrdiff_t diff = new_offset - old_offset;
-         HDRR *phdr = (HDRR *)(NEW_SECTION_H (nn).sh_offset + new_base);
-
-         if (diff)
-           {
-             phdr->cbLineOffset += diff;
-             phdr->cbDnOffset   += diff;
-             phdr->cbPdOffset   += diff;
-             phdr->cbSymOffset  += diff;
-             phdr->cbOptOffset  += diff;
-             phdr->cbAuxOffset  += diff;
-             phdr->cbSsOffset   += diff;
-             phdr->cbSsExtOffset += diff;
-             phdr->cbFdOffset   += diff;
-             phdr->cbRfdOffset  += diff;
-             phdr->cbExtOffset  += diff;
-           }
+         ptrdiff_t diff = new_shdr->sh_offset - old_shdr->sh_offset;
+         HDRR *phdr = (HDRR *) (new_shdr->sh_offset + new_base);
+
+         phdr->cbLineOffset += diff;
+         phdr->cbDnOffset += diff;
+         phdr->cbPdOffset += diff;
+         phdr->cbSymOffset += diff;
+         phdr->cbOptOffset += diff;
+         phdr->cbAuxOffset += diff;
+         phdr->cbSsOffset += diff;
+         phdr->cbSsExtOffset += diff;
+         phdr->cbFdOffset += diff;
+         phdr->cbRfdOffset += diff;
+         phdr->cbExtOffset += diff;
        }
-#endif /* _SYSTYPE_SYSV */
+#endif /* __alpha__ || _SYSTYPE_SYSV */
 
 #if __sgi
       /* Adjust  the HDRR offsets in .mdebug and copy the
@@ -1115,7 +522,8 @@ temacs:
         the ld bug that gets the line table in a hole in the
         elf file rather than in the .mdebug section proper.
         David Anderson. address@hidden  Jan 16,1994.  */
-      if (n == old_mdebug_index)
+      if (strcmp (old_section_names + new_shdr->sh_name, ".mdebug") == 0
+         && new_shdr->sh_offset - old_shdr->sh_offset != 0)
        {
 #define MDEBUGADJUST(__ct,__fileaddr)          \
   if (n_phdrr->__ct > 0)                       \
@@ -1123,9 +531,9 @@ temacs:
       n_phdrr->__fileaddr += movement;         \
     }
 
-         HDRR * o_phdrr = (HDRR *)((byte *)old_base + OLD_SECTION_H 
(n).sh_offset);
-         HDRR * n_phdrr = (HDRR *)((byte *)new_base + NEW_SECTION_H 
(nn).sh_offset);
-         unsigned movement = new_data2_size;
+         HDRR *o_phdrr = (HDRR *) ((byte *) old_base + old_shdr->sh_offset);
+         HDRR *n_phdrr = (HDRR *) ((byte *) new_base + new_shdr->sh_offset);
+         ptrdiff_t movement = new_shdr->sh_offset - old_shdr->sh_offset;
 
          MDEBUGADJUST (idnMax, cbDnOffset);
          MDEBUGADJUST (ipdMax, cbPdOffset);
@@ -1141,44 +549,16 @@ temacs:
             requires special handling.  */
          if (n_phdrr->cbLine > 0)
            {
-             if (o_phdrr->cbLineOffset > (OLD_SECTION_H (n).sh_offset
-                                          + OLD_SECTION_H (n).sh_size))
-               {
-                 /* line data is in a hole in elf. do special copy and adjust
-                    for this ld mistake.
-                    */
-                 n_phdrr->cbLineOffset += movement;
+             n_phdrr->cbLineOffset += movement;
 
-                 memcpy (n_phdrr->cbLineOffset + new_base,
-                         o_phdrr->cbLineOffset + old_base, n_phdrr->cbLine);
-               }
-             else
-               {
-                 /* somehow line data is in .mdebug as it is supposed to be.  
*/
-                 MDEBUGADJUST (cbLine, cbLineOffset);
-               }
+             if (o_phdrr->cbLineOffset > (old_shdr->sh_offset
+                                          + old_shdr->sh_size))
+               /* If not covered by section, it hasn't yet been copied.  */
+               memcpy (n_phdrr->cbLineOffset + new_base,
+                       o_phdrr->cbLineOffset + old_base, n_phdrr->cbLine);
            }
        }
 #endif /* __sgi */
-
-      /* If it is the symbol table, its st_shndx field needs to be patched.  */
-      if (NEW_SECTION_H (nn).sh_type == SHT_SYMTAB
-         || NEW_SECTION_H (nn).sh_type == SHT_DYNSYM)
-       {
-         ElfW (Shdr) *spt = &NEW_SECTION_H (nn);
-         ptrdiff_t num = spt->sh_size / spt->sh_entsize;
-         ElfW (Sym) * sym = (ElfW (Sym) *) (NEW_SECTION_H (nn).sh_offset +
-                                          new_base);
-         for (; num--; sym++)
-           {
-             if ((sym->st_shndx == SHN_UNDEF)
-                 || (sym->st_shndx == SHN_ABS)
-                 || (sym->st_shndx == SHN_COMMON))
-               continue;
-
-             PATCH_INDEX (sym->st_shndx);
-           }
-       }
     }
 
   /* Update the symbol values of _edata and _end.  */
@@ -1186,15 +566,16 @@ temacs:
     {
       byte *symnames;
       ElfW (Sym) *symp, *symendp;
+      ElfW (Shdr) *sym_shdr = &NEW_SECTION_H (n);
 
-      if (NEW_SECTION_H (n).sh_type != SHT_DYNSYM
-         && NEW_SECTION_H (n).sh_type != SHT_SYMTAB)
+      if (sym_shdr->sh_type != SHT_DYNSYM
+         && sym_shdr->sh_type != SHT_SYMTAB)
        continue;
 
       symnames = ((byte *) new_base
-                 + NEW_SECTION_H (NEW_SECTION_H (n).sh_link).sh_offset);
-      symp = (ElfW (Sym) *) (NEW_SECTION_H (n).sh_offset + new_base);
-      symendp = (ElfW (Sym) *) ((byte *)symp + NEW_SECTION_H (n).sh_size);
+                 + NEW_SECTION_H (sym_shdr->sh_link).sh_offset);
+      symp = (ElfW (Sym) *) (sym_shdr->sh_offset + new_base);
+      symendp = (ElfW (Sym) *) ((byte *) symp + sym_shdr->sh_size);
 
       for (; symp < symendp; symp ++)
        {
@@ -1218,39 +599,54 @@ temacs:
          if (strncmp ((char *) (symnames + symp->st_name),
                       "_OBJC_", sizeof ("_OBJC_") - 1) == 0)
            {
-             caddr_t old, new;
-
-             new = ((symp->st_value - NEW_SECTION_H (symp->st_shndx).sh_addr)
-                    + NEW_SECTION_H (symp->st_shndx).sh_offset + new_base);
-             /* "Unpatch" index.  */
-             nn = symp->st_shndx;
-             if (nn > old_bss_index)
-               nn--;
-             if (nn == old_bss_index)
-               memset (new, 0, symp->st_size);
-             else
+             ElfW (Shdr) *new_shdr = &NEW_SECTION_H (symp->st_shndx);
+             if (new_shdr->sh_type != SHT_NOBITS)
                {
-                 old = ((symp->st_value
-                         - NEW_SECTION_H (symp->st_shndx).sh_addr)
-                        + OLD_SECTION_H (nn).sh_offset + old_base);
-                 memcpy (new, old, symp->st_size);
+                 ElfW (Shdr) *old_shdr = &OLD_SECTION_H (symp->st_shndx);
+                 ptrdiff_t reladdr = symp->st_value - new_shdr->sh_addr;
+                 ptrdiff_t newoff = reladdr + new_shdr->sh_offset;
+
+                 if (old_shdr->sh_type == SHT_NOBITS)
+                   memset (new_base + newoff, 0, symp->st_size);
+                 else
+                   {
+                     ptrdiff_t oldoff = reladdr + old_shdr->sh_offset;
+                     memcpy (new_base + newoff, old_base + oldoff,
+                             symp->st_size);
+                   }
                }
            }
 #endif
        }
     }
 
-  /* This loop seeks out relocation sections for the data section, so
-     that it can undo relocations performed by the runtime linker.  */
+  /* Modify the names of sections we changed from SHT_NOBITS to
+     SHT_PROGBITS.  This is really just cosmetic, but some tools that
+     (wrongly) operate on section names rather than types might be
+     confused by a SHT_PROGBITS .bss section.  */
+  new_section_names = ((char *) new_base
+                      + NEW_SECTION_H (new_file_h->e_shstrndx).sh_offset);
   for (n = new_file_h->e_shnum; 0 < --n; )
     {
-      ElfW (Shdr) section = NEW_SECTION_H (n);
+      ElfW (Shdr) *old_shdr = &OLD_SECTION_H (n);
+      ElfW (Shdr) *new_shdr = &NEW_SECTION_H (n);
+
+      /* Replace the leading '.' with ','.  When .shstrtab is string
+        merged this will rename both .bss and .rela.bss to ,bss and
+        .rela,bss.  */
+      if (old_shdr->sh_type == SHT_NOBITS
+         && new_shdr->sh_type == SHT_PROGBITS)
+       *(new_section_names + new_shdr->sh_name) = ',';
+    }
 
-      /* Cause a compilation error if anyone uses n instead of nn below.  */
-      #define n ((void) 0);
-      n /* Prevent 'macro "n" is not used' warnings.  */
+  /* This loop seeks out relocation sections for the data section, so
+     that it can undo relocations performed by the runtime loader.  */
+  for (n = new_file_h->e_shnum; 0 < --n; )
+    {
+      ElfW (Shdr) *rel_shdr = &NEW_SECTION_H (n);
+      ElfW (Shdr) *shdr;
 
-      switch (section.sh_type)
+      switch (rel_shdr->sh_type)
        {
        default:
          break;
@@ -1259,44 +655,36 @@ temacs:
          /* This code handles two different size structs, but there should
             be no harm in that provided that r_offset is always the first
             member.  */
-         nn = section.sh_info;
-         if (!strcmp (old_section_names + NEW_SECTION_H (nn).sh_name, ".data")
-             || !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name),
-                         ".sdata")
-             || !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name),
-                         ".lit4")
-             || !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name),
-                         ".lit8")
+         shdr = &NEW_SECTION_H (rel_shdr->sh_info);
+         if (!strcmp (old_section_names + shdr->sh_name, ".data")
+             || !strcmp (old_section_names + shdr->sh_name, ".sdata")
+             || !strcmp (old_section_names + shdr->sh_name, ".lit4")
+             || !strcmp (old_section_names + shdr->sh_name, ".lit8")
 #ifdef IRIX6_5                 /* see above */
-             || !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name),
-                         ".got")
+             || !strcmp (old_section_names + shdr->sh_name, ".got")
 #endif
-             || !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name),
-                         ".sdata1")
-             || !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name),
-                         ".data1"))
+             || !strcmp (old_section_names + shdr->sh_name, ".sdata1")
+             || !strcmp (old_section_names + shdr->sh_name, ".data1"))
            {
-             ElfW (Addr) offset = (NEW_SECTION_H (nn).sh_addr
-                                  - NEW_SECTION_H (nn).sh_offset);
-             caddr_t reloc = old_base + section.sh_offset, end;
-             for (end = reloc + section.sh_size; reloc < end;
-                  reloc += section.sh_entsize)
+             ElfW (Addr) offset = shdr->sh_addr - shdr->sh_offset;
+             caddr_t reloc = old_base + rel_shdr->sh_offset, end;
+             for (end = reloc + rel_shdr->sh_size;
+                  reloc < end;
+                  reloc += rel_shdr->sh_entsize)
                {
                  ElfW (Addr) addr = ((ElfW (Rel) *) reloc)->r_offset - offset;
-#ifdef __alpha__
-                 /* The Alpha ELF binutils currently have a bug that
-                    sometimes results in relocs that contain all
-                    zeroes.  Work around this for now...  */
+                 /* Ignore R_*_NONE relocs.  */
                  if (((ElfW (Rel) *) reloc)->r_offset == 0)
                    continue;
-#endif
-                 memcpy (new_base + addr, old_base + addr, sizeof (ElfW 
(Addr)));
+                 /* Assume reloc applies to a word.
+                    ??? This is not always true, eg. TLS module/index
+                    pair in .got which occupies two words.  */
+                 memcpy (new_base + addr, old_base + addr,
+                         sizeof (ElfW (Addr)));
                }
            }
          break;
        }
-
-      #undef n
     }
 
   /* Write out new_file, and free the buffers.  */
diff --git a/src/w32fns.c b/src/w32fns.c
index d92352a..f3391cb 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -55,6 +55,7 @@ along with GNU Emacs.  If not, see 
<http://www.gnu.org/licenses/>.  */
 #include <commctrl.h>
 #include <commdlg.h>
 #include <shellapi.h>
+#include <shlwapi.h>
 #include <ctype.h>
 #include <winspool.h>
 #include <objbase.h>
@@ -8755,6 +8756,457 @@ Internal use only.  */)
   return menubar_in_use ? Qt : Qnil;
 }
 
+#if defined WINDOWSNT && !defined HAVE_DBUS
+
+/***********************************************************************
+                         Tray notifications
+ ***********************************************************************/
+/* A private struct declaration to avoid compile-time limits.  */
+typedef struct MY_NOTIFYICONDATAW {
+  DWORD cbSize;
+  HWND hWnd;
+  UINT uID;
+  UINT uFlags;
+  UINT uCallbackMessage;
+  HICON hIcon;
+  WCHAR szTip[128];
+  DWORD dwState;
+  DWORD dwStateMask;
+  WCHAR szInfo[256];
+  _ANONYMOUS_UNION union {
+    UINT uTimeout;
+    UINT uVersion;
+  } DUMMYUNIONNAME;
+  WCHAR szInfoTitle[64];
+  DWORD dwInfoFlags;
+  GUID guidItem;
+  HICON hBalloonIcon;
+} MY_NOTIFYICONDATAW;
+
+#define MYNOTIFYICONDATAW_V1_SIZE offsetof (MY_NOTIFYICONDATAW, szTip[64])
+#define MYNOTIFYICONDATAW_V2_SIZE offsetof (MY_NOTIFYICONDATAW, guidItem)
+#define MYNOTIFYICONDATAW_V3_SIZE offsetof (MY_NOTIFYICONDATAW, hBalloonIcon)
+#ifndef NIF_INFO
+# define NIF_INFO     0x00000010
+#endif
+#ifndef NIIF_NONE
+# define NIIF_NONE    0x00000000
+#endif
+#ifndef NIIF_INFO
+# define NIIF_INFO    0x00000001
+#endif
+#ifndef NIIF_WARNING
+# define NIIF_WARNING 0x00000002
+#endif
+#ifndef NIIF_ERROR
+# define NIIF_ERROR   0x00000003
+#endif
+
+
+#define EMACS_TRAY_NOTIFICATION_ID  42 /* arbitrary */
+#define EMACS_NOTIFICATION_MSG      (WM_APP + 1)
+
+enum NI_Severity {
+  Ni_None,
+  Ni_Info,
+  Ni_Warn,
+  Ni_Err
+};
+
+/* Report the version of a DLL given by its name.  The return value is
+   constructed using MAKEDLLVERULL.  */
+static ULONGLONG
+get_dll_version (const char *dll_name)
+{
+  ULONGLONG version = 0;
+  HINSTANCE hdll = LoadLibrary (dll_name);
+
+  if (hdll)
+    {
+      DLLGETVERSIONPROC pDllGetVersion
+       = (DLLGETVERSIONPROC) GetProcAddress (hdll, "DllGetVersion");
+
+      if (pDllGetVersion)
+       {
+         DLLVERSIONINFO dvi;
+         HRESULT result;
+
+         memset (&dvi, 0, sizeof(dvi));
+         dvi.cbSize = sizeof(dvi);
+         result = pDllGetVersion (&dvi);
+         if (SUCCEEDED (result))
+           version = MAKEDLLVERULL (dvi.dwMajorVersion, dvi.dwMinorVersion,
+                                    0, 0);
+       }
+      FreeLibrary (hdll);
+    }
+
+  return version;
+}
+
+/* Return the number of bytes in UTF-8 encoded string STR that
+   corresponds to at most LIM characters.  If STR ends before LIM
+   characters, return the number of bytes in STR including the
+   terminating null byte.  */
+static int
+utf8_mbslen_lim (const char *str, int lim)
+{
+  const char *p = str;
+  int mblen = 0, nchars = 0;
+
+  while (*p && nchars < lim)
+    {
+      int nbytes = CHAR_BYTES (*p);
+
+      mblen += nbytes;
+      nchars++;
+      p += nbytes;
+    }
+
+  if (!*p && nchars < lim)
+    mblen++;
+
+  return mblen;
+}
+
+/* Low-level subroutine to show tray notifications.  All strings are
+   supposed to be unibyte UTF-8 encoded by the caller.  */
+static EMACS_INT
+add_tray_notification (struct frame *f, const char *icon, const char *tip,
+                      enum NI_Severity severity, unsigned timeout,
+                      const char *title, const char *msg)
+{
+  EMACS_INT retval = EMACS_TRAY_NOTIFICATION_ID;
+
+  if (FRAME_W32_P (f))
+    {
+      MY_NOTIFYICONDATAW nidw;
+      ULONGLONG shell_dll_version = get_dll_version ("Shell32.dll");
+      wchar_t tipw[128], msgw[256], titlew[64];
+      int tiplen;
+
+      memset (&nidw, 0, sizeof(nidw));
+
+      /* MSDN says the full struct is supported since Vista, whose
+        Shell32.dll version is said to be 6.0.6.  But DllGetVersion
+        cannot report the 3rd field value, it reports "build number"
+        instead, which is something else.  So we use the Windows 7's
+        version 6.1 as cutoff, and Vista loses.  (Actually, the loss
+        is not a real one, since we don't expose the hBalloonIcon
+        member of the struct to Lisp.)  */
+      if (shell_dll_version >= MAKEDLLVERULL (6, 1, 0, 0)) /* >= Windows 7 */
+       nidw.cbSize = sizeof (nidw);
+      else if (shell_dll_version >= MAKEDLLVERULL (6, 0, 0, 0)) /* XP */
+       nidw.cbSize = MYNOTIFYICONDATAW_V3_SIZE;
+      else if (shell_dll_version >= MAKEDLLVERULL (5, 0, 0, 0)) /* W2K */
+       nidw.cbSize = MYNOTIFYICONDATAW_V2_SIZE;
+      else
+       nidw.cbSize = MYNOTIFYICONDATAW_V1_SIZE;                /* < W2K */
+      nidw.hWnd = FRAME_W32_WINDOW (f);
+      nidw.uID = EMACS_TRAY_NOTIFICATION_ID;
+      nidw.uFlags = NIF_MESSAGE | NIF_ICON | NIF_TIP | NIF_INFO;
+      nidw.uCallbackMessage = EMACS_NOTIFICATION_MSG;
+      if (!*icon)
+       nidw.hIcon = LoadIcon (hinst, EMACS_CLASS);
+      else
+       {
+         if (w32_unicode_filenames)
+           {
+             wchar_t icon_w[MAX_PATH];
+
+             if (filename_to_utf16 (icon, icon_w) != 0)
+               {
+                 errno = ENOENT;
+                 return -1;
+               }
+             nidw.hIcon = LoadImageW (NULL, icon_w, IMAGE_ICON, 0, 0,
+                                      LR_DEFAULTSIZE | LR_LOADFROMFILE);
+           }
+         else
+           {
+             char icon_a[MAX_PATH];
+
+             if (filename_to_ansi (icon, icon_a) != 0)
+               {
+                 errno = ENOENT;
+                 return -1;
+               }
+             nidw.hIcon = LoadImageA (NULL, icon_a, IMAGE_ICON, 0, 0,
+                                      LR_DEFAULTSIZE | LR_LOADFROMFILE);
+           }
+       }
+      if (!nidw.hIcon)
+       {
+         switch (GetLastError ())
+           {
+           case ERROR_FILE_NOT_FOUND:
+             errno = ENOENT;
+             break;
+           default:
+             errno = ENOMEM;
+             break;
+           }
+         return -1;
+       }
+
+      /* Windows 9X and NT4 support only 64 characters in the Tip,
+        later versions support up to 128.  */
+      if (nidw.cbSize == MYNOTIFYICONDATAW_V1_SIZE)
+       {
+         tiplen = pMultiByteToWideChar (CP_UTF8, MB_ERR_INVALID_CHARS,
+                                        tip, utf8_mbslen_lim (tip, 63),
+                                        tipw, 64);
+         if (tiplen >= 63)
+           tipw[63] = 0;
+       }
+      else
+       {
+         tiplen = pMultiByteToWideChar (CP_UTF8, MB_ERR_INVALID_CHARS,
+                                        tip, utf8_mbslen_lim (tip, 127),
+                                        tipw, 128);
+         if (tiplen >= 127)
+           tipw[127] = 0;
+       }
+      if (tiplen == 0)
+       {
+         errno = EINVAL;
+         retval = -1;
+         goto done;
+       }
+      wcscpy (nidw.szTip, tipw);
+
+      /* The rest of the structure is only supported since Windows 2000.  */
+      if (nidw.cbSize > MYNOTIFYICONDATAW_V1_SIZE)
+       {
+         int slen;
+
+         slen = pMultiByteToWideChar (CP_UTF8, MB_ERR_INVALID_CHARS,
+                                            msg, utf8_mbslen_lim (msg, 255),
+                                            msgw, 256);
+         if (slen >= 255)
+           msgw[255] = 0;
+         else if (slen == 0)
+           {
+             errno = EINVAL;
+             retval = -1;
+             goto done;
+           }
+         wcscpy (nidw.szInfo, msgw);
+         nidw.uTimeout = timeout;
+         slen = pMultiByteToWideChar (CP_UTF8, MB_ERR_INVALID_CHARS,
+                                      title, utf8_mbslen_lim (title, 63),
+                                      titlew, 64);
+         if (slen >= 63)
+           titlew[63] = 0;
+         else if (slen == 0)
+           {
+             errno = EINVAL;
+             retval = -1;
+             goto done;
+           }
+         wcscpy (nidw.szInfoTitle, titlew);
+
+         switch (severity)
+           {
+           case Ni_None:
+             nidw.dwInfoFlags = NIIF_NONE;
+             break;
+           case Ni_Info:
+           default:
+             nidw.dwInfoFlags = NIIF_INFO;
+             break;
+           case Ni_Warn:
+             nidw.dwInfoFlags = NIIF_WARNING;
+             break;
+           case Ni_Err:
+             nidw.dwInfoFlags = NIIF_ERROR;
+             break;
+           }
+       }
+
+      if (!Shell_NotifyIconW (NIM_ADD, (PNOTIFYICONDATAW)&nidw))
+       {
+         /* GetLastError returns meaningless results when
+            Shell_NotifyIcon fails.  */
+         DebPrint (("Shell_NotifyIcon ADD failed (err=%d)\n",
+                    GetLastError ()));
+         errno = EINVAL;
+         retval = -1;
+       }
+    done:
+      if (*icon && !DestroyIcon (nidw.hIcon))
+       DebPrint (("DestroyIcon failed (err=%d)\n", GetLastError ()));
+    }
+  return retval;
+}
+
+/* Low-level subroutine to remove a tray notification.  Note: we only
+   pass the minimum data about the notification: its ID and the handle
+   of the window to which it sends messages.  MSDN doesn't say this is
+   enough, but it works in practice.  This allows us to avoid keeping
+   the notification data around after we show the notification.  */
+static void
+delete_tray_notification (struct frame *f, int id)
+{
+  if (FRAME_W32_P (f))
+    {
+      MY_NOTIFYICONDATAW nidw;
+
+      memset (&nidw, 0, sizeof(nidw));
+      nidw.hWnd = FRAME_W32_WINDOW (f);
+      nidw.uID = id;
+
+      if (!Shell_NotifyIconW (NIM_DELETE, (PNOTIFYICONDATAW)&nidw))
+       {
+         /* GetLastError returns meaningless results when
+            Shell_NotifyIcon fails.  */
+         DebPrint (("Shell_NotifyIcon DELETE failed\n"));
+         errno = EINVAL;
+         return;
+       }
+    }
+  return;
+}
+
+DEFUN ("w32-notification-notify",
+       Fw32_notification_notify, Sw32_notification_notify,
+       0, MANY, 0,
+       doc: /* Display an MS-Windows tray notification as specified by PARAMS.
+
+Value is the integer unique ID of the notification that can be used
+to remove the notification using `w32-notification-close', which see.
+If the function fails, the return value is nil.
+
+Tray notifications, a.k.a. \"taskbar messages\", are messages that
+inform the user about events unrelated to the current user activity,
+such as a significant system event, by briefly displaying informative
+text in a balloon from an icon in the notification area of the taskbar.
+
+Parameters in PARAMS are specified as keyword/value pairs.  All the
+parameters are optional, but if no parameters are specified, the
+function will do nothing and return nil.
+
+The following parameters are supported:
+
+:icon ICON       -- Display ICON in the system tray.  If ICON is a string,
+                    it should specify a file name from which to load the
+                    icon; the specified file should be a .ico Windows icon
+                    file.  If ICON is not a string, or if this parameter
+                    is not specified, the standard Emacs icon will be used.
+
+:tip TIP         -- Use TIP as the tooltip for the notification.  If TIP
+                    is a string, this is the text of a tooltip that will
+                    be shown when the mouse pointer hovers over the tray
+                    icon added by the notification.  If TIP is not a
+                    string, or if this parameter is not specified, the
+                    default tooltip text is \"Emacs notification\".  The
+                    tooltip text can be up to 127 characters long (63
+                    on Windows versions before W2K).  Longer strings
+                    will be truncated.
+
+:level LEVEL     -- Notification severity level, one of `info',
+                    `warning', or `error'.  If given, the value
+                    determines the icon displayed to the left of the
+                    notification title, but only if the `:title'
+                    parameter (see below) is also specified and is a
+                    string.
+
+:title TITLE     -- The title of the notification.  If TITLE is a string,
+                    it is displayed in a larger font immediately above
+                    the body text.  The title text can be up to 63
+                    characters long; longer text will be truncated.
+
+:body BODY       -- The body of the notification.  If BODY is a string,
+                    it specifies the text of the notification message.
+                    Use embedded newlines to control how the text is
+                    broken into lines.  The body text can be up to 255
+                    characters long, and will be truncated if it's longer.
+
+Note that versions of Windows before W2K support only `:icon' and `:tip'.
+You can pass the other parameters, but they will be ignored on those
+old systems.
+
+There can be at most one active notification at any given time.  An
+active notification must be removed by calling `w32-notification-close'
+before a new one can be shown.
+
+usage: (w32-notification-notify &rest PARAMS)  */)
+  (ptrdiff_t nargs, Lisp_Object *args)
+{
+  struct frame *f = SELECTED_FRAME ();
+  Lisp_Object arg_plist, lres;
+  EMACS_INT retval;
+  char *icon, *tip, *title, *msg;
+  enum NI_Severity severity;
+  unsigned timeout;
+
+  if (nargs == 0)
+    return Qnil;
+
+  arg_plist = Flist (nargs, args);
+
+  /* Icon.  */
+  lres = Fplist_get (arg_plist, QCicon);
+  if (STRINGP (lres))
+    icon = SSDATA (ENCODE_FILE (Fexpand_file_name (lres, Qnil)));
+  else
+    icon = "";
+
+  /* Tip.  */
+  lres = Fplist_get (arg_plist, QCtip);
+  if (STRINGP (lres))
+    tip = SSDATA (code_convert_string_norecord (lres, Qutf_8, 1));
+  else
+    tip = "Emacs notification";
+
+  /* Severity.  */
+  lres = Fplist_get (arg_plist, QClevel);
+  if (NILP (lres))
+    severity = Ni_None;
+  else if (EQ (lres, Qinfo))
+    severity = Ni_Info;
+  else if (EQ (lres, Qwarning))
+    severity = Ni_Warn;
+  else if (EQ (lres, Qerror))
+    severity = Ni_Err;
+  else
+    severity = Ni_Info;
+
+  /* Title.  */
+  lres = Fplist_get (arg_plist, QCtitle);
+  if (STRINGP (lres))
+    title = SSDATA (code_convert_string_norecord (lres, Qutf_8, 1));
+  else
+    title = "";
+
+  /* Notification body text.  */
+  lres = Fplist_get (arg_plist, QCbody);
+  if (STRINGP (lres))
+    msg = SSDATA (code_convert_string_norecord (lres, Qutf_8, 1));
+  else
+    msg = "";
+
+  /* Do it!  */
+  retval = add_tray_notification (f, icon, tip, severity, timeout, title, msg);
+  return (retval < 0 ? Qnil : make_number (retval));
+}
+
+DEFUN ("w32-notification-close",
+       Fw32_notification_close, Sw32_notification_close,
+       1, 1, 0,
+       doc: /* Remove the MS-Windows tray notification specified by its ID.  
*/)
+  (Lisp_Object id)
+{
+  struct frame *f = SELECTED_FRAME ();
+
+  if (INTEGERP (id))
+    delete_tray_notification (f, XINT (id));
+
+  return Qnil;
+}
+
+#endif /* WINDOWSNT && !HAVE_DBUS */
+
 
 /***********************************************************************
                            Initialization
@@ -8828,6 +9280,15 @@ syms_of_w32fns (void)
   DEFSYM (Qframes, "frames");
   DEFSYM (Qtip_frame, "tip-frame");
   DEFSYM (Qunicode_sip, "unicode-sip");
+#if defined WINDOWSNT && !defined HAVE_DBUS
+  DEFSYM (QCicon, ":icon");
+  DEFSYM (QCtip, ":tip");
+  DEFSYM (QClevel, ":level");
+  DEFSYM (Qinfo, "info");
+  DEFSYM (Qwarning, "warning");
+  DEFSYM (QCtitle, ":title");
+  DEFSYM (QCbody, ":body");
+#endif
 
   /* Symbols used elsewhere, but only in MS-Windows-specific code.  */
   DEFSYM (Qgnutls_dll, "gnutls");
@@ -9161,6 +9622,10 @@ This variable has effect only on Windows Vista and 
later.  */);
   defsubr (&Sw32_window_exists_p);
   defsubr (&Sw32_battery_status);
   defsubr (&Sw32__menu_bar_in_use);
+#if defined WINDOWSNT && !defined HAVE_DBUS
+  defsubr (&Sw32_notification_notify);
+  defsubr (&Sw32_notification_close);
+#endif
 
 #ifdef WINDOWSNT
   defsubr (&Sfile_system_info);
diff --git a/src/w32proc.c b/src/w32proc.c
index 8a1e17e..a4e1496 100644
--- a/src/w32proc.c
+++ b/src/w32proc.c
@@ -3504,8 +3504,8 @@ get_lcid (const char *locale_name)
   return found_lcid;
 }
 
-#ifndef _NSLCMPERROR
-# define _NSLCMPERROR INT_MAX
+#ifndef _NLSCMPERROR
+# define _NLSCMPERROR INT_MAX
 #endif
 #ifndef LINGUISTIC_IGNORECASE
 # define LINGUISTIC_IGNORECASE  0x00000010
@@ -3546,7 +3546,7 @@ w32_compare_strings (const char *s1, const char *s2, char 
*locname,
              errno = EINVAL;
              /* This return value is compatible with wcscoll and
                 other MS CRT functions.  */
-             return _NSLCMPERROR;
+             return _NLSCMPERROR;
            }
        }
       else
@@ -3565,7 +3565,7 @@ w32_compare_strings (const char *s1, const char *s2, char 
*locname,
   else
     {
       errno = EINVAL;
-      return _NSLCMPERROR;
+      return _NLSCMPERROR;
     }
 
   needed = pMultiByteToWideChar (CP_UTF8, MB_ERR_INVALID_CHARS, s2, -1, NULL, 
0);
@@ -3579,7 +3579,7 @@ w32_compare_strings (const char *s1, const char *s2, char 
*locname,
     {
       SAFE_FREE ();
       errno = EINVAL;
-      return _NSLCMPERROR;
+      return _NLSCMPERROR;
     }
 
   if (locname)
@@ -3616,7 +3616,7 @@ w32_compare_strings (const char *s1, const char *s2, char 
*locname,
   if (!val)
     {
       errno = EINVAL;
-      return _NSLCMPERROR;
+      return _NLSCMPERROR;
     }
   return val - 2;
 }
diff --git a/src/w32term.c b/src/w32term.c
index 8317867..f764e25 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -5913,16 +5913,49 @@ x_calc_absolute_position (struct frame *f)
       top_bottom_borders_height = 32;
     }
 
+  /* With multiple monitors, we can legitimately get negative
+     coordinates (for monitors above or to the left of the primary
+     monitor).  Find the display origin to ensure negative positions
+     are computed correctly (Bug#21173).  */
+  int display_left = 0;
+  int display_top = 0;
+  if (flags & (XNegative | YNegative))
+    {
+      Lisp_Object list;
+
+      list = Fw32_display_monitor_attributes_list (Qnil);
+      while (CONSP (list))
+        {
+          Lisp_Object attributes = CAR(list);
+          Lisp_Object geometry;
+          Lisp_Object monitor_left, monitor_top;
+
+          list = CDR(list);
+
+          geometry = Fassoc (Qgeometry, attributes);
+          if (!NILP (geometry))
+            {
+              monitor_left = Fnth (make_number (1), geometry);
+              monitor_top  = Fnth (make_number (2), geometry);
+
+              display_left = min (display_left, XINT (monitor_left));
+              display_top  = min (display_top,  XINT (monitor_top));
+            }
+        }
+    }
+
   /* Treat negative positions as relative to the rightmost bottommost
      position that fits on the screen.  */
   if (flags & XNegative)
     f->left_pos = (x_display_pixel_width (FRAME_DISPLAY_INFO (f))
+                   + display_left
                   - FRAME_PIXEL_WIDTH (f)
                   + f->left_pos
                   - (left_right_borders_width - 1));
 
   if (flags & YNegative)
     f->top_pos = (x_display_pixel_height (FRAME_DISPLAY_INFO (f))
+                  + display_top
                  - FRAME_PIXEL_HEIGHT (f)
                  + f->top_pos
                  - (top_bottom_borders_height - 1));
diff --git a/src/window.c b/src/window.c
index 43517ab..bd71ca8 100644
--- a/src/window.c
+++ b/src/window.c
@@ -213,7 +213,7 @@ wset_update_mode_line (struct window *w)
 {
   /* If this window is the selected window on its frame, set the
      global variable update_mode_lines, so that x_consider_frame_title
-     will consider this frame's title for rtedisplay.  */
+     will consider this frame's title for redisplay.  */
   Lisp_Object fselected_window = XFRAME (WINDOW_FRAME (w))->selected_window;
 
   if (WINDOWP (fselected_window) && XWINDOW (fselected_window) == w)
diff --git a/src/window.h b/src/window.h
index eaff57e..135f5de 100644
--- a/src/window.h
+++ b/src/window.h
@@ -1056,6 +1056,7 @@ extern void wset_redisplay (struct window *w);
 extern void fset_redisplay (struct frame *f);
 extern void bset_redisplay (struct buffer *b);
 extern void bset_update_mode_line (struct buffer *b);
+extern void maybe_set_redisplay (Lisp_Object);
 /* Call this to tell redisplay to look for other windows than selected-window
    that need to be redisplayed.  Calling one of the *set_redisplay functions
    above already does it, so it's only needed in unusual cases.  */
diff --git a/src/xdisp.c b/src/xdisp.c
index 0923dfa..bc149b8 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -623,6 +623,17 @@ bset_update_mode_line (struct buffer *b)
   b->text->redisplay = true;
 }
 
+void
+maybe_set_redisplay (Lisp_Object symbol)
+{
+  if (HASH_TABLE_P (Vredisplay__variables)
+      && hash_lookup (XHASH_TABLE (Vredisplay__variables), symbol, NULL) >= 0)
+    {
+      bset_update_mode_line (current_buffer);
+      current_buffer->prevent_redisplay_optimizations_p = true;
+    }
+}
+
 #ifdef GLYPH_DEBUG
 
 /* True means print traces of redisplay if compiled with
@@ -11592,9 +11603,10 @@ x_consider_frame_title (Lisp_Object frame)
 {
   struct frame *f = XFRAME (frame);
 
-  if (FRAME_WINDOW_P (f)
-      || FRAME_MINIBUF_ONLY_P (f)
-      || f->explicit_name)
+  if ((FRAME_WINDOW_P (f)
+       || FRAME_MINIBUF_ONLY_P (f)
+       || f->explicit_name)
+      && NILP (Fframe_parameter (frame, Qtooltip)))
     {
       /* Do we have more than one visible frame on this X display?  */
       Lisp_Object tail, other_frame, fmt;
@@ -31703,6 +31715,10 @@ display table takes effect; in this case, Emacs does 
not consult
   DEFVAR_LISP ("redisplay--mode-lines-cause", Vredisplay__mode_lines_cause,
               doc: /*  */);
   Vredisplay__mode_lines_cause = Fmake_hash_table (0, NULL);
+
+  DEFVAR_LISP ("redisplay--variables", Vredisplay__variables,
+     doc: /* A hash-table of variables changing which triggers a thorough 
redisplay.  */);
+  Vredisplay__variables = Qnil;
 }
 
 
diff --git a/src/xfns.c b/src/xfns.c
index db87fcc..9d90b7b 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -181,23 +181,38 @@ x_real_pos_and_offsets (struct frame *f,
                         int *yptr,
                         int *outer_border)
 {
-  int win_x, win_y, outer_x IF_LINT (= 0), outer_y IF_LINT (= 0);
+  int win_x = 0, win_y = 0, outer_x = 0, outer_y = 0;
   int real_x = 0, real_y = 0;
   bool had_errors = false;
   Window win = f->output_data.x->parent_desc;
+  struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
+  long max_len = 400;
+  Atom target_type = XA_CARDINAL;
+  unsigned int ow = 0, oh = 0;
+  unsigned int fw = 0, fh = 0;
+  unsigned int bw = 0;
+  /* We resort to XCB if possible because there are several X calls
+     here which require responses from the server but do not have data
+     dependencies between them.  Using XCB lets us pipeline requests,
+     whereas with Xlib we must wait for each answer before sending the
+     next request.
+
+     For a non-local display, the round-trip time could be a few tens
+     of milliseconds, depending on the network distance.  It doesn't
+     take a lot of those to add up to a noticeable hesitation in
+     responding to user actions.  */
+#ifdef USE_XCB
+  xcb_connection_t *xcb_conn = dpyinfo->xcb_connection;
+  xcb_get_property_cookie_t prop_cookie;
+  xcb_get_geometry_cookie_t outer_geom_cookie;
+  bool sent_requests = false;
+#else
   Atom actual_type;
   unsigned long actual_size, bytes_remaining;
   int rc, actual_format;
-  struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
-  long max_len = 400;
   Display *dpy = FRAME_X_DISPLAY (f);
   unsigned char *tmp_data = NULL;
-  Atom target_type = XA_CARDINAL;
-  unsigned int ow IF_LINT (= 0), oh IF_LINT (= 0);
-
-  block_input ();
-
-  x_catch_errors (dpy);
+#endif
 
   if (x_pixels_diff) *x_pixels_diff = 0;
   if (y_pixels_diff) *y_pixels_diff = 0;
@@ -212,6 +227,13 @@ x_real_pos_and_offsets (struct frame *f,
   if (win == dpyinfo->root_window)
     win = FRAME_OUTER_WINDOW (f);
 
+  block_input ();
+
+#ifndef USE_XCB
+  /* If we're using XCB, all errors are checked for on each call.  */
+  x_catch_errors (dpy);
+#endif
+
   /* This loop traverses up the containment tree until we hit the root
      window.  Window managers may intersect many windows between our window
      and the root window.  The window we find just before the root window
@@ -219,20 +241,37 @@ x_real_pos_and_offsets (struct frame *f,
   for (;;)
     {
       Window wm_window, rootw;
+
+#ifdef USE_XCB
+      xcb_query_tree_cookie_t query_tree_cookie;
+      xcb_query_tree_reply_t *query_tree;
+
+      query_tree_cookie = xcb_query_tree (xcb_conn, win);
+      query_tree = xcb_query_tree_reply (xcb_conn, query_tree_cookie, NULL);
+      if (query_tree == NULL)
+       had_errors = true;
+      else
+       {
+         wm_window = query_tree->parent;
+         rootw = query_tree->root;
+         free (query_tree);
+       }
+#else
       Window *tmp_children;
       unsigned int tmp_nchildren;
       int success;
 
-      success = XQueryTree (FRAME_X_DISPLAY (f), win, &rootw,
+      success = XQueryTree (dpy, win, &rootw,
                            &wm_window, &tmp_children, &tmp_nchildren);
 
-      had_errors = x_had_errors_p (FRAME_X_DISPLAY (f));
+      had_errors = x_had_errors_p (dpy);
 
       /* Don't free tmp_children if XQueryTree failed.  */
       if (! success)
        break;
 
       XFree (tmp_children);
+#endif
 
       if (wm_window == rootw || had_errors)
         break;
@@ -242,15 +281,74 @@ x_real_pos_and_offsets (struct frame *f,
 
   if (! had_errors)
     {
-      unsigned int bw, ign;
+#ifdef USE_XCB
+      xcb_get_geometry_cookie_t geom_cookie;
+      xcb_translate_coordinates_cookie_t trans_cookie;
+      xcb_translate_coordinates_cookie_t outer_trans_cookie;
+
+      xcb_translate_coordinates_reply_t *trans;
+      xcb_get_geometry_reply_t *geom;
+#else
       Window child, rootw;
+      unsigned int ign;
+#endif
 
-      /* Get the real coordinates for the WM window upper left corner */
-      XGetGeometry (FRAME_X_DISPLAY (f), win,
-                    &rootw, &real_x, &real_y, &ow, &oh, &bw, &ign);
+#ifdef USE_XCB
+      /* Fire off the requests that don't have data dependencies.
+
+         Once we've done this, we must collect the results for each
+         one before returning, even if other errors are detected,
+         making the other responses moot.  */
+      geom_cookie = xcb_get_geometry (xcb_conn, win);
+
+      trans_cookie =
+        xcb_translate_coordinates (xcb_conn,
+                                   /* From-window, to-window.  */
+                                   FRAME_DISPLAY_INFO (f)->root_window,
+                                   FRAME_X_WINDOW (f),
+
+                                   /* From-position.  */
+                                   0, 0);
+      if (FRAME_X_WINDOW (f) != FRAME_OUTER_WINDOW (f))
+        outer_trans_cookie =
+          xcb_translate_coordinates (xcb_conn,
+                                     /* From-window, to-window.  */
+                                     FRAME_DISPLAY_INFO (f)->root_window,
+                                     FRAME_OUTER_WINDOW (f),
+
+                                     /* From-position.  */
+                                     0, 0);
+      if (right_offset_x || bottom_offset_y)
+       outer_geom_cookie = xcb_get_geometry (xcb_conn,
+                                             FRAME_OUTER_WINDOW (f));
+
+      if (dpyinfo->root_window == f->output_data.x->parent_desc)
+       /* Try _NET_FRAME_EXTENTS if our parent is the root window.  */
+       prop_cookie = xcb_get_property (xcb_conn, 0, win,
+                                       dpyinfo->Xatom_net_frame_extents,
+                                       target_type, 0, max_len);
+
+      sent_requests = true;
+#endif
 
-      if (outer_border)
-        *outer_border = bw;
+      /* Get the real coordinates for the WM window upper left corner */
+#ifdef USE_XCB
+      geom = xcb_get_geometry_reply (xcb_conn, geom_cookie, NULL);
+      if (geom)
+       {
+         real_x = geom->x;
+         real_y = geom->y;
+         ow = geom->width;
+         oh = geom->height;
+         bw = geom->border_width;
+         free (geom);
+       }
+      else
+       had_errors = true;
+#else
+      XGetGeometry (dpy, win,
+                   &rootw, &real_x, &real_y, &ow, &oh, &bw, &ign);
+#endif
 
       /* Translate real coordinates to coordinates relative to our
          window.  For our window, the upper left corner is 0, 0.
@@ -261,18 +359,38 @@ x_real_pos_and_offsets (struct frame *f,
          |      title                |
          | -----------------         v y
          | |  our window
-      */
-      XTranslateCoordinates (FRAME_X_DISPLAY (f),
+
+         Since we don't care about the child window corresponding to
+         the actual coordinates, we can send zero to get the offsets
+         and compute the resulting coordinates below.  This reduces
+         the data dependencies between calls and lets us pipeline the
+         requests better in the XCB case.  */
+#ifdef USE_XCB
+      trans = xcb_translate_coordinates_reply (xcb_conn, trans_cookie, NULL);
+      if (trans)
+       {
+         win_x = trans->dst_x;
+         win_y = trans->dst_y;
+         free (trans);
+       }
+      else
+       had_errors = true;
+#else
+      XTranslateCoordinates (dpy,
 
                             /* From-window, to-window.  */
                             FRAME_DISPLAY_INFO (f)->root_window,
                              FRAME_X_WINDOW (f),
 
                             /* From-position, to-position.  */
-                             real_x, real_y, &win_x, &win_y,
+                             0, 0, &win_x, &win_y,
 
                             /* Child of win.  */
                             &child);
+#endif
+
+      win_x += real_x;
+      win_y += real_y;
 
       if (FRAME_X_WINDOW (f) == FRAME_OUTER_WINDOW (f))
        {
@@ -281,25 +399,72 @@ x_real_pos_and_offsets (struct frame *f,
        }
       else
         {
-          XTranslateCoordinates (FRAME_X_DISPLAY (f),
+#ifdef USE_XCB
+          xcb_translate_coordinates_reply_t *outer_trans;
+
+          outer_trans = xcb_translate_coordinates_reply (xcb_conn,
+                                                         outer_trans_cookie,
+                                                         NULL);
+          if (outer_trans)
+            {
+              outer_x = outer_trans->dst_x;
+              outer_y = outer_trans->dst_y;
+              free (outer_trans);
+            }
+          else
+           had_errors = true;
+#else
+          XTranslateCoordinates (dpy,
 
                                  /* From-window, to-window.  */
                                  FRAME_DISPLAY_INFO (f)->root_window,
                                  FRAME_OUTER_WINDOW (f),
 
                                  /* From-position, to-position.  */
-                                 real_x, real_y, &outer_x, &outer_y,
+                                 0, 0, &outer_x, &outer_y,
 
                                  /* Child of win.  */
                                  &child);
+#endif
+
+         outer_x += real_x;
+         outer_y += real_y;
        }
 
-      had_errors = x_had_errors_p (FRAME_X_DISPLAY (f));
+#ifndef USE_XCB
+      had_errors = x_had_errors_p (dpy);
+#endif
     }
 
-  if (!had_errors && dpyinfo->root_window == f->output_data.x->parent_desc)
+  if (dpyinfo->root_window == f->output_data.x->parent_desc)
     {
       /* Try _NET_FRAME_EXTENTS if our parent is the root window.  */
+#ifdef USE_XCB
+      /* Make sure we didn't get an X error early and skip sending the
+         request.  */
+      if (sent_requests)
+        {
+          xcb_get_property_reply_t *prop;
+
+          prop = xcb_get_property_reply (xcb_conn, prop_cookie, NULL);
+          if (prop)
+            {
+              if (prop->type == target_type
+                  && xcb_get_property_value_length (prop) == 4
+                  && prop->format == 32)
+                {
+                  long *fe = xcb_get_property_value (prop);
+
+                  outer_x = -fe[0];
+                  outer_y = -fe[2];
+                  real_x -= fe[0];
+                  real_y -= fe[2];
+                }
+              free (prop);
+            }
+          /* Xlib version doesn't set had_errors here.  Intentional or bug?  */
+        }
+#else
       rc = XGetWindowProperty (dpy, win, dpyinfo->Xatom_net_frame_extents,
                                0, max_len, False, target_type,
                                &actual_type, &actual_format, &actual_size,
@@ -317,9 +482,42 @@ x_real_pos_and_offsets (struct frame *f,
         }
 
       if (tmp_data) XFree (tmp_data);
+#endif
+    }
+
+  if (right_offset_x || bottom_offset_y)
+    {
+#ifdef USE_XCB
+      /* Make sure we didn't get an X error early and skip sending the
+         request.  */
+      if (sent_requests)
+        {
+          xcb_get_geometry_reply_t *outer_geom;
+
+          outer_geom = xcb_get_geometry_reply (xcb_conn, outer_geom_cookie,
+                                               NULL);
+          if (outer_geom)
+            {
+              fw = outer_geom->width;
+              fh = outer_geom->height;
+              free (outer_geom);
+            }
+          else
+           had_errors = true;
+        }
+#else
+      int xy_ign;
+      unsigned int ign;
+      Window rootw;
+
+      XGetGeometry (dpy, FRAME_OUTER_WINDOW (f),
+                   &rootw, &xy_ign, &xy_ign, &fw, &fh, &ign, &ign);
+#endif
     }
 
+#ifndef USE_XCB
   x_uncatch_errors ();
+#endif
 
   unblock_input ();
 
@@ -334,17 +532,10 @@ x_real_pos_and_offsets (struct frame *f,
   if (xptr) *xptr = real_x;
   if (yptr) *yptr = real_y;
 
-  if (right_offset_x || bottom_offset_y)
-    {
-      int xy_ign;
-      unsigned int ign, fw, fh;
-      Window rootw;
+  if (outer_border) *outer_border = bw;
 
-      XGetGeometry (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
-                   &rootw, &xy_ign, &xy_ign, &fw, &fh, &ign, &ign);
-      if (right_offset_x) *right_offset_x = ow - fw + outer_x;
-      if (bottom_offset_y) *bottom_offset_y = oh - fh + outer_y;
-    }
+  if (right_offset_x) *right_offset_x = ow - fw + outer_x;
+  if (bottom_offset_y) *bottom_offset_y = oh - fh + outer_y;
 }
 
 /* Store the screen positions of frame F into XPTR and YPTR.
@@ -6368,11 +6559,12 @@ present and mapped to the usual X keysyms.  */)
 
 #ifdef USE_CAIRO
 DEFUN ("x-export-frames", Fx_export_frames, Sx_export_frames, 0, 2, 0,
-       doc: /* XXX Experimental.  Return image data of FRAMES in TYPE format.
+       doc: /* Return image data of FRAMES in TYPE format.
 FRAMES should be nil (the selected frame), a frame, or a list of
 frames (each of which corresponds to one page).  Optional arg TYPE
-should be either `pdf' (default), `png', `ps', or `svg'.  Supported
-types are determined by the compile-time configuration of cairo.  */)
+should be either `pdf' (default), `png', `postscript', or `svg'.
+Supported types are determined by the compile-time configuration of
+cairo.  */)
      (Lisp_Object frames, Lisp_Object type)
 {
   Lisp_Object result, rest, tmp;
@@ -6399,12 +6591,12 @@ types are determined by the compile-time configuration 
of cairo.  */)
   frames = Fnreverse (tmp);
 
 #ifdef CAIRO_HAS_PDF_SURFACE
-  if (NILP (type) || EQ (type, intern ("pdf"))) /* XXX: Qpdf */
+  if (NILP (type) || EQ (type, Qpdf))
     surface_type = CAIRO_SURFACE_TYPE_PDF;
   else
 #endif
 #ifdef CAIRO_HAS_PNG_FUNCTIONS
-  if (EQ (type, intern ("png")))
+  if (EQ (type, Qpng))
     {
       if (!NILP (XCDR (frames)))
        error ("PNG export cannot handle multiple frames.");
@@ -6413,12 +6605,12 @@ types are determined by the compile-time configuration 
of cairo.  */)
   else
 #endif
 #ifdef CAIRO_HAS_PS_SURFACE
-  if (EQ (type, intern ("ps")))
+  if (EQ (type, Qpostscript))
     surface_type = CAIRO_SURFACE_TYPE_PS;
   else
 #endif
 #ifdef CAIRO_HAS_SVG_SURFACE
-  if (EQ (type, intern ("svg")))
+  if (EQ (type, Qsvg))
     {
       /* For now, we stick to SVG 1.1.  */
       if (!NILP (XCDR (frames)))
@@ -6572,6 +6764,8 @@ syms_of_xfns (void)
   DEFSYM (Qmono, "mono");
 
 #ifdef USE_CAIRO
+  DEFSYM (Qpdf, "pdf");
+
   DEFSYM (Qorientation, "orientation");
   DEFSYM (Qtop_margin, "top-margin");
   DEFSYM (Qbottom_margin, "bottom-margin");
diff --git a/src/xrdb.c b/src/xrdb.c
index ce6e7d2..10bc769 100644
--- a/src/xrdb.c
+++ b/src/xrdb.c
@@ -177,12 +177,8 @@ magic_db (const char *string, ptrdiff_t string_len, const 
char *class,
 
       /* Do we have room for this component followed by a '\0'?  */
       if (path_size - path_len <= next_len)
-       {
-         if (min (PTRDIFF_MAX, SIZE_MAX) / 2 - 1 - path_len < next_len)
-           memory_full (SIZE_MAX);
-         path_size = (path_len + next_len + 1) * 2;
-         path = xrealloc (path, path_size);
-       }
+       path = xpalloc (path, &path_size, path_len - path_size + next_len + 1,
+                       -1, sizeof *path);
 
       memcpy (path + path_len, next, next_len);
       path_len += next_len;
diff --git a/src/xselect.c b/src/xselect.c
index 9d178a5..41bd2bc 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -2330,10 +2330,11 @@ x_property_data_to_lisp (struct frame *f, const 
unsigned char *data,
                         Atom type, int format, unsigned long size)
 {
   ptrdiff_t format_bytes = format >> 3;
-  if (PTRDIFF_MAX / format_bytes < size)
+  ptrdiff_t data_bytes;
+  if (INT_MULTIPLY_WRAPV (size, format_bytes, &data_bytes))
     memory_full (SIZE_MAX);
   return selection_data_to_lisp_data (FRAME_DISPLAY_INFO (f), data,
-                                     size * format_bytes, type, format);
+                                     data_bytes, type, format);
 }
 
 DEFUN ("x-get-atom-name", Fx_get_atom_name,
diff --git a/src/xsmfns.c b/src/xsmfns.c
index b84f2ac..8c4a6d3 100644
--- a/src/xsmfns.c
+++ b/src/xsmfns.c
@@ -223,9 +223,8 @@ smc_save_yourself_CB (SmcConn smcConn,
   props[props_idx]->name = xstrdup (SmRestartCommand);
   props[props_idx]->type = xstrdup (SmLISTofARRAY8);
   /* /path/to/emacs, --smid=xxx --no-splash --chdir=dir ... */
-  if (INT_MAX - 3 < initial_argc)
+  if (INT_ADD_WRAPV (initial_argc, 3, &i))
     memory_full (SIZE_MAX);
-  i = 3 + initial_argc;
   props[props_idx]->num_vals = i;
   vp = xnmalloc (i, sizeof *vp);
   props[props_idx]->vals = vp;
diff --git a/src/xterm.c b/src/xterm.c
index 000e1f8..653593b 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -10110,20 +10110,45 @@ get_current_wm_state (struct frame *f,
                       int *size_state,
                       bool *sticky)
 {
-  Atom actual_type;
-  unsigned long actual_size, bytes_remaining;
-  int i, rc, actual_format;
+  unsigned long actual_size;
+  int i;
   bool is_hidden = false;
   struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
   long max_len = 65536;
-  Display *dpy = FRAME_X_DISPLAY (f);
   unsigned char *tmp_data = NULL;
   Atom target_type = XA_ATOM;
+  /* If XCB is available, we can avoid three XSync calls.  */
+#ifdef USE_XCB
+  xcb_get_property_cookie_t prop_cookie;
+  xcb_get_property_reply_t *prop;
+#else
+  Display *dpy = FRAME_X_DISPLAY (f);
+  unsigned long bytes_remaining;
+  int rc, actual_format;
+  Atom actual_type;
+#endif
 
   *sticky = false;
   *size_state = FULLSCREEN_NONE;
 
   block_input ();
+
+#ifdef USE_XCB
+  prop_cookie = xcb_get_property (dpyinfo->xcb_connection, 0, window,
+                                  dpyinfo->Xatom_net_wm_state,
+                                  target_type, 0, max_len);
+  prop = xcb_get_property_reply (dpyinfo->xcb_connection, prop_cookie, NULL);
+  if (prop && prop->type == target_type)
+    {
+      tmp_data = xcb_get_property_value (prop);
+      actual_size = xcb_get_property_value_length (prop);
+    }
+  else
+    {
+      actual_size = 0;
+      is_hidden = FRAME_ICONIFIED_P (f);
+    }
+#else
   x_catch_errors (dpy);
   rc = XGetWindowProperty (dpy, window, dpyinfo->Xatom_net_wm_state,
                            0, max_len, False, target_type,
@@ -10132,13 +10157,12 @@ get_current_wm_state (struct frame *f,
 
   if (rc != Success || actual_type != target_type || x_had_errors_p (dpy))
     {
-      if (tmp_data) XFree (tmp_data);
-      x_uncatch_errors ();
-      unblock_input ();
-      return !FRAME_ICONIFIED_P (f);
+      actual_size = 0;
+      is_hidden = FRAME_ICONIFIED_P (f);
     }
 
   x_uncatch_errors ();
+#endif
 
   for (i = 0; i < actual_size; ++i)
     {
@@ -10165,7 +10189,12 @@ get_current_wm_state (struct frame *f,
         *sticky = true;
     }
 
+#ifdef USE_XCB
+  free (prop);
+#else
   if (tmp_data) XFree (tmp_data);
+#endif
+
   unblock_input ();
   return ! is_hidden;
 }
@@ -11787,7 +11816,9 @@ x_term_init (Lisp_Object display_name, char 
*xrm_option, char *resource_name)
   struct terminal *terminal;
   struct x_display_info *dpyinfo;
   XrmDatabase xrdb;
-  ptrdiff_t lim;
+#ifdef USE_XCB
+  xcb_connection_t *xcb_conn;
+#endif
 
   block_input ();
 
@@ -11926,6 +11957,25 @@ x_term_init (Lisp_Object display_name, char 
*xrm_option, char *resource_name)
       return 0;
     }
 
+#ifdef USE_XCB
+  xcb_conn = XGetXCBConnection (dpy);
+  if (xcb_conn == 0)
+    {
+#ifdef USE_GTK
+      xg_display_close (dpy);
+#else
+#ifdef USE_X_TOOLKIT
+      XtCloseDisplay (dpy);
+#else
+      XCloseDisplay (dpy);
+#endif
+#endif /* ! USE_GTK */
+
+      unblock_input ();
+      return 0;
+    }
+#endif
+
   /* We have definitely succeeded.  Record the new connection.  */
 
   dpyinfo = xzalloc (sizeof *dpyinfo);
@@ -11976,6 +12026,13 @@ x_term_init (Lisp_Object display_name, char 
*xrm_option, char *resource_name)
   dpyinfo->name_list_element = Fcons (display_name, Qnil);
   dpyinfo->display = dpy;
   dpyinfo->connection = ConnectionNumber (dpyinfo->display);
+#ifdef USE_XCB
+  dpyinfo->xcb_connection = xcb_conn;
+#endif
+
+  /* http://lists.gnu.org/archive/html/emacs-devel/2015-11/msg00194.html  */
+  dpyinfo->smallest_font_height = 1;
+  dpyinfo->smallest_char_width = 1;
 
   /* Set the name of the terminal. */
   terminal->name = xlispstrdup (display_name);
@@ -11984,13 +12041,13 @@ x_term_init (Lisp_Object display_name, char 
*xrm_option, char *resource_name)
   XSetAfterFunction (x_current_display, x_trace_wire);
 #endif
 
-  lim = min (PTRDIFF_MAX, SIZE_MAX) - sizeof "@";
   Lisp_Object system_name = Fsystem_name ();
-  if (lim - SBYTES (Vinvocation_name) < SBYTES (system_name))
+  ptrdiff_t nbytes;
+  if (INT_ADD_WRAPV (SBYTES (Vinvocation_name), SBYTES (system_name) + 2,
+                    &nbytes))
     memory_full (SIZE_MAX);
   dpyinfo->x_id = ++x_display_id;
-  dpyinfo->x_id_name = xmalloc (SBYTES (Vinvocation_name)
-                               + SBYTES (system_name) + 2);
+  dpyinfo->x_id_name = xmalloc (nbytes);
   char *nametail = lispstpcpy (dpyinfo->x_id_name, Vinvocation_name);
   *nametail++ = '@';
   lispstpcpy (nametail, system_name);
diff --git a/src/xterm.h b/src/xterm.h
index f7d2803..192839b 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -87,6 +87,10 @@ typedef GtkWidget *xt_or_gtk_widget;
 #include <X11/Xlocale.h>
 #endif
 
+#ifdef USE_XCB
+#include <X11/Xlib-xcb.h>
+#endif
+
 #include "dispextern.h"
 #include "termhooks.h"
 
@@ -458,6 +462,10 @@ struct x_display_info
 #ifdef USE_CAIRO
   XExtCodes *ext_codes;
 #endif
+
+#ifdef USE_XCB
+  xcb_connection_t *xcb_connection;
+#endif
 };
 
 #ifdef HAVE_X_I18N
diff --git a/test/automated/abbrev-tests.el b/test/automated/abbrev-tests.el
new file mode 100644
index 0000000..d08e026
--- /dev/null
+++ b/test/automated/abbrev-tests.el
@@ -0,0 +1,43 @@
+;;; abbrev-tests.el --- Test suite for abbrevs.
+
+;; Copyright (C) 2015 Free Software Foundation, Inc.
+
+;; Author: Eli Zaretskii <address@hidden>
+;; Keywords: abbrevs
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Code:
+
+(require 'ert)
+(require 'abbrev)
+
+(ert-deftest copy-abbrev-table-test ()
+  (defvar foo-abbrev-table nil)         ; Avoid compiler warning
+  (define-abbrev-table 'foo-abbrev-table
+    '())
+  (should (abbrev-table-p foo-abbrev-table))
+  ;; Bug 21828
+  (let ((new-foo-abbrev-table
+         (condition-case nil
+             (copy-abbrev-table foo-abbrev-table)
+           (error nil))))
+    (should (abbrev-table-p new-foo-abbrev-table)))
+  (should-not (string-equal (buffer-name) "*Backtrace*")))
+
+(provide 'abbrev-tests)
+
+;;; abbrev-tests.el ends here
diff --git a/test/automated/auto-revert-tests.el 
b/test/automated/auto-revert-tests.el
index 7cabc5c..2745f10 100644
--- a/test/automated/auto-revert-tests.el
+++ b/test/automated/auto-revert-tests.el
@@ -89,7 +89,71 @@
         (kill-buffer buf))
       (ignore-errors (delete-file tmpfile)))))
 
-(ert-deftest auto-revert-test01-auto-revert-tail-mode ()
+;; This is inspired by Bug#21841.
+(ert-deftest auto-revert-test01-auto-revert-several-files ()
+  "Check autorevert for several files at once."
+  (skip-unless (executable-find "cp"))
+
+  (let* ((cp (executable-find "cp"))
+         (tmpdir1 (make-temp-file "auto-revert-test" 'dir))
+         (tmpdir2 (make-temp-file "auto-revert-test" 'dir))
+         (tmpfile1
+          (make-temp-file (expand-file-name "auto-revert-test" tmpdir1)))
+         (tmpfile2
+          (make-temp-file (expand-file-name "auto-revert-test" tmpdir1)))
+         buf1 buf2)
+    (unwind-protect
+       (progn
+          (with-current-buffer (get-buffer-create "*Messages*")
+            (narrow-to-region (point-max) (point-max)))
+         (write-region "any text" nil tmpfile1 nil 'no-message)
+         (setq buf1 (find-file-noselect tmpfile1))
+         (write-region "any text" nil tmpfile2 nil 'no-message)
+         (setq buf2 (find-file-noselect tmpfile2))
+
+          (dolist (buf (list buf1 buf2))
+            (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 files.  We wait for a second, in order to have
+          ;; another timestamp.
+          (sleep-for 1)
+          (write-region
+           "another text" nil
+           (expand-file-name (file-name-nondirectory tmpfile1) tmpdir2)
+           nil 'no-message)
+          (write-region
+           "another text" nil
+           (expand-file-name (file-name-nondirectory tmpfile2) tmpdir2)
+           nil 'no-message)
+          ;;(copy-directory tmpdir2 tmpdir1 nil 'copy-contents)
+          ;; Strange, that `copy-directory' does not work as expected.
+          ;; The following shell command is not portable on all
+          ;; platforms, unfortunately.
+          (shell-command (format "%s -f %s/* %s" cp tmpdir2 tmpdir1))
+
+          ;; Check, that the buffers have been reverted.
+          (dolist (buf (list buf1 buf2))
+            (with-current-buffer buf
+              (auto-revert--wait-for-revert buf)
+              (should (string-match "another text" (buffer-string))))))
+
+      ;; Exit.
+      (with-current-buffer "*Messages*" (widen))
+      (ignore-errors
+        (dolist (buf (list buf1 buf2))
+          (with-current-buffer buf (set-buffer-modified-p nil))
+          (kill-buffer buf)))
+      (ignore-errors (delete-directory tmpdir1 'recursive))
+      (ignore-errors (delete-directory tmpdir2 'recursive)))))
+
+(ert-deftest auto-revert-test02-auto-revert-tail-mode ()
   "Check autorevert tail mode."
   ;; `auto-revert-buffers' runs every 5".  And we must wait, until the
   ;; file has been reverted.
@@ -127,7 +191,7 @@
       (ignore-errors (kill-buffer buf))
       (ignore-errors (delete-file tmpfile)))))
 
-(ert-deftest auto-revert-test02-auto-revert-mode-dired ()
+(ert-deftest auto-revert-test03-auto-revert-mode-dired ()
   "Check autorevert for dired."
   ;; `auto-revert-buffers' runs every 5".  And we must wait, until the
   ;; file has been reverted.
diff --git a/test/automated/buffer-tests.el b/test/automated/buffer-tests.el
new file mode 100644
index 0000000..bb3c92d
--- /dev/null
+++ b/test/automated/buffer-tests.el
@@ -0,0 +1,48 @@
+;;; buffer-tests.el --- tests for buffer.c functions -*- lexical-binding: t -*-
+
+;; Copyright (C) 2015 Free Software Foundation, Inc.
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Code:
+
+(require 'ert)
+
+(ert-deftest overlay-modification-hooks-message-other-buf ()
+  "Test for bug#21824.
+After a modification-hook has been run and there is an overlay in
+the *Messages* buffer, the message coalescing [2 times] wrongly
+runs the modification-hook of the overlay in the 1st buffer, but
+with parameters from the *Messages* buffer modification."
+  (let ((buf nil)
+        (msg-ov nil))
+    (with-temp-buffer
+      (insert "123")
+      (overlay-put (make-overlay 1 3)
+                   'modification-hooks
+                   (list (lambda (&rest _)
+                           (setq buf (current-buffer)))))
+      (goto-char 2)
+      (insert "x")
+      (unwind-protect
+          (progn
+            (setq msg-ov (make-overlay 1 1 (get-buffer-create "*Messages*")))
+            (message "a message")
+            (message "a message")
+            (should (eq buf (current-buffer))))
+        (when msg-ov (delete-overlay msg-ov))))))
+
+;;; buffer-tests.el ends here
diff --git a/test/automated/character-fold-tests.el 
b/test/automated/character-fold-tests.el
new file mode 100644
index 0000000..2b1a15c
--- /dev/null
+++ b/test/automated/character-fold-tests.el
@@ -0,0 +1,58 @@
+;;; character-fold-tests.el --- Tests for character-fold.el  -*- 
lexical-binding: t; -*-
+
+;; Copyright (C) 2013-2015 Free Software Foundation, Inc.
+
+;; Author: Artur Malabarba <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/>.
+
+;;; Code:
+
+(require 'ert)
+(require 'character-fold)
+
+(defun character-fold--random-word (n)
+  (mapconcat (lambda (_) (string (+ 9 (random 117))))
+             (make-list n nil) ""))
+
+(defun character-fold--test-search-with-contents (contents string)
+  (with-temp-buffer
+    (insert contents)
+    (goto-char (point-min))
+    (should (search-forward-regexp (character-fold-to-regexp string) nil 
'noerror))
+    (goto-char (point-min))
+    (should (character-fold-search-forward string nil 'noerror))
+    (should (character-fold-search-backward string nil 'noerror))))
+
+
+(ert-deftest character-fold--test-consistency ()
+  (dotimes (n 100)
+    (let ((w (character-fold--random-word n)))
+      ;; A folded string should always match the original string.
+      (character-fold--test-search-with-contents w w))))
+
+(ert-deftest character-fold--test-lax-whitespace ()
+  (dotimes (n 100)
+    (let ((w1 (character-fold--random-word n))
+          (w2 (character-fold--random-word n))
+          (search-spaces-regexp "\\s-+"))
+      (character-fold--test-search-with-contents
+       (concat w1 "\s\n\s\t\f\t\n\r\t" w2)
+       (concat w1 " " w2))
+      (character-fold--test-search-with-contents
+       (concat w1 "\s\n\s\t\f\t\n\r\t" w2)
+       (concat w1 (make-string 90 ?\s) w2)))))
+
+(provide 'character-fold-tests)
+;;; character-fold-tests.el ends here
diff --git a/test/automated/cl-lib-tests.el b/test/automated/cl-lib-tests.el
index 1bdc6d7..e2429b7 100644
--- a/test/automated/cl-lib-tests.el
+++ b/test/automated/cl-lib-tests.el
@@ -117,8 +117,8 @@
       (should (equal (cl-set-difference b b) e))
       ;; Note: this test (and others) is sensitive to the order of the
       ;; result, which is not documented.
-      (should (equal (cl-set-difference a b) (list c2 "x" "" nil 'a)))
-      (should (equal (cl-set-difference b a) (list 'x 'y)))
+      (should (equal (cl-set-difference a b) (list 'a  nil "" "x" c2)))
+      (should (equal (cl-set-difference b a) (list 'y 'x)))
 
       ;; We aren't testing whether this is really using `eq' rather than `eql'.
       (should (equal (cl-set-difference e e :test 'eq) e))
@@ -128,8 +128,8 @@
       (should (equal (cl-set-difference b e :test 'eq) b))
       (should (equal (cl-set-difference e b :test 'eq) e))
       (should (equal (cl-set-difference b b :test 'eq) e))
-      (should (equal (cl-set-difference a b :test 'eq) (list c2 "x" "" nil 
'a)))
-      (should (equal (cl-set-difference b a :test 'eq) (list 'x 'y)))
+      (should (equal (cl-set-difference a b :test 'eq) (list 'a  nil "" "x" 
c2)))
+      (should (equal (cl-set-difference b a :test 'eq) (list 'y 'x)))
 
       (should (equal (cl-union e e) e))
       (should (equal (cl-union a e) a))
@@ -206,7 +206,8 @@
 
 (cl-defstruct (mystruct
                (:constructor cl-lib--con-1 (&aux (abc 1)))
-               (:constructor cl-lib--con-2 (&optional def)))
+               (:constructor cl-lib--con-2 (&optional def) "Constructor 
docstring."))
+  "General docstring."
   (abc 5 :readonly t) (def nil))
 (ert-deftest cl-lib-struct-accessors ()
   (let ((x (make-mystruct :abc 1 :def 2)))
@@ -220,6 +221,11 @@
               (`((cl-tag-slot) (abc 5 :readonly t)
                  (def . ,(or `nil `(nil))))
                t)))))
+(ert-deftest cl-lib-struct-constructors ()
+  (should (string-match "\\`Constructor docstring."
+                        (documentation 'cl-lib--con-2 t)))
+  (should (mystruct-p (cl-lib--con-1)))
+  (should (mystruct-p (cl-lib--con-2))))
 
 (ert-deftest cl-lib-arglist-performance ()
   ;; An `&aux' should not cause lambda's arglist to be turned into an &rest
diff --git a/test/automated/eieio-tests.el b/test/automated/eieio-tests.el
index 5709a1b..915532b 100644
--- a/test/automated/eieio-tests.el
+++ b/test/automated/eieio-tests.el
@@ -898,7 +898,3 @@ Subclasses to override slot attributes.")
 (provide 'eieio-tests)
 
 ;;; eieio-tests.el ends here
-
-;; Local Variables:
-;; no-byte-compile: t
-;; End:
diff --git a/test/automated/elisp-mode-tests.el 
b/test/automated/elisp-mode-tests.el
index 2f6675a..38c0b3b 100644
--- a/test/automated/elisp-mode-tests.el
+++ b/test/automated/elisp-mode-tests.el
@@ -179,15 +179,23 @@
 (defun xref-elisp-test-run (xrefs expected-xrefs)
   (should (= (length xrefs) (length expected-xrefs)))
   (while xrefs
-    (let ((xref (pop xrefs))
-          (expected (pop expected-xrefs)))
+    (let* ((xref (pop xrefs))
+           (expected (pop expected-xrefs))
+           (expected-xref (or (when (consp expected) (car expected)) expected))
+           (expected-source (when (consp expected) (cdr expected))))
 
-      (should (equal xref
-                     (or (when (consp expected) (car expected)) expected)))
+      ;; Downcase the filenames for case-insensitive file systems.
+      (setf (xref-elisp-location-file (oref xref location))
+            (downcase (xref-elisp-location-file (oref xref location))))
+
+      (setf (xref-elisp-location-file (oref expected-xref location))
+            (downcase (xref-elisp-location-file (oref expected-xref 
location))))
+
+      (should (equal xref expected-xref))
 
       (xref--goto-location (xref-item-location xref))
       (back-to-indentation)
-      (should (looking-at (or (when (consp expected) (cdr expected))
+      (should (looking-at (or expected-source
                               (xref-elisp-test-descr-to-target expected)))))
     ))
 
@@ -200,14 +208,24 @@ to (xref-elisp-test-descr-to-target xref)."
   (declare (indent defun)
            (debug (symbolp "name")))
   `(ert-deftest ,(intern (concat "xref-elisp-test-" (symbol-name name))) ()
-     (xref-elisp-test-run ,computed-xrefs ,expected-xrefs)
-     ))
+     (let ((find-file-suppress-same-file-warnings t))
+       (xref-elisp-test-run ,computed-xrefs ,expected-xrefs)
+       )))
 
 ;; When tests are run from the Makefile, 'default-directory' is $HOME,
 ;; so we must provide this dir to expand-file-name in the expected
 ;; results. This also allows running these tests from other
 ;; directories.
-(defconst emacs-test-dir (file-name-directory (or load-file-name 
(buffer-file-name))))
+;;
+;; We add 'downcase' here to deliberately cause a potential problem on
+;; case-insensitive file systems. On such systems, `load-file-name'
+;; may not have the same case as the real file system, since the user
+;; can set `load-path' to have the wrong case (on my Windows system,
+;; `load-path' has the correct case, so this causes the expected test
+;; values to have the wrong case). This is handled in
+;; `xref-elisp-test-run'.
+(defconst emacs-test-dir (downcase (file-name-directory (or load-file-name 
(buffer-file-name)))))
+
 
 ;; alphabetical by test name
 
diff --git a/test/automated/f90.el b/test/automated/f90.el
index c521d28..e429b21 100644
--- a/test/automated/f90.el
+++ b/test/automated/f90.el
@@ -240,4 +240,19 @@ end module modname")
     (forward-line -1)
     (should (= 2 (current-indentation)))))
 
+(ert-deftest f90-test-bug21794 ()
+  "Test for http://debbugs.gnu.org/21794 ."
+  (with-temp-buffer
+    (f90-mode)
+    (insert "program prog
+do i=1,10
+associate (x => xa(i), y => ya(i))
+a(x,y,i) = fun(x,y,i)
+end associate
+end do
+end program prog")
+    (f90-indent-subprogram)
+    (forward-line -2)
+    (should (= 5 (current-indentation)))))
+
 ;;; f90.el ends here
diff --git a/test/automated/faces-tests.el b/test/automated/faces-tests.el
new file mode 100644
index 0000000..007bc80
--- /dev/null
+++ b/test/automated/faces-tests.el
@@ -0,0 +1,54 @@
+;;; faces-tests.el --- Tests for faces.el            -*- lexical-binding: t; 
-*-
+
+;; Copyright (C) 2013-2015 Free Software Foundation, Inc.
+
+;; Author: Artur Malabarba <address@hidden>
+;; Keywords:
+
+;; 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/>.
+
+;;; Code:
+
+(require 'ert)
+(require 'faces)
+
+(defface faces--test1
+  '((t :background "black" :foreground "black"))
+  "")
+
+(defface faces--test2
+  '((t :box 1))
+  "")
+
+(ert-deftest faces--test-color-at-point ()
+  (with-temp-buffer
+    (insert (propertize "STRING" 'face '(faces--test2 faces--test1)))
+    (goto-char (point-min))
+    (should (equal (background-color-at-point) "black"))
+    (should (equal (foreground-color-at-point) "black")))
+  (with-temp-buffer
+    (emacs-lisp-mode)
+    (setq-local font-lock-comment-face 'faces--test1)
+    (setq-local font-lock-constant-face 'faces--test2)
+    (insert ";; `symbol'")
+    (font-lock-fontify-region (point-min) (point-max))
+    (goto-char (point-min))
+    (should (equal (background-color-at-point) "black"))
+    (should (equal (foreground-color-at-point) "black"))
+    (goto-char 6)
+    (should (equal (background-color-at-point) "black"))
+    (should (equal (foreground-color-at-point) "black"))))
+
+(provide 'faces-tests)
+;;; faces-tests.el ends here
diff --git a/test/automated/file-notify-tests.el 
b/test/automated/file-notify-tests.el
index 222bdc5..67e929a 100644
--- a/test/automated/file-notify-tests.el
+++ b/test/automated/file-notify-tests.el
@@ -275,10 +275,10 @@ TIMEOUT is the maximum time to wait for, in seconds."
      (while (null ,until)
        (read-event nil nil 0.1))))
 
-(defmacro file-notify--test-with-events (timeout events &rest body)
+(defmacro file-notify--test-with-events (events &rest body)
   "Run BODY collecting events and then compare with EVENTS.
-Don't wait longer than TIMEOUT seconds for the events to be delivered."
-  (declare (indent 2))
+Don't wait longer than timeout seconds for the events to be delivered."
+  (declare (indent 1))
   (let ((outer (make-symbol "outer")))
     `(let ((,outer file-notify--test-events))
        (setq file-notify--test-expected-events
@@ -286,7 +286,8 @@ Don't wait longer than TIMEOUT seconds for the events to be 
delivered."
        (let (file-notify--test-events)
          ,@body
          (file-notify--wait-for-events
-          ,timeout (= (length ,events) (length file-notify--test-events)))
+          (file-notify--test-timeout)
+          (= (length ,events) (length file-notify--test-events)))
          (should (equal ,events (mapcar #'cadr file-notify--test-events)))
          (setq ,outer (append ,outer file-notify--test-events)))
        (setq file-notify--test-events ,outer))))
@@ -294,6 +295,8 @@ Don't wait longer than TIMEOUT seconds for the events to be 
delivered."
 (ert-deftest file-notify-test02-events ()
   "Check file creation/change/removal notifications."
   (skip-unless (file-notify--test-local-enabled))
+  ;; Under cygwin there are so bad timings that it doesn't make sense to test.
+  (skip-unless (not (eq system-type 'cygwin)))
 
   (setq file-notify--test-tmpfile (file-notify--test-make-temp-name)
        file-notify--test-tmpfile1 (file-notify--test-make-temp-name))
@@ -305,8 +308,7 @@ Don't wait longer than TIMEOUT seconds for the events to be 
delivered."
               (file-notify-add-watch
                file-notify--test-tmpfile
                '(change) 'file-notify--test-event-handler))
-        (file-notify--test-with-events
-            (file-notify--test-timeout) '(created changed deleted)
+        (file-notify--test-with-events '(created changed deleted)
           (write-region
            "any text" nil file-notify--test-tmpfile nil 'no-message)
           (delete-file file-notify--test-tmpfile))
@@ -324,7 +326,6 @@ Don't wait longer than TIMEOUT seconds for the events to be 
delivered."
                 file-notify--test-tmpfile
                 '(change) 'file-notify--test-event-handler))
          (file-notify--test-with-events
-             (file-notify--test-timeout)
              ;; There are two `deleted' events, for the file and for
              ;; the directory.
              '(created changed deleted deleted stopped)
@@ -343,7 +344,6 @@ Don't wait longer than TIMEOUT seconds for the events to be 
delivered."
                '(change) 'file-notify--test-event-handler))
         (should file-notify--test-desc)
         (file-notify--test-with-events
-            (file-notify--test-timeout)
             ;; w32notify does not distinguish between `changed' and
             ;; `attribute-changed'.
             (if (eq file-notify--library 'w32notify)
@@ -368,8 +368,7 @@ Don't wait longer than TIMEOUT seconds for the events to be 
delivered."
                file-notify--test-tmpfile
                '(change) 'file-notify--test-event-handler))
         (should file-notify--test-desc)
-        (file-notify--test-with-events
-            (file-notify--test-timeout) '(created changed renamed)
+        (file-notify--test-with-events '(created changed renamed)
           (write-region
            "any text" nil file-notify--test-tmpfile nil 'no-message)
           (rename-file file-notify--test-tmpfile file-notify--test-tmpfile1)
@@ -386,7 +385,6 @@ Don't wait longer than TIMEOUT seconds for the events to be 
delivered."
                  file-notify--test-tmpfile
                  '(attribute-change) 'file-notify--test-event-handler))
           (file-notify--test-with-events
-              (file-notify--test-timeout)
               (if (file-remote-p temporary-file-directory)
                   ;; In the remote case, `write-region' raises also an
                   ;; `attribute-changed' event.
@@ -511,6 +509,8 @@ Don't wait longer than TIMEOUT seconds for the events to be 
delivered."
 (ert-deftest file-notify-test04-file-validity ()
   "Check `file-notify-valid-p' for files."
   (skip-unless (file-notify--test-local-enabled))
+  ;; Under cygwin there are so bad timings that it doesn't make sense to test.
+  (skip-unless (not (eq system-type 'cygwin)))
 
   (unwind-protect
       (progn
@@ -519,8 +519,7 @@ Don't wait longer than TIMEOUT seconds for the events to be 
delivered."
               (file-notify-add-watch
                file-notify--test-tmpfile
                '(change) #'file-notify--test-event-handler))
-        (file-notify--test-with-events
-            (file-notify--test-timeout) '(created changed deleted)
+        (file-notify--test-with-events '(created changed deleted)
           (should (file-notify-valid-p file-notify--test-desc))
           (write-region
            "any text" nil file-notify--test-tmpfile nil 'no-message)
@@ -547,8 +546,7 @@ Don't wait longer than TIMEOUT seconds for the events to be 
delivered."
                 (file-notify-add-watch
                  file-notify--test-tmpfile
                  '(change) #'file-notify--test-event-handler))
-          (file-notify--test-with-events
-              (file-notify--test-timeout) '(created changed deleted stopped)
+          (file-notify--test-with-events '(created changed deleted stopped)
             (should (file-notify-valid-p file-notify--test-desc))
             (write-region
              "any text" nil file-notify--test-tmpfile nil 'no-message)
@@ -623,8 +621,8 @@ Don't wait longer than TIMEOUT seconds for the events to be 
delivered."
 
 ;; TODO:
 
-;; * It does not work yet for local gfilenotify and remote inotifywait.
 ;; * For w32notify, no stopped events arrive when a directory is removed.
+;; * Try to handle arriving events under cygwin reliably.
 
 (provide 'file-notify-tests)
 ;;; file-notify-tests.el ends here
diff --git a/test/automated/flymake-tests.el b/test/automated/flymake-tests.el
index a77c316..11231bc 100644
--- a/test/automated/flymake-tests.el
+++ b/test/automated/flymake-tests.el
@@ -50,7 +50,7 @@
 
 (ert-deftest warning-predicate-rx-gcc ()
   "Test GCC warning via regexp predicate."
-  (skip-unless (executable-find "gcc"))
+  (skip-unless (and (executable-find "gcc") (executable-find "make")))
   (should (eq 'flymake-warnline
               (flymake-tests--current-face "test.c" "^[Ww]arning"))))
 
diff --git a/test/automated/fns-tests.el b/test/automated/fns-tests.el
index 7e9c1f1..b5222db 100644
--- a/test/automated/fns-tests.el
+++ b/test/automated/fns-tests.el
@@ -155,6 +155,8 @@
            (9 . "aaa") (9 . "zzz") (9 . "ppp") (9 . "fff")])))
 
 (ert-deftest fns-tests-collate-sort ()
+  ;; See https://lists.gnu.org/archive/html/emacs-devel/2015-10/msg02505.html.
+  :expected-result (if (eq system-type 'cygwin) :failed :passed)
   (skip-unless (fns-tests--collate-enabled-p))
 
   ;; Punctuation and whitespace characters are relevant for POSIX.
diff --git a/test/automated/isearch-tests.el b/test/automated/isearch-tests.el
new file mode 100644
index 0000000..d60c229
--- /dev/null
+++ b/test/automated/isearch-tests.el
@@ -0,0 +1,32 @@
+;;; isearch-tests.el --- Tests for isearch.el        -*- lexical-binding: t; 
-*-
+
+;; Copyright (C) 2013-2015 Free Software Foundation, Inc.
+
+;; Author: Artur Malabarba <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/>.
+
+;;; Code:
+
+(require 'ert)
+
+(ert-deftest isearch--test-update ()
+  (with-temp-buffer
+    (setq isearch--current-buffer (current-buffer)))
+  (with-temp-buffer
+    (isearch-update)
+    (should (equal isearch--current-buffer (current-buffer)))))
+
+(provide 'isearch-tests)
+;;; isearch-tests.el ends here
diff --git a/test/automated/json-tests.el b/test/automated/json-tests.el
index d1b7a2f..8f0cd6f 100644
--- a/test/automated/json-tests.el
+++ b/test/automated/json-tests.el
@@ -28,11 +28,40 @@
   (should (equal (json--plist-reverse '(:a 1 :b 2 :c 3))
                  '(:c 3 :b 2 :a 1))))
 
+(ert-deftest test-json-plist-to-alist ()
+  (should (equal (json--plist-to-alist '()) '()))
+  (should (equal (json--plist-to-alist '(:a 1)) '((:a . 1))))
+  (should (equal (json--plist-to-alist '(:a 1 :b 2 :c 3))
+                 '((:a . 1) (:b . 2) (:c . 3)))))
+
+(ert-deftest test-json-encode-plist ()
+  (let ((plist '(:a 1 :b 2)))
+    (should (equal (json-encode plist) "{\"a\":1,\"b\":2}"))))
+
 (ert-deftest json-encode-simple-alist ()
   (should (equal (json-encode '((a . 1)
                                 (b . 2)))
                  "{\"a\":1,\"b\":2}")))
 
+(ert-deftest test-json-encode-hash-table ()
+  (let ((hash-table (make-hash-table))
+        (json-encoding-object-sort-predicate 'string<))
+    (puthash :a 1 hash-table)
+    (puthash :b 2 hash-table)
+    (puthash :c 3 hash-table)
+    (should (equal (json-encode hash-table)
+                   "{\"a\":1,\"b\":2,\"c\":3}"))))
+
+(ert-deftest test-json-encode-alist-with-sort-predicate ()
+  (let ((alist '((:c . 3) (:a . 1) (:b . 2)))
+        (json-encoding-object-sort-predicate 'string<))
+    (should (equal (json-encode alist) "{\"a\":1,\"b\":2,\"c\":3}"))))
+
+(ert-deftest test-json-encode-plist-with-sort-predicate ()
+  (let ((plist '(:c 3 :a 1 :b 2))
+        (json-encoding-object-sort-predicate 'string<))
+    (should (equal (json-encode plist) "{\"a\":1,\"b\":2,\"c\":3}"))))
+
 (ert-deftest json-read-simple-alist ()
   (let ((json-object-type 'alist))
     (should (equal (json-read-from-string "{\"a\": 1, \"b\": 2}")
@@ -49,5 +78,24 @@
   (should (equal (json-read-from-string 
"\"\\nasd\\u0444\\u044b\\u0432fgh\\t\"")
                  "\nasdфывfgh\t")))
 
+(ert-deftest test-json-path-to-position-with-objects ()
+  (let* ((json-string "{\"foo\": {\"bar\": {\"baz\": \"value\"}}}")
+         (matched-path (json-path-to-position 32 json-string)))
+    (should (equal (plist-get matched-path :path) '("foo" "bar" "baz")))
+    (should (equal (plist-get matched-path :match-start) 25))
+    (should (equal (plist-get matched-path :match-end) 32))))
+
+(ert-deftest test-json-path-to-position-with-arrays ()
+  (let* ((json-string "{\"foo\": [\"bar\", [\"baz\"]]}")
+         (matched-path (json-path-to-position 20 json-string)))
+    (should (equal (plist-get matched-path :path) '("foo" 1 0)))
+    (should (equal (plist-get matched-path :match-start) 18))
+    (should (equal (plist-get matched-path :match-end) 23))))
+
+(ert-deftest test-json-path-to-position-no-match ()
+  (let* ((json-string "{\"foo\": {\"bar\": \"baz\"}}")
+         (matched-path (json-path-to-position 5 json-string)))
+    (should (null matched-path))))
+
 (provide 'json-tests)
 ;;; json-tests.el ends here
diff --git a/test/automated/keymap-tests.el b/test/automated/keymap-tests.el
new file mode 100644
index 0000000..973b240
--- /dev/null
+++ b/test/automated/keymap-tests.el
@@ -0,0 +1,43 @@
+;;; keymap-tests.el --- Test suite for src/keymap.c
+
+;; Copyright (C) 2015 Free Software Foundation, Inc.
+
+;; Author: Juanma Barranquero <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/>.
+
+;;; Code:
+
+(require 'ert)
+
+(ert-deftest keymap-store_in_keymap-FASTINT-on-nonchars ()
+  "Check for bug fixed in \"Fix assertion violation in define-key\",
+commit 86c19714b097aa477d339ed99ffb5136c755a046."
+  (let ((def (lookup-key Buffer-menu-mode-map [32])))
+    (unwind-protect
+        (progn
+          (should-not (eq def 'undefined))
+          ;; This will cause an assertion violation if the bug is present.
+          ;; We could run an inferior Emacs process and check for the return
+          ;; status, but in some environments an assertion failure triggers
+          ;; an abort dialog that requires user intervention anyway.
+          (define-key Buffer-menu-mode-map [(32 . 32)] 'undefined)
+          (should (eq (lookup-key Buffer-menu-mode-map [32]) 'undefined)))
+      (define-key Buffer-menu-mode-map [32] def))))
+
+(provide 'keymap-tests)
+
+;;; keymap-tests.el ends here
diff --git a/test/automated/map-tests.el b/test/automated/map-tests.el
index 8693415..2a7fcc3 100644
--- a/test/automated/map-tests.el
+++ b/test/automated/map-tests.el
@@ -126,16 +126,16 @@ Evaluate BODY for each created map.
     (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-mapp ()
+  (should (mapp nil))
+  (should (mapp '((a . b) (c . d))))
+  (should (mapp '(a b c d)))
+  (should (mapp []))
+  (should (mapp [1 2 3]))
+  (should (mapp (make-hash-table)))
+  (should (mapp "hello"))
+  (should (not (mapp 1)))
+  (should (not (mapp 'hello))))
 
 (ert-deftest test-map-keys ()
   (with-maps-do map
@@ -320,5 +320,12 @@ Evaluate BODY for each created map.
     (should (= b 2))
     (should (null c))))
 
+(ert-deftest test-map-merge-with ()
+  (should (equal (map-merge-with 'list #'+
+                                 '((1 . 2))
+                                 '((1 . 3) (2 . 4))
+                                 '((1 . 1) (2 . 5) (3 . 0)))
+                 '((3 . 0) (2 . 9) (1 . 6)))))
+
 (provide 'map-tests)
 ;;; map-tests.el ends here
diff --git a/test/automated/obarray-tests.el b/test/automated/obarray-tests.el
new file mode 100644
index 0000000..4cc61b6
--- /dev/null
+++ b/test/automated/obarray-tests.el
@@ -0,0 +1,90 @@
+;;; obarray-tests.el --- Tests for obarray -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2015 Free Software Foundation, Inc.
+
+;; Author: Przemysław Wojnowski <address@hidden>
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;;; Code:
+
+(require 'obarray)
+(require 'ert)
+
+(ert-deftest obarrayp-test ()
+  "Should assert that given object is an obarray."
+  (should-not (obarrayp 42))
+  (should-not (obarrayp "aoeu"))
+  (should-not (obarrayp '()))
+  (should-not (obarrayp []))
+  (should (obarrayp (make-vector 7 0))))
+
+(ert-deftest obarrayp-unchecked-content-test ()
+  "Should fail to check content of passed obarray."
+  :expected-result :failed
+  (should-not (obarrayp ["a" "b" "c"]))
+  (should-not (obarrayp [1 2 3])))
+
+(ert-deftest obarray-make-default-test ()
+  (let ((table (obarray-make)))
+    (should (obarrayp table))
+    (should (equal (make-vector 59 0) table))))
+
+(ert-deftest obarray-make-with-size-test ()
+  (should-error (obarray-make -1) :type 'wrong-type-argument)
+  (should-error (obarray-make 0) :type 'wrong-type-argument)
+  (let ((table (obarray-make 1)))
+    (should (obarrayp table))
+    (should (equal (make-vector 1 0) table))))
+
+(ert-deftest obarray-get-test ()
+  (let ((table (obarray-make 3)))
+    (should-not (obarray-get table "aoeu"))
+    (intern "aoeu" table)
+    (should (string= "aoeu" (obarray-get table "aoeu")))))
+
+(ert-deftest obarray-put-test ()
+  (let ((table (obarray-make 3)))
+    (should-not (obarray-get table "aoeu"))
+    (should (string= "aoeu" (obarray-put table "aoeu")))
+    (should (string= "aoeu" (obarray-get table "aoeu")))))
+
+(ert-deftest obarray-remove-test ()
+  (let ((table (obarray-make 3)))
+    (should-not (obarray-get table "aoeu"))
+    (should-not (obarray-remove table "aoeu"))
+    (should (string= "aoeu" (obarray-put table "aoeu")))
+    (should (string= "aoeu" (obarray-get table "aoeu")))
+    (should (obarray-remove table "aoeu"))
+    (should-not (obarray-get table "aoeu"))))
+
+(ert-deftest obarray-map-test ()
+  "Should execute function on all elements of obarray."
+  (let* ((table (obarray-make 3))
+         (syms '())
+         (collect-names (lambda (sym) (push (symbol-name sym) syms))))
+    (obarray-map collect-names table)
+    (should (null syms))
+    (obarray-put table "a")
+    (obarray-put table "b")
+    (obarray-put table "c")
+    (obarray-map collect-names table)
+    (should (equal (sort syms #'string<) '("a" "b" "c")))))
+
+(provide 'obarray-tests)
+;;; obarray-tests.el ends here
diff --git a/test/automated/process-tests.el b/test/automated/process-tests.el
index 1dab615..ee9e4f3 100644
--- a/test/automated/process-tests.el
+++ b/test/automated/process-tests.el
@@ -43,10 +43,12 @@
     sentinel-called))
 
 (ert-deftest process-test-sentinel-accept-process-output ()
+  (skip-unless (executable-find "bash"))
   (should (process-test-sentinel-wait-function-working-p
            #'accept-process-output)))
 
 (ert-deftest process-test-sentinel-sit-for ()
+  (skip-unless (executable-find "bash"))
   (should
    (process-test-sentinel-wait-function-working-p (lambda () (sit-for 0.01 
t)))))
 
@@ -61,15 +63,15 @@
             ;; to force quoting.
             (setq batfile (make-temp-file "echo args" nil ".bat"))
             (with-temp-file batfile
-              (insert "@echo arg1 = %1, arg2 = %2\n"))
+              (insert "@echo arg1=%1, arg2=%2\n"))
             (with-temp-buffer
               (call-process batfile nil '(t t) t "x &y")
-              (should (string= (buffer-string) "arg1 = \"x &y\", arg2 = \n")))
+              (should (string= (buffer-string) "arg1=\"x &y\", arg2=\n")))
             (with-temp-buffer
               (call-process-shell-command
                (mapconcat #'shell-quote-argument (list batfile "x &y") " ")
                nil '(t t) t)
-              (should (string= (buffer-string) "arg1 = \"x &y\", arg2 = \n"))))
+              (should (string= (buffer-string) "arg1=\"x &y\", arg2=\n"))))
         (when batfile (delete-file batfile))))))
 
 (ert-deftest process-test-stderr-buffer ()
@@ -142,4 +144,22 @@
     (should (equal "hello stderr!\n"
                   (mapconcat #'identity (nreverse stderr-output) "")))))
 
+(ert-deftest start-process-should-not-modify-arguments ()
+  "`start-process' must not modify its arguments in-place."
+  ;; See bug#21831.
+  (let* ((path (pcase system-type
+                 ((or 'windows-nt 'ms-dos)
+                  ;; Make sure the file name uses forward slashes.
+                  ;; The original bug was that 'start-process' would
+                  ;; convert forward slashes to backslashes.
+                  (expand-file-name (executable-find "attrib.exe")))
+                 (_ "/bin//sh")))
+         (samepath (copy-sequence path)))
+    ;; Make sure 'start-process' actually goes all the way and invokes
+    ;; the program.
+    (should (process-live-p (condition-case nil
+                                (start-process "" nil path)
+                              (error nil))))
+    (should (equal path samepath))))
+
 (provide 'process-tests)
diff --git a/test/automated/python-tests.el b/test/automated/python-tests.el
index 44b05e2..9da6807 100644
--- a/test/automated/python-tests.el
+++ b/test/automated/python-tests.el
@@ -36,10 +36,11 @@ BODY is code to be executed within the temp buffer.  Point 
is
 always located at the beginning of buffer."
   (declare (indent 1) (debug t))
   `(with-temp-buffer
-     (python-mode)
-     (insert ,contents)
-     (goto-char (point-min))
-     ,@body))
+     (let ((python-indent-guess-indent-offset nil))
+       (python-mode)
+       (insert ,contents)
+       (goto-char (point-min))
+       ,@body)))
 
 (defmacro python-tests-with-temp-file (contents &rest body)
   "Create a `python-mode' enabled file with CONTENTS.
@@ -48,7 +49,8 @@ always located at the beginning of buffer."
   (declare (indent 1) (debug t))
   ;; temp-file never actually used for anything?
   `(let* ((temp-file (make-temp-file "python-tests" nil ".py"))
-          (buffer (find-file-noselect temp-file)))
+          (buffer (find-file-noselect temp-file))
+          (python-indent-guess-indent-offset nil))
      (unwind-protect
          (with-current-buffer buffer
            (python-mode)
@@ -561,6 +563,14 @@ CHOICES = (('some', 'choice'),
    (should (eq (car (python-indent-context)) :inside-paren))
    (should (= (python-indent-calculate-indentation) 11))))
 
+(ert-deftest python-indent-inside-paren-7 ()
+  "Test for Bug#21762."
+  (python-tests-with-temp-buffer
+   "import re as myre\nvar = [\n"
+   (goto-char (point-max))
+   ;; This signals an error if the test fails
+   (should (eq (car (python-indent-context)) :inside-paren-newline-start))))
+
 (ert-deftest python-indent-after-block-1 ()
   "The most simple after-block case that shouldn't fail."
   (python-tests-with-temp-buffer
diff --git a/test/automated/simple-test.el b/test/automated/simple-test.el
index 5bfb746..07b5eaa 100644
--- a/test/automated/simple-test.el
+++ b/test/automated/simple-test.el
@@ -34,6 +34,17 @@
            (buffer-substring (point) (point-max)))))
 
 
+(defmacro simple-test--transpositions (&rest body)
+  (declare (indent 0)
+           (debug t))
+  `(with-temp-buffer
+     (emacs-lisp-mode)
+     (insert "(s1) (s2) (s3) (s4) (s5)")
+     (backward-sexp 1)
+     ,@body
+     (cons (buffer-substring (point-min) (point))
+           (buffer-substring (point) (point-max)))))
+
 
 ;;; `newline'
 (ert-deftest newline ()
@@ -202,5 +213,44 @@
       (unless (or noninteractive python)
         (unload-feature 'python)))))
 
+
+;;; auto-boundary tests
+(ert-deftest undo-auto--boundary-timer ()
+  (should
+   undo-auto--current-boundary-timer))
+
+(ert-deftest undo-auto--boundaries-added ()
+  ;; The change in the buffer should have caused addition
+  ;; to undo-auto--undoably-changed-buffers.
+  (should
+   (with-temp-buffer
+     (setq buffer-undo-list nil)
+     (insert "hello")
+     (member (current-buffer) undo-auto--undoably-changed-buffers)))
+  ;; The head of buffer-undo-list should be the insertion event, and
+  ;; therefore not nil
+  (should
+   (with-temp-buffer
+     (setq buffer-undo-list nil)
+     (insert "hello")
+     (car buffer-undo-list)))
+  ;; Now the head of the buffer-undo-list should be a boundary and so
+  ;; nil. We have to call auto-boundary explicitly because we are out
+  ;; of the command loop
+  (should-not
+   (with-temp-buffer
+     (setq buffer-undo-list nil)
+     (insert "hello")
+     (car buffer-undo-list)
+     (undo-auto--boundaries 'test))))
+
+;;; Transposition with negative args (bug#20698, bug#21885)
+(ert-deftest simple-transpose-subr ()
+  (should (equal (simple-test--transpositions (transpose-sexps -1))
+                 '("(s1) (s2) (s4)" . " (s3) (s5)")))
+  (should (equal (simple-test--transpositions (transpose-sexps -2))
+                 '("(s1) (s4)" . " (s2) (s3) (s5)"))))
+
+
 (provide 'simple-test)
 ;;; simple-test.el ends here
diff --git a/test/automated/sort-tests.el b/test/automated/sort-tests.el
new file mode 100644
index 0000000..22acb83
--- /dev/null
+++ b/test/automated/sort-tests.el
@@ -0,0 +1,106 @@
+;;; sort-tests.el --- Tests for sort.el              -*- lexical-binding: t; 
-*-
+
+;; Copyright (C) 2015 Free Software Foundation, Inc.
+
+;; Author: Artur Malabarba <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/>.
+
+;;; Code:
+
+(require 'ert)
+(require 'sort)
+
+(defun sort-tests-random-word (n)
+  (mapconcat (lambda (_) (string (let ((c (random 52)))
+                              (+ (if (> c 25) 71 65)
+                                 c))))
+             (make-list n nil) ""))
+
+(defun sort-tests--insert-words-sort-and-compare (words separator function 
reverse less-predicate)
+  (with-temp-buffer
+    (let ((aux words))
+      (while aux
+        (insert (pop aux))
+        (when aux
+          (insert separator))))
+    ;; Final newline.
+    (insert "\n")
+    (funcall function reverse (point-min) (point-max))
+    (let ((sorted-words
+           (mapconcat #'identity
+                      (let ((x (sort (copy-sequence words) less-predicate)))
+                        (if reverse (reverse x) x))
+                      separator)))
+      (should (string= (substring (buffer-string) 0 -1) sorted-words)))))
+
+;;; This function uses randomly generated tests and should satisfy
+;;; most needs for this lib.
+(cl-defun sort-tests-test-sorter-function (separator function &key generator 
less-pred noreverse)
+  "Check that FUNCTION correctly sorts words separated by SEPARATOR.
+This checks whether it is equivalent to sorting a list of such
+words via LESS-PREDICATE, and then inserting them separated by
+SEPARATOR.
+LESS-PREDICATE defaults to `string-lessp'.
+GENERATOR is a function called with one argument that returns a
+word, it defaults to `sort-tests-random-word'.
+NOREVERSE means that the first arg of FUNCTION is not used for
+reversing the sort."
+  (dotimes (n 20)
+    ;; Sort n words of length n.
+    (let ((words (mapcar (or generator #'sort-tests-random-word) (make-list n 
n)))
+          (sort-fold-case nil)
+          (less-pred (or less-pred #'string<)))
+      (sort-tests--insert-words-sort-and-compare words separator function nil 
less-pred)
+      (unless noreverse
+        (sort-tests--insert-words-sort-and-compare
+         words separator function 'reverse less-pred))
+      (let ((less-pred-case (lambda (a b) (funcall less-pred (downcase a) 
(downcase b))))
+            (sort-fold-case t))
+        (sort-tests--insert-words-sort-and-compare words separator function 
nil less-pred-case)
+        (unless noreverse
+          (sort-tests--insert-words-sort-and-compare
+           words separator function 'reverse less-pred-case))))))
+
+(ert-deftest sort-tests--lines ()
+  (sort-tests-test-sorter-function "\n" #'sort-lines))
+
+(ert-deftest sort-tests--paragraphs ()
+  (let ((paragraph-separate "[\s\t\f]*$"))
+    (sort-tests-test-sorter-function "\n\n" #'sort-paragraphs)))
+
+(ert-deftest sort-tests--numeric-fields ()
+  (cl-labels ((field-to-number (f) (string-to-number (car (split-string f)))))
+    (sort-tests-test-sorter-function "\n" (lambda (_ l r) (sort-numeric-fields 
1 l (1- r)))
+                           :noreverse t
+                           :generator (lambda (_) (format "%s %s" (random) 
(sort-tests-random-word 20)))
+                           :less-pred (lambda (a b) (< (field-to-number a)
+                                                  (field-to-number b))))))
+
+(ert-deftest sort-tests--fields-1 ()
+  (cl-labels ((field-n (f n) (elt (split-string f) (1- n))))
+    (sort-tests-test-sorter-function "\n" (lambda (_ l r) (sort-fields 1 l (1- 
r)))
+                           :noreverse t
+                           :generator (lambda (n) (concat 
(sort-tests-random-word n) " " (sort-tests-random-word n)))
+                           :less-pred (lambda (a b) (string< (field-n a 1) 
(field-n b 1))))))
+
+(ert-deftest sort-tests--fields-2 ()
+  (cl-labels ((field-n (f n) (elt (split-string f) (1- n))))
+    (sort-tests-test-sorter-function "\n" (lambda (_ l r) (sort-fields 2 l (1- 
r)))
+                           :noreverse t
+                           :generator (lambda (n) (concat 
(sort-tests-random-word n) " " (sort-tests-random-word n)))
+                           :less-pred (lambda (a b) (string< (field-n a 2) 
(field-n b 2))))))
+
+(provide 'sort-tests)
+;;; sort-tests.el ends here
diff --git a/test/automated/subr-tests.el b/test/automated/subr-tests.el
index 28a423f..ee8db59 100644
--- a/test/automated/subr-tests.el
+++ b/test/automated/subr-tests.el
@@ -82,5 +82,26 @@
   (should (string-greaterp 'acb 'abc))
   (should (string-greaterp "acb" 'abc)))
 
+(ert-deftest subr-test-when ()
+  (should (equal (when t 1) 1))
+  (should (equal (when t 2) 2))
+  (should (equal (when nil 1) nil))
+  (should (equal (when nil 2) nil))
+  (should (equal (when t 'x 1) 1))
+  (should (equal (when t 'x 2) 2))
+  (should (equal (when nil 'x 1) nil))
+  (should (equal (when nil 'x 2) nil))
+  (let ((x 1))
+    (should-not (when nil
+                  (setq x (1+ x))
+                  x))
+    (should (= x 1))
+    (should (= 2 (when t
+                   (setq x (1+ x))
+                   x)))
+    (should (= x 2)))
+  (should (equal (macroexpand-all '(when a b c d))
+                 '(if a (progn b c d)))))
+
 (provide 'subr-tests)
 ;;; subr-tests.el ends here
diff --git a/test/automated/vc-tests.el b/test/automated/vc-tests.el
index a7242e9..847e076 100644
--- a/test/automated/vc-tests.el
+++ b/test/automated/vc-tests.el
@@ -289,6 +289,7 @@ For backends which dont support it, `vc-not-supported' is 
signalled."
           ;; added: Git
           ;; unregistered: CVS SCCS SRC
          ;; up-to-date: Bzr SVN
+          (message "vc-state1 %s" (vc-state default-directory))
          (should (eq (vc-state default-directory)
                      (vc-state default-directory backend)))
          (should (memq (vc-state default-directory)
@@ -301,6 +302,7 @@ For backends which dont support it, `vc-not-supported' is 
signalled."
             ;; added: Git
            ;; unregistered: RCS SCCS
            ;; up-to-date: Bzr CVS
+            (message "vc-state2 %s" (vc-state tmp-name))
            (should (eq (vc-state tmp-name) (vc-state tmp-name backend)))
            (should (memq (vc-state tmp-name)
                          '(nil added unregistered up-to-date)))
@@ -312,6 +314,7 @@ For backends which dont support it, `vc-not-supported' is 
signalled."
             ;; added: Git
             ;; unregistered: Hg RCS SCCS SRC SVN
             ;; up-to-date: Bzr CVS
+            (message "vc-state3 %s" (vc-state tmp-name))
            (should (eq (vc-state tmp-name) (vc-state tmp-name backend)))
            (should (memq (vc-state tmp-name)
                          '(nil added unregistered up-to-date)))
@@ -323,6 +326,7 @@ For backends which dont support it, `vc-not-supported' is 
signalled."
             ;; added: Git Mtn
             ;; unregistered: Hg RCS SCCS SRC SVN
             ;; up-to-date: Bzr CVS
+            (message "vc-state4 %s" (vc-state tmp-name))
            (should (eq (vc-state tmp-name) (vc-state tmp-name backend)))
            (should (memq (vc-state tmp-name) '(added unregistered up-to-date)))
 
@@ -332,13 +336,14 @@ For backends which dont support it, `vc-not-supported' is 
signalled."
                  (vc-test--unregister-function backend tmp-name)
 
                  ;; added: Git
-                 ;; unregistered: Hg
+                 ;; unregistered: Hg RCS
                  ;; unsupported: CVS Mtn SCCS SRC SVN
                  ;; up-to-date: Bzr
+                  (message "vc-state5 %s" (vc-state tmp-name))
                  (should (eq (vc-state tmp-name) (vc-state tmp-name backend)))
                  (should (memq (vc-state tmp-name)
                                '(added unregistered up-to-date))))
-             (vc-not-supported t))))
+             (vc-not-supported (message "vc-state5 unsupported")))))
 
       ;; Save exit.
       (ignore-errors (run-hooks 'vc-test--cleanup-hook)))))
@@ -365,65 +370,60 @@ For backends which dont support it, `vc-not-supported' is 
signalled."
          (make-directory default-directory)
          (vc-test--create-repo-function backend)
 
-         ;; nil: CVS Mtn RCS SCCS
+         ;; nil: CVS Git Mtn RCS SCCS
          ;; "0": Bzr Hg SRC SVN
-         ;; "master": Git
+          (message
+           "vc-working-revision1 %s" (vc-working-revision default-directory))
          (should (eq (vc-working-revision default-directory)
                      (vc-working-revision default-directory backend)))
-         (should
-          (member
-           (vc-working-revision default-directory) '(nil "0" "master")))
+         (should (member (vc-working-revision default-directory) '(nil "0")))
 
          (let ((tmp-name (expand-file-name "foo" default-directory)))
            ;; Check initial working revision, should be nil until
             ;; it's registered.
 
-           ;; nil: CVS Mtn RCS SCCS SVN
+           ;; nil: CVS Git Mtn RCS SCCS SVN
            ;; "0": Bzr Hg SRC
-           ;; "master": Git
+            (message "vc-working-revision2 %s" (vc-working-revision tmp-name))
            (should (eq (vc-working-revision tmp-name)
                        (vc-working-revision tmp-name backend)))
-           (should
-            (member (vc-working-revision tmp-name) '(nil "0" "master")))
+           (should (member (vc-working-revision tmp-name) '(nil "0")))
 
            ;; Write a new file.  Check working revision.
            (write-region "foo" nil tmp-name nil 'nomessage)
 
-           ;; nil: CVS Mtn RCS SCCS SVN
+           ;; nil: CVS Git Mtn RCS SCCS SVN
            ;; "0": Bzr Hg SRC
-           ;; "master": Git
+            (message "vc-working-revision3 %s" (vc-working-revision tmp-name))
            (should (eq (vc-working-revision tmp-name)
                        (vc-working-revision tmp-name backend)))
-           (should
-            (member (vc-working-revision tmp-name) '(nil "0" "master")))
+           (should (member (vc-working-revision tmp-name) '(nil "0")))
 
            ;; Register a file.  Check working revision.
            (vc-register
             (list backend (list (file-name-nondirectory tmp-name))))
 
-           ;; nil: Mtn RCS SCCS
+           ;; nil: Mtn Git RCS SCCS
            ;; "0": Bzr CVS Hg SRC SVN
-           ;; "master": Git
+            (message "vc-working-revision4 %s" (vc-working-revision tmp-name))
            (should (eq (vc-working-revision tmp-name)
                        (vc-working-revision tmp-name backend)))
-           (should
-            (member (vc-working-revision tmp-name) '(nil "0" "master")))
+           (should (member (vc-working-revision tmp-name) '(nil "0")))
 
            ;; Unregister the file.  Check working revision.
            (condition-case nil
                (progn
                  (vc-test--unregister-function backend tmp-name)
 
-                 ;; nil: RCS
+                 ;; nil: Git RCS
                  ;; "0": Bzr Hg
-                 ;; "master": Git
                  ;; unsupported: CVS Mtn SCCS SRC SVN
+                  (message
+                   "vc-working-revision5 %s" (vc-working-revision tmp-name))
                  (should (eq (vc-working-revision tmp-name)
                              (vc-working-revision tmp-name backend)))
-                 (should
-                  (member
-                   (vc-working-revision tmp-name) '(nil "0" "master"))))
-             (vc-not-supported t))))
+                 (should (member (vc-working-revision tmp-name) '(nil "0"))))
+             (vc-not-supported (message "vc-working-revision5 unsupported")))))
 
       ;; Save exit.
       (ignore-errors (run-hooks 'vc-test--cleanup-hook)))))
@@ -453,6 +453,9 @@ For backends which dont support it, `vc-not-supported' is 
signalled."
          ;; nil: RCS
           ;; implicit: Bzr CVS Git Hg Mtn SRC SVN
           ;; locking: SCCS
+          (message
+           "vc-checkout-model1 %s"
+           (vc-checkout-model backend default-directory))
           (should (memq (vc-checkout-model backend default-directory)
                        '(announce implicit locking)))
 
@@ -462,6 +465,8 @@ For backends which dont support it, `vc-not-supported' is 
signalled."
            ;; nil: RCS
            ;; implicit: Bzr CVS Git Hg Mtn SRC SVN
            ;; locking: SCCS
+            (message
+             "vc-checkout-model2 %s" (vc-checkout-model backend tmp-name))
            (should (memq (vc-checkout-model backend tmp-name)
                          '(announce implicit locking)))
 
@@ -471,6 +476,8 @@ For backends which dont support it, `vc-not-supported' is 
signalled."
            ;; nil: RCS
            ;; implicit: Bzr CVS Git Hg Mtn SRC SVN
            ;; locking: SCCS
+            (message
+             "vc-checkout-model3 %s" (vc-checkout-model backend tmp-name))
            (should (memq (vc-checkout-model backend tmp-name)
                          '(announce implicit locking)))
 
@@ -481,6 +488,8 @@ For backends which dont support it, `vc-not-supported' is 
signalled."
            ;; nil: RCS
            ;; implicit: Bzr CVS Git Hg Mtn SRC SVN
            ;; locking: SCCS
+            (message
+             "vc-checkout-model4 %s" (vc-checkout-model backend tmp-name))
            (should (memq (vc-checkout-model backend tmp-name)
                          '(announce implicit locking)))
 
@@ -492,9 +501,11 @@ For backends which dont support it, `vc-not-supported' is 
signalled."
                  ;; nil: RCS
                  ;; implicit: Bzr Git Hg
                  ;; unsupported: CVS Mtn SCCS SRC SVN
+                  (message
+                   "vc-checkout-model5 %s" (vc-checkout-model backend 
tmp-name))
                  (should (memq (vc-checkout-model backend tmp-name)
                                '(announce implicit locking))))
-             (vc-not-supported t))))
+             (vc-not-supported (message "vc-checkout-model5 unsupported")))))
 
       ;; Save exit.
       (ignore-errors (run-hooks 'vc-test--cleanup-hook)))))
diff --git a/test/etags/cp-src/clheir.hpp b/test/etags/cp-src/clheir.hpp
index a924563..55d9122 100644
--- a/test/etags/cp-src/clheir.hpp
+++ b/test/etags/cp-src/clheir.hpp
@@ -17,7 +17,7 @@ public:
     generic_object();  // enter generic_object into ObjectRegistry
     // We never copy generic_objects, so we don't need a copy constructor.
     ~generic_object(void);  // delete from ObjectRegistry
-    // Simulation steps, accomodate different kinds of time
+    // Simulation steps, accommodate different kinds of time
     virtual void compute_next_state(void) { }
     virtual void step(void) { }
     };
diff --git a/test/indent/css-mode.css b/test/indent/css-mode.css
index 2f04e96..24166b0 100644
--- a/test/indent/css-mode.css
+++ b/test/indent/css-mode.css
@@ -30,7 +30,9 @@ a.b:c,d.e:f,g[h]:i,j[k]:l,.m.n:o,.p.q:r,.s[t]:u,.v[w]:x { /* 
bug:20282 */
 .x2
 {
     /* foo: bar; */ foo2: bar2;
-    bar: baz;
+    bar1: url("http://toto/titi";);
+    bar2: url('http://toto/titi');
+    bar3: url(http://toto/titi);
 }
 
 div.x3
diff --git a/test/indent/js-jsx.js b/test/indent/js-jsx.js
new file mode 100644
index 0000000..7401939
--- /dev/null
+++ b/test/indent/js-jsx.js
@@ -0,0 +1,85 @@
+// -*- mode: js-jsx; -*-
+
+var foo = <div></div>;
+
+return (
+  <div>
+  </div>
+  <div>
+    <div></div>
+    <div>
+      <div></div>
+    </div>
+  </div>
+);
+
+React.render(
+  <div>
+    <div></div>
+  </div>,
+  {
+    a: 1
+  },
+  <div>
+    <div></div>
+  </div>
+);
+
+return (
+  // Sneaky!
+  <div></div>
+);
+
+return (
+  <div></div>
+  // Sneaky!
+);
+
+React.render(
+  <input
+    />,
+  {
+    a: 1
+  }
+);
+
+return (
+  <div>
+    {array.map(function () {
+      return {
+        a: 1
+      };
+    })}
+  </div>
+);
+
+return (
+  <div attribute={array.map(function () {
+         return {
+           a: 1
+         };
+
+         return {
+           a: 1
+         };
+
+         return {
+           a: 1
+         };
+       })}>
+  </div>
+);
+
+// Local Variables:
+// indent-tabs-mode: nil
+// js-indent-level: 2
+// End:
+
+// The following test has intentionally unclosed elements and should
+// be placed below all other tests to prevent awkward indentation.
+
+return (
+  <div>
+    {array.map(function () {
+      return {
+        a: 1



reply via email to

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