emacs-diffs
[Top][All Lists]
Advanced

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

feature/named-lambdas 8c3b0668888: Merge branch 'master' into feature/na


From: Alan Mackenzie
Subject: feature/named-lambdas 8c3b0668888: Merge branch 'master' into feature/named-lambdas
Date: Wed, 25 Oct 2023 17:07:47 -0400 (EDT)

branch: feature/named-lambdas
commit 8c3b0668888917763b817e421462f19e0c9b289c
Merge: 03196fcabd4 beb0a7e1a7f
Author: Alan Mackenzie <acm@muc.de>
Commit: Alan Mackenzie <acm@muc.de>

    Merge branch 'master' into feature/named-lambdas
---
 .clang-format                                      |    5 +-
 ChangeLog.1                                        |    2 +-
 ChangeLog.3                                        |   10 +-
 ChangeLog.4                                        | 1985 ++++++++-
 Makefile.in                                        |    2 +-
 admin/MAINTAINERS                                  |    4 -
 admin/git-bisect-start                             |   16 +-
 admin/make-tarball.txt                             |    5 +
 configure.ac                                       |   14 +-
 doc/emacs/ChangeLog.1                              |    2 +-
 doc/emacs/android.texi                             |  162 +-
 doc/emacs/building.texi                            |   20 +-
 doc/emacs/custom.texi                              |    9 +-
 doc/emacs/display.texi                             |    2 +-
 doc/emacs/emacs.texi                               |    6 +-
 doc/emacs/frames.texi                              |   17 +-
 doc/emacs/indent.texi                              |  234 ++
 doc/emacs/input.texi                               |   85 +-
 doc/emacs/macos.texi                               |    5 +-
 doc/emacs/maintaining.texi                         |  312 +-
 doc/emacs/misc.texi                                |   14 +-
 doc/emacs/screen.texi                              |    8 +-
 doc/emacs/search.texi                              |    2 +
 doc/emacs/windows.texi                             |   22 +
 doc/lispref/ChangeLog.1                            |    2 +-
 doc/lispref/buffers.texi                           |   22 +-
 doc/lispref/commands.texi                          |   15 +-
 doc/lispref/elisp.texi                             |    6 +-
 doc/lispref/eval.texi                              |   14 +-
 doc/lispref/files.texi                             |    2 +-
 doc/lispref/frames.texi                            |  811 ++--
 doc/lispref/functions.texi                         |    4 +-
 doc/lispref/modes.texi                             |    5 +-
 doc/lispref/os.texi                                |   11 +-
 doc/lispref/processes.texi                         |    6 +-
 doc/lispref/tips.texi                              |    2 +-
 doc/lispref/variables.texi                         |  390 +-
 doc/man/ChangeLog.1                                |    4 +-
 doc/man/emacsclient.1                              |   30 +-
 doc/misc/ChangeLog.1                               |    4 +-
 doc/misc/calc.texi                                 |    8 +-
 doc/misc/cl.texi                                   |  155 +
 doc/misc/ediff.texi                                |    6 +-
 doc/misc/efaq.texi                                 |    6 +-
 doc/misc/erc.texi                                  |   60 +-
 doc/misc/eshell.texi                               |   13 +-
 doc/misc/gnus.texi                                 |    6 +-
 doc/misc/tramp.texi                                |   27 +-
 doc/misc/url.texi                                  |    8 +-
 doc/misc/use-package.texi                          |    2 +-
 doc/misc/viper.texi                                |    7 +-
 etc/AUTHORS                                        |  128 +-
 etc/CALC-NEWS                                      |    2 +-
 etc/ChangeLog.1                                    |    6 +-
 etc/EGLOT-NEWS                                     |    6 +
 etc/ERC-NEWS                                       |  106 +-
 etc/NEWS                                           |  222 +-
 etc/emacs_lldb.py                                  |  115 +-
 etc/publicsuffix.txt                               | 4223 +++++++++++---------
 etc/refcards/orgcard.tex                           |    2 +-
 java/AndroidManifest.xml.in                        |    7 +-
 java/INSTALL                                       |   16 +-
 java/org/gnu/emacs/EmacsActivity.java              |    7 +-
 java/org/gnu/emacs/EmacsInputConnection.java       |   15 +
 java/org/gnu/emacs/EmacsNative.java                |   15 +
 java/org/gnu/emacs/EmacsOpenActivity.java          |  136 +-
 java/org/gnu/emacs/EmacsSdk7FontDriver.java        |    2 +
 java/org/gnu/emacs/EmacsService.java               |  123 +-
 java/org/gnu/emacs/EmacsView.java                  |   54 +-
 java/org/gnu/emacs/EmacsWindow.java                |  288 +-
 lib-src/ChangeLog.1                                |    8 +-
 lisp/ChangeLog.13                                  |    4 +-
 lisp/ChangeLog.14                                  |   18 +-
 lisp/ChangeLog.15                                  |    8 +-
 lisp/ChangeLog.16                                  |    4 +-
 lisp/ChangeLog.17                                  |    2 +-
 lisp/ChangeLog.4                                   |    6 +-
 lisp/ChangeLog.5                                   |    2 +-
 lisp/ChangeLog.6                                   |    2 +-
 lisp/align.el                                      |   13 +-
 lisp/arc-mode.el                                   |   20 +-
 lisp/bindings.el                                   |   35 +-
 lisp/calc/calc-units.el                            |   43 +-
 lisp/calendar/time-date.el                         |    7 +-
 lisp/calendar/timeclock.el                         |   10 +-
 lisp/cedet/ede/base.el                             |    3 +-
 lisp/cedet/pulse.el                                |    4 +-
 lisp/cedet/semantic/imenu.el                       |    6 +-
 lisp/cedet/srecode/map.el                          |    3 +-
 lisp/cus-edit.el                                   |    5 +-
 lisp/dnd.el                                        |   10 +-
 lisp/doc-view.el                                   |    4 +-
 lisp/emacs-lisp/bytecomp.el                        |  176 +-
 lisp/emacs-lisp/checkdoc.el                        |   39 -
 lisp/emacs-lisp/cl-macs.el                         |    3 +-
 lisp/emacs-lisp/cl-preloaded.el                    |   10 +-
 lisp/emacs-lisp/cl-print.el                        |   18 +-
 lisp/emacs-lisp/comp-cstr.el                       |   53 +-
 lisp/emacs-lisp/disass.el                          |   17 +
 lisp/emacs-lisp/eldoc.el                           |    8 +-
 lisp/emacs-lisp/elint.el                           |    9 +-
 lisp/emacs-lisp/let-alist.el                       |   15 +-
 lisp/emacs-lisp/lisp.el                            |    3 +-
 lisp/emacs-lisp/macroexp.el                        |   20 +-
 lisp/emacs-lisp/package-vc.el                      |   55 +-
 lisp/erc/erc-backend.el                            |   23 +-
 lisp/erc/erc-common.el                             |   22 +-
 lisp/erc/erc-fill.el                               |  267 +-
 lisp/erc/erc-goodies.el                            |  209 +-
 lisp/erc/erc-log.el                                |    4 +-
 lisp/erc/erc-match.el                              |   35 +-
 lisp/erc/erc-networks.el                           |   17 +-
 lisp/erc/erc-notify.el                             |    4 +-
 lisp/erc/erc-speedbar.el                           |    2 +-
 lisp/erc/erc-stamp.el                              |  248 +-
 lisp/erc/erc-track.el                              |    4 +-
 lisp/erc/erc-truncate.el                           |    2 +-
 lisp/erc/erc.el                                    |  605 ++-
 lisp/eshell/em-cmpl.el                             |    3 +-
 lisp/eshell/em-extpipe.el                          |  161 +-
 lisp/eshell/esh-arg.el                             |  261 +-
 lisp/eshell/esh-cmd.el                             |   43 -
 lisp/eshell/esh-io.el                              |    3 +-
 lisp/eshell/esh-mode.el                            |    3 +
 lisp/eshell/esh-proc.el                            |  100 +-
 lisp/eshell/esh-util.el                            |   51 +
 lisp/ffap.el                                       |    2 +-
 lisp/filenotify.el                                 |   14 +-
 lisp/files-x.el                                    |  117 +-
 lisp/files.el                                      |   69 +-
 lisp/gnus/gnus-sum.el                              |   40 +-
 lisp/gnus/message.el                               |   49 +-
 lisp/gnus/nnweb.el                                 |   39 +-
 lisp/help.el                                       |   12 +-
 lisp/ido.el                                        |    6 +-
 lisp/image-mode.el                                 |   18 +-
 lisp/leim/quail/cyrillic.el                        |    4 +-
 lisp/loadup.el                                     |   50 +-
 lisp/ls-lisp.el                                    |    7 +-
 lisp/menu-bar.el                                   |   17 +-
 lisp/mh-e/mh-mime.el                               |    1 +
 lisp/net/browse-url.el                             |    2 +-
 lisp/net/dictionary.el                             |   54 +-
 lisp/net/mairix.el                                 |    5 +-
 lisp/net/newst-backend.el                          |    4 +-
 lisp/net/nsm.el                                    |   24 +-
 lisp/net/rcirc.el                                  |    3 +-
 lisp/net/sieve-manage.el                           |    2 +-
 lisp/net/socks.el                                  |   30 +-
 lisp/net/tramp-cmds.el                             |    2 +-
 lisp/net/tramp-gvfs.el                             |    9 +-
 lisp/net/tramp-sh.el                               |   16 +-
 lisp/net/tramp-smb.el                              |    3 +
 lisp/net/tramp-sudoedit.el                         |    3 +
 lisp/net/tramp.el                                  |    5 +-
 lisp/net/trampver.el                               |    2 +-
 lisp/net/webjump.el                                |   55 +-
 lisp/org/ob-lua.el                                 |    2 +-
 lisp/org/ob-python.el                              |    4 +-
 lisp/org/org-agenda.el                             |    3 +-
 lisp/org/org-colview.el                            |    3 +-
 lisp/org/org-version.el                            |    4 +-
 lisp/org/org.el                                    |    2 +-
 lisp/pcmpl-unix.el                                 |    8 +
 lisp/pcomplete.el                                  |   36 +-
 lisp/printing.el                                   |    4 +-
 lisp/progmodes/cc-cmds.el                          |    3 +-
 lisp/progmodes/cc-defs.el                          |   84 +-
 lisp/progmodes/cc-engine.el                        |   13 +-
 lisp/progmodes/compile.el                          |    7 +-
 lisp/progmodes/cperl-mode.el                       |  168 +-
 lisp/progmodes/eglot.el                            |   67 +-
 lisp/progmodes/elisp-mode.el                       |    6 +-
 lisp/progmodes/etags.el                            |   19 +-
 lisp/progmodes/fortran.el                          |    2 +-
 lisp/progmodes/gud.el                              |  429 +-
 lisp/progmodes/js.el                               |    2 +-
 lisp/progmodes/lua-ts-mode.el                      |  428 +-
 lisp/progmodes/project.el                          |  100 +-
 lisp/progmodes/ruby-mode.el                        |    4 +-
 lisp/progmodes/sh-script.el                        |   13 +-
 lisp/progmodes/verilog-mode.el                     |    5 +-
 lisp/progmodes/xref.el                             |   21 +-
 lisp/simple.el                                     |    8 +-
 lisp/so-long.el                                    |   25 +-
 lisp/speedbar.el                                   |    2 +-
 lisp/subr.el                                       |   50 +-
 lisp/tab-bar.el                                    |    4 +-
 lisp/term.el                                       |    9 +-
 lisp/term/android-win.el                           |   58 +
 lisp/term/bobcat.el                                |    4 +-
 lisp/term/xterm.el                                 |    2 +-
 lisp/textmodes/dns-mode.el                         |    1 +
 lisp/thingatpt.el                                  |    4 +-
 lisp/touch-screen.el                               |   35 +-
 lisp/treesit.el                                    |   56 +-
 lisp/type-break.el                                 |    6 +-
 lisp/vc/ediff.el                                   |    6 +-
 lisp/vc/log-edit.el                                |    5 +-
 lisp/vc/smerge-mode.el                             |    6 +-
 lisp/vc/vc-git.el                                  |   21 +-
 lisp/vc/vc-hg.el                                   |   62 +-
 lisp/vc/vc-hooks.el                                |   98 +-
 lisp/vc/vc.el                                      |   60 +-
 lisp/window.el                                     |   65 +-
 lisp/woman.el                                      |   10 +-
 oldXMenu/ChangeLog.1                               |    4 +-
 src/.lldbinit                                      |    3 +
 src/ChangeLog.11                                   |   12 +-
 src/ChangeLog.4                                    |    2 +-
 src/android.c                                      |  227 +-
 src/android.h                                      |    2 +-
 src/androidfns.c                                   |   49 +-
 src/androidgui.h                                   |   52 +
 src/androidmenu.c                                  |   16 +-
 src/androidselect.c                                |   10 +-
 src/androidterm.c                                  |   93 +-
 src/androidvfs.c                                   |   28 +-
 src/dispnew.c                                      |    6 +-
 src/eval.c                                         |   10 +-
 src/frame.h                                        |    1 +
 src/gfilenotify.c                                  |    8 +-
 src/haiku_support.cc                               |   38 +-
 src/image.c                                        |   84 +-
 src/indent.c                                       |    4 +-
 src/inotify.c                                      |    7 +
 src/keyboard.c                                     |   72 +
 src/kqueue.c                                       |   10 +-
 src/lisp.h                                         |    1 +
 src/nsfns.m                                        |    7 +-
 src/nsmenu.m                                       |    4 +
 src/nsterm.m                                       |   44 +-
 src/pdumper.c                                      |    4 +
 src/print.c                                        |    2 +-
 src/process.c                                      |   16 +-
 src/sfnt.c                                         |  144 +-
 src/sfnt.h                                         |    6 +
 src/sfntfont-android.c                             |   37 +-
 src/sfntfont.c                                     |   75 +-
 src/textconv.c                                     |  168 +-
 src/textconv.h                                     |    3 +
 src/xdisp.c                                        |   14 +-
 src/xterm.c                                        |   14 +-
 test/lisp/align-resources/lua-ts-mode.erts         |   67 +
 test/lisp/align-tests.el                           |    9 +
 .../bytecomp-resources/no-byte-compile.el          |    2 +-
 test/lisp/emacs-lisp/bytecomp-tests.el             |   39 +-
 test/lisp/emacs-lisp/comp-cstr-tests.el            |   13 +-
 test/lisp/erc/erc-fill-tests.el                    |  135 +-
 test/lisp/erc/erc-networks-tests.el                |    7 +-
 test/lisp/erc/erc-scenarios-base-reuse-buffers.el  |    2 +
 test/lisp/erc/erc-scenarios-display-message.el     |   64 +
 test/lisp/erc/erc-scenarios-log.el                 |    3 +-
 test/lisp/erc/erc-scenarios-match.el               |  272 +-
 .../erc/erc-scenarios-scrolltobottom-relaxed.el    |    5 +-
 test/lisp/erc/erc-scenarios-stamp.el               |   90 +
 test/lisp/erc/erc-stamp-tests.el                   |    2 +-
 test/lisp/erc/erc-tests.el                         |  481 ++-
 .../erc/resources/base/assoc/multi-net/barnet.eld  |   12 +-
 .../erc/resources/base/assoc/multi-net/foonet.eld  |   12 +-
 .../resources/base/display-message/multibuf.eld    |   45 +
 .../resources/base/netid/bouncer/barnet-drop.eld   |    4 +-
 .../resources/base/netid/bouncer/foonet-drop.eld   |    6 +-
 .../erc/resources/base/renick/queries/solo.eld     |    2 +-
 .../base/reuse-buffers/channel/barnet.eld          |    2 +-
 .../base/reuse-buffers/channel/foonet.eld          |    2 +-
 .../resources/erc-d/resources/dynamic-foonet.eld   |    2 +-
 test/lisp/erc/resources/erc-scenarios-common.el    |    4 +-
 .../resources/fill/snapshots/merge-01-start.eld    |    2 +-
 .../resources/fill/snapshots/merge-02-right.eld    |    2 +-
 .../erc/resources/fill/snapshots/merge-wrap-01.eld |    2 +-
 .../fill/snapshots/monospace-01-start.eld          |    2 +-
 .../fill/snapshots/monospace-02-right.eld          |    2 +-
 .../resources/fill/snapshots/monospace-03-left.eld |    2 +-
 .../fill/snapshots/monospace-04-reset.eld          |    2 +-
 .../resources/fill/snapshots/spacing-01-mono.eld   |    2 +-
 .../resources/fill/snapshots/stamps-left-01.eld    |    2 +-
 test/lisp/erc/resources/join/network-id/foonet.eld |    4 +-
 .../foonet.eld => match/fools/fill-wrap.eld}       |   30 +-
 test/lisp/erc/resources/sasl/scram-sha-1.eld       |    2 +-
 test/lisp/erc/resources/sasl/scram-sha-256.eld     |    2 +-
 test/lisp/eshell/em-cmpl-tests.el                  |   32 +-
 test/lisp/eshell/em-extpipe-tests.el               |    8 +-
 test/lisp/eshell/esh-arg-tests.el                  |   63 +-
 test/lisp/eshell/eshell-tests.el                   |   19 +
 test/lisp/filenotify-tests.el                      |   68 +-
 test/lisp/files-tests.el                           |   18 +
 test/lisp/net/socks-tests.el                       |   84 +-
 test/lisp/net/tramp-tests.el                       |   11 +
 test/lisp/progmodes/compile-tests.el               |   26 +-
 .../cperl-mode-resources/cperl-bug-65834.pl        |    5 +
 .../cperl-mode-resources/cperl-bug-66145.pl        |   62 +
 .../cperl-mode-resources/cperl-bug-66161.pl        |   13 +
 test/lisp/progmodes/cperl-mode-tests.el            |   53 +
 .../progmodes/lua-ts-mode-resources/indent.erts    |  705 +++-
 .../progmodes/lua-ts-mode-resources/movement.erts  |  156 +-
 .../progmodes/sh-script-resources/sh-indents.erts  |    7 +
 test/lisp/progmodes/sh-script-tests.el             |   11 +
 test/src/comp-tests.el                             |    4 +-
 299 files changed, 14126 insertions(+), 5284 deletions(-)

diff --git a/.clang-format b/.clang-format
index 5c987536b0c..7929a7435f2 100644
--- a/.clang-format
+++ b/.clang-format
@@ -1,4 +1,3 @@
-Language: Cpp
 BasedOnStyle: GNU
 AlignEscapedNewlinesLeft: true
 AlignOperands: Align
@@ -35,6 +34,10 @@ PenaltyBreakBeforeFirstCallParameter: 2000
 SpaceAfterCStyleCast: true
 SpaceBeforeParens: Always
 UseTab: Always
+---
+Language: Cpp
+---
+Language: ObjC
 
 # Local Variables:
 # mode: yaml
diff --git a/ChangeLog.1 b/ChangeLog.1
index 654cb43d4dc..597b320dff4 100644
--- a/ChangeLog.1
+++ b/ChangeLog.1
@@ -1494,7 +1494,7 @@
 2014-01-05  Paul Eggert  <eggert@cs.ucla.edu>
 
        Port to GNU/Linux with recent grsecurity/PaX patches (Bug#16343).
-       Problem and proposed patch reported by Ulrich Mueller;
+       Problem and proposed patch reported by Ulrich Müller;
        this patch uses a somewhat-different approach.
        * configure.ac (SETFATTR): New variable.
 
diff --git a/ChangeLog.3 b/ChangeLog.3
index 85cccf0d6ed..a67f50668c6 100644
--- a/ChangeLog.3
+++ b/ChangeLog.3
@@ -3672,7 +3672,7 @@
        * lib-src/emacsclient.c (set_local_socket): Revert to the Emacs 27
        behavior of not trying TMPDIR if XDG_RUNTIME_DIR is set.
        This is one of the suggestions made by Jim Porter and
-       independently by Ulrich Mueller in Bug#51327.
+       independently by Ulrich Müller in Bug#51327.
 
 2021-12-09  Cameron Desautels  <camdez@gmail.com>
 
@@ -44923,7 +44923,7 @@
 
        * etc/NEWS: Announce the new 'cham' input method.
        * etc/HELLO: Fix the order of letters in the Cham greeting.
-       Remove redundant newlines (reported by Ulrich Mueller
+       Remove redundant newlines (reported by Ulrich Müller
        <ulm@gentoo.org>).
 
        * lisp/language/cham.el ("Cham"): Add input-method entry.
@@ -155306,7 +155306,7 @@
 
        Set group when installing, too
 
-       From a patch by Ulrich Mueller in:
+       From a patch by Ulrich Müller in:
        https://lists.gnu.org/r/emacs-devel/2018-06/msg00687.html
        * Makefile.in (set_installuser): Also set the group, in order
        to match install(1) behavior.  Also, don’t clutter stderr
@@ -161872,7 +161872,7 @@
 
        Port to 32-bit sparc64
 
-       Problem reported by Ulrich Mueller; fix suggested by Eli Zaretskii
+       Problem reported by Ulrich Müller; fix suggested by Eli Zaretskii
        and Andreas Schwab (Bug#30855).
        * src/alloc.c (mark_memory): Call mark_maybe_object only on
        pointers that are properly aligned for Lisp_Object.
@@ -178544,7 +178544,7 @@
        Port to 32-bit sparc64
 
        Backport from master.
-       Problem reported by Ulrich Mueller; fix suggested by Eli Zaretskii
+       Problem reported by Ulrich Müller; fix suggested by Eli Zaretskii
        and Andreas Schwab (Bug#30855).
        * src/alloc.c (mark_memory): Call mark_maybe_object only on
        pointers that are properly aligned for Lisp_Object.
diff --git a/ChangeLog.4 b/ChangeLog.4
index 372b03b32b2..24afabdbbb1 100644
--- a/ChangeLog.4
+++ b/ChangeLog.4
@@ -1,3 +1,1984 @@
+2023-10-16  Po Lu  <luangruo@yahoo.com>
+
+       Correctly register focus events concomitant with alpha changes
+
+       * src/xterm.c (x_frame_highlight, x_frame_unhighlight): Skip
+       changing the frame alpha when the frame is not eligible for
+       focus state-specific alpha values; otherwise, the alpha might be
+       reset by the time a alpha change wrought by a focus change
+       arrives, impeding handle_one_xevent from subsequently restoring
+       the initial value.  (bug#66398)
+
+2023-10-16  Michael Albinus  <michael.albinus@gmx.de>
+
+       * doc/man/emacsclient.1: Add missing options.
+
+2023-10-15  Michael Albinus  <michael.albinus@gmx.de>
+
+       Fix test in files-tests
+
+       * test/lisp/files-tests.el
+       (files-tests-file-name-non-special-expand-file-name-tilde): Fix test.
+
+2023-10-14  Stefan Kangas  <stefankangas@gmail.com>
+
+       Add missing :version to two defcustoms
+
+       * lisp/emacs-lisp/eldoc.el (eldoc-print-after-edit)
+       (eldoc-echo-area-prefer-doc-buffer): Add missing custom :version.
+
+2023-10-14  Mauro Aranda  <maurooaranda@gmail.com>
+
+       Fix a defcustom :type in eldoc.el
+
+       * lisp/emacs-lisp/eldoc.el (eldoc-echo-area-prefer-doc-buffer): Make
+       :type a choice, to allow for the value 'maybe'.  (Bug##66539)
+
+2023-10-14  Eshel Yaron  <me@eshelyaron.com>
+
+       Document 'M-x align' in the Emacs manual
+
+       * doc/emacs/indent.texi (Alignment): New section.
+       * doc/emacs/emacs.texi: Update menu. (Bug#66303)
+
+2023-10-14  Bob Rogers  <rogers@rgrjr.com>
+
+       Document that time-to-days and days-to-time use different epochs
+
+       * doc/lispref/os.texi (Time Calculations):
+       * lisp/calendar/time-date.el (days-to-time, time-to-days): Doc fixes.
+       (Bug#66502)
+
+2023-10-14  Michael Albinus  <michael.albinus@gmx.de>
+
+       * lisp/files.el (file-name-non-special): Handle quoted tilde.
+
+       (Bug#65685)
+
+       * test/lisp/files-tests.el
+       (files-tests-file-name-non-special-expand-file-name-tilde):
+       New test.
+
+2023-10-13  Michael Albinus  <michael.albinus@gmx.de>
+
+       Handle quoted tilde in Tramp
+
+       * lisp/net/tramp.el (tramp-handle-expand-file-name):
+       * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name):
+       * lisp/net/tramp-sh.el (tramp-sh-handle-expand-file-name):
+       * lisp/net/tramp-smb.el (tramp-smb-handle-expand-file-name):
+       * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-expand-file-name):
+       Handle quoted tilde.  (Bug#65685)
+
+       * test/lisp/net/tramp-tests.el (tramp-test05-expand-file-name-tilde):
+       New test.
+
+2023-10-09  Kyle Meyer  <kyle@kyleam.com>
+
+       Update to Org 9.6.10
+
+2023-10-09  Yuan Fu  <casouri@gmail.com>
+
+       Don't call font-lock-mode in treesit-major-mode-setup (bug#66223)
+
+       * lisp/treesit.el (treesit-major-mode-setup): Remove.
+
+       (cherry picked from commit a3a840c80a217db7d4d125c667ff7d4946507fbb)
+
+2023-10-09  Noah Peart  <noah.v.peart@gmail.com>
+
+       Fix treesit-query-validate for string input (bug#66400)
+
+       * lisp/treesit.el (treesit-query-validate): Don't expand if QUERY is
+       string.
+
+2023-10-07  Stefan Kangas  <stefankangas@gmail.com>
+
+       Recommend `M-x man` in woman.el docs
+
+       * lisp/woman.el (Commentary, woman): Recommend using 'M-x man' where
+       available.  The added sentence is copied from the emacs manual.
+       Ref: https://lists.gnu.org/r/emacs-devel/2023-10/msg00090.html
+
+2023-10-07  Eli Zaretskii  <eliz@gnu.org>
+
+       Fix updating process-mark position in 'set-process-buffer'
+
+       * src/process.c (update_process_mark): Update marker position only
+       if P's process-mark is not already associated with P's buffer.
+       (Bug#66313)
+
+2023-10-07  Mauro Aranda  <maurooaranda@gmail.com>
+
+       Fix a defcustom :type
+
+       * lisp/cedet/srecode/map.el (srecode-map-save-file): Expand :type to
+       allow nil.  (Bug#66377)
+
+2023-10-07  Eli Zaretskii  <eliz@gnu.org>
+
+       Fix 'ido--ffap-find-file'
+
+       * lisp/ido.el (ido--ffap-find-file): Make the signature consistent
+       with that of 'find-file', and pass the optional second argument to
+       'find-file'.  (Bug#66382)
+
+2023-10-06  Eli Zaretskii  <eliz@gnu.org>
+
+       Fix setting the pipe capacity for subprocesses
+
+       * src/process.c (create_process) [F_SETPIPE_SZ]: Set the pipe
+       capacity only if the required read-process-max is larger than the
+       default capacity of the pipe.  (Bug#66288)
+
+2023-10-05  Gerd Möllmann  <gerd@gnu.org>
+
+       Handle LANG on macOS differently (bug#65908)
+
+       * src/nsterm.m (ns_init_locale): If LANG is set, try to use that,
+       otherwise try to deduce what LANG should be.  Check is the result is
+       valid, and use LANG="en_US.UTF-8" if not.
+
+2023-10-05  Jens Schmidt  <jschmidt4gnu@vodafonemail.de>
+
+       Silence macro expansion during completion at point
+
+       To keep risk in the current release branch low, do not avoid compiler
+       macros as suggested by Stefan in the bug, but rather suppress all 
errors.
+
+       * lisp/progmodes/elisp-mode.el (elisp--local-variables): Silence
+       messages.  Suppress all errors during macro expansion.  (Bug#58148)
+
+       Do not merge to master.
+
+2023-10-05  Mauro Aranda  <maurooaranda@gmail.com>
+
+       Fix a defcustom :type
+
+       * lisp/cedet/ede/base.el (ede-project-placeholder-cache-file): Expand
+       :type to allow nil.  (Bug#66361)
+
+2023-10-04  Mauro Aranda  <maurooaranda@gmail.com>
+
+       Fix pulse-flag :type
+
+       * lisp/cedet/pulse.el (pulse-flag): Expand :type to allow 'never as
+       value.  (Bug#66341)
+
+2023-10-03  Mauro Aranda  <maurooaranda@gmail.com>
+
+       Fix defcustoms in timeclock.el
+
+       * lisp/calendar/timeclock.el (timeclock-get-project-function)
+       (timeclock-get-reason-function): Fix :type to allow nil.  (Bug#66320)
+
+2023-10-01  Stefan Kangas  <stefankangas@gmail.com>
+
+       Improve documentation of `ns-use-proxy-icon`
+
+       * doc/emacs/macos.texi (Mac / GNUstep Customization):
+       * src/nsfns.m (syms_of_nsfns): Fix documentation of
+       'ns-use-proxy-icon'; explain what it does and how it's
+       used.  (Bug#66190)
+
+2023-10-01  Stefan Kangas  <stefankangas@gmail.com>
+
+       Document assigning libraries to packages in make-tarball.txt
+
+       * admin/make-tarball.txt: Add new step to ensure that new libraries
+       are assigned to packages.
+
+2023-10-01  Stefan Kangas  <stefankangas@gmail.com>
+
+       Doc fix; more consistently refer to "text terminals"
+
+       In the Emacs Lisp manual, we refer to "text terminals" and "graphical
+       terminals" (see Info node `(elisp) Frames').  But in some places,
+       including the user manual, the alternative terminology "non-window
+       terminals" is used instead.
+
+       In other places, we use the terminology "non-windowing display"
+       instead of the more canonical "non-graphical display".
+
+       This is less clear than it could be.  Let's consolidate our
+       terminology to prefer the wording from the Emacs Lisp manual; in other
+       words, prefer "text" and "non-graphical" to "non-window".
+
+       * doc/emacs/frames.texi (Non-Window Terminals): Rename node from this...
+       (Text Terminals): ...to this.  (Bug#66282)
+       * doc/emacs/display.texi (Standard Faces):
+       * doc/emacs/emacs.texi (Top):
+       * doc/emacs/misc.texi (emacsclient Options):
+       * doc/misc/viper.texi (Rudimentary Changes)
+       (Packages that Change Keymaps):
+       * doc/emacs/frames.texi (Frames, Frame Commands, Mouse Avoidance):
+       Replace instances of "non-window terminals" with "text terminals".
+       * doc/misc/ediff.texi (Quick Help Customization):
+       (Window and Frame Configuration):
+       * lisp/vc/ediff.el (ediff-windows-wordwise)
+       (ediff-windows-linewise): Prefer saying 'non-graphical display' to
+       'non-windowing display'.
+       * lisp/net/tramp.el (tramp-default-method):
+       * lisp/printing.el (pr-find-command): Capitalize 'Windows' where it
+       clearly refers to the non-free operating system with that name.
+
+2023-09-30  Mauro Aranda  <maurooaranda@gmail.com>
+
+       Fix defcustoms in type-break.el (Bug#66210)
+
+       * lisp/type-break.el (type-break-good-rest-interval)
+       (type-break-file-name): Allow nil.
+
+2023-09-30  Mauro Aranda  <maurooaranda@gmail.com>
+
+       Fix term-scroll-to-bottom-on-output :type
+
+       * lisp/term.el (term-scroll-to-bottom-on-output): Add missing choices.
+       Don't advertise the value 'all' in docstring.  (Bug#66071)
+
+2023-09-28  Stefan Kangas  <stefankangas@gmail.com>
+
+       Doc fix in let-alist for keys with nil value
+
+       * lisp/emacs-lisp/let-alist.el (let-alist): Clarify that keys with a
+       nil value will give the same result as if they were missing.
+
+2023-09-28  Michael Albinus  <michael.albinus@gmx.de>
+
+       Fix tramp-test.el (don't merge with master)
+
+       * test/lisp/net/tramp-tests.el (tramp--test-check-files):
+       Don't err out when "printenv" doesn't exist on remote side.
+
+2023-09-25  Michael Albinus  <michael.albinus@gmx.de>
+
+       Improve Emacs 30 compatibility in tramp-tests.el (don't merge)
+
+       * test/lisp/net/tramp-tests.el 
(tramp--test-deftest-direct-async-process)
+       (tramp-test30-make-process): Improve Emacs 30 compatibility.
+
+2023-09-25  Michael Albinus  <michael.albinus@gmx.de>
+
+       Add new Tramp test
+
+       * test/lisp/net/tramp-tests.el (tramp-test46-read-password):
+       Use `copy-tree' but `copy-sequence'.
+       (tramp-test46-read-otp-password): New test.
+
+2023-09-25  Mauro Aranda  <maurooaranda@gmail.com>
+
+       Fix tmm-mid-prompt :type (Bug#66179)
+
+       * lisp/tmm.el (tmm-mid-prompt): Allow nil.
+
+2023-09-24  Augustin Chéneau  <btuin@mailo.com>  (tiny change)
+
+       Fix tree-sitter indentation conflict with multiple languages
+
+       * lisp/treesit.el (treesit--indent-1): Use bol instead of point.
+
+2023-09-24  Michael Albinus  <michael.albinus@gmx.de>
+
+       Fix bug#66093 in Tramp
+
+       * lisp/net/tramp-sshfs.el (tramp-methods): Use "%a".
+       (tramp-sshfs-handle-process-file): Replace ?a by "-t".
+
+       * lisp/net/tramp.el (tramp-methods): Adapt docstring.  (Bug#66093)
+       (tramp-handle-make-process): Replace ?a by "-t" if indicated.
+
+2023-09-24  Eli Zaretskii  <eliz@gnu.org>
+
+       Support regeneration of ja-dic.el under '--with-small-ja-dic'
+
+       * lisp/international/ja-dic-cnv.el (skkdic-convert): Record the
+       value of SMALL_JA_DIC option used to produce ja-dic.el.
+       * leim/Makefile.in (small-ja-dic-option): New target, triggers
+       regeneration of ja-dic.el when the value of SMALL_JA_DIC option
+       changes by the configure script.  Suggested by Ulrich Müller
+       <ulm@gentoo.org>.
+       (${leimdir}/ja-dic/ja-dic.el): Depend on 'small-ja-dic-option'.
+       (Bug#66125)
+
+       * make-dist (possibly_non_vc_files):
+       * .gitignore: Add 'leim/small-ja-dic-option'.
+
+2023-09-22  Basil L. Contovounesios  <contovob@tcd.ie>
+
+       Improve remote-file-name-inhibit-cache :type
+
+       * lisp/files.el (remote-file-name-inhibit-cache)
+       (shell-highlight-undef-remote-file-name-inhibit-cache): Avoid
+       duplicated :tag string.  Try to clarify wording and
+       formatting (bug#66150).
+       * lisp/shell.el (shell--highlight-undef-exec-cache): Reference
+       correct user option in docstring.
+
+2023-09-22  Stefan Kangas  <stefankangas@gmail.com>
+
+       Ensure bind-key is its own package
+
+       * lisp/finder.el (finder--builtins-alist): Remove "use-package"
+       directory.
+       * lisp/use-package/bind-key.el: Declare library as part of the
+       'bind-key' package.
+       * lisp/use-package/use-package-bind-key.el:
+       * lisp/use-package/use-package-core.el:
+       * lisp/use-package/use-package-delight.el:
+       * lisp/use-package/use-package-diminish.el:
+       * lisp/use-package/use-package-ensure-system-package.el:
+       * lisp/use-package/use-package-ensure.el:
+       * lisp/use-package/use-package-jump.el:
+       * lisp/use-package/use-package-lint.el: Declare library as part of the
+       'use-package' package.  (Bug#62751)
+
+       Do not merge to master.
+
+2023-09-21  Michael Albinus  <michael.albinus@gmx.de>
+
+       * lisp/net/tramp.el (tramp-skeleton-write-region): Fix missing comma.
+
+       (Bug#66123)
+
+2023-09-18  Yuan Fu  <casouri@gmail.com>
+
+       Fix tree-sitter range update function
+
+       * lisp/treesit.el (treesit-update-ranges): If an embedded language
+       doesn't have any range, don't set its range to nil (which means whole
+       buffer), instead, set its range to a dummy (1 . 1) zero range.
+
+2023-09-18  Ihor Radchenko  <yantar92@posteo.net>
+
+       Announce handling 'org-protocol' URI scheme in NEWS
+
+       * etc/NEWS: Document handling 'org-protocol' URI scheme.  The commit
+       implementing the new functionality is 05a7c91b91c.  (Bug#65469)
+
+2023-09-18  Ihor Radchenko  <yantar92@posteo.net>
+
+       Make emacsclient handle org-protocol:// links
+
+       Org mode provides a way to quickly capture bookmarks, notes, and links
+       using emacsclient:
+
+           emacsclient "org-protocol://store-link?url=URL&title=TITLE"
+
+       * etc/emacsclient.desktop: Make Emacs the default application for
+       org-protocol.  (Bug#65469)
+
+       (cherry picked from commit 05a7c91b91c02c34ec6527119a465e5408dea2b1)
+
+2023-09-18  Robert Pluim  <rpluim@gmail.com>
+
+       Ensure ucs-names is consistent with Unicode names
+
+       * lisp/international/mule-cmds.el (ucs-names): Skip adding an old-name
+       if it conflicts with the offical name of a codepoint.  Adjust the
+       ranges iterated over to account for new Unicode codepoints.
+       * test/lisp/international/mule-tests.el
+       (mule-cmds-tests--ucs-names-old-name-override,
+       mule-cmds-tests--ucs-names-missing-names): New tests for checking
+       'ucs-names' consistency.
+
+       Bug#65997
+
+2023-09-18  Shynur  <one.last.kiss@outlook.com>
+
+       Make key-translate actually work
+
+       * lisp/keymap.el (key-translate): Use the first element of the parsed
+       keys rather than the whole vector.  (Bug#65735)
+
+2023-09-17  Kyle Meyer  <kyle@kyleam.com>
+
+       Update to Org 9.6.9
+
+2023-09-17  Stefan Kangas  <stefankangas@gmail.com>
+
+       Add leim subdirectories to emacs package
+
+       * lisp/finder.el (finder--builtins-alist): Add subdirectories
+       'leim/ja-dic' and 'leim/quail' as part of the 'emacs'
+       package.  (Bug#62751)
+
+2023-09-17  Stefan Kangas  <stefankangas@gmail.com>
+
+       Add missing builtin package declarations
+
+       * lisp/finder.el (finder--builtins-alist): Add new package
+       directories 'leim' and 'obsolete' as part of the 'emacs' package.
+       Add new package directory 'use-package' as part of the
+       'use-package' package.
+       * lisp/net/eudc-capf.el:
+       * lisp/net/eudcb-ecomplete.el:
+       * lisp/net/eudcb-macos-contacts.el:
+       * lisp/net/eudcb-mailabbrev.el: Declare library as part of the
+       'eudc' package.
+       * lisp/mail/ietf-drums-date.el: Declare library as part of the
+       'ietf-drums' package.
+       * lisp/image/image-dired-dired.el:
+       * lisp/image/image-dired-external.el:
+       * lisp/image/image-dired-tags.el:
+       * lisp/image/image-dired-util.el: Declare library as part of the
+       'image-dired' package.
+       * lisp/emacs-lisp/oclosure.el:
+       * lisp/keymap.el:
+       * lisp/progmodes/c-ts-common.el: Declare library as part of the
+       'emacs' package.  (Bug#62751)
+
+       (cherry picked from commit 94b1de2774b5c1fa3c28285229900657638f5c3f)
+
+2023-09-17  Stefan Kangas  <stefankangas@gmail.com>
+
+       Add more missing builtin package declarations
+
+       * lisp/emacs-lisp/shorthands.el: Declare library as part of the
+       'emacs' package.
+       * lisp/epa-ks.el: Declare library as part of the 'epa'
+       package.  (Bug#55388)
+
+2023-09-17  Stefan Kangas  <stefankangas@gmail.com>
+
+       Document shell-command-to-string security considerations
+
+       * lisp/simple.el (shell-command-to-string): Document security
+       considerations in docstring.
+
+2023-09-17  Mauro Aranda  <maurooaranda@gmail.com>
+
+       Fix shell-indirect-setup-hook :type (Bug#66051)
+
+       * lisp/shell.el (shell-indirect-setup-hook): It's a hook, not a
+       boolean.
+
+2023-09-17  Thomas Hilke  <t.hilke@rollomatic.ch>  (tiny change)
+
+       Remove column quoting from sqlite-mode
+
+       * lisp/sqlite-mode.el (sqlite-mode--column-names): Unquote column
+       name.  (Bug#65998)
+
+2023-09-17  Theodor Thornhill  <theo@thornhill.no>
+
+       Add indentation rules for type_arguments
+
+       * lisp/progmodes/java-ts-mode.el (java-ts-mode--indent-rules): Indent
+       as opening braces.
+
+2023-09-16  Dmitry Gutov  <dmitry@gutov.dev>
+
+       typescript-ts-mode.el: Minor touches
+
+       * lisp/progmodes/typescript-ts-mode.el
+       (tsx-ts-mode--indent-compatibility-b893426)
+       (tsx-ts-mode--font-lock-compatibility-bb1f97b):
+       Catch specific error.
+       (typescript-ts-base-mode): Improve docstring (bug#65470).
+
+2023-09-16  Dmitry Gutov  <dmitry@gutov.dev>
+
+       Improve namespacing situation WRT to recent change in 
typescript-ts-mode.el
+
+       * lisp/progmodes/typescript-ts-mode.el
+       (typescript-ts--syntax-propertize):
+       Rename from ts-ts--syntax-propertize.
+       (tsx-ts--syntax-propertize-captures):
+       Rename from ts-ts--syntax-propertize-captures.
+       (typescript-ts--s-p-query):
+       Rename from ts-ts--s-p-query.
+       Update all references (bug#65470).
+
+2023-09-16  Stephen Berman  <stephen.berman@gmx.net>
+
+       Make move-end-of-line in minibuffer consistent (bug#65980)
+
+       * lisp/simple.el (move-end-of-line): Always move to eol when
+       invoking `C-e' from within the minibuffer's prompt string.
+
+2023-09-16  Jens Schmidt  <jschmidt4gnu@vodafonemail.de>
+
+       Fix loss of encrypted data in plstore.el
+
+       * lisp/plstore.el (plstore--insert-buffer): Fix loss of encrypted
+       data when a plstore gets opened and saved without being decrypted
+       between these steps.  (Bug#63627)
+
+2023-09-16  Thomas Hilke  <t.hilke@rollomatic.ch>  (tiny change)
+
+       Close SQL database when corresponding 'sqlite-mode' buffer is killed
+
+       * lisp/sqlite-mode.el (sqlite-mode-open-file): Close DB when the
+       buffer is killed.  (Bug#65998)
+
+2023-09-16  Eli Zaretskii  <eliz@gnu.org>
+
+       Fix Unicode normalization of characters
+
+       * lisp/international/ucs-normalize.el
+       (ucs-normalize-composition-exclusions, check-range): Update from
+       Unicode 15.0 data.  (Bug#65996)
+
+       * test/lisp/international/ucs-normalize-tests.el
+       (ucs-normalize-tests--failing-lines-part1)
+       (ucs-normalize-tests--failing-lines-part2): Update to reflect
+       changes in ucs-normalize.el.
+
+       * admin/notes/unicode: Mention the updates in ucs-normalize.el.
+
+2023-09-16  Michael Albinus  <michael.albinus@gmx.de>
+
+       Support one-time passwords in Tramp
+
+       * doc/misc/tramp.texi (Remote shell setup):
+       Describe tramp-otp-password-prompt-regexp.
+
+       * lisp/net/tramp-sh.el (tramp-actions-before-shell)
+       (tramp-actions-copy-out-of-band):
+       Use `tramp-otp-password-prompt-regexp'.
+
+       * lisp/net/tramp.el (tramp-otp-password-prompt-regexp): New defcustom.
+       (tramp-action-otp-password): New defun.
+
+2023-09-16  Eli Zaretskii  <eliz@gnu.org>
+
+       Fix the 'C' and 'c' categories of characters
+
+       * lisp/international/characters.el: Fix categories of Chinese
+       characters.  (Bug65995)
+
+2023-09-16  Eli Zaretskii  <eliz@gnu.org>
+
+       Fix Emoji zooming commands
+
+       * lisp/international/emoji.el (emoji-zoom-increase): Handle the
+       case where face property at point is a list of faces.  (Bug#65994)
+
+2023-09-15  Dmitry Gutov  <dmitry@gutov.dev>
+
+       tsx-ts-mode--font-lock-compatibility-bb1f97b: Improve
+
+       * lisp/progmodes/typescript-ts-mode.el
+       (tsx-ts-mode--font-lock-compatibility-bb1f97b):
+       Test the more complex query, because the current one leads to
+       false positives (mentioned in bug#65470).
+
+2023-09-15  Davide Masserut  <dm@mssdvd.com>
+
+       Avoid using --display in emacsclient to reuse frames on PGTK
+
+       Using hard-coded display values can cause PGTK graphical frames to
+       open using the wrong backend or not open at all.
+       * Makefile.in (install-etc): Use --reuse-frame instead of
+       --display=$DISPLAY.  (Bug#65509)
+
+2023-09-15  Eli Zaretskii  <eliz@gnu.org>
+
+       Support emacsclient on Windows with server on GNU or Unix systems
+
+       * lisp/server.el (server-process-filter): If 'tty-name' is literally
+       "CONOUT$", assume the client runs on MS-Windows and force the
+       frame type to GUI.  This allows to run emacsclient on MS-Windows
+       when the server runs on a Posix host.  (Bug#65812)
+
+2023-09-14  Mauro Aranda  <maurooaranda@gmail.com>
+
+       Fix defcustom in saveplace.el (Bug#65977)
+
+       * lisp/saveplace.el (save-place-ignore-files-regexp): Allow nil.
+
+2023-09-14  Eli Zaretskii  <eliz@gnu.org>
+
+       Fix 'window-text-pixel-size' when there are several images at START
+
+       * src/xdisp.c (window_text_pixel_size): Remove unnecessary call to
+       'move_it_to'.  (Bug#65899)  (Bug#54862)
+
+2023-09-14  Eli Zaretskii  <eliz@gnu.org>
+
+       : Doc fix.
+
+       * lisp/progmodes/prog-mode.el
+       (prettify-symbols-unprettify-at-point): Doc fix.
+
+2023-09-14  Stefan Kangas  <stefankangas@gmail.com>
+
+       Doc fix for prettify-symbols-unprettify-at-point
+
+       * lisp/progmodes/prog-mode.el
+       (prettify-symbols-unprettify-at-point): Document that it has to be
+       set before enabling 'prettify-symbols-mode'.  (Bug#65884)
+
+2023-09-13  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       (report_overlay_modification): Fix bug#65929
+
+       Somehow the new overlay code in Emacs-29 changed slightly
+       the test to decide when to run the `modification-hooks` of overlays,
+       with the consequence that these hook functions end up being executed
+       also when text is deleted right after an empty overlay, which is
+       contrary to Emacs-28 behavior as well as contrary to the Texinfo doc.
+
+       * src/buffer.c (report_overlay_modification): Better reproduce the
+       Emacs-28 code.
+
+       * test/src/buffer-tests.el (overlay-modification-hooks):
+       Add corresponding test.
+
+2023-09-13  Alan Third  <alan@idiocy.org>
+
+       Fix SVG colors (bug#56182)
+
+       * src/image.c (svg_load_image): Reverse the R and B bytes in the
+       Windows colors before using them to generate the SVG.
+
+2023-09-13  Juri Linkov  <juri@linkov.net>
+
+       * doc/emacs/text.texi (Outline Minor Mode): Add a note about value 
'insert'.
+
+       * lisp/outline.el (outline-minor-mode-use-buttons): Add a note and
+       a comment about the value 'insert' (bug#65874).
+
+2023-09-13  Eli Zaretskii  <eliz@gnu.org>
+
+       Improve documentation of 'list-abbrevs'
+
+       * doc/emacs/abbrevs.texi (Editing Abbrevs): Describe how system
+       abbrevs are shown by 'list-abbrevs'.  Suggested by Shynur Xie
+       <one.last.kiss@outlook.com>.  (Bug#65907)
+
+2023-09-12  Dmitry Gutov  <dmitry@gutov.dev>
+
+       Tweak s-p-f for js-ts-mode
+
+       * lisp/progmodes/js.el (js-ts--s-p-query):
+       Consider two more contexts (bug#65470).
+
+2023-09-12  Jostein Kjønigsen  <jostein@kjonigsen.net>
+
+       typescript-ts-mode, tsx-ts-mode: Fix syntax properties for regexp and 
jsx
+
+       Propertize regexps as strings and JSX elements as generic strings.
+
+       * lisp/progmodes/typescript-ts-mode.el (ts-ts--s-p-query)
+       (tsx-ts--s-p-query): New variables.
+       (ts-ts--syntax-propertize, tsx-ts--syntax-propertize)
+       (ts-ts--syntax-propertize-captures): New functions.
+       (typescript-ts-mode, tsx-ts-mode): Use them (bug#65470).
+
+2023-09-12  Eli Zaretskii  <eliz@gnu.org>
+
+       * lisp/progmodes/c-ts-mode.el (c++-ts-mode): Provide (bug#65895).
+
+2023-09-11  Yuan Fu  <casouri@gmail.com>
+
+       Fix regression of treesit_cursor_helper_1
+
+       * src/treesit.c (treesit_cursor_helper_1)
+       (treesit_cursor_first_child_for_byte): Use
+       ts_tree_cursor_goto_first_child_for_byte first, and
+       ts_tree_cursor_goto_first_child second.
+
+2023-09-10  Stefan Kangas  <stefankangas@gmail.com>
+
+       Update docs for passing of Thien-Thi Nguyen
+
+       * doc/emacs/ack.texi (Acknowledgments): Add Thien-Thi Nguyen.
+       * lisp/play/zone.el: Set maintainer to emacs-devel.
+
+2023-09-10  Stefan Kangas  <stefankangas@gmail.com>
+
+       Update defvar usage tips example in manual
+
+       * doc/lispref/variables.texi (Tips for Defining): Change example
+       to be about syntax tables instead of old way of defining keymaps
+       using 'defvar' and 'make-sparse-keymap'.  (Bug#59224)
+
+2023-09-10  Stefan Kangas  <stefankangas@gmail.com>
+
+       Document using Flymake together with Eglot
+
+       * doc/misc/flymake.texi (Top, Using Flymake): Document using
+       Flymake together with Eglot.  (Bug#60040)
+
+2023-09-08  Mauro Aranda  <maurooaranda@gmail.com>
+
+       Fix defcustom :type of ielm-indirect-setup-hook
+
+       * lisp/ielm.el (ielm-indirect-setup-hook): Fix :type and remove :safe
+       property, since it was probably a copy-pasta.  (Bug#65821)
+
+2023-09-08  Stefan Kangas  <stefankangas@gmail.com>
+
+       Document NonGNU ELPA in FAQ
+
+       * doc/misc/efaq.texi (Packages that do not come with Emacs):
+       Document NonGNU ELPA.  (Bug#65818)
+
+2023-09-07  Jim Porter  <jporterbugs@gmail.com>
+
+       Fix remote path setting in Eshell
+
+       This ensures that we supply Tramp with the local PATH so that it can
+       do its job of starting the local "ssh", or whatever the method uses
+       (bug#65551).
+
+       * lisp/eshell/esh-proc.el (eshell-gather-process-output): Add special
+       handling for remote processes.
+
+       * test/lisp/eshell/esh-proc-tests.el
+       (esh-var-test/remote/remote-path): New test.
+
+2023-09-07  Stefan Kangas  <stefankangas@gmail.com>
+
+       Update docs for (co-)maintainer changes
+
+       * admin/MAINTAINERS: Add information on current maintainers as a
+       canonical place to find this information.
+       * doc/emacs/ack.texi (Acknowledgments): Update for recent
+       Emacs (co-)maintainer changes.
+       * admin/make-tarball.txt: Add note as a reminder to update the above
+       before making a new release.
+
+2023-09-07  Sebastian Miele  <iota@whxvd.name>
+
+       * doc/lispref/strings.texi (Text Comparison): Fix typo (bug#65799).
+
+2023-09-07  Michael Albinus  <michael.albinus@gmx.de>
+
+       Adapt Tramp manual
+
+       * doc/misc/tramp.texi (Frequently Asked Questions): Do not use
+       `defadvice'.  Add indices.  (Bug#65481)
+
+2023-09-07  Stefan Kangas  <stefankangas@gmail.com>
+
+       Improve docstring of message-sendmail-envelope-from
+
+       * lisp/gnus/message.el (message-sendmail-envelope-from): Doc fix.
+
+2023-09-07  Philipp Stephani  <phst@google.com>
+
+       Unbreak builds with CHECK_STRUCTS.
+
+       * src/pdumper.c (dump_buffer): Fix hash for 'struct buffer'.  The
+       recent changes to that structure where commits
+       8f3091defb3ec4396ccea563f67c005044b822ca and
+       0bd46619413e83fe3c85c8a1dfbf5e20dfce8605, both of which just affected
+       comments.
+
+2023-09-07  Jens Schmidt  <jschmidt4gnu@vodafonemail.de>
+
+       Improve documentation of EPG
+
+       * lisp/epg.el (epg-context-set-passphrase-callback): Update
+       GnuPG-version-dependent information in docstring and refer to
+       Info node `(epa)' for details.
+       (epg-start-edit-key): Replace description of arguments by a
+       reference to `epg-edit-key'.
+       (epg-edit-key): More precisely describe callback operation and
+       arguments and provide an example of how to edit a key.  (Bug#65603)
+
+2023-09-07  Daniel Martín  <mardani29@yahoo.es>
+
+       Avoid crashes on macOS with context menus
+
+       * src/nsmenu.m ([EmacsMenu menuNeedsUpdate:]): Avoid crashes with
+       context menus.  (Bug#63495)
+
+2023-09-07  Yuan Fu  <casouri@gmail.com>
+
+       Fix c-ts-mode BSD style indentation
+
+       * lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles):
+       Add else_clause.
+
+       (cherry picked from commit d392a5d3c11b7e7479d31421f8237f29952c909e)
+
+2023-09-06  David Ponce  <da_vid@orange.fr>
+
+       Fix regexp for recognizing PBM images
+
+       * lisp/image.el (image-type-header-regexps): Don't use [:space:],
+       as its meaning depends on the current buffer's syntax tables.
+       (Bug#65496)
+
+2023-09-06  Eli Zaretskii  <eliz@gnu.org>
+
+       Improve wording in ELisp manual
+
+       * doc/lispref/objects.texi (Printed Representation): Improve
+       wording.  Suggested by Xie Shynur <one.last.kiss@outlook.com>.
+       (Bug# 60639)
+
+2023-09-06  Joseph Turner  <joseph@breatheoutbreathe.in>
+
+       Fix typo (Bug#65764)
+
+       * lisp/subr.el (backward-word-strictly): Fix typo.
+
+2023-09-05  Po Lu  <luangruo@yahoo.com>
+
+       Fix libgccjit build on Haiku
+
+       * configure.ac (LIBGCCJIT_LIBS): Link only with -lgccjit under
+       Haiku.
+
+2023-09-05  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       (regexp-tests-backtrack-optimization): Mark it as failing
+
+       * test/src/regex-emacs-tests.el (regexp-tests-backtrack-optimization):
+       The fix for bug#65726 broke some of the optimization added for 
bug#61514.
+
+2023-09-04  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * src/regex-emacs.c (mutually_exclusive_p): Fix inf-loop (bug#65726)
+
+2023-09-04  Stefan Kangas  <stefankangas@gmail.com>
+
+       Bump seq version to 2.24
+
+       * lisp/emacs-lisp/seq.el: Bump version to 2.24.  (Bug#60990)
+
+2023-09-04  Stefan Kangas  <stefankangas@gmail.com>
+
+       Add note on ELPA to admin/notes/bug-triage
+
+       * admin/notes/bug-triage: Add section on (Non-)GNU ELPA packages and
+       do some copy editing.
+
+2023-09-02  Po Lu  <luangruo@yahoo.com>
+
+       * etc/PROBLEMS: Mention bug#65432 and its remedy.
+
+2023-09-02  Theodor Thornhill  <theo@thornhill.no>
+
+       Ignore errors when checking for object initializers (bug#63379)
+
+       Since this is merely a check for syntax, we don't really care about
+       any internal errors inside of backward-up-list.
+
+       * lisp/progmodes/csharp-mode.el (csharp-guess-basic-syntax): Wrap
+       command in ignore-errors.
+
+2023-09-02  Stefan Kangas  <stefankangas@gmail.com>
+
+       * CONTRIBUTE: Document making ChangeLogs with Magit.
+
+2023-09-02  Stefan Kangas  <stefankangas@gmail.com>
+
+       Doc fixes for obsolete functions and variables
+
+       * admin/notes/multi-tty:
+       * doc/emacs/building.texi (Debugger Operation):
+       * doc/misc/efaq-w32.texi (Line ends by file system):
+       * doc/misc/gnus.texi (Hashcash):
+       * lisp/emacs-lisp/eieio.el (eieio-class-parents)
+       (eieio-class-children):
+       * lisp/progmodes/perl-mode.el:
+       * lisp/textmodes/ispell.el (ispell-lookup-words):
+       * src/buffer.h: Update or delete references to variables and functions
+       made obsolete in Emacs 24.4.
+
+2023-09-02  Mauro Aranda  <maurooaranda@gmail.com>
+
+       A revision to the Widget manual
+
+       * doc/misc/widget.texi (Widgets Basics, Working with Widgets)
+       (Widgets and the Buffer, Widget Gallery, Customization): New chapters.
+       (Basic Types, Sexp Types): Demote to subsections.
+       (Widget Browser): Rename to Inspecting Widgets.
+       (Widget Properties): Remove.
+
+       (Top): Adapt menu to changes.
+       (Introduction): Rearrange text.  Move warnings to a better place, and
+       user options to the Customization chapter.
+       (User Interface): Don't fully describe commands and customization
+       options here.
+       (Setting Up the Buffer): Expand on widget creation process and add
+       documentation for useful functions which deal with
+       creation/conversion.
+       (Defining New Widgets): Expand the documentation on define-widget.
+       All relevant properties moved to the description of the default
+       widget, in Widget Gallery.
+       (Utilities): Add some more useful functions not previously documented.
+       (Wishlist): Remove out-of-date items.
+
+2023-09-02  Stefan Kangas  <stefankangas@gmail.com>
+
+       Fix fontification of " in edit-kbd-macro
+
+       * lisp/edmacro.el (edit-kbd-macro): Fix fontification when editing
+       keyboard macros containing the " character.
+
+2023-09-02  Eli Zaretskii  <eliz@gnu.org>
+
+       * lisp/emacs-lisp/gv.el (buffer-local-value): Unobsolete (bug#65555).
+
+2023-09-02  Jens Schmidt  <jschmidt4gnu@vodafonemail.de>
+
+       Add documentation to plstore.el
+
+       * lisp/plstore.el: Add link to epa manual.  Describe more
+       restrictions.  Fix a typo in the examples.  Fix terminology.  Mark
+       FIXMEs as such.
+       * lisp/plstore.el (plstore-save): Describe edge case when no recipient
+       matches and mark as FIXME.  (Bug#63627)
+
+2023-09-01  Stefan Kangas  <stefankangas@gmail.com>
+
+       * lisp/help.el (substitute-quotes): Improve docstring.
+
+2023-09-01  Stefan Kangas  <stefankangas@gmail.com>
+
+       Fix two defcustom :types
+
+       * lisp/frame.el (blink-cursor-blinks):
+       * lisp/url/url-vars.el (url-max-redirections): Revert defcustom :types
+       back to integer.  (Bug#65655)
+
+2023-09-01  Manuel Giraud  <manuel@ledu-giraud.fr>
+
+       Fix `image-auto-resize-on-window-resize' custom :type
+
+       * lisp/image-mode.el (image-auto-resize-on-window-resize): Change
+       custom :type from integer to number to be able to set below 1
+       second.  (Bug#65626)
+
+2023-09-01  Ross Timson  <me@rosstimson.com>  (tiny change)
+
+       Add "terraform-ls" LSP server to Eglot
+
+       * lisp/progmodes/eglot.el (eglot-server-programs): Add "terraform-ls",
+       the official Terraform LSP server.  (Bug#65671)
+
+2023-09-01  Eli Zaretskii  <eliz@gnu.org>
+
+       Fix minor bugs in vc-git and vc-hg on Windows uncovered by vc-tests
+
+       * lisp/vc/vc-hg.el (vc-hg-state-slow): Non-existing files emit a
+       different message on MS-Windows; support that.
+       * lisp/vc/vc-git.el (vc-git-checkin): Make sure
+       'default-directory' is not nil when calling
+       'make-nearby-temp-file' on MS-Windows.
+
+       * test/lisp/vc/vc-tests.el (vc-test--version-diff): Run
+       'default-directory' through 'file-truename', otherwise the
+       'vc-test-cvs06-version-diff' test might fail on MS-Windows.
+
+2023-08-31  Dmitry Gutov  <dmitry@gutov.dev>
+
+       Add syntax-propertize-function to js-ts-mode
+
+       * lisp/progmodes/js.el (js-ts--s-p-query):
+       New variable (bug#65470).
+       (js-ts--syntax-propertize): New function.
+       (js-ts-mode): Use it.
+
+2023-08-30  Yuan Fu  <casouri@gmail.com>
+
+       Improve performance of treesit_cursor_helper_1
+
+       * src/treesit.c: (treesit_cursor_helper_1): Use
+       ts_tree_cursor_goto_first_child_for_byte to speed up traversing among
+       siblings.  The "while (ts_node_end_byte (cursor_node) < end_pos)" can
+       be removed with the check added in the loop below.
+
+2023-08-28  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * lisp/subr.el (combine-change-calls-1): Fix bug#64989
+
+       Silence the spurious warning, and improve the warning while at it.
+       Do not merge to master.
+
+2023-08-27  Kyle Meyer  <kyle@kyleam.com>
+
+       Update to Org 9.6.8-3-g21171d
+
+2023-08-27  Yuan Fu  <casouri@gmail.com>
+
+       Escape percent character in treesit--inspect-name (bug#65540)
+
+       * lisp/treesit.el (treesit-inspect-node-at-point): Escape percent.
+
+2023-08-27  Jim Porter  <jporterbugs@gmail.com>
+
+       Don't add an extraneous slash in remote PATH list in Eshell
+
+       Previously, in a remote directory, '(eshell-get-path)' would return a
+       list of strings like "/ssh:localhost://usr/bin".  While that shouldn't
+       break most things, it's not strictly correct either.  See bug#65551.
+
+       * lisp/eshell/esh-util.el (eshell-get-path): Use 'concat' instead of
+       'file-name-concat'.
+
+       * test/lisp/eshell/esh-util-tests.el: Require 'tramp' and
+       'eshell-tests-helpers'.
+       (esh-util-test/path/get, eshell-util-test/path/get-remote): New tests.
+
+2023-08-27  Michael Albinus  <michael.albinus@gmx.de>
+
+       Fix Tramp on MS Windows
+
+       * lisp/net/tramp-sh.el (tramp-sh-handle-expand-file-name):
+       Apply `tramp-drop-volume-letter' consequently.
+
+2023-08-27  Andrea Corallo  <acorallo@gnu.org>
+
+       * Fix native disassemble on Windows platforms (bug#65455)
+
+       * lisp/emacs-lisp/disass.el (disassemble-internal): Improve regexp.
+
+2023-08-27  Andrea Corallo  <acorallo@gnu.org>
+
+       * Handle missing eln file when trying to disassble (bug#65455)
+
+       * lisp/emacs-lisp/disass.el (disassemble-internal): Handle missing
+       eln file.
+
+2023-08-27  Andrea Corallo  <acorallo@gnu.org>
+
+       * lisp/emacs-lisp/comp.el (comp--native-compile): Fix OUTPUT for non 
abs paths
+
+2023-08-27  Jonas Bernoulli  <jonas@bernoul.li>
+
+       Update to Transient v0.4.3
+
+2023-08-27  Michael Albinus  <michael.albinus@gmx.de>
+
+       Adapt Eshell manual
+
+       * doc/misc/eshell.texi (Arguments): Mention more special
+       characters to be quoted in remote file names.  (Bug#65431)
+
+2023-08-27  Eli Zaretskii  <eliz@gnu.org>
+
+       Fix applying patches with Git on MS-Windows
+
+       * lisp/vc/vc.el (vc-diff-internal): For Git, always suppress EOL
+       conversion when reading the diffs into a buffer.  Doc fix.
+       * lisp/vc/vc-git.el (vc-git-checkin): Make sure to suppress EOL
+       conversion when the patch file is written.  (Bug#65049)
+
+2023-08-26  Po Lu  <luangruo@yahoo.com>
+
+       Repair bug#65068 on Emacs 29
+
+       * src/xterm.c (x_term_init): Disable ControlFallback library
+       control wherever present.  (bug#65068)
+
+       Do not merge to master.
+
+2023-08-24  Stefan Kangas  <stefankangas@gmail.com>
+
+       Fix custom :type of dired-mouse-drag-files
+
+       * lisp/dired.el (dired-mouse-drag-files): Fix :type to allow
+       specifying 'move'.  (Bug#65497)
+
+2023-08-24  James Thomas  <jimjoe@gmx.net>
+
+       Account for string names in active file
+
+       Account also for strings when reading in group names from an active
+       file (bug#62812).
+       * lisp/gnus/nnmail.el (nnmail-parse-active): Make it similar to
+       gnus-active-to-gnus-format
+
+2023-08-24  Christoph Göttschkes  <just.mychris@googlemail.com>  (tiny change)
+
+       Fix 'makefile-browser-client' variable initialization
+
+       * lisp/progmodes/make-mode.el (makefile-browser-client):
+       Initialize to nil.  (Bug#65487)
+
+2023-08-19  Yuan Fu  <casouri@gmail.com>
+
+       Support defun navigation for DEFUN in c-ts-mode (bug#64442)
+
+       Before this change, beginning/end-of-defun just ignores DEFUN in
+       c-ts-mode. After this change, beginning/end-of-defun can recognize
+       DEFUN, but a DEFUN definition is considered two defuns. Eg,
+       beginning/end-of-defun will stop at (1) (2) and (3) in the following
+       snippet:
+
+       (1)DEFUN ("treesit-node-parser",
+              Ftreesit_node_parser, Streesit_node_parser,
+              1, 1, 0,
+              doc: /* Return the parser to which NODE belongs.  */)
+         (Lisp_Object node)
+       (2){
+         CHECK_TS_NODE (node);
+         return XTS_NODE (node)->parser;
+       }
+       (3)
+
+       Ideally we want point to only stop at (1) and (3), but that'll be a
+       lot harder to do.
+
+       * lisp/progmodes/c-ts-mode.el:
+       (c-ts-mode--defun-valid-p): Refactor to take in account of DEFUN body.
+       (c-ts-mode--emacs-defun-body-p): New function.
+       (c-ts-base-mode): Add DEFUN and DEFUN body to recognized types.
+       (c-ts-mode--emacs-defun-at-point): Now that we recognize both parts of
+       a DEFUN as defun, c-ts-mode--emacs-defun-at-point needs to be updated
+       to adapt to it.
+
+2023-08-19  Eli Zaretskii  <eliz@gnu.org>
+
+       Fix touchpad scrolling on MS-Windows
+
+       * src/w32term.c (w32_construct_mouse_wheel): The number of lines
+       to scroll should always be positive in wheel-scroll events.
+       Whether to scroll up or down is encoded in the modifiers, which
+       produce either wheel-up or wheel-down event.  (Bug#65070)
+
+       * doc/lispref/commands.texi (Misc Events): Clarify the
+       documentation of 'wheel-up' and 'wheel-down' events.
+
+2023-08-19  Philip Kaludercic  <philipk@posteo.net>
+
+       Fix order in which package-vc dependencies are resolved
+
+       * lisp/emacs-lisp/package-vc.el (package-vc-install-dependencies):
+       Avoid a type-mismatch when comparing two packages.  (Bug#65283)
+
+2023-08-19  Joseph Turner  <joseph@breatheoutbreathe.in>
+
+       Fix building of VC package manuals with relative org links/includes
+
+       * lisp/emacs-lisp/package-vc.el (package-vc--build-documentation):
+       Ensure that default-default is the docs-directory around
+       org-export-to-file to ensure that links to relative files work
+       correctly.  (Bug#65243)
+
+2023-08-19  Eli Zaretskii  <eliz@gnu.org>
+
+       Fix the documentation of 'cl-flet'
+
+       * doc/misc/cl.texi (Function Bindings): Update the description.
+       (Bug#65362)
+
+2023-08-17  Jens Schmidt  <jschmidt4gnu@vodafonemail.de>
+
+       Avoid false "wrong passphrase" messages in EPA
+
+       * lisp/epa-file.el (epa--wrong-password-p): Use a stricter regexp
+       to match "wrong passphrase" errors generated by GnuPG.  (Bug#65316)
+
+2023-08-17  dannyfreeman  <danny@dfreeman.email>
+
+       Fix jsx font-lock in older tree-sitter-js grammars
+
+       * lisp/progmodes/js.el (js--treesit-font-lock-settings): Use
+       queries that are backwards compatible with
+       tree-sitter-javascript bb1f97b.
+       * lisp/progmodes/js.el
+       (-jsx--treesit-font-lock-compatibility-bb1f97b): Delete unused
+       function.  (Bug#65234)
+
+2023-08-17  Eli Zaretskii  <eliz@gnu.org>
+
+       Fix cloning 'face-remapping-alist' for indirect buffers
+
+       * lisp/face-remap.el (face-remap--copy-face): Remove.
+       (face-attrs--make-indirect-safe): Use 'copy-tree'.  Suggested by
+       Stefan Monnier <monnier@iro.umontreal.ca>.
+
+2023-08-17  Eli Zaretskii  <eliz@gnu.org>
+
+       Improve documentation of case transfer in replacement commands
+
+       * doc/emacs/search.texi (Replacement and Lax Matches):
+       * src/search.c (Freplace_match):
+       * lisp/replace.el (query-replace, query-replace-regexp): Clarify
+       in the doc string and the manual how letter-case is transferred
+       from the replaced text to the replacement text.  (Bug#65347)
+
+2023-08-16  Eli Zaretskii  <eliz@gnu.org>
+
+       Fix horizontal scrolling of images with C-f
+
+       * lisp/image-mode.el (image-forward-hscroll): Calculate the
+       window-width more accurately, as the number of full columns that
+       fits in the window's text-area.  (Bug#65187)
+
+2023-08-16  Eli Zaretskii  <eliz@gnu.org>
+
+       Fix unpacking ZIP archives on MS-Windows
+
+       * lisp/arc-mode.el (archive-zip-summarize): Decode file names as
+       UTF-8 when bit 11 of flags is set, even on MS-Windows.
+       (Bug#65305)
+
+2023-08-16  Jim Porter  <jporterbugs@gmail.com>
+
+       Fix command example in Eshell manual
+
+       * doc/misc/eshell.texi (Introduction): Fix example (bug#65303).
+
+       Reported by Eric Gillespie <brickviking@gmail.com>.
+
+2023-08-14  Jim Porter  <jporterbugs@gmail.com>
+
+       Add user options mentioned in the Eshell manual to the variable index
+
+       * doc/misc/eshell.texi: Make variable index entries use "code" style,
+       and add indexing for any options already in the manual.
+
+2023-08-14  Andrea Corallo  <acorallo@gnu.org>
+
+       * Add missing alias to `native-comp-enable-subr-trampolines'.
+
+       * lisp/subr.el (native-comp-deferred-compilation): Alias to
+       native-comp-jit-compilation.
+
+2023-08-14  Andrea Corallo  <acorallo@gnu.org>
+
+       * Add missing alias to `native-comp-enable-subr-trampolines'.
+
+       * lisp/subr.el (comp-enable-subr-trampolines): Alias to
+       native-comp-enable-subr-trampolines.
+
+2023-08-13  Kyle Meyer  <kyle@kyleam.com>
+
+       Update to Org 9.6.7-13-g99cc96
+
+2023-08-13  Michael Albinus  <michael.albinus@gmx.de>
+
+       Handle last-coding-system-used in Tramp for all backends
+
+       * lisp/net/tramp.el (tramp-skeleton-write-region):
+       Handle `last-coding-system-used'.
+       (tramp-handle-write-region):
+       * lisp/net/tramp-adb.el (tramp-adb-handle-write-region):
+       * lisp/net/tramp-smb.el (tramp-smb-handle-write-region):
+       * lisp/net/tramp-sshfs.el (tramp-sshfs-handle-write-region):
+       Set `coding-system-used'.  (Bug#65022)
+
+       * lisp/net/tramp-sh.el (tramp-sh-handle-write-region):
+       Move `last-coding-system-used' handling to
+       `tramp-skeleton-write-region'.
+
+2023-08-13  Devon Sean McCullough  <emacs-hacker2017@jovi.net>
+
+       Add 2 Welsh characters to iso-transl.el
+
+       * lisp/international/iso-transl.el (iso-transl-char-map): Add two
+       Welsh characters.  (Bug#65248)
+
+2023-08-12  Andrea Corallo  <acorallo@gnu.org>
+
+       * Fix `batch-byte+native-compile' target directory.
+
+       * lisp/emacs-lisp/comp.el (batch-native-compile): Don't shadow
+       `native-compile-target-directory' unless necessary.
+
+2023-08-12  Eli Zaretskii  <eliz@gnu.org>
+
+       Avoid crashes in 'display_count_lines' when current buffer was killed
+
+       * src/xdisp.c (Fformat_mode_line):
+       * src/fns.c (Fline_number_at_pos): Don't allow to count lines in a
+       dead buffer.  (Bug#65060)
+
+2023-08-12  J M  <jean@tbm.email>
+
+       Update csharp tree-sitter support due to upstream changes
+
+       A change in tree-sitter-c-sharp grammar for csharp (commit
+       18a531), has removed the keyword void_keyword and advised
+       we should use predefined_type.
+       * lisp/progmodes/csharp-mode.el (csharp-ts-mode--font-lock-settings):
+       Support both old and new style of keywords in tree-sitter-c-sharp
+       grammar.  (Bug#65113)
+
+2023-08-12  Matthew Tromp  <matthewktromp@gmail.com>  (tiny change)
+
+       Substitute command keys in 'ielm-header' at use time
+
+       Before, command keys were substituted into the ielm-header when
+       ielm.el was loaded, which resulted in the substitutions depending on
+       the user's current buffer instead of the ielm buffer.
+       For example, if the user was in an info-mode buffer, the key would
+       appear as 'H' instead of 'C-h m'.
+       Now, the command key is substituted after the ielm buffer has been
+       created.
+       * lisp/ielm.el (ielm-header): Remove substitute-command-keys.
+       (inferior-emacs-lisp-mode): Add substitute-command-keys.  (Bug#65213)
+
+2023-08-12  Eli Zaretskii  <eliz@gnu.org>
+
+       Fix rare crashes in redisplay due to problems with fontsets
+
+       * src/xdisp.c (get_next_display_element): If we have no usable
+       face to display a character/composition, treat that as glyphless.
+       (produce_glyphless_glyph): If neither it->face nor its ASCII face
+       are usable, fall back to the frame's default font.  (Bug#65198)
+
+2023-08-12  Eli Zaretskii  <eliz@gnu.org>
+
+       Fix a typo in 'leuven-dark-theme.el'
+
+       * etc/themes/leuven-dark-theme.el (leuven-dark): Fix a typo.
+       Reported by John Poole <saxcos@posteo.es>.  (Bug#65239)
+
+2023-08-10  Michael Albinus  <michael.albinus@gmx.de>
+
+       Adapt Tramp test
+
+       * test/lisp/net/tramp-tests.el (tramp-test41-special-characters):
+       Skip for macOS.
+
+2023-08-10  dannyfreeman  <danny@dfreeman.email>
+
+       Properly expand the JSX indentation rules in 'js-ts-mode'
+
+       * lisp/progmodes/js.el (js--treesit-indent-rules): Fix
+       'js-ts-mode' indent bug in JSX expressions. Before this
+       change, treesit indent mechanisms were trying to call this
+       compatibility function like a matching or anchor rule.
+       This resulted in an error when running `indent-for-tab-command`
+       while the cursor was in a JSX expression:
+
+       treesit--simple-indent-eval: Wrong number of
+       arguments: ((cl-struct-js--pitem-tags ido-cur-list t) nil "Indent rules
+       helper, to handle different releases of tree-sitter-javascript."
+
+       (Bug#65134)
+
+2023-08-10  Andrea Corallo  <acorallo@gnu.org>
+
+       * Add `emacs-lisp-native-compile' to easy-menu.
+
+       * lisp/progmodes/elisp-mode.el (emacs-lisp-mode-menu): Add menu
+       item for emacs-lisp-native-compile.
+
+2023-08-10  Andrea Corallo  <acorallo@gnu.org>
+
+       * lisp/progmodes/elisp-mode.el (emacs-lisp-mode-menu): Simplify 
condition.
+
+2023-08-10  Andrea Corallo  <acorallo@gnu.org>
+
+       * Introduce `emacs-lisp-native-compile'.
+
+       * lisp/progmodes/elisp-mode.el (emacs-lisp-native-compile): New command.
+       (emacs-lisp-native-compile-and-load): Make use of.
+
+2023-08-10  Eli Zaretskii  <eliz@gnu.org>
+
+       Fix the -x switch in non-X builds
+
+       * src/emacs.c (main): Move the handling of the -x switch out of
+       the HAVE_X_WINDOWS condition, and simplify the rest of the code by
+       avoiding code duplication in HAVE_X_WINDOWS and !HAVE_X_WINDOWS
+       cases.  (Bug#65048)
+
+2023-08-10  Po Lu  <luangruo@yahoo.com>
+
+       Document that `set-mouse-color' does not work everywhere
+
+       * etc/PROBLEMS (Miscellaneous Problems): Mention where
+       `set-mouse-color' does not work.
+
+2023-08-10  Eli Zaretskii  <eliz@gnu.org>
+
+       Fix the effects and documentation of 'dired-free-space'
+
+       * lisp/dired.el (dired-free-space): Fix doc string and Custom tags.
+       (dired--insert-disk-space): When 'dired-free-space' is 'separate',
+       return the position of the beginning of the disk-space line, to be
+       compatible with pre-Emacs 29 behavior under
+       'dired-hide-details-mode'.  (Bug#65186)
+
+       * doc/emacs/dired.texi (Misc Dired Features): Fix wording in
+       documentation of 'dired-free-space'.
+
+2023-08-09  Stefan Kangas  <stefankangas@gmail.com>
+
+       Fix cross-reference to eldoc in eglot manual
+
+       * doc/misc/eglot.texi (Eglot Features): Fix cross-reference to eldoc
+       node in the Emacs manual.
+
+2023-08-09  Eli Zaretskii  <eliz@gnu.org>
+
+       Add native-compilation to Emacs Lisp mode menu
+
+       * lisp/progmodes/elisp-mode.el (emacs-lisp-mode-menu): Add menu
+       item for emacs-lisp-native-compile-and-load.
+
+2023-08-09  Andrea Corallo  <acorallo@gnu.org>
+
+       Fix emacs-lisp-native-compile-and-load eln target directory (bug#64226)
+
+       * lisp/emacs-lisp/comp.el (comp-spill-lap-function): Don't use
+       `byte+native-compile' to select output directory but always axpect
+       it explicit through `native-compile-target-directory'.
+       (batch-byte+native-compile): Set `native-compile-target-directory'.
+       * test/src/comp-tests.el (comp-tests-bootstrap): Set
+       `native-compile-target-directory'.
+
+2023-08-09  Mattias Engdegård  <mattiase@acm.org>
+
+       Disable failing test (bug#65156)
+
+       * test/src/fileio-tests.el (fileio-tests--non-regular-insert):
+       Mark as :unstable, since /dev/urandom is seekable.
+
+       Do not merge to master.
+
+2023-08-08  Po Lu  <luangruo@yahoo.com>
+
+       Better fix for bug#65156
+
+       * src/fileio.c (Finsert_file_contents): Correct seek-ability
+       test, since lseek returns -1 upon failure.  (Bug#65156)
+
+2023-08-08  Eli Zaretskii  <eliz@gnu.org>
+
+       Fix insert-file-contents with pipes and /dev/stdin
+
+       * src/fileio.c (Finsert_file_contents): Restore logic of
+       non-regular but seekable files.  (Bug#65156)
+
+2023-08-07  Po Lu  <luangruo@yahoo.com>
+
+       Fix bug#65042
+
+       * src/pgtkterm.c (fill_background_by_face): Respect the frame's
+       background alpha property.
+
+2023-08-07  Eli Zaretskii  <eliz@gnu.org>
+
+       * configure.ac (HAVE_TREE_SITTER): Set NEED_DYNLIB=yes (bug#65123).
+
+2023-08-06  Michael Albinus  <michael.albinus@gmx.de>
+
+       * etc/NEWS: Mention tramp-show-ad-hoc-proxies.
+
+       * test/lisp/net/tramp-tests.el (tramp-test42-utf8): Skip for macOS.
+
+       * test/lisp/net/tramp-tests.el (tramp-test10-write-region): Extend test.
+
+2023-08-06  Eli Zaretskii  <eliz@gnu.org>
+
+       Fix reverting Rmail buffers
+
+       This bug happened because rmail.el relied on 'revert-buffer' to
+       return non-nil when it succeeds to revert, but a recent change
+       in 'revert-buffer' broke that promise in Emacs 29.1.
+       * lisp/files.el (revert-buffer--default, revert-buffer): Doc fix.
+       (revert-buffer): Return whatever 'revert-buffer-function' returns.
+       (Bug#65071)
+
+2023-08-05  Jim Porter  <jporterbugs@gmail.com>
+
+       Fix handling of 'byte-compile-ignore-files' when nil
+
+       Before this fix, when 'byte-compile-ignore-files' was nil,
+       'byte-recompile-directory' would ignore every file (bug#64985).
+
+       * lisp/emacs-lisp/bytecomp.el (byte-recompile-directory): Handle case
+       when 'byte-compile-ignore-files' is nil.
+
+2023-08-05  Michael Albinus  <michael.albinus@gmx.de>
+
+       Sync with Tramp 2.6.2-pre
+
+       * doc/misc/tramp.texi (Overview): Use "scp" in example.
+       (Obtaining @value{tramp}): Prefer https: to git: URIs on Savannah.
+       (Ssh setup): Extend for MS Windows and ssh.  Explain
+       tramp-use-ssh-controlmaster-options value `suppress'.
+       (File name completion): Remove completion styles restrictions.
+       (Ad-hoc multi-hops): Describe tramp-show-ad-hoc-proxies.
+       (Remote processes): Add reference to "Using ssh connection sharing".
+
+       * doc/misc/trampver.texi:
+       * lisp/net/trampver.el (tramp-version): Set to "2.6.2-pre".
+
+       * lisp/net/tramp-adb.el (tramp-adb-handle-file-name-all-completions):
+       * lisp/net/tramp-archive.el
+       (tramp-archive-handle-file-name-all-completions):
+       * lisp/net/tramp-crypt.el 
(tramp-crypt-handle-file-name-all-completions):
+       * lisp/net/tramp-fuse.el (tramp-fuse-handle-file-name-all-completions):
+       * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-name-all-completions):
+       * lisp/net/tramp-sh.el (tramp-sh-handle-file-name-all-completions):
+       * lisp/net/tramp-smb.el (tramp-smb-handle-file-name-all-completions):
+       * lisp/net/tramp-sudoedit.el
+       (tramp-sudoedit-handle-file-name-all-completions): Return nil when
+       DIRECTORY is missing.  (Bug#61890)
+
+       * lisp/net/tramp.el (tramp-accept-process-output): Don't use TIMEOUT
+       anymore, default it to 0.  When the connection uses a shared
+       socket possibly, accept also the output from other processes over
+       the same connection.  (Bug#61350)
+       (tramp-handle-file-notify-rm-watch, tramp-action-process-alive)
+       (tramp-action-out-of-band, tramp-process-one-action)
+       (tramp-interrupt-process):
+       * lisp/net/tramp-adb.el (tramp-adb-handle-make-process):
+       * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-notify-add-watch):
+       * lisp/net/tramp-sh.el (tramp-sh-handle-file-notify-add-watch):
+       * lisp/net/tramp-smb.el (tramp-smb-action-get-acl)
+       (tramp-smb-action-set-acl, tramp-smb-wait-for-output):
+       * lisp/net/tramp-sudoedit.el (tramp-sudoedit-action-sudo): Adapt 
callees.
+
+       * lisp/net/tramp.el (tramp-get-process, tramp-message)
+       (tramp-handle-make-process, tramp-handle-file-notify-valid-p)
+       (tramp-process-actions, tramp-accept-process-output)
+       (tramp-process-sentinel, tramp-read-passwd)
+       (tramp-interrupt-process, tramp-signal-process):
+       * lisp/net/tramp-adb.el (tramp-adb-maybe-open-connection):
+       * lisp/net/tramp-cmds.el (tramp-cleanup-connection):
+       * lisp/net/tramp-crypt.el (tramp-crypt-maybe-open-connection):
+       * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-notify-add-watch)
+       (tramp-gvfs-monitor-process-filter)
+       (tramp-gvfs-maybe-open-connection):
+       * lisp/net/tramp-rclone.el (tramp-rclone-maybe-open-connection):
+       * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band)
+       (tramp-sh-handle-file-notify-add-watch)
+       (tramp-sh-gio-monitor-process-filter)
+       (tramp-sh-inotifywait-process-filter)
+       (tramp-barf-if-no-shell-prompt, tramp-maybe-open-connection):
+       * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory)
+       (tramp-smb-handle-file-acl, tramp-smb-handle-set-file-acl)
+       (tramp-smb-maybe-open-connection):
+       * lisp/net/tramp-sshfs.el (tramp-sshfs-maybe-open-connection):
+       * lisp/net/tramp-sudoedit.el (tramp-sudoedit-maybe-open-connection)
+       (tramp-sudoedit-send-command): Prefix internal process properties
+       with "tramp-".
+
+       * lisp/net/tramp.el (tramp-skeleton-file-exists-p): New defmacro,
+       which also handles host name completion.
+       (tramp-handle-file-exists-p):
+       * lisp/net/tramp-adb.el (tramp-adb-handle-file-exists-p):
+       * lisp/net/tramp-sh.el (tramp-sh-handle-file-exists-p):
+       * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-file-exists-p): Use 
it.
+
+       * lisp/net/tramp.el (tramp-wrong-passwd-regexp):
+       * lisp/net/tramp-adb.el (tramp-adb-prompt):
+       * lisp/net/tramp-sh.el (tramp-sh-inotifywait-process-filter):
+       * lisp/net/tramp-smb.el (tramp-smb-maybe-open-connection): Unify 
regexps.
+
+       * lisp/net/tramp.el:
+       * lisp/net/tramp-cmds.el:
+       * lisp/net/tramp-crypt.el:
+       * lisp/net/tramp-gvfs.el:
+       * lisp/net/tramp-sh.el:
+       * lisp/net/tramp-smb.el: Fix error messages.
+
+       * lisp/net/tramp-cmds.el (tramp-cleanup-connection):
+       Protect `delete-process'.
+
+       * lisp/net/tramp.el (tramp-prefix-format, tramp-prefix-regexp)
+       (tramp-method-regexp, tramp-postfix-method-format)
+       (tramp-postfix-method-regexp, tramp-prefix-ipv6-format)
+       (tramp-prefix-ipv6-regexp, tramp-postfix-ipv6-format)
+       (tramp-postfix-ipv6-regexp, tramp-postfix-host-format)
+       (tramp-postfix-host-regexp, tramp-remote-file-name-spec-regexp)
+       (tramp-file-name-structure, tramp-file-name-regexp)
+       (tramp-completion-method-regexp)
+       (tramp-completion-file-name-regexp):
+       * lisp/net/tramp-compat.el (tramp-syntax):
+       * lisp/net/tramp-gvfs.el (tramp-gvfs-dbus-event-vector):
+       Rearrange declarations.
+
+       * lisp/net/tramp-compat.el (ansi-color): Require.
+       (ls-lisp): Don't require.  (Bug#64124)
+       (tramp-compat-replace-regexp-in-region): Move up.
+       (tramp-compat-length<, tramp-compat-length>)
+       (tramp-compat-length=): New defaliases.
+       (tramp-compat-file-name-unquote, tramp-compat-take)
+       (tramp-compat-ntake): Use them.
+
+       * lisp/net/tramp-container.el (tramp-container--completion-function):
+       Rename from `tramp-docker--completion-function'.  Add argument
+       PROGRAM.  Use it for "docker" and "podman" host name completion.
+
+       * lisp/net/tramp-crypt.el (tramp-crypt-handle-file-exists-p):
+       New defun.
+       (tramp-crypt-file-name-handler-alist): Add it.
+
+       * lisp/net/tramp-fuse.el (tramp-fuse-handle-file-exists-p): New defun.
+       (tramp-fuse-mount-timeout): Move up.
+       (tramp-fuse-mount-point): Use `tramp-fuse-mount-timeout'.
+       (tramp-fuse-unmount): Flush "mount-point" file property.
+       (tramp-fuse-mount-point, tramp-fuse-mounted-p): Support existing
+       mount points.
+       (tramp-fuse-mounted-p): The mount-spec could contain an optional
+       trailing slash.  (Bug#64278)
+
+       * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file)
+       * lisp/net/tramp-rclone.el (tramp-rclone-do-copy-or-rename-file):
+       Improve stability for WebDAV.
+       (tramp-rclone-handle-file-system-info): Check return code of
+       command.
+
+       * lisp/net/tramp-gvfs.el (while-no-input-ignore-events):
+       Add `dbus-event' for older Emacs versions.
+       (tramp-gvfs-parse-device-names): Ignore errors.
+
+       * lisp/net/tramp-sh.el (tramp-display-escape-sequence-regexp)
+       (tramp-device-escape-sequence-regexp): Delete.
+       (tramp-sh-handle-insert-directory, tramp-barf-if-no-shell-prompt)
+       (tramp-wait-for-output): Use `ansi-color-control-seq-regexp'.
+       (tramp-use-ssh-controlmaster-options): Allow new value `suppress'.
+       (tramp-ssh-option-exists-p): New defun.
+       (tramp-ssh-controlmaster-options): Implement `suppress' actions.
+       Should never return nil, but empty string.
+       (tramp-perl-file-name-all-completions): Don't print status message.
+       (tramp-sh-handle-file-name-all-completions): Return nil when check
+       fails.  (Bug#61890)
+       (tramp-run-test): Add VEC argument.
+       (tramp-sh-handle-file-executable-p)
+       (tramp-sh-handle-file-readable-p)
+       (tramp-sh-handle-file-directory-p)
+       (tramp-sh-handle-file-writable-p): Adapt callees.
+       (tramp-sh-handle-insert-directory):
+       (tramp-sh-handle-insert-directory): Test whether -N is understood
+       by ls since that option is used along with --dired.  Remove -N
+       when we remove --dired.  (Bug#63142)
+       (tramp-sh-handle-insert-directory, tramp-barf-if-no-shell-prompt)
+       (tramp-wait-for-output): Use `ansi-color-control-seq-regexp'.
+       (tramp-sh-handle-expand-file-name): `null-device' could be nil.
+       Reported by Richard Copley <rcopley@gmail.com>.
+       (tramp-sh-handle-make-process): Improve handling of
+       connection-type `pipe'.  (Bug#61341)
+
+       * lisp/net/tramp-smb.el (tramp-smb-handle-make-symbolic-link):
+       * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-make-symbolic-link):
+       Flush TARGET file properties.
+
+       * lisp/net/tramp-smb.el (tramp-smb-handle-copy-file): Flush proper
+       file properties.
+       (tramp-smb-handle-file-acl, tramp-smb-handle-set-file-acl):
+       Remove superfluous `unwind-protect'.
+
+       * lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist):
+       Use `tramp-fuse-handle-file-exists-p'.
+       (tramp-sshfs-handle-insert-file-contents): Move result out of
+       unwindform.
+
+       * lisp/net/tramp.el (tramp-string-empty-or-nil-p): New defsubst.
+       Use it everywhere when appropriate.
+
+       * lisp/net/tramp.el (tramp-methods) <->: Add.
+       (tramp-completion-file-name-handler-alist):
+       Add `expand-file-name', `file-exists-p', `file-name-directory' and
+       `file-name-nondirectory'.
+       (tramp-dissect-file-name): Do not extra check for
+       `tramp-default-method-marker'.
+       (tramp-completion-handle-expand-file-name)
+       (tramp-completion-handle-file-exists-p)
+       (tramp-completion-handle-file-name-directory)
+       (tramp-completion-handle-file-name-nondirectory): New defuns.
+       (tramp-completion-handle-file-name-all-completions): Remove duplicates.
+       (tramp-show-ad-hoc-proxies): New defcustom.
+       (tramp-make-tramp-file-name): Use it.
+       (tramp-make-tramp-hop-name): Don't add hop twice.
+       (tramp-shell-prompt-pattern): Remove escape characters.
+       (tramp-process-one-action, tramp-convert-file-attributes):
+       Use `ansi-color-control-seq-regexp'.  (Bug#63539)
+       (tramp-wrong-passwd-regexp): Add "Authentication failed" string
+       (from doas).
+       (tramp-terminal-type): Fix docstring.
+       (tramp-process-one-action): Delete ANSI control escape sequences
+       in buffer.  (Bug#63539)
+       (tramp-build-completion-file-name-regexp): Support user name
+       completion.
+       (tramp-make-tramp-file-name): Keep hop while in file
+       (tramp-set-completion-function): Check, that cdr of FUNCTION-LIST
+       entries is a string.
+       (tramp-completion-file-name-handler): Run only when
+       `minibuffer-completing-file-name' is non-nil.
+       (tramp-skeleton-write-region): Fix scoping.  (Bug#65022)
+       (tramp-handle-memory-info): Work on newly created objects, or use
+       non-destructive operations.
+       (tramp-accept-process-output): Use `with-local-quit'.
+       (tramp-call-process, tramp-call-process-region):
+       Let-bind `temporary-file-directory'.
+
+       * test/lisp/net/tramp-archive-tests.el (tramp-archive--test-emacs28-p):
+       New defun.
+       (tramp-archive-test16-directory-files): Don't mutate.
+       (tramp-archive-test47-auto-load): Adapt test.
+
+       * test/lisp/net/tramp-tests.el (tramp-display-escape-sequence-regexp):
+       Dont't declare.
+       (tramp-action-yesno): Suppress run in tests.
+       (tramp-test02-file-name-dissect):
+       (tramp-test02-file-name-dissect-simplified)
+       (tramp-test02-file-name-dissect-separate): Adapt tests.
+       (tramp-test21-file-links):
+       (tramp-test21-file-links, tramp-test26-file-name-completion)
+       (tramp-test28-process-file, tramp-test29-start-file-process)
+       (tramp-test30-make-process, tramp-test33-environment-variables)
+       (tramp-test38-find-backup-file-name, tramp-test47-auto-load)
+       (tramp-test39-detect-external-change, tramp-test42-utf8)
+       (tramp-test47-auto-load, tramp-test47-delay-load)
+       (tramp-test48-unload): Adapt tests.
+       (tramp-test26-file-name-completion-with-perl):
+       (tramp-test26-file-name-completion-with-ls)
+       (tramp-test26-interactive-file-name-completion): New tests.
+       (tramp-test44-asynchronous-requests): Mark as :unstable.
+
+2023-08-05  Eli Zaretskii  <eliz@gnu.org>
+
+       Fix documentation of saveplace facilities for Dired
+
+       * lisp/saveplace.el (save-place-dired-hook, save-place-alist):
+       * lisp/dired.el (dired-initial-position-hook)
+       (dired-initial-position): Doc fixes.  (Bug#65055)
+
+2023-08-04  Jim Porter  <jporterbugs@gmail.com>
+
+       Fix loaddef generation with ";;;foo-autoload" cookies in external 
packages
+
+       This caused an issue where package-specific autoload cookies weren't
+       being correctly recognized, so they got dumped into the package's main
+       "<pkg>-autoloads.el" file, instead of "<pkg>-loaddefs.el" as they
+       should (bug#65023).
+
+       * lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--parse-file):
+       Save match data when checking syntax.
+
+2023-08-04  Stefan Kangas  <stefankangas@gmail.com>
+
+       Delete comment saying that project.el is experimental
+
+       * lisp/progmodes/project.el (Commentary): Delete comment saying that
+       the API is "still experimental".  It is to be considered stable
+       starting with the version released with Emacs 29.
+       Ref: https://lists.gnu.org/r/emacs-devel/2023-07/msg00415.html
+
+2023-08-04  Eli Zaretskii  <eliz@gnu.org>
+
+       Fix byte-compiled files that use 'bind-key' from use-package
+
+       * lisp/use-package/bind-key.el (bind-key): Ensure 'bind-key' is
+       loaded at run time.  Patch by John Wiegley <johnw@gnu.org>.
+       (Bug#64901)
+
+2023-08-04  Eli Zaretskii  <eliz@gnu.org>
+
+       Fix "Paste from Kill Menu" in non X toolkit builds
+
+       * src/keymap.c (possibly_translate_key_sequence): Don't signal an
+       error if 'key-valid-p' returns nil.  Suggested by Stefan Monnier
+       <monnier@iro.umontreal.ca>. (Bug#64927)
+
+2023-08-03  john muhl  <jm@pub.pink>
+
+       Handle tabs in the SQL shown in the column listing
+
+       * lisp/sqlite-mode.el (sqlite-mode-list-columns): Handle tabs.
+       (Bug#64964)
+
+2023-08-03  Eli Zaretskii  <eliz@gnu.org>
+
+       Add new keyword to 'typescript-ts-mode'
+
+       * lisp/progmodes/typescript-ts-mode.el
+       (typescript-ts-mode--keywords): Add "satisfies", a new operator in
+       Typescript 4.9.  (Bug#64924)
+
+2023-08-03  Stefan Kangas  <stefankangas@gmail.com>
+
+       Fix link to info node in prin1 docstring
+
+       * src/print.c (Fprin1): Fix linking to info node in docstring.
+
+       (cherry picked from commit 4b73edb8d1da74fd1bda8894e982d9768fd1f18c)
+
+2023-08-03  Eli Zaretskii  <eliz@gnu.org>
+
+       Clarify the meaning of the argument of ':align-to' space spec
+
+       * doc/lispref/display.texi (Specified Space): Clarify the meaning
+       and measurement of HPOS in ':align-to' space specs.  (Bug#65015)
+
+2023-08-01  Jim Porter  <jporterbugs@gmail.com>
+
+       Fix handling of ".elpaignore" file when compiling packages
+
+       * lisp/emacs-lisp/bytecomp.el (byte-recompile-directory): Treat
+       'byte-compile-ignore-files' as a list of regexps per its docstring
+       (bug#64985).
+
+2023-08-01  Amritpal Singh  <sysgrammer@protonmail.com>  (tiny change)
+
+       Support files compressed by 'pigz'
+
+       * src/decompress.c (md5_gz_stream): Check 'stream.avail_in' as
+       well.  (Bug#63832)
+
+       (cherry picked from commit 46b6d175054e8f6bf7cb45e112048c0cf02bfee9)
+
+2023-07-31  Eli Zaretskii  <eliz@gnu.org>
+
+       Fix 'string-pixel-width' under 'line-prefix'
+
+       * lisp/emacs-lisp/subr-x.el (string-pixel-width): Disable
+       'line-prefix' and 'wrap-prefix' to avoid their effect on the
+       calculated string width.  (Bug#64971)
+
+2023-07-31  Michael Albinus  <michael.albinus@gmx.de>
+
+       Fix find-dired-with-command for remote directories
+
+       * lisp/find-dired.el (find-dired-with-command):
+       Use `start-file-process-shell-command'.  (Bug#64897)
+
+2023-07-30  Kyle Meyer  <kyle@kyleam.com>
+
+       Update to Org 9.6.7-5-gd1d0c3
+
+2023-07-30  Mattias Engdegård  <mattiase@acm.org>
+
+       Fix rx wrong-code bug: ranges starting with ^
+
+       (rx (in (?^ . ?a))) was incorrectly translated to "[^-a]".
+       Change it so that we get "[_-a^]" instead.
+
+       * lisp/emacs-lisp/rx.el (rx--generate-alt): Split ranges starting with
+       `^` occurring first in a non-negated character alternative.
+       * test/lisp/emacs-lisp/rx-tests.el (rx-any): Add and adapt tests.
+
+       (cherry picked from commit 5f5d668ac7917d61e9366fe0c3efd7b542671c3d)
+
+2023-07-30  Basil L. Contovounesios  <contovob@tcd.ie>
+
+       Backport: Fix some tree-sitter :match regexps
+
+       This was originally installed on 2023-06-17 in the emacs-29 release
+       branch and later reverted.  This backport follows the Emacs 29.1
+       release (bug#64019).
+
+       The shy groups were caught by modified versions of the GNU ELPA
+       packages xr and relint:
+       - https://github.com/mattiase/xr/pull/6
+       - https://github.com/mattiase/relint/pull/14
+
+       * lisp/progmodes/ruby-ts-mode.el (ruby-ts--s-p-query): Quote special
+       character in regexp.
+       * lisp/progmodes/java-ts-mode.el (java-ts-mode--font-lock-settings):
+       * lisp/progmodes/js.el (js--plain-method-re):
+       (js--treesit-font-lock-settings):
+       * lisp/progmodes/rust-ts-mode.el (rust-ts-mode--font-lock-settings):
+       * lisp/progmodes/typescript-ts-mode.el
+       (typescript-ts-mode--font-lock-settings): Replace character
+       alternative [\\d], which matches '\' or 'd', with the most likely
+       intention [0-9].  Fix shy groups mistyped as optional colons.
+       Remove unneeded numbered :match group in rust-ts-mode.
+
+       (cherry picked from commit cd8d3f3379ec7179fac4bb8e9c40658be15a64f6)
+
+2023-07-30  Po Lu  <luangruo@yahoo.com>
+
+       Fix bug#64923
+
+       * src/xfns.c (Fx_create_frame): Prevent cairo surface from being
+       left without a desired size.  (bug#64923)
+
+2023-07-30  Ulrich Müller  <ulm@gentoo.org>
+
+       Avoid spurious whitespace in the modeline of emacsclient frames
+
+       * lisp/bindings.el (mode-line-client): Compute 'help-echotext
+       property in advance.  (Bug#58183)
+
+       (cherry picked from commit 8c3338f6ba354218aee12c223d778be4180f892b)
+
+2023-07-30  Mattias Engdegård  <mattiase@acm.org>
+
+       Fix function help for advised aliases (bug#64797)
+
+       * lisp/help-fns.el (help-fns--analyze-function):
+       For aliases, use the base function name if at the end of the chain.
+       This fixes a regression introduced in d30fde6b0cc.
+
+       Reported by Michael Heerdegen.
+
+       (cherry picked from commit 024bd1f09099ae186442001a75e578638070e296)
+
+2023-07-30  Eli Zaretskii  <eliz@gnu.org>
+
+       Avoid crashes due to invalid 'mode-line-format'
+
+       * src/xdisp.c (display_mode_element, redisplay_window_error):
+       Don't take XCAR of what can be Qnil.  (Bug#64893)
+
+       (cherry picked from commit 7ea3f39deec3d54914077455e70605a14eb7d200)
+
+2023-07-30  Eli Zaretskii  <eliz@gnu.org>
+
+       Avoid crashes under 'which-key-mode'
+
+       * src/keyboard.c (Fthis_single_command_keys): Don't allow calls to
+       Fvector with negative first argument.  (Bug#64857)
+
+       (cherry picked from commit 65834b8f8d53402517da7fe2446f5bac0aa30c39)
+
+2023-07-30  Eli Zaretskii  <eliz@gnu.org>
+
+       Bump Emacs version
+
+       * README:
+       * configure.ac:
+       * nt/README.W32:
+       * msdos/sed2v2.inp:
+       * etc/NEWS: Bump Emacs version to 29.1.50.
+
+2023-07-29  Vincenzo Pupillo  <v.pupillo@gmail.com>
+
+       Update CMake support due to upstream changes (bug#64922)
+
+       A recent change in tree-sitter-cmake grammar support for CMake (commit
+       fe9b5e0), now put arguments are wrapped in a new argument_list node.
+       To support the old and new version of the grammar, a new function was
+       added on which string syntax highlighting now depends.
+
+       * lisp/progmodes/cmake-ts-mode.el
+       (cmake-ts-mode--font-lock-compatibility-fe9b5e0): Indent helper
+       function to handle different tree-sitter-cmake version.
+       * lisp/progmodes/cmake-ts-mode.el
+       (cmake-ts-mode--font-lock-settings): Use the new function to handle
+       the new argument_list node.
+
+2023-07-24  Theodor Thornhill  <theo@thornhill.no>
+
+       Remove nullptr named node from c++-ts-mode (bug#64818)
+
+       The nullptr node was changed from a named node to an unnamed node
+       upstream[0], which caused font locking to break. As this is a small
+       enough regression, no compat code is required.
+
+       * lisp/progmodes/c-ts-mode.el (c-ts-mode--font-lock-settings): Remove
+       node no longer in use.
+
+       [0]:
+       
https://github.com/tree-sitter/tree-sitter-c/commit/c75868f8b508ae32a0c8490da91bb31b2b96430e
+
+2023-07-24  Theodor Thornhill  <theo@thornhill.no>
+
+       Make compat check also check typescript
+
+       * lisp/progmodes/typescript-ts-mode.el
+       (tsx-ts-mode--font-lock-compatibility-bb1f97b):
+       Add argument so that we run the 'treesit-query-capture' when the
+       language is 'typescript', not only 'tsx'.
+
+       * lisp/progmodes/typescript-ts-mode.el
+       (typescript-ts-mode--font-lock-settings): Use supplied argument.
+
+2023-07-23  Eli Zaretskii  <eliz@gnu.org>
+
+       Update HISTORY and ChangeLog.4
+
+       * etc/HISTORY:
+       * ChangeLog.4: Update for the Emacs 29.1 release.
+
 2023-07-30  Eli Zaretskii  <eliz@maintain0p.gnu.org>
 
        * Version 29.1 released.
@@ -79829,7 +81810,7 @@
        Some adjustments to last change
 
        * src/gtkutil.c (xg_set_undecorated): Only set ARGB visual on
-       Cairo builds wtihout PGTK.
+       Cairo builds without PGTK.
        * src/xfns.c (select_visual): Likewise.
 
 2022-01-29  Håkon Flatval  <hkon20@hotmail.com>
@@ -117380,7 +119361,7 @@
 
 This file records repository revisions from
 commit f2ae39829812098d8269eafbc0fcb98959ee5bb7 (exclusive) to
-commit 7d1737071fba1fd83039aac34f34f6b90c9579b8 (inclusive).
+commit d9e1605122b4ba70a55f7b168505b7d7f8d2bdd6 (inclusive).
 See ChangeLog.3 for earlier changes.
 
 ;; Local Variables:
diff --git a/Makefile.in b/Makefile.in
index 51a27cc1814..45540d2742f 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -421,7 +421,7 @@ advice-on-failure:
 
 sanity-check:
        @[ -f .no-advice-on-failure ] && exit 0; true
-       @v=`src/emacs${EXEEXT} --batch --eval \
+       @v=`src/emacs${EXEEXT} --batch -Q --eval \
          '(progn (defun f (n) (if (= 0 n) 1 (* n (f (- n 1))))) (princ (f 
10)))' \
          2> /dev/null`; \
        [ "X$$v" = "X3628800" ] && exit 0; \
diff --git a/admin/MAINTAINERS b/admin/MAINTAINERS
index 1801842bdcb..a6e1baf85e1 100644
--- a/admin/MAINTAINERS
+++ b/admin/MAINTAINERS
@@ -124,10 +124,6 @@ Ulf Jasper
            lisp/net/newsticker.el
            test/lisp/net/newsticker-tests.el
 
-       Icalendar
-           lisp/calendar/icalendar.el
-           test/lisp/calendar/icalendar-tests.el
-
 Amin Bandali
        ERC
            lisp/erc/*
diff --git a/admin/git-bisect-start b/admin/git-bisect-start
index 8eb5328a1a1..30a738267fa 100755
--- a/admin/git-bisect-start
+++ b/admin/git-bisect-start
@@ -2,7 +2,9 @@
 
 ### Start a git bisection, ensuring that commits in branches that are
 ### the result of merging external trees into the Emacs repository, as
-### well as certain commits on which Emacs fails to build, are skipped.
+### well as certain commits on which Emacs fails to build (with the
+### default options, on a GNU/Linux computer and with GCC; see below),
+### are skipped.
 
 ## Copyright (C) 2022-2023 Free Software Foundation, Inc.
 
@@ -82,7 +84,7 @@ done
 # SKIP-BRANCH 58cc931e92ece70c3e64131ee12a799d65409100
 
 ## The list below is the exhaustive list of all commits between Dec 1
-## 2016 and Aug 10 2023 on which building Emacs with the default
+## 2016 and Oct 2 2023 on which building Emacs with the default
 ## options, on a GNU/Linux computer and with GCC, fails.  It is
 ## possible (though unlikely) that building Emacs with non-default
 ## options, with other compilers, or on other platforms, would succeed
@@ -1776,3 +1778,13 @@ $REAL_GIT bisect skip $(cat $0 | grep '^# SKIP-SINGLE ' 
| sed 's/^# SKIP-SINGLE
 # SKIP-SINGLE 2752573dfb76873dbe783e89a1fbf01d157c54e3
 # SKIP-SINGLE 62e990db7a2fad16756e019b331c28ad5a5a89fe
 # SKIP-SINGLE 6253e7e74249c7cdfa86723f0b91a1d207cb143e
+# SKIP-SINGLE 1f7113e68988fa0bcbdeca5ae364cba8d6db3637
+# SKIP-SINGLE 6e44d6e18438ea2665ae6252a6ec090963dd7e42
+# SKIP-SINGLE 168cc0aff0bfbc1d67a7e8a72b88a1bf10ad019e
+# SKIP-SINGLE efb276fef1f580eafa8458fc262a4b35eb3abd5e
+# SKIP-SINGLE cc0d7d7a3867e4554f89262e4641c9845ee0d647
+# SKIP-SINGLE 012f9c28053d06b6d527d77530605aedbd55d5b4
+# SKIP-SINGLE e61a03984335b4ffb164280b2df80668b2a92c23
+# SKIP-SINGLE f7fd21b06865d20a16c11e20776e843db24d4b14
+# SKIP-SINGLE 35fbf6f15830f576fd1909f4a8d30e7ba1d777bd
+# SKIP-SINGLE 0e44ab5f061c81874dd8298a0f3318f14ef95a24
diff --git a/admin/make-tarball.txt b/admin/make-tarball.txt
index 505d3469d3c..5704e8e8922 100644
--- a/admin/make-tarball.txt
+++ b/admin/make-tarball.txt
@@ -22,6 +22,11 @@ Steps to take before starting on the first pretest in any 
release sequence:
     You can use 'gnupload --delete' (see below for more gnupload details).
     (We currently don't bother with this.)
 
+4.  Check that all new Lisp libraries belong to sensible packages.
+    Run "make -C lisp finder-data" and check the diff of the generated
+    file against the previously released Emacs version to see what has
+    changed.
+
 General steps (for each step, check for possible errors):
 
 1.    git pull     # fetch from the repository
diff --git a/configure.ac b/configure.ac
index 9ae0dec3867..4456cd89b7a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -941,7 +941,7 @@ a valid path to android.jar.  See config.log for more 
details.])
   fi
 
   AC_CACHE_CHECK([whether android.jar is new enough],
-    [emacs_cv_android_s_or_later],
+    [emacs_cv_android_u_or_later],
     AS_IF([rm -f conftest.class
 cat << EOF > conftest.java
 
@@ -949,18 +949,18 @@ import android.os.Build;
 
 class conftest
 {
-  private static int test = Build.VERSION_CODES.TIRAMISU;
+  private static int test = Build.VERSION_CODES.UPSIDE_DOWN_CAKE;
 }
 
 EOF
 ("$JAVAC" -classpath "$with_android" -target 1.7 -source 1.7 conftest.java \
   -d . >&AS_MESSAGE_LOG_FD 2>&1) && test -s conftest.class && rm -f 
conftest.class],
-          [emacs_cv_android_s_or_later=yes],
-          [emacs_cv_android_s_or_later=no]))
+          [emacs_cv_android_u_or_later=yes],
+          [emacs_cv_android_u_or_later=no]))
 
-  if test "$emacs_cv_android_s_or_later" = "no"; then
+  if test "$emacs_cv_android_u_or_later" = "no"; then
     AC_MSG_ERROR([Emacs must be built with an android.jar file produced for \
-Android 13 (Tiramisu) or later.])
+Android 14 (Upside Down Cake) or later.])
   fi
 
   dnl See if the Java compiler supports the `--release' option which
@@ -1152,6 +1152,8 @@ main (void)
    foo = "emacs_api_32";
 #elif __ANDROID_API__ < 34
    foo = "emacs_api_33";
+#elif __ANDROID_API__ < 35
+   foo = "emacs_api_34";
 #else
    foo = "emacs_api_future";
 #endif
diff --git a/doc/emacs/ChangeLog.1 b/doc/emacs/ChangeLog.1
index 1cf26aeff06..6e20eb942ce 100644
--- a/doc/emacs/ChangeLog.1
+++ b/doc/emacs/ChangeLog.1
@@ -5771,7 +5771,7 @@
        Add view-external-packages on C-h C-e.
        Add view-order-manuals on C-h C-m.
 
-2008-02-17  Ulrich Mueller  <ulm@kph.uni-mainz.de>
+2008-02-17  Ulrich Müller  <ulm@kph.uni-mainz.de>
 
        * msdog-xtra.texi (MS-DOS): Docstring fix.
 
diff --git a/doc/emacs/android.texi b/doc/emacs/android.texi
index 9f3cca2b137..161712493a6 100644
--- a/doc/emacs/android.texi
+++ b/doc/emacs/android.texi
@@ -333,7 +333,7 @@ time.
 
   From the perspective of users, Android is mostly a single user
 operating system; however, from the perspective of applications and
-Emacs, the system has an overwhelming number of users.
+Emacs, the system is host to an overwhelming number of users.
 
   Each application runs in its own user, with its home directory set
 to its app data directory (@pxref{Android File
@@ -360,12 +360,12 @@ consult the values of the variables 
@code{ctags-program-name},
 @xref{Subprocess Creation,,, elisp, the Emacs Lisp Reference Manual}.
 
   The @file{/assets} directory containing Emacs start-up files is
-supposed to be inaccessible to processes not directly created by
+meant to be inaccessible to processes not directly created by
 @code{zygote}, the system service responsible for starting
 applications.  Since required Lisp is found in the @file{/assets}
 directory, it would thus follow that it is not possible for Emacs to
 start itself as a subprocess.  A special binary named
-@command{libandroid-emacs.so} is provided with Emacs, and does its
+@command{libandroid-emacs.so} is provided with Emacs, which tries its
 best to start Emacs for the purpose of running Lisp in batch mode.
 However, the approach it takes was devised by reading Android source
 code, and is not sanctioned by the Android compatibility definition
@@ -374,33 +374,32 @@ documents, so your mileage may vary.
 @cindex call-process, Android
 @vindex android-use-exec-loader
   Android 10 and later also prohibit Emacs itself from running
-executables inside the app data directory, obstensibly for security
-reasons.  On these systems, Emacs normally applies a workaround;
+executables inside the app data directory, ostensibly out of security
+concerns.  On these systems, Emacs normally applies a workaround;
 however, this workaround requires running all sub-processes through
 another subprocess which implements an executable loader and applies
-process tracing to all its children, which may prove to be problematic
-for various different reasons.  In that case, the workaround can be
-disabled by changing the variable @code{android-use-exec-loader} to
-@code{nil}.
+process tracing to all its children, which may prove problematic for a
+variety of reasons.  In that case, the workaround can be disabled by
+changing the variable @code{android-use-exec-loader} to @code{nil}.
 
   When this workaround is in effect, process IDs retrieved through the
 @code{process-id} function will be that of the executable loader
 process; its child will belong to the same process group as the
-loader.  As a result, @code{interrupt-process}, and other related
+loader.  Consequently, @code{interrupt-process}, and other related
 functions will work correctly, but using the process ID returned by
 @code{process-id} for other purposes will not.
 
-  One side effect of the mechanism by which process tracing is carried
-out is that job control facilities inside inferior shells
+  One ramification of the mechanism by which process tracing is
+carried out is that job control facilities inside inferior shells
 (@pxref{Interactive Shell}) will not be able to stop processes, and
-sending the @code{SIGSTOP} signal to a subprocess created by Emacs
-will appear to have no effect.
+@code{SIGSTOP} signals to subprocesses created by Emacs will not take
+effect.
 
   In addition, Android 12 also terminates subprocesses which are
 consuming CPU while Emacs itself is in the background.  The system
-determines which processes are consuming too much CPU in intervals of
-five minutes, and terminates the process that has consumed the most
-CPU time.
+judges which processes are consuming too much CPU at intervals of five
+minutes, and terminates the process that has consumed the most CPU
+time.
 
   Android 12.1 and Android 13 provide an option to disable this
 behavior; to use it, enable ``USB debugging'' (@pxref{Android
@@ -419,25 +418,31 @@ system.  When all Emacs frames move to the background, 
Emacs might be
 terminated by the system at any time, for the purpose of saving system
 resources.
 
-  On Android 7.1 and earlier, Emacs tells the system to treat it as a
-``background service''.  The system will try to avoid killing Emacs
-unless the system is stressed for memory.
+  On Android 7.1 and earlier, Emacs designates itself a ``background
+service'', which impels the system to avoid killing Emacs unless it is
+stressed for memory.
 
   Android 8.0 removed the ability for background services to receive
 such special treatment.  However, Emacs applies a workaround: the
 system considers applications that create a permanent notification to
 be performing active work, and will avoid killing such applications.
 Thus, on those systems, Emacs displays a permanent notification for as
-long as it is running.  Once the notification is displayed, it can be
-safely hidden through the system settings without resulting in Emacs
-being killed.
-
-  However, it is not guaranteed that the system will not kill Emacs
-even if a notification is being displayed.  While the Open Handset
-Alliance's sample implementation of Android behaves correctly, many
-manufacturers place additional restrictions on program execution in
-the background in their proprietary versions of Android.  There is a
-list of such troublesome manufacturers and sometimes workarounds at
+long as it is running.
+
+  Before Android 13, Emacs does not require rights to display
+notifications.  Under Android 13 or later, the notification is hidden
+until the user accords Emacs such rights.  In spite of that, merely
+attempting to display the notification suffices to avert sudden death;
+whether the notification is displayed has no bearing on Emacs's
+capacity to execute in the background, and it may be disabled without
+any adverse consequences.
+
+  However, it is not guaranteed that the system will not kill Emacs.
+Although the Open Handset Alliance's sample implementation of Android
+behaves correctly, many manufacturers institute additional
+restrictions on program execution in the background in their
+proprietary versions of Android.  There is a list of such troublesome
+manufacturers and sometimes workarounds at
 @url{https://dontkillmyapp.com/}.
 
 @cindex permissions under android
@@ -469,6 +474,10 @@ installation:
 @code{android.permission.TRANSMIT_IR}
 @item
 @code{android.permission.WAKE_LOCK}
+@item
+@code{android.permission.FOREGROUND_SERVICE}
+@item
+@code{android.permission.FOREGROUND_SERVICE_SPECIAL_USE}
 @end itemize
 
 Other permissions must be granted by the user through the system
@@ -544,18 +553,18 @@ example, the permission to access contacts may be useful 
for EUDC.
 @node Android Windowing
 @section The Android Window System
 
-  Android has an unusual window system; there, all windows are
+  Android's window system is unusual, in that all windows are
 maximized or full-screen, and only one window can be displayed at a
-time.  On larger devices, the system allows up to four windows to be
-tiled on the screen at any time.
+time.  On larger devices, the system permits simultaneously tiling up
+to four windows on the screen.
 
-  Windows on Android do not continue to exist indefinitely after they
-are created.  Instead, the system may choose to close windows that are
-not on screen in order to save memory, with the assumption that the
-program will save its contents to disk and restore them later, when
-the user asks for it to be opened again.  As this is obviously not
-possible with Emacs, Emacs separates the resources associated with a
-frame from its system window.
+  Windows on Android do not exist indefinitely after they are created.
+Instead, the system may choose to close windows that are not on screen
+in order to conserve memory, with the assumption that the program will
+save its contents to disk and restore them later, when the user asks
+for it to be opened again.  As this is obviously not possible with
+Emacs, Emacs separates the resources associated with a frame from its
+system window.
 
   Each system window created (including the initial window created
 during Emacs startup) is appended to a list of windows that do not
@@ -669,7 +678,7 @@ System -> Apps -> Emacs -> More -> Display over other apps
 modifiers (@pxref{Modifier Keys}) reported within key events, subject
 to a single exception: if @key{Alt} on your keyboard is depressed,
 then the @key{Meta} modifier will be reported by Emacs in its place,
-and vice versa.  This irregularity is since most keyboards posses no
+and vice versa.  This irregularity is since most keyboards possess no
 special @key{Meta} key, and the @key{Alt} modifier is seldom employed
 in Emacs.
 
@@ -703,8 +712,8 @@ and @code{1000}.
 @section Font Backends and Selection under Android
 @cindex fonts, android
 
-  Emacs supports two font backends under Android: they are respectively
-named @code{sfnt-android} and @code{android}.
+  Emacs supports two font backends under Android: they are
+respectively named @code{sfnt-android} and @code{android}.
 
   Upon startup, Emacs enumerates all the TrueType format fonts in the
 directories @file{/system/fonts} and @file{/product/fonts}, and the
@@ -713,17 +722,17 @@ home directory.  Emacs assumes there will always be a 
font named
 ``Droid Sans Mono'', and then defaults to using this font.  These
 fonts are then displayed by the @code{sfnt-android} font driver.
 
-  When running on Android, Emacs currently lacks support for OpenType
-fonts.  This means that only a subset of the fonts installed on the
-system are currently available to Emacs.  If you are interested in
-lifting this limitation, please contact @email{emacs-devel@@gnu.org}.
+  This font driver is presently without support for OpenType fonts;
+hence, only a subset of the fonts installed on any given system are
+available to Emacs.  If you are interested in lifting this limitation,
+please contact @email{emacs-devel@@gnu.org}.
 
   If the @code{sfnt-android} font driver fails to find any fonts at
 all, Emacs falls back to the @code{android} font driver.  This is a
-very lousy font driver, because of limitations and inaccuracies in the
-font metrics provided by the Android platform.  In that case, Emacs
-uses the ``Monospace'' typeface configured on your system; this should
-always be Droid Sans Mono.
+very poor font driver, consequent upon limitations and inaccuracies in
+the font metrics provided by the Android platform.  In that case,
+Emacs uses the ``Monospace'' typeface configured on your system; this
+should always be Droid Sans Mono.
 
 @cindex TrueType GX fonts, android
 @cindex distortable fonts, android
@@ -731,7 +740,7 @@ always be Droid Sans Mono.
   As on X systems, Emacs supports distortable fonts under Android.
 These fonts (also termed ``TrueType GX fonts'', ``variable fonts'',
 and ``multiple master fonts'') provide multiple different styles
-(``Bold'', ``Italic'', etc) using a single font file.
+(``Bold'', ``Italic'', and the like) using a single font file.
 
   When a user-installed distortable font is found, each style that a
 previously discovered font provided will no longer be used.  In
@@ -743,6 +752,22 @@ conventional font with the same style and family will be 
removed;
 distortable fonts with the same family will no longer be used to
 provide that style.
 
+@cindex default font families, Android
+@vindex sfnt-default-family-alist
+
+  Emacs generally assumes the presence of font families named
+@samp{Monospace}, @samp{Monospace Serif}, @samp{Sans Serif}, and
+@samp{DejaVu Serif}.  Since Android does not provide any fonts by
+these names, Emacs modifies requests for them to request one of a
+corresponding set of font families distributed with Android.
+
+  To change either the set of font families subject to replacement, or
+that by which they are replaced, modify the variable
+@code{sfnt-default-family-alist}; then, restart Emacs.  Bear in mind
+that this is usually unwarranted, with customizations to the default
+or @code{variable-pitch} faces better made through modifying their
+definitions (@pxref{Face Customization}).
+
 @node Android Troubleshooting
 @section Troubleshooting Startup Problems on Android
 @cindex troubleshooting, android
@@ -752,8 +777,8 @@ provide that style.
   Since Android has no command line, there is normally no way to
 specify command-line arguments when starting Emacs.  This is very
 nasty when you make a mistake in your Emacs initialization files that
-prevents Emacs from starting up at all, as the system normally
-prevents other programs from accessing Emacs's home directory.
+prevents Emacs from starting up at all, as the system generally
+prohibits other programs from accessing Emacs's home directory.
 @xref{Initial Options}.
 
   However, Emacs can be started with the equivalent of either the
@@ -796,11 +821,12 @@ your initialization or dump files from there instead.
 @cindex installing extra software on Android
 @cindex installing Unix software on Android
 
-  Android includes an extremely limited set of Unix-like command line
-tools in a default installation.  Several projects exist to argument
-this selection, providing options that range from improved
-reproductions of Unix command-line utilities to package repositories
-containing extensive collections of free GNU and Unix software.
+  An exceptionally limited set of Unix-like command line tools is
+distributed alongside default installations of Android.  Several
+projects exist to augment this selection, providing options that range
+from improved reproductions of Unix command-line utilities to package
+repositories providing extensive collections of free GNU and Unix
+software.
 
   @uref{http://busybox.net, Busybox} provides Unix utilities and
 limited replicas of certain popular GNU programs such as
@@ -812,17 +838,17 @@ on the Debian project's @command{dpkg} system and a set 
of package
 repositories containing substantial amounts of free software for Unix
 systems, including compilers, debuggers, and runtimes for languages
 such as C, C++, Java, Python and Common Lisp.  These packages are
-normally installed from within a purpose-built terminal emulator
-application, but Emacs can access them if it is built with the same
-application signing key as the Termux terminal emulator, and with its
-``shared user ID'' set to the package name of the terminal emulator
-program.  The file @file{java/INSTALL} within the Emacs distribution
-explains how to build Emacs in this fashion.
+customarily installed from within a purpose-built terminal emulator
+application, but access is also granted to Emacs when it is built with
+the same application signing key, and its ``shared user ID'' is set to
+the same package name, as that of the terminal emulator program.  The
+file @file{java/INSTALL} within the Emacs distribution illustrates how
+to build Emacs in this fashion.
 
   @uref{https://github.com/termux/termux-packages, termux-packages}
-provides the package definitions that are used by Termux to generate
-their package repositories, which may also be independently compiled
-for installation within Emacs's home directory.
+provides the package definitions used by Termux to generate their
+package repositories, which may also be independently compiled for
+installation within Emacs's home directory.
 
   In addition to the projects mentioned above, statically linked
 binaries for most Linux kernel-based systems can also be run on
diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi
index d6610099460..a2639ce6d3e 100644
--- a/doc/emacs/building.texi
+++ b/doc/emacs/building.texi
@@ -567,7 +567,7 @@ see the Flymake Info manual, which is distributed with 
Emacs.
 
 The GUD (Grand Unified Debugger) library provides an Emacs interface
 to a wide variety of symbolic debuggers.  It can run the GNU Debugger
-(GDB), as well as DBX, SDB, XDB, Guile REPL debug commands, Perl's
+(GDB), as well as LLDB, DBX, SDB, XDB, Guile REPL debug commands, Perl's
 debugging mode, the Python debugger PDB, and the Java Debugger JDB.
 
   Emacs provides a special interface to GDB, which uses extra Emacs
@@ -609,6 +609,10 @@ exists, switch to it; otherwise, create the buffer and 
switch to it.
 The other commands in this list do the same, for other debugger
 programs.
 
+@item M-x lldb
+@findex lldb
+Run the LLDB debugger.
+
 @item M-x perldb
 @findex perldb
 Run the Perl interpreter in debug mode.
@@ -698,6 +702,20 @@ which edited source line corresponds to the line reported 
by the
 debugger subprocess.  To update this information, you typically have
 to recompile and restart the program.
 
+@cindex GUD and hl-line-mode
+@cindex highlighting execution lines in GUD
+@vindex gud-highlight-current-line
+  Moreover, GUD is capable of visually demarcating the current
+execution line within the window text itself in one of two fashions:
+the first takes effect when the user option
+@code{gud-highlight-current-line} is enabled, and displays that line
+in an overlay whose appearance is provided by the face
+@code{gud-highlight-current-line-face}.  The other takes effect when
+HL Line Mode (@pxref{Cursor Display}) is enabled, and moves the
+overlay introduced by HL Line Mode briefly to the execution line,
+until a subsequent editing command repositions it back beneath the
+cursor.
+
 @cindex GUD Tooltip mode
 @cindex mode, GUD Tooltip
 @findex gud-tooltip-mode
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi
index 23dcc44a928..adecc873163 100644
--- a/doc/emacs/custom.texi
+++ b/doc/emacs/custom.texi
@@ -1507,7 +1507,13 @@ mode or subdirectory, and for variable and value, and 
adds the
 entry defining the directory-local variable.  @kbd{M-x
 delete-dir-local-variable} deletes an entry.  @kbd{M-x
 copy-file-locals-to-dir-locals} copies the file-local variables in the
-current file into @file{.dir-locals.el}.
+current file into @file{.dir-locals.el}, or @file{.dir-locals-2.el} if
+that file is also present.
+
+With a prefix argument, all three commands prompt for the file you
+want to modify.  Although it doesn't have to exist, you must enter a
+valid filename, either @file{.dir-locals.el} or
+@file{.dir-locals-2.el}.
 
 @findex dir-locals-set-class-variables
 @findex dir-locals-set-directory-class
@@ -2924,6 +2930,7 @@ Type @kbd{C-q}, followed by the key you want to bind, to 
insert @var{char}.
 @node Early Init File
 @subsection The Early Init File
 @cindex early init file
+@cindex @file{early-init.el} file
 
   Most customizations for Emacs should be put in the normal init file.
 @xref{Init File}.  However, it is sometimes necessary
diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi
index fa8ca4cbf17..cc178dbe99f 100644
--- a/doc/emacs/display.texi
+++ b/doc/emacs/display.texi
@@ -740,7 +740,7 @@ frame:
 This is the base face used for the mode lines, as well as header lines
 and for menu bars when toolkit menus are not used.  By default, it's
 drawn with shadows for a raised effect on graphical displays, and
-drawn as the inverse of the default face on non-windowed terminals.
+drawn as the inverse of the default face on text terminals.
 
 The @code{mode-line-active} and @code{mode-line-inactive} faces (which
 are the ones used on the mode lines) inherit from this face.
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi
index 7a21eb49e24..da9696dfa4b 100644
--- a/doc/emacs/emacs.texi
+++ b/doc/emacs/emacs.texi
@@ -20,8 +20,7 @@ This is the @cite{GNU Emacs Manual},
 @end ifclear
 updated for Emacs version @value{EMACSVER}.
 
-Copyright @copyright{} 1985--1987, 1993--2023 Free Software Foundation,
-Inc.
+Copyright @copyright{} 1985--2023 Free Software Foundation, Inc.
 
 @quotation
 Permission is granted to copy, distribute and/or modify this document
@@ -553,7 +552,7 @@ Frames and Graphical Displays
 * Dialog Boxes::        Controlling use of dialog boxes.
 * Tooltips::            Displaying information at the current mouse position.
 * Mouse Avoidance::     Preventing the mouse pointer from obscuring text.
-* Non-Window Terminals::  Multiple frames on terminals that show only one.
+* Text Terminals::      Multiple frames on terminals that show only one.
 * Text-Only Mouse::     Using the mouse in text terminals.
 
 International Character Set Support
@@ -595,6 +594,7 @@ Indentation
 * Tab Stops::             Stop points for indentation in Text modes.
 * Just Spaces::           Using only space characters for indentation.
 * Indent Convenience::    Optional indentation features.
+* Code Alignment::        Making common parts of lines start at the same 
column.
 
 Commands for Human Languages
 
diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi
index 2a9567a7bcd..e2e30408a65 100644
--- a/doc/emacs/frames.texi
+++ b/doc/emacs/frames.texi
@@ -1,6 +1,5 @@
 @c This is part of the Emacs manual.
-@c Copyright (C) 1985--1987, 1993--1995, 1997, 1999--2023 Free Software
-@c Foundation, Inc.
+@c Copyright (C) 1985--2023 Free Software Foundation, Inc.
 @c See file emacs.texi for copying conditions.
 @node Frames
 @chapter Frames and Graphical Displays
@@ -30,9 +29,9 @@ displays (@pxref{Exiting}).  To close just the selected 
frame, type
 frames.  On text terminals, many of these features are unavailable.
 However, it is still possible to create multiple frames on text
 terminals; such frames are displayed one at a time, filling the entire
-terminal screen (@pxref{Non-Window Terminals}).  It is also possible
-to use the mouse on some text terminals (@pxref{Text-Only Mouse}, for
-doing so on GNU and Unix systems; and
+terminal screen (@pxref{Text Terminals}).  It is also possible to use
+the mouse on some text terminals (@pxref{Text-Only Mouse}, for doing
+so on GNU and Unix systems; and
 @iftex
 @pxref{MS-DOS Mouse,,,emacs-xtra,Specialized Emacs Features},
 @end iftex
@@ -62,7 +61,7 @@ for doing so on MS-DOS).  Menus are supported on all text 
terminals.
 * Dialog Boxes::        Controlling use of dialog boxes.
 * Tooltips::            Displaying information at the current mouse position.
 * Mouse Avoidance::     Preventing the mouse pointer from obscuring text.
-* Non-Window Terminals::  Multiple frames on terminals that show only one.
+* Text Terminals::      Multiple frames on terminals that show only one.
 * Text-Only Mouse::     Using the mouse in text terminals.
 @end menu
 
@@ -593,7 +592,7 @@ the ordinary, interactive frames are deleted.  In this 
case, @kbd{C-x
 
   The @kbd{C-x 5 1} (@code{delete-other-frames}) command deletes all
 other frames on the current terminal (this terminal refers to either a
-graphical display, or a text terminal; @pxref{Non-Window Terminals}).
+graphical display, or a text terminal; @pxref{Text Terminals}).
 If the Emacs session has frames open on other graphical displays or
 text terminals, those are not deleted.
 
@@ -1765,8 +1764,8 @@ You can also use the command @kbd{M-x 
mouse-avoidance-mode} to enable
 the mode.  Whenever Mouse Avoidance mode moves the mouse, it also
 raises the frame.
 
-@node Non-Window Terminals
-@section Non-Window Terminals
+@node Text Terminals
+@section Text Terminals
 @cindex text terminal
 
   On a text terminal, Emacs can display only one Emacs frame at a
diff --git a/doc/emacs/indent.texi b/doc/emacs/indent.texi
index 17b663d22e1..0df973c1dd0 100644
--- a/doc/emacs/indent.texi
+++ b/doc/emacs/indent.texi
@@ -55,6 +55,7 @@ repositioned to the first non-whitespace character on the 
line.
 * Tab Stops::             Stop points for indentation in Text modes.
 * Just Spaces::           Using only space characters for indentation.
 * Indent Convenience::    Optional indentation features.
+* Code Alignment::        Making common parts of lines start at the same 
column.
 @end menu
 
 @node Indentation Commands
@@ -265,3 +266,236 @@ indents the line after every @key{RET} you type.  This 
mode is enabled
 by default.  To toggle this minor mode, type @kbd{M-x
 electric-indent-mode}.  To toggle the mode in a single buffer,
 use @kbd{M-x electric-indent-local-mode}.
+
+@node Code Alignment
+@section Code Alignment
+@cindex code alignment
+@cindex aligning code
+
+  @dfn{Alignment} is the process of adjusting whitespace in a sequence
+of lines in the region such that in all lines certain parts begin at
+the same column.  This is usually something you do to enhance
+readability of a piece of text or code.  The classic example is
+aligning a series of assignments in C-like programming languages:
+
+@example
+int a = 1;
+short foo = 2;
+double blah = 4;
+@end example
+
+@noindent
+is commonly aligned to:
+
+@example
+int    a    = 1;
+short  foo  = 2;
+double blah = 4;
+@end example
+
+@cindex alignment rules
+@findex align
+  You can use the command @kbd{M-x align} to align lines in the
+current region.  This command knows about common alignment patterns
+across many markup and programming languages.  It encodes these
+patterns as a set of @dfn{alignment rules}, that say how to align
+different kinds of text in different contexts.
+
+@vindex align-rules-list
+@vindex align-mode-rules-list
+The user option @code{align-rules-list} says which alignment rules
+@kbd{M-x align} should consult.  The value of this option is a list
+with elements describing alignment rules.  Each element is a cons cell
+@code{(@var{title} . @var{attributes})}, where @var{title} is the name
+of the alignment rule as a symbol, and @var{attributes} is a list of
+rule attributes that define when the rule should apply and how it
+partitions and aligns lines.  Each rule attribute is a cons cell
+@code{(@var{attribute} . @var{value})}, where @var{attribute} is the
+name of attribute and @var{value} is its value.  The only required
+attribute is @code{regexp}, whose value is a regular expression with
+sub-expressions matching the parts of each line where @kbd{M-x align}
+should expand or contract whitespace (@pxref{Regexp Backslash}).  See
+the documentation string of @code{align-rules-list} (@kbd{C-h v
+align-rules-list @key{RET}}) for a full description of possible
+alignment rule attributes.  By default, this option is set to a long
+list of alignment rules for many languages that Emacs supports.  The
+default rules use the @code{modes} rule attribute to specify major
+modes in which @kbd{M-x align} should apply them.  Major modes can
+also override @code{align-rules-list} by setting the buffer-local
+variable @code{align-mode-rules-list} to a non-@code{nil} list of
+alignment rules.  When @code{align-mode-rules-list} is non-@code{nil},
+@kbd{M-x align} consults it instead of @code{align-rules-list}.
+
+@cindex align exclusion rules
+@vindex align-exclude-rules-list
+@vindex align-mode-exclude-rules-list
+Besides alignment rules, @kbd{M-x align} uses another kind of rules
+called @dfn{exclusion rules}.  The exclusion rules say which parts in
+the region @kbd{M-x align} should not align and instead leave them
+intact.  The user option @code{align-exclude-rules-list} specifies
+these exclusion rules.  Similarly to @code{align-rules-list}, the
+value of @code{align-exclude-rules-list} is also a list of cons cells
+that describe the exclusion rules.  By default,
+@code{align-exclude-rules-list} includes rules that exclude alignment
+in quoted strings and comments in Lisp, C and other languages.  Beyond
+the default exclusion rules in @code{align-exclude-rules-list}, major
+modes can define bespoke exclusion rules by setting
+@code{align-mode-exclude-rules-list} to a non-@code{nil} list of
+rules, this overrides @code{align-exclude-rules-list} just like
+@code{align-mode-rules-list} overrides @code{align-rules-list}.
+
+@cindex alignment sections
+@vindex align-region-separate
+@kbd{M-x align} splits the region into a series of @dfn{sections},
+usually sequences of non-blank lines, and aligns each section
+according to all matching alignment rule by expanding or contracting
+stretches of whitespace.  @kbd{M-x align} consistently aligns all
+lines inside a single section, but it may align different sections in
+the region differently.  The user option @code{align-region-separate}
+specifies how @kbd{M-x align} separates the region to sections.  This
+option can be one of the symbols @code{entire}, @code{group}, or a
+regular expression.  If @code{align-region-separate} is @code{entire},
+Emacs aligns the entire region as a single section.  If this option is
+@code{group}, Emacs aligns each group of consecutive non-blank lines
+in the region as a separate section.  If @code{align-region-separate}
+is a regular expression, @kbd{M-x align} scans the region for matches
+to that regular expression and treats them as section separators.  By
+default @code{align-region-separate} is set to a regular expression
+that matches blank lines and lines that contains only whitespace and a
+single curly brace (@samp{@{} or @samp{@}}).  For special cases where
+regular expressions are not accurate enough, you can also set
+@code{align-region-separate} to a function that says how to separate
+the region to alignment sections.  See the documentation string of
+@code{align-region-separate} for more details.  Specific alignment
+rules can override the value of @code{align-region-separate} and
+define their own section separator by specifying the @code{separate}
+rule attribute.
+
+If you call @kbd{M-x align} with a prefix argument (@kbd{C-u}), it
+enables more alignment rules that are often useful but may sometimes
+be too intrusive.  For example, in a Lisp buffer with the following
+form:
+
+@lisp
+(set-face-attribute 'mode-line-inactive nil
+                    :box nil
+                    :background nil
+                    :underline "black")
+@end lisp
+
+@noindent
+Typing (@kbd{C-u M-x align}) yields:
+
+@lisp
+(set-face-attribute 'mode-line-inactive nil
+                    :box                nil
+                    :background         nil
+                    :underline          "black")
+@end lisp
+
+In most cases, you should try @kbd{M-x align} without a prefix
+argument first, and if that doesn't produce the right result you can
+undo with @kbd{C-/} and try again with @kbd{C-u M-x align}.
+
+@findex align-highlight-rule
+@findex align-unhighlight-rule
+You can use the command @kbd{M-x align-highlight-rule} to visualize
+the effect of a specific alignment or exclusion rule in the current
+region.  This command prompts you for the title of a rule and
+highlights the parts on the region that this rule affects.  For
+alignment rules, this command highlights the whitespace that @kbd{M-x
+align} would expand or contract, and for exclusion this command
+highlights the parts that @kbd{M-x align} would exclude from
+alignment.  To remove the highlighting that this command creates, type
+@kbd{M-x align-unhighlight-rule}.
+
+@findex align-current
+@findex align-entire
+  The command @kbd{M-x align-current} is similar to @kbd{M-x align},
+except that it operates only on the alignment section that contains
+point regardless of the current region.  This command determines the
+boundaries of the current section according to the section separators
+that @code{align-region-separate} define.  @kbd{M-x align-entire} is
+another variant of @kbd{M-x align}, that disregards
+@code{align-region-separate} and aligns the entire region as a single
+alignment section with consistent alignment.  If you set
+@code{align-region-separate} to @code{entire}, @kbd{M-x align} behaves
+like @kbd{M-x align-entire} by default.  To illustrate the effect of
+aligning the entire region as a single alignment section, consider the
+following code:
+
+@example
+one = 1;
+foobarbaz = 2;
+
+spam = 3;
+emacs = 4;
+@end example
+
+@noindent
+when the region covers all of these lines, typing @kbd{M-x align}
+yields:
+
+@example
+one       = 1;
+foobarbaz = 2;
+
+spam  = 3;
+emacs = 4;
+@end example
+
+@noindent
+On the other hand, @kbd{M-x align-entire} aligns all of the lines as a
+single section, so the @samp{=} appears at the same column in all
+lines:
+
+@example
+one       = 1;
+foobarbaz = 2;
+
+spam      = 3;
+emacs     = 4;
+@end example
+
+@findex align-regexp
+  The command @kbd{M-x align-regexp} lets you align the current region
+with an alignment rule that you define ad-hoc, instead of using the
+predefined rules in @code{align-rules-list}.  @kbd{M-x align-regexp}
+prompts you for a regular expression and uses that expression as the
+@code{regexp} attribute for an ad-hoc alignment rule that this command
+uses to align the current region.  By default, this command adjusts
+the whitespace that matches the first sub-expression of the regular
+expression you specify.  If you call @kbd{M-x align-regexp} with a
+prefix argument, it also prompts you for the sub-expression to use and
+lets you specify the amount of whitespace to use as padding, as well
+as whether to apply the rule repeatedly to all matches of the regular
+expression in each line.  @xref{Regexp Backslash}, for more
+information about regular expressions and their sub-expressions.
+
+@vindex align-indent-before-aligning
+  If the user option @code{align-indent-before-aligning} is
+non-@code{nil}, Emacs indents the region before aligning it with
+@kbd{M-x align}.  @xref{Indentation}.  By default
+@code{align-indent-before-aligning} is set to @code{nil}.
+
+@vindex align-to-tab-stop
+  The user option @code{align-to-tab-stop} says whether aligned parts
+should start at a tab stop (@pxref{Tab Stops}).  If this option is
+@code{nil}, @kbd{M-x align} uses just enough whitespace for alignment,
+disregarding tab stops.  If this is a non-@code{nil} symbol, @kbd{M-x
+align} checks the value of that symbol, and if this value is
+non-@code{nil}, @kbd{M-x align} aligns to tab stops.  By default, this
+option is set to @code{indent-tabs-mode}, so alignment respects tab
+stops in buffers that use tabs for indentation.  @xref{Just Spaces}.
+
+@vindex align-default-spacing
+  The user option @code{align-default-spacing} specifies the default
+amount of whitespace that @kbd{M-x align} and its related commands use
+for padding between the different parts of each line when aligning it.
+When @code{align-to-tab-stop} is @code{nil}, the value of
+@code{align-default-spacing} is the number of spaces to use for
+padding; when @code{align-to-tab-stop} is non-@code{nil}, the value of
+@code{align-default-spacing} is instead the number of tab stops to
+use.  Each alignment rule can override the default that
+@code{align-default-spacing} specifies with the @code{spacing}
+attribute rule.
diff --git a/doc/emacs/input.texi b/doc/emacs/input.texi
index db0e88a1c9c..0dd7fca41cc 100644
--- a/doc/emacs/input.texi
+++ b/doc/emacs/input.texi
@@ -23,56 +23,57 @@ which is detailed here.
 @section Using Emacs on Touchscreens
 @cindex touchscreen input
 
-  Touchscreen input works by pressing and moving tools (which include
-fingers and some pointing devices--styluses, for example) onto a frame
-in order to manipulate its contents.
+  Touchscreen input is the manipulation of a frame's contents by the
+placement and motion of tools (instanced by fingers and such pointing
+devices as styluses) on a monitor or computer terminal where it is
+displayed.
 
-  When running under the X Window System or Android, Emacs
-automatically detects and maps the following sequences of movements
-(``gestures'') to common actions:
+  Under the X Window System or Android, Emacs detects and translates
+the following sequences of movements (@dfn{gestures}) to common
+actions:
 
 @itemize @bullet
 @item
 @cindex tapping, touchscreens
-  ``Tapping'', briefly placing and lifting a tool from the display,
-will result in Emacs selecting the window that was tapped, and
-executing any command bound to @code{mouse-1} at that location in the
-window.  If the tap happened on top of a link (@pxref{Mouse
-References}), then Emacs will follow the link instead.
-
-  If a command bound to @code{down-mouse-1} is bound to the location
-where the tap took place, Emacs will execute that command as well.
+  @dfn{Tapping}, briefly placing and lifting a tool from the display,
+will select the window that was tapped, and execute any command bound
+to @code{mouse-1} at that location in the window.  If a link
+(@pxref{Mouse References}) exists there, then Emacs will follow that
+link instead (insofar as such action differs from that taken upon the
+simulation of a @code{mouse-1} event).
 
 @item
 @cindex scrolling, touchscreens
-  ``Scrolling'', meaning to place a tool on the display and move it up
-or down, will result in Emacs scrolling the window contents in the
-direction where the tool moves.
-
-  If the tool is moved left or right, Emacs additionally scrolls the
-window horizontally to follow (@pxref{Horizontal Scrolling}.)
+@vindex touch-screen-enable-hscroll
+  @dfn{Scrolling}, which is continuous vertical or horizontal motion
+on the screen, will scroll the contents of the window beneath the
+tool's initial location in the direction of movement.  The user option
+@code{touch-screen-enable-hscroll} governs whether horizontal
+scrolling (@pxref{Horizontal Scrolling}) is performed in reaction to
+this gesture.
 
 @item
 @cindex dragging, touchscreens
 @cindex long-press, touchscreens
-  ``Dragging'', which is performing a @dfn{long-press} by placing a
-tool on the display and leaving it there for a while prior to moving
-the tool around will make Emacs set the point to where the tool was
-and begin selecting text under the tool as it moves around, as if
-@code{mouse-1} were to be held down.  @xref{Mouse Commands}.
+  @dfn{Dragging}, which is performing a @dfn{long-press} by placing a
+tool on the display and leaving it there awhile before moving it to
+another position, will move point to the tool's initial position, and
+commence selecting text under the tool as it continues its motion, as
+if @code{mouse-1} were to be held down and a mouse moved analogously.
+@xref{Mouse Commands}.
 
 @vindex touch-screen-word-select
 @cindex word selection mode, touchscreens
-  Some people find it difficult to position a tool accurately on a
-touch screen display, to the detriment of text selection.  The user
-option @code{touch-screen-word-select} enables ``word selection
-mode'', causing dragging to select the complete word, not only the
-character containing the position of the tool.
+  To the detriment of text selection, it can prove challenging to
+position a tool accurately on a touch screen display.  The user option
+@code{touch-screen-word-select}, which when enabled, prompts dragging
+to select the complete word under the tool.  (Normally, the selection
+is only extended to encompass the character beneath the tool.)
 
 @vindex touch-screen-extend-selection
 @cindex extending the selection, touchscreens
-  Similarly, it may be difficult to select all of the text intended
-within a single gesture.  If the user option
+  In the same vein, it may be difficult to select all of the text
+intended within a single gesture.  If the user option
 @code{touch-screen-extend-selection} is enabled, taps on the locations
 of the point or the mark within a window will begin a new ``drag''
 gesture, where the region will be extended in the direction of any
@@ -80,21 +81,19 @@ subsequent movement.
 
 @vindex touch-screen-preview-select
 @cindex previewing the region during selection, touchscreens
-  Difficulties in making accurate adjustments to the region can also
-be alleviated by indicating the position of the point relative to its
-containing line within the echo area, since the window cursor may be
-physically obscured by the tool.  If
+  Difficulties in making accurate adjustments to the region from the
+cursor being physically obscured by the tool can be mitigated by
+indicating the position of the point within the echo area.  If
 @code{touch-screen-preview-select} is non-@code{nil}, the line
-containing point is displayed in the echo area (@pxref{Echo Area})
-during the motion of the tool, followed by another line indicating the
-position of point within the first line.
+surrounding point is displayed in the echo area (@pxref{Echo Area})
+during the motion of the tool, below which is another line indicating
+the position of point relative to the first.
 @end itemize
 
 @vindex touch-screen-delay
-  By default, Emacs considers a tool as having been left on the
-display long enough to trigger a ``long-press'' after 0.7 seconds, but
-this can be changed by customizing the variable
-@code{touch-screen-delay}.
+  Emacs registers a long-press after the time a tool has been placed
+upon the screen exceeds 0.7 seconds.  This delay can be adjusted
+through customizing the variable @code{touch-screen-delay}.
 
 @node On-Screen Keyboards
 @section Using Emacs with Virtual Keyboards
diff --git a/doc/emacs/macos.texi b/doc/emacs/macos.texi
index 18811291a9e..c1927a01eb4 100644
--- a/doc/emacs/macos.texi
+++ b/doc/emacs/macos.texi
@@ -149,7 +149,10 @@ the corresponding left-hand key.
 @vindex ns-use-proxy-icon
 @item ns-use-proxy-icon
 This variable specifies whether to display the proxy icon in the
-titlebar.
+titlebar.  The proxy icon can be used to drag the file associated with
+the current buffer to other applications, a printer, the desktop,
+etc., in the same way you can from Finder.  You might have to disable
+@code{tool-bar-mode} to see the proxy icon.
 
 @vindex ns-confirm-quit
 @item ns-confirm-quit
diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi
index 5f9a5d89bf3..0725d889747 100644
--- a/doc/emacs/maintaining.texi
+++ b/doc/emacs/maintaining.texi
@@ -482,22 +482,23 @@ system, but is usually not excessive.
 @cindex filesets, VC
 @cindex VC filesets
    Most VC commands operate on @dfn{VC filesets}.  A VC fileset is a
-collection of one or more files that a VC operation acts on.  When you
-type VC commands in a buffer visiting a version-controlled file, the
-VC fileset is simply that one file.  When you type them in a VC
+collection of one or more files that a VC operation acts upon.  When
+you type VC commands in a buffer visiting a version-controlled file,
+the VC fileset is simply that one file.  When you type them in a VC
 Directory buffer, and some files in it are marked, the VC fileset
 consists of the marked files (@pxref{VC Directory Mode}).  Likewise,
 when you invoke a VC command from a Dired buffer, the VC fileset
 consists of the marked files (@pxref{Marks vs Flags}), defaulting to
 the file shown on the current line if no files are marked.
 
-  On modern changeset-based version control systems (@pxref{VCS
-Changesets}), VC commands handle multi-file VC filesets as a group.
-For example, committing a multi-file VC fileset generates a single
-revision, containing the changes to all those files.  On older
-file-based version control systems like CVS, each file in a multi-file
-VC fileset is handled individually; for example, a commit generates
-one revision for each changed file.
+  With modern changeset-based version control systems (@pxref{VCS
+Changesets}), such as Git, Mercurial, and Bazaar, VC commands handle
+multi-file VC filesets as a group.  For example, committing a
+multi-file VC fileset generates a single revision, containing the
+changes to all those files.  On older file-based version control
+systems like CVS, each file in a multi-file VC fileset is handled
+individually; thus, committing a fileset generates one revision for
+each changed file in the fileset.
 
 @table @kbd
 @item C-x v v
@@ -508,14 +509,16 @@ VC fileset.
 @findex vc-next-action
 @kindex C-x v v
   The principal VC command is a multi-purpose command, @kbd{C-x v v}
-(@code{vc-next-action}), which performs the most appropriate
-action on the current VC fileset: either registering it with a version
-control system, or committing it, or unlocking it, or merging changes
-into it.  The precise actions are described in detail in the following
-subsections.  You can use @kbd{C-x v v} either in a file-visiting
-buffer, in a Dired buffer, or in a VC Directory buffer; in the latter
-two cases the command operates on the fileset consisting of the marked
-files.
+(@code{vc-next-action}), which performs the most appropriate action on
+the current VC fileset: either registering it with a version control
+system, or committing it, or unlocking it, or merging changes into it.
+The precise actions for each situation are described in detail in the
+following subsections.  You can use @kbd{C-x v v} either in a
+file-visiting buffer, in a Dired buffer, or in a VC Directory buffer;
+in the latter two cases the command operates on the fileset consisting
+of the marked files.  You can also use @kbd{C-x v v}, in a buffer with
+patches under Diff Mode (@pxref{Diff Mode}), in which case the command
+operates on the files whose diffs are shown in the buffer.
 
   Note that VC filesets are distinct from the named filesets used
 for viewing and visiting files in functional groups
@@ -523,7 +526,7 @@ for viewing and visiting files in functional groups
 and don't persist across sessions.
 
 @menu
-* VC With A Merging VCS::  Without locking: default mode for CVS.
+* VC With A Merging VCS::  Without locking: default mode for Git, Hg, SVN, CVS.
 * VC With A Locking VCS::  RCS in its default mode, SCCS, and optionally CVS.
 * Advanced C-x v v::       Advanced features available with a prefix argument.
 @end menu
@@ -531,44 +534,56 @@ and don't persist across sessions.
 @node VC With A Merging VCS
 @subsubsection Basic Version Control with Merging
 
-  On a merging-based version control system (i.e., most modern ones;
-@pxref{VCS Merging}), @kbd{C-x v v} does the following:
+  With a modern merging-based version control system (such as Git and Hg;
+@pxref{VCS Merging}), @kbd{C-x v v} does the following when invoked
+from a buffer that visits a version-controlled file or a VC Directory
+or Dired buffer:
 
 @itemize @bullet
 @item
 If there is more than one file in the VC fileset and the files have
 inconsistent version control statuses, signal an error.  (Note,
-however, that a fileset is allowed to include both newly-added
-files and modified files; @pxref{Registering}.)
+however, that a fileset is allowed to include both newly-added files
+and modified files; @pxref{Registering}.)  Also signal an error if the
+files in the fileset are missing (removed from the filesystem, but
+still tracked by version control), or are ignored by version control.
 
 @item
-If none of the files in the VC fileset are registered with a version
-control system, register the VC fileset, i.e., place it under version
-control.  @xref{Registering}.  If Emacs cannot find a system to
-register under, it prompts for a repository type, creates a new
-repository, and registers the VC fileset with it.
-
-@item
-If every work file in the VC fileset is unchanged, do nothing.
-
-@item
-If every work file in the VC fileset has been modified, commit the
-changes.  To do this, Emacs pops up a @file{*vc-log*} buffer; type the
-desired log entry for the new revision, followed by @kbd{C-c C-c} to
-commit.  @xref{Log Buffer}.
-
-If committing to a shared repository, the commit may fail if the
-repository has been changed since your last update.  In that
-case, you must perform an update before trying again.  On a
-decentralized version control system, use @kbd{C-x v +}
-(@pxref{Pulling / Pushing}) or @kbd{C-x v m} (@pxref{Merging}).
-On a centralized version control system, type @kbd{C-x v v} again to
-merge in the repository changes.
+If every file in the VC fileset is registered and unchanged with
+respect to the last revision, do nothing.
 
 @item
-Finally, if you are using a centralized version control system, check
-if each work file in the VC fileset is up-to-date.  If any file has
-been changed in the repository, offer to update it.
+If none of the files in the VC fileset are registered with a version
+control system, register the newly-added files in the VC fileset,
+i.e., place them under version control.  @xref{Registering}.  If Emacs
+cannot find a system to register under, it prompts for a repository
+type, creates a new repository, and registers the VC fileset with it.
+You can also specify the system explicitly, see @ref{Advanced C-x v
+v}.  Note that registering the files doesn't commit them; you must
+invoke @w{@kbd{C-x v v}} again to commit, see below.
+
+@item
+If every file in the VC fileset has been either newly-added or
+modified, commit the changed files.  To do this, Emacs pops up a
+@file{*vc-log*} buffer; type the desired log entry for the changes,
+followed by @kbd{C-c C-c} to commit.  @xref{Log Buffer}.
+
+With modern decentralized version control systems (Git, Mercurial,
+etc.), the changes are committed locally and not automatically
+propagated to the upstream repository (which is usually on a remote
+host).  In these cases, if the repository has been changed since your
+last update, the commit may fail.  In that case, you must update from
+upstream and then try again.  Use @kbd{C-x v +} (@pxref{Pulling /
+Pushing}) or @kbd{C-x v m} (@pxref{Merging}) for that.
+
+With a centralized version control system, if the commit fails due to
+upstream changes, type @kbd{C-x v v} again to merge in the upstream
+repository changes.
+
+@item
+Finally, if you are using a centralized version control system, if any
+file in the VC fileset is outdated with respect to the upstream
+repository, offer to update the fileset from the repository.
 @end itemize
 
   These rules also apply when you use RCS in its non-locking mode,
@@ -582,43 +597,60 @@ changes.  In addition, locking is possible with RCS even 
in this mode:
 @kbd{C-x v v} with an unmodified file locks the file, just as it does
 with RCS in its normal locking mode (@pxref{VC With A Locking VCS}).
 
+  If @kbd{C-x v v} is invoked from a buffer under Diff Mode, the
+command assumes the buffer holds a set of patches for one or more
+files.  It then applies the changes to the respective files and
+commits the changes after popping up the @file{*vc-log*} buffer to
+allow you to type a suitable commit log message.
+
 @node VC With A Locking VCS
 @subsubsection Basic Version Control with Locking
 
-  On a locking-based version control system (such as SCCS, and RCS in
+  With a locking-based version control system (such as SCCS, and RCS in
 its default mode), @kbd{C-x v v} does the following:
 
 @itemize @bullet
 @item
 If there is more than one file in the VC fileset and the files have
-inconsistent version control statuses, signal an error.
+inconsistent version control statuses, signal an error.  Also signal
+an error if the files in the fileset are missing (removed from the
+filesystem, but still tracked by version control).
 
 @item
 If each file in the VC fileset is not registered with a version
-control system, register the VC fileset.  @xref{Registering}.  If
-Emacs cannot find a system to register under, it prompts for a
-repository type, creates a new repository, and registers the VC
-fileset with it.
+control system, register the newly-added files in the fileset.
+@xref{Registering}.  If Emacs cannot find a system to register under,
+it prompts for a repository type, creates a new repository, and
+registers the VC fileset with it.  You can also specify the system
+explicitly, see @ref{Advanced C-x v v}.
 
 @item
-If each file is registered and unlocked, lock it and make it writable,
-so that you can begin to edit it.
+If each file is registered and unlocked, check the files out: lock
+each one and make it writable, so that you can begin to edit it.
 
 @item
-If each file is locked by you and contains changes, commit the
-changes.  To do this, Emacs pops up a @file{*vc-log*} buffer; type the
-desired log entry for the new revision, followed by @kbd{C-c C-c} to
-commit (@pxref{Log Buffer}).
+If each file is locked by you and contains changes, commit (a.k.a.@:
+``check-in'') the changes.  To do this, Emacs pops up a
+@file{*vc-log*} buffer; type the desired log entry for the new
+revision, followed by @kbd{C-c C-c} to commit (@pxref{Log Buffer}).
 
 @item
 If each file is locked by you, but you have not changed it, release
-the lock and make the file read-only again.
+the lock and make the file read-only again.  This undoes previous
+check-out operation for files that were not changed since the
+checkout.
 
 @item
 If each file is locked by another user, ask whether you want to
 steal the lock.  If you say yes, the file becomes locked by you,
 and a warning message is sent to the user who had formerly locked the
 file.
+
+@item
+If files in the fileset are unlocked, but have changes with respect to
+their last revision, offer to claim the lock for each such file or to
+revert the file to the last checked-in revision.  (This situation is
+exceptional and should not normally happen.)
 @end itemize
 
   These rules also apply when you use CVS in locking mode, except
@@ -643,19 +675,21 @@ and Emacs fails to detect the correct one.
 @item
 Otherwise, if using CVS, RCS or SRC, you can specify a revision ID.
 
-If the fileset is modified (or locked), this makes Emacs commit with
-that revision ID@.  You can create a new branch by supplying an
-appropriate revision ID (@pxref{Branches}).
-
-If the fileset is unmodified (and unlocked), this checks the specified
-revision into the working tree.  You can also specify a revision on
-another branch by giving its revision or branch ID (@pxref{Switching
-Branches}).  An empty argument (i.e., @kbd{C-u C-x v v @key{RET}})
-checks out the latest (head) revision on the current branch.
-
-This is silently ignored on a decentralized version control system.
-Those systems do not let you specify your own revision IDs, nor do
-they use the concept of checking out individual files.
+If the fileset is modified (or locked), this makes Emacs commit the
+files with that revision ID@.  You can create a new branch by
+supplying an appropriate revision ID (@pxref{Branches}).
+
+If the fileset is unmodified (and unlocked), this checks out the
+specified revision into the working tree.  You can also specify a
+revision on another branch by giving its revision or branch ID
+(@pxref{Switching Branches}).  An empty argument (i.e., @kbd{C-u C-x v
+v @key{RET}}) checks out the latest (a.k.a.@: ``head'') revision on
+the current branch.
+
+Specifying revision ID in this manner is silently ignored by a
+decentralized version control system.  Those systems do not let you
+specify your own revision IDs, nor do they use the concept of checking
+out individual files.
 @end itemize
 
 @node Log Buffer
@@ -789,17 +823,21 @@ If Emacs cannot find a version control system to register 
the file
 under, it prompts for a repository type, creates a new repository, and
 registers the file into that repository.
 
-  On most version control systems, registering a file with @kbd{C-x v
-i} or @kbd{C-x v v} adds it to the working tree but not to the
-repository.  Such files are labeled as @samp{added} in the VC
-Directory buffer, and show a revision ID of @samp{@@@@} in the mode
-line.  To make the registration take effect in the repository, you
-must perform a commit (@pxref{Basic VC Editing}).  Note that a single
-commit can include both file additions and edits to existing files.
-
-  On a locking-based version control system (@pxref{VCS Merging}),
+@cindex added files, VC
+@cindex files added to VCS
+  With most version control systems, registering a file with
+@w{@kbd{C-x v i}} or @w{@kbd{C-x v v}} adds it to the working tree,
+but does not commit it, i.e., doesn't add it to the repository.  Such
+files are labeled as @dfn{added} in the VC Directory buffer, and the
+mode line of the buffers visiting such files shows a revision ID of
+@samp{@@@@}.  To make the registration take effect in the repository,
+you must commit the newly-added files (@pxref{Basic VC Editing}).
+Note that a single commit can include both file additions and edits to
+files already known to the VCS.
+
+  With a locking-based version control system (@pxref{VCS Merging}),
 registering a file leaves it unlocked and read-only.  Type @kbd{C-x v
-v} to start editing it.
+v} to check-out the file and start editing it.
 
 @node Old Revisions
 @subsection Examining And Comparing Old Revisions
@@ -1564,32 +1602,39 @@ commit will be committed to that specific branch.
 @subsubsection Pulling/Pushing Changes into/from a Branch
 
 @table @kbd
+@cindex push changes to upstream (VC)
 @item C-x v P
-On a decentralized version control system, update another location
-with changes from the current branch (a.k.a. ``push'' changes).  This
-concept does not exist for centralized version control systems
+With a decentralized version control system, update another repository
+with locally-committed changes from the current branch (a.k.a.@:
+@dfn{push} changes).  This concept does not exist for centralized
+version control systems
 
+@cindex pull changes from upstream (VC)
 @item C-x v +
-On a decentralized version control system, update the current branch
-by ``pulling in'' changes from another location.
+With a decentralized version control system, update the current branch
+of the local repository by @dfn{pulling in} changes from another
+repository.
 
-On a centralized version control system, update the current VC
-fileset.
+With a centralized version control system, update the current VC
+fileset from the repository.
 @end table
 
 @kindex C-x v P
 @findex vc-push
+@cindex upstream repository
 On a decentralized version control system, the command @kbd{C-x v P}
-(@code{vc-push}) updates another location with changes from the
+(@code{vc-push}) updates another location, commonly known as the
+@dfn{upstream repository}, with locally-committed changes from the
 current branch.  With a prefix argument, it prompts for the exact
 version control command to run, which lets you specify where to push
-changes; the default is @kbd{bzr push} with Bazaar, @kbd{git
-push} with Git, and @kbd{hg push} with Mercurial.  The default
-commands always push to a default location determined by the version
-control system from your branch configuration.
+changes; the default is @kbd{bzr push} with Bazaar, @kbd{git push}
+with Git, and @kbd{hg push} with Mercurial.  The default commands
+always push to the repository in the default location determined by
+the version control system from your branch configuration.
 
 Prior to pushing, you can use @kbd{C-x v O} (@code{vc-log-outgoing})
-to view a log buffer of the changes to be sent.  @xref{VC Change Log}.
+to view a log buffer of the changes to be sent upstream.  @xref{VC
+Change Log}.
 
 @cindex bound branch (Bazaar VCS)
 This command is currently supported only by Bazaar, Git, and Mercurial.
@@ -1603,13 +1648,15 @@ bound.
 
 @kindex C-x v +
 @findex vc-pull
-  On a decentralized version control system, the command @kbd{C-x v +}
-(@code{vc-pull}) updates the current branch and working tree.  It is
-typically used to update a copy of a remote branch.  If you supply a
-prefix argument, the command prompts for the exact version control
-command to use, which lets you specify where to pull changes from.
-Otherwise, it pulls from a default location determined by the version
-control system.
+  With a decentralized version control system, the command @kbd{C-x v
++} (@code{vc-pull}) updates the current branch of the local repository
+and it working tree with changes made in the upstream repository.  It
+is typically used to update a copy (a.k.a.@: @dfn{clone}) of a remote
+branch.  If you supply a prefix argument, the command prompts for the
+exact version control command to use, which lets you specify where to
+pull changes from.  Otherwise, it pulls from the repository in the
+default location determined by the version control system from your
+branch configuration.
 
   Amongst decentralized version control systems, @kbd{C-x v +} is
 currently supported only by Bazaar, Git, and Mercurial.  With Bazaar,
@@ -1625,7 +1672,7 @@ the working directory.
 to view a log buffer of the changes to be applied.  @xref{VC Change
 Log}.
 
-  On a centralized version control system like CVS, @kbd{C-x v +}
+  With a centralized version control system like CVS, @kbd{C-x v +}
 updates the current VC fileset from the repository.
 
 @node Merging
@@ -1634,36 +1681,36 @@ updates the current VC fileset from the repository.
 
 @table @kbd
 @item C-x v m
-On a decentralized version control system, merge changes from another
+With a decentralized version control system, merge changes from another
 branch into the current one.
 
-On a centralized version control system, merge changes from another
+With a centralized version control system, merge changes from another
 branch into the current VC fileset.
 @end table
 
   While developing a branch, you may sometimes need to @dfn{merge} in
 changes that have already been made in another branch.  This is not a
-trivial operation, as overlapping changes may have been made to the
-two branches.
-
-  On a decentralized version control system, merging is done with the
-command @kbd{C-x v m} (@code{vc-merge}).  On Bazaar, this prompts for
-the exact arguments to pass to @kbd{bzr merge}, offering a
-sensible default if possible.  On Git, this prompts for the name of a
-branch to merge from, with completion (based on the branch names known
-to the current repository).  With Mercurial, this prompts for argument
-to pass to @kbd{hg merge}.  The output from running the merge
-command is shown in a separate buffer.
-
-  On a centralized version control system like CVS, @kbd{C-x v m}
+trivial operation, as overlapping and conflicting changes may have
+been made to the two branches.
+
+  With a decentralized version control system, you merge changes with
+the command @kbd{C-x v m} (@code{vc-merge}).  With Bazaar, this
+prompts for the exact arguments to pass to the @command{bzr merge}
+command, offering a sensible default if possible.  With Git, this
+prompts for the name of a branch to merge from, with completion (based
+on the branch names known to the current repository).  With Mercurial,
+this prompts for argument to pass to @command{hg merge}.  The output
+from running the merge command is shown in a separate buffer.
+
+  With a centralized version control system like CVS, @kbd{C-x v m}
 prompts for a branch ID, or a pair of revision IDs (@pxref{Switching
 Branches}); then it finds the changes from that branch, or the changes
 between the two revisions you specified, and merges those changes into
-the current VC fileset.  If you just type @kbd{@key{RET}}, Emacs simply
-merges any changes that were made on the same branch since you checked
-the file out.
+the current VC fileset.  If you just type @kbd{@key{RET}} at the
+prompt, Emacs simply merges any changes that were made on the same
+branch since you checked the file out.
 
-@cindex conflicts
+@cindex conflicts, VC
 @cindex resolving conflicts
   Immediately after performing a merge, only the working tree is
 modified, and you can review the changes produced by the merge with
@@ -1672,9 +1719,12 @@ two branches contained overlapping changes, merging 
produces a
 @dfn{conflict}; a warning appears in the output of the merge command,
 and @dfn{conflict markers} are inserted into each affected work file,
 surrounding the two sets of conflicting changes.  You must then
-resolve the conflict by editing the conflicted files.  Once you are
-done, the modified files must be committed in the usual way for the
-merge to take effect (@pxref{Basic VC Editing}).
+resolve the conflict by editing the conflicted files; by default,
+Emacs will place buffers with VC conflicts in the special Smerge mode,
+which provides special commands for resolving the merge conflicts.
+Once you are done with resolving the conflicts and have saved the
+files with resolved conflicts, those files must be committed in the
+usual way for the merge to take effect (@pxref{Basic VC Editing}).
 
 @node Creating Branches
 @subsubsection Creating New Branches
@@ -1743,6 +1793,14 @@ project.  Also, the VC-aware Project back-end considers 
``untracked''
 files by default.  That behavior is controllable with the variable
 @code{project-vc-include-untracked}.
 
+@cindex current project name on mode line
+@defopt project-mode-line
+If this user option is non-@code{nil}, Emacs displays the name of the
+current project (if any) on the mode line; clicking @kbd{mouse-1} on
+the project name pops up the menu with the project-related commands.
+The default value is @code{nil}.
+@end defopt
+
 @menu
 * Project File Commands::   Commands for handling project files.
 * Project Buffer Commands:: Commands for handling project buffers.
diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi
index 7a88b7ef5e0..d7168fa1ca0 100644
--- a/doc/emacs/misc.texi
+++ b/doc/emacs/misc.texi
@@ -399,18 +399,18 @@ vulnerable to a variety of attacks, and you may want to 
avoid using
 these if what you're doing requires higher security.  (This is the
 @code{ssl} check in @code{network-security-protocol-checks}).
 
+@item Triple DES (or @acronym{3DES}) cipher
+The @acronym{3DES} stream cipher provides at most 112 bits of
+effective security, and a major security vulnerability in it was
+disclosed in 2016 (CVE-2016-2183).  It has been deprecated by NIST in
+all applications from late 2023 onwards.  (This is the
+@code{3des-cipher} check in @code{network-security-protocol-checks}).
 @end table
 
 If @code{network-security-level} is @code{high}, the following checks
 will be made, in addition to the above:
 
 @table @asis
-@item @acronym{3DES} cipher
-The @acronym{3DES} stream cipher provides at most 112 bits of
-effective security, which is considered to be towards the low end.
-(This is the @code{3des} check in
-@code{network-security-protocol-checks}).
-
 @item a validated certificate changes the public key
 Servers change their keys occasionally, and that is normally nothing
 to be concerned about.  However, if you are worried that your network
@@ -2146,7 +2146,7 @@ overrides the environment variable.)
 Create a new client frame on the current text terminal, instead of
 using an existing Emacs frame.  This behaves just like the @samp{-c}
 option, described above, except that it creates a text terminal frame
-(@pxref{Non-Window Terminals}).
+(@pxref{Text Terminals}).
 
 On MS-Windows, @samp{-t} behaves just like @samp{-c} if the Emacs
 server is using the graphical display, but if the Emacs server is
diff --git a/doc/emacs/screen.texi b/doc/emacs/screen.texi
index 5e9e89e6b11..3b910587260 100644
--- a/doc/emacs/screen.texi
+++ b/doc/emacs/screen.texi
@@ -173,7 +173,7 @@ unselected windows, in order to make it stand out.
   The text displayed in the mode line has the following format:
 
 @example
- @var{cs}:@var{ch}-@var{fr}  @var{buf}      @var{pos} @var{line}   
(@var{major} @var{minor})
+ @var{cs}:@var{ch}-@var{d}@var{fr}  @var{buf}      @var{pos} @var{line}   
(@var{major} @var{minor})
 @end example
 
 @noindent
@@ -231,6 +231,12 @@ shows @samp{%*} if the buffer is modified, and @samp{%%} 
otherwise.
 However, if @code{default-directory} (@pxref{File Names}) for the
 current buffer is on a remote machine, @samp{@@} is displayed instead.
 
+  @var{d} appears if the window is dedicated to its current buffer.
+It appears as @samp{D} for strong dedication and @samp{d} for other
+forms of dedication.  If the window is not dedicated, @var{d} does not
+appear.  @xref{Dedicated Windows,, elisp, The Emacs Lisp Reference
+Manual}.
+
   @var{fr} gives the selected frame name (@pxref{Frames}).  It appears
 only on text terminals.  The initial frame's name is @samp{F1}.
 
diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi
index 6d8b3a2727a..a79176fcefb 100644
--- a/doc/emacs/search.texi
+++ b/doc/emacs/search.texi
@@ -1159,6 +1159,8 @@ surrounding @samp{\( @dots{} \)} grouping can limit the 
grouping power of
 
 Full backtracking capability exists to handle multiple uses of @samp{\|}.
 
+@cindex sub-expressions, in regular expressions
+@cindex grouping, in regular expressions
 @item \( @dots{} \)
 is a grouping construct that serves three purposes:
 
diff --git a/doc/emacs/windows.texi b/doc/emacs/windows.texi
index 665fd80e53b..ca5e424d939 100644
--- a/doc/emacs/windows.texi
+++ b/doc/emacs/windows.texi
@@ -411,6 +411,28 @@ selected window and (ii) prefer to either create a new 
frame or use a
 window on some other frame to display the desired buffer.  Several of
 these commands are bound in the @kbd{C-x 5} prefix key.
 
+@cindex dedicated window
+  Sometimes, a window is ``dedicated'' to its current buffer.
+@xref{Dedicated Windows,, elisp, The Emacs Lisp Reference Manual}.
+@code{display-buffer} will avoid reusing dedicated windows most of the
+time.  This is indicated by a @samp{d} in the mode line (@pxref{Mode
+Line}).  A window can also be strongly dedicated, which prevents any
+changes to the buffer displayed in the window.  This is indicated by a
+@samp{D} in the mode line.
+
+Usually, dedicated windows are used to display specialized buffers,
+but dedication can sometimes be useful interactively.  For example,
+when viewing errors with @kbd{M-g M-n} @code{next-error}, newly
+displayed source code may replace a buffer you want to refer to.  If
+you dedicate a window to that buffer, the command (through
+@code{display-buffer}) will prefer to use a different window instead.
+
+@kindex C-x w d
+@findex toggle-window-dedicated
+  Toggle whether the selected window is dedicated to the current
+buffer.  With a prefix argument, make the window strongly dedicated
+instead.
+
 @menu
 * Window Choice::   How @code{display-buffer} works.
 * Temporary Displays::   Displaying non-editable buffers.
diff --git a/doc/lispref/ChangeLog.1 b/doc/lispref/ChangeLog.1
index c96ba40dbe5..95a23e981cc 100644
--- a/doc/lispref/ChangeLog.1
+++ b/doc/lispref/ChangeLog.1
@@ -5792,7 +5792,7 @@
 
        * display.texi (Face Functions): Mention define-obsolete-face-alias.
 
-2009-08-26  Ulrich Mueller  <ulm@gentoo.org>
+2009-08-26  Ulrich Müller  <ulm@gentoo.org>
 
        * nonascii.texi (Character Codes): Fix typos.
 
diff --git a/doc/lispref/buffers.texi b/doc/lispref/buffers.texi
index 86c47ae7310..a2d0f5687ba 100644
--- a/doc/lispref/buffers.texi
+++ b/doc/lispref/buffers.texi
@@ -957,10 +957,10 @@ with a @code{nil} @var{norecord} argument since this may 
lead to
 infinite recursion.
 @end defvar
 
-@defun buffer-match-p condition buffer-or-name &optional arg
+@defun buffer-match-p condition buffer-or-name &rest args
 This function checks if a buffer designated by @code{buffer-or-name}
-satisfies the specified @code{condition}.  Optional third argument
-@var{arg} is passed to the predicate function in @var{condition}.  A
+satisfies the specified @code{condition}.  Optional arguments
+@var{args} are passed to the predicate function in @var{condition}.  A
 valid @var{condition} can be one of the following:
 @itemize @bullet{}
 @item
@@ -969,23 +969,21 @@ satisfies the condition if the regular expression matches 
the buffer
 name.
 @item
 A predicate function, which should return non-@code{nil} if the buffer
-matches.  If the function expects one argument, it is called with
-@var{buffer-or-name} as the argument; if it expects 2 arguments, the
-first argument is @var{buffer-or-name} and the second is @var{arg}
-(or @code{nil} if @var{arg} is omitted).
+matches.  It is called with
+@var{buffer-or-name} as the first argument followed by @var{args}.
 @item
 A cons-cell @code{(@var{oper} . @var{expr})} where @var{oper} is one
 of
 @table @code
 @item (not @var{cond})
 Satisfied if @var{cond} doesn't satisfy @code{buffer-match-p} with
-the same buffer and @code{arg}.
+the same buffer and @code{args}.
 @item (or @var{conds}@dots{})
 Satisfied if @emph{any} condition in @var{conds} satisfies
-@code{buffer-match-p}, with the same buffer and @code{arg}.
+@code{buffer-match-p}, with the same buffer and @code{args}.
 @item (and @var{conds}@dots{})
 Satisfied if @emph{all} the conditions in @var{conds} satisfy
-@code{buffer-match-p}, with the same buffer and @code{arg}.
+@code{buffer-match-p}, with the same buffer and @code{args}.
 @item derived-mode
 Satisfied if the buffer's major mode derives from @var{expr}.
 @item major-mode
@@ -998,14 +996,14 @@ string) or @code{(and)} (empty conjunction).
 @end itemize
 @end defun
 
-@defun match-buffers condition &optional buffer-list arg
+@defun match-buffers condition &optional buffer-list &rest args
 This function returns a list of all buffers that satisfy the
 @code{condition}.  If no buffers match, the function returns
 @code{nil}.  The argument @var{condition} is as defined in
 @code{buffer-match-p} above.  By default, all the buffers are
 considered, but this can be restricted via the optional argument
 @code{buffer-list}, which should be a list of buffers to consider.
-Optional third argument @var{arg} will be passed to @var{condition} in
+Remaining arguments @var{args} will be passed to @var{condition} in
 the same way as @code{buffer-match-p} does.
 @end defun
 
diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi
index 6601135cb85..41c30437dce 100644
--- a/doc/lispref/commands.texi
+++ b/doc/lispref/commands.texi
@@ -3967,26 +3967,19 @@ the timeout elapses).
 In batch mode (@pxref{Batch Mode}), @code{sit-for} cannot be
 interrupted, even by input from the standard input descriptor.  It is
 thus equivalent to @code{sleep-for}, which is described below.
-
-It is also possible to call @code{sit-for} with three arguments,
-as @code{(sit-for @var{seconds} @var{millisec} @var{nodisp})},
-but that is considered obsolete.
 @end defun
 
-@defun sleep-for seconds &optional millisec
+@defun sleep-for seconds
 This function simply pauses for @var{seconds} seconds without updating
 the display.  It pays no attention to available input.  It returns
 @code{nil}.
 
 The argument @var{seconds} need not be an integer.  If it is floating
 point, @code{sleep-for} waits for a fractional number of seconds.
-Some systems support only a whole number of seconds; on these systems,
-@var{seconds} is rounded down.
 
-The optional argument @var{millisec} specifies an additional waiting
-period measured in milliseconds.  This adds to the period specified by
-@var{seconds}.  If the system doesn't support waiting fractions of a
-second, you get an error if you specify nonzero @var{millisec}.
+It is also possible to call @code{sleep-for} with two arguments,
+as @code{(sleep-for @var{seconds} @var{millisec})},
+but that is considered obsolete and will be removed in the future.
 
 Use @code{sleep-for} when you wish to guarantee a delay.
 @end defun
diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi
index 72441c8d442..c357c8cb35d 100644
--- a/doc/lispref/elisp.texi
+++ b/doc/lispref/elisp.texi
@@ -534,10 +534,10 @@ Variables
 
 Scoping Rules for Variable Bindings
 
-* Dynamic Binding::         The default for binding local variables in Emacs.
+* Lexical Binding::         The standard type of local variable binding.
+* Dynamic Binding::         A different type of local variable binding.
 * Dynamic Binding Tips::    Avoiding problems with dynamic binding.
-* Lexical Binding::         A different type of local variable binding.
-* Using Lexical Binding::   How to enable lexical binding.
+* Selecting Lisp Dialect::   How to select the Emacs Lisp dialect to use.
 * Converting to Lexical Binding:: Convert existing code to lexical binding.
 
 Buffer-Local Variables
diff --git a/doc/lispref/eval.texi b/doc/lispref/eval.texi
index a45517287b7..8af0ee49d02 100644
--- a/doc/lispref/eval.texi
+++ b/doc/lispref/eval.texi
@@ -740,13 +740,17 @@ type of the @var{form} object determines how it is 
evaluated.
 @xref{Forms}.
 
 The argument @var{lexical} specifies the scoping rule for local
-variables (@pxref{Variable Scoping}).  If it is omitted or @code{nil},
-that means to evaluate @var{form} using the default dynamic scoping
-rule.  If it is @code{t}, that means to use the lexical scoping rule.
-The value of @var{lexical} can also be a non-empty alist specifying a
+variables (@pxref{Variable Scoping}).  If it is @code{t}, that means
+to evaluate @var{form} using lexical scoping; this is the recommended
+value.  If it is omitted or @code{nil}, that means to use the old
+dynamic-only variable scoping rule.
+
+The value of @var{lexical} can also be a non-empty list specifying a
 particular @dfn{lexical environment} for lexical bindings; however,
 this feature is only useful for specialized purposes, such as in Emacs
-Lisp debuggers.  @xref{Lexical Binding}.
+Lisp debuggers.  Each member of the list is either a cons cell which
+represents a lexical symbol-value pair, or a symbol representing a
+(special) variable that would use dynamic scoping if bound.
 
 Since @code{eval} is a function, the argument expression that appears
 in a call to @code{eval} is evaluated twice: once as preparation before
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi
index afedf776c86..dc66ea8bc9c 100644
--- a/doc/lispref/files.texi
+++ b/doc/lispref/files.texi
@@ -1803,7 +1803,7 @@ If @var{newname} exists, then it must be an empty 
directory if
 @var{oldname} is a directory and a non-directory otherwise.
 @end deffn
 
-@deffn Command copy-file oldname newname &optional ok-if-already-exists time 
preserve-uid-gid preserve-extended-attributes
+@deffn Command copy-file oldname newname &optional ok-if-already-exists time 
preserve-uid-gid preserve-permissions
 This command copies the file @var{oldname} to @var{newname}.  An
 error is signaled if @var{oldname} is not a regular file.  If @var{newname}
 names a directory, it copies @var{oldname} into that directory,
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi
index 5d6e1809286..1a7af04b103 100644
--- a/doc/lispref/frames.texi
+++ b/doc/lispref/frames.texi
@@ -2219,8 +2219,10 @@ resource must also be set to the string 
@code{"extended"}.
 @item inhibit-double-buffering
 If non-@code{nil}, the frame is drawn to the screen without double
 buffering.  Emacs normally attempts to use double buffering, where
-available, to reduce flicker.  Set this property if you experience
-display bugs or pine for that retro, flicker-y feeling.
+available, to reduce flicker; nevertheless, this parameter is provided
+for circumstances where double-buffering induces display corruption,
+and for those eccentrics wistful for the immemorial flicker that once
+beset Emacs.
 
 @vindex skip-taskbar@r{, a frame parameter}
 @item skip-taskbar
@@ -4001,22 +4003,24 @@ defined in the file @file{lisp/term/x-win.el}.  Use 
@kbd{M-x apropos
 @cindex secondary selection
 
   In window systems, such as X, data can be transferred between
-different applications by means of @dfn{selections}.  X defines an
-arbitrary number of @dfn{selection types}, each of which can store its
-own data; however, only three are commonly used: the @dfn{clipboard},
-@dfn{primary selection}, and @dfn{secondary selection}.  Other window
-systems support only the clipboard.  @xref{Cut and Paste,, Cut and
-Paste, emacs, The GNU Emacs Manual}, for Emacs commands that make use
-of these selections.  This section documents the low-level functions
-for reading and setting window-system selections.
+different applications by means of @dfn{selections}.  Each window
+system defines an arbitrary number of @dfn{selection types}, all
+storing their own data; however, only three are commonly used: the
+@dfn{clipboard}, @dfn{primary selection}, and @dfn{secondary
+selection}.  @xref{Cut and Paste,, Cut and Paste, emacs, The GNU Emacs
+Manual}, for Emacs commands that make use of these selections.  This
+section documents the low-level functions for reading and setting
+window-system selections; @xref{Accessing Selections} for
+documentation concerning selection types and data formats under
+particular window systems.
 
 @deffn Command gui-set-selection type data
 This function sets a window-system selection.  It takes two arguments:
 a selection type @var{type}, and the value to assign to it, @var{data}.
 
 @var{type} should be a symbol; it is usually one of @code{PRIMARY},
-@code{SECONDARY} or @code{CLIPBOARD}.  These are symbols with
-upper-case names, in accord with X Window System conventions.  If
+@code{SECONDARY} or @code{CLIPBOARD}.  These are generally symbols
+with upper-case names, in accord with X Window System conventions.  If
 @var{type} is @code{nil}, that stands for @code{PRIMARY}.
 
 If @var{data} is @code{nil}, it means to clear out the selection.
@@ -4044,31 +4048,27 @@ programs.  It takes two optional arguments, @var{type} 
and
 
 The @var{data-type} argument specifies the form of data conversion to
 use, to convert the raw data obtained from another program into Lisp
-data.  Meaningful values include @code{TEXT}, @code{STRING},
-@code{UTF8_STRING}, @code{TARGETS}, @code{LENGTH}, @code{DELETE},
-@code{FILE_NAME}, @code{CHARACTER_POSITION}, @code{NAME},
-@code{LINE_NUMBER}, @code{COLUMN_NUMBER}, @code{OWNER_OS},
-@code{HOST_NAME}, @code{USER}, @code{CLASS}, @code{ATOM}, and
-@code{INTEGER}.  (These are symbols with upper-case names in accord
-with X conventions.)  The default for @var{data-type} is
-@code{STRING}.  Window systems other than X usually support only a
-small subset of these types, in addition to @code{STRING}.
+data.  @xref{X Selections} for an enumeration of data types valid
+under X, and @xref{Other Selections} for those elsewhere.
 @end defun
 
 @defopt selection-coding-system
-This variable specifies the coding system to use when reading and
-writing selections or the clipboard.  @xref{Coding
-Systems}.  The default is @code{compound-text-with-extensions}, which
-converts to the text representation that X11 normally uses.
+This variable provides a coding system (@pxref{Coding Systems}) which
+is used to encode selection data, and takes effect on MS-DOS,
+MS-Windows and X@.
+
+Under MS-DOS and MS-Windows, it is the coding system by which all
+clipboard text will be encoded and decoded, whereas on X it merely
+supplies the EOL format of the selection text sent in response to a
+request for text encoded by a matching coding system; which is to say
+that if its value is @code{utf-8-dos}, it will influence requests for
+@code{UTF8_STRING} data, but not those for @code{STRING}.
+
+Its default value is the system code page under MS-Windows 95, 98 or
+Me, @code{utf-16le-dos} under NT/W2K/XP, @code{iso-latin-1-dos} on
+MS-DOS, and @code{nil} elsewhere.
 @end defopt
 
-@cindex clipboard support (for MS-Windows)
-When Emacs runs on MS-Windows, it does not implement X selections in
-general, but it does support the clipboard.  @code{gui-get-selection}
-and @code{gui-set-selection} on MS-Windows support the text data type
-only; if the clipboard holds other types of data, Emacs treats the
-clipboard as empty.  The supported data type is @code{STRING}.
-
 For backward compatibility, there are obsolete aliases
 @code{x-get-selection} and @code{x-set-selection}, which were the
 names of @code{gui-get-selection} and @code{gui-set-selection} before
@@ -4077,44 +4077,42 @@ Emacs 25.1.
 @node Accessing Selections
 @section Accessing Selections
 
-  @code{gui-get-selection} is able to retrieve multiple different
-kinds of selection data from any number of selections.  However, the
-data types and selections that Emacs understands is not precisely
-specified and differs depending on the window system on which Emacs is
-running.
-
-  At the same time, @code{gui-set-selection} hides a great deal of
-complexity behind its back, at least on some systems: its @var{data}
-argument need not be a string, but is actually given verbatim to
-system specific code.
-
-  Emacs's implementation of selections is most complete on the X
-Window System.  This is both an artifact of history (X was the first
-window system supported by Emacs) and one of technical reasons:
-instead of using selections only to transfer text and multimedia
-content between clients, X uses selections as a general inter-client
-communication system, leading to a great proliferation of selection
-data types.
-
-  Even more confusingly, X also supports another inter-client
-communication mechanism: the Inter-Client Exchange.  However, ICE is
+  The data types and selections that @code{gui-get-selection} and
+@code{gui-set-selection} understand are not precisely specified and
+differ subject to the window system on which Emacs is running.
+
+  At the same time, @code{gui-set-selection} abstracts over plenty of
+complexity: its @var{data} argument is given verbatim to
+system-specific code to be rendered suitable for transfer to the
+window system or requesting clients.
+
+  The most comprehensive implementation of selections exists under the
+X Window System.  This is both an artifact of history (X was the first
+window system supported by Emacs) and one occasioned by technical
+considerations: X selections are not merely an expedient for the
+transfer of text and multimedia content between clients, but a general
+inter-client communication system, a design that has yielded a
+proliferation of selection and data types.
+
+  Compounding this confusion, there is another inter-client
+communication mechanism under X: the Inter-Client Exchange.  ICE is
 only used by Emacs to communicate with session managers, and is a
 separate topic.
 
 @menu
-* X Selections::        Selection data types (and more) on X.
+* X Selections::        Selection data types (and more) on X@.
 * Other Selections::    How they work on other window systems.
 @end menu
 
 @node X Selections
 @subsection X Selections
 
-  X refrains from defining fixed data types for selection data, or a
-fixed number of selections.  Selections are instead identified by X
-``atoms'', which are unique 29-bit identifiers issued by the X server
-for a corresponding name.  In Emacs, you can simply write a symbol
-with the name of the atom, and Emacs will transparently request these
-identifiers where necessary.
+  X refrains from defining fixed data types for selection data or a
+fixed number of selections.  Selections are identified by X ``atoms'',
+which are unique 29-bit identifiers issued by the X server for string
+names.  This complexity is hidden by Emacs: when Lisp provides a
+symbol whose name is that of the atom, Emacs will request these
+identifiers without further intervention.
 
   When a program ``sets'' a selection under X, it actually makes
 itself the ``owner'' of the selection---the X server will then deliver
@@ -4123,27 +4121,29 @@ requesting client with the selection data.
 
   Similarly, a program does not ``get'' selection data from the X
 server.  Instead, its selection requests are sent to the client with
-the window which last took ownership over the selection, which then
-replies with the requested data.
+the window which last asserted ownership over the selection, which is
+expected to respond with the requested data.
 
-  Each selection request contains three parameters:
+  Each selection request incorporates three parameters:
 
 @itemize @bullet
 @item
-The window which requested the selection; this is used to identify the
+The window which requested the selection, which identifies the
 @c Not a typo: X spells ``requestor'' with an o.
 requesting program, otherwise known as the @dfn{requestor}.
 
 @item
-An atom identifying the ``target'' to which the owner should convert
+An atom identifying the @dfn{target} to which the owner should convert
 the selection.  It is easiest to think of the conversion target as the
 kind of data that the requestor wants: in selection requests made by
-Emacs, the target is determined by the @dfn{type} argument to
+Emacs, the target is determined by the @var{type} argument to
 @code{gui-get-selection}.
 
 @item
-A 32-bit timestamp containing the X server time at which the requestor
-last obtained input.
+A 32-bit timestamp representing the X server time at which the
+requestor last received input; this parameter is not relevant to Lisp
+code, for it's only meant to abet synchronization between the X
+server, owner and requestor.
 @end itemize
 
   The selection owner responds by tranferring to the requestor a
@@ -4155,30 +4155,29 @@ owner to a Lisp representation, which 
@code{gui-get-selection}
 returns.
 
   By default, Emacs converts selection data consisting of any series
-of bytes to a unibyte string containing those bytes, selection data
-consisting of a single 16-bit or 32-bit word as an unsigned number,
-and selection data consisting of multiple such words as a vector of
-unsigned numbers.  However, Emacs applies special treatment for
-several selection data types:
+of bytes to a unibyte string holding those bytes, that consisting of a
+single 16-bit or 32-bit word as an unsigned number, and that
+consisting of multiple such words as a vector of unsigned numbers.
+However, Emacs applies special treatment for data from the following
+conversion targets:
 
 @table @code
 @item INTEGER
-16-bit or 32-bit words of this type are treated as signed integers,
-instead of unsigned ones.  If there are multiple words in the
-selection data, a vector is returned; otherwise, the integer is
-returned by itself.
+16-bit or 32-bit words of this type are treated as signed rather than
+unsigned integers.  If there are multiple words in the selection data,
+a vector is returned; otherwise, the integer is returned by itself.
 
 @item ATOM
 32-bit words of this type are treated as X atoms, and returned (either
-alone or as vectors) as Lisp symbols containing the names they
-identify.  Invalid atoms are returned as @code{nil}.
+alone or as vectors) as Lisp symbols by the names they identify.
+Invalid atoms are replaced by @code{nil}.
 
 @item COMPOUND_TEXT
 @item UTF8_STRING
 @item STRING
-Unibyte strings returned for these data types will have a single
-@code{foreign-selection} text property set to a symbol with the type
-of the selection data.
+A single @code{foreign-selection} text property set to the type of the
+selection data will be placed in unibyte strings derived from a
+request for these data types.
 @end table
 
   Each selection owner must return at least two selection targets:
@@ -4189,21 +4188,21 @@ number of other targets, some of which may be 
standardized by the X
 Consortium's
 @url{http://x.org/releases/X11R7.6/doc/xorg-docs/specs/ICCCM/icccm.html,
 Inter-Client Communication Conventions Manual}, while others, such as
-@code{UTF8_STRING}, were supposed to be standardized by the XFree86
-Project, which unfortunately did not happen.
+@code{UTF8_STRING}, were meant to be standardized by the XFree86
+Project, but their standardization was never completed.
 
   Requests for a given selection target may, by convention, return
 data in a specific type, or it may return data in one of several
 types, whichever is most convenient for the selection owner; the
 latter type of selection target is dubbed a @dfn{polymorphic target}.
-A selection target may also return no data at all: by convention, the
-selection owner performs some action a side effect upon responding to
-a selection request with that target, and as such these targets are
-referred to as @dfn{side-effect targets}.
+In response to a request, a selection target may also return no data
+at all, whereafter the selection owner executes some action as a side
+effect.  Targets that are thus replied to are termed @dfn{side-effect
+targets}.
 
-  Here are some selection targets which behave in a reasonably
-standard manner when used with the @code{CLIPBOARD}, @code{PRIMARY},
-or @code{SECONDARY} selections.
+  Here are some selection targets whose behavior is generally
+consistent with a standard when requested from the @code{CLIPBOARD},
+@code{PRIMARY}, or @code{SECONDARY} selections.
 
 @table @code
 @item ADOBE_PORTABLE_DOCUMENT_FORMAT
@@ -4269,7 +4268,7 @@ positions of the selection data in the text field 
containing it.
 
 @item MODULE
 This target returns the name of any function containing the selection
-data.  It is mainly used by text editors.
+data.  It is principally requested by text editors.
 
 @item STRING
 This target returns the selection data as a string of type
@@ -4301,17 +4300,18 @@ selection owner.
   When a request for the targets @code{STRING}, @code{COMPOUND_TEXT},
 or @code{UTF8_STRING} is made using the function
 @code{gui-get-selection}, and neither @code{selection-coding-system}
-nor @code{next-selection-coding-system} are set, the returned strings
-are additionally decoded using the appropriate coding system for those
-data types: @code{iso-8859-1}, @code{compound-text-with-extensions}
-and @code{utf-8} respectively.
+nor @code{next-selection-coding-system} is set, the resultant strings
+are decoded by the proper coding systems for those targets:
+@code{iso-8859-1}, @code{compound-text-with-extensions} and
+@code{utf-8} respectively.
 
   In addition to the targets specified above (and the many targets
 used by various programs for their own purposes), several popular
-programs and toolkits have decided to define selection data types of
-their own, without consulting the appropriate X standards bodies.
-These targets are usually named after MIME types, such as
-@code{text/html} or @code{image/jpeg}, and have been known to contain:
+programs and toolkits have defined selection data types of their own,
+without consulting the appropriate X standards bodies.  These targets
+are generally named after such MIME types as @code{text/html} or
+@code{image/jpeg}; they have been witnessed returning the following
+forms of data:
 
 @itemize @bullet
 @item
@@ -4322,54 +4322,56 @@ names of an image or text file.
 Image or text data in the appropriate format.
 
 @item
-@code{file://} URIs (or possibly newline or NUL terminated lists of
-URIs) leading to files in the appropriate format.
+@code{file://} URIs (or conceivably newline or NUL terminated lists of
+URIs) identifying files in the appropriate format.
 @end itemize
 
   These selection targets were first used by Netscape, but are now
-found in all kinds of programs, especially those based on recent
+proffered by all kinds of programs, especially those based on recent
 versions of the GTK+ or Qt toolkits.
 
-  Emacs is also capable of acting as a selection owner.  When
-@code{gui-set-selection} is called, the selection data specified is
-not transferred to the X server; instead, Emacs records it internally
-and obtains ownership of the selection.
+  Emacs is also capable of serving as a selection owner.  When
+@code{gui-set-selection} is called, the selection data provided is
+recorded internally and Emacs obtains ownership of the selection being
+set.
 
 @defvar selection-converter-alist
-  Alist of selection targets to ``selection converter'' functions.
-When a selection request is received, Emacs looks up the selection
-converter associated with the requested selection target.
+Alist of selection targets to ``selection converter'' functions.  When
+a selection request is received, Emacs looks up the selection
+converter pertaining to the requested selection target.
 
-  The selection converter is called with three arguments: the symbol
+Selection converters are called with three arguments: the symbol
 corresponding to the atom identifying the selection being requested,
 the selection target that is being requested, and the value set with
-@code{gui-set-selection}.  The value which it returns is either a cons
-of a symbol specifying the data type and a number, symbol, or a vector
-of numbers or symbols, or its cdr by itself.
+@code{gui-set-selection}.  The values which they must return are
+either conses of symbols designating the data type and numbers,
+symbols, vectors of numbers or symbols, or the cdrs of such conses by
+themselves.
 
-  If the value is the special symbol @code{NULL}, the data type is set
-to @code{NULL}, and no data is returned to the requestor.
+If a selection converter's value is the special symbol @code{NULL},
+the data type returned to its requestor is set to @code{NULL}, and no
+data is sent in response.
 
-  If the value is a string, it must be a unibyte string; should no
-data type be explicitly specified, the data is transferred to the
+If such a value is a string, it must be a unibyte string; should no
+data type be explicitly specified, the data is transferred to its
 requestor with the type @code{STRING}.
 
-  If the value is a symbol, its ``atom'' is retrieved, and it is
-transferred to the requestor as a 32-bit value---if no data type was
-specified, its type is @code{ATOM}.
+If it is a symbol, its ``atom'' is retrieved, and it is transferred to
+its requestor as a 32-bit value---if no data type is specified, its
+type is @code{ATOM}.
 
-  If the value is a number between @code{-32769} and @code{32768}, it
-is transferred to the requestor as a 16 bit value---if no data type
-was specified, its type is @code{INTEGER}.
+If it is a number between @code{-32769} and @code{32768}, it is
+transferred to its requestor as a 16 bit value---if no data type is
+specified, its type is @code{INTEGER}.
 
-  If the value is any other number, it is returned as a 32 bit value.
-Even if the number returned is unsigned, the requestor will treat
-words of type @code{INTEGER} as signed.  To return an unsigned value,
-specify the type @code{CARDINAL} instead.
+If it is any other number, it is accounted a 32 bit value.  Even if
+the number returned is unsigned, its requestor will treat words of
+type @code{INTEGER} as signed.  To return an unsigned value, specify
+the type @code{CARDINAL} in its place.
 
-  If the value is a vector of symbols or numbers, it is returned as a
-list of multiple atoms or numbers.  The data type returned by default
-is determined by that of its first element.
+If it is a vector of symbols or numbers, the response to its requestor
+will be a list of multiple atoms or numbers.  The data type returned
+when not expressly set is that of the list's first element.
 @end defvar
 
   By default, Emacs is configured with selection converters for the
@@ -4479,7 +4481,7 @@ These selection converters are used for internal purposes.
 @end table
 
   With the exception of @code{INTEGER}, all selection converters
-expect the value given to @code{gui-set-selection} to be one of the
+expect the data provided to @code{gui-set-selection} to be one of the
 following:
 
 @itemize @bullet
@@ -4495,28 +4497,69 @@ bounds of the selection data in the buffer @var{buf}.
 @node Other Selections
 @subsection Other Selections
 
-  Window systems such as MS-Windows, Nextstep, Haiku and Android do
-not provide selections corresponding to the X semantics.  Each window
-system provides its own ad-hoc emulation of selections, none of which
-make use of the ``selection converter'' mechanism described above.  In
-addition, only the @code{PRIMARY}, @code{CLIPBOARD}, and
-@code{SECONDARY} selections are typically supported, alongside the
-@code{XdndSelection} used for drag-and-drop operations.
-
-  GTK itself exposes emulations of X selections to applications, but
-those emulations are of varying completeness.  While Emacs built with
-PGTK will use the same selection interface as Emacs built with X, many
+  Selections under such window systems as MS-Windows, Nextstep, Haiku
+and Android are not aligned with those under X@.  Each of these window
+system improvises its own selection mechanism without employing the
+``selection converter'' mechanism illustrated in the preceeding node.
+Only the @code{PRIMARY}, @code{CLIPBOARD}, and @code{SECONDARY}
+selections are generally supported, with the @code{XdndSelection}
+selection that records drag-and-drop data also available under
+Nextstep and Haiku.
+
+@cindex PGTK selections
+  GTK seeks to emulate the X selection system, but its emulations are
+not altogether dependable, with the overall quality of each subject to
+the GDK backend being used.  Therefore, Emacs built with PGTK will
+supply the same selection interface as Emacs built with X, but many
 selection targets will not be useful.
 
-  On MS-Windows, @code{gui-get-selection} accepts a single target,
-@code{STRING}.  The value returned is the selection data decoded
-using @code{selection-coding-system}.
-
-  @code{gui-set-selection} also only accepts strings, encodes them
-in the selection coding system, and saves them to the clipboard.
-
-  On Nextstep, Emacs only supports saving strings to selections.
-However, requests for the following targets are accepted:
+@cindex MS-Windows selection emulation
+@cindex MS-Windows primary and secondary selection
+  Although a clipboard exists, there is no concept of primary or
+secondary selections within the MS-Windows operating system.  On this
+system, Emacs simulates the presence of a primary and secondary
+selection, while saving to and retrieving from the clipboard when so
+requested.
+
+  The simulation of the primary and secondary selections is conducted
+by saving values supplied to @code{gui-set-selection} within the
+@code{x-selections} property of the symbol designating the pertinent
+selection, namely the @var{type} argument to @code{gui-get-selection}.
+Each subsequent call to @code{gui-get-selection} in turn returns its
+value, which is not subject to further examination (such as type
+checks and the like).  Under such circumstances, @var{data-type}
+argument is generally disregarded.  (But see below for the
+qualification regarding @code{TARGETS}.)
+
+@cindex MS-Windows clipboard
+  Where the clipboard selection is concerned (whenever @var{type} is
+@code{CLIPBOARD}), @code{gui-set-selection} verifies that the value
+provided is a string and saves it within the system clipboard once it
+is encoded by the coding system configured in
+@code{selection-coding-system}.  Callers of @code{gui-get-selection}
+are required to set @var{data-type} to either @code{STRING} or
+@code{TARGETS}.
+
+  When @var{data-type} is set to @code{TARGETS} in a call to
+@code{gui-get-selection}, a vector of symbols is returned when
+selection data exists, much as it is under X@.  It is impossible to
+request clipboard data in any format besides @code{STRING}, for the
+prerequisite data conversion routines are absent.  Just as strings
+saved into the clipboard are encoded by the
+@code{selection-coding-system}, so those read from the clipboard are
+decoded by that same coding system; this variable and its cousin
+@code{next-selection-coding-system} merit particular scrutiny when
+difficulties are encountered with saving selection text into the
+clipboard.
+
+@cindex Nextstep selections
+  All three selections standard in X exist in Nextstep as well, but
+Emacs is only capable of saving strings to such selections.
+Restrictions imposed upon calls to @code{gui-set-selection} there are
+much the same as those on MS-Windows, though text is uniformly encoded
+as @code{utf-8-unix} without regard to the value of
+@code{selection-coding-system}.  @code{gui-get-selection} is more
+charitable, and accepts requests for the following selection targets:
 
 @c FIXME: how is the text coding system determined, and do image/* or
 @c application/* return image data or file names?
@@ -4532,29 +4575,34 @@ However, requests for the following targets are 
accepted:
 @item image/tiff
 @end itemize
 
-  On Haiku, Emacs supports the same selection values as on X.  In
-addition, Emacs fully implements the primary and secondary selections.
-However, instead of taking ownership over the selection data, Emacs
-transfers the selection data to the window server when
-@code{gui-set-selection} is called.  The Haiku window server expects
-selection data to be provided in the form of a ``message'', containing
-associations between data types and selection data.
+  The @code{XdndSelection} selection is also present under Nextstep,
+in the form of a repository that records values supplied to
+@code{gui-set-selection}.  Its sole purpose is to save such values for
+the fundamental drag-and-drop function @code{x-begin-drag}
+(@pxref{Drag and Drop}); no guarantees exist concerning its value when
+read by anything else.
 
-@defvar haiku-normal-selection-encoders
-List of functions which act as selection encoders.  When
-@code{gui-set-selection} is called, each function in this list is
-successively called with its @var{selection} and @var{value}
-arguments.  If the function returns non-@code{nil}, it should return a
-list of the form @w{@code{(@var{key} @var{type} @var{value})}}, where
-@var{key} is the name of the data type being transferred, @var{type}
-is either a number identifying a data type (in which case @var{value}
-should be a unibyte string that is directly transferred to the window
-server), or a symbol identifying both a data type and how @var{value}
-should be interpreted.
-@end defvar
+@cindex Haiku selections
+  Selections on Haiku systems comprise all three selections customary
+under X and the @code{XdndSelection} that records drag-and-drop data.
 
-  Here are the meaningful values of @var{type}, and what they will
-cause Emacs to interpret @var{value} as:
+  When @code{gui-set-selection} is called for the former three
+selections, the data supplied is converted into a window server
+``message'' by a list of @dfn{selection encoder} functions, which is
+sent to the window server.
+
+@defvar haiku-normal-selection-encoders
+List of selection encoder functions.  When @code{gui-set-selection} is
+called, each function in this list is successively called with its
+@var{selection} and @var{value} arguments.  If such a function returns
+non-@code{nil}, its return value must be a list of the form
+@w{@code{(@var{key} @var{type} @var{value})}}.  In this list,
+@var{key} must be the name of the data being transferred, generally
+that of a MIME type, for example @samp{"text/plain"}, and @var{type}
+is a symbol or a number designating the type of the data; thus also
+governing the interpretation of @var{value}; following is a list of
+valid data types and how each of them will cause @var{value} to be
+interpreted.
 
 @table @code
 @item string
@@ -4562,8 +4610,8 @@ A unibyte string.  The string is NULL-terminated after 
being placed in
 the message.
 
 @item ref
-A file name.  The file is looked up and file system information
-identifying the file is placed in the message.
+A file name.  The file is located and the inode identifying the file
+is placed in the message.
 
 @item short
 A 16-bit integer value.
@@ -4596,141 +4644,199 @@ format.
 @item (haiku-numeric-enum MIME)
 A unibyte string containing data in a certain MIME type.
 @end table
+@end defvar
 
-  Under Haiku, @code{gui-get-selection} accepts either the targets
-@code{TARGETS} and @code{TIMESTAMP}, where the former returns a vector
-containing supported data types (much like on X), and the latter
-returns the number of times the selection has been set, the targets
-@code{STRING} and @code{UTF8_STRING}, which return text in ISO-Latin-1
-and UTF-8 format, or a MIME type, in which the data is returned
-undecoded as a unibyte string.
+  A call to @code{gui-get-selection} generally returns the the data
+named @var{data-type} within the selection message, albeit with
+@var{data-type} replaced by an alternative name should it be one of
+the following X selection targets:
 
-  Under Android, @code{gui-get-selection} is restricted to returning
-UTF-8 string data of the type @code{STRING}, or image and application
-data associated with a MIME type.  @code{gui-set-selection} will only
-set string data, as on MS-Windows.
+@table @code
+@item STRING
+This represents Latin-1 text under X: ``text/plain;charset=iso-8859-1''
+
+@item UTF8_STRING
+This represents UTF-8 text: ``text/plain''
+@end table
+
+  If @var{data-type} is a text type such as @code{STRING} or a MIME
+type matching the pattern @samp{`text/*}, the string data is decoded
+with the coding system apposite for it before being returned.
+
+  Furthermore, the two data types @var{TIMESTAMP} and @code{TARGETS}
+are afforded special treatment; the value returned for the first is
+the number of times the selection has been modified since system
+startup (@emph{not} a timestamp), and that for the other is a vector
+of available selection data types, as elsewhere.
+
+@cindex Android selections
+  Much like MS-Windows, Android provides a clipboard but no primary or
+secondary selection; @code{gui-set-selection} simulates the primary
+selection by saving the value supplied into a variable subsequent
+calls to @code{gui-get-selection} return.
+
+  From the clipboard, @code{gui-get-selection} is capable of returning
+UTF-8 string data of the type @code{STRING}, the @code{TAREGTS} data
+type, or image and application data of any MIME type.
+@code{gui-set-selection} sets only string data, much as under
+MS-Windows, although this data is not affected by the value of
+@code{selection-coding-system}.
 
 @node Yanking Media
 @section Yanking Media
 
-  If you choose, for instance, ``Copy Image'' in a web browser, that
-image is put onto the clipboard, and Emacs can access it via
-@code{gui-get-selection}.  But in general, inserting image data into
-an arbitrary buffer isn't very useful---you can't really do much with
-it by default.
-
-  So Emacs has a system to let modes register handlers for these
-``complicated'' selections.
+  Data saved within window system selections is not restricted to
+plain text.  It is possible for selection data to encompass images or
+other binary data of the like, as well as rich text content instanced
+by HTML, and also PostScript.  Since the selection data types incident
+to this data are at variance with those for plain text, the insertion
+of such data is facilitated by a set of functions dubbed
+@dfn{yank-media handlers}, which are registered by each major mode
+undertaking its insertion and called where warranted upon the
+execution of the @code{yank-media} command.
 
 @defun yank-media-handler types handler
-@var{types} can be a @acronym{MIME} media type symbol, a regexp to
-match these, or a list of these symbols and regexps.  For instance:
+Register a yank-media handler which applies to the current buffer.
+
+@var{types} can be a symbol designating a selection data type
+(@pxref{Accessing Selections}), a regexp against which such types are
+matched, or a list of these symbols and regexps.  For instance:
 
 @example
 (yank-media-handler 'text/html #'my-html-handler)
 (yank-media-handler "image/.*" #'my-image-handler)
 @end example
 
-A mode can register as many handlers as required.
-
-  The @var{handler} function is called with two parameters: The
-@acronym{MIME} media type symbol and the data (as a string).  The
-handler should then insert the object into the buffer, or save it, or
-do whatever is appropriate for the mode.
+When a selection offers a data type matching @var{types}, the function
+@var{handler} is called to insert its data, with the symbol
+designating the matching selection data type, and the data returned by
+@code{gui-get-selection}.
 @end defun
 
-  The @code{yank-media} command will consult the registered handlers in
-the current buffer, compare that with the available media types on the
-clipboard, and then pass on the matching selection to the handler (if
-any).  If there's more than one matching selection, the user is
-queried first.
-
-  The @code{yank-media-types} command can be used to explore the
-clipboard/primary selection.  It lists all the media types that are
-currently available, and can be handy when creating handlers---to see
-what data is actually available.  Some applications put a surprising
-amount of different data types on the clipboard.
+The @code{yank-media-types} command presents a list of selection data
+types that are currently available, which is useful when implementing
+yank-media handlers; for programs generally offer an eclectic and
+seldom consistent medley of data types.
 
 @node Drag and Drop
 @section Drag and Drop
 @cindex drag and drop
 
-  When the user drops something from another application over Emacs,
-Emacs will try to insert any text and open any URL that was dropped.
-If text was dropped, then it will always be inserted at the location
-of the mouse pointer where the drop happened, or saved in the kill
-ring if insertion failed, which could happen if the buffer was
-read-only.  If a URL was dropped instead, then Emacs will first try to
-call an appropriate handler function by matching the URL against
-regexps defined in the variable @code{dnd-protocol-alist}, and then
-against those defined in the variables @code{browse-url-handlers} and
-@code{browse-url-default-handlers}.  Should no suitable handler be
-located, Emacs will fall back to inserting the URL as plain text.
+  Data transferred by drag and drop is generally either plain text or
+a URL designating a file or another resource.  When text is dropped,
+it is inserted at the location of the drop, with recourse to saving it
+into the kill ring if that is not possible.
+
+  URLs dropped are supplied to pertinent @dfn{DND handler functions}
+in the variable @code{dnd-protocol-alist}, or alternatively ``URL
+handlers'' as set forth by the variables @code{browse-url-handlers}
+and @code{browse-url-default-handlers}; absent matching handlers of
+either type, they are treated as plain text and inserted in the
+buffer.
 
 @defvar dnd-protocol-alist
-  This variable is a list of cons cells of the form
-@w{@code{(@var{pattern} . @var{action})}}.  @var{pattern} is a regexp
-that URLs are matched against after being dropped.  @var{action} is a
-function that is called with two arguments, should a URL being dropped
-match @var{pattern}: the URL being dropped, and the action being
-performed for the drop, which is one of the symbols @code{copy},
-@code{move}, @code{link}, @code{private} or @code{ask}.
-
-If @var{action} is @var{private}, then it means the program that
-initiated the drop wants Emacs to perform an unspecified action with
-the URL; a reasonable action to perform in that case is to open the URL
-or copy its contents into the current buffer.  Otherwise, @var{action}
-has the same meaning as the @var{action} argument to
+This variable is an alist between regexps against which URLs are
+matched and DND handler functions called on the dropping of matching
+URLs.
+
+Each handler function is called with the URL that matched it and one
+of the symbols @code{copy}, @code{move}, @code{link}, @code{private}
+or @code{ask} identifying the action to be taken.
+
+If @var{action} is @code{private}, the program that initiated the drop
+does not insist on any particular behavior on the part of its
+recipient; a reasonable action to take in that case is to open the URL
+or copy its contents into the current buffer.  The other values of
+@var{action} imply much the same as in the @var{action} argument to
 @code{dnd-begin-file-drag}.
 @end defvar
 
 @cindex drag and drop, X
 @cindex drag and drop, other formats
-  Emacs implements receiving text and URLs individually for each
-window system, and does not by default support receiving other kinds
-of data as drops.  To support receiving other kinds of data, use the
-X-specific interface described below.
-
-@vindex x-dnd-test-function
-@vindex x-dnd-known-types
-  When a user drags something from another application over Emacs
-under the X Window System, that other application expects Emacs to
-tell it if Emacs understands the data being dragged.  The function in
-the variable @code{x-dnd-test-function} is called by Emacs to
-determine what to reply to any such inquiry.  The default value is
-@code{x-dnd-default-test-function}, which accepts drops if the type of
-the data to be dropped is present in @code{x-dnd-known-types}.
-Changing the variables @code{x-dnd-test-function} and
-@code{x-dnd-known-types} can make Emacs accept or reject drops based
-on some other criteria.
-
-@vindex x-dnd-types-alist
-  If you want to change the way Emacs receives drops of different data
-types, or you want to enable it to understand a new type, change the variable
-@code{x-dnd-types-alist}.  Doing so correctly requires detailed
-knowledge of what data types other applications use for drag and drop.
-
-  These data types are typically implemented as special data types
-that can be obtained from an X selection provided by the other
-application.  In most cases, they are either the same data types that
-are typically accepted by @code{gui-set-selection}, or MIME types,
-depending on the specific drag-and-drop protocol being used.  For
-example, the data type used for plain text may be either
-@code{"STRING"} or @code{"text/plain"}.
+  Emacs does not take measures to accept data besides text and URLs by
+default, for the window system interfaces which enable this are too
+far removed from each other to abstract over consistently.  Nor are
+DND handlers accorded the capacity to influence the action they are
+meant to take, as particular drag-and-drop protocols deny recipients
+such control.  The X11 drag-and-drop implementation rests on several
+underlying protocols that make use of selection transfer and share
+much in common, to which low level access is provided through the
+following functions and variables:
+
+@defvar x-dnd-test-function
+This function is called to ascertain whether Emacs should accept a
+drop.  It is called with three arguments:
+
+@itemize @bullet
+@item
+The window under the item being dragged, which is to say the window
+whose buffer is to receive the drop.  If the item is situated over a
+non-window component of a frame (such as scroll bars, tool bars and
+things to that effect), the frame itself is provided in its place.
+
+@item
+One of the symbols @code{move}, @code{copy}, @code{link} or
+@code{ask}, representing an action to take on the item data suggested
+by the drop source.  These symbols carry the same implications as in
+@code{x-begin-drag}.
+
+@item
+A vector of selection data types (@pxref{X Selections}) the item
+provides.
+@end itemize
+
+This function must return @code{nil} to reject the drop or a cons of
+the action that will be taken (such as through transfer to a DND
+handler function) and the selection data type to be requested.  The
+action returned in that cons may also be the symbol @code{private},
+which intimates that the action taken is as yet indeterminate.
+@end defvar
+
+@defvar x-dnd-known-types
+Modifying @code{x-dnd-test-function} is generally unwarranted, for its
+default set of criteria for accepting a drop can be adjusted by
+changing this list of selection data types.  Each element is a string,
+which if found as the symbol name of an element within the list of
+data types by the default ``test function'', will induce that function
+to accept the drop.
+
+Introducing a new entry into this list is not useful unless a
+counterpart handler function is appended to @code{x-dnd-types-alist}.
+@end defvar
+
+@defvar x-dnd-types-alist
+This variable is an alist between strings designating selection data
+types and functions which are called when things of such types are
+dropped.
+
+Each such function is supplied three arguments; the first is the
+window or frame below the location of the drop, as in
+@code{x-dnd-test-function}; the second is the action to be taken,
+which may be any of the actions returned by test functions, and third
+is the selection data itself (@pxref{Accessing Selections}).
+@end defvar
+
+  Selection data types as provided by X11 drag-and-drop protocols are
+sometimes distinct from those provided by the ICCCM and conforming
+clipboard or primary selection owners.  Frequently, the name of a MIME
+type, such as @code{"text/plain;charset=utf-8"} (with discrepant
+capitalization of the ``utf-8''), is substitued for a standard X
+selection name such as @code{UTF8_STRING}.
 
 @cindex XDS
 @cindex direct save protocol
 @vindex x-dnd-direct-save-function
-  When Emacs runs on X window system, it supports the X Direct Save
-(@acronym{XDS}) protocol, which allows users to save a file by
-dragging and dropping it onto an Emacs window, such as a Dired window.
-To comply with the unique requirements of @acronym{XDS}, these
-drag-and-drop requests are processed specially: instead of being
-handled according to @code{x-dnd-types-alist}, they are handled by the
-@dfn{direct-save function} that is the value of the variable
-@code{x-dnd-direct-save-function}.  The value should be a function of
-two arguments, @var{need-name} and @var{filename}.  The @acronym{XDS}
-protocol uses a two-step procedure for dragging files:
+  The X Direct Save (@acronym{XDS}) protocol enables programs to
+devolve responsibility for naming a dropped file upon the recipient.
+When such a drop transpires, DND handlers and the foregoing X-specific
+interface are largely circumvented, tasking a different function with
+responding to the drop.
+
+@defvar x-dnd-direct-save-function
+This variable should be set to a function that registers and names
+files dropped using the @acronym{XDS} protocol in a two-step
+procedure.  It is provided two arguments, @var{need-name} and
+@var{filename}.
 
 @enumerate 1
 @item
@@ -4758,8 +4864,9 @@ Dired should update the directory on display by showing 
the new file
 there.
 @end enumerate
 
-The default value of @code{x-dnd-direct-save-function} is
+Its default @code{x-dnd-direct-save-function} is
 @code{x-dnd-save-direct}.
+@end defvar
 
 @defun x-dnd-save-direct need-name filename
 When called with the @var{need-name} argument non-@code{nil}, this
@@ -4785,48 +4892,47 @@ default directory.)
 @end defun
 
 @cindex initiating drag-and-drop
-  On capable window systems, Emacs also supports dragging contents
-from its frames to windows of other applications.
+  It is also possible to drag content from Emacs to other programs
+when this is supported by the current window-system.  The functions
+which provide for this are as follows:
 
 @cindex drop target, in drag-and-drop operations
 @defun dnd-begin-text-drag text &optional frame action allow-same-frame
-This function begins dragging text from @var{frame} to another program
-(known as the @dfn{drop target}), and returns the result of
-drag-and-drop operation when the text is dropped or the drag-and-drop
-operation is canceled.  @var{text} is the text that will be inserted
-by the drop target.
+This function starts a drag-and-drop operation from @var{frame} to
+another program (dubbed the @dfn{drop target}), and returns when
+@var{text} is dropped or the operation is canceled.
 
 @var{action} must be one of the symbols @code{copy} or @code{move},
 where @code{copy} means that @var{text} should be inserted by the drop
-target, and @code{move} means the same as @code{copy}, but in addition
-the caller may have to delete @var{text} from its source as explained
+target, and @code{move} means the same as @code{copy}, but the caller
+must also delete @var{text} from its source as explained in the list
 below.
 
 @var{frame} is the frame where the mouse is currently held down, or
-@code{nil}, which means to use the selected frame.  This function may
-return immediately if no mouse buttons are held down, so it should be
-only called immediately after a @code{down-mouse-1} or similar event
-(@pxref{Mouse Events}), with @var{frame} set to the frame where that
-event was generated (@pxref{Click Events}).
+@code{nil}, which means to use the selected frame.  Since this
+function might return promptly if no mouse buttons are held down, it
+should be only called in response to a @code{down-mouse-1} or
+analogous event (@pxref{Mouse Events}), with @var{frame} set to the
+frame where that event was generated (@pxref{Click Events}).
 
-@var{allow-same-frame} specifies whether or not drops on top of
-@var{frame} itself are to be ignored.
+If @var{allow-same-frame} is @code{nil}, drops on top of @var{frame}
+will be ignored.
 
-The return value specifies the action that the drop target actually
-performed, and optionally what the caller should do.  It can be one of
-the following symbols:
+The return value reflects the action that the drop target actually
+performed, and thus also what action, if any, the caller should in
+turn take.  It is one of the following symbols:
 
 @table @code
 @item copy
 The drop target inserted the dropped text.
 
 @item move
-The drop target inserted the dropped text, but in addition the caller
-should delete @var{text} from wherever it originated, such as its
-buffer.
+The drop target inserted the dropped text, and the caller should
+delete @var{text} from the buffer where it was extracted from, if
+applicable.
 
 @item private
-The drop target performed some other unspecified action.
+The drop target took some other unspecified action.
 
 @item nil
 The drag-and-drop operation was canceled.
@@ -4835,11 +4941,12 @@ The drag-and-drop operation was canceled.
 @end defun
 
 @defun dnd-begin-file-drag file &optional frame action allow-same-frame
-This function begins dragging @var{file} from @var{frame} to another
-program, and returns the result of the drag-and-drop operation when
-the file is dropped or the drag-and-drop operation is canceled.
+This function starts a drag-and-drop operation from @var{frame} to
+another program (dubbed the @dfn{drop target}), and returns when
+@var{file} is dropped or the operation is canceled.
 
-If @var{file} is a remote file, then a temporary copy will be made.
+If @var{file} is a remote file, then a temporary local copy will be
+made.
 
 @var{action} must be one of the symbols @code{copy}, @code{move} or
 @code{link}, where @code{copy} means that @var{file} should be opened
@@ -4848,11 +4955,11 @@ move the file to another location, and @code{link} 
means the drop
 target should create a symbolic link to @var{file}.  It is an error to
 specify @code{link} as the action if @var{file} is a remote file.
 
-@var{frame} and @var{allow-same-frame} have the same meaning as in
-@code{dnd-begin-text-drag}.
+@var{frame} and @var{allow-same-frame} mean the same as they do in
+calls to @code{dnd-begin-text-drag}.
 
 The return value is the action that the drop target actually
-performed, which can be one of the following symbols:
+performed, which is one of the following symbols:
 
 @table @code
 @item copy
@@ -4881,19 +4988,18 @@ dropping multiple files, then the first file will be 
used instead.
 @end defun
 
 @defun dnd-direct-save file name &optional frame allow-same-frame
-This function is similar to @code{dnd-begin-file-drag} (with the
-default action of copy), but instead of specifying the action you
-specify the name of the copy created by the target program in
-@code{name}.
+The behavior of this function is akin to that of
+@code{dnd-begin-file-drag} (when the default action @code{copy} is
+used), except that it accepts a name under which the copy is meant to
+be filed.
 @end defun
 
 @cindex initiating drag-and-drop, low-level
   The high-level interfaces described above are implemented on top of
-a lower-level primitive.  If you need to drag content other than files
-or text, use the low-level interface @code{x-begin-drag}
-instead.  However, using it will require detailed knowledge of the
-data types and actions used by the programs to transfer content via
-drag-and-drop on each platform you want to support.
+a lower-level primitive.  The low-level interface @code{x-begin-drag}
+is also available for dragging content besides text and files.  It
+demands detailed knowledge of the data types and actions understood by
+programs on each platform its callers wish to support.
 
 @defun x-begin-drag targets &optional action frame return-frame 
allow-current-frame follow-tooltip
 This function begins a drag from @var{frame}, and returns when the
@@ -4905,60 +5011,59 @@ non-@code{nil}.  If no mouse buttons are held down when 
the
 drag-and-drop operation begins, this function may immediately return
 @code{nil}.
 
-@var{targets} is a list of strings describing selection targets, much
-like the @var{data-type} argument to @code{gui-get-selection}, that
-the drop target can request from Emacs (@pxref{Window System
+@var{targets} is a list of strings representing selection targets,
+much like the @var{data-type} argument to @code{gui-get-selection},
+that the drop target can request from Emacs (@pxref{Window System
 Selections}).
 
-@var{action} is a symbol describing the action recommended to the
-target.  It can either be @code{XdndActionCopy}, which
-means to copy the contents of the selection @code{XdndSelection} to
-the drop target; or @code{XdndActionMove}, which means copy as with
-@code{XdndActionCopy}, and in addition the caller should delete
-whatever was stored in that selection after copying it.
+@var{action} is a symbol designating the action recommended to the
+target.  It can either be @code{XdndActionCopy} or
+@code{XdndActionMove}; both imply copying the contents of the
+selection @code{XdndSelection} to the drop target, but the latter
+moreover conveys a promise to delete the contents of the selection
+after the copying.
 
 @var{action} may also be an alist which associates between symbols
-describing the available actions, and strings that the drop target is
-expected to present to the user to choose between the available
-actions.
+representing available actions, and strings that the drop target
+presents to the user for him to select between those actions.
 
 If @var{return-frame} is non-@code{nil} and the mouse moves over an
 Emacs frame after first moving out of @var{frame}, then the frame to
 which the mouse moves will be returned immediately.  If
-@var{return-frame} is the symbol @code{now}, then any frame underneath
+@var{return-frame} is the symbol @code{now}, then any frame beneath
 the mouse pointer will be returned without waiting for the mouse to
 first move out of @var{frame}.  @var{return-frame} is useful when you
 want to treat dragging content from one frame to another specially,
-while also being able to drag content to other programs, but it is not
-guaranteed to work on all systems and with all window managers.
+while also dragging content to other programs, but it is not
+guaranteed to function on all systems and with all window managers.
 
 If @var{follow-tooltip} is non-@code{nil}, the position of any tooltip
-(such as one shown by @code{tooltip-show}) will follow the location of
-the mouse pointer whenever it moves during the drag-and-drop
+(such as one displayed by @code{tooltip-show}) will follow the
+location of the mouse pointer as it moves during the drag-and-drop
 operation.  The tooltip will be hidden once all mouse buttons are
 released.
 
 If the drop was rejected or no drop target was found, this function
-returns @code{nil}.  Otherwise, it returns a symbol describing the
-action the target chose to perform, which can differ from @var{action}
-if that isn't supported by the drop target.  @code{XdndActionPrivate}
-is also a valid return value in addition to @code{XdndActionCopy} and
-@code{XdndActionMove}; it means that the drop target chose to perform
-an unspecified action, and no further processing is required by the
-caller.
-
-The caller must cooperate with the target to fully perform the action
-chosen by the target.  For example, callers should delete the buffer
-text that was dragged if this function returns @code{XdndActionMove}.
+returns @code{nil}.  Otherwise, it returns a symbol representing the
+action the target opted to take, which can differ from @var{action} if
+that isn't supported by the drop target.  @code{XdndActionPrivate} is
+also a valid return value in addition to @code{XdndActionCopy} and
+@code{XdndActionMove}; it suggests that the drop target opted for an
+indeterminate action, and no further action is required of the caller.
+
+The caller must cooperate with the target to complete the action
+selected by the target.  For example, callers should delete any buffer
+text that was dragged if this function returns @code{XdndActionMove},
+and likewise for other drag data where comparable criteria apply.
 @end defun
 
 @cindex drag and drop protocols, X
 
-  On X Windows, several different drag-and-drop protocols are
-supported by @code{x-begin-drag}.  When dragging content that is known
-to not be supported by a specific drag-and-drop protocol, it might be
-desirable to turn that protocol off, by changing the values of the
-following variables:
+  The function @code{x-begin-drag} leverages several drag-and-drop
+protocols ``behind the scenes''.  When dragging content that is known
+to not be supported by a specific drag-and-drop protocol, that
+protocol can be disabled by changing the values of the following
+variables:
 
 @defvar x-dnd-disable-motif-protocol
 When this is non-@code{nil}, the Motif drag and drop protocols are
@@ -4982,8 +5087,8 @@ events and the primary selection to insert the text if 
the drop target
 doesn't support any drag-and-drop protocol at all.
 
 A side effect is that Emacs will become the owner of the primary
-selection upon such a drop.  If that is not desired, then the drop
-emulation can be disabled by setting this variable to @code{nil}.
+selection upon such a drop.  Such emulation can be disabled by setting
+this variable to @code{nil}.
 @end defvar
 
 @node Color Names
diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi
index 236b823e7e6..ba0d919549b 100644
--- a/doc/lispref/functions.texi
+++ b/doc/lispref/functions.texi
@@ -2364,8 +2364,8 @@ accepted three arguments, like this
   (sit-for seconds milliseconds nodisp)
 @end example
 
-However, calling @code{sit-for} this way is considered obsolete
-(@pxref{Waiting}).  The old calling convention is deprecated like
+During a transition period, the function accepted those three
+arguments, but declared this old calling convention as deprecated like
 this:
 
 @example
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index 00148420893..f365d88fade 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -4149,7 +4149,7 @@ it add meta information to it.  The @code{:language} 
keyword declares
 name of @var{query}.  Users can control which features are enabled
 with @code{treesit-font-lock-level} and
 @code{treesit-font-lock-feature-list} (described below).  These two
-keywords are mandatory.
+keywords are mandatory (with exceptions).
 
 Other keywords are optional:
 
@@ -4161,6 +4161,9 @@ Other keywords are optional:
 @item @tab @code{append} @tab Append the new face to existing ones
 @item @tab @code{prepend} @tab Prepend the new face to existing ones
 @item @tab @code{keep} @tab Fill-in regions without an existing face
+@item @code{:default-language} @tab @var{language}
+@tab Every @var{query} after this keyword will use @var{language}
+by default.
 @end multitable
 
 Lisp programs mark patterns in @var{query} with capture names (names
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi
index 5400d492f0a..5711ba9016a 100644
--- a/doc/lispref/os.texi
+++ b/doc/lispref/os.texi
@@ -2127,6 +2127,14 @@ This function returns the number of days between the 
beginning of year
 The operating system limits the range of time and zone values.
 @end defun
 
+@defun days-to-time days
+This is not quite the inverse of the @code{time-to-days} function, as
+it uses the Emacs epoch (instead of the year 1) for historical
+reasons.  To get the inverse, subtract @code{(time-to-days 0)} from
+@var{days}, in which case @code{days-to-time} may return @code{nil} if
+@var{days} is negative.
+@end defun
+
 @defun time-to-day-in-year time-value
 This returns the day number within the year corresponding to @var{time-value},
 assuming the default time zone.
@@ -3355,7 +3363,8 @@ reliably report file attribute changes when watching a 
directory.
 The @code{stopped} event means that watching the file has been
 discontinued.  This could be because @code{file-notify-rm-watch} was
 called (see below), or because the file being watched was deleted, or
-due to another error reported from the underlying library which makes
+because the filesystem of the file being watched was unmounted, or due
+to another error reported from the underlying library which makes
 further watching impossible.
 
 @var{file} and @var{file1} are the name of the file(s) whose event is
diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi
index df5e2139237..3e7872208a2 100644
--- a/doc/lispref/processes.texi
+++ b/doc/lispref/processes.texi
@@ -1660,8 +1660,10 @@ from previous output.
 @defun set-process-buffer process buffer
 This function sets the buffer associated with @var{process} to
 @var{buffer}.  If @var{buffer} is @code{nil}, the process becomes
-associated with no buffer; if non-@code{nil}, the process mark will be
-set to point to the end of @var{buffer}.
+associated with no buffer; if non-@code{nil} and different from the
+buffer associated with the process, the process mark will be set to
+point to the end of @var{buffer} (unless the process mark is already
+associated with @var{buffer}).
 @end defun
 
 @defun get-buffer-process buffer-or-name
diff --git a/doc/lispref/tips.texi b/doc/lispref/tips.texi
index f594d684338..6128fef5d99 100644
--- a/doc/lispref/tips.texi
+++ b/doc/lispref/tips.texi
@@ -97,7 +97,7 @@ alternative common prefixes, so long as they make sense.
 @item
 We recommend enabling @code{lexical-binding} in new code, and
 converting existing Emacs Lisp code to enable @code{lexical-binding}
-if it doesn't already.  @xref{Using Lexical Binding}.
+if it doesn't already.  @xref{Selecting Lisp Dialect}.
 
 @item
 Put a call to @code{provide} at the end of each separate Lisp file.
diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi
index dea35a04d4f..f575b188fc6 100644
--- a/doc/lispref/variables.texi
+++ b/doc/lispref/variables.texi
@@ -976,184 +976,57 @@ Variables}).  This section describes exactly what this 
means.
 binding can be accessed.  @dfn{Extent} refers to @emph{when}, as the
 program is executing, the binding exists.
 
-@cindex dynamic binding
-@cindex dynamic scope
-@cindex dynamic extent
-  By default, the local bindings that Emacs creates are @dfn{dynamic
-bindings}.  Such a binding has @dfn{dynamic scope}, meaning that any
-part of the program can potentially access the variable binding.  It
-also has @dfn{dynamic extent}, meaning that the binding lasts only
-while the binding construct (such as the body of a @code{let} form) is
-being executed.
-
 @cindex lexical binding
 @cindex lexical scope
 @cindex indefinite extent
-  Emacs can optionally create @dfn{lexical bindings}.  A lexical
-binding has @dfn{lexical scope}, meaning that any reference to the
-variable must be located textually within the binding
+  For historical reasons, there are two dialects of Emacs Lisp,
+selected via the @code{lexical-binding} buffer-local variable.
+In the modern Emacs Lisp dialect, local bindings are lexical by default.
+A @dfn{lexical binding} has @dfn{lexical scope}, meaning that any
+reference to the variable must be located textually within the binding
 construct@footnote{With some exceptions; for instance, a lexical
 binding can also be accessed from the Lisp debugger.}.  It also has
 @dfn{indefinite extent}, meaning that under some circumstances the
 binding can live on even after the binding construct has finished
-executing, by means of special objects called @dfn{closures}.
+executing, by means of objects called @dfn{closures}.
 
-  The dynamic binding was (and still is) the default in Emacs for many
-years, but lately Emacs is moving towards using lexical binding in
-more and more places, with the goal of eventually making that the
-default.
+@cindex dynamic binding
+@cindex dynamic scope
+@cindex dynamic extent
+  Local bindings can also be dynamic, which they always are in the
+old Emacs Lisp dialect and optionally in the modern dialect.
+A @dfn{dynamic binding} has @dfn{dynamic scope}, meaning that any
+part of the program can potentially access the variable binding.  It
+also has @dfn{dynamic extent}, meaning that the binding lasts only
+while the binding construct (such as the body of a @code{let} form) is
+being executed.
 
-  The following subsections describe dynamic binding and lexical
+  The old dynamic-only Emacs Lisp dialect is still the default in code
+loaded or evaluated from Lisp files that lack a dialect declaration.
+Eventually the modern dialect will be made the default.
+All Lisp files should declare the dialect used to ensure that they
+keep working correctly in the future.
+
+  The following subsections describe lexical binding and dynamic
 binding in greater detail, and how to enable lexical binding in Emacs
 Lisp programs.
 
 @menu
-* Dynamic Binding::         The default for binding local variables in Emacs.
+* Lexical Binding::         The standard type of local variable binding.
+* Dynamic Binding::         A different type of local variable binding.
 * Dynamic Binding Tips::    Avoiding problems with dynamic binding.
-* Lexical Binding::         A different type of local variable binding.
-* Using Lexical Binding::   How to enable lexical binding.
+* Selecting Lisp Dialect::   How to select the Emacs Lisp dialect to use.
 * Converting to Lexical Binding:: Convert existing code to lexical binding.
 @end menu
 
-@node Dynamic Binding
-@subsection Dynamic Binding
-
-  By default, the local variable bindings made by Emacs are dynamic
-bindings.  When a variable is dynamically bound, its current binding
-at any point in the execution of the Lisp program is simply the most
-recently-created dynamic local binding for that symbol, or the global
-binding if there is no such local binding.
-
-  Dynamic bindings have dynamic scope and extent, as shown by the
-following example:
-
-@example
-@group
-(defvar x -99)  ; @r{@code{x} receives an initial value of @minus{}99.}
-
-(defun getx ()
-  x)            ; @r{@code{x} is used free in this function.}
-
-(let ((x 1))    ; @r{@code{x} is dynamically bound.}
-  (getx))
-     @result{} 1
-
-;; @r{After the @code{let} form finishes, @code{x} reverts to its}
-;; @r{previous value, which is @minus{}99.}
-
-(getx)
-     @result{} -99
-@end group
-@end example
-
-@noindent
-The function @code{getx} refers to @code{x}.  This is a @dfn{free}
-reference, in the sense that there is no binding for @code{x} within
-that @code{defun} construct itself.  When we call @code{getx} from
-within a @code{let} form in which @code{x} is (dynamically) bound, it
-retrieves the local value (i.e., 1).  But when we call @code{getx}
-outside the @code{let} form, it retrieves the global value (i.e.,
-@minus{}99).
-
-  Here is another example, which illustrates setting a dynamically
-bound variable using @code{setq}:
-
-@example
-@group
-(defvar x -99)      ; @r{@code{x} receives an initial value of @minus{}99.}
-
-(defun addx ()
-  (setq x (1+ x)))  ; @r{Add 1 to @code{x} and return its new value.}
-
-(let ((x 1))
-  (addx)
-  (addx))
-     @result{} 3           ; @r{The two @code{addx} calls add to @code{x} 
twice.}
-
-;; @r{After the @code{let} form finishes, @code{x} reverts to its}
-;; @r{previous value, which is @minus{}99.}
-
-(addx)
-     @result{} -98
-@end group
-@end example
-
-  Dynamic binding is implemented in Emacs Lisp in a simple way.  Each
-symbol has a value cell, which specifies its current dynamic value (or
-absence of value).  @xref{Symbol Components}.  When a symbol is given
-a dynamic local binding, Emacs records the contents of the value cell
-(or absence thereof) in a stack, and stores the new local value in the
-value cell.  When the binding construct finishes executing, Emacs pops
-the old value off the stack, and puts it in the value cell.
-
-  Note that when code using Dynamic Binding is native compiled the
-native compiler will not perform any Lisp specific optimization.
-
-@node Dynamic Binding Tips
-@subsection Proper Use of Dynamic Binding
-
-  Dynamic binding is a powerful feature, as it allows programs to
-refer to variables that are not defined within their local textual
-scope.  However, if used without restraint, this can also make
-programs hard to understand.  There are two clean ways to use this
-technique:
-
-@itemize @bullet
-@item
-If a variable has no global definition, use it as a local variable
-only within a binding construct, such as the body of the @code{let}
-form where the variable was bound.  If this convention is followed
-consistently throughout a program, the value of the variable will not
-affect, nor be affected by, any uses of the same variable symbol
-elsewhere in the program.
-
-@item
-Otherwise, define the variable with @code{defvar}, @code{defconst}
-(@pxref{Defining Variables}), or @code{defcustom} (@pxref{Variable
-Definitions}).  Usually, the definition should be at top-level in an
-Emacs Lisp file.  As far as possible, it should include a
-documentation string which explains the meaning and purpose of the
-variable.  You should also choose the variable's name to avoid name
-conflicts (@pxref{Coding Conventions}).
-
-Then you can bind the variable anywhere in a program, knowing reliably
-what the effect will be.  Wherever you encounter the variable, it will
-be easy to refer back to the definition, e.g., via the @kbd{C-h v}
-command (provided the variable definition has been loaded into Emacs).
-@xref{Name Help,,, emacs, The GNU Emacs Manual}.
-
-For example, it is common to use local bindings for customizable
-variables like @code{case-fold-search}:
-
-@example
-@group
-(defun search-for-abc ()
-  "Search for the string \"abc\", ignoring case differences."
-  (let ((case-fold-search t))
-    (re-search-forward "abc")))
-@end group
-@end example
-@end itemize
-
 @node Lexical Binding
 @subsection Lexical Binding
 
-  Lexical binding was introduced to Emacs, as an optional feature, in
-version 24.1.  We expect its importance to increase with time.
-Lexical binding opens up many more opportunities for optimization, so
-programs using it are likely to run faster in future Emacs versions.
-Lexical binding is also more compatible with concurrency, which was
-added to Emacs in version 26.1.
-
-  A lexically-bound variable has @dfn{lexical scope}, meaning that any
+Lexical binding is only available in the modern Emacs Lisp dialect.
+(@xref{Selecting Lisp Dialect}.)
+A lexically-bound variable has @dfn{lexical scope}, meaning that any
 reference to the variable must be located textually within the binding
 construct.  Here is an example
-@iftex
-(see the next subsection, for how to actually enable lexical binding):
-@end iftex
-@ifnottex
-(@pxref{Using Lexical Binding}, for how to actually enable lexical binding):
-@end ifnottex
 
 @example
 @group
@@ -1186,17 +1059,6 @@ wants the current value of a variable, it looks first in 
the lexical
 environment; if the variable is not specified in there, it looks in
 the symbol's value cell, where the dynamic value is stored.
 
-  (Internally, the lexical environment is a list whose members are
-usually cons cells that are symbol-value pairs, but some of its
-members can be symbols rather than cons cells.  A symbol in the list
-means the lexical environment declared that symbol's variable as
-locally considered to be dynamically bound.  This list can be passed
-as the second argument to the @code{eval} function, in order to
-specify a lexical environment in which to evaluate a form.
-@xref{Eval}.  Most Emacs Lisp programs, however, should not interact
-directly with lexical environments in this way; only specialized
-programs like debuggers.)
-
 @cindex closures, example of using
   Lexical bindings have indefinite extent.  Even after a binding
 construct has finished executing, its lexical environment can be
@@ -1249,37 +1111,74 @@ functions which take a symbol argument (like 
@code{symbol-value},
 variable's dynamic binding (i.e., the contents of its symbol's value
 cell).
 
-@node Using Lexical Binding
-@subsection Using Lexical Binding
+@node Dynamic Binding
+@subsection Dynamic Binding
 
-  When loading an Emacs Lisp file or evaluating a Lisp buffer, lexical
-binding is enabled if the buffer-local variable @code{lexical-binding}
-is non-@code{nil}:
+  Local variable bindings are dynamic in the modern Lisp dialect for
+special variables (see below), and for all variables in the old Lisp
+dialect.  (@xref{Selecting Lisp Dialect}.)
+Dynamic variable bindings have their uses but are in general more
+error-prone and less efficient than lexical bindings, and the compiler
+is less able to find mistakes in code using dynamic bindings.
 
-@defvar lexical-binding
-If this buffer-local variable is non-@code{nil}, Emacs Lisp files and
-buffers are evaluated using lexical binding instead of dynamic
-binding.  (However, special variables are still dynamically bound; see
-below.)  If @code{nil}, dynamic binding is used for all local
-variables.  This variable is typically set for a whole Emacs Lisp
-file, as a file local variable (@pxref{File Local Variables}).
-Note that unlike other such variables, this one must be set in the
-first line of a file.
-@end defvar
+  When a variable is dynamically bound, its current binding
+at any point in the execution of the Lisp program is simply the most
+recently-created dynamic local binding for that symbol, or the global
+binding if there is no such local binding.
+
+  Dynamic bindings have dynamic scope and extent, as shown by the
+following example:
+
+@example
+@group
+(defvar x -99)  ; @r{@code{x} receives an initial value of @minus{}99.}
+
+(defun getx ()
+  x)            ; @r{@code{x} is used free in this function.}
+
+(let ((x 1))    ; @r{@code{x} is dynamically bound.}
+  (getx))
+     @result{} 1
+
+;; @r{After the @code{let} form finishes, @code{x} reverts to its}
+;; @r{previous value, which is @minus{}99.}
+
+(getx)
+     @result{} -99
+@end group
+@end example
 
 @noindent
-When evaluating Emacs Lisp code directly using an @code{eval} call,
-lexical binding is enabled if the @var{lexical} argument to
-@code{eval} is non-@code{nil}.  @xref{Eval}.
+The function @code{getx} refers to @code{x}.  This is a @dfn{free}
+reference, in the sense that there is no binding for @code{x} within
+that @code{defun} construct itself.  When we call @code{getx} from
+within a @code{let} form in which @code{x} is (dynamically) bound, it
+retrieves the local value (i.e., 1).  But when we call @code{getx}
+outside the @code{let} form, it retrieves the global value (i.e.,
+@minus{}99).
 
-@findex eval-expression@r{, and }lexical-binding
-Lexical binding is also enabled in Lisp Interaction and IELM mode,
-used in the @file{*scratch*} and @file{*ielm*} buffers, and also when
-evaluating expressions via @kbd{M-:} (@code{eval-expression}) and when
-processing the @option{--eval} command-line options of Emacs
-(@pxref{Action Arguments,,, emacs, The GNU Emacs Manual}) and
-@command{emacsclient} (@pxref{emacsclient Options,,, emacs, The GNU
-Emacs Manual}).
+  Here is another example, which illustrates setting a dynamically
+bound variable using @code{setq}:
+
+@example
+@group
+(defvar x -99)      ; @r{@code{x} receives an initial value of @minus{}99.}
+
+(defun addx ()
+  (setq x (1+ x)))  ; @r{Add 1 to @code{x} and return its new value.}
+
+(let ((x 1))
+  (addx)
+  (addx))
+     @result{} 3           ; @r{The two @code{addx} calls add to @code{x} 
twice.}
+
+;; @r{After the @code{let} form finishes, @code{x} reverts to its}
+;; @r{previous value, which is @minus{}99.}
+
+(addx)
+     @result{} -98
+@end group
+@end example
 
 @cindex special variables
   Even when lexical binding is enabled, certain variables will
@@ -1329,6 +1228,111 @@ for those that are only special in the current lexical 
scope.
   The use of a special variable as a formal argument in a function is
 not supported.
 
+  Dynamic binding is implemented in Emacs Lisp in a simple way.  Each
+symbol has a value cell, which specifies its current dynamic value (or
+absence of value).  @xref{Symbol Components}.  When a symbol is given
+a dynamic local binding, Emacs records the contents of the value cell
+(or absence thereof) in a stack, and stores the new local value in the
+value cell.  When the binding construct finishes executing, Emacs pops
+the old value off the stack, and puts it in the value cell.
+
+@node Dynamic Binding Tips
+@subsection Proper Use of Dynamic Binding
+
+  Dynamic binding is a powerful feature, as it allows programs to
+refer to variables that are not defined within their local textual
+scope.  However, if used without restraint, this can also make
+programs hard to understand.
+
+First, choose the variable's name to avoid name conflicts
+(@pxref{Coding Conventions}).
+
+@itemize @bullet
+@item
+If the variable is only used when locally bound to a value, declare it
+special using a @code{defvar} form without an initial value, and never
+assign to it unless it is already bound.  This way, any attempt to
+refer to the variable when unbound will result in a
+@code{void-variable} error.
+
+@item
+Otherwise, define the variable with @code{defvar}, @code{defconst}
+(@pxref{Defining Variables}), or @code{defcustom} (@pxref{Variable
+Definitions}).  Usually, the definition should be at top-level in an
+Emacs Lisp file.  As far as possible, it should include a
+documentation string which explains the meaning and purpose of the
+variable.
+
+Then you can bind the variable anywhere in a program, knowing reliably
+what the effect will be.  Wherever you encounter the variable, it will
+be easy to refer back to the definition, e.g., via the @kbd{C-h v}
+command (provided the variable definition has been loaded into Emacs).
+@xref{Name Help,,, emacs, The GNU Emacs Manual}.
+
+For example, it is common to use local bindings for customizable
+variables like @code{case-fold-search}:
+
+@example
+@group
+(defun search-for-abc ()
+  "Search for the string \"abc\", ignoring case differences."
+  (let ((case-fold-search t))
+    (re-search-forward "abc")))
+@end group
+@end example
+@end itemize
+
+@node Selecting Lisp Dialect
+@subsection Selecting Lisp Dialect
+
+  When loading an Emacs Lisp file or evaluating a Lisp buffer, the
+Lisp dialect is selected using the buffer-local variable
+@code{lexical-binding}.
+
+@defvar lexical-binding
+If this buffer-local variable is non-@code{nil}, Emacs Lisp files and
+buffers are evaluated using the modern Lisp dialect that by default
+uses lexical binding instead of dynamic binding.  If @code{nil}, the
+old dialect is used that uses dynamic binding for all local variables.
+This variable is typically set for a whole Emacs Lisp file, as a
+file-local variable (@pxref{File Local Variables}).  Note that unlike
+other such variables, this one must be set in the first line of a
+file.
+@end defvar
+
+@noindent
+In practice, dialect selection means that the first line in an Emacs
+Lisp file looks like:
+
+@example
+;;; ...  -*- lexical-binding: t -*-
+@end example
+
+@noindent
+for the modern lexical-binding dialect, and
+
+@example
+;;; ...  -*- lexical-binding: nil -*-
+@end example
+
+@noindent
+for the old dynamic-only dialect.  When no declaration is present the
+old dialect is used, but this may change in a future release.
+The compiler will warn if no declaration is present.
+
+When evaluating Emacs Lisp code directly using an @code{eval} call,
+lexical binding is enabled if the @var{lexical} argument to
+@code{eval} is non-@code{nil}.  @xref{Eval}.
+
+@findex eval-expression@r{, and }lexical-binding
+Lexical binding is also enabled in Lisp Interaction and IELM mode,
+used in the @file{*scratch*} and @file{*ielm*} buffers, and also when
+evaluating expressions via @kbd{M-:} (@code{eval-expression}) and when
+processing the @option{--eval} command-line options of Emacs
+(@pxref{Action Arguments,,, emacs, The GNU Emacs Manual}) and
+@command{emacsclient} (@pxref{emacsclient Options,,, emacs, The GNU
+Emacs Manual}).
+
 @node Converting to Lexical Binding
 @subsection Converting to Lexical Binding
 
diff --git a/doc/man/ChangeLog.1 b/doc/man/ChangeLog.1
index ccc53810547..71662625fb9 100644
--- a/doc/man/ChangeLog.1
+++ b/doc/man/ChangeLog.1
@@ -74,7 +74,7 @@
 
        * emacs.1: Small fixes.
 
-2010-10-12  Ulrich Mueller  <ulm@gentoo.org>
+2010-10-12  Ulrich Müller  <ulm@gentoo.org>
 
        * emacs.1: Update license description.
 
@@ -82,7 +82,7 @@
 
        * b2m.1: Remove file.
 
-2010-09-25  Ulrich Mueller  <ulm@gentoo.org>
+2010-09-25  Ulrich Müller  <ulm@gentoo.org>
 
        * etags.1: xz compression is now supported.
 
diff --git a/doc/man/emacsclient.1 b/doc/man/emacsclient.1
index 83c8a366f8b..acc2edd4609 100644
--- a/doc/man/emacsclient.1
+++ b/doc/man/emacsclient.1
@@ -1,5 +1,5 @@
 .\" See section COPYING for conditions for redistribution.
-.TH EMACSCLIENT 1 "2022-09-05" "GNU Emacs" "GNU"
+.TH EMACSCLIENT 1 "2023-10-16" "GNU Emacs" "GNU"
 .\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection
 .\" other params are allowed: see man(7), man(1)
 .SH NAME
@@ -94,13 +94,37 @@ Emacs.  If combined with --eval, this option is ignored.
 How long to wait, in seconds, for Emacs to respond before giving up.
 The default is 0, which means to wait forever.
 .TP
-.B \-nw, \-t, \-\-tty
-Open a new Emacs frame on the current terminal.
+.B \-\-parent-id=ID
+Open an
+.B emacsclient
+frame as a client frame in the parent X window with id ID.
+.TP
+.B \-q, \-\-quiet
+Do not let
+.B emacsclient
+display messages about waiting for Emacs or connecting to remote
+server sockets.
+.TP
+.B \-u, \-\-suppress-output
+Do not let
+.B emacsclient
+display results returned from the server.  Mostly useful in
+combination with --eval when the evaluation performed is for
+side-effect rather than result.
 .TP
 .B \-s, \-\-socket-name=FILENAME
 Use socket named FILENAME for communication.
 This can also be specified via the EMACS_SOCKET_NAME environment variable.
 .TP
+.B \-nw, \-t, \-\-tty
+Open a new Emacs frame on the current terminal.
+.TP
+.B \-T, \-\-tramp-prefix=PREFIX
+Set PREFIX to add to filenames for Emacs to locate files on remote
+machines using TRAMP.  This is mostly useful in combination with using
+the Emacs server over TCP with --server-file.  This can also be
+specified via the EMACSCLIENT_TRAMP environment variable.
+.TP
 .B \-V, \-\-version
 Print version information and exit.
 .TP
diff --git a/doc/misc/ChangeLog.1 b/doc/misc/ChangeLog.1
index 2cd3c3f6b54..832dbd846a6 100644
--- a/doc/misc/ChangeLog.1
+++ b/doc/misc/ChangeLog.1
@@ -4374,7 +4374,7 @@
 
        * sc.texi (Getting Connected): Remove old index entries.
 
-2011-02-12  Ulrich Mueller  <ulm@gentoo.org>
+2011-02-12  Ulrich Müller  <ulm@gentoo.org>
 
        * url.texi: Remove duplicate @dircategory (Bug#7942).
 
@@ -5126,7 +5126,7 @@
        * gnus.texi (NoCeM): Remove.
        (Startup Variables): No jingle.
 
-2010-09-25  Ulrich Mueller  <ulm@gentoo.org>
+2010-09-25  Ulrich Müller  <ulm@gentoo.org>
 
        * woman.texi (Interface Options): xz compression is now supported.
 
diff --git a/doc/misc/calc.texi b/doc/misc/calc.texi
index 5064f76e7b8..c651b007173 100644
--- a/doc/misc/calc.texi
+++ b/doc/misc/calc.texi
@@ -1196,7 +1196,7 @@ bent, contributed ideas and algorithms for a number of 
Calc features
 including modulo forms, primality testing, and float-to-fraction conversion.
 
 Units were added at the eager insistence of Mass Sivilotti.  Later,
-Ulrich Mueller at CERN and Przemek Klosowski at NIST provided invaluable
+Ulrich Müller at CERN and Przemek Klosowski at NIST provided invaluable
 expert assistance with the units table.  As far as I can remember, the
 idea of using algebraic formulas and variables to represent units dates
 back to an ancient article in Byte magazine about muMath, an early
@@ -28032,7 +28032,7 @@ unit name on the stack and then reduce it to base units 
with @kbd{u b}.
 The @kbd{u e} (@code{calc-explain-units}) command displays an English
 description of the units of the expression on the stack.  For example,
 for the expression @samp{62 km^2 g / s^2 mol K}, the description is
-``Square-Kilometer Gram per (Second-squared Mole Degree-Kelvin).''  This
+``Square-Kilometer Gram per (Second-squared Mole Kelvin).''  This
 command uses the English descriptions that appear in the righthand
 column of the Units Table.
 
@@ -28066,8 +28066,8 @@ Canadian (@code{galC}), and British (@code{galUK}) 
definitions.  Also,
 note that @code{oz} is a standard ounce of mass, @code{ozt} is a Troy
 ounce, and @code{ozfl} is a fluid ounce.
 
-The temperature units corresponding to degrees Kelvin and Centigrade
-(Celsius) are the same in this table, since most units commands treat
+The temperature units corresponding to Kelvin and degree Celsius
+are the same in this table, since most units commands treat
 temperatures as being relative.  The @code{calc-convert-temperature}
 command has special rules for handling the different absolute magnitudes
 of the various temperature scales.
diff --git a/doc/misc/cl.texi b/doc/misc/cl.texi
index 5de33350f4f..e5a29cbcffb 100644
--- a/doc/misc/cl.texi
+++ b/doc/misc/cl.texi
@@ -55,6 +55,7 @@ modify this GNU manual.''
 
 @menu
 * Overview::             Basics, usage, organization, naming conventions.
+* Printing::             Human friendly printing with @code{cl-prin1}.
 * Program Structure::    Arglists, @code{cl-eval-when}.
 * Predicates::           Type predicates and equality predicates.
 * Control Structure::    Assignment, conditionals, blocks, looping.
@@ -258,6 +259,160 @@ and @code{:key} is not used.
 @noindent
 [3] Only for one sequence argument or two list arguments.
 
+@node Printing
+@chapter Printing
+
+@noindent
+This chapter describes some enhancements to Emacs Lisp's
+@dfn{printing}, the action of representing Lisp objects in text form.
+The functions documented here are intended to produce output more for
+human readers than the standard printing functions such as
+@code{prin1} and @code{princ} (@pxref{Output Functions,,,elisp,GNU
+Emacs Lisp Reference Manual}).
+
+Several of these functions have a parameter @var{stream}; this
+specifies what to do with the characters printing produces.  For
+example, it might be a buffer, a marker, @code{nil} (meaning use
+standard output), or @code{t} (use the echo area).  @xref{Output
+Streams,,,elisp,GNU Emacs Lisp Reference Manual}, for a full
+description.
+
+@defvar cl-print-readably
+When this variable is non-@code{nil}, @code{cl-prin1} and other
+functions described here try to produce output which can later be read
+by the Lisp reader (@pxref{Input Functions,,,elisp,GNU Emacs Lisp
+Reference Manual}).
+@end defvar
+
+@defvar cl-print-compiled
+This variable controls how to print byte-compiled functions.  Valid
+values are:
+@table @code
+@item nil
+The default: Just an internal hex identifier is printed.
+@item static
+The internal hex identifier together with the function's constant
+vector are printed.
+@item disassemble
+The byte code gets disassembled.
+@item raw
+The raw form of the function is printed by @code{prin1}.
+@end table
+
+Sometimes, a button is set on the output to allow you to disassemble
+the function.  See @code{cl-print-compile-button}.
+@end defvar
+
+@defvar cl-print-compile-button
+When this variable is non-@code{nil} and a byte-compiled function has
+been printed to a buffer, you can click with the mouse or type
+@key{RET} on that output to disassemble the code.  This doesn't apply
+when @code{cl-print-compiled} is set to @code{disassemble}.
+@end defvar
+
+@defvar cl-print-string-length
+The maximum length of a string to print before abbreviating it.  A
+value of @code{nil}, the default, means no limit.
+
+When the CL printing functions abbreviate a string, they print the
+first @code{cl-print-string-length} characters of the string, followed
+by ``@enddots{}''.  When the printing is to a buffer, you can click
+with the mouse or type @key{RET} on this ellipsis to expand the
+string.
+
+This variable has effect only in the @code{cl-prin*} functions, not in
+primitives such as @code{prin1}.
+@end defvar
+
+@defun cl-prin1 object &option stream
+@code{cl-print1} prints @var{object} on @var{stream} (see above)
+according to its type and the settings described above.  The variables
+@code{print-length} and @code{print-level} and the other standard
+Emacs settings also affect the printing (@pxref{Output
+Variables,,,elisp,GNU Emacs Lisp Reference Manual}).
+@end defun
+
+@defun cl-prin1-to-string object
+This function is like @code{cl-prin1}, except the output characters
+are returned as a string from this function rather than being passed
+to a stream.
+@end defun
+
+@defun cl-print-to-string-with-limit print-function value limit
+This function returns a string containing a printed representation of
+@var{value}.  It attempts to get the length of the returned string
+under @var{limit} characters with successively more restrictive
+settings of @code{print-level}, @code{print-length}, and
+@code{cl-print-string-length}.  It uses @var{print-function} to print,
+a function which should take the arguments @var{value} and a stream
+(see above), and which should respect @code{print-length},
+@code{print-level}, and @code{cl-print-string-length}.  @var{limit}
+may be @code{nil} or zero, in which case @var{print-function} will be
+called with these settings bound to @code{nil}; it can also be
+@code{t}, in which case @var{print-function} will be called with their
+current values.
+
+Use this function with @code{cl-prin1} to print an object, possibly
+abbreviating it with one or more ellipses to fit within the size
+limit.
+@end defun
+
+@defun cl-print-object object stream
+This function prints @var{object} on @var{stream} (see above).  It is
+actually a @code{cl-defgeneric} (@pxref{Generic Functions,,,elisp,GNU
+Emacs Lisp Reference Manual}), which is defined for several types of
+@var{object}.  Normally, you just call @code{cl-prin1} to print an
+@var{object} rather than calling this function directly.
+
+You can write @code{cl-print-object} @code{cl-defmethod}s for other
+types of @var{object}, thus extending @code{cl-prin1}.  If such a
+method uses ellipses, you should also write a
+@code{cl-print-object-contents} method for the same type.  For
+examples of these methods, see @file{emacs-lisp/cl-print.el} in the
+Emacs source directory.
+@end defun
+
+@defun cl-print-object-contents object start stream
+This function replaces an ellipsis in @var{stream} beginning at
+@var{start} with the text from the partially printed @var{object} it
+represents.  It is also a @code{cl-defgeneric} defined for several
+types of @var{object}.  @var{stream} is a buffer containing the text
+with the ellipsis.  @var{start} specifies the starting position of the
+ellipsis in a manner dependent on the type; it will have been obtained
+from a text property on the ellipsis, having been put there by
+@code{cl-print-insert-ellipsis}.
+@end defun
+
+@defun cl-print-insert-ellipsis object start stream
+This function prints an ellipsis (``@dots{}'') to @var{stream} (see
+above).  When @var{stream} is a buffer, the ellipsis will be given the
+@code{cl-print-ellipsis} text property.  The value of the text
+property will contain state (including @var{start}) in order to print
+the elided part of @var{object} later.  @var{start} should be nil if
+the whole @var{object} is being elided, otherwise it should be an
+index or other pointer into the internals of @var{object} which can be
+passed to `cl-print-object-contents' at a later time.
+@end defun
+
+@defvar cl-print-expand-ellipsis-function
+This variable holds a function which expands an ellipsis in the
+current buffer.  The function takes four arguments: @var{begin} and
+@var{end}, which are the bounds of the ellipsis; @var{value}, which is
+the value of the @code{cl-print-ellipsis} text property on the
+ellipsis (typically set earlier by @code{cl-prin1}); and
+@var{line-length}, the desired maximum length of the output.  Its
+return value is the buffer position after the expanded text.
+@end defvar
+
+@deffn Command cl-print-expand-ellipsis &optional button
+This command expands the ellipsis at point.  Non-interactively, if
+@var{button} is non-@code{nil}, it should be either a buffer position
+or a button made by @code{cl-print-insert-ellipsis}
+(@pxref{Buttons,,,elisp,GNU Emacs Lisp Reference Manual}), which
+indicates the position of the ellipsis.  The return value is the
+buffer position after the expanded text.
+@end deffn
+
 @node Program Structure
 @chapter Program Structure
 
diff --git a/doc/misc/ediff.texi b/doc/misc/ediff.texi
index ce6cb8c9bd6..f3c671635eb 100644
--- a/doc/misc/ediff.texi
+++ b/doc/misc/ediff.texi
@@ -1368,13 +1368,13 @@ the variable @code{ediff-help-message}, which is local 
to
 @node Window and Frame Configuration
 @section Window and Frame Configuration
 
-On a non-windowing display, Ediff sets things up in one frame, splitting
+On a non-graphical display, Ediff sets things up in one frame, splitting
 it between a small control window and the windows for buffers A, B, and C@.
 The split between these windows can be horizontal or
 vertical, which can be changed interactively by typing @kbd{|} while the
 cursor is in the control window.
 
-On a window display, Ediff sets up a dedicated frame for Ediff Control
+On a graphical display, Ediff sets up a dedicated frame for Ediff Control
 Panel and then it chooses windows as follows: If one of the buffers
 is invisible, it is displayed in the currently selected frame.  If
 a buffer is visible, it is displayed in the frame where it is visible.
@@ -1477,7 +1477,7 @@ The multiframe setup is done by the
 @code{ediff-setup-windows-multiframe} function, which is the default on
 windowing displays.  The plain setup, one where all windows are always
 in one frame, is done by @code{ediff-setup-windows-plain}, which is the
-default on a non-windowing display (or in an xterm window).  In fact,
+default on a non-graphical display (or in an xterm window).  In fact,
 under Emacs, you can switch freely between these two setups by executing
 the command @code{ediff-toggle-multiframe} using the Minibuffer of the
 Menubar.
diff --git a/doc/misc/efaq.texi b/doc/misc/efaq.texi
index 2fc8e60d400..d8097a8d21e 100644
--- a/doc/misc/efaq.texi
+++ b/doc/misc/efaq.texi
@@ -3156,9 +3156,9 @@ Registry), like this:
 
 If possible, we recommend running Emacs inside @command{fbterm}, when
 in a Linux console.  This brings the Linux console on par with most
-terminal emulators under X.  To do this, install @command{fbterm}, for
-example with the package manager of your GNU/Linux distribution, and
-execute the command
+terminal emulators under X@.  To do this, install @command{fbterm},
+for example with the package manager of your GNU/Linux distribution,
+and execute the command
 
 @example
 $ fbterm
diff --git a/doc/misc/erc.texi b/doc/misc/erc.texi
index 3297d8b17f0..10902eac33f 100644
--- a/doc/misc/erc.texi
+++ b/doc/misc/erc.texi
@@ -412,16 +412,18 @@ One way to add functionality to ERC is to customize which 
of its many
 modules are loaded.
 
 There is a spiffy customize interface, which may be reached by typing
-@kbd{M-x customize-option @key{RET} erc-modules @key{RET}}.
-When removing a module outside of the Custom ecosystem, you may wish
-to ensure it's disabled by invoking its associated minor-mode toggle
-with a nonpositive prefix argument, for example, @kbd{C-u - M-x
+@kbd{M-x customize-option @key{RET} erc-modules @key{RET}}.  When
+removing a module outside of Customize, you may wish to ensure it's
+disabled by invoking its associated minor-mode toggle with a
+nonpositive prefix argument, for example, @kbd{C-u - M-x
 erc-spelling-mode @key{RET}}.  Additionally, if you plan on loading
 third-party modules that perform atypical setup on activation, you may
 need to arrange for calling @code{erc-update-modules} in your init
 file.  Examples of such setup might include registering an
 @code{erc-before-connect} hook, advising @code{erc-open}, and
-modifying @code{erc-modules} itself.
+modifying @code{erc-modules} itself.  On Emacs 29 and greater, you can
+also run @code{erc-update-modules} indirectly, via @code{(setopt
+erc-modules erc-modules)}.
 
 The following is a list of available modules.
 
@@ -652,6 +654,54 @@ buffers belonging to their connection (when called 
interactively).
 And unlike global toggles, none of these ever mutates
 @code{erc-modules}.
 
+@c FIXME add section to Advanced chapter for creating modules, and
+@c move this there.
+@anchor{Module Loading}
+@subheading Loading
+@cindex module loading
+
+ERC loads internal modules in alphabetical order and third-party
+modules as they appear in @code{erc-modules}.  When defining your own
+module, take care to ensure ERC can find it.  An easy way to do that
+is by mimicking the example in the doc string for
+@code{define-erc-module} (also shown below).  For historical reasons,
+ERC falls back to @code{require}ing features.  For example, if some
+module @code{my-module} in @code{erc-modules} lacks a corresponding
+@code{erc-my-module-mode} command, ERC will attempt to load the
+library @code{erc-my-module} prior to connecting.  If this fails, ERC
+signals an error.  Users defining personal modules in an init file
+should @code{(provide 'erc-my-module)} somewhere to placate ERC.
+Dynamically generating modules on the fly is not supported.
+
+Some packages have been known to autoload a module's definition
+instead of its minor-mode command, which severs the link between the
+library and the module.  This means that enabling the mode by invoking
+its command toggle isn't enough to load its defining library.  As
+such, packages should only supply module-related autoload cookies with
+an actual @code{autoload} form for their module's minor-mode command,
+like so:
+
+@lisp
+;;;###autoload(autoload 'erc-my-module-mode "erc-my-module" nil t)
+(define-erc-module my-module nil
+  "My doc string."
+  ((add-hook 'erc-insert-post-hook #'erc-my-module-on-insert-post))
+  ((remove-hook 'erc-insert-post-hook #'erc-my-module-on-insert-post)))
+@end lisp
+
+@noindent
+As implied earlier, packages can usually omit such cookies entirely so
+long as their module's prefixed name matches that of its defining
+library and the library's provided feature.
+
+Finally, packages have also been observed to run
+@code{erc-update-modules} in top-level forms, forcing ERC to take
+special precautions to avoid recursive invocations.  Another
+unfortunate practice is mutating @code{erc-modules} itself upon
+loading @code{erc}, possibly by way of an autoload.  Doing this tricks
+Customize into displaying the widget for @code{erc-modules}
+incorrectly, with built-in modules moved from the predefined checklist
+to the user-provided free-form area.
 
 @c PRE5_4: Document every option of every module in its own subnode
 
diff --git a/doc/misc/eshell.texi b/doc/misc/eshell.texi
index cc94f610615..e8aa8cdc6a3 100644
--- a/doc/misc/eshell.texi
+++ b/doc/misc/eshell.texi
@@ -400,6 +400,14 @@ Return the buffer named @var{name}.  This is equivalent to
 @samp{$(get-buffer-create "@var{name}")} (@pxref{Creating Buffers, , ,
 elisp, The Emacs Lisp Reference Manual}).
 
+@item #<marker @var{position} @var{buffer-or-name}>
+Return a marker at @var{position} in the buffer @var{buffer-or-name}.
+@var{buffer-or-name} can either be a string naming a buffer or an
+actual buffer object.  This is roughly equivalent to creating a new
+marker and calling @samp{$(set-marker marker @var{position}
+@var{buffer-or-name})} (@pxref{Moving Markers, , , elisp, The Emacs
+Lisp Reference Manual}).
+
 @item #<process @var{name}>
 Return the process named @var{name}.  This is equivalent to
 @samp{$(get-process "@var{name}")} (@pxref{Process Information, , ,
@@ -2590,11 +2598,6 @@ If it's a Lisp function, input redirection implies 
@command{xargs} (in a
 way@dots{}).  If input redirection is added, also update the
 @code{file-name-quote-list}, and the delimiter list.
 
-@item Allow @samp{#<@var{word} @var{arg}>} as a generic syntax
-
-With the handling of @emph{word} specified by an
-@code{eshell-special-alist}.
-
 @item In @code{eshell-eval-using-options}, allow a @code{:complete} tag
 
 It would be used to provide completion rules for that command.  Then the
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi
index 7ebd82c5bed..4b1ef5c27b4 100644
--- a/doc/misc/gnus.texi
+++ b/doc/misc/gnus.texi
@@ -24841,7 +24841,7 @@ ends such as Bogofilter (@pxref{Bogofilter}) and the 
Spam Statistics
 package (@pxref{Spam Statistics Filtering}).
 
 The spam and ham processors that apply to each group are determined by
-the group's@code{spam-process} group parameter.  If this group
+the group's @code{spam-process} group parameter.  If this group
 parameter is not defined, they are determined by the variable
 @code{gnus-spam-process-newsgroups}.
 
@@ -26434,12 +26434,12 @@ lines:
 (setq gnus-refer-article-method
       '(current
         (nnregistry)
-        (nnweb "gmane" (nnweb-type gmane))))
+        (nnweb "google" (nnweb-type google))))
 @end example
 
 The example above instructs Gnus to first look up the article in the
 current group, or, alternatively, using the registry, and finally, if
-all else fails, using Gmane.
+all else fails, using Google.
 
 @node Fancy splitting to parent
 @subsection Fancy splitting to parent
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi
index 64d47515978..61910a3d86d 100644
--- a/doc/misc/tramp.texi
+++ b/doc/misc/tramp.texi
@@ -6089,20 +6089,23 @@ wrapping the timer function body as follows:
 to 10.  @value{tramp} does not display all messages; only those with a
 verbosity level less than or equal to @code{tramp-verbose}.
 
+@noindent
 The verbosity levels are
 
-          @w{ 0}  silent (no @value{tramp} messages at all)
-@*@indent @w{ 1}  errors
-@*@indent @w{ 2}  warnings
-@*@indent @w{ 3}  connection to remote hosts (default verbosity)
-@*@indent @w{ 4}  activities
-@*@indent @w{ 5}  internal
-@*@indent @w{ 6}  sent and received strings
-@*@indent @w{ 7}  connection properties
-@*@indent @w{ 8}  file caching
-@*@indent @w{ 9}  test commands
-@*@indent @w{10}  traces (huge)
-@*@indent @w{11}  call traces (maintainer only)
+@indentedblock
+   @w{ 0}  silent (no @value{tramp} messages at all)
+@* @w{ 1}  errors
+@* @w{ 2}  warnings
+@* @w{ 3}  connection to remote hosts (default verbosity)
+@* @w{ 4}  activities
+@* @w{ 5}  internal
+@* @w{ 6}  sent and received strings
+@* @w{ 7}  connection properties
+@* @w{ 8}  file caching
+@* @w{ 9}  test commands
+@* @w{10}  traces (huge)
+@* @w{11}  call traces (maintainer only)
+@end indentedblock
 
 With @code{tramp-verbose} greater than or equal to 4, messages are
 also written to the @value{tramp} debug buffer @file{*debug
diff --git a/doc/misc/url.texi b/doc/misc/url.texi
index e6636e32507..6517f858324 100644
--- a/doc/misc/url.texi
+++ b/doc/misc/url.texi
@@ -1083,16 +1083,18 @@ This is a regular expression that matches the shell 
prompt.
 @defopt socks-server
 This specifies the default server, it takes the form
 @w{@code{("Default server" @var{server} @var{port} @var{version})}}
-where @var{version} can be either 4 or 5.
+where @var{version} can be 4, 4a, or 5.
 @end defopt
 @defvar socks-password
 If this is @code{nil} then you will be asked for the password,
 otherwise it will be used as the password for authenticating you to
-the @sc{socks} server.
+the @sc{socks} server.  You can often set this to @code{""} for
+servers on your local network.
 @end defvar
 @defvar socks-username
 This is the username to use when authenticating yourself to the
-@sc{socks} server.  By default this is your login name.
+@sc{socks} server.  By default, this is your login name.  In versions
+4 and 4a, ERC uses this for the @samp{ID} field.
 @end defvar
 @defvar socks-timeout
 This controls how long, in seconds, to wait for responses from the
diff --git a/doc/misc/use-package.texi b/doc/misc/use-package.texi
index 55e56f7ce4e..4046c3a62ce 100644
--- a/doc/misc/use-package.texi
+++ b/doc/misc/use-package.texi
@@ -451,7 +451,7 @@ docstring of @code{system-type} for other valid values.
 @item
 Window system
 
-The example below loads a package only on macOS and X.  See the
+The example below loads a package only on macOS and X@.  See the
 docstring of @code{window-system} for valid values.
 
 @lisp
diff --git a/doc/misc/viper.texi b/doc/misc/viper.texi
index 3e038520287..e0ab563ca33 100644
--- a/doc/misc/viper.texi
+++ b/doc/misc/viper.texi
@@ -8,8 +8,7 @@
 @include docstyle.texi
 
 @copying
-Copyright @copyright{} 1995--1997, 2001--2023 Free Software Foundation,
-Inc.
+Copyright @copyright{} 1995--2023 Free Software Foundation, Inc.
 
 @quotation
 Permission is granted to copy, distribute and/or modify this document
@@ -1700,7 +1699,7 @@ a text-formatting function, @code{indent-for-tab-command} 
(which facilitates
 programming and document writing).  Instead, the tab is inserted via the
 command @code{viper-insert-tab}, which is bound to @kbd{S-tab} (shift + tab).
 
-On some non-windowing terminals, Shift doesn't modify the @key{TAB} key, so
+On some text terminals, Shift doesn't modify the @key{TAB} key, so
 @kbd{S-tab} behaves as if it were @key{TAB}.  In such a case, you will have
 to bind @code{viper-insert-tab} to some other convenient key.
 
@@ -2232,7 +2231,7 @@ For this reason, Viper doesn't change the standard Emacs 
binding of
 (except for users at level 1).  Instead, in Viper, the key
 @kbd{S-tab} (shift+ tab) is chosen to emulate Vi's @key{TAB}.
 
-We should note that on some non-windowing terminals, Shift doesn't modify
+We should note that on some text terminals, Shift doesn't modify
 the @key{TAB} key, so @kbd{S-tab} behaves as if it were @key{TAB}.  In such
 a case, you will have to bind @code{viper-insert-tab} to some other
 convenient key.
diff --git a/etc/AUTHORS b/etc/AUTHORS
index 27d01ed9eb9..5fc54f1909f 100644
--- a/etc/AUTHORS
+++ b/etc/AUTHORS
@@ -280,6 +280,8 @@ Amin Bandali: changed erc.el erc.texi erc-backend.el 
erc-button.el
 
 Amos Bird: changed xfns.c
 
+Amritpal Singh: changed decompress.c
+
 Anand Mitra: changed gnus-sum.el
 
 Anders Holst: wrote hippie-exp.el
@@ -296,9 +298,9 @@ Anders Waldenborg: changed emacsclient.c
 Andrea Corallo: wrote comp-cstr-tests.el comp-cstr.el comp-tests.el
   comp.el
 and changed comp.c pdumper.c lread.c bytecomp.el startup.el configure.ac
-  comp.h loadup.el lisp.h data.c alloc.c emacs.c .gitlab-ci.yml
-  cl-macs.el elisp-mode.el nadvice.el comp-test-funcs.el lisp/Makefile.in
-  subr.el Makefile.in advice.el and 70 other files
+  comp.h loadup.el lisp.h data.c elisp-mode.el alloc.c emacs.c subr.el
+  .gitlab-ci.yml cl-macs.el nadvice.el comp-test-funcs.el
+  lisp/Makefile.in Makefile.in advice.el and 70 other files
 
 André A. Gomes: changed ispell.el
 
@@ -535,6 +537,8 @@ Aubrey Jaffer: changed info.el unexelf.c
 
 August Feng: changed bookmark.el
 
+Augustin Chéneau: changed treesit.el
+
 Augusto Stoffel: co-wrote ansi-osc.el
 and changed progmodes/python.el isearch.el eglot.el comint.el eldoc.el
   project.el README.md font-lock.el man.el misc.texi modes.texi
@@ -578,8 +582,8 @@ Bartosz Duszel: changed allout.el bib-mode.el cc-cmds.el 
hexl.el icon.el
 
 Basil L. Contovounesios: changed simple.el subr.el message.el eww.el
   modes.texi custom.el text.texi bibtex.el gnus-sum.el internals.texi
-  customize.texi display.texi files.texi gnus-group.el gnus-win.el
-  gnus.texi gravatar.el js.el json.el map.el shr.el and 345 other files
+  js.el customize.texi display.texi files.texi gnus-group.el gnus-win.el
+  gnus.texi gravatar.el json.el map.el shr.el and 345 other files
 
 Bastian Beischer: changed semantic/complete.el calc-yank.el include.el
   mru-bookmark.el refs.el senator.el
@@ -702,9 +706,9 @@ Bob Olson: co-wrote cperl-mode.el
 
 Bob Rogers: wrote ietf-drums-date-tests.el ietf-drums-date.el
   ietf-drums-tests.el
-and changed ietf-drums.el vc-dir.el vc-svn.el cperl-mode.el diff.el
-  ewoc.el ffap.el files.el maintaining.texi sql.el thingatpt.el
-  time-date.el vc.el vc1-xtra.texi
+and changed ietf-drums.el vc-dir.el time-date.el vc-svn.el cperl-mode.el
+  diff.el ewoc.el ffap.el files.el maintaining.texi os.texi sql.el
+  thingatpt.el vc.el vc1-xtra.texi
 
 Bob Weiner: changed info.el quail.el dframe.el etags.c rmail.el
   rmailsum.el speedbar.el
@@ -1014,6 +1018,8 @@ Christopher Wellons: changed emacs-lisp/cl-lib.el 
hashcash.el
 
 Christophe Troestler: changed gnus-icalendar.el epg.el newcomment.el
 
+Christoph Göttschkes: changed make-mode.el
+
 Christoph Scholtes: changed README.W32 progmodes/python.el stdint.h
   INSTALL maintaining.texi INSTALL.REPO admin.el bookmark.el
   configure.bat control.texi cua-base.el help-mode.el help.el ibuffer.el
@@ -1158,7 +1164,7 @@ Daniele Nicolodi: changed url-http.el
 
 Daniel Fleischer: changed TUTORIAL browse-url.el startup.el
 
-Daniel Freeman: changed eglot.el eglot.texi
+Daniel Freeman: changed eglot.el js.el eglot.texi
 
 Daniel Gröber: changed rxvt.el
 
@@ -1190,7 +1196,7 @@ Daniel Martín: changed c-ts-mode.el nsterm.m shortdoc.el 
ns-win.el
   simple.el diff-mode-tests.el erc.texi files.el files.texi indent.erts
   msdos-xtra.texi progmodes/python.el search.texi .lldbinit basic.texi
   c-ts-mode-tests.el cmacexp.el compilation.txt compile-tests.el
-  compile.texi configure.ac and 45 other files
+  compile.texi configure.ac and 46 other files
 
 Daniel McClanahan: changed lisp-mode.el
 
@@ -1316,7 +1322,7 @@ David Edmondson: changed message.el erc.el mml2015.el 
process.c
   gnus-cite.el gnus-cloud.el gnus.texi imap.el mm-uu.el mm-view.el
   nnfolder.el nnimap.el nnml.el rcirc.el shr.el
 
-Davide Masserut: changed bindings.el sh-script.el basic.texi
+Davide Masserut: changed bindings.el sh-script.el Makefile.in basic.texi
   dictionary.el eglot.el faces.el go-ts-mode-tests.el go-ts-mode.el
   indent.erts
 
@@ -1420,8 +1426,8 @@ David Ponce: wrote bovine/grammar.el cedet.el comp.el 
java-tags.el
 and co-wrote util-modes.el
 and changed w32menu.c w32term.c close.png close.xpm empty.png empty.xpm
   end-guide.png end-guide.xpm files.el guide.png guide.xpm handle.png
-  handle.xpm keyboard.c leaf.png leaf.xpm no-guide.png no-guide.xpm
-  no-handle.png no-handle.xpm open.png and 22 other files
+  handle.xpm image.el keyboard.c leaf.png leaf.xpm no-guide.png
+  no-guide.xpm no-handle.png no-handle.xpm and 22 other files
 
 David Raynes: changed ns-win.el
 
@@ -1496,7 +1502,7 @@ Detlev Zundel: wrote re-builder.el
 and changed buffer.c
 
 Devon Sean McCullough: changed url-http.el buff-menu.el comint.el
-  ns-win.el
+  iso-transl.el ns-win.el
 
 Dhruva Krishnamurthy: changed emacsclient.c fontset.c image.c sound.c
   w32proc.c
@@ -1660,9 +1666,9 @@ Eli Zaretskii: wrote [bidirectional display in xdisp.c]
   chartab-tests.el coding-tests.el etags-tests.el rxvt.el tty-colors.el
 and co-wrote help-tests.el
 and changed xdisp.c display.texi w32.c msdos.c simple.el w32fns.c
-  files.el fileio.c keyboard.c emacs.c text.texi w32term.c configure.ac
+  files.el fileio.c keyboard.c emacs.c text.texi configure.ac w32term.c
   dispnew.c frames.texi w32proc.c files.texi xfaces.c window.c
-  dispextern.h lisp.h and 1330 other files
+  dispextern.h lisp.h and 1334 other files
 
 Eliza Velasquez: changed server.el
 
@@ -1808,7 +1814,7 @@ Ernesto Alfonso: changed simple.el
 
 E Sabof: changed hi-lock.el image-dired.el
 
-Eshel Yaron: changed eglot.el eww.el
+Eshel Yaron: changed eglot.el emacs.texi eww.el indent.texi
 
 Espen Skoglund: wrote pascal.el
 
@@ -1877,10 +1883,8 @@ and changed minibuf.c esh-var.el minibuf.texi mouse.el 
package.el rect.el
   edebug.el em-dirs.el eshell-tests.el eww.el fileio-tests.el fileio.c
   files.texi gamegrid.el keyboard.c and 8 other files
 
-Felician Nemeth: changed rmc.el
-
 Felicián Németh: changed eglot.el EGLOT-NEWS README.md eglot-tests.el
-  project.el xref.el
+  project.el rmc.el xref.el
 
 Felipe Ochoa: changed faces.el js.el paren.el
 
@@ -2154,12 +2158,10 @@ and changed tar-mode.el
 
 Greg Minshall: changed eldoc.el
 
-Gregoire Jadi: changed proced.el
-
 Grégoire Jadi: changed org.texi configure.ac emacsgtkfixed.c keyboard.c
   rcirc.el xwidget.c xwidget.el Makefile.in bibtex-tests.el bibtex.el
   cl-generic.el dispextern.h dispnew.c emacs.c latin-post.el lisp.h
-  ob-core.el org-id.el org.el print.c reporter.el and 8 other files
+  ob-core.el org-id.el org.el print.c proced.el and 9 other files
 
 Gregorio Gervasio, Jr.: changed gnus-sum.el
 
@@ -2342,7 +2344,8 @@ Igor Kuzmin: wrote cconv.el
 Igor Saprykin: changed ftfont.c
 
 Ihor Radchenko: wrote org-fold-core.el org-fold.el org-persist.el
-and changed ox.el fns.c help-mode.el oc.el org-element.el
+and changed ox.el fns.c emacsclient.desktop help-mode.el oc.el
+  org-element.el
 
 Iku Iwasa: changed auth-source-pass-tests.el auth-source-pass.el
 
@@ -2504,7 +2507,7 @@ James TD Smith: changed org.el org-colview.el org-clock.el
   org-remember.el org-plot.el org-agenda.el org-compat.el org-habit.el
   org.texi
 
-James Thomas: changed quail/indian.el gnus-msg.el ind-util.el
+James Thomas: changed quail/indian.el gnus-msg.el ind-util.el nnmail.el
 
 James Troup: changed gnus-sum.el
 
@@ -2545,10 +2548,8 @@ Jan Seeger: changed ox-publish.el parse-time.el
 
 Jan Stranik: changed ebrowse.c
 
-Jan Synacek: changed emacs-lisp-intro.texi minibuffer.el mwheel.el
-  vc-git.el
-
-Jan Synáček: changed maintaining.texi project.el
+Jan Synáček: changed emacs-lisp-intro.texi maintaining.texi minibuffer.el
+  mwheel.el project.el vc-git.el
 
 Jan Tatarik: wrote gnus-icalendar-tests.el gnus-icalendar.el
 and changed gnus-score.el gnus-logic.el
@@ -2686,8 +2687,8 @@ and changed mml-sec.el gnus-util.el message.texi 
mml-smime.el mml1991.el
 Jens Petersen: wrote find-func.el
 and changed mule-cmds.el pcmpl-rpm.el
 
-Jens Schmidt: changed epa.texi plstore.el auth.texi comint.el gnus.texi
-  isearch.el ldap.el
+Jens Schmidt: changed plstore.el epa.texi auth.texi comint.el
+  elisp-mode.el epa-file.el epg.el gnus.texi isearch.el ldap.el
 
 Jens Toivo Berger Thielemann: changed word-help.el
 
@@ -2766,7 +2767,7 @@ Jim Porter: changed eshell.texi esh-cmd.el 
esh-var-tests.el
   esh-util.el eshell-tests-helpers.el em-pred.el esh-arg.el
   esh-cmd-tests.el tramp.el em-pred-tests.el em-dirs-tests.el server.el
   em-basic.el em-extpipe-tests.el esh-opt-tests.el esh-opt.el
-  and 90 other files
+  and 92 other files
 
 Jim Radford: changed gnus-start.el
 
@@ -2778,12 +2779,13 @@ Jim Wilson: changed alloca.c oldXMenu/Makefile.in
 
 Jin Choi: changed progmodes/python.el
 
-Jindrich Makovicka: changed eval.c fns.c
-
-Jindřich Makovička: changed pgtkfns.c pgtkselect.c pgtkterm.c
+Jindřich Makovička: changed eval.c fns.c pgtkfns.c pgtkselect.c
+  pgtkterm.c
 
 Jirka Kosek: changed mule.el
 
+J M: changed csharp-mode.el
+
 Joachim Nilsson: changed cc-styles.el
 
 Joachim Reiter: changed org-footnote.el
@@ -2920,7 +2922,7 @@ John Mastro: changed auth-source.el ibuffer.el w32heap.c
 
 John Mongan: changed progmodes/f90.el
 
-John Muhl: changed calculator.el
+John Muhl: changed calculator.el sqlite-mode.el
 
 John Paul Wallington: changed ibuffer.el ibuf-ext.el subr.el help-fns.el
   rmail.el files.el thumbs.el bindings.el fns.c xfns.c arc-mode.el
@@ -3044,7 +3046,7 @@ and changed xterm.c xfns.c keyboard.c screen.c dispnew.c 
xdisp.c window.c
 
 Joseph M. Kelsey: changed fileio.c skeleton.el
 
-Joseph Turner: changed package-vc.el
+Joseph Turner: changed package-vc.el subr.el
 
 Josh Elsasser: changed eglot.el README.md configure.ac
 
@@ -3125,8 +3127,8 @@ Juri Linkov: wrote compose.el emoji.el files-x.el 
misearch.el
   repeat-tests.el replace-tests.el tab-bar-tests.el tab-bar.el
   tab-line.el
 and changed isearch.el simple.el info.el replace.el dired.el dired-aux.el
-  progmodes/grep.el minibuffer.el window.el subr.el vc.el mouse.el
-  outline.el diff-mode.el repeat.el image-mode.el files.el menu-bar.el
+  progmodes/grep.el minibuffer.el window.el subr.el vc.el outline.el
+  mouse.el diff-mode.el repeat.el image-mode.el files.el menu-bar.el
   search.texi startup.el progmodes/compile.el and 473 other files
 
 Jussi Lahdenniemi: changed w32fns.c ms-w32.h msdos.texi w32.c w32.h
@@ -3387,8 +3389,6 @@ Kishore Kumar: changed terminal.el
 
 Kiso Katsuyuki: changed tab-line.el
 
-Kjartan Oli Agustsson: changed doc-view.el
-
 Kjartan Óli Ágústsson: changed doc-view.el
 
 Klaus Straubinger: changed url-http.el url-history.el pcmpl-rpm.el
@@ -3666,7 +3666,7 @@ Manuel Giraud: changed vc.el ox-html.el bookmark.el 
image-dired.el
   longlines.el ox-publish.el keyboard.c paragraphs.el simple.el
   basic.texi battery.el bookmark-tests.el cus-start.el dired.texi
   dispextern.h easymenu.el find-dired.el ibuf-ext.el ibuf-macs.el
-  idlwave.el image.c and 11 other files
+  idlwave.el image-mode.el and 12 other files
 
 Manuel Gómez: changed speedbar.el
 
@@ -3935,6 +3935,8 @@ Matthew Mundell: changed calendar.texi diary-lib.el 
files.texi
 
 Matthew Newton: changed imenu.el
 
+Matthew Tromp: changed ielm.el
+
 Matthew White: changed buffer.c bookmark-tests.el bookmark.el
   test-list.bmk
 
@@ -3988,7 +3990,7 @@ Mauro Aranda: changed wid-edit.el cus-edit.el custom.el 
wid-edit-tests.el
   widget.texi perl-mode.el custom-tests.el checkdoc-tests.el checkdoc.el
   cperl-mode-tests.el cus-edit-tests.el cus-theme.el customize.texi
   files.texi gnus.texi octave.el pong.el align.el auth-source.el
-  autorevert.el button.el and 45 other files
+  autorevert.el base.el and 56 other files
 
 Maxime Edouard Robert Froumentin: changed gnus-art.el mml.el
 
@@ -4011,8 +4013,8 @@ and co-wrote tramp-cache.el tramp-sh.el tramp.el
 and changed tramp.texi tramp-adb.el trampver.el trampver.texi dbusbind.c
   files.el ange-ftp.el files.texi file-notify-tests.el dbus.texi
   gitlab-ci.yml autorevert.el tramp-fish.el kqueue.c Dockerfile.emba
-  os.texi tramp-gw.el test/Makefile.in README shell.el files-x.el
-  and 308 other files
+  os.texi tramp-gw.el test/Makefile.in README shell.el files-tests.el
+  and 309 other files
 
 Michael Ben-Gershon: changed acorn.h configure.ac riscix1-1.h riscix1-2.h
   unexec.c
@@ -4453,6 +4455,8 @@ and changed rsz-mini.el emacs-buffer.gdb comint.el 
files.el Makefile
 
 Noah Lavine: changed tramp.el
 
+Noah Peart: changed treesit.el
+
 Noah Swainland: changed calc.el goto-addr.el misc.texi
 
 Noam Postavsky: changed progmodes/python.el lisp-mode.el bytecomp.el
@@ -4795,9 +4799,10 @@ Philipp Stephani: wrote callint-tests.el 
checkdoc-tests.el
   cl-preloaded-tests.el ediff-diff-tests.el eval-tests.el ido-tests.el
   lread-tests.el mouse-tests.el startup-tests.el xt-mouse-tests.el
 and changed emacs-module.c emacs-module-tests.el configure.ac json.c
-  process.c eval.c internals.texi json-tests.el process-tests.el alloc.c
-  emacs-module.h.in emacs.c lread.c nsterm.m pdumper.c bytecomp.el lisp.h
-  seccomp-filter.c callproc.c cl-macs.el gtkutil.c and 188 other files
+  process.c eval.c internals.texi json-tests.el process-tests.el
+  pdumper.c alloc.c emacs-module.h.in emacs.c lread.c nsterm.m
+  bytecomp.el lisp.h seccomp-filter.c callproc.c cl-macs.el gtkutil.c
+  and 188 other files
 
 Phillip Dixon: changed eglot.el
 
@@ -5092,7 +5097,7 @@ and changed configure.ac process.c blocks.awk keymap.el 
font.c
   network-stream-tests.el processes.texi custom.texi emoji-zwj.awk
   ftfont.c gtkutil.c process-tests.el unicode vc-git.el terminal.c
   char-fold.el gnutls.el keymaps.texi network-stream.el nsm.el nsterm.m
-  and 192 other files
+  and 193 other files
 
 Robert Thorpe: changed cus-start.el indent.el rmail.texi
 
@@ -5154,6 +5159,8 @@ Ross Donaldson: changed progmodes/python.el
 
 Ross Patterson: co-wrote org-protocol.el
 
+Ross Timson: changed eglot.el
+
 Roy Hashimoto: changed mm-view.el
 
 Roy Liu: changed ns-win.el
@@ -5324,6 +5331,8 @@ Sebastian Kremer: wrote dired-aux.el dired.el ls-lisp.el
 and co-wrote dired-x.el find-dired.el
 and changed add-log.el
 
+Sebastian Miele: changed strings.texi
+
 Sebastian Reuße: changed find-dired.el
 
 Sebastian Rose: co-wrote org-protocol.el
@@ -5515,10 +5524,10 @@ Stefan Kangas: wrote bookmark-tests.el 
cal-julian-tests.el
   studly-tests.el tabify-tests.el time-tests.el timezone-tests.el
   underline-tests.el uudecode-tests.el wallpaper.el warnings-tests.el
 and co-wrote help-tests.el keymap-tests.el
-and changed image-dired.el package.el efaq.texi cperl-mode.el subr.el
-  checkdoc.el help.el bookmark.el simple.el dired.el files.el dired-x.el
-  gnus.texi keymap.c image-mode.el erc.el ediff-util.el speedbar.el
-  browse-url.el bytecomp-tests.el bytecomp.el and 1657 other files
+and changed image-dired.el efaq.texi package.el cperl-mode.el help.el
+  subr.el checkdoc.el bookmark.el simple.el dired.el files.el gnus.texi
+  dired-x.el keymap.c image-mode.el erc.el ediff-util.el speedbar.el
+  woman.el browse-url.el bytecomp-tests.el and 1678 other files
 
 Stefan Merten: co-wrote rst.el
 
@@ -5571,7 +5580,7 @@ and co-wrote todo-mode.el
 and changed wdired.el todo-mode.texi wdired-tests.el diary-lib.el
   dired.el dired-tests.el doc-view.el files.el info.el minibuffer.el
   outline.el todo-test-1.todo allout.el eww.el find-dired.el frames.texi
-  hl-line.el menu-bar.el mouse.el otodo-mode.el subr.el
+  hl-line.el menu-bar.el mouse.el otodo-mode.el simple.el
   and 63 other files
 
 Stephen C. Gilardi: changed configure.ac
@@ -5781,7 +5790,7 @@ Thamer Mahmoud: changed arabic.el
 Theodore Jump: changed makefile.nt makefile.def w32-win.el w32faces.c
 
 Theodor Thornhill: changed typescript-ts-mode.el java-ts-mode.el
-  c-ts-mode.el eglot.el js.el csharp-mode.el css-mode.el project.el
+  c-ts-mode.el eglot.el csharp-mode.el js.el css-mode.el project.el
   json-ts-mode.el treesit.el c-ts-common.el eglot-tests.el EGLOT-NEWS
   README.md c-ts-mode-tests.el compile-tests.el go-ts-mode.el
   indent-bsd.erts indent.erts maintaining.texi mwheel.el
@@ -5833,6 +5842,8 @@ and changed soap-inspect.el eudc.el eudc-vars.el 
eudc.texi ldap.el
   README authinfo bbdb diary-lib.el display.texi eudc-capf.el
   and 8 other files
 
+Thomas Hilke: changed sqlite-mode.el
+
 Thomas Horsley: changed cxux-crt0.s cxux.h cxux7.h emacs.c nh3000.h
   nh4000.h simple.el sysdep.c xterm.c
 
@@ -6075,8 +6086,8 @@ Ulrich Leodolter: changed w32proc.c
 Ulrich Müller: changed configure.ac calc-units.el
   emacsclient-mail.desktop lib-src/Makefile.in src/Makefile.in version.el
   Makefile.in doctor.el emacs.1 files.el gamegrid.el gud.el server.el
-  ChgPane.c ChgSel.c HELLO INSTALL XMakeAssoc.c authors.el bytecomp.el
-  case-table.el and 44 other files
+  ChgPane.c ChgSel.c HELLO INSTALL XMakeAssoc.c authors.el bindings.el
+  bytecomp.el and 45 other files
 
 Ulrich Neumerkel: changed xterm.c
 
@@ -6151,7 +6162,8 @@ Vincent Bernat: changed gnus-int.el nnimap.el xsettings.c
 
 Vincent Del Vecchio: changed info.el mh-utils.el
 
-Vincenzo Pupillo: changed js.el typescript-ts-mode.el java-ts-mode.el
+Vincenzo Pupillo: changed cmake-ts-mode.el js.el typescript-ts-mode.el
+  java-ts-mode.el
 
 Vince Salvino: changed msdos.texi w32.c w32fns.c
 
diff --git a/etc/CALC-NEWS b/etc/CALC-NEWS
index 8fd5365011f..a466a9db40b 100644
--- a/etc/CALC-NEWS
+++ b/etc/CALC-NEWS
@@ -856,7 +856,7 @@ For changes in Emacs 23.1 and later, see the main Emacs 
NEWS file.
 
 ** Fixed obsolete trail tags gsmp, gneg, ginv to jsmp, jneg, jinv.
 
-** Fixed some errors and made improvements in units table [Ulrich Mueller].
+** Fixed some errors and made improvements in units table [Ulrich Müller].
 
 
 * Version 1.07:
diff --git a/etc/ChangeLog.1 b/etc/ChangeLog.1
index 68c15fc6e69..f7786775e50 100644
--- a/etc/ChangeLog.1
+++ b/etc/ChangeLog.1
@@ -1778,7 +1778,7 @@
 
        * refcards/orgcard.tex: Cleanup.
 
-2010-11-27  Ulrich Mueller  <ulm@gentoo.org>
+2010-11-27  Ulrich Müller  <ulm@gentoo.org>
 
        * HELLO: Add ancient Greek (Bug#7418).
 
@@ -2497,7 +2497,7 @@
 
        * NEWS: New function `locate-user-emacs-file'.
 
-2008-10-18  Ulrich Mueller  <ulm@gentoo.org>
+2008-10-18  Ulrich Müller  <ulm@gentoo.org>
 
        * MACHINES: Add section for SuperH.
 
@@ -2914,7 +2914,7 @@
        emacs48_mac.png, emacs256_mac.png, and emacs512_mac.png,
        respectively.
 
-2007-12-08  Ulrich Mueller  <ulm@gentoo.org>  (tiny change)
+2007-12-08  Ulrich Müller  <ulm@gentoo.org>  (tiny change)
 
        * emacs.desktop (Exec, Icon, Categories): Fix entries.
 
diff --git a/etc/EGLOT-NEWS b/etc/EGLOT-NEWS
index f5f78ccd483..2f54dc43cbf 100644
--- a/etc/EGLOT-NEWS
+++ b/etc/EGLOT-NEWS
@@ -43,6 +43,12 @@ For 'newline' commands, Eglot sometimes sent the wrong 
character code
 to the server.  Also made this feature less chatty in the mode-line
 and messages buffer.
 
+** Fixed completion sorting
+
+In some situations, Eglot was not respecting the completion sort order
+decided by the language server, falling back on the sort order
+determined by the 'flex' completion style instead.  See github#1306.
+
 ** Improve mouse invocation of code actions
 
 When invoking code actions by middle clicking with the mouse on
diff --git a/etc/ERC-NEWS b/etc/ERC-NEWS
index fadd97b65df..41ab9cc4c5e 100644
--- a/etc/ERC-NEWS
+++ b/etc/ERC-NEWS
@@ -149,7 +149,7 @@ minor-mode maps, and new third-party modules should do the 
same.
 
 ** Option 'erc-timestamp-format-right' deprecated.
 Having to account for this option prevented other ERC modules from
-easily determining what right-hand stamps would look like before
+easily determining what right-sided stamps would look like before
 insertion, which is knowledge needed for certain UI decisions.  The
 way ERC has chosen to address this is imperfect and boils down to
 asking users who've customized this option to switch to
@@ -178,14 +178,13 @@ been restored with a slightly revised role contingent on 
a few
 assumptions explained in its doc string.  For clarity, it has been
 renamed 'erc-ensure-target-buffer-on-privmsg'.
 
-** Module 'scrolltobottom' can attempt to be more aggressive.
-Enabling the experimental option 'erc-scrolltobottom-all' tells
-'scrolltobottom' to be more vigilant about staking down the input area
-and to do so in all ERC windows.  The dependent option
-'erc-scrolltobottom-relaxed', also experimental, makes ERC's prompt
-stationary wherever it happens to reside instead of forcing it to the
-bottom of a window.  That is, new input appears above the prompt,
-scrolling existing messages upward to compensate.
+** Module 'scrolltobottom' now optionally more aggressive.
+Enabling the experimental option 'erc-scrolltobottom-all' makes ERC
+more vigilant about staking down the input area in all ERC windows.
+And the option's 'relaxed' variant makes ERC's prompt stationary
+wherever it happens to reside instead of forcing it to the bottom of a
+window, meaning new input appears above the prompt, scrolling existing
+messages upward to compensate.
 
 ** Subtle changes in two fundamental faces.
 Users of the default theme may notice that 'erc-action-face' and
@@ -221,6 +220,14 @@ atop any message.  The new companion option 
'erc-echo-timestamp-zone'
 determines the default timezone when not specified with a prefix
 argument.
 
+** Option 'erc-remove-parsed-property' deprecated.
+This option's nil behavior serves no practical purpose yet has the
+potential to degrade the user experience by competing for space with
+forthcoming features powered by next generation extensions.  Anyone
+with a legitimate use for this option likely also possesses the
+knowledge to rig up a suitable analog with minimal effort.  That said,
+the road to removal is long.
+
 ** Option 'erc-warn-about-blank-lines' is more informative.
 Enabled by default, this option now produces more useful feedback
 whenever ERC rejects prompt input containing whitespace-only lines.
@@ -269,25 +276,49 @@ essential members of important hooks.
 Luckily, ERC now leverages a feature introduced in Emacs 27, "hook
 depth," to secure the positions of a few key members of
 'erc-insert-modify-hook' and 'erc-send-modify-hook'.  So far, this
-includes the functions 'erc-button-add-buttons', 'erc-fill',
-'erc-match-message', and 'erc-add-timestamp', which now appear in that
-order, when present, at depths beginning at 20 and ending below 80.
-Of most interest to module authors is the new relative positioning of
-the first two, 'erc-button-add-buttons' and 'erc-fill', which have
-been swapped with respect to their previous places in recent ERC
-versions.
+includes the functions 'erc-button-add-buttons', 'erc-match-message',
+'erc-fill', and 'erc-add-timestamp', which now appear in that order,
+when present, at depths beginning at 20 and ending below 80.  Of most
+interest to module authors is the new relative positioning of the
+first three, which have been rotated leftward with respect to their
+previous places in recent ERC versions (fill, button, match ,stamp).
 
 ERC also provisionally reserves the same depth interval for
 'erc-insert-pre-hook' and possibly other, similar hooks, but will
 continue to modify non-ERC hooks locally whenever possible, especially
 in new code.
 
+*** A singular entry point for inserting messages.
+Displaying "local" messages, like help text and interactive-command
+feedback, in ERC buffers has never been straightforward.  As such,
+ancient patterns, like the pairing of preformatted "notice" text with
+ERC's oldest insertion function, 'erc-display-line', still appear
+quite frequently in the wild despite having been largely phased out of
+ERC's own code base in 2002.  That this example has endured makes some
+sense because it's probably seen as less cumbersome than fiddling with
+the more powerful and complicated 'erc-display-message'.
+
+The latest twist in this saga comes with this release, in which a
+healthy bit of "pre-insertion" business has taken up residence in
+'erc-display-message'.  While this would seem to put antiquated
+patterns, like the above mentioned 'erc-make-notice' combo, at risk of
+having messages ignored or subject to degraded treatment by built-in
+modules, an adaptive measure has been introduced that recasts
+'erc-display-line' as a thin wrapper around 'erc-display-message'.
+And though nothing of the sort has been done for the lower-level
+'erc-display-line-1' (now an obsolete alias for 'erc-insert-line'),
+some last-ditch fallback code is in place to ensure baseline
+functionality.  As always, if you find these developments disturbing,
+please say so on the tracker.
+
 *** ERC now manages timestamp-related properties a bit differently.
-For starters, the 'cursor-sensor-functions' property no longer
+For starters, the 'cursor-sensor-functions' text property is absent by
+default unless the option 'erc-echo-timestamps' is already enabled on
+module init.  And when present, the property's value no longer
 contains unique closures and thus no longer proves effective for
-traversing messages.  To compensate, a new property, 'erc-timestamp',
-now spans message bodies but not the newlines delimiting them.  Also
-affecting the 'stamp' module is the deprecation of the function
+traversing inserted messages.  For now, ERC only provides an internal
+means of visiting messages, but a public interface is forthcoming.
+Also affecting the 'stamp' module is the deprecation of the function
 'erc-insert-aligned' and its removal from client code.  Additionally,
 the module now merges its 'invisible' property with existing ones and
 includes all white space around stamps when doing so.
@@ -302,6 +333,23 @@ folded onto the next line.  Such inconsistency made stamp 
detection
 overly complex and produced uneven results when toggling stamp
 visibility.
 
+*** Date stamps are independent messages.
+ERC now inserts "date stamps" generated from the option
+'erc-timestamp-format-left' as separate, standalone messages.  (This
+only matters if 'erc-insert-timestamp-function' is set to its default
+value of 'erc-insert-timestamp-left-and-right'.)  ERC's near-term UI
+goals require exposing these stamps to existing code designed to
+operate on complete messages.  For example, users likely expect date
+stamps to be togglable with 'erc-toggle-timestamps' while also being
+immune to hiding from commands like 'erc-match-toggle-hidden-fools'.
+Before this change, meeting such expectations demanded brittle
+heuristics that checked for the presence of these stamps in the
+leading portion of message bodies as well as special casing to act on
+these areas without inflicting collateral damage.  It may also be
+worth noting that as consequence of these changes, the internally
+managed variable 'erc-timestamp-last-inserted-left' no longer records
+the final trailing newline in 'erc-timestamp-format-left'.
+
 *** The role of a module's Custom group is now more clearly defined.
 Associating built-in modules with Custom groups and provided library
 features has improved.  More specifically, a module's group now enjoys
@@ -377,6 +425,24 @@ use of 'insert-before-markers' instead of 'insert'.  As 
always, users
 feeling unduly inconvenienced by these changes are encouraged to voice
 their concerns on the bug list.
 
+*** Introducing new ways to detect ERC buffer types.
+The old standby 'erc-default-target' has served ERC well for over two
+decades.  But a lesser known gotcha affecting its use has always
+haunted an unlucky few, that is, the function has always returned
+non-nil in "unjoined" channel buffers (those that the client has
+parted with or been kicked from).  While perhaps not itself a major
+footgun, recessive pitfalls rooted in this subtlety continue to affect
+dependent functions, like 'erc-get-buffer'.
+
+To discourage misuse of 'erc-default-target', ERC 5.6 offers an
+alternative in the function 'erc-target', which is identical to the
+former except for its disregard for "joinedness."  As a related bonus,
+the dependent function 'erc-server-buffer-p' is being rebranded as
+'erc-server-or-unjoined-channel-buffer-p'.  Unfortunately, this
+release lacks a similar solution for detecting "joinedness" directly,
+but users can turn to 'xor'-ing 'erc-default-target' and 'erc-target'
+as a makeshift kludge.
+
 *** Miscellaneous changes
 Two helper macros from GNU ELPA's Compat library are now available to
 third-party modules as 'erc-compat-call' and 'erc-compat-function'.
diff --git a/etc/NEWS b/etc/NEWS
index b3c7d3a8693..f8d4a3c3efe 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -62,6 +62,19 @@ more details.
 
 ** Emacs now supports Unicode Standard version 15.1.
 
++++
+** The Network Security Manager now warns about 3DES by default.
+This cypher is no longer recommended owing to a major vulnerability
+disclosed in 2016, and its small 112 bit key size.  Emacs now warns
+about its use also when 'network-security-level' is set to 'medium'
+(the default).  See 'network-security-protocol-checks'.
+
+---
+** The Network Security Manager now warns about <2048 bits in DH key exchange.
+Emacs used to warn for Diffie-Hellman key exchanges with prime numbers
+smaller than 1024 bits.  Since more servers now support it, this
+number has been bumped to 2048 bits.
+
 ** Help
 
 *** 'describe-function' shows function inferred type when available.
@@ -135,6 +148,27 @@ window systems other than Nextstep.
 When this minor mode is enabled, buttons representing modifier keys
 are displayed along the tool bar.
 
++++
+** 'd' in the mode line now indicates that the window is dedicated.
+Windows have always been able to be dedicated to a specific buffer;
+see 'window-dedicated-p'.  Now the mode line indicates the dedicated
+status of a window, with 'd' appearing in the mode line if a window is
+dedicated and 'D' if the window is strongly dedicated.  This indicator
+appears before the buffer name, and after the buffer modification and
+remote buffer indicators (usually "---" together).
+
++++
+** New command 'toggle-window-dedicated'.
+This makes it easy to interactively mark a specific window as
+dedicated, so it won't be reused by 'display-buffer'.  This can be
+useful for complicated window setups.  It is bound to 'C-x w d'
+globally.
+
+** cl-print
+*** You can expand the "..." truncation everywhere.
+The code that allowed "..." to be expanded in the *Backtrace* should
+now work anywhere the data is generated by `cl-print`.
+
 ---
 ** New user option 'uniquify-dirname-transform'.
 This can be used to customize how buffer names are uniquified, by
@@ -144,26 +178,37 @@ can use this to distinguish between buffers visiting 
files with the
 same base name that belong to different projects by using the provided
 transform function 'project-uniquify-dirname-transform'.
 
-** 'insert-directory-program' is now a defcustom.
-
-** 'insert-directory-program' prefers "gls" on *BSD and macOS.
+** 'insert-directory-program' is now a user option.
 On *BSD and macOS systems, this user option now defaults to the "gls"
 executable, if it exists.  This should remove the need to change its
 value when installing GNU coreutils using something like ports or
 Homebrew.
 
++++
 ** cl-print
 
++++
 *** You can expand the "..." truncation everywhere.
 The code that allowed "..." to be expanded in the "*Backtrace*" buffer
 should now work anywhere the data is generated by 'cl-print'.
 
++++
 *** The 'backtrace-ellipsis' button is replaced by 'cl-print-ellipsis'.
 
++++
 *** hash-tables' contents can be expanded via the ellipsis.
 
++++
 *** Modes can control the expansion via 'cl-print-expand-ellipsis-function'.
 
++++
+*** There is a new setting 'raw' for 'cl-print-compiled' which causes
+byte-compiled functions to be printed in full by 'prin1'.  A button on
+this output can be activated to disassemble the function.
+
++++
+*** There is a new chapter in the CL manual documenting cl-print.el.
+
 ** Modeline elements can now be right-aligned.
 Anything following the symbol 'mode-line-format-right-align' in
 'mode-line-format' will be right-aligned.  Exactly where it is
@@ -176,6 +221,11 @@ right-aligned to is controlled by the new user option
 It can be used to add, remove and reorder functions that change
 the appearance of every tab on the tab bar.
 
++++
+** New optional argument for modifying directory local variables
+The commands 'add-dir-local-variable', 'delete-dir-local-variable' and
+'copy-file-locals-to-dir-locals' now take an optional prefix argument,
+to enter the file you want to modify.
 ** Miscellaneous
 
 ---
@@ -186,6 +236,12 @@ displayed on the mode line when 'appt-display-mode-line' 
is non-nil.
 
 * Editing Changes in Emacs 30.1
 
++++
+** New user option 'gud-highlight-current-line'.
+When enabled, Gud will visually emphasize the line being executed upon
+pauses in the debugee's execution, such as those occasioned by
+breakpoints being hit.
+
 ---
 ** New global minor mode 'kill-ring-deindent-mode'.
 When enabled, text being saved to the kill ring will be de-indented by
@@ -266,7 +322,17 @@ functions in CJK locales.
 
 * Changes in Specialized Modes and Packages in Emacs 30.1
 
++++
+** New command 'lldb'.
+Run the LLDB debugger, analogous to the 'gud-gdb' command.  Note that
+you might want to add these settings to your .lldbinit file, to reduce
+the output in the LLDB output when stepping through source files.
+
+    settings set stop-line-count-before 0
+    settings set stop-line-count-after 0
+
 ** gdb-mi
+
 ---
 *** Variable order and truncation can now be configured in 'gdb-many-windows'.
 The new user option 'gdb-locals-table-row-config' allows users to
@@ -285,7 +351,7 @@ If you want to get back the old behavior, set the user 
option to the value
 
 ---
 *** New user option 'gdb-display-io-buffer'.
-If this is nil, "M-x gdb" will neither create nor display a separate
+If this is nil, 'M-x gdb' will neither create nor display a separate
 buffer for the I/O of the program being debugged, but will instead
 redirect the program's interaction to the GDB execution buffer.  The
 default is t, to preserve previous behavior.
@@ -299,6 +365,14 @@ equivalent to the "--heading" option of some tools such as 
'git grep'
 and 'rg'.  The headings are displayed using the new 'grep-heading'
 face.
 
+** Compilation mode
+
+---
+*** The 'omake' matching rule is now disabled by default.
+This is because it partly acts by modifying other rules which may
+occasionally be surprising.  It can be re-enabled by adding 'omake' to
+'compilation-error-regexp-alist'.
+
 ** VC
 
 ---
@@ -307,6 +381,10 @@ This is a string or a list of strings that specifies the 
Git log
 switches for shortlogs, such as the one produced by 'C-x v L'.
 'vc-git-log-switches' is no longer used for shortlogs.
 
+---
+*** Obsolete command 'vc-switch-backend' re-added as 'vc-change-backend'.
+The command was previously obsoleted and unbound in Emacs 28.
+
 ** Diff Mode
 
 +++
@@ -373,6 +451,14 @@ appropriate, but still allow piping the output elsewhere 
if desired.
 For more information, see the "(eshell) Built-ins" node in the Eshell
 manual.
 
++++
+*** New special reference type '#<marker POSITION BUFFER>'.
+This special reference type returns a marker at 'POSITION' in
+'BUFFER'.  You can insert it by typing or using the new interactive
+command 'eshell-insert-marker'.  You can also insert markers of any
+type with the new command 'eshell-insert-special-reference'.  See the
+"(eshell) Arguments" node in the Eshell manual for more details.
+
 +++
 *** New splice operator for Eshell dollar expansions.
 Dollar expansions in Eshell now let you splice the elements of the
@@ -447,6 +533,10 @@ When this option is non-nil, remote file names are not 
completed by
 Pcomplete.  Packages, like 'shell-mode', could set this in order to
 suppress remote file name completion at all.
 
+---
+*** Completion for the 'doas' command has been added.
+Command completion for 'doas' in Eshell and Shell mode will now work.
+
 ** Shell Mode
 
 +++
@@ -536,6 +626,11 @@ buffer must either visit a file, or it must run 
'dired-mode'.  Another
 method but "sudo" can be configured with user option
 'tramp-file-name-with-method'.
 
+** File Notifications
+
++++
+*** All backends except w32notify detect unmounting of a watched filesystem 
now.
+
 ** EWW
 
 +++
@@ -679,6 +774,13 @@ interactive Python interpreter specified by 
'python-interpreter'.
 *** New ':vc' keyword.
 This keyword enables the user to install packages using 'package-vc'.
 
+** Gnus
+
+*** The 'nnweb-type' option 'gmane' has been removed.
+The gmane.org website is, sadly, down since a number of years with no
+prospect of it coming back.  Therefore, it is no longer valid to set
+the user option 'nnweb-type' to the 'gmane'.
+
 ** Rmail
 
 ---
@@ -761,6 +863,13 @@ which makes them visually distinct from subroutine 
prototypes.
 CPerl mode supports the new keywords for exception handling and the
 object oriented syntax which were added in Perl 5.36 and 5.38.
 
+*** New user option 'cperl-fontify-trailer'.
+This user option takes the values "perl-code" or "comment" and treats
+text after an "__END__" or "__DATA__" token accordingly.  The default
+value of "perl-code" is useful for trailing POD and for AutoSplit
+modules, the value "comment" makes cperl-mode treat trailers as
+comment, like perl-mode does.
+
 ** Emacs Sessions (Desktop)
 
 +++
@@ -797,19 +906,12 @@ You can now configure how a thumbnail is named using this 
option.
 
 ** ERT
 
-*** New macro `skip-when' to skip 'ert-deftest' tests.
++++
+*** New macro 'skip-when' to skip 'ert-deftest' tests.
 This can help avoid some awkward skip conditions.  For example
 '(skip-unless (not noninteractive))' can be changed to the easier
 to read '(skip-when noninteractive)'.
 
-** Checkdoc
-
----
-*** New checkdock warning if not using lexical-binding.
-Checkdoc now warns if the first line of an Emacs Lisp file does not
-end with a "-*- lexical-binding: t -*-" cookie.  Customize the user
-option 'checkdoc-lexical-binding-flag' to nil to disable this warning.
-
 ** URL
 
 +++
@@ -819,20 +921,36 @@ neither of which have been supported by Emacs since 
version 23.1.
 The user option 'url-gateway-nslookup-program' and the function
 'url-gateway-nslookup-host' are consequently also obsolete.
 
+** socks
+
 +++
+*** SOCKS supports version 4a.
+The 'socks-server' option accepts '4a' as a value for its version
+field.
+
 ** Edmacro
 
++++
 *** New command 'edmacro-set-macro-to-region-lines'.
 Bound to 'C-c C-r', this command replaces the macro text with the
 lines of the region.  If needed, the region is extended to include
 whole lines.  If the region ends at the beginning of a line, that last
 line is excluded.
 
++++
 *** New user option 'edmacro-reverse-macro-lines'.
 When this is non-nil, the lines of key sequences are displayed with
-the most recent line fist.  This is can be useful when working with
+the most recent line first.  This is can be useful when working with
 macros with many lines, such as from 'kmacro-edit-lossage'.
 
+** Miscellaneous
+
+---
+*** Webjump now assumes URIs are HTTPS instead of HTTP.
+For links in 'webjump-sites' without an explicit URI scheme, it was
+previously assumed that they should be prefixed with "http://";.  Such
+URIs are now prefixed with "https://"; instead.
+
 
 * New Modes and Packages in Emacs 30.1
 
@@ -849,8 +967,11 @@ A major mode based on the tree-sitter library for editing 
HEEx files.
 
 ---
 *** New major mode 'elixir-ts-mode'.
-A major mode based on the tree-sitter library for editing Elixir
-files.
+A major mode based on the tree-sitter library for editing Elixir files.
+
+---
+*** New major mode 'lua-ts-mode'.
+A major mode based on the tree-sitter library for editing Lua files.
 
 +++
 ** New global minor mode 'minibuffer-regexp-mode'.
@@ -859,10 +980,6 @@ It highlights parens via ‘show-paren-mode’ and 
‘blink-matching-paren’ in
 a user-friendly way, avoids reporting alleged paren mismatches and makes
 sexp navigation more intuitive.
 
----
-*** New major mode 'lua-ts-mode'.
-A major mode based on the tree-sitter library for editing Lua files.
-
 ---
 ** The highly accessible Modus themes collection has eight items.
 The 'modus-operandi' and 'modus-vivendi' are the main themes that have
@@ -877,6 +994,12 @@ showcases all their customization options.
 
 ** Project
 
++++
+*** New user option 'project-mode-line'.
+When non-nil, display the name of the current project on the mode
+line.  Clicking 'mouse-1' on the project name pops up the project
+menu.  The default value is nil.
+
 *** New user option 'project-file-history-behavior'.
 Customizing it to 'relativize' makes commands like 'project-find-file'
 and 'project-find-dir' display previous history entries relative to
@@ -896,7 +1019,14 @@ the file listing's performance is still optimized.
 
 * Incompatible Lisp Changes in Emacs 30.1
 
-** 'post-gc-hook' runs after updating 'gcs-done' and `'gcs-elapsed'.
+** `buffer-match-p and `match-buffers` take `&rest args`
+They used to take a single `&optional arg` and were documented to use
+an unreliable hack to try and support condition predicates that
+don't accept this optional arg.
+The new semantics makes no such accommodation, but the code still
+supports it (with a warning) for backward compatibility.
+
+** 'post-gc-hook' runs after updating 'gcs-done' and 'gcs-elapsed'.
 
 ---
 ** The escape sequence '\x' not followed by hex digits is now an error.
@@ -973,10 +1103,20 @@ The compatibility aliases 'x-defined-colors', 
'x-color-defined-p',
 ** 'easy-mmode-define-{minor,global}-mode' aliases are now obsolete.
 Use 'define-minor-mode' and 'define-globalized-minor-mode' instead.
 
+** The obsolete calling convention of 'sit-for' has been removed.
+That convention was: (sit-for SECONDS MILLISEC &optional NODISP)
+
+** The 'millisec' argument of 'sleep-for' has been declared obsolete.
+Use a float value for the first argument instead.
+
+** 'eshell-process-wait-{seconds,milliseconds}' options are now obsolete.
+Instead, use 'eshell-process-wait-time', which supports floating-point
+values.
+
 
 * Lisp Changes in Emacs 30.1
 
-** New function 're--describe-compiled' to see the innards of a regexp.
+** New function 're-disassemble' to see the innards of a regexp.
 If you compiled with '--enable-checking', you can use this to help debug
 either your regexp performance problems or the regexp engine.
 
@@ -1097,6 +1237,30 @@ sexp-related motion commands.
 
 ** New or changed byte-compilation warnings
 
+---
+*** Warn about missing 'lexical-binding' directive.
+The compiler now warns if an Elisp file lacks the standard
+'-*- lexical-binding: ... -*-' cookie on the first line.
+This line typically looks something like
+
+    ;;; My little pony mode  -*- lexical-binding: t -*-
+
+It is needed to inform the compiler about which dialect of ELisp
+your code is using: the modern dialect with lexical binding or
+the old dialect with only dynamic binding.
+
+Lexical binding avoids some name conflicts and allows the compiler to
+detect more mistakes and generate more efficient code, so it is
+recommended.  For how to adapt your code to lexical binding, see the
+manual section "(elisp) Converting to Lexical Binding".
+
+If your code cannot be converted to lexical binding, you can insert
+the line
+
+    ;;; -*- lexical-binding: nil -*-
+
+first in the file to declare that it uses the old dialect.
+
 ---
 *** Warn about empty bodies for more special forms and macros.
 The compiler now warns about an empty body argument to 'when',
@@ -1224,6 +1388,10 @@ name 'ignored-return-value'.
 The warning will only be issued for calls to functions declared
 'important-return-value' or 'side-effect-free' (but not 'error-free').
 
+---
+*** The warning about wide docstrings can now be disabled separately.
+Its warning name is 'docstrings-wide'.
+
 +++
 ** New function declaration and property 'important-return-value'.
 The declaration '(important-return-value t)' sets the
@@ -1251,6 +1419,16 @@ Since circular alias chains now cannot occur, 
'function-alias-p',
 'indirect-function' and 'indirect-variable' will never signal an error.
 Their 'noerror' arguments have no effect and are therefore obsolete.
 
++++
+** 'treesit-font-lock-rules' now accepts additional global keywords.
+When supplied with ':default-language LANGUAGE', rules after it will
+default to use 'LANGUAGE'.
+
+---
+** New optional argument to 'modify-dir-local-variable'
+A 5th argument, optional, has been added to
+'modify-dir-local-variable'.  It can be used to specify which
+dir-locals file to modify.
 
 * Changes in Emacs 30.1 on Non-Free Operating Systems
 
diff --git a/etc/emacs_lldb.py b/etc/emacs_lldb.py
index 609815613bf..fa8d95d7b5b 100644
--- a/etc/emacs_lldb.py
+++ b/etc/emacs_lldb.py
@@ -78,22 +78,22 @@ class Lisp_Object:
 
     # Object construction/initialization.
     def __init__(self, lisp_obj):
-        self.lisp_obj = lisp_obj
-        self.frame = lisp_obj.GetFrame()
+        self.tagged = lisp_obj
+        self.unsigned = None
         self.lisp_type = None
         self.pvec_type = None
-        self.value = None
+        self.untagged = None
         self.init_unsigned()
         self.init_lisp_types()
         self.init_values()
 
     def init_unsigned(self):
-        if self.lisp_obj.GetNumChildren() != 0:
+        if self.tagged.GetType().GetTypeClass() == lldb.eTypeClassStruct:
             # Lisp_Object is actually a struct.
-            lisp_word = self.lisp_obj.GetValueForExpressionPath(".i")
+            lisp_word = self.tagged.GetValueForExpressionPath(".i")
             self.unsigned = lisp_word.GetValueAsUnsigned()
         else:
-            self.unsigned = self.lisp_obj.GetValueAsUnsigned()
+            self.unsigned = self.tagged.GetValueAsUnsigned()
 
     # Initialize self.lisp_type to the C Lisp_Type enumerator of the
     # Lisp_Object, as a string.  Initialize self.pvec_type likewise to
@@ -117,59 +117,64 @@ class Lisp_Object:
                     f">> More_Lisp_Bits::PSEUDOVECTOR_AREA_BITS)")
                 self.pvec_type = enumerator_name(typ)
 
-    # Initialize self.value according to lisp_type and pvec_type.
+    # Initialize self.untagged according to lisp_type and pvec_type.
     def init_values(self):
         if self.lisp_type == "Lisp_Symbol":
             offset = self.get_lisp_pointer("char").GetValueAsUnsigned()
-            self.value = self.eval(f"(struct Lisp_Symbol *)"
-                                   f" ((char *) &lispsym + {offset})")
+            self.untagged = self.eval(f"(struct Lisp_Symbol *)"
+                                   f" ((char *) &lispsym + {offset})",
+                                   True)
         elif self.lisp_type == "Lisp_String":
-            self.value = self.get_lisp_pointer("struct Lisp_String")
+            self.untagged = self.get_lisp_pointer("struct Lisp_String", True)
         elif self.lisp_type == "Lisp_Vectorlike":
             c_type = Lisp_Object.pvec2type[self.pvec_type]
-            self.value = self.get_lisp_pointer(c_type)
+            self.untagged = self.get_lisp_pointer(c_type, True)
         elif self.lisp_type == "Lisp_Cons":
-            self.value = self.get_lisp_pointer("struct Lisp_Cons")
+            self.untagged = self.get_lisp_pointer("struct Lisp_Cons", True)
         elif self.lisp_type == "Lisp_Float":
-            self.value = self.get_lisp_pointer("struct Lisp_Float")
+            self.untagged = self.get_lisp_pointer("struct Lisp_Float", True)
         elif self.lisp_type in ("Lisp_Int0", "Lisp_Int1"):
-            self.value = self.eval(f"((EMACS_INT) {self.unsigned}) "
-                                   f">> (GCTYPEBITS - 1)")
+            self.untagged = self.eval(f"((EMACS_INT) {self.unsigned}) "
+                                      f">> (GCTYPEBITS - 1)", True)
+        elif self.lisp_type == "Lisp_Type_Unused0":
+            self.untagged = self.unsigned
         else:
-            assert False, "Unknown Lisp type"
-
-    # Create an SBValue for EXPR with name NAME.
-    def create_value(self, name, expr):
-        return self.lisp_obj.CreateValueFromExpression(name, expr)
+            assert False, f"Unknown Lisp type {self.lisp_type}"
 
     # Evaluate EXPR in the context of the current frame.
-    def eval(self, expr):
-        return self.frame.EvaluateExpression(expr)
+    def eval(self, expr, make_var=False):
+        frame = self.tagged.GetFrame()
+        if make_var:
+            return frame.EvaluateExpression(expr)
+        options = lldb.SBExpressionOptions()
+        options.SetSuppressPersistentResult(True)
+        return frame.EvaluateExpression(expr, options)
 
     # Return an SBValue for this object denoting a pointer of type
     # TYP*.
-    def get_lisp_pointer(self, typ):
+    def get_lisp_pointer(self, typ, make_var=False):
         return self.eval(f"({typ}*) (((EMACS_INT) "
-                         f"{self.unsigned}) & VALMASK)")
+                         f"{self.unsigned}) & VALMASK)",
+                         make_var)
 
     # If this is a Lisp_String, return an SBValue for its string data.
     # Return None otherwise.
     def get_string_data(self):
         if self.lisp_type == "Lisp_String":
-            return self.value.GetValueForExpressionPath("->u.s.data")
+            return self.untagged.GetValueForExpressionPath("->u.s.data")
         return None
 
     # if this is a Lisp_Symbol, return an SBBalue for its name.
     # Return None otherwise.
     def get_symbol_name(self):
         if self.lisp_type == "Lisp_Symbol":
-            name = self.value.GetValueForExpressionPath("->u.s.name")
+            name = self.untagged.GetValueForExpressionPath("->u.s.name")
             return Lisp_Object(name).get_string_data()
         return None
 
     # Return a summary string for this object.
     def summary(self):
-        return str(self.value)
+        return str(self.untagged)
 
 
 ########################################################################
@@ -206,6 +211,50 @@ def xdebug_print(debugger, command, result, internal_dict):
 def type_summary_Lisp_Object(obj, internal_dict):
     return Lisp_Object(obj).summary()
 
+class Lisp_Object_Provider:
+    """Synthetic children provider for Lisp_Objects.
+    Supposedly only used by 'frame variable', where -P <n> can be used
+    to specify a printing depth. """
+    def __init__(self, valobj, internal_dict):
+        self.valobj = valobj
+        self.children = {}
+
+    def update(self):
+        lisp_obj = Lisp_Object(self.valobj)
+        lisp_type = lisp_obj.lisp_type
+        try:
+            if lisp_type == "Lisp_Symbol":
+                child = lisp_obj.get_symbol_name()
+                self.children["name"] = child
+            elif lisp_type == "Lisp_String":
+                child = lisp_obj.get_string_data()
+                self.children["data"] = child
+            elif lisp_type == "Lisp_Cons":
+                car = lisp_obj.untagged.GetValueForExpressionPath("->u.s.car")
+                cdr = 
lisp_obj.untagged.GetValueForExpressionPath("->u.s.u.cdr")
+                self.children["car"] = car
+                self.children["cdr"] = cdr
+            else:
+                self.children["untagged"] = lisp_obj.untagged
+        except:
+            print(f"*** exception in child provider update for {lisp_type}")
+            pass
+
+    def num_children(self):
+        return len(self.children)
+
+    def get_child_index(self, name):
+        index = 0
+        for child_name, child in self.children:
+            if child_name == name:
+                return index
+            index = index + 1
+        return -1
+
+    def get_child_at_index(self, index):
+        key = list(self.children)[index]
+        return self.children[key]
+
 
 ########################################################################
 #                           Initialization
@@ -239,6 +288,17 @@ def define_type_summary(debugger, regex, function):
                            f"--python-function {python_function} "
                            + regex)
 
+# Define Python class CLS as a children provider for the types
+# matching REFEXP.  Providers are defined in the category Emacs, and
+# can be seen with 'type synthetic list -w Emacs', and deleted in a
+# similar way.
+def define_type_synthetic(debugger, regex, cls):
+    python_class = __name__ + "." + cls.__name__
+    debugger.HandleCommand(f"type synthetic add "
+                           f"--category Emacs "
+                           f"--python-class {python_class} "
+                           + regex)
+
 # Enable a given category of type summary providers.
 def enable_type_category(debugger, category):
     debugger.HandleCommand(f"type category enable {category}")
@@ -248,6 +308,7 @@ def __lldb_init_module(debugger, internal_dict):
     define_command(debugger, xbacktrace)
     define_command(debugger, xdebug_print)
     define_type_summary(debugger, "Lisp_Object", type_summary_Lisp_Object)
+    define_type_synthetic(debugger, "Lisp_Object", Lisp_Object_Provider)
     enable_type_category(debugger, "Emacs")
     print('Emacs debugging support has been installed.')
 
diff --git a/etc/publicsuffix.txt b/etc/publicsuffix.txt
index 9d0dfc04ea9..456b8aeaf0b 100644
--- a/etc/publicsuffix.txt
+++ b/etc/publicsuffix.txt
@@ -1051,8 +1051,7 @@ fm
 // fo : https://en.wikipedia.org/wiki/.fo
 fo
 
-// fr : http://www.afnic.fr/
-// domaines descriptifs : 
https://www.afnic.fr/medias/documents/Cadre_legal/Afnic_Naming_Policy_12122016_VEN.pdf
+// fr : https://www.afnic.fr/ 
https://www.afnic.fr/wp-media/uploads/2022/12/afnic-naming-policy-2023-01-01.pdf
 fr
 asso.fr
 com.fr
@@ -1060,22 +1059,11 @@ gouv.fr
 nom.fr
 prd.fr
 tm.fr
-// domaines sectoriels : 
https://www.afnic.fr/en/products-and-services/the-fr-tld/sector-based-fr-domains-4.html
-aeroport.fr
-avocat.fr
+// Other SLDs now selfmanaged out of AFNIC range. Former "domaines 
sectoriels", still registration suffixes
 avoues.fr
 cci.fr
-chambagri.fr
-chirurgiens-dentistes.fr
-experts-comptables.fr
-geometre-expert.fr
 greta.fr
 huissier-justice.fr
-medecin.fr
-notaires.fr
-pharmacien.fr
-port.fr
-veterinaire.fr
 
 // ga : https://en.wikipedia.org/wiki/.ga
 ga
@@ -4070,555 +4058,8 @@ ac.mu
 co.mu
 or.mu
 
-// museum : http://about.museum/naming/
-// http://index.museum/
+// museum : 
https://welcome.museum/wp-content/uploads/2018/05/20180525-Registration-Policy-MUSEUM-EN_VF-2.pdf
 https://welcome.museum/buy-your-dot-museum-2/
 museum
-academy.museum
-agriculture.museum
-air.museum
-airguard.museum
-alabama.museum
-alaska.museum
-amber.museum
-ambulance.museum
-american.museum
-americana.museum
-americanantiques.museum
-americanart.museum
-amsterdam.museum
-and.museum
-annefrank.museum
-anthro.museum
-anthropology.museum
-antiques.museum
-aquarium.museum
-arboretum.museum
-archaeological.museum
-archaeology.museum
-architecture.museum
-art.museum
-artanddesign.museum
-artcenter.museum
-artdeco.museum
-arteducation.museum
-artgallery.museum
-arts.museum
-artsandcrafts.museum
-asmatart.museum
-assassination.museum
-assisi.museum
-association.museum
-astronomy.museum
-atlanta.museum
-austin.museum
-australia.museum
-automotive.museum
-aviation.museum
-axis.museum
-badajoz.museum
-baghdad.museum
-bahn.museum
-bale.museum
-baltimore.museum
-barcelona.museum
-baseball.museum
-basel.museum
-baths.museum
-bauern.museum
-beauxarts.museum
-beeldengeluid.museum
-bellevue.museum
-bergbau.museum
-berkeley.museum
-berlin.museum
-bern.museum
-bible.museum
-bilbao.museum
-bill.museum
-birdart.museum
-birthplace.museum
-bonn.museum
-boston.museum
-botanical.museum
-botanicalgarden.museum
-botanicgarden.museum
-botany.museum
-brandywinevalley.museum
-brasil.museum
-bristol.museum
-british.museum
-britishcolumbia.museum
-broadcast.museum
-brunel.museum
-brussel.museum
-brussels.museum
-bruxelles.museum
-building.museum
-burghof.museum
-bus.museum
-bushey.museum
-cadaques.museum
-california.museum
-cambridge.museum
-can.museum
-canada.museum
-capebreton.museum
-carrier.museum
-cartoonart.museum
-casadelamoneda.museum
-castle.museum
-castres.museum
-celtic.museum
-center.museum
-chattanooga.museum
-cheltenham.museum
-chesapeakebay.museum
-chicago.museum
-children.museum
-childrens.museum
-childrensgarden.museum
-chiropractic.museum
-chocolate.museum
-christiansburg.museum
-cincinnati.museum
-cinema.museum
-circus.museum
-civilisation.museum
-civilization.museum
-civilwar.museum
-clinton.museum
-clock.museum
-coal.museum
-coastaldefence.museum
-cody.museum
-coldwar.museum
-collection.museum
-colonialwilliamsburg.museum
-coloradoplateau.museum
-columbia.museum
-columbus.museum
-communication.museum
-communications.museum
-community.museum
-computer.museum
-computerhistory.museum
-comunicações.museum
-contemporary.museum
-contemporaryart.museum
-convent.museum
-copenhagen.museum
-corporation.museum
-correios-e-telecomunicações.museum
-corvette.museum
-costume.museum
-countryestate.museum
-county.museum
-crafts.museum
-cranbrook.museum
-creation.museum
-cultural.museum
-culturalcenter.museum
-culture.museum
-cyber.museum
-cymru.museum
-dali.museum
-dallas.museum
-database.museum
-ddr.museum
-decorativearts.museum
-delaware.museum
-delmenhorst.museum
-denmark.museum
-depot.museum
-design.museum
-detroit.museum
-dinosaur.museum
-discovery.museum
-dolls.museum
-donostia.museum
-durham.museum
-eastafrica.museum
-eastcoast.museum
-education.museum
-educational.museum
-egyptian.museum
-eisenbahn.museum
-elburg.museum
-elvendrell.museum
-embroidery.museum
-encyclopedic.museum
-england.museum
-entomology.museum
-environment.museum
-environmentalconservation.museum
-epilepsy.museum
-essex.museum
-estate.museum
-ethnology.museum
-exeter.museum
-exhibition.museum
-family.museum
-farm.museum
-farmequipment.museum
-farmers.museum
-farmstead.museum
-field.museum
-figueres.museum
-filatelia.museum
-film.museum
-fineart.museum
-finearts.museum
-finland.museum
-flanders.museum
-florida.museum
-force.museum
-fortmissoula.museum
-fortworth.museum
-foundation.museum
-francaise.museum
-frankfurt.museum
-franziskaner.museum
-freemasonry.museum
-freiburg.museum
-fribourg.museum
-frog.museum
-fundacio.museum
-furniture.museum
-gallery.museum
-garden.museum
-gateway.museum
-geelvinck.museum
-gemological.museum
-geology.museum
-georgia.museum
-giessen.museum
-glas.museum
-glass.museum
-gorge.museum
-grandrapids.museum
-graz.museum
-guernsey.museum
-halloffame.museum
-hamburg.museum
-handson.museum
-harvestcelebration.museum
-hawaii.museum
-health.museum
-heimatunduhren.museum
-hellas.museum
-helsinki.museum
-hembygdsforbund.museum
-heritage.museum
-histoire.museum
-historical.museum
-historicalsociety.museum
-historichouses.museum
-historisch.museum
-historisches.museum
-history.museum
-historyofscience.museum
-horology.museum
-house.museum
-humanities.museum
-illustration.museum
-imageandsound.museum
-indian.museum
-indiana.museum
-indianapolis.museum
-indianmarket.museum
-intelligence.museum
-interactive.museum
-iraq.museum
-iron.museum
-isleofman.museum
-jamison.museum
-jefferson.museum
-jerusalem.museum
-jewelry.museum
-jewish.museum
-jewishart.museum
-jfk.museum
-journalism.museum
-judaica.museum
-judygarland.museum
-juedisches.museum
-juif.museum
-karate.museum
-karikatur.museum
-kids.museum
-koebenhavn.museum
-koeln.museum
-kunst.museum
-kunstsammlung.museum
-kunstunddesign.museum
-labor.museum
-labour.museum
-lajolla.museum
-lancashire.museum
-landes.museum
-lans.museum
-läns.museum
-larsson.museum
-lewismiller.museum
-lincoln.museum
-linz.museum
-living.museum
-livinghistory.museum
-localhistory.museum
-london.museum
-losangeles.museum
-louvre.museum
-loyalist.museum
-lucerne.museum
-luxembourg.museum
-luzern.museum
-mad.museum
-madrid.museum
-mallorca.museum
-manchester.museum
-mansion.museum
-mansions.museum
-manx.museum
-marburg.museum
-maritime.museum
-maritimo.museum
-maryland.museum
-marylhurst.museum
-media.museum
-medical.museum
-medizinhistorisches.museum
-meeres.museum
-memorial.museum
-mesaverde.museum
-michigan.museum
-midatlantic.museum
-military.museum
-mill.museum
-miners.museum
-mining.museum
-minnesota.museum
-missile.museum
-missoula.museum
-modern.museum
-moma.museum
-money.museum
-monmouth.museum
-monticello.museum
-montreal.museum
-moscow.museum
-motorcycle.museum
-muenchen.museum
-muenster.museum
-mulhouse.museum
-muncie.museum
-museet.museum
-museumcenter.museum
-museumvereniging.museum
-music.museum
-national.museum
-nationalfirearms.museum
-nationalheritage.museum
-nativeamerican.museum
-naturalhistory.museum
-naturalhistorymuseum.museum
-naturalsciences.museum
-nature.museum
-naturhistorisches.museum
-natuurwetenschappen.museum
-naumburg.museum
-naval.museum
-nebraska.museum
-neues.museum
-newhampshire.museum
-newjersey.museum
-newmexico.museum
-newport.museum
-newspaper.museum
-newyork.museum
-niepce.museum
-norfolk.museum
-north.museum
-nrw.museum
-nyc.museum
-nyny.museum
-oceanographic.museum
-oceanographique.museum
-omaha.museum
-online.museum
-ontario.museum
-openair.museum
-oregon.museum
-oregontrail.museum
-otago.museum
-oxford.museum
-pacific.museum
-paderborn.museum
-palace.museum
-paleo.museum
-palmsprings.museum
-panama.museum
-paris.museum
-pasadena.museum
-pharmacy.museum
-philadelphia.museum
-philadelphiaarea.museum
-philately.museum
-phoenix.museum
-photography.museum
-pilots.museum
-pittsburgh.museum
-planetarium.museum
-plantation.museum
-plants.museum
-plaza.museum
-portal.museum
-portland.museum
-portlligat.museum
-posts-and-telecommunications.museum
-preservation.museum
-presidio.museum
-press.museum
-project.museum
-public.museum
-pubol.museum
-quebec.museum
-railroad.museum
-railway.museum
-research.museum
-resistance.museum
-riodejaneiro.museum
-rochester.museum
-rockart.museum
-roma.museum
-russia.museum
-saintlouis.museum
-salem.museum
-salvadordali.museum
-salzburg.museum
-sandiego.museum
-sanfrancisco.museum
-santabarbara.museum
-santacruz.museum
-santafe.museum
-saskatchewan.museum
-satx.museum
-savannahga.museum
-schlesisches.museum
-schoenbrunn.museum
-schokoladen.museum
-school.museum
-schweiz.museum
-science.museum
-scienceandhistory.museum
-scienceandindustry.museum
-sciencecenter.museum
-sciencecenters.museum
-science-fiction.museum
-sciencehistory.museum
-sciences.museum
-sciencesnaturelles.museum
-scotland.museum
-seaport.museum
-settlement.museum
-settlers.museum
-shell.museum
-sherbrooke.museum
-sibenik.museum
-silk.museum
-ski.museum
-skole.museum
-society.museum
-sologne.museum
-soundandvision.museum
-southcarolina.museum
-southwest.museum
-space.museum
-spy.museum
-square.museum
-stadt.museum
-stalbans.museum
-starnberg.museum
-state.museum
-stateofdelaware.museum
-station.museum
-steam.museum
-steiermark.museum
-stjohn.museum
-stockholm.museum
-stpetersburg.museum
-stuttgart.museum
-suisse.museum
-surgeonshall.museum
-surrey.museum
-svizzera.museum
-sweden.museum
-sydney.museum
-tank.museum
-tcm.museum
-technology.museum
-telekommunikation.museum
-television.museum
-texas.museum
-textile.museum
-theater.museum
-time.museum
-timekeeping.museum
-topology.museum
-torino.museum
-touch.museum
-town.museum
-transport.museum
-tree.museum
-trolley.museum
-trust.museum
-trustee.museum
-uhren.museum
-ulm.museum
-undersea.museum
-university.museum
-usa.museum
-usantiques.museum
-usarts.museum
-uscountryestate.museum
-usculture.museum
-usdecorativearts.museum
-usgarden.museum
-ushistory.museum
-ushuaia.museum
-uslivinghistory.museum
-utah.museum
-uvic.museum
-valley.museum
-vantaa.museum
-versailles.museum
-viking.museum
-village.museum
-virginia.museum
-virtual.museum
-virtuel.museum
-vlaanderen.museum
-volkenkunde.museum
-wales.museum
-wallonie.museum
-war.museum
-washingtondc.museum
-watchandclock.museum
-watch-and-clock.museum
-western.museum
-westfalen.museum
-whaling.museum
-wildlife.museum
-williamsburg.museum
-windmill.museum
-workshop.museum
-york.museum
-yorkshire.museum
-yosemite.museum
-youth.museum
-zoological.museum
-zoology.museum
-ירושלים.museum
-иком.museum
 
 // mv : https://en.wikipedia.org/wiki/.mv
 // "mv" included because, contra Wikipedia, google.mv exists.
@@ -5694,52 +5135,60 @@ turystyka.pl
 // Government domains
 gov.pl
 ap.gov.pl
+griw.gov.pl
 ic.gov.pl
 is.gov.pl
-us.gov.pl
 kmpsp.gov.pl
+konsulat.gov.pl
 kppsp.gov.pl
-kwpsp.gov.pl
-psp.gov.pl
-wskr.gov.pl
 kwp.gov.pl
+kwpsp.gov.pl
+mup.gov.pl
 mw.gov.pl
-ug.gov.pl
-um.gov.pl
-umig.gov.pl
-ugim.gov.pl
-upow.gov.pl
-uw.gov.pl
-starostwo.gov.pl
+oia.gov.pl
+oirm.gov.pl
+oke.gov.pl
+oow.gov.pl
+oschr.gov.pl
+oum.gov.pl
 pa.gov.pl
+pinb.gov.pl
+piw.gov.pl
 po.gov.pl
+pr.gov.pl
+psp.gov.pl
 psse.gov.pl
 pup.gov.pl
 rzgw.gov.pl
 sa.gov.pl
+sdn.gov.pl
+sko.gov.pl
 so.gov.pl
 sr.gov.pl
-wsa.gov.pl
-sko.gov.pl
+starostwo.gov.pl
+ug.gov.pl
+ugim.gov.pl
+um.gov.pl
+umig.gov.pl
+upow.gov.pl
+uppo.gov.pl
+us.gov.pl
+uw.gov.pl
 uzs.gov.pl
+wif.gov.pl
 wiih.gov.pl
 winb.gov.pl
-pinb.gov.pl
 wios.gov.pl
 witd.gov.pl
-wzmiuw.gov.pl
-piw.gov.pl
 wiw.gov.pl
-griw.gov.pl
-wif.gov.pl
-oum.gov.pl
-sdn.gov.pl
-zp.gov.pl
-uppo.gov.pl
-mup.gov.pl
+wkz.gov.pl
+wsa.gov.pl
+wskr.gov.pl
+wsse.gov.pl
 wuoz.gov.pl
-konsulat.gov.pl
-oirm.gov.pl
+wzmiuw.gov.pl
+zp.gov.pl
+zpisdn.gov.pl
 // pl regional domains (http://www.dns.pl/english/index.html)
 augustow.pl
 babia-gora.pl
@@ -5861,7 +5310,7 @@ zarow.pl
 zgora.pl
 zgorzelec.pl
 
-// pm : http://www.afnic.fr/medias/documents/AFNIC-naming-policy2012.pdf
+// pm : 
https://www.afnic.fr/wp-media/uploads/2022/12/afnic-naming-policy-2023-01-01.pdf
 pm
 
 // pn : http://www.government.pn/PnRegistry/policies.htm
@@ -5959,7 +5408,7 @@ net.qa
 org.qa
 sch.qa
 
-// re : http://www.afnic.re/obtenir/chartes/nommage-re/annexe-descriptifs
+// re : 
https://www.afnic.fr/wp-media/uploads/2022/12/afnic-naming-policy-2023-01-01.pdf
 re
 asso.re
 com.re
@@ -6216,7 +5665,7 @@ td
 // http://www.telnic.org/
 tel
 
-// tf : https://en.wikipedia.org/wiki/.tf
+// tf : 
https://www.afnic.fr/wp-media/uploads/2022/12/afnic-naming-policy-2023-01-01.pdf
 tf
 
 // tg : https://en.wikipedia.org/wiki/.tg
@@ -6424,6 +5873,7 @@ kiev.ua
 kirovograd.ua
 km.ua
 kr.ua
+kropyvnytskyi.ua
 krym.ua
 ks.ua
 kv.ua
@@ -6431,6 +5881,7 @@ kyiv.ua
 lg.ua
 lt.ua
 lugansk.ua
+luhansk.ua
 lutsk.ua
 lv.ua
 lviv.ua
@@ -6454,11 +5905,13 @@ te.ua
 ternopil.ua
 uz.ua
 uzhgorod.ua
+uzhhorod.ua
 vinnica.ua
 vinnytsia.ua
 vn.ua
 volyn.ua
 yalta.ua
+zakarpattia.ua
 zaporizhzhe.ua
 zaporizhzhia.ua
 zhitomir.ua
@@ -6570,7 +6023,6 @@ k12.ca.us
 k12.co.us
 k12.ct.us
 k12.dc.us
-k12.de.us
 k12.fl.us
 k12.ga.us
 k12.gu.us
@@ -6812,20 +6264,89 @@ k12.vi
 net.vi
 org.vi
 
-// vn : https://www.dot.vn/vnnic/vnnic/domainregistration.jsp
+// vn : https://www.vnnic.vn/en/domain/cctld-vn
+// https://vnnic.vn/sites/default/files/tailieu/vn.cctld.domains.txt
 vn
+ac.vn
+ai.vn
+biz.vn
 com.vn
-net.vn
-org.vn
 edu.vn
 gov.vn
-int.vn
-ac.vn
-biz.vn
+health.vn
+id.vn
 info.vn
+int.vn
+io.vn
 name.vn
+net.vn
+org.vn
 pro.vn
-health.vn
+
+// vn geographical names
+angiang.vn
+bacgiang.vn
+backan.vn
+baclieu.vn
+bacninh.vn
+baria-vungtau.vn
+bentre.vn
+binhdinh.vn
+binhduong.vn
+binhphuoc.vn
+binhthuan.vn
+camau.vn
+cantho.vn
+caobang.vn
+daklak.vn
+daknong.vn
+danang.vn
+dienbien.vn
+dongnai.vn
+dongthap.vn
+gialai.vn
+hagiang.vn
+haiduong.vn
+haiphong.vn
+hanam.vn
+hanoi.vn
+hatinh.vn
+haugiang.vn
+hoabinh.vn
+hungyen.vn
+khanhhoa.vn
+kiengiang.vn
+kontum.vn
+laichau.vn
+lamdong.vn
+langson.vn
+laocai.vn
+longan.vn
+namdinh.vn
+nghean.vn
+ninhbinh.vn
+ninhthuan.vn
+phutho.vn
+phuyen.vn
+quangbinh.vn
+quangnam.vn
+quangngai.vn
+quangninh.vn
+quangtri.vn
+soctrang.vn
+sonla.vn
+tayninh.vn
+thaibinh.vn
+thainguyen.vn
+thanhhoa.vn
+thanhphohochiminh.vn
+thuathienhue.vn
+tiengiang.vn
+travinh.vn
+tuyenquang.vn
+vinhlong.vn
+vinhphuc.vn
+yenbai.vn
 
 // vu : https://en.wikipedia.org/wiki/.vu
 // http://www.vunic.vu/
@@ -6835,7 +6356,7 @@ edu.vu
 net.vu
 org.vu
 
-// wf : http://www.afnic.fr/medias/documents/AFNIC-naming-policy2012.pdf
+// wf : 
https://www.afnic.fr/wp-media/uploads/2022/12/afnic-naming-policy-2023-01-01.pdf
 wf
 
 // ws : https://en.wikipedia.org/wiki/.ws
@@ -6847,7 +6368,7 @@ org.ws
 gov.ws
 edu.ws
 
-// yt : http://www.afnic.fr/medias/documents/AFNIC-naming-policy2012.pdf
+// yt : 
https://www.afnic.fr/wp-media/uploads/2022/12/afnic-naming-policy-2023-01-01.pdf
 yt
 
 // IDN ccTLDs
@@ -7189,3447 +6710,4534 @@ org.zw
 
 // newGTLDs
 
-// List of new gTLDs imported from 
https://www.icann.org/resources/registries/gtlds/v2/gtlds.json on 
2023-03-18T15:13:13Z
+// List of new gTLDs imported from 
https://www.icann.org/resources/registries/gtlds/v2/gtlds.json on 
2023-09-30T15:11:25Z
 // This list is auto-generated, don't edit it manually.
-// aaa : 2015-02-26 American Automobile Association, Inc.
+// aaa : American Automobile Association, Inc.
+// https://www.iana.org/domains/root/db/aaa.html
 aaa
 
-// aarp : 2015-05-21 AARP
+// aarp : AARP
+// https://www.iana.org/domains/root/db/aarp.html
 aarp
 
-// abarth : 2015-07-30 Fiat Chrysler Automobiles N.V.
-abarth
-
-// abb : 2014-10-24 ABB Ltd
+// abb : ABB Ltd
+// https://www.iana.org/domains/root/db/abb.html
 abb
 
-// abbott : 2014-07-24 Abbott Laboratories, Inc.
+// abbott : Abbott Laboratories, Inc.
+// https://www.iana.org/domains/root/db/abbott.html
 abbott
 
-// abbvie : 2015-07-30 AbbVie Inc.
+// abbvie : AbbVie Inc.
+// https://www.iana.org/domains/root/db/abbvie.html
 abbvie
 
-// abc : 2015-07-30 Disney Enterprises, Inc.
+// abc : Disney Enterprises, Inc.
+// https://www.iana.org/domains/root/db/abc.html
 abc
 
-// able : 2015-06-25 Able Inc.
+// able : Able Inc.
+// https://www.iana.org/domains/root/db/able.html
 able
 
-// abogado : 2014-04-24 Registry Services, LLC
+// abogado : Registry Services, LLC
+// https://www.iana.org/domains/root/db/abogado.html
 abogado
 
-// abudhabi : 2015-07-30 Abu Dhabi Systems and Information Centre
+// abudhabi : Abu Dhabi Systems and Information Centre
+// https://www.iana.org/domains/root/db/abudhabi.html
 abudhabi
 
-// academy : 2013-11-07 Binky Moon, LLC
+// academy : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/academy.html
 academy
 
-// accenture : 2014-08-15 Accenture plc
+// accenture : Accenture plc
+// https://www.iana.org/domains/root/db/accenture.html
 accenture
 
-// accountant : 2014-11-20 dot Accountant Limited
+// accountant : dot Accountant Limited
+// https://www.iana.org/domains/root/db/accountant.html
 accountant
 
-// accountants : 2014-03-20 Binky Moon, LLC
+// accountants : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/accountants.html
 accountants
 
-// aco : 2015-01-08 ACO Severin Ahlmann GmbH & Co. KG
+// aco : ACO Severin Ahlmann GmbH & Co. KG
+// https://www.iana.org/domains/root/db/aco.html
 aco
 
-// actor : 2013-12-12 Dog Beach, LLC
+// actor : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/actor.html
 actor
 
-// ads : 2014-12-04 Charleston Road Registry Inc.
+// ads : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/ads.html
 ads
 
-// adult : 2014-10-16 ICM Registry AD LLC
+// adult : ICM Registry AD LLC
+// https://www.iana.org/domains/root/db/adult.html
 adult
 
-// aeg : 2015-03-19 Aktiebolaget Electrolux
+// aeg : Aktiebolaget Electrolux
+// https://www.iana.org/domains/root/db/aeg.html
 aeg
 
-// aetna : 2015-05-21 Aetna Life Insurance Company
+// aetna : Aetna Life Insurance Company
+// https://www.iana.org/domains/root/db/aetna.html
 aetna
 
-// afl : 2014-10-02 Australian Football League
+// afl : Australian Football League
+// https://www.iana.org/domains/root/db/afl.html
 afl
 
-// africa : 2014-03-24 ZA Central Registry NPC trading as Registry.Africa
+// africa : ZA Central Registry NPC trading as Registry.Africa
+// https://www.iana.org/domains/root/db/africa.html
 africa
 
-// agakhan : 2015-04-23 Fondation Aga Khan (Aga Khan Foundation)
+// agakhan : Fondation Aga Khan (Aga Khan Foundation)
+// https://www.iana.org/domains/root/db/agakhan.html
 agakhan
 
-// agency : 2013-11-14 Binky Moon, LLC
+// agency : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/agency.html
 agency
 
-// aig : 2014-12-18 American International Group, Inc.
+// aig : American International Group, Inc.
+// https://www.iana.org/domains/root/db/aig.html
 aig
 
-// airbus : 2015-07-30 Airbus S.A.S.
+// airbus : Airbus S.A.S.
+// https://www.iana.org/domains/root/db/airbus.html
 airbus
 
-// airforce : 2014-03-06 Dog Beach, LLC
+// airforce : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/airforce.html
 airforce
 
-// airtel : 2014-10-24 Bharti Airtel Limited
+// airtel : Bharti Airtel Limited
+// https://www.iana.org/domains/root/db/airtel.html
 airtel
 
-// akdn : 2015-04-23 Fondation Aga Khan (Aga Khan Foundation)
+// akdn : Fondation Aga Khan (Aga Khan Foundation)
+// https://www.iana.org/domains/root/db/akdn.html
 akdn
 
-// alfaromeo : 2015-07-31 Fiat Chrysler Automobiles N.V.
-alfaromeo
-
-// alibaba : 2015-01-15 Alibaba Group Holding Limited
+// alibaba : Alibaba Group Holding Limited
+// https://www.iana.org/domains/root/db/alibaba.html
 alibaba
 
-// alipay : 2015-01-15 Alibaba Group Holding Limited
+// alipay : Alibaba Group Holding Limited
+// https://www.iana.org/domains/root/db/alipay.html
 alipay
 
-// allfinanz : 2014-07-03 Allfinanz Deutsche Vermögensberatung 
Aktiengesellschaft
+// allfinanz : Allfinanz Deutsche Vermögensberatung Aktiengesellschaft
+// https://www.iana.org/domains/root/db/allfinanz.html
 allfinanz
 
-// allstate : 2015-07-31 Allstate Fire and Casualty Insurance Company
+// allstate : Allstate Fire and Casualty Insurance Company
+// https://www.iana.org/domains/root/db/allstate.html
 allstate
 
-// ally : 2015-06-18 Ally Financial Inc.
+// ally : Ally Financial Inc.
+// https://www.iana.org/domains/root/db/ally.html
 ally
 
-// alsace : 2014-07-02 Region Grand Est
+// alsace : Region Grand Est
+// https://www.iana.org/domains/root/db/alsace.html
 alsace
 
-// alstom : 2015-07-30 ALSTOM
+// alstom : ALSTOM
+// https://www.iana.org/domains/root/db/alstom.html
 alstom
 
-// amazon : 2019-12-19 Amazon Registry Services, Inc.
+// amazon : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/amazon.html
 amazon
 
-// americanexpress : 2015-07-31 American Express Travel Related Services 
Company, Inc.
+// americanexpress : American Express Travel Related Services Company, Inc.
+// https://www.iana.org/domains/root/db/americanexpress.html
 americanexpress
 
-// americanfamily : 2015-07-23 AmFam, Inc.
+// americanfamily : AmFam, Inc.
+// https://www.iana.org/domains/root/db/americanfamily.html
 americanfamily
 
-// amex : 2015-07-31 American Express Travel Related Services Company, Inc.
+// amex : American Express Travel Related Services Company, Inc.
+// https://www.iana.org/domains/root/db/amex.html
 amex
 
-// amfam : 2015-07-23 AmFam, Inc.
+// amfam : AmFam, Inc.
+// https://www.iana.org/domains/root/db/amfam.html
 amfam
 
-// amica : 2015-05-28 Amica Mutual Insurance Company
+// amica : Amica Mutual Insurance Company
+// https://www.iana.org/domains/root/db/amica.html
 amica
 
-// amsterdam : 2014-07-24 Gemeente Amsterdam
+// amsterdam : Gemeente Amsterdam
+// https://www.iana.org/domains/root/db/amsterdam.html
 amsterdam
 
-// analytics : 2014-12-18 Campus IP LLC
+// analytics : Campus IP LLC
+// https://www.iana.org/domains/root/db/analytics.html
 analytics
 
-// android : 2014-08-07 Charleston Road Registry Inc.
+// android : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/android.html
 android
 
-// anquan : 2015-01-08 Beijing Qihu Keji Co., Ltd.
+// anquan : Beijing Qihu Keji Co., Ltd.
+// https://www.iana.org/domains/root/db/anquan.html
 anquan
 
-// anz : 2015-07-31 Australia and New Zealand Banking Group Limited
+// anz : Australia and New Zealand Banking Group Limited
+// https://www.iana.org/domains/root/db/anz.html
 anz
 
-// aol : 2015-09-17 Oath Inc.
+// aol : Oath Inc.
+// https://www.iana.org/domains/root/db/aol.html
 aol
 
-// apartments : 2014-12-11 Binky Moon, LLC
+// apartments : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/apartments.html
 apartments
 
-// app : 2015-05-14 Charleston Road Registry Inc.
+// app : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/app.html
 app
 
-// apple : 2015-05-14 Apple Inc.
+// apple : Apple Inc.
+// https://www.iana.org/domains/root/db/apple.html
 apple
 
-// aquarelle : 2014-07-24 Aquarelle.com
+// aquarelle : Aquarelle.com
+// https://www.iana.org/domains/root/db/aquarelle.html
 aquarelle
 
-// arab : 2015-11-12 League of Arab States
+// arab : League of Arab States
+// https://www.iana.org/domains/root/db/arab.html
 arab
 
-// aramco : 2014-11-20 Aramco Services Company
+// aramco : Aramco Services Company
+// https://www.iana.org/domains/root/db/aramco.html
 aramco
 
-// archi : 2014-02-06 Identity Digital Limited
+// archi : Identity Digital Limited
+// https://www.iana.org/domains/root/db/archi.html
 archi
 
-// army : 2014-03-06 Dog Beach, LLC
+// army : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/army.html
 army
 
-// art : 2016-03-24 UK Creative Ideas Limited
+// art : UK Creative Ideas Limited
+// https://www.iana.org/domains/root/db/art.html
 art
 
-// arte : 2014-12-11 Association Relative à la Télévision Européenne G.E.I.E.
+// arte : Association Relative à la Télévision Européenne G.E.I.E.
+// https://www.iana.org/domains/root/db/arte.html
 arte
 
-// asda : 2015-07-31 Wal-Mart Stores, Inc.
+// asda : Wal-Mart Stores, Inc.
+// https://www.iana.org/domains/root/db/asda.html
 asda
 
-// associates : 2014-03-06 Binky Moon, LLC
+// associates : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/associates.html
 associates
 
-// athleta : 2015-07-30 The Gap, Inc.
+// athleta : The Gap, Inc.
+// https://www.iana.org/domains/root/db/athleta.html
 athleta
 
-// attorney : 2014-03-20 Dog Beach, LLC
+// attorney : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/attorney.html
 attorney
 
-// auction : 2014-03-20 Dog Beach, LLC
+// auction : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/auction.html
 auction
 
-// audi : 2015-05-21 AUDI Aktiengesellschaft
+// audi : AUDI Aktiengesellschaft
+// https://www.iana.org/domains/root/db/audi.html
 audi
 
-// audible : 2015-06-25 Amazon Registry Services, Inc.
+// audible : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/audible.html
 audible
 
-// audio : 2014-03-20 XYZ.COM LLC
+// audio : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/audio.html
 audio
 
-// auspost : 2015-08-13 Australian Postal Corporation
+// auspost : Australian Postal Corporation
+// https://www.iana.org/domains/root/db/auspost.html
 auspost
 
-// author : 2014-12-18 Amazon Registry Services, Inc.
+// author : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/author.html
 author
 
-// auto : 2014-11-13 XYZ.COM LLC
+// auto : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/auto.html
 auto
 
-// autos : 2014-01-09 XYZ.COM LLC
+// autos : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/autos.html
 autos
 
-// avianca : 2015-01-08 Avianca Inc.
+// avianca : Avianca Inc.
+// https://www.iana.org/domains/root/db/avianca.html
 avianca
 
-// aws : 2015-06-25 AWS Registry LLC
+// aws : AWS Registry LLC
+// https://www.iana.org/domains/root/db/aws.html
 aws
 
-// axa : 2013-12-19 AXA Group Operations SAS
+// axa : AXA Group Operations SAS
+// https://www.iana.org/domains/root/db/axa.html
 axa
 
-// azure : 2014-12-18 Microsoft Corporation
+// azure : Microsoft Corporation
+// https://www.iana.org/domains/root/db/azure.html
 azure
 
-// baby : 2015-04-09 XYZ.COM LLC
+// baby : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/baby.html
 baby
 
-// baidu : 2015-01-08 Baidu, Inc.
+// baidu : Baidu, Inc.
+// https://www.iana.org/domains/root/db/baidu.html
 baidu
 
-// banamex : 2015-07-30 Citigroup Inc.
+// banamex : Citigroup Inc.
+// https://www.iana.org/domains/root/db/banamex.html
 banamex
 
-// bananarepublic : 2015-07-31 The Gap, Inc.
+// bananarepublic : The Gap, Inc.
+// https://www.iana.org/domains/root/db/bananarepublic.html
 bananarepublic
 
-// band : 2014-06-12 Dog Beach, LLC
+// band : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/band.html
 band
 
-// bank : 2014-09-25 fTLD Registry Services LLC
+// bank : fTLD Registry Services LLC
+// https://www.iana.org/domains/root/db/bank.html
 bank
 
-// bar : 2013-12-12 Punto 2012 Sociedad Anonima Promotora de Inversion de 
Capital Variable
+// bar : Punto 2012 Sociedad Anonima Promotora de Inversion de Capital Variable
+// https://www.iana.org/domains/root/db/bar.html
 bar
 
-// barcelona : 2014-07-24 Municipi de Barcelona
+// barcelona : Municipi de Barcelona
+// https://www.iana.org/domains/root/db/barcelona.html
 barcelona
 
-// barclaycard : 2014-11-20 Barclays Bank PLC
+// barclaycard : Barclays Bank PLC
+// https://www.iana.org/domains/root/db/barclaycard.html
 barclaycard
 
-// barclays : 2014-11-20 Barclays Bank PLC
+// barclays : Barclays Bank PLC
+// https://www.iana.org/domains/root/db/barclays.html
 barclays
 
-// barefoot : 2015-06-11 Gallo Vineyards, Inc.
+// barefoot : Gallo Vineyards, Inc.
+// https://www.iana.org/domains/root/db/barefoot.html
 barefoot
 
-// bargains : 2013-11-14 Binky Moon, LLC
+// bargains : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/bargains.html
 bargains
 
-// baseball : 2015-10-29 MLB Advanced Media DH, LLC
+// baseball : MLB Advanced Media DH, LLC
+// https://www.iana.org/domains/root/db/baseball.html
 baseball
 
-// basketball : 2015-08-20 Fédération Internationale de Basketball (FIBA)
+// basketball : Fédération Internationale de Basketball (FIBA)
+// https://www.iana.org/domains/root/db/basketball.html
 basketball
 
-// bauhaus : 2014-04-17 Werkhaus GmbH
+// bauhaus : Werkhaus GmbH
+// https://www.iana.org/domains/root/db/bauhaus.html
 bauhaus
 
-// bayern : 2014-01-23 Bayern Connect GmbH
+// bayern : Bayern Connect GmbH
+// https://www.iana.org/domains/root/db/bayern.html
 bayern
 
-// bbc : 2014-12-18 British Broadcasting Corporation
+// bbc : British Broadcasting Corporation
+// https://www.iana.org/domains/root/db/bbc.html
 bbc
 
-// bbt : 2015-07-23 BB&T Corporation
+// bbt : BB&T Corporation
+// https://www.iana.org/domains/root/db/bbt.html
 bbt
 
-// bbva : 2014-10-02 BANCO BILBAO VIZCAYA ARGENTARIA, S.A.
+// bbva : BANCO BILBAO VIZCAYA ARGENTARIA, S.A.
+// https://www.iana.org/domains/root/db/bbva.html
 bbva
 
-// bcg : 2015-04-02 The Boston Consulting Group, Inc.
+// bcg : The Boston Consulting Group, Inc.
+// https://www.iana.org/domains/root/db/bcg.html
 bcg
 
-// bcn : 2014-07-24 Municipi de Barcelona
+// bcn : Municipi de Barcelona
+// https://www.iana.org/domains/root/db/bcn.html
 bcn
 
-// beats : 2015-05-14 Beats Electronics, LLC
+// beats : Beats Electronics, LLC
+// https://www.iana.org/domains/root/db/beats.html
 beats
 
-// beauty : 2015-12-03 XYZ.COM LLC
+// beauty : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/beauty.html
 beauty
 
-// beer : 2014-01-09 Registry Services, LLC
+// beer : Registry Services, LLC
+// https://www.iana.org/domains/root/db/beer.html
 beer
 
-// bentley : 2014-12-18 Bentley Motors Limited
+// bentley : Bentley Motors Limited
+// https://www.iana.org/domains/root/db/bentley.html
 bentley
 
-// berlin : 2013-10-31 dotBERLIN GmbH & Co. KG
+// berlin : dotBERLIN GmbH & Co. KG
+// https://www.iana.org/domains/root/db/berlin.html
 berlin
 
-// best : 2013-12-19 BestTLD Pty Ltd
+// best : BestTLD Pty Ltd
+// https://www.iana.org/domains/root/db/best.html
 best
 
-// bestbuy : 2015-07-31 BBY Solutions, Inc.
+// bestbuy : BBY Solutions, Inc.
+// https://www.iana.org/domains/root/db/bestbuy.html
 bestbuy
 
-// bet : 2015-05-07 Identity Digital Limited
+// bet : Identity Digital Limited
+// https://www.iana.org/domains/root/db/bet.html
 bet
 
-// bharti : 2014-01-09 Bharti Enterprises (Holding) Private Limited
+// bharti : Bharti Enterprises (Holding) Private Limited
+// https://www.iana.org/domains/root/db/bharti.html
 bharti
 
-// bible : 2014-06-19 American Bible Society
+// bible : American Bible Society
+// https://www.iana.org/domains/root/db/bible.html
 bible
 
-// bid : 2013-12-19 dot Bid Limited
+// bid : dot Bid Limited
+// https://www.iana.org/domains/root/db/bid.html
 bid
 
-// bike : 2013-08-27 Binky Moon, LLC
+// bike : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/bike.html
 bike
 
-// bing : 2014-12-18 Microsoft Corporation
+// bing : Microsoft Corporation
+// https://www.iana.org/domains/root/db/bing.html
 bing
 
-// bingo : 2014-12-04 Binky Moon, LLC
+// bingo : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/bingo.html
 bingo
 
-// bio : 2014-03-06 Identity Digital Limited
+// bio : Identity Digital Limited
+// https://www.iana.org/domains/root/db/bio.html
 bio
 
-// black : 2014-01-16 Identity Digital Limited
+// black : Identity Digital Limited
+// https://www.iana.org/domains/root/db/black.html
 black
 
-// blackfriday : 2014-01-16 Registry Services, LLC
+// blackfriday : Registry Services, LLC
+// https://www.iana.org/domains/root/db/blackfriday.html
 blackfriday
 
-// blockbuster : 2015-07-30 Dish DBS Corporation
+// blockbuster : Dish DBS Corporation
+// https://www.iana.org/domains/root/db/blockbuster.html
 blockbuster
 
-// blog : 2015-05-14 Knock Knock WHOIS There, LLC
+// blog : Knock Knock WHOIS There, LLC
+// https://www.iana.org/domains/root/db/blog.html
 blog
 
-// bloomberg : 2014-07-17 Bloomberg IP Holdings LLC
+// bloomberg : Bloomberg IP Holdings LLC
+// https://www.iana.org/domains/root/db/bloomberg.html
 bloomberg
 
-// blue : 2013-11-07 Identity Digital Limited
+// blue : Identity Digital Limited
+// https://www.iana.org/domains/root/db/blue.html
 blue
 
-// bms : 2014-10-30 Bristol-Myers Squibb Company
+// bms : Bristol-Myers Squibb Company
+// https://www.iana.org/domains/root/db/bms.html
 bms
 
-// bmw : 2014-01-09 Bayerische Motoren Werke Aktiengesellschaft
+// bmw : Bayerische Motoren Werke Aktiengesellschaft
+// https://www.iana.org/domains/root/db/bmw.html
 bmw
 
-// bnpparibas : 2014-05-29 BNP Paribas
+// bnpparibas : BNP Paribas
+// https://www.iana.org/domains/root/db/bnpparibas.html
 bnpparibas
 
-// boats : 2014-12-04 XYZ.COM LLC
+// boats : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/boats.html
 boats
 
-// boehringer : 2015-07-09 Boehringer Ingelheim International GmbH
+// boehringer : Boehringer Ingelheim International GmbH
+// https://www.iana.org/domains/root/db/boehringer.html
 boehringer
 
-// bofa : 2015-07-31 Bank of America Corporation
+// bofa : Bank of America Corporation
+// https://www.iana.org/domains/root/db/bofa.html
 bofa
 
-// bom : 2014-10-16 Núcleo de Informação e Coordenação do Ponto BR - NIC.br
+// bom : Núcleo de Informação e Coordenação do Ponto BR - NIC.br
+// https://www.iana.org/domains/root/db/bom.html
 bom
 
-// bond : 2014-06-05 ShortDot SA
+// bond : ShortDot SA
+// https://www.iana.org/domains/root/db/bond.html
 bond
 
-// boo : 2014-01-30 Charleston Road Registry Inc.
+// boo : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/boo.html
 boo
 
-// book : 2015-08-27 Amazon Registry Services, Inc.
+// book : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/book.html
 book
 
-// booking : 2015-07-16 Booking.com B.V.
+// booking : Booking.com B.V.
+// https://www.iana.org/domains/root/db/booking.html
 booking
 
-// bosch : 2015-06-18 Robert Bosch GMBH
+// bosch : Robert Bosch GMBH
+// https://www.iana.org/domains/root/db/bosch.html
 bosch
 
-// bostik : 2015-05-28 Bostik SA
+// bostik : Bostik SA
+// https://www.iana.org/domains/root/db/bostik.html
 bostik
 
-// boston : 2015-12-10 Registry Services, LLC
+// boston : Registry Services, LLC
+// https://www.iana.org/domains/root/db/boston.html
 boston
 
-// bot : 2014-12-18 Amazon Registry Services, Inc.
+// bot : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/bot.html
 bot
 
-// boutique : 2013-11-14 Binky Moon, LLC
+// boutique : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/boutique.html
 boutique
 
-// box : 2015-11-12 Intercap Registry Inc.
+// box : Intercap Registry Inc.
+// https://www.iana.org/domains/root/db/box.html
 box
 
-// bradesco : 2014-12-18 Banco Bradesco S.A.
+// bradesco : Banco Bradesco S.A.
+// https://www.iana.org/domains/root/db/bradesco.html
 bradesco
 
-// bridgestone : 2014-12-18 Bridgestone Corporation
+// bridgestone : Bridgestone Corporation
+// https://www.iana.org/domains/root/db/bridgestone.html
 bridgestone
 
-// broadway : 2014-12-22 Celebrate Broadway, Inc.
+// broadway : Celebrate Broadway, Inc.
+// https://www.iana.org/domains/root/db/broadway.html
 broadway
 
-// broker : 2014-12-11 Dog Beach, LLC
+// broker : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/broker.html
 broker
 
-// brother : 2015-01-29 Brother Industries, Ltd.
+// brother : Brother Industries, Ltd.
+// https://www.iana.org/domains/root/db/brother.html
 brother
 
-// brussels : 2014-02-06 DNS.be vzw
+// brussels : DNS.be vzw
+// https://www.iana.org/domains/root/db/brussels.html
 brussels
 
-// build : 2013-11-07 Plan Bee LLC
+// build : Plan Bee LLC
+// https://www.iana.org/domains/root/db/build.html
 build
 
-// builders : 2013-11-07 Binky Moon, LLC
+// builders : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/builders.html
 builders
 
-// business : 2013-11-07 Binky Moon, LLC
+// business : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/business.html
 business
 
-// buy : 2014-12-18 Amazon Registry Services, Inc.
+// buy : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/buy.html
 buy
 
-// buzz : 2013-10-02 DOTSTRATEGY CO.
+// buzz : DOTSTRATEGY CO.
+// https://www.iana.org/domains/root/db/buzz.html
 buzz
 
-// bzh : 2014-02-27 Association www.bzh
+// bzh : Association www.bzh
+// https://www.iana.org/domains/root/db/bzh.html
 bzh
 
-// cab : 2013-10-24 Binky Moon, LLC
+// cab : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/cab.html
 cab
 
-// cafe : 2015-02-11 Binky Moon, LLC
+// cafe : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/cafe.html
 cafe
 
-// cal : 2014-07-24 Charleston Road Registry Inc.
+// cal : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/cal.html
 cal
 
-// call : 2014-12-18 Amazon Registry Services, Inc.
+// call : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/call.html
 call
 
-// calvinklein : 2015-07-30 PVH gTLD Holdings LLC
+// calvinklein : PVH gTLD Holdings LLC
+// https://www.iana.org/domains/root/db/calvinklein.html
 calvinklein
 
-// cam : 2016-04-21 Cam Connecting SARL
+// cam : Cam Connecting SARL
+// https://www.iana.org/domains/root/db/cam.html
 cam
 
-// camera : 2013-08-27 Binky Moon, LLC
+// camera : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/camera.html
 camera
 
-// camp : 2013-11-07 Binky Moon, LLC
+// camp : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/camp.html
 camp
 
-// canon : 2014-09-12 Canon Inc.
+// canon : Canon Inc.
+// https://www.iana.org/domains/root/db/canon.html
 canon
 
-// capetown : 2014-03-24 ZA Central Registry NPC trading as ZA Central Registry
+// capetown : ZA Central Registry NPC trading as ZA Central Registry
+// https://www.iana.org/domains/root/db/capetown.html
 capetown
 
-// capital : 2014-03-06 Binky Moon, LLC
+// capital : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/capital.html
 capital
 
-// capitalone : 2015-08-06 Capital One Financial Corporation
+// capitalone : Capital One Financial Corporation
+// https://www.iana.org/domains/root/db/capitalone.html
 capitalone
 
-// car : 2015-01-22 XYZ.COM LLC
+// car : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/car.html
 car
 
-// caravan : 2013-12-12 Caravan International, Inc.
+// caravan : Caravan International, Inc.
+// https://www.iana.org/domains/root/db/caravan.html
 caravan
 
-// cards : 2013-12-05 Binky Moon, LLC
+// cards : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/cards.html
 cards
 
-// care : 2014-03-06 Binky Moon, LLC
+// care : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/care.html
 care
 
-// career : 2013-10-09 dotCareer LLC
+// career : dotCareer LLC
+// https://www.iana.org/domains/root/db/career.html
 career
 
-// careers : 2013-10-02 Binky Moon, LLC
+// careers : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/careers.html
 careers
 
-// cars : 2014-11-13 XYZ.COM LLC
+// cars : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/cars.html
 cars
 
-// casa : 2013-11-21 Registry Services, LLC
+// casa : Registry Services, LLC
+// https://www.iana.org/domains/root/db/casa.html
 casa
 
-// case : 2015-09-03 Digity, LLC
+// case : Digity, LLC
+// https://www.iana.org/domains/root/db/case.html
 case
 
-// cash : 2014-03-06 Binky Moon, LLC
+// cash : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/cash.html
 cash
 
-// casino : 2014-12-18 Binky Moon, LLC
+// casino : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/casino.html
 casino
 
-// catering : 2013-12-05 Binky Moon, LLC
+// catering : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/catering.html
 catering
 
-// catholic : 2015-10-21 Pontificium Consilium de Comunicationibus Socialibus 
(PCCS) (Pontifical Council for Social Communication)
+// catholic : Pontificium Consilium de Comunicationibus Socialibus (PCCS) 
(Pontifical Council for Social Communication)
+// https://www.iana.org/domains/root/db/catholic.html
 catholic
 
-// cba : 2014-06-26 COMMONWEALTH BANK OF AUSTRALIA
+// cba : COMMONWEALTH BANK OF AUSTRALIA
+// https://www.iana.org/domains/root/db/cba.html
 cba
 
-// cbn : 2014-08-22 The Christian Broadcasting Network, Inc.
+// cbn : The Christian Broadcasting Network, Inc.
+// https://www.iana.org/domains/root/db/cbn.html
 cbn
 
-// cbre : 2015-07-02 CBRE, Inc.
+// cbre : CBRE, Inc.
+// https://www.iana.org/domains/root/db/cbre.html
 cbre
 
-// cbs : 2015-08-06 CBS Domains Inc.
+// cbs : CBS Domains Inc.
+// https://www.iana.org/domains/root/db/cbs.html
 cbs
 
-// center : 2013-11-07 Binky Moon, LLC
+// center : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/center.html
 center
 
-// ceo : 2013-11-07 CEOTLD Pty Ltd
+// ceo : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/ceo.html
 ceo
 
-// cern : 2014-06-05 European Organization for Nuclear Research ("CERN")
+// cern : European Organization for Nuclear Research ("CERN")
+// https://www.iana.org/domains/root/db/cern.html
 cern
 
-// cfa : 2014-08-28 CFA Institute
+// cfa : CFA Institute
+// https://www.iana.org/domains/root/db/cfa.html
 cfa
 
-// cfd : 2014-12-11 ShortDot SA
+// cfd : ShortDot SA
+// https://www.iana.org/domains/root/db/cfd.html
 cfd
 
-// chanel : 2015-04-09 Chanel International B.V.
+// chanel : Chanel International B.V.
+// https://www.iana.org/domains/root/db/chanel.html
 chanel
 
-// channel : 2014-05-08 Charleston Road Registry Inc.
+// channel : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/channel.html
 channel
 
-// charity : 2018-04-11 Public Interest Registry
+// charity : Public Interest Registry
+// https://www.iana.org/domains/root/db/charity.html
 charity
 
-// chase : 2015-04-30 JPMorgan Chase Bank, National Association
+// chase : JPMorgan Chase Bank, National Association
+// https://www.iana.org/domains/root/db/chase.html
 chase
 
-// chat : 2014-12-04 Binky Moon, LLC
+// chat : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/chat.html
 chat
 
-// cheap : 2013-11-14 Binky Moon, LLC
+// cheap : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/cheap.html
 cheap
 
-// chintai : 2015-06-11 CHINTAI Corporation
+// chintai : CHINTAI Corporation
+// https://www.iana.org/domains/root/db/chintai.html
 chintai
 
-// christmas : 2013-11-21 XYZ.COM LLC
+// christmas : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/christmas.html
 christmas
 
-// chrome : 2014-07-24 Charleston Road Registry Inc.
+// chrome : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/chrome.html
 chrome
 
-// church : 2014-02-06 Binky Moon, LLC
+// church : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/church.html
 church
 
-// cipriani : 2015-02-19 Hotel Cipriani Srl
+// cipriani : Hotel Cipriani Srl
+// https://www.iana.org/domains/root/db/cipriani.html
 cipriani
 
-// circle : 2014-12-18 Amazon Registry Services, Inc.
+// circle : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/circle.html
 circle
 
-// cisco : 2014-12-22 Cisco Technology, Inc.
+// cisco : Cisco Technology, Inc.
+// https://www.iana.org/domains/root/db/cisco.html
 cisco
 
-// citadel : 2015-07-23 Citadel Domain LLC
+// citadel : Citadel Domain LLC
+// https://www.iana.org/domains/root/db/citadel.html
 citadel
 
-// citi : 2015-07-30 Citigroup Inc.
+// citi : Citigroup Inc.
+// https://www.iana.org/domains/root/db/citi.html
 citi
 
-// citic : 2014-01-09 CITIC Group Corporation
+// citic : CITIC Group Corporation
+// https://www.iana.org/domains/root/db/citic.html
 citic
 
-// city : 2014-05-29 Binky Moon, LLC
+// city : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/city.html
 city
 
-// cityeats : 2014-12-11 Lifestyle Domain Holdings, Inc.
+// cityeats : Lifestyle Domain Holdings, Inc.
+// https://www.iana.org/domains/root/db/cityeats.html
 cityeats
 
-// claims : 2014-03-20 Binky Moon, LLC
+// claims : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/claims.html
 claims
 
-// cleaning : 2013-12-05 Binky Moon, LLC
+// cleaning : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/cleaning.html
 cleaning
 
-// click : 2014-06-05 Internet Naming Company LLC
+// click : Internet Naming Company LLC
+// https://www.iana.org/domains/root/db/click.html
 click
 
-// clinic : 2014-03-20 Binky Moon, LLC
+// clinic : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/clinic.html
 clinic
 
-// clinique : 2015-10-01 The Estée Lauder Companies Inc.
+// clinique : The Estée Lauder Companies Inc.
+// https://www.iana.org/domains/root/db/clinique.html
 clinique
 
-// clothing : 2013-08-27 Binky Moon, LLC
+// clothing : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/clothing.html
 clothing
 
-// cloud : 2015-04-16 Aruba PEC S.p.A.
+// cloud : Aruba PEC S.p.A.
+// https://www.iana.org/domains/root/db/cloud.html
 cloud
 
-// club : 2013-11-08 Registry Services, LLC
+// club : Registry Services, LLC
+// https://www.iana.org/domains/root/db/club.html
 club
 
-// clubmed : 2015-06-25 Club Méditerranée S.A.
+// clubmed : Club Méditerranée S.A.
+// https://www.iana.org/domains/root/db/clubmed.html
 clubmed
 
-// coach : 2014-10-09 Binky Moon, LLC
+// coach : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/coach.html
 coach
 
-// codes : 2013-10-31 Binky Moon, LLC
+// codes : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/codes.html
 codes
 
-// coffee : 2013-10-17 Binky Moon, LLC
+// coffee : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/coffee.html
 coffee
 
-// college : 2014-01-16 XYZ.COM LLC
+// college : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/college.html
 college
 
-// cologne : 2014-02-05 dotKoeln GmbH
+// cologne : dotKoeln GmbH
+// https://www.iana.org/domains/root/db/cologne.html
 cologne
 
-// comcast : 2015-07-23 Comcast IP Holdings I, LLC
+// comcast : Comcast IP Holdings I, LLC
+// https://www.iana.org/domains/root/db/comcast.html
 comcast
 
-// commbank : 2014-06-26 COMMONWEALTH BANK OF AUSTRALIA
+// commbank : COMMONWEALTH BANK OF AUSTRALIA
+// https://www.iana.org/domains/root/db/commbank.html
 commbank
 
-// community : 2013-12-05 Binky Moon, LLC
+// community : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/community.html
 community
 
-// company : 2013-11-07 Binky Moon, LLC
+// company : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/company.html
 company
 
-// compare : 2015-10-08 Registry Services, LLC
+// compare : Registry Services, LLC
+// https://www.iana.org/domains/root/db/compare.html
 compare
 
-// computer : 2013-10-24 Binky Moon, LLC
+// computer : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/computer.html
 computer
 
-// comsec : 2015-01-08 VeriSign, Inc.
+// comsec : VeriSign, Inc.
+// https://www.iana.org/domains/root/db/comsec.html
 comsec
 
-// condos : 2013-12-05 Binky Moon, LLC
+// condos : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/condos.html
 condos
 
-// construction : 2013-09-16 Binky Moon, LLC
+// construction : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/construction.html
 construction
 
-// consulting : 2013-12-05 Dog Beach, LLC
+// consulting : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/consulting.html
 consulting
 
-// contact : 2015-01-08 Dog Beach, LLC
+// contact : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/contact.html
 contact
 
-// contractors : 2013-09-10 Binky Moon, LLC
+// contractors : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/contractors.html
 contractors
 
-// cooking : 2013-11-21 Registry Services, LLC
+// cooking : Registry Services, LLC
+// https://www.iana.org/domains/root/db/cooking.html
 cooking
 
-// cookingchannel : 2015-07-02 Lifestyle Domain Holdings, Inc.
-cookingchannel
-
-// cool : 2013-11-14 Binky Moon, LLC
+// cool : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/cool.html
 cool
 
-// corsica : 2014-09-25 Collectivité de Corse
+// corsica : Collectivité de Corse
+// https://www.iana.org/domains/root/db/corsica.html
 corsica
 
-// country : 2013-12-19 Internet Naming Company LLC
+// country : Internet Naming Company LLC
+// https://www.iana.org/domains/root/db/country.html
 country
 
-// coupon : 2015-02-26 Amazon Registry Services, Inc.
+// coupon : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/coupon.html
 coupon
 
-// coupons : 2015-03-26 Binky Moon, LLC
+// coupons : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/coupons.html
 coupons
 
-// courses : 2014-12-04 Registry Services, LLC
+// courses : Registry Services, LLC
+// https://www.iana.org/domains/root/db/courses.html
 courses
 
-// cpa : 2019-06-10 American Institute of Certified Public Accountants
+// cpa : American Institute of Certified Public Accountants
+// https://www.iana.org/domains/root/db/cpa.html
 cpa
 
-// credit : 2014-03-20 Binky Moon, LLC
+// credit : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/credit.html
 credit
 
-// creditcard : 2014-03-20 Binky Moon, LLC
+// creditcard : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/creditcard.html
 creditcard
 
-// creditunion : 2015-01-22 DotCooperation LLC
+// creditunion : DotCooperation LLC
+// https://www.iana.org/domains/root/db/creditunion.html
 creditunion
 
-// cricket : 2014-10-09 dot Cricket Limited
+// cricket : dot Cricket Limited
+// https://www.iana.org/domains/root/db/cricket.html
 cricket
 
-// crown : 2014-10-24 Crown Equipment Corporation
+// crown : Crown Equipment Corporation
+// https://www.iana.org/domains/root/db/crown.html
 crown
 
-// crs : 2014-04-03 Federated Co-operatives Limited
+// crs : Federated Co-operatives Limited
+// https://www.iana.org/domains/root/db/crs.html
 crs
 
-// cruise : 2015-12-10 Viking River Cruises (Bermuda) Ltd.
+// cruise : Viking River Cruises (Bermuda) Ltd.
+// https://www.iana.org/domains/root/db/cruise.html
 cruise
 
-// cruises : 2013-12-05 Binky Moon, LLC
+// cruises : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/cruises.html
 cruises
 
-// cuisinella : 2014-04-03 SCHMIDT GROUPE S.A.S.
+// cuisinella : SCHMIDT GROUPE S.A.S.
+// https://www.iana.org/domains/root/db/cuisinella.html
 cuisinella
 
-// cymru : 2014-05-08 Nominet UK
+// cymru : Nominet UK
+// https://www.iana.org/domains/root/db/cymru.html
 cymru
 
-// cyou : 2015-01-22 ShortDot SA
+// cyou : ShortDot SA
+// https://www.iana.org/domains/root/db/cyou.html
 cyou
 
-// dabur : 2014-02-06 Dabur India Limited
+// dabur : Dabur India Limited
+// https://www.iana.org/domains/root/db/dabur.html
 dabur
 
-// dad : 2014-01-23 Charleston Road Registry Inc.
+// dad : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/dad.html
 dad
 
-// dance : 2013-10-24 Dog Beach, LLC
+// dance : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/dance.html
 dance
 
-// data : 2016-06-02 Dish DBS Corporation
+// data : Dish DBS Corporation
+// https://www.iana.org/domains/root/db/data.html
 data
 
-// date : 2014-11-20 dot Date Limited
+// date : dot Date Limited
+// https://www.iana.org/domains/root/db/date.html
 date
 
-// dating : 2013-12-05 Binky Moon, LLC
+// dating : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/dating.html
 dating
 
-// datsun : 2014-03-27 NISSAN MOTOR CO., LTD.
+// datsun : NISSAN MOTOR CO., LTD.
+// https://www.iana.org/domains/root/db/datsun.html
 datsun
 
-// day : 2014-01-30 Charleston Road Registry Inc.
+// day : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/day.html
 day
 
-// dclk : 2014-11-20 Charleston Road Registry Inc.
+// dclk : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/dclk.html
 dclk
 
-// dds : 2015-05-07 Registry Services, LLC
+// dds : Registry Services, LLC
+// https://www.iana.org/domains/root/db/dds.html
 dds
 
-// deal : 2015-06-25 Amazon Registry Services, Inc.
+// deal : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/deal.html
 deal
 
-// dealer : 2014-12-22 Intercap Registry Inc.
+// dealer : Intercap Registry Inc.
+// https://www.iana.org/domains/root/db/dealer.html
 dealer
 
-// deals : 2014-05-22 Binky Moon, LLC
+// deals : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/deals.html
 deals
 
-// degree : 2014-03-06 Dog Beach, LLC
+// degree : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/degree.html
 degree
 
-// delivery : 2014-09-11 Binky Moon, LLC
+// delivery : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/delivery.html
 delivery
 
-// dell : 2014-10-24 Dell Inc.
+// dell : Dell Inc.
+// https://www.iana.org/domains/root/db/dell.html
 dell
 
-// deloitte : 2015-07-31 Deloitte Touche Tohmatsu
+// deloitte : Deloitte Touche Tohmatsu
+// https://www.iana.org/domains/root/db/deloitte.html
 deloitte
 
-// delta : 2015-02-19 Delta Air Lines, Inc.
+// delta : Delta Air Lines, Inc.
+// https://www.iana.org/domains/root/db/delta.html
 delta
 
-// democrat : 2013-10-24 Dog Beach, LLC
+// democrat : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/democrat.html
 democrat
 
-// dental : 2014-03-20 Binky Moon, LLC
+// dental : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/dental.html
 dental
 
-// dentist : 2014-03-20 Dog Beach, LLC
+// dentist : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/dentist.html
 dentist
 
-// desi : 2013-11-14 Desi Networks LLC
+// desi : Desi Networks LLC
+// https://www.iana.org/domains/root/db/desi.html
 desi
 
-// design : 2014-11-07 Registry Services, LLC
+// design : Registry Services, LLC
+// https://www.iana.org/domains/root/db/design.html
 design
 
-// dev : 2014-10-16 Charleston Road Registry Inc.
+// dev : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/dev.html
 dev
 
-// dhl : 2015-07-23 Deutsche Post AG
+// dhl : Deutsche Post AG
+// https://www.iana.org/domains/root/db/dhl.html
 dhl
 
-// diamonds : 2013-09-22 Binky Moon, LLC
+// diamonds : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/diamonds.html
 diamonds
 
-// diet : 2014-06-26 XYZ.COM LLC
+// diet : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/diet.html
 diet
 
-// digital : 2014-03-06 Binky Moon, LLC
+// digital : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/digital.html
 digital
 
-// direct : 2014-04-10 Binky Moon, LLC
+// direct : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/direct.html
 direct
 
-// directory : 2013-09-20 Binky Moon, LLC
+// directory : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/directory.html
 directory
 
-// discount : 2014-03-06 Binky Moon, LLC
+// discount : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/discount.html
 discount
 
-// discover : 2015-07-23 Discover Financial Services
+// discover : Discover Financial Services
+// https://www.iana.org/domains/root/db/discover.html
 discover
 
-// dish : 2015-07-30 Dish DBS Corporation
+// dish : Dish DBS Corporation
+// https://www.iana.org/domains/root/db/dish.html
 dish
 
-// diy : 2015-11-05 Lifestyle Domain Holdings, Inc.
+// diy : Lifestyle Domain Holdings, Inc.
+// https://www.iana.org/domains/root/db/diy.html
 diy
 
-// dnp : 2013-12-13 Dai Nippon Printing Co., Ltd.
+// dnp : Dai Nippon Printing Co., Ltd.
+// https://www.iana.org/domains/root/db/dnp.html
 dnp
 
-// docs : 2014-10-16 Charleston Road Registry Inc.
+// docs : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/docs.html
 docs
 
-// doctor : 2016-06-02 Binky Moon, LLC
+// doctor : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/doctor.html
 doctor
 
-// dog : 2014-12-04 Binky Moon, LLC
+// dog : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/dog.html
 dog
 
-// domains : 2013-10-17 Binky Moon, LLC
+// domains : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/domains.html
 domains
 
-// dot : 2015-05-21 Dish DBS Corporation
+// dot : Dish DBS Corporation
+// https://www.iana.org/domains/root/db/dot.html
 dot
 
-// download : 2014-11-20 dot Support Limited
+// download : dot Support Limited
+// https://www.iana.org/domains/root/db/download.html
 download
 
-// drive : 2015-03-05 Charleston Road Registry Inc.
+// drive : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/drive.html
 drive
 
-// dtv : 2015-06-04 Dish DBS Corporation
+// dtv : Dish DBS Corporation
+// https://www.iana.org/domains/root/db/dtv.html
 dtv
 
-// dubai : 2015-01-01 Dubai Smart Government Department
+// dubai : Dubai Smart Government Department
+// https://www.iana.org/domains/root/db/dubai.html
 dubai
 
-// dunlop : 2015-07-02 The Goodyear Tire & Rubber Company
+// dunlop : The Goodyear Tire & Rubber Company
+// https://www.iana.org/domains/root/db/dunlop.html
 dunlop
 
-// dupont : 2015-06-25 DuPont Specialty Products USA, LLC
+// dupont : DuPont Specialty Products USA, LLC
+// https://www.iana.org/domains/root/db/dupont.html
 dupont
 
-// durban : 2014-03-24 ZA Central Registry NPC trading as ZA Central Registry
+// durban : ZA Central Registry NPC trading as ZA Central Registry
+// https://www.iana.org/domains/root/db/durban.html
 durban
 
-// dvag : 2014-06-23 Deutsche Vermögensberatung Aktiengesellschaft DVAG
+// dvag : Deutsche Vermögensberatung Aktiengesellschaft DVAG
+// https://www.iana.org/domains/root/db/dvag.html
 dvag
 
-// dvr : 2016-05-26 DISH Technologies L.L.C.
+// dvr : DISH Technologies L.L.C.
+// https://www.iana.org/domains/root/db/dvr.html
 dvr
 
-// earth : 2014-12-04 Interlink Systems Innovation Institute K.K.
+// earth : Interlink Systems Innovation Institute K.K.
+// https://www.iana.org/domains/root/db/earth.html
 earth
 
-// eat : 2014-01-23 Charleston Road Registry Inc.
+// eat : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/eat.html
 eat
 
-// eco : 2016-07-08 Big Room Inc.
+// eco : Big Room Inc.
+// https://www.iana.org/domains/root/db/eco.html
 eco
 
-// edeka : 2014-12-18 EDEKA Verband kaufmännischer Genossenschaften e.V.
+// edeka : EDEKA Verband kaufmännischer Genossenschaften e.V.
+// https://www.iana.org/domains/root/db/edeka.html
 edeka
 
-// education : 2013-11-07 Binky Moon, LLC
+// education : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/education.html
 education
 
-// email : 2013-10-31 Binky Moon, LLC
+// email : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/email.html
 email
 
-// emerck : 2014-04-03 Merck KGaA
+// emerck : Merck KGaA
+// https://www.iana.org/domains/root/db/emerck.html
 emerck
 
-// energy : 2014-09-11 Binky Moon, LLC
+// energy : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/energy.html
 energy
 
-// engineer : 2014-03-06 Dog Beach, LLC
+// engineer : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/engineer.html
 engineer
 
-// engineering : 2014-03-06 Binky Moon, LLC
+// engineering : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/engineering.html
 engineering
 
-// enterprises : 2013-09-20 Binky Moon, LLC
+// enterprises : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/enterprises.html
 enterprises
 
-// epson : 2014-12-04 Seiko Epson Corporation
+// epson : Seiko Epson Corporation
+// https://www.iana.org/domains/root/db/epson.html
 epson
 
-// equipment : 2013-08-27 Binky Moon, LLC
+// equipment : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/equipment.html
 equipment
 
-// ericsson : 2015-07-09 Telefonaktiebolaget L M Ericsson
+// ericsson : Telefonaktiebolaget L M Ericsson
+// https://www.iana.org/domains/root/db/ericsson.html
 ericsson
 
-// erni : 2014-04-03 ERNI Group Holding AG
+// erni : ERNI Group Holding AG
+// https://www.iana.org/domains/root/db/erni.html
 erni
 
-// esq : 2014-05-08 Charleston Road Registry Inc.
+// esq : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/esq.html
 esq
 
-// estate : 2013-08-27 Binky Moon, LLC
+// estate : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/estate.html
 estate
 
-// etisalat : 2015-09-03 Emirates Telecommunications Corporation (trading as 
Etisalat)
+// etisalat : Emirates Telecommunications Corporation (trading as Etisalat)
+// https://www.iana.org/domains/root/db/etisalat.html
 etisalat
 
-// eurovision : 2014-04-24 European Broadcasting Union (EBU)
+// eurovision : European Broadcasting Union (EBU)
+// https://www.iana.org/domains/root/db/eurovision.html
 eurovision
 
-// eus : 2013-12-12 Puntueus Fundazioa
+// eus : Puntueus Fundazioa
+// https://www.iana.org/domains/root/db/eus.html
 eus
 
-// events : 2013-12-05 Binky Moon, LLC
+// events : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/events.html
 events
 
-// exchange : 2014-03-06 Binky Moon, LLC
+// exchange : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/exchange.html
 exchange
 
-// expert : 2013-11-21 Binky Moon, LLC
+// expert : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/expert.html
 expert
 
-// exposed : 2013-12-05 Binky Moon, LLC
+// exposed : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/exposed.html
 exposed
 
-// express : 2015-02-11 Binky Moon, LLC
+// express : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/express.html
 express
 
-// extraspace : 2015-05-14 Extra Space Storage LLC
+// extraspace : Extra Space Storage LLC
+// https://www.iana.org/domains/root/db/extraspace.html
 extraspace
 
-// fage : 2014-12-18 Fage International S.A.
+// fage : Fage International S.A.
+// https://www.iana.org/domains/root/db/fage.html
 fage
 
-// fail : 2014-03-06 Binky Moon, LLC
+// fail : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/fail.html
 fail
 
-// fairwinds : 2014-11-13 FairWinds Partners, LLC
+// fairwinds : FairWinds Partners, LLC
+// https://www.iana.org/domains/root/db/fairwinds.html
 fairwinds
 
-// faith : 2014-11-20 dot Faith Limited
+// faith : dot Faith Limited
+// https://www.iana.org/domains/root/db/faith.html
 faith
 
-// family : 2015-04-02 Dog Beach, LLC
+// family : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/family.html
 family
 
-// fan : 2014-03-06 Dog Beach, LLC
+// fan : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/fan.html
 fan
 
-// fans : 2014-11-07 ZDNS International Limited
+// fans : ZDNS International Limited
+// https://www.iana.org/domains/root/db/fans.html
 fans
 
-// farm : 2013-11-07 Binky Moon, LLC
+// farm : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/farm.html
 farm
 
-// farmers : 2015-07-09 Farmers Insurance Exchange
+// farmers : Farmers Insurance Exchange
+// https://www.iana.org/domains/root/db/farmers.html
 farmers
 
-// fashion : 2014-07-03 Registry Services, LLC
+// fashion : Registry Services, LLC
+// https://www.iana.org/domains/root/db/fashion.html
 fashion
 
-// fast : 2014-12-18 Amazon Registry Services, Inc.
+// fast : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/fast.html
 fast
 
-// fedex : 2015-08-06 Federal Express Corporation
+// fedex : Federal Express Corporation
+// https://www.iana.org/domains/root/db/fedex.html
 fedex
 
-// feedback : 2013-12-19 Top Level Spectrum, Inc.
+// feedback : Top Level Spectrum, Inc.
+// https://www.iana.org/domains/root/db/feedback.html
 feedback
 
-// ferrari : 2015-07-31 Fiat Chrysler Automobiles N.V.
+// ferrari : Fiat Chrysler Automobiles N.V.
+// https://www.iana.org/domains/root/db/ferrari.html
 ferrari
 
-// ferrero : 2014-12-18 Ferrero Trading Lux S.A.
+// ferrero : Ferrero Trading Lux S.A.
+// https://www.iana.org/domains/root/db/ferrero.html
 ferrero
 
-// fiat : 2015-07-31 Fiat Chrysler Automobiles N.V.
-fiat
-
-// fidelity : 2015-07-30 Fidelity Brokerage Services LLC
+// fidelity : Fidelity Brokerage Services LLC
+// https://www.iana.org/domains/root/db/fidelity.html
 fidelity
 
-// fido : 2015-08-06 Rogers Communications Canada Inc.
+// fido : Rogers Communications Canada Inc.
+// https://www.iana.org/domains/root/db/fido.html
 fido
 
-// film : 2015-01-08 Motion Picture Domain Registry Pty Ltd
+// film : Motion Picture Domain Registry Pty Ltd
+// https://www.iana.org/domains/root/db/film.html
 film
 
-// final : 2014-10-16 Núcleo de Informação e Coordenação do Ponto BR - NIC.br
+// final : Núcleo de Informação e Coordenação do Ponto BR - NIC.br
+// https://www.iana.org/domains/root/db/final.html
 final
 
-// finance : 2014-03-20 Binky Moon, LLC
+// finance : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/finance.html
 finance
 
-// financial : 2014-03-06 Binky Moon, LLC
+// financial : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/financial.html
 financial
 
-// fire : 2015-06-25 Amazon Registry Services, Inc.
+// fire : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/fire.html
 fire
 
-// firestone : 2014-12-18 Bridgestone Licensing Services, Inc
+// firestone : Bridgestone Licensing Services, Inc
+// https://www.iana.org/domains/root/db/firestone.html
 firestone
 
-// firmdale : 2014-03-27 Firmdale Holdings Limited
+// firmdale : Firmdale Holdings Limited
+// https://www.iana.org/domains/root/db/firmdale.html
 firmdale
 
-// fish : 2013-12-12 Binky Moon, LLC
+// fish : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/fish.html
 fish
 
-// fishing : 2013-11-21 Registry Services, LLC
+// fishing : Registry Services, LLC
+// https://www.iana.org/domains/root/db/fishing.html
 fishing
 
-// fit : 2014-11-07 Registry Services, LLC
+// fit : Registry Services, LLC
+// https://www.iana.org/domains/root/db/fit.html
 fit
 
-// fitness : 2014-03-06 Binky Moon, LLC
+// fitness : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/fitness.html
 fitness
 
-// flickr : 2015-04-02 Flickr, Inc.
+// flickr : Flickr, Inc.
+// https://www.iana.org/domains/root/db/flickr.html
 flickr
 
-// flights : 2013-12-05 Binky Moon, LLC
+// flights : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/flights.html
 flights
 
-// flir : 2015-07-23 FLIR Systems, Inc.
+// flir : FLIR Systems, Inc.
+// https://www.iana.org/domains/root/db/flir.html
 flir
 
-// florist : 2013-11-07 Binky Moon, LLC
+// florist : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/florist.html
 florist
 
-// flowers : 2014-10-09 XYZ.COM LLC
+// flowers : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/flowers.html
 flowers
 
-// fly : 2014-05-08 Charleston Road Registry Inc.
+// fly : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/fly.html
 fly
 
-// foo : 2014-01-23 Charleston Road Registry Inc.
+// foo : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/foo.html
 foo
 
-// food : 2016-04-21 Lifestyle Domain Holdings, Inc.
+// food : Lifestyle Domain Holdings, Inc.
+// https://www.iana.org/domains/root/db/food.html
 food
 
-// foodnetwork : 2015-07-02 Lifestyle Domain Holdings, Inc.
-foodnetwork
-
-// football : 2014-12-18 Binky Moon, LLC
+// football : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/football.html
 football
 
-// ford : 2014-11-13 Ford Motor Company
+// ford : Ford Motor Company
+// https://www.iana.org/domains/root/db/ford.html
 ford
 
-// forex : 2014-12-11 Dog Beach, LLC
+// forex : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/forex.html
 forex
 
-// forsale : 2014-05-22 Dog Beach, LLC
+// forsale : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/forsale.html
 forsale
 
-// forum : 2015-04-02 Fegistry, LLC
+// forum : Fegistry, LLC
+// https://www.iana.org/domains/root/db/forum.html
 forum
 
-// foundation : 2013-12-05 Public Interest Registry
+// foundation : Public Interest Registry
+// https://www.iana.org/domains/root/db/foundation.html
 foundation
 
-// fox : 2015-09-11 FOX Registry, LLC
+// fox : FOX Registry, LLC
+// https://www.iana.org/domains/root/db/fox.html
 fox
 
-// free : 2015-12-10 Amazon Registry Services, Inc.
+// free : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/free.html
 free
 
-// fresenius : 2015-07-30 Fresenius Immobilien-Verwaltungs-GmbH
+// fresenius : Fresenius Immobilien-Verwaltungs-GmbH
+// https://www.iana.org/domains/root/db/fresenius.html
 fresenius
 
-// frl : 2014-05-15 FRLregistry B.V.
+// frl : FRLregistry B.V.
+// https://www.iana.org/domains/root/db/frl.html
 frl
 
-// frogans : 2013-12-19 OP3FT
+// frogans : OP3FT
+// https://www.iana.org/domains/root/db/frogans.html
 frogans
 
-// frontdoor : 2015-07-02 Lifestyle Domain Holdings, Inc.
+// frontdoor : Lifestyle Domain Holdings, Inc.
+// https://www.iana.org/domains/root/db/frontdoor.html
 frontdoor
 
-// frontier : 2015-02-05 Frontier Communications Corporation
+// frontier : Frontier Communications Corporation
+// https://www.iana.org/domains/root/db/frontier.html
 frontier
 
-// ftr : 2015-07-16 Frontier Communications Corporation
+// ftr : Frontier Communications Corporation
+// https://www.iana.org/domains/root/db/ftr.html
 ftr
 
-// fujitsu : 2015-07-30 Fujitsu Limited
+// fujitsu : Fujitsu Limited
+// https://www.iana.org/domains/root/db/fujitsu.html
 fujitsu
 
-// fun : 2016-01-14 Radix FZC
+// fun : Radix FZC DMCC
+// https://www.iana.org/domains/root/db/fun.html
 fun
 
-// fund : 2014-03-20 Binky Moon, LLC
+// fund : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/fund.html
 fund
 
-// furniture : 2014-03-20 Binky Moon, LLC
+// furniture : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/furniture.html
 furniture
 
-// futbol : 2013-09-20 Dog Beach, LLC
+// futbol : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/futbol.html
 futbol
 
-// fyi : 2015-04-02 Binky Moon, LLC
+// fyi : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/fyi.html
 fyi
 
-// gal : 2013-11-07 Asociación puntoGAL
+// gal : Asociación puntoGAL
+// https://www.iana.org/domains/root/db/gal.html
 gal
 
-// gallery : 2013-09-13 Binky Moon, LLC
+// gallery : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/gallery.html
 gallery
 
-// gallo : 2015-06-11 Gallo Vineyards, Inc.
+// gallo : Gallo Vineyards, Inc.
+// https://www.iana.org/domains/root/db/gallo.html
 gallo
 
-// gallup : 2015-02-19 Gallup, Inc.
+// gallup : Gallup, Inc.
+// https://www.iana.org/domains/root/db/gallup.html
 gallup
 
-// game : 2015-05-28 XYZ.COM LLC
+// game : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/game.html
 game
 
-// games : 2015-05-28 Dog Beach, LLC
+// games : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/games.html
 games
 
-// gap : 2015-07-31 The Gap, Inc.
+// gap : The Gap, Inc.
+// https://www.iana.org/domains/root/db/gap.html
 gap
 
-// garden : 2014-06-26 Registry Services, LLC
+// garden : Registry Services, LLC
+// https://www.iana.org/domains/root/db/garden.html
 garden
 
-// gay : 2019-05-23 Top Level Design, LLC
+// gay : Registry Services, LLC
+// https://www.iana.org/domains/root/db/gay.html
 gay
 
-// gbiz : 2014-07-17 Charleston Road Registry Inc.
+// gbiz : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/gbiz.html
 gbiz
 
-// gdn : 2014-07-31 Joint Stock Company "Navigation-information systems"
+// gdn : Joint Stock Company "Navigation-information systems"
+// https://www.iana.org/domains/root/db/gdn.html
 gdn
 
-// gea : 2014-12-04 GEA Group Aktiengesellschaft
+// gea : GEA Group Aktiengesellschaft
+// https://www.iana.org/domains/root/db/gea.html
 gea
 
-// gent : 2014-01-23 Easyhost BV
+// gent : Easyhost BV
+// https://www.iana.org/domains/root/db/gent.html
 gent
 
-// genting : 2015-03-12 Resorts World Inc Pte. Ltd.
+// genting : Resorts World Inc Pte. Ltd.
+// https://www.iana.org/domains/root/db/genting.html
 genting
 
-// george : 2015-07-31 Wal-Mart Stores, Inc.
+// george : Wal-Mart Stores, Inc.
+// https://www.iana.org/domains/root/db/george.html
 george
 
-// ggee : 2014-01-09 GMO Internet, Inc.
+// ggee : GMO Internet, Inc.
+// https://www.iana.org/domains/root/db/ggee.html
 ggee
 
-// gift : 2013-10-17 DotGift, LLC
+// gift : DotGift, LLC
+// https://www.iana.org/domains/root/db/gift.html
 gift
 
-// gifts : 2014-07-03 Binky Moon, LLC
+// gifts : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/gifts.html
 gifts
 
-// gives : 2014-03-06 Public Interest Registry
+// gives : Public Interest Registry
+// https://www.iana.org/domains/root/db/gives.html
 gives
 
-// giving : 2014-11-13 Public Interest Registry
+// giving : Public Interest Registry
+// https://www.iana.org/domains/root/db/giving.html
 giving
 
-// glass : 2013-11-07 Binky Moon, LLC
+// glass : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/glass.html
 glass
 
-// gle : 2014-07-24 Charleston Road Registry Inc.
+// gle : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/gle.html
 gle
 
-// global : 2014-04-17 Identity Digital Limited
+// global : Identity Digital Limited
+// https://www.iana.org/domains/root/db/global.html
 global
 
-// globo : 2013-12-19 Globo Comunicação e Participações S.A
+// globo : Globo Comunicação e Participações S.A
+// https://www.iana.org/domains/root/db/globo.html
 globo
 
-// gmail : 2014-05-01 Charleston Road Registry Inc.
+// gmail : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/gmail.html
 gmail
 
-// gmbh : 2016-01-29 Binky Moon, LLC
+// gmbh : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/gmbh.html
 gmbh
 
-// gmo : 2014-01-09 GMO Internet, Inc.
+// gmo : GMO Internet, Inc.
+// https://www.iana.org/domains/root/db/gmo.html
 gmo
 
-// gmx : 2014-04-24 1&1 Mail & Media GmbH
+// gmx : 1&1 Mail & Media GmbH
+// https://www.iana.org/domains/root/db/gmx.html
 gmx
 
-// godaddy : 2015-07-23 Go Daddy East, LLC
+// godaddy : Go Daddy East, LLC
+// https://www.iana.org/domains/root/db/godaddy.html
 godaddy
 
-// gold : 2015-01-22 Binky Moon, LLC
+// gold : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/gold.html
 gold
 
-// goldpoint : 2014-11-20 YODOBASHI CAMERA CO.,LTD.
+// goldpoint : YODOBASHI CAMERA CO.,LTD.
+// https://www.iana.org/domains/root/db/goldpoint.html
 goldpoint
 
-// golf : 2014-12-18 Binky Moon, LLC
+// golf : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/golf.html
 golf
 
-// goo : 2014-12-18 NTT Resonant Inc.
+// goo : NTT Resonant Inc.
+// https://www.iana.org/domains/root/db/goo.html
 goo
 
-// goodyear : 2015-07-02 The Goodyear Tire & Rubber Company
+// goodyear : The Goodyear Tire & Rubber Company
+// https://www.iana.org/domains/root/db/goodyear.html
 goodyear
 
-// goog : 2014-11-20 Charleston Road Registry Inc.
+// goog : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/goog.html
 goog
 
-// google : 2014-07-24 Charleston Road Registry Inc.
+// google : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/google.html
 google
 
-// gop : 2014-01-16 Republican State Leadership Committee, Inc.
+// gop : Republican State Leadership Committee, Inc.
+// https://www.iana.org/domains/root/db/gop.html
 gop
 
-// got : 2014-12-18 Amazon Registry Services, Inc.
+// got : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/got.html
 got
 
-// grainger : 2015-05-07 Grainger Registry Services, LLC
+// grainger : Grainger Registry Services, LLC
+// https://www.iana.org/domains/root/db/grainger.html
 grainger
 
-// graphics : 2013-09-13 Binky Moon, LLC
+// graphics : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/graphics.html
 graphics
 
-// gratis : 2014-03-20 Binky Moon, LLC
+// gratis : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/gratis.html
 gratis
 
-// green : 2014-05-08 Identity Digital Limited
+// green : Identity Digital Limited
+// https://www.iana.org/domains/root/db/green.html
 green
 
-// gripe : 2014-03-06 Binky Moon, LLC
+// gripe : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/gripe.html
 gripe
 
-// grocery : 2016-06-16 Wal-Mart Stores, Inc.
+// grocery : Wal-Mart Stores, Inc.
+// https://www.iana.org/domains/root/db/grocery.html
 grocery
 
-// group : 2014-08-15 Binky Moon, LLC
+// group : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/group.html
 group
 
-// guardian : 2015-07-30 The Guardian Life Insurance Company of America
+// guardian : The Guardian Life Insurance Company of America
+// https://www.iana.org/domains/root/db/guardian.html
 guardian
 
-// gucci : 2014-11-13 Guccio Gucci S.p.a.
+// gucci : Guccio Gucci S.p.a.
+// https://www.iana.org/domains/root/db/gucci.html
 gucci
 
-// guge : 2014-08-28 Charleston Road Registry Inc.
+// guge : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/guge.html
 guge
 
-// guide : 2013-09-13 Binky Moon, LLC
+// guide : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/guide.html
 guide
 
-// guitars : 2013-11-14 XYZ.COM LLC
+// guitars : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/guitars.html
 guitars
 
-// guru : 2013-08-27 Binky Moon, LLC
+// guru : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/guru.html
 guru
 
-// hair : 2015-12-03 XYZ.COM LLC
+// hair : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/hair.html
 hair
 
-// hamburg : 2014-02-20 Hamburg Top-Level-Domain GmbH
+// hamburg : Hamburg Top-Level-Domain GmbH
+// https://www.iana.org/domains/root/db/hamburg.html
 hamburg
 
-// hangout : 2014-11-13 Charleston Road Registry Inc.
+// hangout : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/hangout.html
 hangout
 
-// haus : 2013-12-05 Dog Beach, LLC
+// haus : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/haus.html
 haus
 
-// hbo : 2015-07-30 HBO Registry Services, Inc.
+// hbo : HBO Registry Services, Inc.
+// https://www.iana.org/domains/root/db/hbo.html
 hbo
 
-// hdfc : 2015-07-30 HOUSING DEVELOPMENT FINANCE CORPORATION LIMITED
+// hdfc : HOUSING DEVELOPMENT FINANCE CORPORATION LIMITED
+// https://www.iana.org/domains/root/db/hdfc.html
 hdfc
 
-// hdfcbank : 2015-02-12 HDFC Bank Limited
+// hdfcbank : HDFC Bank Limited
+// https://www.iana.org/domains/root/db/hdfcbank.html
 hdfcbank
 
-// health : 2015-02-11 DotHealth, LLC
+// health : Registry Services, LLC
+// https://www.iana.org/domains/root/db/health.html
 health
 
-// healthcare : 2014-06-12 Binky Moon, LLC
+// healthcare : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/healthcare.html
 healthcare
 
-// help : 2014-06-26 Innovation service Limited
+// help : Innovation service Limited
+// https://www.iana.org/domains/root/db/help.html
 help
 
-// helsinki : 2015-02-05 City of Helsinki
+// helsinki : City of Helsinki
+// https://www.iana.org/domains/root/db/helsinki.html
 helsinki
 
-// here : 2014-02-06 Charleston Road Registry Inc.
+// here : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/here.html
 here
 
-// hermes : 2014-07-10 HERMES INTERNATIONAL
+// hermes : HERMES INTERNATIONAL
+// https://www.iana.org/domains/root/db/hermes.html
 hermes
 
-// hgtv : 2015-07-02 Lifestyle Domain Holdings, Inc.
-hgtv
-
-// hiphop : 2014-03-06 Dot Hip Hop, LLC
+// hiphop : Dot Hip Hop, LLC
+// https://www.iana.org/domains/root/db/hiphop.html
 hiphop
 
-// hisamitsu : 2015-07-16 Hisamitsu Pharmaceutical Co.,Inc.
+// hisamitsu : Hisamitsu Pharmaceutical Co.,Inc.
+// https://www.iana.org/domains/root/db/hisamitsu.html
 hisamitsu
 
-// hitachi : 2014-10-31 Hitachi, Ltd.
+// hitachi : Hitachi, Ltd.
+// https://www.iana.org/domains/root/db/hitachi.html
 hitachi
 
-// hiv : 2014-03-13 Internet Naming Company LLC
+// hiv : Internet Naming Company LLC
+// https://www.iana.org/domains/root/db/hiv.html
 hiv
 
-// hkt : 2015-05-14 PCCW-HKT DataCom Services Limited
+// hkt : PCCW-HKT DataCom Services Limited
+// https://www.iana.org/domains/root/db/hkt.html
 hkt
 
-// hockey : 2015-03-19 Binky Moon, LLC
+// hockey : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/hockey.html
 hockey
 
-// holdings : 2013-08-27 Binky Moon, LLC
+// holdings : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/holdings.html
 holdings
 
-// holiday : 2013-11-07 Binky Moon, LLC
+// holiday : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/holiday.html
 holiday
 
-// homedepot : 2015-04-02 Home Depot Product Authority, LLC
+// homedepot : Home Depot Product Authority, LLC
+// https://www.iana.org/domains/root/db/homedepot.html
 homedepot
 
-// homegoods : 2015-07-16 The TJX Companies, Inc.
+// homegoods : The TJX Companies, Inc.
+// https://www.iana.org/domains/root/db/homegoods.html
 homegoods
 
-// homes : 2014-01-09 XYZ.COM LLC
+// homes : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/homes.html
 homes
 
-// homesense : 2015-07-16 The TJX Companies, Inc.
+// homesense : The TJX Companies, Inc.
+// https://www.iana.org/domains/root/db/homesense.html
 homesense
 
-// honda : 2014-12-18 Honda Motor Co., Ltd.
+// honda : Honda Motor Co., Ltd.
+// https://www.iana.org/domains/root/db/honda.html
 honda
 
-// horse : 2013-11-21 Registry Services, LLC
+// horse : Registry Services, LLC
+// https://www.iana.org/domains/root/db/horse.html
 horse
 
-// hospital : 2016-10-20 Binky Moon, LLC
+// hospital : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/hospital.html
 hospital
 
-// host : 2014-04-17 Radix FZC
+// host : Radix FZC DMCC
+// https://www.iana.org/domains/root/db/host.html
 host
 
-// hosting : 2014-05-29 XYZ.COM LLC
+// hosting : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/hosting.html
 hosting
 
-// hot : 2015-08-27 Amazon Registry Services, Inc.
+// hot : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/hot.html
 hot
 
-// hoteles : 2015-03-05 Travel Reservations SRL
-hoteles
-
-// hotels : 2016-04-07 Booking.com B.V.
+// hotels : Booking.com B.V.
+// https://www.iana.org/domains/root/db/hotels.html
 hotels
 
-// hotmail : 2014-12-18 Microsoft Corporation
+// hotmail : Microsoft Corporation
+// https://www.iana.org/domains/root/db/hotmail.html
 hotmail
 
-// house : 2013-11-07 Binky Moon, LLC
+// house : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/house.html
 house
 
-// how : 2014-01-23 Charleston Road Registry Inc.
+// how : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/how.html
 how
 
-// hsbc : 2014-10-24 HSBC Global Services (UK) Limited
+// hsbc : HSBC Global Services (UK) Limited
+// https://www.iana.org/domains/root/db/hsbc.html
 hsbc
 
-// hughes : 2015-07-30 Hughes Satellite Systems Corporation
+// hughes : Hughes Satellite Systems Corporation
+// https://www.iana.org/domains/root/db/hughes.html
 hughes
 
-// hyatt : 2015-07-30 Hyatt GTLD, L.L.C.
+// hyatt : Hyatt GTLD, L.L.C.
+// https://www.iana.org/domains/root/db/hyatt.html
 hyatt
 
-// hyundai : 2015-07-09 Hyundai Motor Company
+// hyundai : Hyundai Motor Company
+// https://www.iana.org/domains/root/db/hyundai.html
 hyundai
 
-// ibm : 2014-07-31 International Business Machines Corporation
+// ibm : International Business Machines Corporation
+// https://www.iana.org/domains/root/db/ibm.html
 ibm
 
-// icbc : 2015-02-19 Industrial and Commercial Bank of China Limited
+// icbc : Industrial and Commercial Bank of China Limited
+// https://www.iana.org/domains/root/db/icbc.html
 icbc
 
-// ice : 2014-10-30 IntercontinentalExchange, Inc.
+// ice : IntercontinentalExchange, Inc.
+// https://www.iana.org/domains/root/db/ice.html
 ice
 
-// icu : 2015-01-08 ShortDot SA
+// icu : ShortDot SA
+// https://www.iana.org/domains/root/db/icu.html
 icu
 
-// ieee : 2015-07-23 IEEE Global LLC
+// ieee : IEEE Global LLC
+// https://www.iana.org/domains/root/db/ieee.html
 ieee
 
-// ifm : 2014-01-30 ifm electronic gmbh
+// ifm : ifm electronic gmbh
+// https://www.iana.org/domains/root/db/ifm.html
 ifm
 
-// ikano : 2015-07-09 Ikano S.A.
+// ikano : Ikano S.A.
+// https://www.iana.org/domains/root/db/ikano.html
 ikano
 
-// imamat : 2015-08-06 Fondation Aga Khan (Aga Khan Foundation)
+// imamat : Fondation Aga Khan (Aga Khan Foundation)
+// https://www.iana.org/domains/root/db/imamat.html
 imamat
 
-// imdb : 2015-06-25 Amazon Registry Services, Inc.
+// imdb : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/imdb.html
 imdb
 
-// immo : 2014-07-10 Binky Moon, LLC
+// immo : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/immo.html
 immo
 
-// immobilien : 2013-11-07 Dog Beach, LLC
+// immobilien : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/immobilien.html
 immobilien
 
-// inc : 2018-03-10 Intercap Registry Inc.
+// inc : Intercap Registry Inc.
+// https://www.iana.org/domains/root/db/inc.html
 inc
 
-// industries : 2013-12-05 Binky Moon, LLC
+// industries : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/industries.html
 industries
 
-// infiniti : 2014-03-27 NISSAN MOTOR CO., LTD.
+// infiniti : NISSAN MOTOR CO., LTD.
+// https://www.iana.org/domains/root/db/infiniti.html
 infiniti
 
-// ing : 2014-01-23 Charleston Road Registry Inc.
+// ing : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/ing.html
 ing
 
-// ink : 2013-12-05 Top Level Design, LLC
+// ink : Registry Services, LLC
+// https://www.iana.org/domains/root/db/ink.html
 ink
 
-// institute : 2013-11-07 Binky Moon, LLC
+// institute : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/institute.html
 institute
 
-// insurance : 2015-02-19 fTLD Registry Services LLC
+// insurance : fTLD Registry Services LLC
+// https://www.iana.org/domains/root/db/insurance.html
 insurance
 
-// insure : 2014-03-20 Binky Moon, LLC
+// insure : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/insure.html
 insure
 
-// international : 2013-11-07 Binky Moon, LLC
+// international : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/international.html
 international
 
-// intuit : 2015-07-30 Intuit Administrative Services, Inc.
+// intuit : Intuit Administrative Services, Inc.
+// https://www.iana.org/domains/root/db/intuit.html
 intuit
 
-// investments : 2014-03-20 Binky Moon, LLC
+// investments : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/investments.html
 investments
 
-// ipiranga : 2014-08-28 Ipiranga Produtos de Petroleo S.A.
+// ipiranga : Ipiranga Produtos de Petroleo S.A.
+// https://www.iana.org/domains/root/db/ipiranga.html
 ipiranga
 
-// irish : 2014-08-07 Binky Moon, LLC
+// irish : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/irish.html
 irish
 
-// ismaili : 2015-08-06 Fondation Aga Khan (Aga Khan Foundation)
+// ismaili : Fondation Aga Khan (Aga Khan Foundation)
+// https://www.iana.org/domains/root/db/ismaili.html
 ismaili
 
-// ist : 2014-08-28 Istanbul Metropolitan Municipality
+// ist : Istanbul Metropolitan Municipality
+// https://www.iana.org/domains/root/db/ist.html
 ist
 
-// istanbul : 2014-08-28 Istanbul Metropolitan Municipality
+// istanbul : Istanbul Metropolitan Municipality
+// https://www.iana.org/domains/root/db/istanbul.html
 istanbul
 
-// itau : 2014-10-02 Itau Unibanco Holding S.A.
+// itau : Itau Unibanco Holding S.A.
+// https://www.iana.org/domains/root/db/itau.html
 itau
 
-// itv : 2015-07-09 ITV Services Limited
+// itv : ITV Services Limited
+// https://www.iana.org/domains/root/db/itv.html
 itv
 
-// jaguar : 2014-11-13 Jaguar Land Rover Ltd
+// jaguar : Jaguar Land Rover Ltd
+// https://www.iana.org/domains/root/db/jaguar.html
 jaguar
 
-// java : 2014-06-19 Oracle Corporation
+// java : Oracle Corporation
+// https://www.iana.org/domains/root/db/java.html
 java
 
-// jcb : 2014-11-20 JCB Co., Ltd.
+// jcb : JCB Co., Ltd.
+// https://www.iana.org/domains/root/db/jcb.html
 jcb
 
-// jeep : 2015-07-30 FCA US LLC.
+// jeep : FCA US LLC.
+// https://www.iana.org/domains/root/db/jeep.html
 jeep
 
-// jetzt : 2014-01-09 Binky Moon, LLC
+// jetzt : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/jetzt.html
 jetzt
 
-// jewelry : 2015-03-05 Binky Moon, LLC
+// jewelry : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/jewelry.html
 jewelry
 
-// jio : 2015-04-02 Reliance Industries Limited
+// jio : Reliance Industries Limited
+// https://www.iana.org/domains/root/db/jio.html
 jio
 
-// jll : 2015-04-02 Jones Lang LaSalle Incorporated
+// jll : Jones Lang LaSalle Incorporated
+// https://www.iana.org/domains/root/db/jll.html
 jll
 
-// jmp : 2015-03-26 Matrix IP LLC
+// jmp : Matrix IP LLC
+// https://www.iana.org/domains/root/db/jmp.html
 jmp
 
-// jnj : 2015-06-18 Johnson & Johnson Services, Inc.
+// jnj : Johnson & Johnson Services, Inc.
+// https://www.iana.org/domains/root/db/jnj.html
 jnj
 
-// joburg : 2014-03-24 ZA Central Registry NPC trading as ZA Central Registry
+// joburg : ZA Central Registry NPC trading as ZA Central Registry
+// https://www.iana.org/domains/root/db/joburg.html
 joburg
 
-// jot : 2014-12-18 Amazon Registry Services, Inc.
+// jot : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/jot.html
 jot
 
-// joy : 2014-12-18 Amazon Registry Services, Inc.
+// joy : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/joy.html
 joy
 
-// jpmorgan : 2015-04-30 JPMorgan Chase Bank, National Association
+// jpmorgan : JPMorgan Chase Bank, National Association
+// https://www.iana.org/domains/root/db/jpmorgan.html
 jpmorgan
 
-// jprs : 2014-09-18 Japan Registry Services Co., Ltd.
+// jprs : Japan Registry Services Co., Ltd.
+// https://www.iana.org/domains/root/db/jprs.html
 jprs
 
-// juegos : 2014-03-20 Internet Naming Company LLC
+// juegos : Internet Naming Company LLC
+// https://www.iana.org/domains/root/db/juegos.html
 juegos
 
-// juniper : 2015-07-30 JUNIPER NETWORKS, INC.
+// juniper : JUNIPER NETWORKS, INC.
+// https://www.iana.org/domains/root/db/juniper.html
 juniper
 
-// kaufen : 2013-11-07 Dog Beach, LLC
+// kaufen : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/kaufen.html
 kaufen
 
-// kddi : 2014-09-12 KDDI CORPORATION
+// kddi : KDDI CORPORATION
+// https://www.iana.org/domains/root/db/kddi.html
 kddi
 
-// kerryhotels : 2015-04-30 Kerry Trading Co. Limited
+// kerryhotels : Kerry Trading Co. Limited
+// https://www.iana.org/domains/root/db/kerryhotels.html
 kerryhotels
 
-// kerrylogistics : 2015-04-09 Kerry Trading Co. Limited
+// kerrylogistics : Kerry Trading Co. Limited
+// https://www.iana.org/domains/root/db/kerrylogistics.html
 kerrylogistics
 
-// kerryproperties : 2015-04-09 Kerry Trading Co. Limited
+// kerryproperties : Kerry Trading Co. Limited
+// https://www.iana.org/domains/root/db/kerryproperties.html
 kerryproperties
 
-// kfh : 2014-12-04 Kuwait Finance House
+// kfh : Kuwait Finance House
+// https://www.iana.org/domains/root/db/kfh.html
 kfh
 
-// kia : 2015-07-09 KIA MOTORS CORPORATION
+// kia : KIA MOTORS CORPORATION
+// https://www.iana.org/domains/root/db/kia.html
 kia
 
-// kids : 2021-08-13 DotKids Foundation Limited
+// kids : DotKids Foundation Limited
+// https://www.iana.org/domains/root/db/kids.html
 kids
 
-// kim : 2013-09-23 Identity Digital Limited
+// kim : Identity Digital Limited
+// https://www.iana.org/domains/root/db/kim.html
 kim
 
-// kinder : 2014-11-07 Ferrero Trading Lux S.A.
+// kinder : Ferrero Trading Lux S.A.
+// https://www.iana.org/domains/root/db/kinder.html
 kinder
 
-// kindle : 2015-06-25 Amazon Registry Services, Inc.
+// kindle : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/kindle.html
 kindle
 
-// kitchen : 2013-09-20 Binky Moon, LLC
+// kitchen : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/kitchen.html
 kitchen
 
-// kiwi : 2013-09-20 DOT KIWI LIMITED
+// kiwi : DOT KIWI LIMITED
+// https://www.iana.org/domains/root/db/kiwi.html
 kiwi
 
-// koeln : 2014-01-09 dotKoeln GmbH
+// koeln : dotKoeln GmbH
+// https://www.iana.org/domains/root/db/koeln.html
 koeln
 
-// komatsu : 2015-01-08 Komatsu Ltd.
+// komatsu : Komatsu Ltd.
+// https://www.iana.org/domains/root/db/komatsu.html
 komatsu
 
-// kosher : 2015-08-20 Kosher Marketing Assets LLC
+// kosher : Kosher Marketing Assets LLC
+// https://www.iana.org/domains/root/db/kosher.html
 kosher
 
-// kpmg : 2015-04-23 KPMG International Cooperative (KPMG International 
Genossenschaft)
+// kpmg : KPMG International Cooperative (KPMG International Genossenschaft)
+// https://www.iana.org/domains/root/db/kpmg.html
 kpmg
 
-// kpn : 2015-01-08 Koninklijke KPN N.V.
+// kpn : Koninklijke KPN N.V.
+// https://www.iana.org/domains/root/db/kpn.html
 kpn
 
-// krd : 2013-12-05 KRG Department of Information Technology
+// krd : KRG Department of Information Technology
+// https://www.iana.org/domains/root/db/krd.html
 krd
 
-// kred : 2013-12-19 KredTLD Pty Ltd
+// kred : KredTLD Pty Ltd
+// https://www.iana.org/domains/root/db/kred.html
 kred
 
-// kuokgroup : 2015-04-09 Kerry Trading Co. Limited
+// kuokgroup : Kerry Trading Co. Limited
+// https://www.iana.org/domains/root/db/kuokgroup.html
 kuokgroup
 
-// kyoto : 2014-11-07 Academic Institution: Kyoto Jyoho Gakuen
+// kyoto : Academic Institution: Kyoto Jyoho Gakuen
+// https://www.iana.org/domains/root/db/kyoto.html
 kyoto
 
-// lacaixa : 2014-01-09 Fundación Bancaria Caixa d’Estalvis i Pensions de 
Barcelona, “la Caixa”
+// lacaixa : Fundación Bancaria Caixa d’Estalvis i Pensions de Barcelona, “la 
Caixa”
+// https://www.iana.org/domains/root/db/lacaixa.html
 lacaixa
 
-// lamborghini : 2015-06-04 Automobili Lamborghini S.p.A.
+// lamborghini : Automobili Lamborghini S.p.A.
+// https://www.iana.org/domains/root/db/lamborghini.html
 lamborghini
 
-// lamer : 2015-10-01 The Estée Lauder Companies Inc.
+// lamer : The Estée Lauder Companies Inc.
+// https://www.iana.org/domains/root/db/lamer.html
 lamer
 
-// lancaster : 2015-02-12 LANCASTER
+// lancaster : LANCASTER
+// https://www.iana.org/domains/root/db/lancaster.html
 lancaster
 
-// lancia : 2015-07-31 Fiat Chrysler Automobiles N.V.
-lancia
-
-// land : 2013-09-10 Binky Moon, LLC
+// land : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/land.html
 land
 
-// landrover : 2014-11-13 Jaguar Land Rover Ltd
+// landrover : Jaguar Land Rover Ltd
+// https://www.iana.org/domains/root/db/landrover.html
 landrover
 
-// lanxess : 2015-07-30 LANXESS Corporation
+// lanxess : LANXESS Corporation
+// https://www.iana.org/domains/root/db/lanxess.html
 lanxess
 
-// lasalle : 2015-04-02 Jones Lang LaSalle Incorporated
+// lasalle : Jones Lang LaSalle Incorporated
+// https://www.iana.org/domains/root/db/lasalle.html
 lasalle
 
-// lat : 2014-10-16 XYZ.COM LLC
+// lat : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/lat.html
 lat
 
-// latino : 2015-07-30 Dish DBS Corporation
+// latino : Dish DBS Corporation
+// https://www.iana.org/domains/root/db/latino.html
 latino
 
-// latrobe : 2014-06-16 La Trobe University
+// latrobe : La Trobe University
+// https://www.iana.org/domains/root/db/latrobe.html
 latrobe
 
-// law : 2015-01-22 Registry Services, LLC
+// law : Registry Services, LLC
+// https://www.iana.org/domains/root/db/law.html
 law
 
-// lawyer : 2014-03-20 Dog Beach, LLC
+// lawyer : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/lawyer.html
 lawyer
 
-// lds : 2014-03-20 IRI Domain Management, LLC
+// lds : IRI Domain Management, LLC
+// https://www.iana.org/domains/root/db/lds.html
 lds
 
-// lease : 2014-03-06 Binky Moon, LLC
+// lease : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/lease.html
 lease
 
-// leclerc : 2014-08-07 A.C.D. LEC Association des Centres Distributeurs 
Edouard Leclerc
+// leclerc : A.C.D. LEC Association des Centres Distributeurs Edouard Leclerc
+// https://www.iana.org/domains/root/db/leclerc.html
 leclerc
 
-// lefrak : 2015-07-16 LeFrak Organization, Inc.
+// lefrak : LeFrak Organization, Inc.
+// https://www.iana.org/domains/root/db/lefrak.html
 lefrak
 
-// legal : 2014-10-16 Binky Moon, LLC
+// legal : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/legal.html
 legal
 
-// lego : 2015-07-16 LEGO Juris A/S
+// lego : LEGO Juris A/S
+// https://www.iana.org/domains/root/db/lego.html
 lego
 
-// lexus : 2015-04-23 TOYOTA MOTOR CORPORATION
+// lexus : TOYOTA MOTOR CORPORATION
+// https://www.iana.org/domains/root/db/lexus.html
 lexus
 
-// lgbt : 2014-05-08 Identity Digital Limited
+// lgbt : Identity Digital Limited
+// https://www.iana.org/domains/root/db/lgbt.html
 lgbt
 
-// lidl : 2014-09-18 Schwarz Domains und Services GmbH & Co. KG
+// lidl : Schwarz Domains und Services GmbH & Co. KG
+// https://www.iana.org/domains/root/db/lidl.html
 lidl
 
-// life : 2014-02-06 Binky Moon, LLC
+// life : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/life.html
 life
 
-// lifeinsurance : 2015-01-15 American Council of Life Insurers
+// lifeinsurance : American Council of Life Insurers
+// https://www.iana.org/domains/root/db/lifeinsurance.html
 lifeinsurance
 
-// lifestyle : 2014-12-11 Lifestyle Domain Holdings, Inc.
+// lifestyle : Lifestyle Domain Holdings, Inc.
+// https://www.iana.org/domains/root/db/lifestyle.html
 lifestyle
 
-// lighting : 2013-08-27 Binky Moon, LLC
+// lighting : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/lighting.html
 lighting
 
-// like : 2014-12-18 Amazon Registry Services, Inc.
+// like : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/like.html
 like
 
-// lilly : 2015-07-31 Eli Lilly and Company
+// lilly : Eli Lilly and Company
+// https://www.iana.org/domains/root/db/lilly.html
 lilly
 
-// limited : 2014-03-06 Binky Moon, LLC
+// limited : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/limited.html
 limited
 
-// limo : 2013-10-17 Binky Moon, LLC
+// limo : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/limo.html
 limo
 
-// lincoln : 2014-11-13 Ford Motor Company
+// lincoln : Ford Motor Company
+// https://www.iana.org/domains/root/db/lincoln.html
 lincoln
 
-// link : 2013-11-14 Nova Registry Ltd
+// link : Nova Registry Ltd
+// https://www.iana.org/domains/root/db/link.html
 link
 
-// lipsy : 2015-06-25 Lipsy Ltd
+// lipsy : Lipsy Ltd
+// https://www.iana.org/domains/root/db/lipsy.html
 lipsy
 
-// live : 2014-12-04 Dog Beach, LLC
+// live : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/live.html
 live
 
-// living : 2015-07-30 Lifestyle Domain Holdings, Inc.
+// living : Lifestyle Domain Holdings, Inc.
+// https://www.iana.org/domains/root/db/living.html
 living
 
-// llc : 2017-12-14 Identity Digital Limited
+// llc : Identity Digital Limited
+// https://www.iana.org/domains/root/db/llc.html
 llc
 
-// llp : 2019-08-26 Intercap Registry Inc.
+// llp : Intercap Registry Inc.
+// https://www.iana.org/domains/root/db/llp.html
 llp
 
-// loan : 2014-11-20 dot Loan Limited
+// loan : dot Loan Limited
+// https://www.iana.org/domains/root/db/loan.html
 loan
 
-// loans : 2014-03-20 Binky Moon, LLC
+// loans : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/loans.html
 loans
 
-// locker : 2015-06-04 Dish DBS Corporation
+// locker : Orange Domains LLC
+// https://www.iana.org/domains/root/db/locker.html
 locker
 
-// locus : 2015-06-25 Locus Analytics LLC
+// locus : Locus Analytics LLC
+// https://www.iana.org/domains/root/db/locus.html
 locus
 
-// lol : 2015-01-30 XYZ.COM LLC
+// lol : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/lol.html
 lol
 
-// london : 2013-11-14 Dot London Domains Limited
+// london : Dot London Domains Limited
+// https://www.iana.org/domains/root/db/london.html
 london
 
-// lotte : 2014-11-07 Lotte Holdings Co., Ltd.
+// lotte : Lotte Holdings Co., Ltd.
+// https://www.iana.org/domains/root/db/lotte.html
 lotte
 
-// lotto : 2014-04-10 Identity Digital Limited
+// lotto : Identity Digital Limited
+// https://www.iana.org/domains/root/db/lotto.html
 lotto
 
-// love : 2014-12-22 Merchant Law Group LLP
+// love : Merchant Law Group LLP
+// https://www.iana.org/domains/root/db/love.html
 love
 
-// lpl : 2015-07-30 LPL Holdings, Inc.
+// lpl : LPL Holdings, Inc.
+// https://www.iana.org/domains/root/db/lpl.html
 lpl
 
-// lplfinancial : 2015-07-30 LPL Holdings, Inc.
+// lplfinancial : LPL Holdings, Inc.
+// https://www.iana.org/domains/root/db/lplfinancial.html
 lplfinancial
 
-// ltd : 2014-09-25 Binky Moon, LLC
+// ltd : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/ltd.html
 ltd
 
-// ltda : 2014-04-17 InterNetX, Corp
+// ltda : InterNetX, Corp
+// https://www.iana.org/domains/root/db/ltda.html
 ltda
 
-// lundbeck : 2015-08-06 H. Lundbeck A/S
+// lundbeck : H. Lundbeck A/S
+// https://www.iana.org/domains/root/db/lundbeck.html
 lundbeck
 
-// luxe : 2014-01-09 Registry Services, LLC
+// luxe : Registry Services, LLC
+// https://www.iana.org/domains/root/db/luxe.html
 luxe
 
-// luxury : 2013-10-17 Luxury Partners, LLC
+// luxury : Luxury Partners, LLC
+// https://www.iana.org/domains/root/db/luxury.html
 luxury
 
-// madrid : 2014-05-01 Comunidad de Madrid
+// madrid : Comunidad de Madrid
+// https://www.iana.org/domains/root/db/madrid.html
 madrid
 
-// maif : 2014-10-02 Mutuelle Assurance Instituteur France (MAIF)
+// maif : Mutuelle Assurance Instituteur France (MAIF)
+// https://www.iana.org/domains/root/db/maif.html
 maif
 
-// maison : 2013-12-05 Binky Moon, LLC
+// maison : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/maison.html
 maison
 
-// makeup : 2015-01-15 XYZ.COM LLC
+// makeup : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/makeup.html
 makeup
 
-// man : 2014-12-04 MAN SE
+// man : MAN SE
+// https://www.iana.org/domains/root/db/man.html
 man
 
-// management : 2013-11-07 Binky Moon, LLC
+// management : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/management.html
 management
 
-// mango : 2013-10-24 PUNTO FA S.L.
+// mango : PUNTO FA S.L.
+// https://www.iana.org/domains/root/db/mango.html
 mango
 
-// map : 2016-06-09 Charleston Road Registry Inc.
+// map : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/map.html
 map
 
-// market : 2014-03-06 Dog Beach, LLC
+// market : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/market.html
 market
 
-// marketing : 2013-11-07 Binky Moon, LLC
+// marketing : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/marketing.html
 marketing
 
-// markets : 2014-12-11 Dog Beach, LLC
+// markets : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/markets.html
 markets
 
-// marriott : 2014-10-09 Marriott Worldwide Corporation
+// marriott : Marriott Worldwide Corporation
+// https://www.iana.org/domains/root/db/marriott.html
 marriott
 
-// marshalls : 2015-07-16 The TJX Companies, Inc.
+// marshalls : The TJX Companies, Inc.
+// https://www.iana.org/domains/root/db/marshalls.html
 marshalls
 
-// maserati : 2015-07-31 Fiat Chrysler Automobiles N.V.
-maserati
-
-// mattel : 2015-08-06 Mattel Sites, Inc.
+// mattel : Mattel Sites, Inc.
+// https://www.iana.org/domains/root/db/mattel.html
 mattel
 
-// mba : 2015-04-02 Binky Moon, LLC
+// mba : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/mba.html
 mba
 
-// mckinsey : 2015-07-31 McKinsey Holdings, Inc.
+// mckinsey : McKinsey Holdings, Inc.
+// https://www.iana.org/domains/root/db/mckinsey.html
 mckinsey
 
-// med : 2015-08-06 Medistry LLC
+// med : Medistry LLC
+// https://www.iana.org/domains/root/db/med.html
 med
 
-// media : 2014-03-06 Binky Moon, LLC
+// media : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/media.html
 media
 
-// meet : 2014-01-16 Charleston Road Registry Inc.
+// meet : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/meet.html
 meet
 
-// melbourne : 2014-05-29 The Crown in right of the State of Victoria, 
represented by its Department of State Development, Business and Innovation
+// melbourne : The Crown in right of the State of Victoria, represented by its 
Department of State Development, Business and Innovation
+// https://www.iana.org/domains/root/db/melbourne.html
 melbourne
 
-// meme : 2014-01-30 Charleston Road Registry Inc.
+// meme : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/meme.html
 meme
 
-// memorial : 2014-10-16 Dog Beach, LLC
+// memorial : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/memorial.html
 memorial
 
-// men : 2015-02-26 Exclusive Registry Limited
+// men : Exclusive Registry Limited
+// https://www.iana.org/domains/root/db/men.html
 men
 
-// menu : 2013-09-11 Dot Menu Registry, LLC
+// menu : Dot Menu Registry, LLC
+// https://www.iana.org/domains/root/db/menu.html
 menu
 
-// merckmsd : 2016-07-14 MSD Registry Holdings, Inc.
+// merckmsd : MSD Registry Holdings, Inc.
+// https://www.iana.org/domains/root/db/merckmsd.html
 merckmsd
 
-// miami : 2013-12-19 Registry Services, LLC
+// miami : Registry Services, LLC
+// https://www.iana.org/domains/root/db/miami.html
 miami
 
-// microsoft : 2014-12-18 Microsoft Corporation
+// microsoft : Microsoft Corporation
+// https://www.iana.org/domains/root/db/microsoft.html
 microsoft
 
-// mini : 2014-01-09 Bayerische Motoren Werke Aktiengesellschaft
+// mini : Bayerische Motoren Werke Aktiengesellschaft
+// https://www.iana.org/domains/root/db/mini.html
 mini
 
-// mint : 2015-07-30 Intuit Administrative Services, Inc.
+// mint : Intuit Administrative Services, Inc.
+// https://www.iana.org/domains/root/db/mint.html
 mint
 
-// mit : 2015-07-02 Massachusetts Institute of Technology
+// mit : Massachusetts Institute of Technology
+// https://www.iana.org/domains/root/db/mit.html
 mit
 
-// mitsubishi : 2015-07-23 Mitsubishi Corporation
+// mitsubishi : Mitsubishi Corporation
+// https://www.iana.org/domains/root/db/mitsubishi.html
 mitsubishi
 
-// mlb : 2015-05-21 MLB Advanced Media DH, LLC
+// mlb : MLB Advanced Media DH, LLC
+// https://www.iana.org/domains/root/db/mlb.html
 mlb
 
-// mls : 2015-04-23 The Canadian Real Estate Association
+// mls : The Canadian Real Estate Association
+// https://www.iana.org/domains/root/db/mls.html
 mls
 
-// mma : 2014-11-07 MMA IARD
+// mma : MMA IARD
+// https://www.iana.org/domains/root/db/mma.html
 mma
 
-// mobile : 2016-06-02 Dish DBS Corporation
+// mobile : Dish DBS Corporation
+// https://www.iana.org/domains/root/db/mobile.html
 mobile
 
-// moda : 2013-11-07 Dog Beach, LLC
+// moda : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/moda.html
 moda
 
-// moe : 2013-11-13 Interlink Systems Innovation Institute K.K.
+// moe : Interlink Systems Innovation Institute K.K.
+// https://www.iana.org/domains/root/db/moe.html
 moe
 
-// moi : 2014-12-18 Amazon Registry Services, Inc.
+// moi : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/moi.html
 moi
 
-// mom : 2015-04-16 XYZ.COM LLC
+// mom : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/mom.html
 mom
 
-// monash : 2013-09-30 Monash University
+// monash : Monash University
+// https://www.iana.org/domains/root/db/monash.html
 monash
 
-// money : 2014-10-16 Binky Moon, LLC
+// money : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/money.html
 money
 
-// monster : 2015-09-11 XYZ.COM LLC
+// monster : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/monster.html
 monster
 
-// mormon : 2013-12-05 IRI Domain Management, LLC
+// mormon : IRI Domain Management, LLC
+// https://www.iana.org/domains/root/db/mormon.html
 mormon
 
-// mortgage : 2014-03-20 Dog Beach, LLC
+// mortgage : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/mortgage.html
 mortgage
 
-// moscow : 2013-12-19 Foundation for Assistance for Internet Technologies and 
Infrastructure Development (FAITID)
+// moscow : Foundation for Assistance for Internet Technologies and 
Infrastructure Development (FAITID)
+// https://www.iana.org/domains/root/db/moscow.html
 moscow
 
-// moto : 2015-06-04 Motorola Trademark Holdings, LLC
+// moto : Motorola Trademark Holdings, LLC
+// https://www.iana.org/domains/root/db/moto.html
 moto
 
-// motorcycles : 2014-01-09 XYZ.COM LLC
+// motorcycles : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/motorcycles.html
 motorcycles
 
-// mov : 2014-01-30 Charleston Road Registry Inc.
+// mov : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/mov.html
 mov
 
-// movie : 2015-02-05 Binky Moon, LLC
+// movie : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/movie.html
 movie
 
-// msd : 2015-07-23 MSD Registry Holdings, Inc.
+// msd : MSD Registry Holdings, Inc.
+// https://www.iana.org/domains/root/db/msd.html
 msd
 
-// mtn : 2014-12-04 MTN Dubai Limited
+// mtn : MTN Dubai Limited
+// https://www.iana.org/domains/root/db/mtn.html
 mtn
 
-// mtr : 2015-03-12 MTR Corporation Limited
+// mtr : MTR Corporation Limited
+// https://www.iana.org/domains/root/db/mtr.html
 mtr
 
-// music : 2021-05-04 DotMusic Limited
+// music : DotMusic Limited
+// https://www.iana.org/domains/root/db/music.html
 music
 
-// mutual : 2015-04-02 Northwestern Mutual MU TLD Registry, LLC
-mutual
-
-// nab : 2015-08-20 National Australia Bank Limited
+// nab : National Australia Bank Limited
+// https://www.iana.org/domains/root/db/nab.html
 nab
 
-// nagoya : 2013-10-24 GMO Registry, Inc.
+// nagoya : GMO Registry, Inc.
+// https://www.iana.org/domains/root/db/nagoya.html
 nagoya
 
-// natura : 2015-03-12 NATURA COSMÉTICOS S.A.
+// natura : NATURA COSMÉTICOS S.A.
+// https://www.iana.org/domains/root/db/natura.html
 natura
 
-// navy : 2014-03-06 Dog Beach, LLC
+// navy : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/navy.html
 navy
 
-// nba : 2015-07-31 NBA REGISTRY, LLC
+// nba : NBA REGISTRY, LLC
+// https://www.iana.org/domains/root/db/nba.html
 nba
 
-// nec : 2015-01-08 NEC Corporation
+// nec : NEC Corporation
+// https://www.iana.org/domains/root/db/nec.html
 nec
 
-// netbank : 2014-06-26 COMMONWEALTH BANK OF AUSTRALIA
+// netbank : COMMONWEALTH BANK OF AUSTRALIA
+// https://www.iana.org/domains/root/db/netbank.html
 netbank
 
-// netflix : 2015-06-18 Netflix, Inc.
+// netflix : Netflix, Inc.
+// https://www.iana.org/domains/root/db/netflix.html
 netflix
 
-// network : 2013-11-14 Binky Moon, LLC
+// network : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/network.html
 network
 
-// neustar : 2013-12-05 NeuStar, Inc.
+// neustar : NeuStar, Inc.
+// https://www.iana.org/domains/root/db/neustar.html
 neustar
 
-// new : 2014-01-30 Charleston Road Registry Inc.
+// new : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/new.html
 new
 
-// news : 2014-12-18 Dog Beach, LLC
+// news : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/news.html
 news
 
-// next : 2015-06-18 Next plc
+// next : Next plc
+// https://www.iana.org/domains/root/db/next.html
 next
 
-// nextdirect : 2015-06-18 Next plc
+// nextdirect : Next plc
+// https://www.iana.org/domains/root/db/nextdirect.html
 nextdirect
 
-// nexus : 2014-07-24 Charleston Road Registry Inc.
+// nexus : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/nexus.html
 nexus
 
-// nfl : 2015-07-23 NFL Reg Ops LLC
+// nfl : NFL Reg Ops LLC
+// https://www.iana.org/domains/root/db/nfl.html
 nfl
 
-// ngo : 2014-03-06 Public Interest Registry
+// ngo : Public Interest Registry
+// https://www.iana.org/domains/root/db/ngo.html
 ngo
 
-// nhk : 2014-02-13 Japan Broadcasting Corporation (NHK)
+// nhk : Japan Broadcasting Corporation (NHK)
+// https://www.iana.org/domains/root/db/nhk.html
 nhk
 
-// nico : 2014-12-04 DWANGO Co., Ltd.
+// nico : DWANGO Co., Ltd.
+// https://www.iana.org/domains/root/db/nico.html
 nico
 
-// nike : 2015-07-23 NIKE, Inc.
+// nike : NIKE, Inc.
+// https://www.iana.org/domains/root/db/nike.html
 nike
 
-// nikon : 2015-05-21 NIKON CORPORATION
+// nikon : NIKON CORPORATION
+// https://www.iana.org/domains/root/db/nikon.html
 nikon
 
-// ninja : 2013-11-07 Dog Beach, LLC
+// ninja : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/ninja.html
 ninja
 
-// nissan : 2014-03-27 NISSAN MOTOR CO., LTD.
+// nissan : NISSAN MOTOR CO., LTD.
+// https://www.iana.org/domains/root/db/nissan.html
 nissan
 
-// nissay : 2015-10-29 Nippon Life Insurance Company
+// nissay : Nippon Life Insurance Company
+// https://www.iana.org/domains/root/db/nissay.html
 nissay
 
-// nokia : 2015-01-08 Nokia Corporation
+// nokia : Nokia Corporation
+// https://www.iana.org/domains/root/db/nokia.html
 nokia
 
-// northwesternmutual : 2015-06-18 Northwestern Mutual Registry, LLC
-northwesternmutual
-
-// norton : 2014-12-04 NortonLifeLock Inc.
+// norton : NortonLifeLock Inc.
+// https://www.iana.org/domains/root/db/norton.html
 norton
 
-// now : 2015-06-25 Amazon Registry Services, Inc.
+// now : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/now.html
 now
 
-// nowruz : 2014-09-04 Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti.
+// nowruz : Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti.
+// https://www.iana.org/domains/root/db/nowruz.html
 nowruz
 
-// nowtv : 2015-05-14 Starbucks (HK) Limited
+// nowtv : Starbucks (HK) Limited
+// https://www.iana.org/domains/root/db/nowtv.html
 nowtv
 
-// nra : 2014-05-22 NRA Holdings Company, INC.
+// nra : NRA Holdings Company, INC.
+// https://www.iana.org/domains/root/db/nra.html
 nra
 
-// nrw : 2013-11-21 Minds + Machines GmbH
+// nrw : Minds + Machines GmbH
+// https://www.iana.org/domains/root/db/nrw.html
 nrw
 
-// ntt : 2014-10-31 NIPPON TELEGRAPH AND TELEPHONE CORPORATION
+// ntt : NIPPON TELEGRAPH AND TELEPHONE CORPORATION
+// https://www.iana.org/domains/root/db/ntt.html
 ntt
 
-// nyc : 2014-01-23 The City of New York by and through the New York City 
Department of Information Technology & Telecommunications
+// nyc : The City of New York by and through the New York City Department of 
Information Technology & Telecommunications
+// https://www.iana.org/domains/root/db/nyc.html
 nyc
 
-// obi : 2014-09-25 OBI Group Holding SE & Co. KGaA
+// obi : OBI Group Holding SE & Co. KGaA
+// https://www.iana.org/domains/root/db/obi.html
 obi
 
-// observer : 2015-04-30 Dog Beach, LLC
+// observer : Fegistry, LLC
+// https://www.iana.org/domains/root/db/observer.html
 observer
 
-// office : 2015-03-12 Microsoft Corporation
+// office : Microsoft Corporation
+// https://www.iana.org/domains/root/db/office.html
 office
 
-// okinawa : 2013-12-05 BRregistry, Inc.
+// okinawa : BRregistry, Inc.
+// https://www.iana.org/domains/root/db/okinawa.html
 okinawa
 
-// olayan : 2015-05-14 Crescent Holding GmbH
+// olayan : Competrol (Luxembourg) Sarl
+// https://www.iana.org/domains/root/db/olayan.html
 olayan
 
-// olayangroup : 2015-05-14 Crescent Holding GmbH
+// olayangroup : Competrol (Luxembourg) Sarl
+// https://www.iana.org/domains/root/db/olayangroup.html
 olayangroup
 
-// oldnavy : 2015-07-31 The Gap, Inc.
+// oldnavy : The Gap, Inc.
+// https://www.iana.org/domains/root/db/oldnavy.html
 oldnavy
 
-// ollo : 2015-06-04 Dish DBS Corporation
+// ollo : Dish DBS Corporation
+// https://www.iana.org/domains/root/db/ollo.html
 ollo
 
-// omega : 2015-01-08 The Swatch Group Ltd
+// omega : The Swatch Group Ltd
+// https://www.iana.org/domains/root/db/omega.html
 omega
 
-// one : 2014-11-07 One.com A/S
+// one : One.com A/S
+// https://www.iana.org/domains/root/db/one.html
 one
 
-// ong : 2014-03-06 Public Interest Registry
+// ong : Public Interest Registry
+// https://www.iana.org/domains/root/db/ong.html
 ong
 
-// onl : 2013-09-16 iRegistry GmbH
+// onl : iRegistry GmbH
+// https://www.iana.org/domains/root/db/onl.html
 onl
 
-// online : 2015-01-15 Radix FZC
+// online : Radix FZC DMCC
+// https://www.iana.org/domains/root/db/online.html
 online
 
-// ooo : 2014-01-09 INFIBEAM AVENUES LIMITED
+// ooo : INFIBEAM AVENUES LIMITED
+// https://www.iana.org/domains/root/db/ooo.html
 ooo
 
-// open : 2015-07-31 American Express Travel Related Services Company, Inc.
+// open : American Express Travel Related Services Company, Inc.
+// https://www.iana.org/domains/root/db/open.html
 open
 
-// oracle : 2014-06-19 Oracle Corporation
+// oracle : Oracle Corporation
+// https://www.iana.org/domains/root/db/oracle.html
 oracle
 
-// orange : 2015-03-12 Orange Brand Services Limited
+// orange : Orange Brand Services Limited
+// https://www.iana.org/domains/root/db/orange.html
 orange
 
-// organic : 2014-03-27 Identity Digital Limited
+// organic : Identity Digital Limited
+// https://www.iana.org/domains/root/db/organic.html
 organic
 
-// origins : 2015-10-01 The Estée Lauder Companies Inc.
+// origins : The Estée Lauder Companies Inc.
+// https://www.iana.org/domains/root/db/origins.html
 origins
 
-// osaka : 2014-09-04 Osaka Registry Co., Ltd.
+// osaka : Osaka Registry Co., Ltd.
+// https://www.iana.org/domains/root/db/osaka.html
 osaka
 
-// otsuka : 2013-10-11 Otsuka Holdings Co., Ltd.
+// otsuka : Otsuka Holdings Co., Ltd.
+// https://www.iana.org/domains/root/db/otsuka.html
 otsuka
 
-// ott : 2015-06-04 Dish DBS Corporation
+// ott : Dish DBS Corporation
+// https://www.iana.org/domains/root/db/ott.html
 ott
 
-// ovh : 2014-01-16 MédiaBC
+// ovh : MédiaBC
+// https://www.iana.org/domains/root/db/ovh.html
 ovh
 
-// page : 2014-12-04 Charleston Road Registry Inc.
+// page : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/page.html
 page
 
-// panasonic : 2015-07-30 Panasonic Corporation
+// panasonic : Panasonic Holdings Corporation
+// https://www.iana.org/domains/root/db/panasonic.html
 panasonic
 
-// paris : 2014-01-30 City of Paris
+// paris : City of Paris
+// https://www.iana.org/domains/root/db/paris.html
 paris
 
-// pars : 2014-09-04 Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti.
+// pars : Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti.
+// https://www.iana.org/domains/root/db/pars.html
 pars
 
-// partners : 2013-12-05 Binky Moon, LLC
+// partners : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/partners.html
 partners
 
-// parts : 2013-12-05 Binky Moon, LLC
+// parts : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/parts.html
 parts
 
-// party : 2014-09-11 Blue Sky Registry Limited
+// party : Blue Sky Registry Limited
+// https://www.iana.org/domains/root/db/party.html
 party
 
-// passagens : 2015-03-05 Travel Reservations SRL
-passagens
-
-// pay : 2015-08-27 Amazon Registry Services, Inc.
+// pay : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/pay.html
 pay
 
-// pccw : 2015-05-14 PCCW Enterprises Limited
+// pccw : PCCW Enterprises Limited
+// https://www.iana.org/domains/root/db/pccw.html
 pccw
 
-// pet : 2015-05-07 Identity Digital Limited
+// pet : Identity Digital Limited
+// https://www.iana.org/domains/root/db/pet.html
 pet
 
-// pfizer : 2015-09-11 Pfizer Inc.
+// pfizer : Pfizer Inc.
+// https://www.iana.org/domains/root/db/pfizer.html
 pfizer
 
-// pharmacy : 2014-06-19 National Association of Boards of Pharmacy
+// pharmacy : National Association of Boards of Pharmacy
+// https://www.iana.org/domains/root/db/pharmacy.html
 pharmacy
 
-// phd : 2016-07-28 Charleston Road Registry Inc.
+// phd : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/phd.html
 phd
 
-// philips : 2014-11-07 Koninklijke Philips N.V.
+// philips : Koninklijke Philips N.V.
+// https://www.iana.org/domains/root/db/philips.html
 philips
 
-// phone : 2016-06-02 Dish DBS Corporation
+// phone : Dish DBS Corporation
+// https://www.iana.org/domains/root/db/phone.html
 phone
 
-// photo : 2013-11-14 Registry Services, LLC
+// photo : Registry Services, LLC
+// https://www.iana.org/domains/root/db/photo.html
 photo
 
-// photography : 2013-09-20 Binky Moon, LLC
+// photography : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/photography.html
 photography
 
-// photos : 2013-10-17 Binky Moon, LLC
+// photos : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/photos.html
 photos
 
-// physio : 2014-05-01 PhysBiz Pty Ltd
+// physio : PhysBiz Pty Ltd
+// https://www.iana.org/domains/root/db/physio.html
 physio
 
-// pics : 2013-11-14 XYZ.COM LLC
+// pics : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/pics.html
 pics
 
-// pictet : 2014-06-26 Pictet Europe S.A.
+// pictet : Pictet Europe S.A.
+// https://www.iana.org/domains/root/db/pictet.html
 pictet
 
-// pictures : 2014-03-06 Binky Moon, LLC
+// pictures : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/pictures.html
 pictures
 
-// pid : 2015-01-08 Top Level Spectrum, Inc.
+// pid : Top Level Spectrum, Inc.
+// https://www.iana.org/domains/root/db/pid.html
 pid
 
-// pin : 2014-12-18 Amazon Registry Services, Inc.
+// pin : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/pin.html
 pin
 
-// ping : 2015-06-11 Ping Registry Provider, Inc.
+// ping : Ping Registry Provider, Inc.
+// https://www.iana.org/domains/root/db/ping.html
 ping
 
-// pink : 2013-10-01 Identity Digital Limited
+// pink : Identity Digital Limited
+// https://www.iana.org/domains/root/db/pink.html
 pink
 
-// pioneer : 2015-07-16 Pioneer Corporation
+// pioneer : Pioneer Corporation
+// https://www.iana.org/domains/root/db/pioneer.html
 pioneer
 
-// pizza : 2014-06-26 Binky Moon, LLC
+// pizza : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/pizza.html
 pizza
 
-// place : 2014-04-24 Binky Moon, LLC
+// place : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/place.html
 place
 
-// play : 2015-03-05 Charleston Road Registry Inc.
+// play : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/play.html
 play
 
-// playstation : 2015-07-02 Sony Interactive Entertainment Inc.
+// playstation : Sony Interactive Entertainment Inc.
+// https://www.iana.org/domains/root/db/playstation.html
 playstation
 
-// plumbing : 2013-09-10 Binky Moon, LLC
+// plumbing : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/plumbing.html
 plumbing
 
-// plus : 2015-02-05 Binky Moon, LLC
+// plus : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/plus.html
 plus
 
-// pnc : 2015-07-02 PNC Domain Co., LLC
+// pnc : PNC Domain Co., LLC
+// https://www.iana.org/domains/root/db/pnc.html
 pnc
 
-// pohl : 2014-06-23 Deutsche Vermögensberatung Aktiengesellschaft DVAG
+// pohl : Deutsche Vermögensberatung Aktiengesellschaft DVAG
+// https://www.iana.org/domains/root/db/pohl.html
 pohl
 
-// poker : 2014-07-03 Identity Digital Limited
+// poker : Identity Digital Limited
+// https://www.iana.org/domains/root/db/poker.html
 poker
 
-// politie : 2015-08-20 Politie Nederland
+// politie : Politie Nederland
+// https://www.iana.org/domains/root/db/politie.html
 politie
 
-// porn : 2014-10-16 ICM Registry PN LLC
+// porn : ICM Registry PN LLC
+// https://www.iana.org/domains/root/db/porn.html
 porn
 
-// pramerica : 2015-07-30 Prudential Financial, Inc.
+// pramerica : Prudential Financial, Inc.
+// https://www.iana.org/domains/root/db/pramerica.html
 pramerica
 
-// praxi : 2013-12-05 Praxi S.p.A.
+// praxi : Praxi S.p.A.
+// https://www.iana.org/domains/root/db/praxi.html
 praxi
 
-// press : 2014-04-03 Radix FZC
+// press : Radix FZC DMCC
+// https://www.iana.org/domains/root/db/press.html
 press
 
-// prime : 2015-06-25 Amazon Registry Services, Inc.
+// prime : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/prime.html
 prime
 
-// prod : 2014-01-23 Charleston Road Registry Inc.
+// prod : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/prod.html
 prod
 
-// productions : 2013-12-05 Binky Moon, LLC
+// productions : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/productions.html
 productions
 
-// prof : 2014-07-24 Charleston Road Registry Inc.
+// prof : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/prof.html
 prof
 
-// progressive : 2015-07-23 Progressive Casualty Insurance Company
+// progressive : Progressive Casualty Insurance Company
+// https://www.iana.org/domains/root/db/progressive.html
 progressive
 
-// promo : 2014-12-18 Identity Digital Limited
+// promo : Identity Digital Limited
+// https://www.iana.org/domains/root/db/promo.html
 promo
 
-// properties : 2013-12-05 Binky Moon, LLC
+// properties : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/properties.html
 properties
 
-// property : 2014-05-22 Internet Naming Company LLC
+// property : Internet Naming Company LLC
+// https://www.iana.org/domains/root/db/property.html
 property
 
-// protection : 2015-04-23 XYZ.COM LLC
+// protection : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/protection.html
 protection
 
-// pru : 2015-07-30 Prudential Financial, Inc.
+// pru : Prudential Financial, Inc.
+// https://www.iana.org/domains/root/db/pru.html
 pru
 
-// prudential : 2015-07-30 Prudential Financial, Inc.
+// prudential : Prudential Financial, Inc.
+// https://www.iana.org/domains/root/db/prudential.html
 prudential
 
-// pub : 2013-12-12 Dog Beach, LLC
+// pub : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/pub.html
 pub
 
-// pwc : 2015-10-29 PricewaterhouseCoopers LLP
+// pwc : PricewaterhouseCoopers LLP
+// https://www.iana.org/domains/root/db/pwc.html
 pwc
 
-// qpon : 2013-11-14 dotQPON LLC
+// qpon : dotQPON LLC
+// https://www.iana.org/domains/root/db/qpon.html
 qpon
 
-// quebec : 2013-12-19 PointQuébec Inc
+// quebec : PointQuébec Inc
+// https://www.iana.org/domains/root/db/quebec.html
 quebec
 
-// quest : 2015-03-26 XYZ.COM LLC
+// quest : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/quest.html
 quest
 
-// racing : 2014-12-04 Premier Registry Limited
+// racing : Premier Registry Limited
+// https://www.iana.org/domains/root/db/racing.html
 racing
 
-// radio : 2016-07-21 European Broadcasting Union (EBU)
+// radio : European Broadcasting Union (EBU)
+// https://www.iana.org/domains/root/db/radio.html
 radio
 
-// read : 2014-12-18 Amazon Registry Services, Inc.
+// read : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/read.html
 read
 
-// realestate : 2015-09-11 dotRealEstate LLC
+// realestate : dotRealEstate LLC
+// https://www.iana.org/domains/root/db/realestate.html
 realestate
 
-// realtor : 2014-05-29 Real Estate Domains LLC
+// realtor : Real Estate Domains LLC
+// https://www.iana.org/domains/root/db/realtor.html
 realtor
 
-// realty : 2015-03-19 Dog Beach, LLC
+// realty : Internet Naming Company LLC
+// https://www.iana.org/domains/root/db/realty.html
 realty
 
-// recipes : 2013-10-17 Binky Moon, LLC
+// recipes : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/recipes.html
 recipes
 
-// red : 2013-11-07 Identity Digital Limited
+// red : Identity Digital Limited
+// https://www.iana.org/domains/root/db/red.html
 red
 
-// redstone : 2014-10-31 Redstone Haute Couture Co., Ltd.
+// redstone : Redstone Haute Couture Co., Ltd.
+// https://www.iana.org/domains/root/db/redstone.html
 redstone
 
-// redumbrella : 2015-03-26 Travelers TLD, LLC
+// redumbrella : Travelers TLD, LLC
+// https://www.iana.org/domains/root/db/redumbrella.html
 redumbrella
 
-// rehab : 2014-03-06 Dog Beach, LLC
+// rehab : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/rehab.html
 rehab
 
-// reise : 2014-03-13 Binky Moon, LLC
+// reise : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/reise.html
 reise
 
-// reisen : 2014-03-06 Binky Moon, LLC
+// reisen : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/reisen.html
 reisen
 
-// reit : 2014-09-04 National Association of Real Estate Investment Trusts, 
Inc.
+// reit : National Association of Real Estate Investment Trusts, Inc.
+// https://www.iana.org/domains/root/db/reit.html
 reit
 
-// reliance : 2015-04-02 Reliance Industries Limited
+// reliance : Reliance Industries Limited
+// https://www.iana.org/domains/root/db/reliance.html
 reliance
 
-// ren : 2013-12-12 ZDNS International Limited
+// ren : ZDNS International Limited
+// https://www.iana.org/domains/root/db/ren.html
 ren
 
-// rent : 2014-12-04 XYZ.COM LLC
+// rent : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/rent.html
 rent
 
-// rentals : 2013-12-05 Binky Moon, LLC
+// rentals : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/rentals.html
 rentals
 
-// repair : 2013-11-07 Binky Moon, LLC
+// repair : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/repair.html
 repair
 
-// report : 2013-12-05 Binky Moon, LLC
+// report : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/report.html
 report
 
-// republican : 2014-03-20 Dog Beach, LLC
+// republican : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/republican.html
 republican
 
-// rest : 2013-12-19 Punto 2012 Sociedad Anonima Promotora de Inversion de 
Capital Variable
+// rest : Punto 2012 Sociedad Anonima Promotora de Inversion de Capital 
Variable
+// https://www.iana.org/domains/root/db/rest.html
 rest
 
-// restaurant : 2014-07-03 Binky Moon, LLC
+// restaurant : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/restaurant.html
 restaurant
 
-// review : 2014-11-20 dot Review Limited
+// review : dot Review Limited
+// https://www.iana.org/domains/root/db/review.html
 review
 
-// reviews : 2013-09-13 Dog Beach, LLC
+// reviews : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/reviews.html
 reviews
 
-// rexroth : 2015-06-18 Robert Bosch GMBH
+// rexroth : Robert Bosch GMBH
+// https://www.iana.org/domains/root/db/rexroth.html
 rexroth
 
-// rich : 2013-11-21 iRegistry GmbH
+// rich : iRegistry GmbH
+// https://www.iana.org/domains/root/db/rich.html
 rich
 
-// richardli : 2015-05-14 Pacific Century Asset Management (HK) Limited
+// richardli : Pacific Century Asset Management (HK) Limited
+// https://www.iana.org/domains/root/db/richardli.html
 richardli
 
-// ricoh : 2014-11-20 Ricoh Company, Ltd.
+// ricoh : Ricoh Company, Ltd.
+// https://www.iana.org/domains/root/db/ricoh.html
 ricoh
 
-// ril : 2015-04-02 Reliance Industries Limited
+// ril : Reliance Industries Limited
+// https://www.iana.org/domains/root/db/ril.html
 ril
 
-// rio : 2014-02-27 Empresa Municipal de Informática SA - IPLANRIO
+// rio : Empresa Municipal de Informática SA - IPLANRIO
+// https://www.iana.org/domains/root/db/rio.html
 rio
 
-// rip : 2014-07-10 Dog Beach, LLC
+// rip : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/rip.html
 rip
 
-// rocher : 2014-12-18 Ferrero Trading Lux S.A.
+// rocher : Ferrero Trading Lux S.A.
+// https://www.iana.org/domains/root/db/rocher.html
 rocher
 
-// rocks : 2013-11-14 Dog Beach, LLC
+// rocks : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/rocks.html
 rocks
 
-// rodeo : 2013-12-19 Registry Services, LLC
+// rodeo : Registry Services, LLC
+// https://www.iana.org/domains/root/db/rodeo.html
 rodeo
 
-// rogers : 2015-08-06 Rogers Communications Canada Inc.
+// rogers : Rogers Communications Canada Inc.
+// https://www.iana.org/domains/root/db/rogers.html
 rogers
 
-// room : 2014-12-18 Amazon Registry Services, Inc.
+// room : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/room.html
 room
 
-// rsvp : 2014-05-08 Charleston Road Registry Inc.
+// rsvp : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/rsvp.html
 rsvp
 
-// rugby : 2016-12-15 World Rugby Strategic Developments Limited
+// rugby : World Rugby Strategic Developments Limited
+// https://www.iana.org/domains/root/db/rugby.html
 rugby
 
-// ruhr : 2013-10-02 dotSaarland GmbH
+// ruhr : dotSaarland GmbH
+// https://www.iana.org/domains/root/db/ruhr.html
 ruhr
 
-// run : 2015-03-19 Binky Moon, LLC
+// run : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/run.html
 run
 
-// rwe : 2015-04-02 RWE AG
+// rwe : RWE AG
+// https://www.iana.org/domains/root/db/rwe.html
 rwe
 
-// ryukyu : 2014-01-09 BRregistry, Inc.
+// ryukyu : BRregistry, Inc.
+// https://www.iana.org/domains/root/db/ryukyu.html
 ryukyu
 
-// saarland : 2013-12-12 dotSaarland GmbH
+// saarland : dotSaarland GmbH
+// https://www.iana.org/domains/root/db/saarland.html
 saarland
 
-// safe : 2014-12-18 Amazon Registry Services, Inc.
+// safe : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/safe.html
 safe
 
-// safety : 2015-01-08 Safety Registry Services, LLC.
+// safety : Safety Registry Services, LLC.
+// https://www.iana.org/domains/root/db/safety.html
 safety
 
-// sakura : 2014-12-18 SAKURA Internet Inc.
+// sakura : SAKURA Internet Inc.
+// https://www.iana.org/domains/root/db/sakura.html
 sakura
 
-// sale : 2014-10-16 Dog Beach, LLC
+// sale : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/sale.html
 sale
 
-// salon : 2014-12-11 Binky Moon, LLC
+// salon : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/salon.html
 salon
 
-// samsclub : 2015-07-31 Wal-Mart Stores, Inc.
+// samsclub : Wal-Mart Stores, Inc.
+// https://www.iana.org/domains/root/db/samsclub.html
 samsclub
 
-// samsung : 2014-04-03 SAMSUNG SDS CO., LTD
+// samsung : SAMSUNG SDS CO., LTD
+// https://www.iana.org/domains/root/db/samsung.html
 samsung
 
-// sandvik : 2014-11-13 Sandvik AB
+// sandvik : Sandvik AB
+// https://www.iana.org/domains/root/db/sandvik.html
 sandvik
 
-// sandvikcoromant : 2014-11-07 Sandvik AB
+// sandvikcoromant : Sandvik AB
+// https://www.iana.org/domains/root/db/sandvikcoromant.html
 sandvikcoromant
 
-// sanofi : 2014-10-09 Sanofi
+// sanofi : Sanofi
+// https://www.iana.org/domains/root/db/sanofi.html
 sanofi
 
-// sap : 2014-03-27 SAP AG
+// sap : SAP AG
+// https://www.iana.org/domains/root/db/sap.html
 sap
 
-// sarl : 2014-07-03 Binky Moon, LLC
+// sarl : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/sarl.html
 sarl
 
-// sas : 2015-04-02 Research IP LLC
+// sas : Research IP LLC
+// https://www.iana.org/domains/root/db/sas.html
 sas
 
-// save : 2015-06-25 Amazon Registry Services, Inc.
+// save : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/save.html
 save
 
-// saxo : 2014-10-31 Saxo Bank A/S
+// saxo : Saxo Bank A/S
+// https://www.iana.org/domains/root/db/saxo.html
 saxo
 
-// sbi : 2015-03-12 STATE BANK OF INDIA
+// sbi : STATE BANK OF INDIA
+// https://www.iana.org/domains/root/db/sbi.html
 sbi
 
-// sbs : 2014-11-07 ShortDot SA
+// sbs : ShortDot SA
+// https://www.iana.org/domains/root/db/sbs.html
 sbs
 
-// sca : 2014-03-13 SVENSKA CELLULOSA AKTIEBOLAGET SCA (publ)
+// sca : SVENSKA CELLULOSA AKTIEBOLAGET SCA (publ)
+// https://www.iana.org/domains/root/db/sca.html
 sca
 
-// scb : 2014-02-20 The Siam Commercial Bank Public Company Limited ("SCB")
+// scb : The Siam Commercial Bank Public Company Limited ("SCB")
+// https://www.iana.org/domains/root/db/scb.html
 scb
 
-// schaeffler : 2015-08-06 Schaeffler Technologies AG & Co. KG
+// schaeffler : Schaeffler Technologies AG & Co. KG
+// https://www.iana.org/domains/root/db/schaeffler.html
 schaeffler
 
-// schmidt : 2014-04-03 SCHMIDT GROUPE S.A.S.
+// schmidt : SCHMIDT GROUPE S.A.S.
+// https://www.iana.org/domains/root/db/schmidt.html
 schmidt
 
-// scholarships : 2014-04-24 Scholarships.com, LLC
+// scholarships : Scholarships.com, LLC
+// https://www.iana.org/domains/root/db/scholarships.html
 scholarships
 
-// school : 2014-12-18 Binky Moon, LLC
+// school : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/school.html
 school
 
-// schule : 2014-03-06 Binky Moon, LLC
+// schule : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/schule.html
 schule
 
-// schwarz : 2014-09-18 Schwarz Domains und Services GmbH & Co. KG
+// schwarz : Schwarz Domains und Services GmbH & Co. KG
+// https://www.iana.org/domains/root/db/schwarz.html
 schwarz
 
-// science : 2014-09-11 dot Science Limited
+// science : dot Science Limited
+// https://www.iana.org/domains/root/db/science.html
 science
 
-// scot : 2014-01-23 Dot Scot Registry Limited
+// scot : Dot Scot Registry Limited
+// https://www.iana.org/domains/root/db/scot.html
 scot
 
-// search : 2016-06-09 Charleston Road Registry Inc.
+// search : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/search.html
 search
 
-// seat : 2014-05-22 SEAT, S.A. (Sociedad Unipersonal)
+// seat : SEAT, S.A. (Sociedad Unipersonal)
+// https://www.iana.org/domains/root/db/seat.html
 seat
 
-// secure : 2015-08-27 Amazon Registry Services, Inc.
+// secure : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/secure.html
 secure
 
-// security : 2015-05-14 XYZ.COM LLC
+// security : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/security.html
 security
 
-// seek : 2014-12-04 Seek Limited
+// seek : Seek Limited
+// https://www.iana.org/domains/root/db/seek.html
 seek
 
-// select : 2015-10-08 Registry Services, LLC
+// select : Registry Services, LLC
+// https://www.iana.org/domains/root/db/select.html
 select
 
-// sener : 2014-10-24 Sener Ingeniería y Sistemas, S.A.
+// sener : Sener Ingeniería y Sistemas, S.A.
+// https://www.iana.org/domains/root/db/sener.html
 sener
 
-// services : 2014-02-27 Binky Moon, LLC
+// services : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/services.html
 services
 
-// seven : 2015-08-06 Seven West Media Ltd
+// seven : Seven West Media Ltd
+// https://www.iana.org/domains/root/db/seven.html
 seven
 
-// sew : 2014-07-17 SEW-EURODRIVE GmbH & Co KG
+// sew : SEW-EURODRIVE GmbH & Co KG
+// https://www.iana.org/domains/root/db/sew.html
 sew
 
-// sex : 2014-11-13 ICM Registry SX LLC
+// sex : ICM Registry SX LLC
+// https://www.iana.org/domains/root/db/sex.html
 sex
 
-// sexy : 2013-09-11 Internet Naming Company LLC
+// sexy : Internet Naming Company LLC
+// https://www.iana.org/domains/root/db/sexy.html
 sexy
 
-// sfr : 2015-08-13 Societe Francaise du Radiotelephone - SFR
+// sfr : Societe Francaise du Radiotelephone - SFR
+// https://www.iana.org/domains/root/db/sfr.html
 sfr
 
-// shangrila : 2015-09-03 Shangri‐La International Hotel Management Limited
+// shangrila : Shangri‐La International Hotel Management Limited
+// https://www.iana.org/domains/root/db/shangrila.html
 shangrila
 
-// sharp : 2014-05-01 Sharp Corporation
+// sharp : Sharp Corporation
+// https://www.iana.org/domains/root/db/sharp.html
 sharp
 
-// shaw : 2015-04-23 Shaw Cablesystems G.P.
+// shaw : Shaw Cablesystems G.P.
+// https://www.iana.org/domains/root/db/shaw.html
 shaw
 
-// shell : 2015-07-30 Shell Information Technology International Inc
+// shell : Shell Information Technology International Inc
+// https://www.iana.org/domains/root/db/shell.html
 shell
 
-// shia : 2014-09-04 Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti.
+// shia : Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti.
+// https://www.iana.org/domains/root/db/shia.html
 shia
 
-// shiksha : 2013-11-14 Identity Digital Limited
+// shiksha : Identity Digital Limited
+// https://www.iana.org/domains/root/db/shiksha.html
 shiksha
 
-// shoes : 2013-10-02 Binky Moon, LLC
+// shoes : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/shoes.html
 shoes
 
-// shop : 2016-04-08 GMO Registry, Inc.
+// shop : GMO Registry, Inc.
+// https://www.iana.org/domains/root/db/shop.html
 shop
 
-// shopping : 2016-03-31 Binky Moon, LLC
+// shopping : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/shopping.html
 shopping
 
-// shouji : 2015-01-08 Beijing Qihu Keji Co., Ltd.
+// shouji : Beijing Qihu Keji Co., Ltd.
+// https://www.iana.org/domains/root/db/shouji.html
 shouji
 
-// show : 2015-03-05 Binky Moon, LLC
+// show : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/show.html
 show
 
-// showtime : 2015-08-06 CBS Domains Inc.
+// showtime : CBS Domains Inc.
+// https://www.iana.org/domains/root/db/showtime.html
 showtime
 
-// silk : 2015-06-25 Amazon Registry Services, Inc.
+// silk : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/silk.html
 silk
 
-// sina : 2015-03-12 Sina Corporation
+// sina : Sina Corporation
+// https://www.iana.org/domains/root/db/sina.html
 sina
 
-// singles : 2013-08-27 Binky Moon, LLC
+// singles : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/singles.html
 singles
 
-// site : 2015-01-15 Radix FZC
+// site : Radix FZC DMCC
+// https://www.iana.org/domains/root/db/site.html
 site
 
-// ski : 2015-04-09 Identity Digital Limited
+// ski : Identity Digital Limited
+// https://www.iana.org/domains/root/db/ski.html
 ski
 
-// skin : 2015-01-15 XYZ.COM LLC
+// skin : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/skin.html
 skin
 
-// sky : 2014-06-19 Sky International AG
+// sky : Sky International AG
+// https://www.iana.org/domains/root/db/sky.html
 sky
 
-// skype : 2014-12-18 Microsoft Corporation
+// skype : Microsoft Corporation
+// https://www.iana.org/domains/root/db/skype.html
 skype
 
-// sling : 2015-07-30 DISH Technologies L.L.C.
+// sling : DISH Technologies L.L.C.
+// https://www.iana.org/domains/root/db/sling.html
 sling
 
-// smart : 2015-07-09 Smart Communications, Inc. (SMART)
+// smart : Smart Communications, Inc. (SMART)
+// https://www.iana.org/domains/root/db/smart.html
 smart
 
-// smile : 2014-12-18 Amazon Registry Services, Inc.
+// smile : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/smile.html
 smile
 
-// sncf : 2015-02-19 Société Nationale SNCF
+// sncf : Société Nationale SNCF
+// https://www.iana.org/domains/root/db/sncf.html
 sncf
 
-// soccer : 2015-03-26 Binky Moon, LLC
+// soccer : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/soccer.html
 soccer
 
-// social : 2013-11-07 Dog Beach, LLC
+// social : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/social.html
 social
 
-// softbank : 2015-07-02 SoftBank Group Corp.
+// softbank : SoftBank Group Corp.
+// https://www.iana.org/domains/root/db/softbank.html
 softbank
 
-// software : 2014-03-20 Dog Beach, LLC
+// software : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/software.html
 software
 
-// sohu : 2013-12-19 Sohu.com Limited
+// sohu : Sohu.com Limited
+// https://www.iana.org/domains/root/db/sohu.html
 sohu
 
-// solar : 2013-11-07 Binky Moon, LLC
+// solar : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/solar.html
 solar
 
-// solutions : 2013-11-07 Binky Moon, LLC
+// solutions : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/solutions.html
 solutions
 
-// song : 2015-02-26 Amazon Registry Services, Inc.
+// song : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/song.html
 song
 
-// sony : 2015-01-08 Sony Corporation
+// sony : Sony Corporation
+// https://www.iana.org/domains/root/db/sony.html
 sony
 
-// soy : 2014-01-23 Charleston Road Registry Inc.
+// soy : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/soy.html
 soy
 
-// spa : 2019-09-19 Asia Spa and Wellness Promotion Council Limited
+// spa : Asia Spa and Wellness Promotion Council Limited
+// https://www.iana.org/domains/root/db/spa.html
 spa
 
-// space : 2014-04-03 Radix FZC
+// space : Radix FZC DMCC
+// https://www.iana.org/domains/root/db/space.html
 space
 
-// sport : 2017-11-16 Global Association of International Sports Federations 
(GAISF)
+// sport : SportAccord
+// https://www.iana.org/domains/root/db/sport.html
 sport
 
-// spot : 2015-02-26 Amazon Registry Services, Inc.
+// spot : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/spot.html
 spot
 
-// srl : 2015-05-07 InterNetX, Corp
+// srl : InterNetX, Corp
+// https://www.iana.org/domains/root/db/srl.html
 srl
 
-// stada : 2014-11-13 STADA Arzneimittel AG
+// stada : STADA Arzneimittel AG
+// https://www.iana.org/domains/root/db/stada.html
 stada
 
-// staples : 2015-07-30 Staples, Inc.
+// staples : Staples, Inc.
+// https://www.iana.org/domains/root/db/staples.html
 staples
 
-// star : 2015-01-08 Star India Private Limited
+// star : Star India Private Limited
+// https://www.iana.org/domains/root/db/star.html
 star
 
-// statebank : 2015-03-12 STATE BANK OF INDIA
+// statebank : STATE BANK OF INDIA
+// https://www.iana.org/domains/root/db/statebank.html
 statebank
 
-// statefarm : 2015-07-30 State Farm Mutual Automobile Insurance Company
+// statefarm : State Farm Mutual Automobile Insurance Company
+// https://www.iana.org/domains/root/db/statefarm.html
 statefarm
 
-// stc : 2014-10-09 Saudi Telecom Company
+// stc : Saudi Telecom Company
+// https://www.iana.org/domains/root/db/stc.html
 stc
 
-// stcgroup : 2014-10-09 Saudi Telecom Company
+// stcgroup : Saudi Telecom Company
+// https://www.iana.org/domains/root/db/stcgroup.html
 stcgroup
 
-// stockholm : 2014-12-18 Stockholms kommun
+// stockholm : Stockholms kommun
+// https://www.iana.org/domains/root/db/stockholm.html
 stockholm
 
-// storage : 2014-12-22 XYZ.COM LLC
+// storage : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/storage.html
 storage
 
-// store : 2015-04-09 Radix FZC
+// store : Radix FZC DMCC
+// https://www.iana.org/domains/root/db/store.html
 store
 
-// stream : 2016-01-08 dot Stream Limited
+// stream : dot Stream Limited
+// https://www.iana.org/domains/root/db/stream.html
 stream
 
-// studio : 2015-02-11 Dog Beach, LLC
+// studio : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/studio.html
 studio
 
-// study : 2014-12-11 Registry Services, LLC
+// study : Registry Services, LLC
+// https://www.iana.org/domains/root/db/study.html
 study
 
-// style : 2014-12-04 Binky Moon, LLC
+// style : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/style.html
 style
 
-// sucks : 2014-12-22 Vox Populi Registry Ltd.
+// sucks : Vox Populi Registry Ltd.
+// https://www.iana.org/domains/root/db/sucks.html
 sucks
 
-// supplies : 2013-12-19 Binky Moon, LLC
+// supplies : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/supplies.html
 supplies
 
-// supply : 2013-12-19 Binky Moon, LLC
+// supply : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/supply.html
 supply
 
-// support : 2013-10-24 Binky Moon, LLC
+// support : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/support.html
 support
 
-// surf : 2014-01-09 Registry Services, LLC
+// surf : Registry Services, LLC
+// https://www.iana.org/domains/root/db/surf.html
 surf
 
-// surgery : 2014-03-20 Binky Moon, LLC
+// surgery : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/surgery.html
 surgery
 
-// suzuki : 2014-02-20 SUZUKI MOTOR CORPORATION
+// suzuki : SUZUKI MOTOR CORPORATION
+// https://www.iana.org/domains/root/db/suzuki.html
 suzuki
 
-// swatch : 2015-01-08 The Swatch Group Ltd
+// swatch : The Swatch Group Ltd
+// https://www.iana.org/domains/root/db/swatch.html
 swatch
 
-// swiss : 2014-10-16 Swiss Confederation
+// swiss : Swiss Confederation
+// https://www.iana.org/domains/root/db/swiss.html
 swiss
 
-// sydney : 2014-09-18 State of New South Wales, Department of Premier and 
Cabinet
+// sydney : State of New South Wales, Department of Premier and Cabinet
+// https://www.iana.org/domains/root/db/sydney.html
 sydney
 
-// systems : 2013-11-07 Binky Moon, LLC
+// systems : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/systems.html
 systems
 
-// tab : 2014-12-04 Tabcorp Holdings Limited
+// tab : Tabcorp Holdings Limited
+// https://www.iana.org/domains/root/db/tab.html
 tab
 
-// taipei : 2014-07-10 Taipei City Government
+// taipei : Taipei City Government
+// https://www.iana.org/domains/root/db/taipei.html
 taipei
 
-// talk : 2015-04-09 Amazon Registry Services, Inc.
+// talk : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/talk.html
 talk
 
-// taobao : 2015-01-15 Alibaba Group Holding Limited
+// taobao : Alibaba Group Holding Limited
+// https://www.iana.org/domains/root/db/taobao.html
 taobao
 
-// target : 2015-07-31 Target Domain Holdings, LLC
+// target : Target Domain Holdings, LLC
+// https://www.iana.org/domains/root/db/target.html
 target
 
-// tatamotors : 2015-03-12 Tata Motors Ltd
+// tatamotors : Tata Motors Ltd
+// https://www.iana.org/domains/root/db/tatamotors.html
 tatamotors
 
-// tatar : 2014-04-24 Limited Liability Company "Coordination Center of 
Regional Domain of Tatarstan Republic"
+// tatar : Limited Liability Company "Coordination Center of Regional Domain 
of Tatarstan Republic"
+// https://www.iana.org/domains/root/db/tatar.html
 tatar
 
-// tattoo : 2013-08-30 Top Level Design, LLC
+// tattoo : Registry Services, LLC
+// https://www.iana.org/domains/root/db/tattoo.html
 tattoo
 
-// tax : 2014-03-20 Binky Moon, LLC
+// tax : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/tax.html
 tax
 
-// taxi : 2015-03-19 Binky Moon, LLC
+// taxi : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/taxi.html
 taxi
 
-// tci : 2014-09-12 Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti.
+// tci : Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti.
+// https://www.iana.org/domains/root/db/tci.html
 tci
 
-// tdk : 2015-06-11 TDK Corporation
+// tdk : TDK Corporation
+// https://www.iana.org/domains/root/db/tdk.html
 tdk
 
-// team : 2015-03-05 Binky Moon, LLC
+// team : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/team.html
 team
 
-// tech : 2015-01-30 Radix FZC
+// tech : Radix FZC DMCC
+// https://www.iana.org/domains/root/db/tech.html
 tech
 
-// technology : 2013-09-13 Binky Moon, LLC
+// technology : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/technology.html
 technology
 
-// temasek : 2014-08-07 Temasek Holdings (Private) Limited
+// temasek : Temasek Holdings (Private) Limited
+// https://www.iana.org/domains/root/db/temasek.html
 temasek
 
-// tennis : 2014-12-04 Binky Moon, LLC
+// tennis : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/tennis.html
 tennis
 
-// teva : 2015-07-02 Teva Pharmaceutical Industries Limited
+// teva : Teva Pharmaceutical Industries Limited
+// https://www.iana.org/domains/root/db/teva.html
 teva
 
-// thd : 2015-04-02 Home Depot Product Authority, LLC
+// thd : Home Depot Product Authority, LLC
+// https://www.iana.org/domains/root/db/thd.html
 thd
 
-// theater : 2015-03-19 Binky Moon, LLC
+// theater : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/theater.html
 theater
 
-// theatre : 2015-05-07 XYZ.COM LLC
+// theatre : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/theatre.html
 theatre
 
-// tiaa : 2015-07-23 Teachers Insurance and Annuity Association of America
+// tiaa : Teachers Insurance and Annuity Association of America
+// https://www.iana.org/domains/root/db/tiaa.html
 tiaa
 
-// tickets : 2015-02-05 XYZ.COM LLC
+// tickets : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/tickets.html
 tickets
 
-// tienda : 2013-11-14 Binky Moon, LLC
+// tienda : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/tienda.html
 tienda
 
-// tiffany : 2015-01-30 Tiffany and Company
-tiffany
-
-// tips : 2013-09-20 Binky Moon, LLC
+// tips : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/tips.html
 tips
 
-// tires : 2014-11-07 Binky Moon, LLC
+// tires : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/tires.html
 tires
 
-// tirol : 2014-04-24 punkt Tirol GmbH
+// tirol : punkt Tirol GmbH
+// https://www.iana.org/domains/root/db/tirol.html
 tirol
 
-// tjmaxx : 2015-07-16 The TJX Companies, Inc.
+// tjmaxx : The TJX Companies, Inc.
+// https://www.iana.org/domains/root/db/tjmaxx.html
 tjmaxx
 
-// tjx : 2015-07-16 The TJX Companies, Inc.
+// tjx : The TJX Companies, Inc.
+// https://www.iana.org/domains/root/db/tjx.html
 tjx
 
-// tkmaxx : 2015-07-16 The TJX Companies, Inc.
+// tkmaxx : The TJX Companies, Inc.
+// https://www.iana.org/domains/root/db/tkmaxx.html
 tkmaxx
 
-// tmall : 2015-01-15 Alibaba Group Holding Limited
+// tmall : Alibaba Group Holding Limited
+// https://www.iana.org/domains/root/db/tmall.html
 tmall
 
-// today : 2013-09-20 Binky Moon, LLC
+// today : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/today.html
 today
 
-// tokyo : 2013-11-13 GMO Registry, Inc.
+// tokyo : GMO Registry, Inc.
+// https://www.iana.org/domains/root/db/tokyo.html
 tokyo
 
-// tools : 2013-11-21 Binky Moon, LLC
+// tools : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/tools.html
 tools
 
-// top : 2014-03-20 .TOP Registry
+// top : .TOP Registry
+// https://www.iana.org/domains/root/db/top.html
 top
 
-// toray : 2014-12-18 Toray Industries, Inc.
+// toray : Toray Industries, Inc.
+// https://www.iana.org/domains/root/db/toray.html
 toray
 
-// toshiba : 2014-04-10 TOSHIBA Corporation
+// toshiba : TOSHIBA Corporation
+// https://www.iana.org/domains/root/db/toshiba.html
 toshiba
 
-// total : 2015-08-06 TotalEnergies SE
+// total : TotalEnergies SE
+// https://www.iana.org/domains/root/db/total.html
 total
 
-// tours : 2015-01-22 Binky Moon, LLC
+// tours : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/tours.html
 tours
 
-// town : 2014-03-06 Binky Moon, LLC
+// town : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/town.html
 town
 
-// toyota : 2015-04-23 TOYOTA MOTOR CORPORATION
+// toyota : TOYOTA MOTOR CORPORATION
+// https://www.iana.org/domains/root/db/toyota.html
 toyota
 
-// toys : 2014-03-06 Binky Moon, LLC
+// toys : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/toys.html
 toys
 
-// trade : 2014-01-23 Elite Registry Limited
+// trade : Elite Registry Limited
+// https://www.iana.org/domains/root/db/trade.html
 trade
 
-// trading : 2014-12-11 Dog Beach, LLC
+// trading : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/trading.html
 trading
 
-// training : 2013-11-07 Binky Moon, LLC
+// training : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/training.html
 training
 
-// travel : 2015-10-09 Dog Beach, LLC
+// travel : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/travel.html
 travel
 
-// travelchannel : 2015-07-02 Lifestyle Domain Holdings, Inc.
-travelchannel
-
-// travelers : 2015-03-26 Travelers TLD, LLC
+// travelers : Travelers TLD, LLC
+// https://www.iana.org/domains/root/db/travelers.html
 travelers
 
-// travelersinsurance : 2015-03-26 Travelers TLD, LLC
+// travelersinsurance : Travelers TLD, LLC
+// https://www.iana.org/domains/root/db/travelersinsurance.html
 travelersinsurance
 
-// trust : 2014-10-16 Internet Naming Company LLC
+// trust : Internet Naming Company LLC
+// https://www.iana.org/domains/root/db/trust.html
 trust
 
-// trv : 2015-03-26 Travelers TLD, LLC
+// trv : Travelers TLD, LLC
+// https://www.iana.org/domains/root/db/trv.html
 trv
 
-// tube : 2015-06-11 Latin American Telecom LLC
+// tube : Latin American Telecom LLC
+// https://www.iana.org/domains/root/db/tube.html
 tube
 
-// tui : 2014-07-03 TUI AG
+// tui : TUI AG
+// https://www.iana.org/domains/root/db/tui.html
 tui
 
-// tunes : 2015-02-26 Amazon Registry Services, Inc.
+// tunes : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/tunes.html
 tunes
 
-// tushu : 2014-12-18 Amazon Registry Services, Inc.
+// tushu : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/tushu.html
 tushu
 
-// tvs : 2015-02-19 T V SUNDRAM IYENGAR  & SONS LIMITED
+// tvs : T V SUNDRAM IYENGAR  & SONS LIMITED
+// https://www.iana.org/domains/root/db/tvs.html
 tvs
 
-// ubank : 2015-08-20 National Australia Bank Limited
+// ubank : National Australia Bank Limited
+// https://www.iana.org/domains/root/db/ubank.html
 ubank
 
-// ubs : 2014-12-11 UBS AG
+// ubs : UBS AG
+// https://www.iana.org/domains/root/db/ubs.html
 ubs
 
-// unicom : 2015-10-15 China United Network Communications Corporation Limited
+// unicom : China United Network Communications Corporation Limited
+// https://www.iana.org/domains/root/db/unicom.html
 unicom
 
-// university : 2014-03-06 Binky Moon, LLC
+// university : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/university.html
 university
 
-// uno : 2013-09-11 Radix FZC
+// uno : Radix FZC DMCC
+// https://www.iana.org/domains/root/db/uno.html
 uno
 
-// uol : 2014-05-01 UBN INTERNET LTDA.
+// uol : UBN INTERNET LTDA.
+// https://www.iana.org/domains/root/db/uol.html
 uol
 
-// ups : 2015-06-25 UPS Market Driver, Inc.
+// ups : UPS Market Driver, Inc.
+// https://www.iana.org/domains/root/db/ups.html
 ups
 
-// vacations : 2013-12-05 Binky Moon, LLC
+// vacations : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/vacations.html
 vacations
 
-// vana : 2014-12-11 Lifestyle Domain Holdings, Inc.
+// vana : Lifestyle Domain Holdings, Inc.
+// https://www.iana.org/domains/root/db/vana.html
 vana
 
-// vanguard : 2015-09-03 The Vanguard Group, Inc.
+// vanguard : The Vanguard Group, Inc.
+// https://www.iana.org/domains/root/db/vanguard.html
 vanguard
 
-// vegas : 2014-01-16 Dot Vegas, Inc.
+// vegas : Dot Vegas, Inc.
+// https://www.iana.org/domains/root/db/vegas.html
 vegas
 
-// ventures : 2013-08-27 Binky Moon, LLC
+// ventures : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/ventures.html
 ventures
 
-// verisign : 2015-08-13 VeriSign, Inc.
+// verisign : VeriSign, Inc.
+// https://www.iana.org/domains/root/db/verisign.html
 verisign
 
-// versicherung : 2014-03-20 tldbox GmbH
+// versicherung : tldbox GmbH
+// https://www.iana.org/domains/root/db/versicherung.html
 versicherung
 
-// vet : 2014-03-06 Dog Beach, LLC
+// vet : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/vet.html
 vet
 
-// viajes : 2013-10-17 Binky Moon, LLC
+// viajes : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/viajes.html
 viajes
 
-// video : 2014-10-16 Dog Beach, LLC
+// video : Dog Beach, LLC
+// https://www.iana.org/domains/root/db/video.html
 video
 
-// vig : 2015-05-14 VIENNA INSURANCE GROUP AG Wiener Versicherung Gruppe
+// vig : VIENNA INSURANCE GROUP AG Wiener Versicherung Gruppe
+// https://www.iana.org/domains/root/db/vig.html
 vig
 
-// viking : 2015-04-02 Viking River Cruises (Bermuda) Ltd.
+// viking : Viking River Cruises (Bermuda) Ltd.
+// https://www.iana.org/domains/root/db/viking.html
 viking
 
-// villas : 2013-12-05 Binky Moon, LLC
+// villas : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/villas.html
 villas
 
-// vin : 2015-06-18 Binky Moon, LLC
+// vin : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/vin.html
 vin
 
-// vip : 2015-01-22 Registry Services, LLC
+// vip : Registry Services, LLC
+// https://www.iana.org/domains/root/db/vip.html
 vip
 
-// virgin : 2014-09-25 Virgin Enterprises Limited
+// virgin : Virgin Enterprises Limited
+// https://www.iana.org/domains/root/db/virgin.html
 virgin
 
-// visa : 2015-07-30 Visa Worldwide Pte. Limited
+// visa : Visa Worldwide Pte. Limited
+// https://www.iana.org/domains/root/db/visa.html
 visa
 
-// vision : 2013-12-05 Binky Moon, LLC
+// vision : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/vision.html
 vision
 
-// viva : 2014-11-07 Saudi Telecom Company
+// viva : Saudi Telecom Company
+// https://www.iana.org/domains/root/db/viva.html
 viva
 
-// vivo : 2015-07-31 Telefonica Brasil S.A.
+// vivo : Telefonica Brasil S.A.
+// https://www.iana.org/domains/root/db/vivo.html
 vivo
 
-// vlaanderen : 2014-02-06 DNS.be vzw
+// vlaanderen : DNS.be vzw
+// https://www.iana.org/domains/root/db/vlaanderen.html
 vlaanderen
 
-// vodka : 2013-12-19 Registry Services, LLC
+// vodka : Registry Services, LLC
+// https://www.iana.org/domains/root/db/vodka.html
 vodka
 
-// volkswagen : 2015-05-14 Volkswagen Group of America Inc.
+// volkswagen : Volkswagen Group of America Inc.
+// https://www.iana.org/domains/root/db/volkswagen.html
 volkswagen
 
-// volvo : 2015-11-12 Volvo Holding Sverige Aktiebolag
+// volvo : Volvo Holding Sverige Aktiebolag
+// https://www.iana.org/domains/root/db/volvo.html
 volvo
 
-// vote : 2013-11-21 Monolith Registry LLC
+// vote : Monolith Registry LLC
+// https://www.iana.org/domains/root/db/vote.html
 vote
 
-// voting : 2013-11-13 Valuetainment Corp.
+// voting : Valuetainment Corp.
+// https://www.iana.org/domains/root/db/voting.html
 voting
 
-// voto : 2013-11-21 Monolith Registry LLC
+// voto : Monolith Registry LLC
+// https://www.iana.org/domains/root/db/voto.html
 voto
 
-// voyage : 2013-08-27 Binky Moon, LLC
+// voyage : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/voyage.html
 voyage
 
-// vuelos : 2015-03-05 Travel Reservations SRL
-vuelos
-
-// wales : 2014-05-08 Nominet UK
+// wales : Nominet UK
+// https://www.iana.org/domains/root/db/wales.html
 wales
 
-// walmart : 2015-07-31 Wal-Mart Stores, Inc.
+// walmart : Wal-Mart Stores, Inc.
+// https://www.iana.org/domains/root/db/walmart.html
 walmart
 
-// walter : 2014-11-13 Sandvik AB
+// walter : Sandvik AB
+// https://www.iana.org/domains/root/db/walter.html
 walter
 
-// wang : 2013-10-24 Zodiac Wang Limited
+// wang : Zodiac Wang Limited
+// https://www.iana.org/domains/root/db/wang.html
 wang
 
-// wanggou : 2014-12-18 Amazon Registry Services, Inc.
+// wanggou : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/wanggou.html
 wanggou
 
-// watch : 2013-11-14 Binky Moon, LLC
+// watch : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/watch.html
 watch
 
-// watches : 2014-12-22 Identity Digital Limited
+// watches : Identity Digital Limited
+// https://www.iana.org/domains/root/db/watches.html
 watches
 
-// weather : 2015-01-08 International Business Machines Corporation
+// weather : International Business Machines Corporation
+// https://www.iana.org/domains/root/db/weather.html
 weather
 
-// weatherchannel : 2015-03-12 International Business Machines Corporation
+// weatherchannel : International Business Machines Corporation
+// https://www.iana.org/domains/root/db/weatherchannel.html
 weatherchannel
 
-// webcam : 2014-01-23 dot Webcam Limited
+// webcam : dot Webcam Limited
+// https://www.iana.org/domains/root/db/webcam.html
 webcam
 
-// weber : 2015-06-04 Saint-Gobain Weber SA
+// weber : Saint-Gobain Weber SA
+// https://www.iana.org/domains/root/db/weber.html
 weber
 
-// website : 2014-04-03 Radix FZC
+// website : Radix FZC DMCC
+// https://www.iana.org/domains/root/db/website.html
 website
 
-// wedding : 2014-04-24 Registry Services, LLC
+// wedding : Registry Services, LLC
+// https://www.iana.org/domains/root/db/wedding.html
 wedding
 
-// weibo : 2015-03-05 Sina Corporation
+// weibo : Sina Corporation
+// https://www.iana.org/domains/root/db/weibo.html
 weibo
 
-// weir : 2015-01-29 Weir Group IP Limited
+// weir : Weir Group IP Limited
+// https://www.iana.org/domains/root/db/weir.html
 weir
 
-// whoswho : 2014-02-20 Who's Who Registry
+// whoswho : Who's Who Registry
+// https://www.iana.org/domains/root/db/whoswho.html
 whoswho
 
-// wien : 2013-10-28 punkt.wien GmbH
+// wien : punkt.wien GmbH
+// https://www.iana.org/domains/root/db/wien.html
 wien
 
-// wiki : 2013-11-07 Top Level Design, LLC
+// wiki : Registry Services, LLC
+// https://www.iana.org/domains/root/db/wiki.html
 wiki
 
-// williamhill : 2014-03-13 William Hill Organization Limited
+// williamhill : William Hill Organization Limited
+// https://www.iana.org/domains/root/db/williamhill.html
 williamhill
 
-// win : 2014-11-20 First Registry Limited
+// win : First Registry Limited
+// https://www.iana.org/domains/root/db/win.html
 win
 
-// windows : 2014-12-18 Microsoft Corporation
+// windows : Microsoft Corporation
+// https://www.iana.org/domains/root/db/windows.html
 windows
 
-// wine : 2015-06-18 Binky Moon, LLC
+// wine : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/wine.html
 wine
 
-// winners : 2015-07-16 The TJX Companies, Inc.
+// winners : The TJX Companies, Inc.
+// https://www.iana.org/domains/root/db/winners.html
 winners
 
-// wme : 2014-02-13 William Morris Endeavor Entertainment, LLC
+// wme : William Morris Endeavor Entertainment, LLC
+// https://www.iana.org/domains/root/db/wme.html
 wme
 
-// wolterskluwer : 2015-08-06 Wolters Kluwer N.V.
+// wolterskluwer : Wolters Kluwer N.V.
+// https://www.iana.org/domains/root/db/wolterskluwer.html
 wolterskluwer
 
-// woodside : 2015-07-09 Woodside Petroleum Limited
+// woodside : Woodside Petroleum Limited
+// https://www.iana.org/domains/root/db/woodside.html
 woodside
 
-// work : 2013-12-19 Registry Services, LLC
+// work : Registry Services, LLC
+// https://www.iana.org/domains/root/db/work.html
 work
 
-// works : 2013-11-14 Binky Moon, LLC
+// works : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/works.html
 works
 
-// world : 2014-06-12 Binky Moon, LLC
+// world : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/world.html
 world
 
-// wow : 2015-10-08 Amazon Registry Services, Inc.
+// wow : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/wow.html
 wow
 
-// wtc : 2013-12-19 World Trade Centers Association, Inc.
+// wtc : World Trade Centers Association, Inc.
+// https://www.iana.org/domains/root/db/wtc.html
 wtc
 
-// wtf : 2014-03-06 Binky Moon, LLC
+// wtf : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/wtf.html
 wtf
 
-// xbox : 2014-12-18 Microsoft Corporation
+// xbox : Microsoft Corporation
+// https://www.iana.org/domains/root/db/xbox.html
 xbox
 
-// xerox : 2014-10-24 Xerox DNHC LLC
+// xerox : Xerox DNHC LLC
+// https://www.iana.org/domains/root/db/xerox.html
 xerox
 
-// xfinity : 2015-07-09 Comcast IP Holdings I, LLC
+// xfinity : Comcast IP Holdings I, LLC
+// https://www.iana.org/domains/root/db/xfinity.html
 xfinity
 
-// xihuan : 2015-01-08 Beijing Qihu Keji Co., Ltd.
+// xihuan : Beijing Qihu Keji Co., Ltd.
+// https://www.iana.org/domains/root/db/xihuan.html
 xihuan
 
-// xin : 2014-12-11 Elegant Leader Limited
+// xin : Elegant Leader Limited
+// https://www.iana.org/domains/root/db/xin.html
 xin
 
-// xn--11b4c3d : 2015-01-15 VeriSign Sarl
+// xn--11b4c3d : VeriSign Sarl
+// https://www.iana.org/domains/root/db/xn--11b4c3d.html
 कॉम
 
-// xn--1ck2e1b : 2015-02-26 Amazon Registry Services, Inc.
+// xn--1ck2e1b : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/xn--1ck2e1b.html
 セール
 
-// xn--1qqw23a : 2014-01-09 Guangzhou YU Wei Information Technology Co., Ltd.
+// xn--1qqw23a : Guangzhou YU Wei Information Technology Co., Ltd.
+// https://www.iana.org/domains/root/db/xn--1qqw23a.html
 佛山
 
-// xn--30rr7y : 2014-06-12 Excellent First Limited
+// xn--30rr7y : Excellent First Limited
+// https://www.iana.org/domains/root/db/xn--30rr7y.html
 慈善
 
-// xn--3bst00m : 2013-09-13 Eagle Horizon Limited
+// xn--3bst00m : Eagle Horizon Limited
+// https://www.iana.org/domains/root/db/xn--3bst00m.html
 集团
 
-// xn--3ds443g : 2013-09-08 TLD REGISTRY LIMITED OY
+// xn--3ds443g : TLD REGISTRY LIMITED OY
+// https://www.iana.org/domains/root/db/xn--3ds443g.html
 在线
 
-// xn--3pxu8k : 2015-01-15 VeriSign Sarl
+// xn--3pxu8k : VeriSign Sarl
+// https://www.iana.org/domains/root/db/xn--3pxu8k.html
 点看
 
-// xn--42c2d9a : 2015-01-15 VeriSign Sarl
+// xn--42c2d9a : VeriSign Sarl
+// https://www.iana.org/domains/root/db/xn--42c2d9a.html
 คอม
 
-// xn--45q11c : 2013-11-21 Zodiac Gemini Ltd
+// xn--45q11c : Zodiac Gemini Ltd
+// https://www.iana.org/domains/root/db/xn--45q11c.html
 八卦
 
-// xn--4gbrim : 2013-10-04 Helium TLDs Ltd
+// xn--4gbrim : Helium TLDs Ltd
+// https://www.iana.org/domains/root/db/xn--4gbrim.html
 موقع
 
-// xn--55qw42g : 2013-11-08 China Organizational Name Administration Center
+// xn--55qw42g : China Organizational Name Administration Center
+// https://www.iana.org/domains/root/db/xn--55qw42g.html
 公益
 
-// xn--55qx5d : 2013-11-14 China Internet Network Information Center (CNNIC)
+// xn--55qx5d : China Internet Network Information Center (CNNIC)
+// https://www.iana.org/domains/root/db/xn--55qx5d.html
 公司
 
-// xn--5su34j936bgsg : 2015-09-03 Shangri‐La International Hotel Management 
Limited
+// xn--5su34j936bgsg : Shangri‐La International Hotel Management Limited
+// https://www.iana.org/domains/root/db/xn--5su34j936bgsg.html
 香格里拉
 
-// xn--5tzm5g : 2014-12-22 Global Website TLD Asia Limited
+// xn--5tzm5g : Global Website TLD Asia Limited
+// https://www.iana.org/domains/root/db/xn--5tzm5g.html
 网站
 
-// xn--6frz82g : 2013-09-23 Identity Digital Limited
+// xn--6frz82g : Identity Digital Limited
+// https://www.iana.org/domains/root/db/xn--6frz82g.html
 移动
 
-// xn--6qq986b3xl : 2013-09-13 Tycoon Treasure Limited
+// xn--6qq986b3xl : Tycoon Treasure Limited
+// https://www.iana.org/domains/root/db/xn--6qq986b3xl.html
 我爱你
 
-// xn--80adxhks : 2013-12-19 Foundation for Assistance for Internet 
Technologies and Infrastructure Development (FAITID)
+// xn--80adxhks : Foundation for Assistance for Internet Technologies and 
Infrastructure Development (FAITID)
+// https://www.iana.org/domains/root/db/xn--80adxhks.html
 москва
 
-// xn--80aqecdr1a : 2015-10-21 Pontificium Consilium de Comunicationibus 
Socialibus (PCCS) (Pontifical Council for Social Communication)
+// xn--80aqecdr1a : Pontificium Consilium de Comunicationibus Socialibus 
(PCCS) (Pontifical Council for Social Communication)
+// https://www.iana.org/domains/root/db/xn--80aqecdr1a.html
 католик
 
-// xn--80asehdb : 2013-07-14 CORE Association
+// xn--80asehdb : CORE Association
+// https://www.iana.org/domains/root/db/xn--80asehdb.html
 онлайн
 
-// xn--80aswg : 2013-07-14 CORE Association
+// xn--80aswg : CORE Association
+// https://www.iana.org/domains/root/db/xn--80aswg.html
 сайт
 
-// xn--8y0a063a : 2015-03-26 China United Network Communications Corporation 
Limited
+// xn--8y0a063a : China United Network Communications Corporation Limited
+// https://www.iana.org/domains/root/db/xn--8y0a063a.html
 联通
 
-// xn--9dbq2a : 2015-01-15 VeriSign Sarl
+// xn--9dbq2a : VeriSign Sarl
+// https://www.iana.org/domains/root/db/xn--9dbq2a.html
 קום
 
-// xn--9et52u : 2014-06-12 RISE VICTORY LIMITED
+// xn--9et52u : RISE VICTORY LIMITED
+// https://www.iana.org/domains/root/db/xn--9et52u.html
 时尚
 
-// xn--9krt00a : 2015-03-12 Sina Corporation
+// xn--9krt00a : Sina Corporation
+// https://www.iana.org/domains/root/db/xn--9krt00a.html
 微博
 
-// xn--b4w605ferd : 2014-08-07 Temasek Holdings (Private) Limited
+// xn--b4w605ferd : Temasek Holdings (Private) Limited
+// https://www.iana.org/domains/root/db/xn--b4w605ferd.html
 淡马锡
 
-// xn--bck1b9a5dre4c : 2015-02-26 Amazon Registry Services, Inc.
+// xn--bck1b9a5dre4c : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/xn--bck1b9a5dre4c.html
 ファッション
 
-// xn--c1avg : 2013-11-14 Public Interest Registry
+// xn--c1avg : Public Interest Registry
+// https://www.iana.org/domains/root/db/xn--c1avg.html
 орг
 
-// xn--c2br7g : 2015-01-15 VeriSign Sarl
+// xn--c2br7g : VeriSign Sarl
+// https://www.iana.org/domains/root/db/xn--c2br7g.html
 नेट
 
-// xn--cck2b3b : 2015-02-26 Amazon Registry Services, Inc.
+// xn--cck2b3b : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/xn--cck2b3b.html
 ストア
 
-// xn--cckwcxetd : 2019-12-19 Amazon Registry Services, Inc.
+// xn--cckwcxetd : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/xn--cckwcxetd.html
 アマゾン
 
-// xn--cg4bki : 2013-09-27 SAMSUNG SDS CO., LTD
+// xn--cg4bki : SAMSUNG SDS CO., LTD
+// https://www.iana.org/domains/root/db/xn--cg4bki.html
 삼성
 
-// xn--czr694b : 2014-01-16 Internet DotTrademark Organisation Limited
+// xn--czr694b : Internet DotTrademark Organisation Limited
+// https://www.iana.org/domains/root/db/xn--czr694b.html
 商标
 
-// xn--czrs0t : 2013-12-19 Binky Moon, LLC
+// xn--czrs0t : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/xn--czrs0t.html
 商店
 
-// xn--czru2d : 2013-11-21 Zodiac Aquarius Limited
+// xn--czru2d : Zodiac Aquarius Limited
+// https://www.iana.org/domains/root/db/xn--czru2d.html
 商城
 
-// xn--d1acj3b : 2013-11-20 The Foundation for Network Initiatives “The Smart 
Internet”
+// xn--d1acj3b : The Foundation for Network Initiatives “The Smart Internet”
+// https://www.iana.org/domains/root/db/xn--d1acj3b.html
 дети
 
-// xn--eckvdtc9d : 2014-12-18 Amazon Registry Services, Inc.
+// xn--eckvdtc9d : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/xn--eckvdtc9d.html
 ポイント
 
-// xn--efvy88h : 2014-08-22 Guangzhou YU Wei Information Technology Co., Ltd.
+// xn--efvy88h : Guangzhou YU Wei Information Technology Co., Ltd.
+// https://www.iana.org/domains/root/db/xn--efvy88h.html
 新闻
 
-// xn--fct429k : 2015-04-09 Amazon Registry Services, Inc.
+// xn--fct429k : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/xn--fct429k.html
 家電
 
-// xn--fhbei : 2015-01-15 VeriSign Sarl
+// xn--fhbei : VeriSign Sarl
+// https://www.iana.org/domains/root/db/xn--fhbei.html
 كوم
 
-// xn--fiq228c5hs : 2013-09-08 TLD REGISTRY LIMITED OY
+// xn--fiq228c5hs : TLD REGISTRY LIMITED OY
+// https://www.iana.org/domains/root/db/xn--fiq228c5hs.html
 中文网
 
-// xn--fiq64b : 2013-10-14 CITIC Group Corporation
+// xn--fiq64b : CITIC Group Corporation
+// https://www.iana.org/domains/root/db/xn--fiq64b.html
 中信
 
-// xn--fjq720a : 2014-05-22 Binky Moon, LLC
+// xn--fjq720a : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/xn--fjq720a.html
 娱乐
 
-// xn--flw351e : 2014-07-31 Charleston Road Registry Inc.
+// xn--flw351e : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/xn--flw351e.html
 谷歌
 
-// xn--fzys8d69uvgm : 2015-05-14 PCCW Enterprises Limited
+// xn--fzys8d69uvgm : PCCW Enterprises Limited
+// https://www.iana.org/domains/root/db/xn--fzys8d69uvgm.html
 電訊盈科
 
-// xn--g2xx48c : 2015-01-30 Nawang Heli(Xiamen) Network Service Co., LTD.
+// xn--g2xx48c : Nawang Heli(Xiamen) Network Service Co., LTD.
+// https://www.iana.org/domains/root/db/xn--g2xx48c.html
 购物
 
-// xn--gckr3f0f : 2015-02-26 Amazon Registry Services, Inc.
+// xn--gckr3f0f : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/xn--gckr3f0f.html
 クラウド
 
-// xn--gk3at1e : 2015-10-08 Amazon Registry Services, Inc.
+// xn--gk3at1e : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/xn--gk3at1e.html
 通販
 
-// xn--hxt814e : 2014-05-15 Zodiac Taurus Limited
+// xn--hxt814e : Zodiac Taurus Limited
+// https://www.iana.org/domains/root/db/xn--hxt814e.html
 网店
 
-// xn--i1b6b1a6a2e : 2013-11-14 Public Interest Registry
+// xn--i1b6b1a6a2e : Public Interest Registry
+// https://www.iana.org/domains/root/db/xn--i1b6b1a6a2e.html
 संगठन
 
-// xn--imr513n : 2014-12-11 Internet DotTrademark Organisation Limited
+// xn--imr513n : Internet DotTrademark Organisation Limited
+// https://www.iana.org/domains/root/db/xn--imr513n.html
 餐厅
 
-// xn--io0a7i : 2013-11-14 China Internet Network Information Center (CNNIC)
+// xn--io0a7i : China Internet Network Information Center (CNNIC)
+// https://www.iana.org/domains/root/db/xn--io0a7i.html
 网络
 
-// xn--j1aef : 2015-01-15 VeriSign Sarl
+// xn--j1aef : VeriSign Sarl
+// https://www.iana.org/domains/root/db/xn--j1aef.html
 ком
 
-// xn--jlq480n2rg : 2019-12-19 Amazon Registry Services, Inc.
+// xn--jlq480n2rg : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/xn--jlq480n2rg.html
 亚马逊
 
-// xn--jvr189m : 2015-02-26 Amazon Registry Services, Inc.
+// xn--jvr189m : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/xn--jvr189m.html
 食品
 
-// xn--kcrx77d1x4a : 2014-11-07 Koninklijke Philips N.V.
+// xn--kcrx77d1x4a : Koninklijke Philips N.V.
+// https://www.iana.org/domains/root/db/xn--kcrx77d1x4a.html
 飞利浦
 
-// xn--kput3i : 2014-02-13 Beijing RITT-Net Technology Development Co., Ltd
+// xn--kput3i : Beijing RITT-Net Technology Development Co., Ltd
+// https://www.iana.org/domains/root/db/xn--kput3i.html
 手机
 
-// xn--mgba3a3ejt : 2014-11-20 Aramco Services Company
+// xn--mgba3a3ejt : Aramco Services Company
+// https://www.iana.org/domains/root/db/xn--mgba3a3ejt.html
 ارامكو
 
-// xn--mgba7c0bbn0a : 2015-05-14 Crescent Holding GmbH
+// xn--mgba7c0bbn0a : Competrol (Luxembourg) Sarl
+// https://www.iana.org/domains/root/db/xn--mgba7c0bbn0a.html
 العليان
 
-// xn--mgbaakc7dvf : 2015-09-03 Emirates Telecommunications Corporation 
(trading as Etisalat)
+// xn--mgbaakc7dvf : Emirates Telecommunications Corporation (trading as 
Etisalat)
+// https://www.iana.org/domains/root/db/xn--mgbaakc7dvf.html
 اتصالات
 
-// xn--mgbab2bd : 2013-10-31 CORE Association
+// xn--mgbab2bd : CORE Association
+// https://www.iana.org/domains/root/db/xn--mgbab2bd.html
 بازار
 
-// xn--mgbca7dzdo : 2015-07-30 Abu Dhabi Systems and Information Centre
+// xn--mgbca7dzdo : Abu Dhabi Systems and Information Centre
+// https://www.iana.org/domains/root/db/xn--mgbca7dzdo.html
 ابوظبي
 
-// xn--mgbi4ecexp : 2015-10-21 Pontificium Consilium de Comunicationibus 
Socialibus (PCCS) (Pontifical Council for Social Communication)
+// xn--mgbi4ecexp : Pontificium Consilium de Comunicationibus Socialibus 
(PCCS) (Pontifical Council for Social Communication)
+// https://www.iana.org/domains/root/db/xn--mgbi4ecexp.html
 كاثوليك
 
-// xn--mgbt3dhd : 2014-09-04 Asia Green IT System Bilgisayar San. ve Tic. Ltd. 
Sti.
+// xn--mgbt3dhd : Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti.
+// https://www.iana.org/domains/root/db/xn--mgbt3dhd.html
 همراه
 
-// xn--mk1bu44c : 2015-01-15 VeriSign Sarl
+// xn--mk1bu44c : VeriSign Sarl
+// https://www.iana.org/domains/root/db/xn--mk1bu44c.html
 닷컴
 
-// xn--mxtq1m : 2014-03-06 Net-Chinese Co., Ltd.
+// xn--mxtq1m : Net-Chinese Co., Ltd.
+// https://www.iana.org/domains/root/db/xn--mxtq1m.html
 政府
 
-// xn--ngbc5azd : 2013-07-13 International Domain Registry Pty. Ltd.
+// xn--ngbc5azd : International Domain Registry Pty. Ltd.
+// https://www.iana.org/domains/root/db/xn--ngbc5azd.html
 شبكة
 
-// xn--ngbe9e0a : 2014-12-04 Kuwait Finance House
+// xn--ngbe9e0a : Kuwait Finance House
+// https://www.iana.org/domains/root/db/xn--ngbe9e0a.html
 بيتك
 
-// xn--ngbrx : 2015-11-12 League of Arab States
+// xn--ngbrx : League of Arab States
+// https://www.iana.org/domains/root/db/xn--ngbrx.html
 عرب
 
-// xn--nqv7f : 2013-11-14 Public Interest Registry
+// xn--nqv7f : Public Interest Registry
+// https://www.iana.org/domains/root/db/xn--nqv7f.html
 机构
 
-// xn--nqv7fs00ema : 2013-11-14 Public Interest Registry
+// xn--nqv7fs00ema : Public Interest Registry
+// https://www.iana.org/domains/root/db/xn--nqv7fs00ema.html
 组织机构
 
-// xn--nyqy26a : 2014-11-07 Stable Tone Limited
+// xn--nyqy26a : Stable Tone Limited
+// https://www.iana.org/domains/root/db/xn--nyqy26a.html
 健康
 
-// xn--otu796d : 2017-08-06 Jiang Yu Liang Cai Technology Company Limited
+// xn--otu796d : Jiang Yu Liang Cai Technology Company Limited
+// https://www.iana.org/domains/root/db/xn--otu796d.html
 招聘
 
-// xn--p1acf : 2013-12-12 Rusnames Limited
+// xn--p1acf : Rusnames Limited
+// https://www.iana.org/domains/root/db/xn--p1acf.html
 рус
 
-// xn--pssy2u : 2015-01-15 VeriSign Sarl
+// xn--pssy2u : VeriSign Sarl
+// https://www.iana.org/domains/root/db/xn--pssy2u.html
 大拿
 
-// xn--q9jyb4c : 2013-09-17 Charleston Road Registry Inc.
+// xn--q9jyb4c : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/xn--q9jyb4c.html
 みんな
 
-// xn--qcka1pmc : 2014-07-31 Charleston Road Registry Inc.
+// xn--qcka1pmc : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/xn--qcka1pmc.html
 グーグル
 
-// xn--rhqv96g : 2013-09-11 Stable Tone Limited
+// xn--rhqv96g : Stable Tone Limited
+// https://www.iana.org/domains/root/db/xn--rhqv96g.html
 世界
 
-// xn--rovu88b : 2015-02-26 Amazon Registry Services, Inc.
+// xn--rovu88b : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/xn--rovu88b.html
 書籍
 
-// xn--ses554g : 2014-01-16 KNET Co., Ltd.
+// xn--ses554g : KNET Co., Ltd.
+// https://www.iana.org/domains/root/db/xn--ses554g.html
 网址
 
-// xn--t60b56a : 2015-01-15 VeriSign Sarl
+// xn--t60b56a : VeriSign Sarl
+// https://www.iana.org/domains/root/db/xn--t60b56a.html
 닷넷
 
-// xn--tckwe : 2015-01-15 VeriSign Sarl
+// xn--tckwe : VeriSign Sarl
+// https://www.iana.org/domains/root/db/xn--tckwe.html
 コム
 
-// xn--tiq49xqyj : 2015-10-21 Pontificium Consilium de Comunicationibus 
Socialibus (PCCS) (Pontifical Council for Social Communication)
+// xn--tiq49xqyj : Pontificium Consilium de Comunicationibus Socialibus (PCCS) 
(Pontifical Council for Social Communication)
+// https://www.iana.org/domains/root/db/xn--tiq49xqyj.html
 天主教
 
-// xn--unup4y : 2013-07-14 Binky Moon, LLC
+// xn--unup4y : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/xn--unup4y.html
 游戏
 
-// xn--vermgensberater-ctb : 2014-06-23 Deutsche Vermögensberatung 
Aktiengesellschaft DVAG
+// xn--vermgensberater-ctb : Deutsche Vermögensberatung Aktiengesellschaft DVAG
+// https://www.iana.org/domains/root/db/xn--vermgensberater-ctb.html
 vermögensberater
 
-// xn--vermgensberatung-pwb : 2014-06-23 Deutsche Vermögensberatung 
Aktiengesellschaft DVAG
+// xn--vermgensberatung-pwb : Deutsche Vermögensberatung Aktiengesellschaft 
DVAG
+// https://www.iana.org/domains/root/db/xn--vermgensberatung-pwb.html
 vermögensberatung
 
-// xn--vhquv : 2013-08-27 Binky Moon, LLC
+// xn--vhquv : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/xn--vhquv.html
 企业
 
-// xn--vuq861b : 2014-10-16 Beijing Tele-info Network Technology Co., Ltd.
+// xn--vuq861b : Beijing Tele-info Technology Co., Ltd.
+// https://www.iana.org/domains/root/db/xn--vuq861b.html
 信息
 
-// xn--w4r85el8fhu5dnra : 2015-04-30 Kerry Trading Co. Limited
+// xn--w4r85el8fhu5dnra : Kerry Trading Co. Limited
+// https://www.iana.org/domains/root/db/xn--w4r85el8fhu5dnra.html
 嘉里大酒店
 
-// xn--w4rs40l : 2015-07-30 Kerry Trading Co. Limited
+// xn--w4rs40l : Kerry Trading Co. Limited
+// https://www.iana.org/domains/root/db/xn--w4rs40l.html
 嘉里
 
-// xn--xhq521b : 2013-11-14 Guangzhou YU Wei Information Technology Co., Ltd.
+// xn--xhq521b : Guangzhou YU Wei Information Technology Co., Ltd.
+// https://www.iana.org/domains/root/db/xn--xhq521b.html
 广东
 
-// xn--zfr164b : 2013-11-08 China Organizational Name Administration Center
+// xn--zfr164b : China Organizational Name Administration Center
+// https://www.iana.org/domains/root/db/xn--zfr164b.html
 政务
 
-// xyz : 2013-12-05 XYZ.COM LLC
+// xyz : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/xyz.html
 xyz
 
-// yachts : 2014-01-09 XYZ.COM LLC
+// yachts : XYZ.COM LLC
+// https://www.iana.org/domains/root/db/yachts.html
 yachts
 
-// yahoo : 2015-04-02 Oath Inc.
+// yahoo : Oath Inc.
+// https://www.iana.org/domains/root/db/yahoo.html
 yahoo
 
-// yamaxun : 2014-12-18 Amazon Registry Services, Inc.
+// yamaxun : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/yamaxun.html
 yamaxun
 
-// yandex : 2014-04-10 Yandex Europe B.V.
+// yandex : Yandex Europe B.V.
+// https://www.iana.org/domains/root/db/yandex.html
 yandex
 
-// yodobashi : 2014-11-20 YODOBASHI CAMERA CO.,LTD.
+// yodobashi : YODOBASHI CAMERA CO.,LTD.
+// https://www.iana.org/domains/root/db/yodobashi.html
 yodobashi
 
-// yoga : 2014-05-29 Registry Services, LLC
+// yoga : Registry Services, LLC
+// https://www.iana.org/domains/root/db/yoga.html
 yoga
 
-// yokohama : 2013-12-12 GMO Registry, Inc.
+// yokohama : GMO Registry, Inc.
+// https://www.iana.org/domains/root/db/yokohama.html
 yokohama
 
-// you : 2015-04-09 Amazon Registry Services, Inc.
+// you : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/you.html
 you
 
-// youtube : 2014-05-01 Charleston Road Registry Inc.
+// youtube : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/youtube.html
 youtube
 
-// yun : 2015-01-08 Beijing Qihu Keji Co., Ltd.
+// yun : Beijing Qihu Keji Co., Ltd.
+// https://www.iana.org/domains/root/db/yun.html
 yun
 
-// zappos : 2015-06-25 Amazon Registry Services, Inc.
+// zappos : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/zappos.html
 zappos
 
-// zara : 2014-11-07 Industria de Diseño Textil, S.A. (INDITEX, S.A.)
+// zara : Industria de Diseño Textil, S.A. (INDITEX, S.A.)
+// https://www.iana.org/domains/root/db/zara.html
 zara
 
-// zero : 2014-12-18 Amazon Registry Services, Inc.
+// zero : Amazon Registry Services, Inc.
+// https://www.iana.org/domains/root/db/zero.html
 zero
 
-// zip : 2014-05-08 Charleston Road Registry Inc.
+// zip : Charleston Road Registry Inc.
+// https://www.iana.org/domains/root/db/zip.html
 zip
 
-// zone : 2013-11-14 Binky Moon, LLC
+// zone : Binky Moon, LLC
+// https://www.iana.org/domains/root/db/zone.html
 zone
 
-// zuerich : 2014-11-07 Kanton Zürich (Canton of Zurich)
+// zuerich : Kanton Zürich (Canton of Zurich)
+// https://www.iana.org/domains/root/db/zuerich.html
 zuerich
 
 
@@ -10808,49 +11416,79 @@ s3.dualstack.us-east-2.amazonaws.com
 s3.us-east-2.amazonaws.com
 s3-website.us-east-2.amazonaws.com
 
+// Analytics on AWS
+// Submitted by AWS Security <psl-maintainers@amazon.com>
+// Reference: c02c3a80-f8a0-4fd2-b719-48ea8b7c28de
+analytics-gateway.ap-northeast-1.amazonaws.com
+analytics-gateway.eu-west-1.amazonaws.com
+analytics-gateway.us-east-1.amazonaws.com
+analytics-gateway.us-east-2.amazonaws.com
+analytics-gateway.us-west-2.amazonaws.com
+
 // AWS Cloud9
 // Submitted by: AWS Security <psl-maintainers@amazon.com>
-// Reference: 2b6dfa9a-3a7f-4367-b2e7-0321e77c0d59
+// Reference: 05c44955-977c-4b57-938a-f2af92733f9f
+webview-assets.aws-cloud9.af-south-1.amazonaws.com
 vfs.cloud9.af-south-1.amazonaws.com
 webview-assets.cloud9.af-south-1.amazonaws.com
+webview-assets.aws-cloud9.ap-east-1.amazonaws.com
 vfs.cloud9.ap-east-1.amazonaws.com
 webview-assets.cloud9.ap-east-1.amazonaws.com
+webview-assets.aws-cloud9.ap-northeast-1.amazonaws.com
 vfs.cloud9.ap-northeast-1.amazonaws.com
 webview-assets.cloud9.ap-northeast-1.amazonaws.com
+webview-assets.aws-cloud9.ap-northeast-2.amazonaws.com
 vfs.cloud9.ap-northeast-2.amazonaws.com
 webview-assets.cloud9.ap-northeast-2.amazonaws.com
+webview-assets.aws-cloud9.ap-northeast-3.amazonaws.com
 vfs.cloud9.ap-northeast-3.amazonaws.com
 webview-assets.cloud9.ap-northeast-3.amazonaws.com
+webview-assets.aws-cloud9.ap-south-1.amazonaws.com
 vfs.cloud9.ap-south-1.amazonaws.com
 webview-assets.cloud9.ap-south-1.amazonaws.com
+webview-assets.aws-cloud9.ap-southeast-1.amazonaws.com
 vfs.cloud9.ap-southeast-1.amazonaws.com
 webview-assets.cloud9.ap-southeast-1.amazonaws.com
+webview-assets.aws-cloud9.ap-southeast-2.amazonaws.com
 vfs.cloud9.ap-southeast-2.amazonaws.com
 webview-assets.cloud9.ap-southeast-2.amazonaws.com
+webview-assets.aws-cloud9.ca-central-1.amazonaws.com
 vfs.cloud9.ca-central-1.amazonaws.com
 webview-assets.cloud9.ca-central-1.amazonaws.com
+webview-assets.aws-cloud9.eu-central-1.amazonaws.com
 vfs.cloud9.eu-central-1.amazonaws.com
 webview-assets.cloud9.eu-central-1.amazonaws.com
+webview-assets.aws-cloud9.eu-north-1.amazonaws.com
 vfs.cloud9.eu-north-1.amazonaws.com
 webview-assets.cloud9.eu-north-1.amazonaws.com
+webview-assets.aws-cloud9.eu-south-1.amazonaws.com
 vfs.cloud9.eu-south-1.amazonaws.com
 webview-assets.cloud9.eu-south-1.amazonaws.com
+webview-assets.aws-cloud9.eu-west-1.amazonaws.com
 vfs.cloud9.eu-west-1.amazonaws.com
 webview-assets.cloud9.eu-west-1.amazonaws.com
+webview-assets.aws-cloud9.eu-west-2.amazonaws.com
 vfs.cloud9.eu-west-2.amazonaws.com
 webview-assets.cloud9.eu-west-2.amazonaws.com
+webview-assets.aws-cloud9.eu-west-3.amazonaws.com
 vfs.cloud9.eu-west-3.amazonaws.com
 webview-assets.cloud9.eu-west-3.amazonaws.com
+webview-assets.aws-cloud9.me-south-1.amazonaws.com
 vfs.cloud9.me-south-1.amazonaws.com
 webview-assets.cloud9.me-south-1.amazonaws.com
+webview-assets.aws-cloud9.sa-east-1.amazonaws.com
 vfs.cloud9.sa-east-1.amazonaws.com
 webview-assets.cloud9.sa-east-1.amazonaws.com
+webview-assets.aws-cloud9.us-east-1.amazonaws.com
 vfs.cloud9.us-east-1.amazonaws.com
 webview-assets.cloud9.us-east-1.amazonaws.com
+webview-assets.aws-cloud9.us-east-2.amazonaws.com
 vfs.cloud9.us-east-2.amazonaws.com
 webview-assets.cloud9.us-east-2.amazonaws.com
+webview-assets.aws-cloud9.us-west-1.amazonaws.com
 vfs.cloud9.us-west-1.amazonaws.com
 webview-assets.cloud9.us-west-1.amazonaws.com
+webview-assets.aws-cloud9.us-west-2.amazonaws.com
 vfs.cloud9.us-west-2.amazonaws.com
 webview-assets.cloud9.us-west-2.amazonaws.com
 
@@ -12643,7 +13281,6 @@ iobb.net
 // Submitted by Ihor Kolodyuk <ik@jelastic.com>
 mel.cloudlets.com.au
 cloud.interhostsolutions.be
-users.scale.virtualcloud.com.br
 mycloud.by
 alp1.ae.flow.ch
 appengine.flow.ch
@@ -12667,9 +13304,7 @@ ch.trendhosting.cloud
 de.trendhosting.cloud
 jele.club
 amscompute.com
-clicketcloud.com
 dopaas.com
-hidora.com
 paas.hosted-by-previder.com
 rag-cloud.hosteur.com
 rag-cloud-ch.hosteur.com
@@ -13459,6 +14094,10 @@ qoto.io
 // Submitted by Xavier De Cock <xdecock@gmail.com>
 qualifioapp.com
 
+// Quality Unit: https://qualityunit.com
+// Submitted by Vasyl Tsalko <vtsalko@qualityunit.com>
+ladesk.com
+
 // QuickBackend: https://www.quickbackend.com
 // Submitted by Dani Biro <dani@pymet.com>
 qbuser.com
@@ -13774,6 +14413,20 @@ bounty-full.com
 alpha.bounty-full.com
 beta.bounty-full.com
 
+// Smallregistry by Promopixel SARL: https://www.smallregistry.net
+// Former AFNIC's SLDs 
+// Submitted by Jérôme Lipowicz <support@promopixel.com>
+aeroport.fr
+avocat.fr
+chambagri.fr
+chirurgiens-dentistes.fr
+experts-comptables.fr
+medecin.fr
+notaires.fr
+pharmacien.fr
+port.fr
+veterinaire.fr
+
 // Small Technology Foundation : https://small-tech.org
 // Submitted by Aral Balkan <aral@small-tech.org>
 small-web.org
@@ -13867,6 +14520,10 @@ myspreadshop.co.uk
 // Submitted by Jacob Lee <jacob@stdlib.com>
 api.stdlib.com
 
+// Storipress : https://storipress.com
+// Submitted by Benno Liu <benno@storipress.com>
+storipress.app
+
 // Storj Labs Inc. : https://storj.io/
 // Submitted by Philip Hutchins <hostmaster@storj.io>
 storj.farm
@@ -14234,6 +14891,8 @@ js.wpenginepowered.com
 // Submitted by Shahar Talmi <shahar@wix.com>
 wixsite.com
 editorx.io
+wixstudio.io
+wix.run
 
 // XenonCloud GbR: https://xenoncloud.net
 // Submitted by Julian Uphoff <publicsuffixlist@xenoncloud.net>
diff --git a/etc/refcards/orgcard.tex b/etc/refcards/orgcard.tex
index 62ba687c19f..240e3366b0b 100644
--- a/etc/refcards/orgcard.tex
+++ b/etc/refcards/orgcard.tex
@@ -1,5 +1,5 @@
 % Reference Card for Org Mode
-\def\orgversionnumber{9.6.9}
+\def\orgversionnumber{9.6.10}
 \def\versionyear{2023}          % latest update
 \input emacsver.tex
 
diff --git a/java/AndroidManifest.xml.in b/java/AndroidManifest.xml.in
index 9ba9dabde81..2749f43c245 100644
--- a/java/AndroidManifest.xml.in
+++ b/java/AndroidManifest.xml.in
@@ -73,8 +73,12 @@ along with GNU Emacs.  If not, see 
<https://www.gnu.org/licenses/>. -->
 
   <uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
 
+  <!-- Under Android 14 or later to run within the background.  -->
+
+  <uses-permission 
android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE"/>
+
   <uses-sdk android:minSdkVersion="@ANDROID_MIN_SDK@"
-           android:targetSdkVersion="33"/>
+           android:targetSdkVersion="34"/>
 
   <application android:name="org.gnu.emacs.EmacsApplication"
               android:label="Emacs"
@@ -190,6 +194,7 @@ along with GNU Emacs.  If not, see 
<https://www.gnu.org/licenses/>. -->
             android:directBootAware="false"
             android:enabled="true"
             android:exported="false"
+            android:foregroundServiceType="specialUse"
             android:label="GNU Emacs service"/>
   </application>
 </manifest>
diff --git a/java/INSTALL b/java/INSTALL
index fb235af1346..fb221c5e2b4 100644
--- a/java/INSTALL
+++ b/java/INSTALL
@@ -39,7 +39,7 @@ script like so:
 Replacing the paths in the command line above with:
 
   - the path to the `android.jar' headers which come with the Android
-    SDK.  They must correspond to Android version 13 (API level 33).
+    SDK.  They must correspond to Android version 14 (API level 34).
 
   - the path to the C compiler in the Android NDK, for the kind of CPU
     you are building Emacs to run on.
@@ -87,13 +87,13 @@ necessary for compiling Emacs.
 
 It is imperative that Emacs is compiled using the headers for the
 exact API level that it is written for.  This is currently API level
-33, so the correct android.jar archive is located within a directory
-whose name begins with `android-33'.  Minor revisions to the headers
+34, so the correct android.jar archive is located within a directory
+whose name begins with `android-34'.  Minor revisions to the headers
 are inconsequential towards the Emacs compilation process; if there is
-a directory named `android-33-extN' (where N represents a revision to
+a directory named `android-34-extN' (where N represents a revision to
 the Android SDK), whether you provide `configure' with that
 directory's android.jar or the android.jar contained within the
-directory named `android-33' is of no special importance.
+directory named `android-34' is of no special importance.
 
 The ndk directory contains one subdirectory for each version of the
 Android NDK installed.  This directory in turn contains the C and C++
@@ -299,6 +299,8 @@ work, along with what has to be patched to make them work:
       the following three dependencies.)
   libpackagelistparser
     
https://android.googlesource.com/platform/system/core/+/refs/heads/nougat-mr1-dev/libpackagelistparser/
+    (You must add LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include before
+      its Android.mk includes $(BUILD_SHARED_LIBRARY))
   libpcre      - https://android.googlesource.com/platform/external/pcre
   libcrypto    - https://android.googlesource.com/platform/external/boringssl
      (You must apply the patch at the end of this file when building for
@@ -404,14 +406,14 @@ libxml2 before it can be built for Emacs.  In addition, 
you must also
 revert the commit `edb5870767fed8712a9b77ef34097209b61ab2db'.
 
 diff --git a/Android.mk b/Android.mk
-index 07c7b372..24f67e49 100644
+index 07c7b372..2494274f 100644
 --- a/Android.mk
 +++ b/Android.mk
 @@ -80,6 +80,7 @@ LOCAL_SHARED_LIBRARIES := libicuuc
  LOCAL_MODULE:= libxml2
  LOCAL_CLANG := true
  LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk
-+LOCAL_EXPORT_C_INCLUDES += $(LOCAL_PATH)
++LOCAL_EXPORT_C_INCLUDES += $(LOCAL_PATH)/include
  include $(BUILD_SHARED_LIBRARY)
  
  # For the host
diff --git a/java/org/gnu/emacs/EmacsActivity.java 
b/java/org/gnu/emacs/EmacsActivity.java
index cecd9c21d99..f9aa261e355 100644
--- a/java/org/gnu/emacs/EmacsActivity.java
+++ b/java/org/gnu/emacs/EmacsActivity.java
@@ -89,8 +89,11 @@ public class EmacsActivity extends Activity
     if (window.view.isFocused ())
       focusedWindow = window;
 
-    for (EmacsWindow child : window.children)
-      invalidateFocus1 (child);
+    synchronized (window.children)
+      {
+       for (EmacsWindow child : window.children)
+         invalidateFocus1 (child);
+      }
   }
 
   public static void
diff --git a/java/org/gnu/emacs/EmacsInputConnection.java 
b/java/org/gnu/emacs/EmacsInputConnection.java
index c3764a7b29f..7f6331205cb 100644
--- a/java/org/gnu/emacs/EmacsInputConnection.java
+++ b/java/org/gnu/emacs/EmacsInputConnection.java
@@ -628,6 +628,21 @@ public final class EmacsInputConnection implements 
InputConnection
     batchEditCount = 0;
   }
 
+  @Override
+  public boolean
+  replaceText (int start, int end, CharSequence text,
+              int newCursorPosition, TextAttribute attributes)
+  {
+    if (EmacsService.DEBUG_IC)
+      Log.d (TAG, ("replaceText: " + text + ":: " + start + ","
+                  + end + "," + newCursorPosition));
+
+    EmacsNative.replaceText (windowHandle, start, end,
+                            text.toString (), newCursorPosition,
+                            attributes);
+    return true;
+  }
+
 
 
   public void
diff --git a/java/org/gnu/emacs/EmacsNative.java 
b/java/org/gnu/emacs/EmacsNative.java
index a4b45aafbc1..7d7e1e5d831 100644
--- a/java/org/gnu/emacs/EmacsNative.java
+++ b/java/org/gnu/emacs/EmacsNative.java
@@ -26,6 +26,7 @@ import android.graphics.Bitmap;
 import android.view.inputmethod.ExtractedText;
 import android.view.inputmethod.ExtractedTextRequest;
 import android.view.inputmethod.SurroundingText;
+import android.view.inputmethod.TextAttribute;
 import android.view.inputmethod.TextSnapshot;
 
 public final class EmacsNative
@@ -174,6 +175,17 @@ public final class EmacsNative
   public static native long sendExpose (short window, int x, int y,
                                        int width, int height);
 
+  /* Send an ANDROID_DND_DRAG event.  */
+  public static native long sendDndDrag (short window, int x, int y);
+
+  /* Send an ANDROID_DND_URI event.  */
+  public static native long sendDndUri (short window, int x, int y,
+                                       String text);
+
+  /* Send an ANDROID_DND_TEXT event.  */
+  public static native long sendDndText (short window, int x, int y,
+                                        String text);
+
   /* Return the file name associated with the specified file
      descriptor, or NULL if there is none.  */
   public static native byte[] getProcName (int fd);
@@ -219,6 +231,9 @@ public final class EmacsNative
                                                   int leftLength,
                                                   int rightLength);
   public static native void finishComposingText (short window);
+  public static native void replaceText (short window, int start, int end,
+                                        String text, int newCursorPosition,
+                                        TextAttribute attributes);
   public static native String getSelectedText (short window, int flags);
   public static native String getTextAfterCursor (short window, int length,
                                                  int flags);
diff --git a/java/org/gnu/emacs/EmacsOpenActivity.java 
b/java/org/gnu/emacs/EmacsOpenActivity.java
index 202b3c8c5dc..a5e8be2f238 100644
--- a/java/org/gnu/emacs/EmacsOpenActivity.java
+++ b/java/org/gnu/emacs/EmacsOpenActivity.java
@@ -55,6 +55,7 @@ import android.net.Uri;
 import android.os.Build;
 import android.os.Bundle;
 import android.os.ParcelFileDescriptor;
+import android.os.Parcelable;
 
 import android.util.Log;
 
@@ -67,6 +68,8 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.UnsupportedEncodingException;
 
+import java.util.List;
+
 public final class EmacsOpenActivity extends Activity
   implements DialogInterface.OnClickListener,
   DialogInterface.OnCancelListener
@@ -396,6 +399,7 @@ public final class EmacsOpenActivity extends Activity
      Finally, display any error message, transfer the focus to an
      Emacs frame, and finish the activity.  */
 
+  @SuppressWarnings ("deprecation") /* getParcelableExtra */
   @Override
   public void
   onCreate (Bundle savedInstanceState)
@@ -407,6 +411,11 @@ public final class EmacsOpenActivity extends Activity
     ParcelFileDescriptor fd;
     byte[] names;
     String errorBlurb, scheme;
+    String subjectString, textString, attachmentString;
+    CharSequence tem;
+    String tem1;
+    StringBuilder builder;
+    List<Parcelable> list;
 
     super.onCreate (savedInstanceState);
 
@@ -425,6 +434,7 @@ public final class EmacsOpenActivity extends Activity
     if (action.equals ("android.intent.action.VIEW")
        || action.equals ("android.intent.action.EDIT")
        || action.equals ("android.intent.action.PICK")
+       || action.equals ("android.intent.action.SEND")
        || action.equals ("android.intent.action.SENDTO"))
       {
        /* Obtain the URI of the action.  */
@@ -452,8 +462,130 @@ public final class EmacsOpenActivity extends Activity
            /* Escape the special characters $ and " before enclosing
               the string within the `message-mailto' wrapper.  */
            fileName = uri.toString ();
-           fileName.replace ("\"", "\\\"").replace ("$", "\\$");
-           fileName = "(message-mailto \"" + fileName + "\")";
+
+           /* If fileName is merely mailto: (absent either an email
+              address or content), then the program launching Emacs
+              conceivably provided such an URI to exclude non-email
+              programs from being enumerated within the Share dialog;
+              whereupon Emacs should replace it with any address
+              provided as EXTRA_EMAIL.  */
+
+           if (fileName.equals ("mailto:";) || fileName.equals ("mailto://";))
+             {
+               tem = intent.getCharSequenceExtra (Intent.EXTRA_EMAIL);
+
+               if (tem != null)
+                 fileName = "mailto:"; + tem;
+             }
+
+           /* Subsequently, escape fileName such that it is rendered
+              safe to append to the command line.  */
+
+           fileName = (fileName
+                       .replace ("\\", "\\\\")
+                       .replace ("\"", "\\\"")
+                       .replace ("$", "\\$"));
+
+           fileName = "(message-mailto \"" + fileName + "\" ";
+
+           /* Parse the intent itself to ascertain if any
+              non-standard subject, body, or something else of the
+              like is set.  Such fields, non-standard as they are,
+              yield to fields provided within the URL itself; refer
+              to message-mailto.  */
+
+           textString = attachmentString = subjectString = "()";
+
+           tem = intent.getCharSequenceExtra (Intent.EXTRA_SUBJECT);
+
+           if (tem != null)
+             subjectString = ("\"" + (tem.toString ()
+                                      .replace ("\\", "\\\\")
+                                      .replace ("\"", "\\\"")
+                                      .replace ("$", "\\$"))
+                              + "\" ");
+
+           tem = intent.getCharSequenceExtra (Intent.EXTRA_TEXT);
+
+           if (tem != null)
+             textString = ("\"" + (tem.toString ()
+                                   .replace ("\\", "\\\\")
+                                   .replace ("\"", "\\\"")
+                                   .replace ("$", "\\$"))
+                           + "\" ");
+
+           /* Producing a list of attachments is prey to two
+              mannerisms of the system: in the first instance, these
+              attachments are content URIs which don't allude to
+              their content types; and in the second instance, they
+              are either a list of such URIs or one individual URI,
+              subject to the type of the intent itself.  */
+
+           if (Intent.ACTION_SEND.equals (action))
+             {
+               /* The attachment in this case is a single content
+                  URI.  */
+
+               if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU)
+                 uri = intent.getParcelableExtra (Intent.EXTRA_STREAM,
+                                                  Uri.class);
+               else
+                 uri = intent.getParcelableExtra (Intent.EXTRA_STREAM);
+
+               if (uri != null
+                   && (scheme = uri.getScheme ()) != null
+                   && scheme.equals ("content"))
+                 {
+                   tem1 = EmacsService.buildContentName (uri);
+                   attachmentString = ("'(\"" + (tem1.replace ("\\", "\\\\")
+                                                 .replace ("\"", "\\\"")
+                                                 .replace ("$", "\\$"))
+                                       + "\")");
+                 }
+             }
+           else
+             {
+               if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU)
+                 list
+                   = intent.getParcelableArrayListExtra (Intent.EXTRA_STREAM,
+                                                         Parcelable.class);
+               else
+                 list
+                   = intent.getParcelableArrayListExtra (Intent.EXTRA_STREAM);
+
+               if (list != null)
+                 {
+                   builder = new StringBuilder ("'(");
+
+                   for (Parcelable parcelable : list)
+                     {
+                       if (!(parcelable instanceof Uri))
+                         continue;
+
+                       uri = (Uri) parcelable;
+
+                       if (uri != null
+                           && (scheme = uri.getScheme ()) != null
+                           && scheme.equals ("content"))
+                         {
+                           tem1 = EmacsService.buildContentName (uri);
+                           builder.append ("\"");
+                           builder.append (tem1.replace ("\\", "\\\\")
+                                           .replace ("\"", "\\\"")
+                                           .replace ("$", "\\$"));
+                           builder.append ("\"");
+                         }
+                     }
+
+                   builder.append (")");
+                   attachmentString = builder.toString ();
+                 }
+             }
+
+           fileName += subjectString;
+           fileName += textString;
+           fileName += attachmentString;
+           fileName += ")";
 
            /* Execute emacsclient in order to execute this code.  */
            currentActivity = this;
diff --git a/java/org/gnu/emacs/EmacsSdk7FontDriver.java 
b/java/org/gnu/emacs/EmacsSdk7FontDriver.java
index 21ae159d5bd..33d6ee34fa4 100644
--- a/java/org/gnu/emacs/EmacsSdk7FontDriver.java
+++ b/java/org/gnu/emacs/EmacsSdk7FontDriver.java
@@ -99,6 +99,7 @@ public class EmacsSdk7FontDriver extends EmacsFontDriver
     /* The typeface.  */
     public Sdk7Typeface typeface;
 
+    @SuppressWarnings ("deprecation")
     public
     Sdk7FontEntity (Sdk7Typeface typeface)
     {
@@ -120,6 +121,7 @@ public class EmacsSdk7FontDriver extends EmacsFontDriver
     /* The typeface.  */
     public Sdk7Typeface typeface;
 
+    @SuppressWarnings ("deprecation")
     public
     Sdk7FontObject (Sdk7Typeface typeface, int pixelSize)
     {
diff --git a/java/org/gnu/emacs/EmacsService.java 
b/java/org/gnu/emacs/EmacsService.java
index 997c6923fcc..1325cd85e9b 100644
--- a/java/org/gnu/emacs/EmacsService.java
+++ b/java/org/gnu/emacs/EmacsService.java
@@ -223,6 +223,21 @@ public final class EmacsService extends Service
       }
   }
 
+  /* Return the display density, adjusted in accord with the user's
+     text scaling preferences.  */
+
+  @SuppressWarnings ("deprecation")
+  private static float
+  getScaledDensity (DisplayMetrics metrics)
+  {
+    /* The scaled density has been made obsolete by the introduction
+       of non-linear text scaling in Android 34, where there is no
+       longer a fixed relation between point and pixel sizes, but
+       remains useful, considering that Emacs does not support
+       non-linear text scaling.  */
+    return metrics.scaledDensity;
+  }
+
   @Override
   public void
   onCreate ()
@@ -242,7 +257,7 @@ public final class EmacsService extends Service
     metrics = getResources ().getDisplayMetrics ();
     pixelDensityX = metrics.xdpi;
     pixelDensityY = metrics.ydpi;
-    tempScaledDensity = ((metrics.scaledDensity
+    tempScaledDensity = ((getScaledDensity (metrics)
                          / metrics.density)
                         * pixelDensityX);
     resolver = getContentResolver ();
@@ -490,15 +505,18 @@ public final class EmacsService extends Service
     else
       windowList = window.children;
 
-    array = new short[windowList.size () + 1];
-    i = 1;
+    synchronized (windowList)
+      {
+       array = new short[windowList.size () + 1];
+       i = 1;
 
-    array[0] = (window == null
-               ? 0 : (window.parent != null
-                      ? window.parent.handle : 0));
+       array[0] = (window == null
+                   ? 0 : (window.parent != null
+                          ? window.parent.handle : 0));
 
-    for (EmacsWindow treeWindow : windowList)
-      array[i++] = treeWindow.handle;
+       for (EmacsWindow treeWindow : windowList)
+         array[i++] = treeWindow.handle;
+      }
 
     return array;
   }
@@ -903,6 +921,48 @@ public final class EmacsService extends Service
 
   /* Content provider functions.  */
 
+  /* Return a ContentResolver capable of accessing as many files as
+     possible, namely the content resolver of the last selected
+     activity if available: only they posses the rights to access drag
+     and drop files.  */
+
+  public ContentResolver
+  getUsefulContentResolver ()
+  {
+    EmacsActivity activity;
+
+    if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N)
+      /* Since the system predates drag and drop, return this resolver
+        to avoid any unforseen difficulties.  */
+      return resolver;
+
+    activity = EmacsActivity.lastFocusedActivity;
+    if (activity == null)
+      return resolver;
+
+    return activity.getContentResolver ();
+  }
+
+  /* Return a context whose ContentResolver is granted access to most
+     files, as in `getUsefulContentResolver'.  */
+
+  public Context
+  getContentResolverContext ()
+  {
+    EmacsActivity activity;
+
+    if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N)
+      /* Since the system predates drag and drop, return this resolver
+        to avoid any unforseen difficulties.  */
+      return this;
+
+    activity = EmacsActivity.lastFocusedActivity;
+    if (activity == null)
+      return this;
+
+    return activity;
+  }
+
   /* Open a content URI described by the bytes BYTES, a non-terminated
      string; make it writable if WRITABLE, and readable if READABLE.
      Truncate the file if TRUNCATE.
@@ -916,6 +976,9 @@ public final class EmacsService extends Service
     String name, mode;
     ParcelFileDescriptor fd;
     int i;
+    ContentResolver resolver;
+
+    resolver = getUsefulContentResolver ();
 
     /* Figure out the file access mode.  */
 
@@ -960,6 +1023,7 @@ public final class EmacsService extends Service
       }
     catch (Exception exception)
       {
+       exception.printStackTrace ();
        return -1;
       }
   }
@@ -976,6 +1040,11 @@ public final class EmacsService extends Service
     ParcelFileDescriptor fd;
     Uri uri;
     int rc, flags;
+    Context context;
+    ContentResolver resolver;
+    ParcelFileDescriptor descriptor;
+
+    context = getContentResolverContext ();
 
     uri = Uri.parse (name);
     flags = 0;
@@ -986,8 +1055,42 @@ public final class EmacsService extends Service
     if (writable)
       flags |= Intent.FLAG_GRANT_WRITE_URI_PERMISSION;
 
-    rc = checkCallingUriPermission (uri, flags);
-    return rc == PackageManager.PERMISSION_GRANTED;
+    rc = context.checkCallingUriPermission (uri, flags);
+
+    if (rc == PackageManager.PERMISSION_GRANTED)
+      return true;
+
+    /* In the event checkCallingUriPermission fails and only read
+       permissions are being verified, attempt to query the URI.  This
+       enables ascertaining whether drag and drop URIs can be
+       accessed, something otherwise not provided for.  */
+
+    descriptor = null;
+
+    try
+      {
+       resolver = context.getContentResolver ();
+        descriptor = resolver.openFileDescriptor (uri, "r");
+       return true;
+      }
+    catch (Exception exception)
+      {
+       /* Ignored.  */
+      }
+    finally
+      {
+       try
+         {
+           if (descriptor != null)
+             descriptor.close ();
+         }
+       catch (IOException exception)
+         {
+           /* Ignored.  */
+         }
+      }
+
+    return false;
   }
 
   /* Build a content file name for URI.
diff --git a/java/org/gnu/emacs/EmacsView.java 
b/java/org/gnu/emacs/EmacsView.java
index d09dcc7e50d..2d53231fbf9 100644
--- a/java/org/gnu/emacs/EmacsView.java
+++ b/java/org/gnu/emacs/EmacsView.java
@@ -24,6 +24,7 @@ import android.content.Context;
 import android.text.InputType;
 
 import android.view.ContextMenu;
+import android.view.DragEvent;
 import android.view.View;
 import android.view.KeyEvent;
 import android.view.MotionEvent;
@@ -566,6 +567,19 @@ public final class EmacsView extends ViewGroup
     return window.onTouchEvent (motion);
   }
 
+  @Override
+  public boolean
+  onDragEvent (DragEvent drag)
+  {
+    /* Inter-program drag and drop isn't supported under Android 23
+       and earlier.  */
+
+    if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N)
+      return false;
+
+    return window.onDragEvent (drag);
+  }
+
 
 
   private void
@@ -581,12 +595,12 @@ public final class EmacsView extends ViewGroup
 
        /* The view at 0 is the surface view.  */
        attachViewToParent (child, 1,
-                           child.getLayoutParams());
+                           child.getLayoutParams ());
       }
   }
 
-  /* The following two functions must not be called if the view has no
-     parent, or is parented to an activity.  */
+  /* The following four functions must not be called if the view has
+     no parent, or is parented to an activity.  */
 
   public void
   raise ()
@@ -615,6 +629,40 @@ public final class EmacsView extends ViewGroup
     parent.moveChildToBack (this);
   }
 
+  public void
+  moveAbove (EmacsView view)
+  {
+    EmacsView parent;
+    int index;
+
+    parent = (EmacsView) getParent ();
+
+    if (parent != view.getParent ())
+      throw new IllegalStateException ("Moving view above non-sibling");
+
+    index = parent.indexOfChild (this);
+    parent.detachViewFromParent (index);
+    index = parent.indexOfChild (view);
+    parent.attachViewToParent (this, index + 1, getLayoutParams ());
+  }
+
+  public void
+  moveBelow (EmacsView view)
+  {
+    EmacsView parent;
+    int index;
+
+    parent = (EmacsView) getParent ();
+
+    if (parent != view.getParent ())
+      throw new IllegalStateException ("Moving view above non-sibling");
+
+    index = parent.indexOfChild (this);
+    parent.detachViewFromParent (index);
+    index = parent.indexOfChild (view);
+    parent.attachViewToParent (this, index, getLayoutParams ());
+  }
+
   @Override
   protected void
   onCreateContextMenu (ContextMenu menu)
diff --git a/java/org/gnu/emacs/EmacsWindow.java 
b/java/org/gnu/emacs/EmacsWindow.java
index 1f28d5f4f53..7662186a0eb 100644
--- a/java/org/gnu/emacs/EmacsWindow.java
+++ b/java/org/gnu/emacs/EmacsWindow.java
@@ -22,10 +22,13 @@ package org.gnu.emacs;
 import java.lang.IllegalStateException;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.ListIterator;
 import java.util.HashMap;
 import java.util.LinkedHashMap;
 import java.util.Map;
 
+import android.content.ClipData;
+import android.content.ClipDescription;
 import android.content.Context;
 
 import android.graphics.Rect;
@@ -33,12 +36,15 @@ import android.graphics.Canvas;
 import android.graphics.Bitmap;
 import android.graphics.PixelFormat;
 
-import android.view.View;
-import android.view.ViewManager;
+import android.net.Uri;
+
+import android.view.DragEvent;
 import android.view.Gravity;
+import android.view.InputDevice;
 import android.view.KeyEvent;
 import android.view.MotionEvent;
-import android.view.InputDevice;
+import android.view.View;
+import android.view.ViewManager;
 import android.view.WindowManager;
 
 import android.util.Log;
@@ -93,7 +99,9 @@ public final class EmacsWindow extends EmacsHandleObject
   public EmacsWindow parent;
 
   /* List of all children in stacking order.  This must be kept
-     consistent with their Z order!  */
+     consistent with their Z order!
+
+     Synchronize access to this list with itself.  */
   public ArrayList<EmacsWindow> children;
 
   /* Map between pointer identifiers and last known position.  Used to
@@ -165,7 +173,11 @@ public final class EmacsWindow extends EmacsHandleObject
 
     if (parent != null)
       {
-       parent.children.add (this);
+       synchronized (parent.children)
+         {
+           parent.children.add (this);
+         }
+
         EmacsService.SERVICE.runOnUiThread (new Runnable () {
            @Override
            public void
@@ -214,7 +226,12 @@ public final class EmacsWindow extends EmacsHandleObject
   destroyHandle () throws IllegalStateException
   {
     if (parent != null)
-      parent.children.remove (this);
+      {
+       synchronized (parent.children)
+         {
+           parent.children.remove (this);
+         }
+      }
 
     EmacsActivity.invalidateFocus ();
 
@@ -1163,10 +1180,20 @@ public final class EmacsWindow extends EmacsHandleObject
     /* Reparent this window to the other window.  */
 
     if (parent != null)
-      parent.children.remove (this);
+      {
+       synchronized (parent.children)
+         {
+           parent.children.remove (this);
+         }
+      }
 
     if (otherWindow != null)
-      otherWindow.children.add (this);
+      {
+       synchronized (otherWindow.children)
+         {
+           otherWindow.children.add (this);
+         }
+      }
 
     parent = otherWindow;
 
@@ -1239,9 +1266,12 @@ public final class EmacsWindow extends EmacsHandleObject
     if (parent == null)
       return;
 
-    /* Remove and add this view again.  */
-    parent.children.remove (this);
-    parent.children.add (this);
+    synchronized (parent.children)
+      {
+       /* Remove and add this view again.  */
+       parent.children.remove (this);
+       parent.children.add (this);
+      }
 
     /* Request a relayout.  */
     EmacsService.SERVICE.runOnUiThread (new Runnable () {
@@ -1261,9 +1291,12 @@ public final class EmacsWindow extends EmacsHandleObject
     if (parent == null)
       return;
 
-    /* Remove and add this view again.  */
-    parent.children.remove (this);
-    parent.children.add (this);
+    synchronized (parent.children)
+      {
+       /* Remove and add this view again.  */
+       parent.children.remove (this);
+       parent.children.add (this);
+      }
 
     /* Request a relayout.  */
     EmacsService.SERVICE.runOnUiThread (new Runnable () {
@@ -1276,6 +1309,86 @@ public final class EmacsWindow extends EmacsHandleObject
       });
   }
 
+  public synchronized void
+  reconfigure (final EmacsWindow window, final int stackMode)
+  {
+    ListIterator<EmacsWindow> iterator;
+    EmacsWindow object;
+
+    /* This does nothing here.  */
+    if (parent == null)
+      return;
+
+    /* If window is NULL, call lower or upper subject to
+       stackMode.  */
+
+    if (window == null)
+      {
+       if (stackMode == 1) /* ANDROID_BELOW */
+         lower ();
+       else
+         raise ();
+
+       return;
+      }
+
+    /* Otherwise, if window.parent is distinct from this, return.  */
+    if (window.parent != this.parent)
+      return;
+
+    /* Synchronize with the parent's child list.  Iterate over each
+       item until WINDOW is encountered, before moving this window to
+       the location prescribed by STACKMODE.  */
+
+    synchronized (parent.children)
+      {
+       /* Remove this window from parent.children, for it will be
+          reinserted before or after WINDOW.  */
+       parent.children.remove (this);
+
+       /* Create an iterator.  */
+       iterator = parent.children.listIterator ();
+
+       while (iterator.hasNext ())
+         {
+           object = iterator.next ();
+
+           if (object == window)
+             {
+               /* Now place this before or after the cursor of the
+                  iterator.  */
+
+               if (stackMode == 0) /* ANDROID_ABOVE */
+                 iterator.add (this);
+               else
+                 {
+                   iterator.previous ();
+                   iterator.add (this);
+                 }
+
+               /* Effect the same adjustment upon the view
+                  hiearchy.  */
+
+               EmacsService.SERVICE.runOnUiThread (new Runnable () {
+                   @Override
+                   public void
+                   run ()
+                   {
+                     if (stackMode == 0)
+                       view.moveAbove (window.view);
+                     else
+                       view.moveBelow (window.view);
+                   }
+                 });
+             }
+         }
+
+       /* parent.children does not list WINDOW, which should never
+          transpire.  */
+       EmacsNative.emacsAbort ();
+      }
+  }
+
   public synchronized int[]
   getWindowGeometry ()
   {
@@ -1452,4 +1565,151 @@ public final class EmacsWindow extends EmacsHandleObject
                                         rect.width (), rect.height ());
       }
   }
+
+
+
+  /* Drag and drop.
+
+     Android 7.0 and later permit multiple windows to be juxtaposed
+     on-screen, consequently enabling items selected from one window
+     to be dragged onto another.  Data is transferred across program
+     boundaries using ClipData items, much the same way clipboard data
+     is transferred.
+
+     When an item is dropped, Emacs must ascertain whether the clip
+     data represents plain text, a content URI incorporating a file,
+     or some other data.  This is implemented by examining the clip
+     data's ``description'', which enumerates each of the MIME data
+     types the clip data is capable of providing data in.
+
+     If the clip data represents plain text, then that text is copied
+     into a string and conveyed to Lisp code.  Otherwise, Emacs must
+     solicit rights to access the URI from the system, absent which it
+     is accounted plain text and reinterpreted as such, to cue the
+     user that something has gone awry.
+
+     Moreover, events are regularly sent as the item being dragged
+     travels across the frame, even if it might not be dropped.  This
+     facilitates cursor motion and scrolling in response, as provided
+     by the options dnd-indicate-insertion-point and
+     dnd-scroll-margin.  */
+
+  /* Register the drag and drop event EVENT.  */
+
+  public boolean
+  onDragEvent (DragEvent event)
+  {
+    ClipData data;
+    ClipDescription description;
+    int i, j, x, y, itemCount;
+    String type;
+    Uri uri;
+    EmacsActivity activity;
+    StringBuilder builder;
+
+    x = (int) event.getX ();
+    y = (int) event.getY ();
+
+    switch (event.getAction ())
+      {
+      case DragEvent.ACTION_DRAG_STARTED:
+       /* Return true to continue the drag and drop operation.  */
+       return true;
+
+      case DragEvent.ACTION_DRAG_LOCATION:
+       /* Send this drag motion event to Emacs.  */
+       EmacsNative.sendDndDrag (handle, x, y);
+       return true;
+
+      case DragEvent.ACTION_DROP:
+       /* Judge whether this is plain text, or if it's a file URI for
+          which permissions must be requested.  */
+
+       data = event.getClipData ();
+       description = data.getDescription ();
+       itemCount = data.getItemCount ();
+
+       /* If there are insufficient items within the clip data,
+          return false.  */
+
+       if (itemCount < 1)
+         return false;
+
+       /* Search for plain text data within the clipboard.  */
+
+       for (i = 0; i < description.getMimeTypeCount (); ++i)
+         {
+           type = description.getMimeType (i);
+
+           if (type.equals (ClipDescription.MIMETYPE_TEXT_PLAIN)
+               || type.equals (ClipDescription.MIMETYPE_TEXT_HTML))
+             {
+               /* The data being dropped is plain text; encode it
+                  suitably and send it to the main thread.  */
+               type = (data.getItemAt (0).coerceToText (EmacsService.SERVICE)
+                       .toString ());
+               EmacsNative.sendDndText (handle, x, y, type);
+               return true;
+             }
+           else if (type.equals (ClipDescription.MIMETYPE_TEXT_URILIST))
+             {
+               /* The data being dropped is a list of URIs; encode it
+                  suitably and send it to the main thread.  */
+               type = (data.getItemAt (0).coerceToText (EmacsService.SERVICE)
+                       .toString ());
+               EmacsNative.sendDndUri (handle, x, y, type);
+               return true;
+             }
+         }
+
+       /* There's no plain text data within this clipboard item, so
+          each item within should be treated as a content URI
+          designating a file.  */
+
+       /* Collect the URIs into a string with each suffixed
+          by newlines, much as in a text/uri-list.  */
+       builder = new StringBuilder ();
+
+       for (i = 0; i < itemCount; ++i)
+         {
+           /* If the item dropped is a URI, send it to the
+              main thread.  */
+
+           uri = data.getItemAt (i).getUri ();
+
+           /* Attempt to acquire permissions for this URI;
+              failing which, insert it as text instead.  */
+                   
+           if (uri != null
+               && uri.getScheme () != null
+               && uri.getScheme ().equals ("content")
+               && (activity = EmacsActivity.lastFocusedActivity) != null)
+             {
+               if ((activity.requestDragAndDropPermissions (event) == null))
+                 uri = null;
+             }
+
+           if (uri != null)
+             builder.append (uri.toString ()).append ("\n");
+           else
+             {
+               /* Treat each URI that Emacs cannot secure
+                  permissions for as plain text.  */
+               type = (data.getItemAt (i)
+                       .coerceToText (EmacsService.SERVICE)
+                       .toString ());
+               EmacsNative.sendDndText (handle, x, y, type);
+             }
+         }
+
+       /* Now send each URI to Emacs.  */
+
+       if (builder.length () > 0)
+         EmacsNative.sendDndUri (handle, x, y, builder.toString ());
+
+       return true;
+      }
+
+    return true;
+  }
 };
diff --git a/lib-src/ChangeLog.1 b/lib-src/ChangeLog.1
index 136e8917d50..7a540979613 100644
--- a/lib-src/ChangeLog.1
+++ b/lib-src/ChangeLog.1
@@ -1853,7 +1853,7 @@
        * emacsclient.c (main): Remove unused variables.
        (start_daemon_and_retry_set_socket): Use EXIT_FAILURE.
 
-2010-09-25  Ulrich Mueller  <ulm@gentoo.org>
+2010-09-25  Ulrich Müller  <ulm@gentoo.org>
 
        * etags.c (compressors, print_language_names): Support xz compression.
 
@@ -2498,7 +2498,7 @@
        * makefile.w32-in ($(BLD)/sorted-doc.$(O)): Remove spurious backslash.
        Reported by Guillaume Conjat <gconjat.ext@orange-ftgroup.com>.
 
-2008-10-29  Ulrich Mueller  <ulm@gentoo.org>
+2008-10-29  Ulrich Müller  <ulm@gentoo.org>
 
        * emacsclient.c (set_local_socket): Use TMPDIR (default /tmp)
        instead of hardcoded /tmp.
@@ -2539,7 +2539,7 @@
        * Makefile.in (CFLAGS): Drop -universal under NS_IMPL_COCOA.
        (.m.o): Dispense with GNUstep-specific flags.
 
-2008-08-05  Ulrich Mueller  <ulm@gentoo.org>
+2008-08-05  Ulrich Müller  <ulm@gentoo.org>
 
        * pop.c (socket_connection): Add conditionals for
        HAVE_KRB5_ERROR_TEXT and HAVE_KRB5_ERROR_E_TEXT to support
@@ -3003,7 +3003,7 @@
 
        * Makefile.in (etags, ctags): Define EMACS_NAME as "GNU Emacs".
 
-2007-02-20  Ulrich Mueller  <ulm@kph.uni-mainz.de>  (tiny change)
+2007-02-20  Ulrich Müller  <ulm@kph.uni-mainz.de>  (tiny change)
 
        * Makefile.in (EMACS, EMACSOPT): New variables.
        (blessmail): Use `--no-site-file' when compiling.
diff --git a/lisp/ChangeLog.13 b/lisp/ChangeLog.13
index 49ff87f464c..ac382e1685d 100644
--- a/lisp/ChangeLog.13
+++ b/lisp/ChangeLog.13
@@ -7753,7 +7753,7 @@
        * textmodes/remember.el (remember-buffer):
        Use define-obsolete-function-alias rather than defalias.
 
-2007-11-03  Ulrich Mueller  <ulm@gentoo.org>  (tiny change)
+2007-11-03  Ulrich Müller  <ulm@gentoo.org>  (tiny change)
 
        * simple.el (bad-packages-alist): Anchor semantic regexp.
 
@@ -12516,7 +12516,7 @@
        * net/tramp-ftp.el (top): Autoload `tramp-set-connection-property'.
        (tramp-ftp-file-name-handler): Set "started" property.
 
-2007-08-24  Ulrich Mueller  <ulm@gentoo.org>  (tiny change)
+2007-08-24  Ulrich Müller  <ulm@gentoo.org>  (tiny change)
 
        * files.el (backup-buffer-copy): Don't wrap delete in
        condition-case, only try to delete if file exists.
diff --git a/lisp/ChangeLog.14 b/lisp/ChangeLog.14
index 129621791c0..8c965abd98a 100644
--- a/lisp/ChangeLog.14
+++ b/lisp/ChangeLog.14
@@ -39,7 +39,7 @@
        * language/korean.el (korean-cp949): New coding system.  Set cp949
        as an alias to it.
 
-2009-06-18  Ulrich Mueller  <ulm@gentoo.org>
+2009-06-18  Ulrich Müller  <ulm@gentoo.org>
 
        * pgg-gpg.el (pgg-gpg-lookup-key-owner): Handle colon listings
        format used by GnuPG 2.0.11.
@@ -459,7 +459,7 @@
 
        * subr.el (assoc-default): Doc fix.
 
-2009-04-29  Ulrich Mueller  <ulm@gentoo.org>
+2009-04-29  Ulrich Müller  <ulm@gentoo.org>
 
        * files.el (hack-local-variables-prop-line)
        (hack-local-variables, dir-locals-read-from-file):
@@ -3281,7 +3281,7 @@
        (ispell-find-aspell-dictionaries): Better error message.  Use correct
        dictionary alist for default.  Better fallback default dictionary.
 
-2009-01-16  Ulrich Mueller  <ulm@kph.uni-mainz.de>
+2009-01-16  Ulrich Müller  <ulm@kph.uni-mainz.de>
 
        * international/quail.el (quail-insert-kbd-layout):
        Delete superfluous handling of 8-bit code.  (Bug#1418)
@@ -3736,7 +3736,7 @@
 
        * simple.el (visual-line-mode-map): Remove M-[ and M-] bindings.
 
-2009-01-04  Ulrich Mueller  <ulm@kph.uni-mainz.de>
+2009-01-04  Ulrich Müller  <ulm@kph.uni-mainz.de>
 
        * progmodes/sh-script.el (sh-ancestor-alist): Doc fix.
 
@@ -4380,7 +4380,7 @@
 2008-12-10  Juanma Barranquero  <lekktu@gmail.com>
 
        * net/tramp.el (top): Don't fail if there is no current message.
-       [Ulrich Mueller sent a patch, which I saw too late.]  (Bug#1514)
+       [Ulrich Müller sent a patch, which I saw too late.]  (Bug#1514)
 
 2008-12-10  Kenichi Handa  <handa@m17n.org>
 
@@ -5317,7 +5317,7 @@
        (math-standard-units): Fix typo in constant's description.
        (math-additional-units): Fix typo in docstring.
 
-2008-11-19  Ulrich Mueller  <ulm@kph.uni-mainz.de>
+2008-11-19  Ulrich Müller  <ulm@kph.uni-mainz.de>
 
        * calc/calc-units.el (math-standard-units): Add eps0,
        permittivity of vacuum.
@@ -6087,7 +6087,7 @@
 
        * progmodes/gud.el (gud-tooltip-mode): Use `tooltip-functions'.
 
-2008-10-29  Ulrich Mueller  <ulm@gentoo.org>
+2008-10-29  Ulrich Müller  <ulm@gentoo.org>
 
        * server.el (server-socket-dir): Use TMPDIR (default /tmp) instead
        of hardcoded /tmp.
@@ -6284,7 +6284,7 @@
 
        * pcmpl-rpm.el (pcomplete/rpm): Make "rpm -qp" use file completion.
 
-2008-10-23  Ulrich Mueller  <ulm@kph.uni-mainz.de>
+2008-10-23  Ulrich Müller  <ulm@kph.uni-mainz.de>
 
        * international/mule-cmds.el (describe-language-environment):
        Indent sample text.
@@ -7198,7 +7198,7 @@
        * play/fortune.el (fortune-program-options): Change to a list.
        (fortune-in-buffer): Use apply.
 
-2008-09-20  Ulrich Mueller  <ulm@kph.uni-mainz.de>
+2008-09-20  Ulrich Müller  <ulm@kph.uni-mainz.de>
 
        * emacs-lisp/authors.el: Change encoding of file to utf-8.
        (authors-coding-system): Likewise.
diff --git a/lisp/ChangeLog.15 b/lisp/ChangeLog.15
index 6bd61211d47..f0c613f37c7 100644
--- a/lisp/ChangeLog.15
+++ b/lisp/ChangeLog.15
@@ -3931,7 +3931,7 @@
        * emacs-lisp/autoload.el (autoload-find-destination): The function
        coding-system-eol-type may return non-numeric values.  (Bug#7414)
 
-2010-11-18  Ulrich Mueller  <ulm@gentoo.org>
+2010-11-18  Ulrich Müller  <ulm@gentoo.org>
 
        * server.el (server-force-stop): Ensure the server is stopped 
(Bug#7409).
 
@@ -6386,7 +6386,7 @@
        * eshell/esh-util.el, eshell/esh-var.el:
        Remove leading `*' from docs of faces and defcustoms.
 
-2010-09-25  Ulrich Mueller  <ulm@gentoo.org>
+2010-09-25  Ulrich Müller  <ulm@gentoo.org>
 
        * eshell/em-ls.el (eshell-ls-archive-regexp):
        * eshell/esh-util.el (eshell-tar-regexp):
@@ -14485,7 +14485,7 @@
        color queries.  Recompute faces after getting the background
        color.
 
-2009-12-07  Ulrich Mueller  <ulm@gentoo.org>
+2009-12-07  Ulrich Müller  <ulm@gentoo.org>
 
        * emacs-lisp/bytecomp.el (byte-compile-insert-header): Put the version
        number comment back on its own line, for easier parsing.
@@ -17532,7 +17532,7 @@
        (flyspell-word-search-backward): Remove nil argument in calls to
        flyspell-get-word, since it is not needed now.
 
-2009-10-17  Ulrich Mueller  <ulm@gentoo.org>
+2009-10-17  Ulrich Müller  <ulm@gentoo.org>
 
        * play/doctor.el (doctor-adverbp): Exclude some nouns.  (Bug#4565)
 
diff --git a/lisp/ChangeLog.16 b/lisp/ChangeLog.16
index f7dcda87466..0006383c1fb 100644
--- a/lisp/ChangeLog.16
+++ b/lisp/ChangeLog.16
@@ -15382,7 +15382,7 @@
        * calendar/calendar.el (calendar-mode):
        Locally set scroll-margin to 0.  (Bug#10379)
 
-2012-01-06  Ulrich Mueller  <ulm@gentoo.org>
+2012-01-06  Ulrich Müller  <ulm@gentoo.org>
 
        * play/doctor.el (doctor-death): Escape "," characters.  (Bug#10370)
 
@@ -17133,7 +17133,7 @@
        (mouse-drag-vertical-line): Call mouse-drag-line.
        * window.el (window-at-side-p, windows-at-side): New functions.
 
-2011-10-21  Ulrich Mueller  <ulm@gentoo.org>
+2011-10-21  Ulrich Müller  <ulm@gentoo.org>
 
        * tar-mode.el (tar-grind-file-mode):
        Fix handling of setuid/setgid, handle sticky bit.  (Bug#9817)
diff --git a/lisp/ChangeLog.17 b/lisp/ChangeLog.17
index 3377da7c54d..19b8e1e28eb 100644
--- a/lisp/ChangeLog.17
+++ b/lisp/ChangeLog.17
@@ -24676,7 +24676,7 @@
        * frame.el (display-monitor-attributes-list): Add NS case.
        (ns-display-monitor-attributes-list): Declare.
 
-2013-05-09  Ulrich Mueller  <ulm@gentoo.org>
+2013-05-09  Ulrich Müller  <ulm@gentoo.org>
 
        * descr-text.el (describe-char): Fix %d/%x typo.  (Bug#14360)
 
diff --git a/lisp/ChangeLog.4 b/lisp/ChangeLog.4
index f0dd1295dd7..702a059ce65 100644
--- a/lisp/ChangeLog.4
+++ b/lisp/ChangeLog.4
@@ -1055,7 +1055,7 @@
        (gud-irixdbx-marker-filter): New function.
        (dbx): Insert case for Irix.
 
-1994-04-27  Ulrich Mueller  (ulm@vsnhd1.cern.ch)
+1994-04-27  Ulrich Müller  (ulm@vsnhd1.cern.ch)
 
        * case-table.el (describe-buffer-case-table): Don't use
        text-char-description.
@@ -4189,7 +4189,7 @@
        * paths.el (rmail-spool-directory): Use dgux, not dgux-unix.
        * lpr.el (lpr-command): Use dgux, not dgux-unix.
 
-1993-12-14  Ulrich Mueller  (ulm@vsnhd1.cern.ch)
+1993-12-14  Ulrich Müller  (ulm@vsnhd1.cern.ch)
 
        * gud.el (gud-format-command): Use gud-last-last-frame if
        gud-last-frame is nil.
@@ -4200,7 +4200,7 @@
 
        * info.el (Info-insert-dir): For generated menu items, add ::.
 
-1993-12-13  Ulrich Mueller  (ulm@vsnhd1.cern.ch)
+1993-12-13  Ulrich Müller  (ulm@vsnhd1.cern.ch)
 
        * gud.el (gud-mipsdbx-massage-args, gud-mipsdbx-marker-filter):
        New functions for dbx support on Mips under Ultrix.
diff --git a/lisp/ChangeLog.5 b/lisp/ChangeLog.5
index 96bda7650e2..a9f1beaaae8 100644
--- a/lisp/ChangeLog.5
+++ b/lisp/ChangeLog.5
@@ -5463,7 +5463,7 @@
        (makefile-font-lock-keywords): Use makefile-tab-face.
        (makefile-font-lock-keywords): Use defvar, not defconst.
 
-1994-10-28  Ulrich Mueller  <ulm@vsnhd1.cern.ch>
+1994-10-28  Ulrich Müller  <ulm@vsnhd1.cern.ch>
 
        * iso-acc.el (iso-accents-mode): Variable renamed from
        iso-accents-minor-mode.
diff --git a/lisp/ChangeLog.6 b/lisp/ChangeLog.6
index 0fc8ffcf591..fcad77bd38f 100644
--- a/lisp/ChangeLog.6
+++ b/lisp/ChangeLog.6
@@ -7197,7 +7197,7 @@
 
        * faces.el (x-font-regexp): Add \\(\\) for substring extraction.
 
-1995-07-27  Ulrich Mueller  <ulm@vsnhd1.cern.ch>
+1995-07-27  Ulrich Müller  <ulm@vsnhd1.cern.ch>
 
        * fortran.el (fortran-break-line): Fixed a bug that sometimes
        deleted first character in statement field of continuation line.
diff --git a/lisp/align.el b/lisp/align.el
index a286addb51f..9fa78525ecb 100644
--- a/lisp/align.el
+++ b/lisp/align.el
@@ -577,7 +577,18 @@ The possible settings for `align-region-separate' are:
                     "="
                     (group (zero-or-more (syntax whitespace)))))
      (group . (1 2))
-     (modes . '(conf-toml-mode toml-ts-mode))))
+     (modes . '(conf-toml-mode toml-ts-mode lua-mode lua-ts-mode)))
+
+    (double-dash-comment
+     (regexp . ,(rx (group (zero-or-more (syntax whitespace)))
+                    "--"
+                    (zero-or-more nonl)))
+     (modes  . '(lua-mode lua-ts-mode))
+     (column . comment-column)
+     (valid  . ,(lambda ()
+                  (save-excursion
+                    (goto-char (match-beginning 1))
+                    (not (bolp)))))))
   "A list describing all of the available alignment rules.
 The format is:
 
diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el
index 81d3dfc3432..c861c835966 100644
--- a/lisp/arc-mode.el
+++ b/lisp/arc-mode.el
@@ -231,13 +231,27 @@ Archive and member name will be added."
   :group 'archive)
 
 (defcustom archive-zip-extract
-  (cond ((executable-find "unzip")   '("unzip" "-qq" "-c"))
+  (cond ((executable-find "unzip")
+         (if (and (eq system-type 'android)
+                  ;; Mind that the unzip provided by Android
+                  ;; does not understand -qq or -c, their
+                  ;; functions being assumed by -q and -p
+                  ;; respectively.  Furthermore, the user
+                  ;; might install an unzip executable
+                  ;; distinct from the system-provided unzip,
+                  ;; and such situations must be detected as
+                  ;; well.
+                  (member (executable-find "unzip")
+                          '("/bin/unzip"
+                            "/system/bin/unzip")))
+             '("unzip" "-q" "-p")
+           '("unzip" "-qq" "-c")))
        (archive-7z-program          `(,archive-7z-program "x" "-so"))
        ((executable-find "pkunzip") '("pkunzip" "-e" "-o-"))
        (t                           '("unzip" "-qq" "-c")))
   "Program and its options to run in order to extract a zip file member.
-Extraction should happen to standard output.  Archive and member name will
-be added."
+Extraction should happen to standard output.  Archive and member
+name will be added."
   :type '(list (string :tag "Program")
               (repeat :tag "Options"
                       :inline t
diff --git a/lisp/bindings.el b/lisp/bindings.el
index 207adb3a2a4..418ee265e69 100644
--- a/lisp/bindings.el
+++ b/lisp/bindings.el
@@ -298,6 +298,35 @@ Value is used for `mode-line-frame-identification', which 
see."
 ;;;###autoload
 (put 'mode-line-frame-identification 'risky-local-variable t)
 
+(defvar mode-line-window-dedicated-keymap
+  (let ((map (make-sparse-keymap)))
+    (define-key map [mode-line mouse-1] #'toggle-window-dedicated)
+    (purecopy map)) "\
+Keymap for what is displayed by `mode-line-window-dedicated'.")
+
+(defun mode-line-window-control ()
+  "Compute mode line construct for window dedicated state.
+Value is used for `mode-line-window-dedicated', which see."
+  (cond
+   ((eq (window-dedicated-p) t)
+    (propertize
+     "D"
+     'help-echo "Window strongly dedicated to its buffer\nmouse-1: Toggle"
+     'local-map mode-line-window-dedicated-keymap
+     'mouse-face 'mode-line-highlight))
+   ((window-dedicated-p)
+    (propertize
+     "d"
+     'help-echo "Window dedicated to its buffer\nmouse-1: Toggle"
+     'local-map mode-line-window-dedicated-keymap
+     'mouse-face 'mode-line-highlight))
+   (t "")))
+
+(defvar mode-line-window-dedicated '(:eval (mode-line-window-control))
+  "Mode line construct to describe the current window.")
+;;;###autoload
+(put 'mode-line-window-dedicated 'risky-local-variable t)
+
 (defvar-local mode-line-process nil
   "Mode line construct for displaying info on process status.
 Normally nil in most modes, since there is no process to display.")
@@ -676,12 +705,14 @@ By default, this shows the information specified by 
`global-mode-string'.")
                    'mode-line-mule-info
                    'mode-line-client
                    'mode-line-modified
-                   'mode-line-remote)
-              'display '(min-width (5.0)))
+                   'mode-line-remote
+                   'mode-line-window-dedicated)
+              'display '(min-width (6.0)))
             'mode-line-frame-identification
             'mode-line-buffer-identification
             "   "
             'mode-line-position
+            '(project-mode-line project-mode-line-format)
             '(vc-mode vc-mode)
             "  "
             'mode-line-modes
diff --git a/lisp/calc/calc-units.el b/lisp/calc/calc-units.el
index 988fef2fcd2..f20e5801a01 100644
--- a/lisp/calc/calc-units.el
+++ b/lisp/calc/calc-units.el
@@ -32,7 +32,7 @@
 
 ;;; Units operations.
 
-;;; Units table last updated 9-Jan-91 by Ulrich Mueller (ulm@vsnhd1.cern.ch)
+;;; Units table last updated 9-Jan-91 by Ulrich Müller (ulm@vsnhd1.cern.ch)
 ;;; with some additions by Przemek Klosowski (przemek@rrdstrad.nist.gov)
 ;;; Updated April 2002 by Jochen Küpper
 
@@ -57,12 +57,13 @@
     ( ft      "12 in"                "Foot")
     ( yd      "3 ft"                 "Yard" )
     ( mi      "5280 ft"              "Mile" )
-    ( au      "149597870691. m"      "Astronomical Unit" nil
-              "149597870691 m (*)")
-              ;; (approx) NASA JPL (https://neo.jpl.nasa.gov/glossary/au.html)
+    ( au      "149597870700 m"       "Astronomical Unit")
+              ;; "149 597 870 700 m exactly"
+              ;; http://www.iau.org/static/resolutions/IAU2012_English.pdf
     ( lyr     "c yr"                 "Light Year" )
-    ( pc      "3.0856775854*10^16 m" "Parsec  (**)" nil
-              "3.0856775854 10^16 m (*)") ;; (approx) ESUWM
+    ( pc      "(648000/pi) au"       "Parsec (**)")
+              ;; "The parsec is defined as exactly (648 000/π) au"
+              ;; http://www.iau.org/static/resolutions/IAU2015_English.pdf
     ( nmi     "1852 m"               "Nautical Mile" )
     ( fath    "6 ft"                 "Fathom" )
     ( fur     "660 ft"               "Furlong")
@@ -181,9 +182,9 @@
     ( hpm     "75 m kgf/s"           "Metric Horsepower") ;;ESUWM
 
     ;; Temperature
-    ( K       nil                    "*Degree Kelvin"     K )
-    ( dK      "K"                    "Degree Kelvin"      K )
-    ( degK    "K"                    "Degree Kelvin"      K )
+    ( K       nil                    "*Kelvin"            K )
+    ;; FIXME: Add °C and °F, but it requires that we sort out input etc for
+    ;; the ° sign.
     ( dC      "K"                    "Degree Celsius"     C )
     ( degC    "K"                    "Degree Celsius"     C )
     ( dF      "(5/9) K"              "Degree Fahrenheit"  F )
@@ -268,8 +269,8 @@
     ;; and mu0 no longer has the previous exact value of 4 pi 10^(-7) H/m.
     ( eps0    "ech^2 / (2 alpha h c)"       "Permittivity of vacuum" )
     ( ε0      "eps0"                        "Permittivity of vacuum" )
-    ( mu0     "1 / (eps0 c^2)"              "Permeability of vacuum") ;; Exact
-    ( μ0      "mu0"                         "Permeability of vacuum") ;; Exact
+    ( mu0     "1 / (eps0 c^2)"              "Permeability of vacuum")
+    ( μ0      "mu0"                         "Permeability of vacuum")
     ( G       "6.67408*10^(-11) m^3/(kg s^2)"    "Gravitational constant" nil
               "6.67408 10^-11 m^3/(kg s^2) (*)")
     ( Nav     "6.02214076*10^(23) / mol"    "Avogadro's constant" nil
@@ -307,8 +308,24 @@
               "22.710947 10^-3 m^3/mol (*)")
     ;; Logarithmic units
     ( Np      nil    "*Neper")
-    ( dB      "(ln(10)/20) Np" "decibel")))
-
+    ( dB      "(ln(10)/20) Np" "decibel"))
+  "List of predefined units for Calc.
+
+Each element is (NAME DEF DESC TEMP-UNIT HUMAN-DEF), where:
+
+NAME      is the unit symbol.
+DEF       is a string defining the unit as a Calc expression; nil if base unit.
+DESC      is a string describing the unit (to a human reader).
+          A leading asterisk indicates that the unit is first in its group.
+TEMP-UNIT is `K', `C' or `F' for temperature units and is used to identify
+          the unit when doing absolute temperature conversion
+          (`calc-convert-temperature').  For other units, nil.
+HUMAN-DEF is a string defining the unit (to a human reader).
+          If absent or nil, DEF is used.
+
+(*) in HUMAN-DEF means that the definition is approximate, otherwise exact.
+(**) in DESC means that the unit name is different in TeX and LaTeX
+     display modes.")
 
 (defvar math-additional-units nil
   "Additional units table for user-defined units.
diff --git a/lisp/calendar/time-date.el b/lisp/calendar/time-date.el
index 9cbe8e0f53c..319d1d1b91c 100644
--- a/lisp/calendar/time-date.el
+++ b/lisp/calendar/time-date.el
@@ -181,7 +181,10 @@ If DATE lacks timezone information, GMT is assumed."
 
 ;;;###autoload
 (defun days-to-time (days)
-  "Convert DAYS into a time value."
+  "Convert Emacs-epoch DAYS into a time value.
+Note that this does not use the same epoch as `time-to-days'; you
+must subtract (time-to-days 0) first to convert, and may get nil
+if the result is before the start."
   ;; FIXME: We should likely just pass `t' to `time-convert'.
   ;; All uses I could find in Emacs, GNU ELPA, and NonGNU ELPA can handle
   ;; any valid time representation as return value.
@@ -243,7 +246,7 @@ DATE1 and DATE2 should be date-time strings."
 
 ;;;###autoload
 (defun time-to-days (time)
-  "The absolute date corresponding to TIME, a time value.
+  "The absolute pseudo-Gregorian date for TIME, a time value.
 The absolute date is the number of days elapsed since the imaginary
 Gregorian date Sunday, December 31, 1 BC."
   (let* ((tim (decode-time time))
diff --git a/lisp/calendar/timeclock.el b/lisp/calendar/timeclock.el
index 0cd03c15881..7606805a99b 100644
--- a/lisp/calendar/timeclock.el
+++ b/lisp/calendar/timeclock.el
@@ -100,19 +100,21 @@ into account any discrepancy of time under-worked or 
over-worked on
 previous days.  This only affects the timeclock mode line display."
   :type 'boolean)
 
-(defcustom timeclock-get-project-function 'timeclock-ask-for-project
+(defcustom timeclock-get-project-function #'timeclock-ask-for-project
   "The function used to determine the name of the current project.
 When clocking in, and no project is specified, this function will be
 called to determine what is the current project to be worked on.
 If this variable is nil, no questions will be asked."
-  :type 'function)
+  :type '(choice (const :tag "Don't ask" nil)
+                 function))
 
-(defcustom timeclock-get-reason-function 'timeclock-ask-for-reason
+(defcustom timeclock-get-reason-function #'timeclock-ask-for-reason
   "A function used to determine the reason for clocking out.
 When clocking out, and no reason is specified, this function will be
 called to determine what is the reason.
 If this variable is nil, no questions will be asked."
-  :type 'function)
+  :type '(choice (const :tag "Don't ask" nil)
+                 function))
 
 (defcustom timeclock-get-workday-function nil
   "A function used to determine the length of today's workday.
diff --git a/lisp/cedet/ede/base.el b/lisp/cedet/ede/base.el
index 305bf599151..c32d2edd7b7 100644
--- a/lisp/cedet/ede/base.el
+++ b/lisp/cedet/ede/base.el
@@ -312,7 +312,8 @@ All specific project types must derive from this project."
   "File containing the list of projects EDE has viewed.
 If set to nil, then the cache is not saved."
   :group 'ede
-  :type 'file)
+  :type '(choice (const :tag "Don't save the cache" nil)
+                 file))
 
 (defvar ede-project-cache-files nil
   "List of project files EDE has seen before.")
diff --git a/lisp/cedet/pulse.el b/lisp/cedet/pulse.el
index 37b41fbe8c3..38ccf5b975f 100644
--- a/lisp/cedet/pulse.el
+++ b/lisp/cedet/pulse.el
@@ -71,7 +71,9 @@ Any other value means to do the default pulsing behavior.
 If `pulse-flag' is non-nil, but `pulse-available-p' is nil, then
 this flag is ignored."
   :group 'pulse
-  :type 'boolean)
+  :type '(choice (const :tag "Highlight with unchanging color" nil)
+                 (const :tag "No highlight" never)
+                 (other :tag "Pulse" t)))
 
 (defface pulse-highlight-start-face
   '((((class color) (background dark))
diff --git a/lisp/cedet/semantic/imenu.el b/lisp/cedet/semantic/imenu.el
index a28f050f3a0..7f27561c3d2 100644
--- a/lisp/cedet/semantic/imenu.el
+++ b/lisp/cedet/semantic/imenu.el
@@ -32,6 +32,8 @@
 ;;             (setq imenu-create-index-function 'semantic-create-imenu-index)
 ;;             ))
 
+;;; Code:
+
 (require 'semantic)
 (require 'semantic/format)
 (require 'semantic/db)
@@ -134,7 +136,6 @@ Tags of those classes will be given submenu with children.
 By default, a `type' has interesting children.  In Texinfo, however, a
 `section' has interesting children.")
 
-;;; Code:
 (defun semantic-imenu-tag-overlay (tag)
   "Return the overlay belonging to tag.
 If TAG doesn't have an overlay, and instead as a vector of positions,
@@ -469,9 +470,8 @@ Clears all imenu menus that may be depending on the 
database."
 ;; buffer, there is a much more efficient way of doing this.
 ;; Advise `which-function' so that we optionally use semantic tags
 ;; instead, and get better stuff.
-(require 'advice)
 
-(defvar semantic-which-function 'semantic-default-which-function
+(defvar semantic-which-function #'semantic-default-which-function
   "Function to convert semantic tags into `which-function' text.")
 
 (defcustom semantic-which-function-use-color nil
diff --git a/lisp/cedet/srecode/map.el b/lisp/cedet/srecode/map.el
index 125459d6eeb..004bb7adddb 100644
--- a/lisp/cedet/srecode/map.el
+++ b/lisp/cedet/srecode/map.el
@@ -49,7 +49,8 @@
   "The save location for SRecode's map file.
 If the save file is nil, then the MAP is not saved between sessions."
   :group 'srecode
-  :type 'file)
+  :type '(choice (const :tag "Don't save" nil)
+                 file))
 
 (defclass srecode-map (eieio-persistent)
   ((fileheaderline :initform ";; SRECODE TEMPLATE MAP")
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index 1021707907d..706e08d5657 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -4148,7 +4148,10 @@ Optional EVENT is the location for the menu."
       ;; If recreating a widget that may have been edited by the user, remember
       ;; to always save the edited value into the :shown-value property, so
       ;; we use that value for the recreated widget.  (Bug#44331)
-      (widget-put widget :shown-value (custom-face-widget-to-spec widget))
+      (let ((child (car (widget-get widget :children))))
+        (if (eq (widget-type child) 'custom-face-edit)
+            (widget-put widget :shown-value `((t ,(widget-value child))))
+          (widget-put widget :shown-value (widget-value child))))
       (custom-face-edit-all widget)
       (widget-put widget :shown-value nil) ; Reset it after we used it.
       (custom-face-mark-to-save widget)
diff --git a/lisp/dnd.el b/lisp/dnd.el
index 67907ec403e..14581e3d414 100644
--- a/lisp/dnd.el
+++ b/lisp/dnd.el
@@ -201,6 +201,11 @@ Return nil if URI is not a local file."
                     (string-equal sysname-no-dot hostname)))
        (concat "file://" (substring uri (+ 7 (length hostname))))))))
 
+(defvar dnd-unescape-file-uris t
+  "Whether to unescape file: URIs before they are opened.
+Bind this to nil when providing `dnd-get-local-file-name' with a
+file name that may incorporate URI escape sequences.")
+
 (defun dnd--unescape-uri (uri)
   ;; Merge with corresponding code in URL library.
   (replace-regexp-in-string
@@ -226,7 +231,10 @@ Return nil if URI is not a local file."
                    'utf-8
                  (or file-name-coding-system
                      default-file-name-coding-system))))
-    (and f (setq f (decode-coding-string (dnd--unescape-uri f) coding)))
+    (and f (setq f (decode-coding-string
+                    (if dnd-unescape-file-uris
+                        (dnd--unescape-uri f) f)
+                    coding)))
     (when (and f must-exist (not (file-readable-p f)))
       (setq f nil))
     f))
diff --git a/lisp/doc-view.el b/lisp/doc-view.el
index 210b7ace7d6..fb51661caac 100644
--- a/lisp/doc-view.el
+++ b/lisp/doc-view.el
@@ -661,7 +661,9 @@ Typically \"page-%s.png\".")
   '("DocView (edit)"
     ("Toggle edit/display"
      ["Edit document"           (lambda ()) ; ignore but show no keybinding
-      :style radio :selected    (eq major-mode 'doc-view--text-view-mode)]
+      ;; This is always selected since its menu is singular to the
+      ;; display minor mode.
+      :style radio :selected    t]
      ["Display document"        doc-view-toggle-display
       :style radio :selected    (eq major-mode 'doc-view-mode)])
     ["Exit DocView Mode" doc-view-minor-mode]))
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 8cf4e739c2f..6425789062f 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -292,46 +292,51 @@ The information is logged to `byte-compile-log-buffer'."
 ;;;###autoload(put 'byte-compile-error-on-warn 'safe-local-variable 'booleanp)
 
 (defconst byte-compile-warning-types
-  '(redefine callargs free-vars unresolved
-             obsolete noruntime interactive-only
-             make-local mapcar constants suspicious lexical lexical-dynamic
-             docstrings docstrings-non-ascii-quotes not-unused
-             empty-body)
+  '( callargs constants
+     docstrings docstrings-non-ascii-quotes docstrings-wide
+     empty-body free-vars ignored-return-value interactive-only
+     lexical lexical-dynamic make-local
+     mapcar                             ; obsolete
+     mutate-constant noruntime not-unused obsolete redefine suspicious
+     unresolved)
   "The list of warning types used when `byte-compile-warnings' is t.")
 (defcustom byte-compile-warnings t
   "List of warnings that the byte-compiler should issue (t for almost all).
 
 Elements of the list may be:
 
-  free-vars   references to variables not in the current lexical scope.
-  unresolved  calls to unknown functions.
   callargs    function calls with args that don't match the definition.
-  redefine    function name redefined from a macro to ordinary function or vice
-              versa, or redefined to take a different number of arguments.
-  obsolete    obsolete variables and functions.
-  noruntime   functions that may not be defined at runtime (typically
-              defined only under `eval-when-compile').
+  constants   let-binding of, or assignment to, constants/nonvariables.
+  docstrings  various docstring stylistic issues, such as incorrect use
+              of single quotes
+  docstrings-non-ascii-quotes
+              docstrings that have non-ASCII quotes.
+              Only enabled when `docstrings' also is.
+  docstrings-wide
+              docstrings that are too wide, containing lines longer than both
+              `byte-compile-docstring-max-column' and `fill-column' characters.
+              Only enabled when `docstrings' also is.
+  empty-body  body argument to a special form or macro is empty.
+  free-vars   references to variables not in the current lexical scope.
+  ignored-return-value
+              function called without using the return value where this
+              is likely to be a mistake.
   interactive-only
              commands that normally shouldn't be called from Lisp code.
   lexical     global/dynamic variables lacking a prefix.
   lexical-dynamic
               lexically bound variable declared dynamic elsewhere
   make-local  calls to `make-variable-buffer-local' that may be incorrect.
-  ignored-return-value
-              function called without using the return value where this
-              is likely to be a mistake
+  mutate-constant
+              code that mutates program constants such as quoted lists.
+  noruntime   functions that may not be defined at runtime (typically
+              defined only under `eval-when-compile').
   not-unused  warning about using variables with symbol names starting with _.
-  constants   let-binding of, or assignment to, constants/nonvariables.
-  docstrings  docstrings that are too wide (longer than
-              `byte-compile-docstring-max-column' or
-              `fill-column' characters, whichever is bigger) or
-              have other stylistic issues.
-  docstrings-non-ascii-quotes docstrings that have non-ASCII quotes.
-                              This depends on the `docstrings' warning type.
+  obsolete    obsolete variables and functions.
+  redefine    function name redefined from a macro to ordinary function or vice
+              versa, or redefined to take a different number of arguments.
   suspicious  constructs that usually don't do what the coder wanted.
-  empty-body  body argument to a special form or macro is empty.
-  mutate-constant
-              code that mutates program constants such as quoted lists
+  unresolved  calls to unknown functions.
 
 If the list begins with `not', then the remaining elements specify warnings to
 suppress.  For example, (not free-vars) will suppress the `free-vars' warning.
@@ -1669,53 +1674,75 @@ extra args."
            (if (equal sig1 '(1 . 1)) "argument" "arguments")
            (byte-compile-arglist-signature-string sig2)))))))
 
-(defvar byte-compile--wide-docstring-substitution-len 3
-  "Substitution width used in `byte-compile--wide-docstring-p'.
-This is a heuristic for guessing the width of a documentation
-string: `byte-compile--wide-docstring-p' assumes that any
-`substitute-command-keys' command substitutions are this long.")
-
-(defun byte-compile--wide-docstring-p (docstring col)
-  "Return t if string DOCSTRING is wider than COL.
+(defun bytecomp--docstring-line-width (str)
+  "An approximation of the displayed width of docstring line STR."
+  ;; For literal key sequence substitutions (e.g. "\\`C-h'"), just
+  ;; remove the markup as `substitute-command-keys' would.
+  (when (string-search "\\`" str)
+    (setq str (replace-regexp-in-string
+               (rx "\\`" (group (* (not "'"))) "'")
+               "\\1"
+               str t)))
+  ;; Heuristic: We can't reliably do `substitute-command-keys'
+  ;; substitutions, since the value of a keymap in general can't be
+  ;; known at compile time.  So instead, we assume that these
+  ;; substitutions are of some constant length.
+  (when (string-search "\\[" str)
+    (setq str (replace-regexp-in-string
+               (rx "\\[" (* (not "]")) "]")
+               ;; We assume that substitutions have this length.
+               ;; To preserve the non-expansive property of the transform,
+               ;; it shouldn't be more than 3 characters long.
+               "xxx"
+               str t t)))
+  (setq str
+        (replace-regexp-in-string
+         (rx (or
+              ;; Ignore some URLs.
+              (seq "http" (? "s") "://" (* nonl))
+              ;; Ignore these `substitute-command-keys' substitutions.
+              (seq "\\" (or "="
+                            (seq "<" (* (not ">")) ">")
+                            (seq "{" (* (not "}")) "}")))
+              ;; Ignore the function signature that's stashed at the end of
+              ;; the doc string (in some circumstances).
+              (seq bol "(" (+ (any word "-/:[]&"))
+                   ;; One or more arguments.
+                   (+ " " (or
+                           ;; Arguments.
+                           (+ (or (syntax symbol)
+                                  (any word "-/:[]&=()<>.,?^\\#*'\"")))
+                           ;; Argument that is a list.
+                           (seq "(" (* (not ")")) ")")))
+                   ")")))
+         "" str t t))
+  (length str))
+
+(defun byte-compile--wide-docstring-p (docstring max-width)
+  "Whether DOCSTRING contains a line wider than MAX-WIDTH.
 Ignore all `substitute-command-keys' substitutions, except for
-the `\\\\=[command]' ones that are assumed to be of length
-`byte-compile--wide-docstring-substitution-len'.  Also ignore
-URLs."
-  (string-match
-   (format "^.\\{%d,\\}$" (min (1+ col) #xffff)) ; Heed RE_DUP_MAX.
-   (replace-regexp-in-string
-    (rx (or
-         ;; Ignore some URLs.
-         (seq "http" (? "s") "://" (* nonl))
-         ;; Ignore these `substitute-command-keys' substitutions.
-         (seq "\\" (or "="
-                       (seq "<" (* (not ">")) ">")
-                       (seq "{" (* (not "}")) "}")))
-         ;; Ignore the function signature that's stashed at the end of
-         ;; the doc string (in some circumstances).
-         (seq bol "(" (+ (any word "-/:[]&"))
-              ;; One or more arguments.
-              (+ " " (or
-                      ;; Arguments.
-                      (+ (or (syntax symbol)
-                             (any word "-/:[]&=()<>.,?^\\#*'\"")))
-                      ;; Argument that is a list.
-                      (seq "(" (* (not ")")) ")")))
-              ")")))
-    ""
-    ;; Heuristic: We can't reliably do `substitute-command-keys'
-    ;; substitutions, since the value of a keymap in general can't be
-    ;; known at compile time.  So instead, we assume that these
-    ;; substitutions are of some length N.
-    (replace-regexp-in-string
-     (rx "\\[" (* (not "]")) "]")
-     (make-string byte-compile--wide-docstring-substitution-len ?x)
-     ;; For literal key sequence substitutions (e.g. "\\`C-h'"), just
-     ;; remove the markup as `substitute-command-keys' would.
-     (replace-regexp-in-string
-      (rx "\\`" (group (* (not "'"))) "'")
-      "\\1"
-      docstring)))))
+the `\\\\=[command]' ones that are assumed to be of a fixed length.
+Also ignore URLs."
+  (let ((string-len (length docstring))
+        (start 0)
+        (too-wide nil))
+    (while (< start string-len)
+      (let ((eol (or (string-search "\n" docstring start)
+                     string-len)))
+        ;; Since `bytecomp--docstring-line-width' is non-expansive,
+        ;; we can safely assume that if the raw length is
+        ;; within the allowed width, then so is the transformed width.
+        ;; This allows us to avoid the very expensive transformation in
+        ;; most cases.
+        (if (and (> (- eol start) max-width)
+                 (> (bytecomp--docstring-line-width
+                     (substring docstring start eol))
+                    max-width))
+            (progn
+              (setq too-wide t)
+              (setq start string-len))
+          (setq start (1+ eol)))))
+    too-wide))
 
 (defcustom byte-compile-docstring-max-column 80
   "Recommended maximum width of doc string lines.
@@ -1761,7 +1788,8 @@ It is too wide if it has any lines longer than the 
largest of
         (setq name (cadr name)))
       (when (and kind docs (stringp docs))
         (let ((col (max byte-compile-docstring-max-column fill-column)))
-          (when (byte-compile--wide-docstring-p docs col)
+          (when (and (byte-compile-warning-enabled-p 'docstrings-wide)
+                     (byte-compile--wide-docstring-p docs col))
             (byte-compile-warn-x
              name
              "%sdocstring wider than %s characters" (funcall prefix) col)))
@@ -2178,6 +2206,10 @@ See also `emacs-lisp-byte-compile-and-load'."
               filename buffer-file-name))
       ;; Don't inherit lexical-binding from caller (bug#12938).
       (unless (local-variable-p 'lexical-binding)
+        (let ((byte-compile-current-buffer (current-buffer)))
+          (byte-compile-warn-x
+           (position-symbol 'a (point-min))
+           "file has no `lexical-binding' directive on its first line"))
         (setq-local lexical-binding nil))
       ;; Set the default directory, in case an eval-when-compile uses it.
       (setq default-directory (file-name-directory filename)))
diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el
index 440e133f44b..471a2fbdf48 100644
--- a/lisp/emacs-lisp/checkdoc.el
+++ b/lisp/emacs-lisp/checkdoc.el
@@ -128,14 +128,6 @@
 ;; simple style rules to follow which checkdoc will auto-fix for you.
 ;; `y-or-n-p' and `yes-or-no-p' should also end in "?".
 ;;
-;; Lexical binding:
-;;
-;;   We recommend always using lexical binding in new code, and
-;; converting old code to use it.  Checkdoc warns if you don't have
-;; the recommended string "-*- lexical-binding: t -*-" at the top of
-;; the file.  You can disable this check with the user option
-;; `checkdoc-lexical-binding-flag'.
-;;
 ;; Adding your own checks:
 ;;
 ;;   You can experiment with adding your own checks by setting the
@@ -347,12 +339,6 @@ See Info node `(elisp) Documentation Tips' for background."
   :type 'boolean
   :version "28.1")
 
-(defcustom checkdoc-lexical-binding-flag t
-  "Non-nil means generate warnings if file is not using lexical binding.
-See Info node `(elisp) Converting to Lexical Binding' for more."
-  :type 'boolean
-  :version "30.1")
-
 ;; This is how you can use checkdoc to make mass fixes on the Emacs
 ;; source tree:
 ;;
@@ -2391,31 +2377,6 @@ Code:, and others referenced in the style guide."
              (point-min) (save-excursion (goto-char (point-min))
                                          (line-end-position))))
         nil))
-      (when checkdoc-lexical-binding-flag
-        (setq
-         err
-         ;; Lexical binding cookie.
-         (if (not (save-excursion
-                    (save-restriction
-                      (goto-char (point-min))
-                      (narrow-to-region (point) (pos-eol))
-                      (re-search-forward
-                       (rx "-*-" (* (* nonl) ";")
-                           (* space) "lexical-binding:" (* space) "t" (* space)
-                           (* ";" (* nonl))
-                           "-*-")
-                       nil t))))
-             (let ((pos (save-excursion (goto-char (point-min))
-                                        (goto-char (pos-eol))
-                                        (point))))
-               (if (checkdoc-y-or-n-p "There is no lexical-binding cookie!  
Add one?")
-                   (progn
-                     (goto-char pos)
-                     (insert "  -*- lexical-binding: t -*-"))
-                 (checkdoc-create-error
-                  "The first line should end with \"-*- lexical-binding: t 
-*-\""
-                  pos (1+ pos) t)))
-           nil)))
       (setq
        err
        (or
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index 1bd9800bfe6..f9da1769ea4 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -3514,7 +3514,8 @@ Of course, we really can't know that for sure, so it's 
just a heuristic."
                  (symbol       . symbolp)
                  (vector       . vectorp)
                  (window       . windowp)
-                 ;; FIXME: Do we really want to consider this a type?
+                 ;; FIXME: Do we really want to consider these types?
+                 (number-or-marker . number-or-marker-p)
                  (integer-or-marker . integer-or-marker-p)
                  ))
   (put type 'cl-deftype-satisfies pred))
diff --git a/lisp/emacs-lisp/cl-preloaded.el b/lisp/emacs-lisp/cl-preloaded.el
index 676326980aa..27603ae8626 100644
--- a/lisp/emacs-lisp/cl-preloaded.el
+++ b/lisp/emacs-lisp/cl-preloaded.el
@@ -52,20 +52,20 @@
 
 (defconst cl--typeof-types
   ;; Hand made from the source code of `type-of'.
-  '((integer number number-or-marker atom)
+  '((integer number integer-or-marker number-or-marker atom)
     (symbol-with-pos symbol atom) (symbol atom) (string array sequence atom)
     (cons list sequence)
     ;; Markers aren't `numberp', yet they are accepted wherever integers are
     ;; accepted, pretty much.
-    (marker number-or-marker atom)
-    (overlay atom) (float number atom) (window-configuration atom)
-    (process atom) (window atom)
+    (marker integer-or-marker number-or-marker atom)
+    (overlay atom) (float number number-or-marker atom)
+    (window-configuration atom) (process atom) (window atom)
     ;; FIXME: We'd want to put `function' here, but that's only true
     ;; for those `subr's which aren't special forms!
     (subr atom)
     ;; FIXME: We should probably reverse the order between
     ;; `compiled-function' and `byte-code-function' since arguably
-    ;; `subr' and also "compiled functions" but not "byte code functions",
+    ;; `subr' is also "compiled functions" but not "byte code functions",
     ;; but it would require changing the value returned by `type-of' for
     ;; byte code objects, which risks breaking existing code, which doesn't
     ;; seem worth the trouble.
diff --git a/lisp/emacs-lisp/cl-print.el b/lisp/emacs-lisp/cl-print.el
index 9c2a531dff5..5b7a5b3b92f 100644
--- a/lisp/emacs-lisp/cl-print.el
+++ b/lisp/emacs-lisp/cl-print.el
@@ -175,7 +175,7 @@ Print the contents hidden by the ellipsis to STREAM."
 (defvar cl-print-compiled nil
   "Control how to print byte-compiled functions.
 Acceptable values include:
-- `full' to print out the full contents of the function using `prin1'.
+- `raw' to print out the full contents of the function using `prin1'.
 - `static' to print the vector of constants.
 - `disassemble' to print the disassembly of the code.
 - nil to skip printing any details about the code.")
@@ -209,10 +209,18 @@ into a button whose action shows the function's 
disassembly.")
     (if args
         (prin1 args stream)
       (princ "()" stream)))
-  (if (eq cl-print-compiled 'full)
-      (progn
+  (if (eq cl-print-compiled 'raw)
+      (let ((button-start
+             (and cl-print-compiled-button
+                  (bufferp stream)
+                  (with-current-buffer stream (1+ (point))))))
         (princ " " stream)
-        (prin1 object stream))
+        (prin1 object stream)
+        (when button-start
+          (with-current-buffer stream
+            (make-text-button button-start (point)
+                              :type 'help-byte-code
+                              'byte-code-function object))))
     (pcase (help-split-fundoc (documentation object 'raw) object)
       ;; Drop args which `help-function-arglist' already printed.
       (`(,_usage . ,(and doc (guard (stringp doc))))
@@ -576,7 +584,7 @@ node `(elisp)Output Variables'."
   "Return a string containing a printed representation of VALUE.
 Attempt to get the length of the returned string under LIMIT
 characters with appropriate settings of `print-level',
-`print-length.', and `cl-print-string-length'.  Use
+`print-length', and `cl-print-string-length'.  Use
 PRINT-FUNCTION to print, which should take the arguments VALUE
 and STREAM and which should respect `print-length',
 `print-level', and `cl-print-string-length'.  LIMIT may be nil or
diff --git a/lisp/emacs-lisp/comp-cstr.el b/lisp/emacs-lisp/comp-cstr.el
index 7e3ca1f3bae..d23304c8874 100644
--- a/lisp/emacs-lisp/comp-cstr.el
+++ b/lisp/emacs-lisp/comp-cstr.el
@@ -262,12 +262,57 @@ Return them as multiple value."
 
 ;;; Type handling.
 
+(defun comp--sym-lessp (x y)
+  "Like `string-lessp' but for symbol names."
+  (string-lessp (symbol-name x)
+                (symbol-name y)))
+
+(defun comp--direct-supertype (type)
+  "Return the direct supertype of TYPE."
+  (cl-loop
+   named outer
+   for i in (comp-cstr-ctxt-typeof-types comp-ctxt)
+   do (cl-loop for (j y) on i
+                   when (eq j type)
+                     do (cl-return-from outer y))))
+
+(defun comp--normalize-typeset0 (typeset)
+  ;; For every type search its supertype.  If all the subtypes of that
+  ;; supertype are presents remove all of them, add the identified
+  ;; supertype and restart.
+  (when typeset
+    (while (eq 'restart
+               (cl-loop
+                named main
+                for i in typeset
+                for sup = (comp--direct-supertype i)
+                for subs = (comp--direct-subtypes sup)
+                when (and sup
+                          (length> subs 1)
+                          (cl-every (lambda (x) (member x typeset)) subs))
+                  do (cl-loop for s in subs
+                              do (setq typeset (cl-delete s typeset))
+                              finally (progn (push sup typeset)
+                                           (cl-return-from main 'restart))))))
+    typeset))
+
 (defun comp-normalize-typeset (typeset)
   "Sort TYPESET and return it."
-  (cl-sort (cl-remove-duplicates typeset)
-           (lambda (x y)
-             (string-lessp (symbol-name x)
-                           (symbol-name y)))))
+  (cl-sort (comp--normalize-typeset0 (cl-remove-duplicates typeset)) 
#'comp--sym-lessp))
+
+(defun comp--direct-subtypes (type)
+  "Return all the direct subtypes of TYPE."
+  ;; TODO: memoize.
+  (cl-sort
+   (cl-loop for j in (comp-cstr-ctxt-typeof-types comp-ctxt)
+            for res = (cl-loop for i in j
+                               with last = nil
+                               when (eq i type)
+                                 return last
+                               do (setq last i))
+            when res
+              collect res)
+   #'comp--sym-lessp))
 
 (defun comp-supertypes (type)
   "Return a list of pairs (supertype . hierarchy-level) for TYPE."
diff --git a/lisp/emacs-lisp/disass.el b/lisp/emacs-lisp/disass.el
index 73777d7e701..d9295686e9f 100644
--- a/lisp/emacs-lisp/disass.el
+++ b/lisp/emacs-lisp/disass.el
@@ -301,6 +301,23 @@ OBJ should be a call to BYTE-CODE generated by the byte 
compiler."
          (insert "\n")))))
   nil)
 
+(defun re-disassemble (regexp &optional case-table)
+  "Describe the compiled form of REGEXP in a separate window.
+If CASE-TABLE is non-nil, use it as translation table for case-folding.
+
+This function is mainly intended for maintenance of Emacs itself
+and may change at any time.  It requires Emacs to be built with
+`--enable-checking'."
+  (interactive "XRegexp (Lisp expression): ")
+  (let ((desc (with-temp-buffer
+                (when case-table
+                  (set-case-table case-table))
+                (let ((case-fold-search (and case-table t)))
+                  (re--describe-compiled regexp)))))
+    (with-output-to-temp-buffer "*Regexp-disassemble*"
+      (with-current-buffer standard-output
+        (insert desc)))))
+
 (provide 'disass)
 
 ;;; disass.el ends here
diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el
index 3a786bb321b..22144ed7c18 100644
--- a/lisp/emacs-lisp/eldoc.el
+++ b/lisp/emacs-lisp/eldoc.el
@@ -65,7 +65,8 @@ If this variable is set to 0, display the documentation 
without any delay."
 (defcustom eldoc-print-after-edit nil
   "If non-nil, eldoc info is only shown after editing commands.
 Changing the value requires toggling `eldoc-mode'."
-  :type 'boolean)
+  :type 'boolean
+  :version "24.4")
 
 (defcustom eldoc-echo-area-display-truncation-message t
   "If non-nil, provide verbose help when a message has been truncated.
@@ -132,7 +133,10 @@ documentation in the echo area if the dedicated 
documentation
 buffer (displayed by `eldoc-doc-buffer') is already displayed in
 some window.  If the value is the symbol `maybe', then the echo area
 is only skipped if the documentation needs to be truncated there."
-  :type 'boolean)
+  :type '(choice (const :tag "Prefer ElDoc's documentation buffer" t)
+                 (const :tag "Prefer echo area" nil)
+                 (const :tag "Skip echo area if truncating" maybe))
+  :version "28.1")
 
 (defface eldoc-highlight-function-argument
   '((t (:inherit bold)))
diff --git a/lisp/emacs-lisp/elint.el b/lisp/emacs-lisp/elint.el
index 700f007d6b4..d8ab883b58d 100644
--- a/lisp/emacs-lisp/elint.el
+++ b/lisp/emacs-lisp/elint.el
@@ -1,8 +1,9 @@
 ;;; elint.el --- Lint Emacs Lisp -*- lexical-binding: t -*-
 
-;; Copyright (C) 1997, 2001-2023 Free Software Foundation, Inc.
+;; Copyright (C) 1997-2023 Free Software Foundation, Inc.
 
 ;; Author: Peter Liljenberg <petli@lysator.liu.se>
+;; Maintainer: emacs-devel@gnu.org
 ;; Created: May 1997
 ;; Keywords: lisp
 
@@ -27,7 +28,7 @@
 ;; misspellings and undefined variables, although it can also catch
 ;; function calls with the wrong number of arguments.
 
-;; To use, call `elint-current-buffer' or `elint-defun' to lint a buffer
+;; To use it, call `elint-current-buffer' or `elint-defun' to lint a buffer
 ;; or defun.  The first call runs `elint-initialize' to set up some
 ;; argument data, which may take a while.
 
@@ -37,9 +38,9 @@
 
 ;;; To do:
 
-;; * Adding type checking. (Stop that sniggering!)
+;; * Adding type checking.  (Stop that sniggering!)
 ;; * Make eval-when-compile be sensitive to the difference between
-;;   funcs and macros.
+;;   functions and macros.
 ;; * Requires within function bodies.
 ;; * Handle defstruct.
 ;; * Prevent recursive requires.
diff --git a/lisp/emacs-lisp/let-alist.el b/lisp/emacs-lisp/let-alist.el
index d9ad46b2af7..ed07aecf338 100644
--- a/lisp/emacs-lisp/let-alist.el
+++ b/lisp/emacs-lisp/let-alist.el
@@ -9,8 +9,8 @@
 ;; Prefix: let-alist
 ;; Separator: -
 
-;; This is an Elpa :core package. Don't use functionality that is not
-;; compatible with Emacs 24.1.
+;; This is a GNU ELPA :core package.  Avoid functionality that is not
+;; compatible with the version of Emacs recorded above.
 
 ;; This file is part of GNU Emacs.
 
@@ -60,7 +60,7 @@
 ;; the variables of the outer one.  You can, however, access alists
 ;; inside the original alist by using dots inside the symbol, as
 ;; displayed in the example above by the `.site.contents'.
-;;
+
 ;;; Code:
 
 
@@ -139,7 +139,14 @@ essentially expands to
 If you nest `let-alist' invocations, the inner one can't access
 the variables of the outer one.  You can, however, access alists
 inside the original alist by using dots inside the symbol, as
-displayed in the example above."
+displayed in the example above.
+
+Note that there is no way to differentiate the case where a key
+is missing from when it is present, but its value is nil.  Thus,
+the following form evaluates to nil:
+
+    (let-alist \\='((some-key . nil))
+      .some-key)"
   (declare (indent 1) (debug t))
   (let ((var (make-symbol "alist")))
     `(let ((,var ,alist))
diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el
index a4aa79c171e..ee481dc4ed3 100644
--- a/lisp/emacs-lisp/lisp.el
+++ b/lisp/emacs-lisp/lisp.el
@@ -422,7 +422,8 @@ of a defun, nil if it failed to find one."
                                       "\\(?:" defun-prompt-regexp "\\)\\s(")
                             "^\\s(")
                                              nil 'move arg))
-                    (nth 8 (syntax-ppss))))
+                    (save-match-data
+                      (nth 8 (syntax-ppss)))))
            found)
         (progn (goto-char (1- (match-end 0)))
                 t)))
diff --git a/lisp/emacs-lisp/macroexp.el b/lisp/emacs-lisp/macroexp.el
index 242c71e65ad..1bcc6e6a035 100644
--- a/lisp/emacs-lisp/macroexp.el
+++ b/lisp/emacs-lisp/macroexp.el
@@ -105,13 +105,21 @@ each clause."
        (macroexp--all-forms clause skip)
       clause)))
 
+(defvar macroexp-inhibit-compiler-macros nil
+  "Inhibit application of compiler macros if non-nil.")
+
 (defun macroexp--compiler-macro (handler form)
-  (condition-case-unless-debug err
-      (apply handler form (cdr form))
-    (error
-     (message "Warning: Optimization failure for %S: Handler: %S\n%S"
-              (car form) handler err)
-     form)))
+  "Apply compiler macro HANDLER to FORM and return the result.
+Unless `macroexp-inhibit-compiler-macros' is non-nil, in which
+case return FORM unchanged."
+  (if macroexp-inhibit-compiler-macros
+      form
+    (condition-case-unless-debug err
+        (apply handler form (cdr form))
+      (error
+       (message "Warning: Optimization failure for %S: Handler: %S\n%S"
+                (car form) handler err)
+       form))))
 
 (defun macroexp--funcall-if-compiled (_form)
   "Pseudo function used internally by macroexp to delay warnings.
diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el
index a8393cb7e75..9780e4d53de 100644
--- a/lisp/emacs-lisp/package-vc.el
+++ b/lisp/emacs-lisp/package-vc.el
@@ -501,7 +501,8 @@ This includes downloading missing dependencies, generating
 autoloads, generating a package description file (used to
 identify a package as a VC package later on), building
 documentation and marking the package as installed."
-  (let (missing)
+  (let ((pkg-spec (package-vc--desc->spec pkg-desc))
+        missing)
     ;; Remove any previous instance of PKG-DESC from `package-alist'
     (let ((pkgs (assq (package-desc-name pkg-desc) package-alist)))
       (when pkgs
@@ -510,17 +511,29 @@ documentation and marking the package as installed."
     ;; In case the package was installed directly from source, the
     ;; dependency list wasn't know beforehand, and they might have
     ;; to be installed explicitly.
-    (let ((deps '()))
+    (let ((ignored-files
+           (if (plist-get pkg-spec :ignored-files)
+               (mapconcat
+                (lambda (ignore)
+                  (wildcard-to-regexp
+                   (if (string-match-p "\\`/" ignore)
+                       (concat pkg-dir ignore)
+                     (concat "*/" ignore))))
+                (plist-get pkg-spec :ignored-files)
+                "\\|")
+             regexp-unmatchable))
+          (deps '()))
       (dolist (file (directory-files pkg-dir t "\\.el\\'" t))
-        (with-temp-buffer
-          (insert-file-contents file)
-          (when-let* ((require-lines (lm-header-multiline "package-requires")))
-            (thread-last
-              (mapconcat #'identity require-lines " ")
-              package-read-from-string
-              package--prepare-dependencies
-              (nconc deps)
-              (setq deps)))))
+        (unless (string-match-p ignored-files file)
+          (with-temp-buffer
+            (insert-file-contents file)
+            (when-let* ((require-lines (lm-header-multiline 
"package-requires")))
+              (thread-last
+                (mapconcat #'identity require-lines " ")
+                package-read-from-string
+                package--prepare-dependencies
+                (nconc deps)
+                (setq deps))))))
       (dolist (dep deps)
         (cl-callf version-to-list (cadr dep)))
       (setf missing (package-vc-install-dependencies (delete-dups deps)))
@@ -529,8 +542,7 @@ documentation and marking the package as installed."
                           missing)))
 
     (let ((default-directory (file-name-as-directory pkg-dir))
-          (pkg-file (expand-file-name (package--description-file pkg-dir) 
pkg-dir))
-          (pkg-spec (package-vc--desc->spec pkg-desc)))
+          (pkg-file (expand-file-name (package--description-file pkg-dir) 
pkg-dir)))
       ;; Generate autoloads
       (let* ((name (package-desc-name pkg-desc))
              (auto-name (format "%s-autoloads.el" name))
@@ -941,18 +953,19 @@ for the last released version of the package."
     (find-file directory)))
 
 ;;;###autoload
-(defun package-vc-install-from-checkout (dir name)
+(defun package-vc-install-from-checkout (dir &optional name)
   "Install the package NAME from its source directory DIR.
+NAME defaults to the base name of DIR.
 Interactively, prompt the user for DIR, which should be a directory
 under version control, typically one created by `package-vc-checkout'.
 If invoked interactively with a prefix argument, prompt the user
-for the NAME of the package to set up.  Otherwise infer the package
-name from the base name of DIR."
-  (interactive (let ((dir (read-directory-name "Directory: ")))
-                 (list dir
-                       (if current-prefix-arg
-                           (read-string "Package name: ")
-                         (file-name-base (directory-file-name dir))))))
+for the NAME of the package to set up."
+  (interactive (let* ((dir (read-directory-name "Directory: "))
+                      (base (file-name-base (directory-file-name dir))))
+                 (list dir (and current-prefix-arg
+                                (read-string
+                                 (format-prompt "Package name" base)
+                                 nil nil base)))))
   (unless (vc-responsible-backend dir)
     (user-error "Directory %S is not under version control" dir))
   (package-vc--archives-initialize)
diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el
index fb10ee31c78..4b5edaa77d2 100644
--- a/lisp/erc/erc-backend.el
+++ b/lisp/erc/erc-backend.el
@@ -164,7 +164,6 @@
 (declare-function erc-is-message-ctcp-p "erc" (message))
 (declare-function erc-log-irc-protocol "erc" (string &optional outbound))
 (declare-function erc-login "erc" nil)
-(declare-function erc-make-notice "erc" (message))
 (declare-function erc-network "erc-networks" nil)
 (declare-function erc-networks--id-given "erc-networks" (arg &rest args))
 (declare-function erc-networks--id-reload "erc-networks" (arg &rest args))
@@ -511,7 +510,7 @@ It should take same arguments as `open-network-stream' 
does."
   "Either nil or a list of strings.
 Each string is a IRC message type, like PRIVMSG or NOTICE.
 All Message types in that list of subjected to duplicate prevention."
-  :type '(choice (const nil) (list string)))
+  :type '(repeat string))
 
 (defcustom erc-server-duplicate-timeout 60
   "The time allowed in seconds between duplicate messages.
@@ -1104,7 +1103,7 @@ Change value of property `erc-prompt' from t to `hidden'."
             (erc--register-connection)
           ;; assume event is 'failed
           (erc-with-all-buffers-of-server cproc nil
-                                          (setq erc-server-connected nil))
+            (setq erc-server-connected nil))
           (when erc-server-ping-handler
             (progn (cancel-timer erc-server-ping-handler)
                    (setq erc-server-ping-handler nil)))
@@ -1112,6 +1111,8 @@ Change value of property `erc-prompt' from t to `hidden'."
                               (erc-current-nick) (system-name) "")
           (dolist (buf (erc-buffer-filter (lambda () (boundp 
'erc-channel-users)) cproc))
             (with-current-buffer buf
+              (when (erc--target-channel-p erc--target)
+                (setf (erc--target-channel-joined-p erc--target) nil))
               (setq erc-channel-users (make-hash-table :test 'equal))))
           ;; Hide the prompt
           (erc--hide-prompt cproc)
@@ -1612,7 +1613,9 @@ Would expand to:
 
 \(fn (NAME &rest ALIASES) &optional EXTRA-FN-DOC EXTRA-VAR-DOC &rest FN-BODY)"
   (declare (debug (&define [&name "erc-response-handler@"
-                                  (symbolp &rest symbolp)]
+                                  ;; No `def-edebug-elem-spec' in 27.
+                                  ([&or integerp symbolp]
+                                   &rest [&or integerp symbolp])]
                            &optional sexp sexp def-body))
            (indent defun))
   (if (numberp name) (setq name (intern (format "%03i" name))))
@@ -1718,7 +1721,7 @@ add things to `%s' instead."
       (if (string-match "^\\(.*\\)\^g.*$" chnl)
           (setq chnl (match-string 1 chnl)))
       (save-excursion
-        (let* ((str (cond
+        (let ((args (cond
                      ;; If I have joined a channel
                      ((erc-current-nick-p nick)
                       (let ((erc--display-context
@@ -1730,23 +1733,21 @@ add things to `%s' instead."
                         (with-suppressed-warnings
                             ((obsolete erc-add-default-channel))
                           (erc-add-default-channel chnl))
+                        (setf (erc--target-channel-joined-p erc--target) t)
                         (erc-server-send (format "MODE %s" chnl)))
                       (erc-with-buffer (chnl proc)
                         (erc-channel-begin-receiving-names))
                       (erc-update-mode-line)
                       (run-hooks 'erc-join-hook)
-                      (erc-make-notice
-                       (erc-format-message 'JOIN-you ?c chnl)))
+                      (list 'JOIN-you ?c chnl))
                      (t
                       (setq buffer (erc-get-buffer chnl proc))
-                      (erc-make-notice
-                       (erc-format-message
-                        'JOIN ?n nick ?u login ?h host ?c chnl))))))
+                      (list 'JOIN ?n nick ?u login ?h host ?c chnl)))))
           (when buffer (set-buffer buffer))
           (erc-update-channel-member chnl nick nick t nil nil nil nil nil host 
login)
           ;; on join, we want to stay in the new channel buffer
           ;;(set-buffer ob)
-          (erc-display-message parsed nil buffer str))))))
+          (apply #'erc-display-message parsed 'notice buffer args))))))
 
 (define-erc-response-handler (KICK)
   "Handle kick messages received from the server." nil
diff --git a/lisp/erc/erc-common.el b/lisp/erc/erc-common.el
index 8d896e663b5..930e8032f6d 100644
--- a/lisp/erc/erc-common.el
+++ b/lisp/erc/erc-common.el
@@ -81,16 +81,13 @@
   (string "" :type string :documentation "Received name of target.")
   (symbol nil :type symbol :documentation "Case-mapped name as symbol."))
 
-;; At some point, it may make sense to add a query type with an
-;; account field, which may help support reassociation across
-;; reconnects and nick changes (likely requires v3 extensions).
-;;
-;; These channel variants should probably take on a `joined' field to
-;; track "joinedness", which `erc-server-JOIN', `erc-server-PART',
-;; etc. should toggle.  Functions like `erc--current-buffer-joined-p'
-;; may find it useful.
+;; At some point, it may make sense to add a separate query type,
+;; possibly with an account field to help reassociation across
+;; reconnects and nick changes.
+
+(cl-defstruct (erc--target-channel (:include erc--target))
+  (joined-p nil :type boolean :documentation "Whether channel is joined."))
 
-(cl-defstruct (erc--target-channel (:include erc--target)))
 (cl-defstruct (erc--target-channel-local (:include erc--target-channel)))
 
 ;; Beginning in 5.5/29.1, the `tags' field may take on one of two
@@ -427,6 +424,13 @@ nil."
                             ,@forms))
                         ,process)))
 
+(defvar-local erc--target nil
+  "A permanent `erc--target' struct instance in channel and query buffers.")
+
+(define-inline erc-target ()
+  "Return target of current buffer, if any, as a string."
+  (inline-quote (and erc--target (erc--target-string erc--target))))
+
 (defun erc-log-aux (string)
   "Do the debug logging of STRING."
   (let ((cb (current-buffer))
diff --git a/lisp/erc/erc-fill.el b/lisp/erc/erc-fill.el
index 0e6b5a3efb8..e28c3563ebf 100644
--- a/lisp/erc/erc-fill.el
+++ b/lisp/erc/erc-fill.el
@@ -49,8 +49,8 @@ the channel buffers are filled."
   ;; other modules.  Ideally, this module's processing should happen
   ;; after "morphological" modifications to a message's text but
   ;; before superficial decorations.
-  ((add-hook 'erc-insert-modify-hook #'erc-fill 40)
-   (add-hook 'erc-send-modify-hook #'erc-fill 40))
+  ((add-hook 'erc-insert-modify-hook #'erc-fill 60)
+   (add-hook 'erc-send-modify-hook #'erc-fill 60))
   ((remove-hook 'erc-insert-modify-hook #'erc-fill)
    (remove-hook 'erc-send-modify-hook #'erc-fill)))
 
@@ -86,10 +86,12 @@ function is called.
 
 A third style resembles static filling but \"wraps\" instead of
 fills, thanks to `visual-line-mode' mode, which ERC automatically
-enables when this option is `erc-fill-wrap' or when
-`erc-fill-wrap-mode' is active.  Set `erc-fill-static-center' to
-your preferred initial \"prefix\" width.  For adjusting the width
-during a session, see the command `erc-fill-wrap-nudge'."
+enables when this option is `erc-fill-wrap' or when the module
+`fill-wrap' is active.  Use `erc-fill-static-center' to specify
+an initial \"prefix\" width and `erc-fill-wrap-margin-width'
+instead of `erc-fill-column' for influencing initial message
+width.  For adjusting these during a session, see the commands
+`erc-fill-wrap-nudge' and `erc-fill-wrap-refill-buffer'."
   :type '(choice (const :tag "Variable Filling" erc-fill-variable)
                  (const :tag "Static Filling" erc-fill-static)
                  (const :tag "Dynamic word-wrap" erc-fill-wrap)
@@ -110,7 +112,8 @@ https://en.wikipedia.org/wiki/Hanging_indent.";
 (defcustom erc-fill-variable-maximum-indentation 17
   "Don't indent a line after a long nick more than this many characters.
 Set to nil to disable."
-  :type 'integer)
+  :type '(choice (const :tag "Disable" nil)
+                 integer))
 
 (defcustom erc-fill-column 78
   "The column at which a filled paragraph is broken."
@@ -158,6 +161,11 @@ You can put this on `erc-insert-modify-hook' and/or 
`erc-send-modify-hook'."
     (when (or erc-fill--function erc-fill-function)
       ;; skip initial empty lines
       (goto-char (point-min))
+      ;; Note the following search pattern was altered in 5.6 to adapt
+      ;; to a change in Emacs regexp behavior that turned out to be a
+      ;; regression (which has since been fixed).  The patterns appear
+      ;; to be equivalent in practice, so this was left as is (wasn't
+      ;; reverted) to avoid additional git-blame(1)-related churn.
       (while (and (looking-at (rx bol (* (in " \t")) eol))
                   (zerop (forward-line 1))))
       (unless (eobp)
@@ -167,12 +175,10 @@ You can put this on `erc-insert-modify-hook' and/or 
`erc-send-modify-hook'."
           (when-let* ((erc-fill-line-spacing)
                       (p (point-min)))
             (widen)
-            (when (or (and-let* ((cmd (get-text-property p 'erc-command)))
-                        (memq cmd erc-fill--spaced-commands))
+            (when (or (erc--check-msg-prop 'erc-cmd erc-fill--spaced-commands)
                       (and-let* ((cmd (save-excursion
                                         (forward-line -1)
-                                        (get-text-property (point)
-                                                           'erc-command))))
+                                        (get-text-property (point) 'erc-cmd))))
                         (memq cmd erc-fill--spaced-commands)))
               (put-text-property (1- p) p
                                  'line-spacing erc-fill-line-spacing))))))))
@@ -181,15 +187,17 @@ You can put this on `erc-insert-modify-hook' and/or 
`erc-send-modify-hook'."
   "Fills a text such that messages start at column `erc-fill-static-center'."
   (save-restriction
     (goto-char (point-min))
-    (looking-at "^\\(\\S-+\\)")
-    (let ((nick (match-string 1)))
+    (when-let (((looking-at "^\\(\\S-+\\)"))
+               ((not (erc--check-msg-prop 'erc-msg 'datestamp)))
+               (nick (match-string 1)))
+      (progn
         (let ((fill-column (- erc-fill-column (erc-timestamp-offset)))
               (fill-prefix (make-string erc-fill-static-center 32)))
           (insert (make-string (max 0 (- erc-fill-static-center
                                          (length nick) 1))
                                32))
           (erc-fill-regarding-timestamp))
-        (erc-restore-text-properties))))
+        (erc-restore-text-properties)))))
 
 (defun erc-fill-variable ()
   "Fill from `point-min' to `point-max'."
@@ -233,11 +241,23 @@ A value of t tells ERC to use movement commands defined by
 `visual-line-mode' everywhere in an ERC buffer along with visual
 editing commands in the input area.  A value of nil means to
 never do so.  A value of `non-input' tells ERC to act like the
-value is nil in the input area and t elsewhere.  This option only
-plays a role when `erc-fill-wrap-mode' is enabled."
+value is nil in the input area and t elsewhere.  See related
+option `erc-fill-wrap-force-screen-line-movement' for behavior
+involving `next-line' and `previous-line'."
   :package-version '(ERC . "5.6") ; FIXME sync on release
   :type '(choice (const nil) (const t) (const non-input)))
 
+(defcustom erc-fill-wrap-force-screen-line-movement '(non-input)
+  "Exceptions for vertical movement by logical line.
+Including a symbol known to `erc-fill-wrap-visual-keys' in this
+set tells `next-line' and `previous-line' to move vertically by
+screen line even if the current `erc-fill-wrap-visual-keys' value
+would normally do otherwise.  For example, setting this to
+\\='(nil non-input) disables logical-line movement regardless of
+the value of `erc-fill-wrap-visual-keys'."
+  :package-version '(ERC . "5.6") ; FIXME sync on release
+  :type '(set (const nil) (const non-input)))
+
 (defcustom erc-fill-wrap-merge t
   "Whether to consolidate messages from the same speaker.
 This tells ERC to omit redundant speaker labels for subsequent
@@ -245,13 +265,13 @@ messages less than a day apart."
   :package-version '(ERC . "5.6") ; FIXME sync on release
   :type 'boolean)
 
-(defun erc-fill--wrap-move (normal-cmd visual-cmd arg)
-  (funcall (pcase erc-fill--wrap-visual-keys
-             ('non-input
-              (if (>= (point) erc-input-marker) normal-cmd visual-cmd))
-             ('t visual-cmd)
-             (_ normal-cmd))
-           arg))
+(defun erc-fill--wrap-move (normal-cmd visual-cmd &rest args)
+  (apply (pcase erc-fill--wrap-visual-keys
+           ('non-input
+            (if (>= (point) erc-input-marker) normal-cmd visual-cmd))
+           ('t visual-cmd)
+           (_ normal-cmd))
+         args))
 
 (defun erc-fill--wrap-kill-line (arg)
   "Defer to `kill-line' or `kill-visual-line'."
@@ -282,17 +302,23 @@ Basically mimic what `move-beginning-of-line' does with 
invisible text."
 (defun erc-fill--wrap-previous-line (&optional arg try-vscroll)
   "Move to ARGth previous logical or screen line."
   (interactive "^p\np")
-  (if erc-fill--wrap-visual-keys
-      (with-no-warnings (previous-line arg try-vscroll))
-    (prog1 (previous-logical-line arg try-vscroll)
-      (erc-fill--wrap-escape-hidden-speaker))))
+  ;; Return value seems undefined but preserve anyway just in case.
+  (prog1
+      (let ((visp (memq erc-fill--wrap-visual-keys
+                        erc-fill-wrap-force-screen-line-movement)))
+        (erc-fill--wrap-move (if visp #'previous-line #'previous-logical-line)
+                             #'previous-line
+                             arg try-vscroll))
+    (erc-fill--wrap-escape-hidden-speaker)))
 
 (defun erc-fill--wrap-next-line (&optional arg try-vscroll)
   "Move to ARGth next logical or screen line."
   (interactive "^p\np")
-  (if erc-fill--wrap-visual-keys
-      (with-no-warnings (next-line arg try-vscroll))
-    (next-logical-line arg try-vscroll)))
+  (let ((visp (memq erc-fill--wrap-visual-keys
+                    erc-fill-wrap-force-screen-line-movement)))
+    (erc-fill--wrap-move (if visp #'next-line #'next-logical-line)
+                         #'next-line
+                         arg try-vscroll)))
 
 (defun erc-fill--wrap-end-of-line (arg)
   "Defer to `move-end-of-line' or `end-of-visual-line'."
@@ -380,15 +406,19 @@ is 0, reset to value of `erc-fill-wrap-visual-keys'."
 (define-erc-module fill-wrap nil
   "Fill style leveraging `visual-line-mode'.
 This module displays nicks overhanging leftward to a common
-offset, as determined by the option `erc-fill-static-center'.  To
-use it, either include `fill-wrap' in `erc-modules' or set
-`erc-fill-function' to `erc-fill-wrap'.  Most users will want to
-enable the `scrolltobottom' module as well.  Once active, use
+offset, as determined by the option `erc-fill-static-center'.
+And it \"wraps\" messages at a common margin width, as determined
+by the option `erc-fill-wrap-margin-width'.  To use it, either
+include `fill-wrap' in `erc-modules' or set `erc-fill-function'
+to `erc-fill-wrap'.  Most users will want to enable the
+`scrolltobottom' module as well.  Once active, use
 \\[erc-fill-wrap-nudge] to adjust the width of the indent and the
 stamp margin, and use \\[erc-fill-wrap-toggle-truncate-lines] for
 cycling between logical- and screen-line oriented command
-movement.  Also see related options `erc-fill-line-spacing' and
-`erc-fill-wrap-merge'.
+movement.  Similarly, use \\[erc-fill-wrap-refill-buffer] to fix
+alignment problems after running certain commands, like
+`text-scale-adjust'.  Also see related stylistic options
+`erc-fill-line-spacing' and `erc-fill-wrap-merge'.
 
 This module imposes various restrictions on the appearance of
 timestamps.  Most notably, it insists on displaying them in the
@@ -423,8 +453,6 @@ is not recommended."
              (eq (default-value 'erc-insert-timestamp-function)
                  #'erc-insert-timestamp-left)))
    (setq erc-fill--function #'erc-fill-wrap)
-   (add-function :after (local 'erc-stamp--insert-date-function)
-                 #'erc-fill--wrap-stamp-insert-prefixed-date)
    (when erc-fill-wrap-merge
      (add-hook 'erc-button--prev-next-predicate-functions
                #'erc-fill--wrap-merged-button-p nil t))
@@ -436,9 +464,7 @@ is not recommended."
    (kill-local-variable 'erc-fill--function)
    (kill-local-variable 'erc-fill--wrap-visual-keys)
    (remove-hook 'erc-button--prev-next-predicate-functions
-                #'erc-fill--wrap-merged-button-p t)
-   (remove-function (local 'erc-stamp--insert-date-function)
-                    #'erc-fill--wrap-stamp-insert-prefixed-date))
+                #'erc-fill--wrap-merged-button-p t))
   'local)
 
 (defvar-local erc-fill--wrap-length-function nil
@@ -456,6 +482,9 @@ parties.")
 (defvar-local erc-fill--wrap-max-lull (* 24 60 60))
 
 (defun erc-fill--wrap-continued-message-p ()
+  "Return non-nil when the current speaker hasn't changed.
+That is, indicate whether the text just inserted is from the same
+sender as that of the previous \"PRIVMSG\"."
   (prog1 (and-let*
              ((m (or erc-fill--wrap-last-msg
                      (setq erc-fill--wrap-last-msg (point-min-marker))
@@ -463,45 +492,37 @@ parties.")
               ((< (1+ (point-min)) (- (point) 2)))
               (props (save-restriction
                        (widen)
-                       (when (eq 'erc-timestamp (field-at-pos m))
-                         (set-marker m (field-end m)))
                        (and-let*
-                           (((eq 'PRIVMSG (get-text-property m 'erc-command)))
-                            ((not (eq (get-text-property m 'erc-ctcp)
-                                      'ACTION)))
+                           (((eq 'PRIVMSG (get-text-property m 'erc-cmd)))
+                            ((not (eq (get-text-property m 'erc-msg) 'ACTION)))
+                            ((not (invisible-p m)))
                             (spr (next-single-property-change m 'erc-speaker)))
-                         (cons (get-text-property m 'erc-timestamp)
+                         (cons (get-text-property m 'erc-ts)
                                (get-text-property spr 'erc-speaker)))))
               (ts (pop props))
               (props)
               ((not (time-less-p (erc-stamp--current-time) ts)))
               ((time-less-p (time-subtract (erc-stamp--current-time) ts)
                             erc-fill--wrap-max-lull))
+              ;; Assume presence of leading angle bracket or hyphen.
               (speaker (next-single-property-change (point-min) 'erc-speaker))
-              ((not (eq (get-text-property speaker 'erc-ctcp) 'ACTION)))
+              ((not (erc--check-msg-prop 'erc-ctcp 'ACTION)))
               (nick (get-text-property speaker 'erc-speaker))
               ((erc-nick-equal-p props nick))))
     (set-marker erc-fill--wrap-last-msg (point-min))))
 
-(defun erc-fill--wrap-stamp-insert-prefixed-date (&rest args)
-  "Apply `line-prefix' property to args."
-  (let* ((ts-left (car args))
-         (start)
-         ;; Insert " " to simulate gap between <speaker> and msg beg.
-         (end (save-excursion (skip-chars-backward "\n")
-                              (setq start (pos-bol))
-                              (insert " ")
-                              (point)))
-         (width (if (and erc-fill-wrap-use-pixels
-                         (fboundp 'buffer-text-pixel-size))
-                    (save-restriction (narrow-to-region start end)
-                                      (list (car (buffer-text-pixel-size))))
-                  (length (string-trim-left ts-left)))))
-    (delete-region (1- end) end)
-    ;; Use `point-min' instead of `start' to cover leading newilnes.
-    (put-text-property (point-min) (point) 'line-prefix
-                       `(space :width (- erc-fill--wrap-value ,width))))
-  args)
+(defun erc-fill--wrap-measure (beg end)
+  "Return display spec width for inserted region between BEG and END.
+Ignore any `invisible' props that may be present when figuring."
+  (if (and erc-fill-wrap-use-pixels (fboundp 'buffer-text-pixel-size))
+      ;; `buffer-text-pixel-size' can move point!
+      (save-excursion
+        (save-restriction
+          (narrow-to-region beg end)
+          (let* ((buffer-invisibility-spec)
+                 (rv (car (buffer-text-pixel-size))))
+            (if (zerop rv) 0 (list rv)))))
+    (- end beg)))
 
 ;; An escape hatch for third-party code expecting speakers of ACTION
 ;; messages to be exempt from `line-prefix'.  This could be converted
@@ -518,33 +539,111 @@ See `erc-fill-wrap-mode' for details."
     (goto-char (point-min))
     (let ((len (or (and erc-fill--wrap-length-function
                         (funcall erc-fill--wrap-length-function))
-                   (progn
+                   (and-let* ((msg-prop (erc--check-msg-prop 'erc-msg))
+                              ((not (eq msg-prop 'unknown))))
                      (when-let ((e (erc--get-speaker-bounds))
                                 (b (pop e))
                                 ((or erc-fill--wrap-action-dedent-p
-                                     (not (eq (get-text-property b 'erc-ctcp)
-                                              'ACTION)))))
+                                     (not (erc--check-msg-prop 'erc-ctcp
+                                                               'ACTION)))))
                        (goto-char e))
                      (skip-syntax-forward "^-")
                      (forward-char)
-                     ;; Using the `invisible' property might make more
-                     ;; sense, but that would require coordination
-                     ;; with other modules, like `erc-match'.
-                     (cond ((and erc-fill-wrap-merge
+                     (cond ((eq msg-prop 'datestamp)
+                            (when erc-fill--wrap-last-msg
+                              (set-marker erc-fill--wrap-last-msg (point-min)))
+                            (save-excursion
+                              (goto-char (point-max))
+                              (skip-chars-backward "\n")
+                              (let ((beg (pos-bol)))
+                                (insert " ")
+                                (prog1 (erc-fill--wrap-measure beg (point))
+                                  (delete-region (1- (point)) (point))))))
+                           ((and erc-fill-wrap-merge
                                  (erc-fill--wrap-continued-message-p))
                             (put-text-property (point-min) (point)
                                                'display "")
                             0)
-                           ((and erc-fill-wrap-use-pixels
-                                 (fboundp 'buffer-text-pixel-size))
-                            (save-restriction
-                              (narrow-to-region (point-min) (point))
-                              (list (car (buffer-text-pixel-size)))))
-                           (t (- (point) (point-min))))))))
-      (erc-put-text-properties (point-min) (1- (point-max)) ; exclude "\n"
-                               '(line-prefix wrap-prefix) nil
-                               `((space :width (- erc-fill--wrap-value ,len))
-                                 (space :width erc-fill--wrap-value))))))
+                           (t
+                            (erc-fill--wrap-measure (point-min) (point))))))))
+      (add-text-properties
+       (point-min) (1- (point-max)) ; exclude "\n"
+       `( line-prefix (space :width ,(if len
+                                         `(- erc-fill--wrap-value ,len)
+                                       'erc-fill--wrap-value))
+          wrap-prefix (space :width erc-fill--wrap-value))))))
+
+(defvar erc-fill--wrap-rejigger-last-message nil
+  "Temporary working instance of `erc-fill--wrap-last-msg'.")
+
+(defun erc-fill--wrap-rejigger-region (start finish on-next repairp)
+  "Recalculate `line-prefix' from START to FINISH.
+After refilling each message, call ON-NEXT with no args.  But
+stash and restore `erc-fill--wrap-last-msg' before doing so, in
+case this module's insert hooks run by way of the process filter.
+With REPAIRP, destructively fill gaps and re-merge speakers."
+  (goto-char start)
+  (cl-assert (null erc-fill--wrap-rejigger-last-message))
+  (let (erc-fill--wrap-rejigger-last-message)
+    (while-let
+        (((< (point) finish))
+         (beg (if (get-text-property (point) 'line-prefix)
+                  (point)
+                (next-single-property-change (point) 'line-prefix)))
+         (val (get-text-property beg 'line-prefix))
+         (end (text-property-not-all beg finish 'line-prefix val)))
+      ;; If this is a left-side stamp on its own line.
+      (remove-text-properties beg (1+ end) '(line-prefix nil wrap-prefix nil))
+      (when-let ((repairp)
+                 (dbeg (text-property-not-all beg end 'display nil))
+                 ((get-text-property (1+ dbeg) 'erc-speaker))
+                 (dval (get-text-property dbeg 'display))
+                 ((equal "" dval)))
+        (remove-text-properties
+         dbeg (text-property-not-all dbeg end 'display dval) '(display)))
+      (let* ((pos (if (eq 'date-left (get-text-property beg 'erc-stamp-type))
+                      (field-beginning beg)
+                    beg))
+             (erc--msg-props (map-into (text-properties-at pos) 'hash-table))
+             (erc-stamp--current-time (gethash 'erc-ts erc--msg-props)))
+        (save-restriction
+          (narrow-to-region beg (1+ end))
+          (let ((erc-fill--wrap-last-msg erc-fill--wrap-rejigger-last-message))
+            (erc-fill-wrap)
+            (setq erc-fill--wrap-rejigger-last-message
+                  erc-fill--wrap-last-msg))))
+      (when on-next
+        (funcall on-next))
+      ;; Skip to end of message upon encountering accidental gaps
+      ;; introduced by third parties (or bugs).
+      (if-let (((/= ?\n (char-after end)))
+               (next (erc--get-inserted-msg-bounds 'end beg)))
+          (progn
+            (cl-assert (= ?\n (char-after next)))
+            (when repairp ; eol <= next
+              (put-text-property end (pos-eol) 'line-prefix val))
+            (goto-char next))
+        (goto-char end)))))
+
+(defun erc-fill-wrap-refill-buffer (repair)
+  "Recalculate all `fill-wrap' prefixes in the current buffer.
+With REPAIR, attempt to refresh \"speaker merges\", which may be
+necessary after revealing previously hidden text with commands
+like `erc-match-toggle-hidden-fools'."
+  (interactive "P")
+  (unless erc-fill-wrap-mode
+    (user-error "Module `fill-wrap' not active in current buffer."))
+  (save-excursion
+    (with-silent-modifications
+      (let* ((rep (make-progress-reporter
+                   "Rewrap" 0 (line-number-at-pos erc-insert-marker) 1))
+             (seen 0)
+             (callback (lambda ()
+                         (progress-reporter-update rep (cl-incf seen))
+                         (accept-process-output nil 0.000001))))
+        (erc-fill--wrap-rejigger-region (point-min) erc-insert-marker
+                                        callback repair)
+        (progress-reporter-done rep)))))
 
 ;; FIXME use own text property to avoid false positives.
 (defun erc-fill--wrap-merged-button-p (point)
diff --git a/lisp/erc/erc-goodies.el b/lisp/erc/erc-goodies.el
index b77176d8ac7..9d70c644429 100644
--- a/lisp/erc/erc-goodies.el
+++ b/lisp/erc/erc-goodies.el
@@ -44,45 +44,46 @@
 This should be an integer specifying the line of the buffer on which
 the input line should stay.  A value of \"-1\" would keep the input
 line positioned on the last line in the buffer.  This is passed as an
-argument to `recenter', unless `erc-scrolltobottom-relaxed' is
-non-nil, in which case, ERC interprets it as additional lines to
-scroll down by per message insertion (minus one for the prompt)."
+argument to `recenter', unless `erc-scrolltobottom-all' is
+`relaxed', in which case, ERC interprets it as additional lines
+to scroll down by per message insertion (minus one for the
+prompt)."
   :group 'erc-display
   :type '(choice integer (const nil)))
 
 (defcustom erc-scrolltobottom-all nil
   "Whether to scroll all windows or just the selected one.
-A value of nil preserves pre-5.6 behavior, in which scrolling
-only affects the selected window.  Users should consider its
-non-nil behavior experimental for the time being.  Note also that
 ERC expects this option to be configured before module
-initialization."
+initialization.  A value of nil preserves pre-5.6 behavior, in
+which scrolling only affects the selected window.  A value of t
+means ERC attempts to recenter all visible windows whose point
+resides in the input area.
+
+A value of `relaxed' tells ERC to forgo forcing prompt to the
+bottom of the window.  When point is at the prompt, ERC scrolls
+the window up when inserting messages, making the prompt appear
+stationary.  Users who find this effect too \"stagnant\" can
+adjust the option `erc-input-line-position', borrowed here to
+express a scroll step offset.  Setting that value to zero lets
+the prompt drift toward the bottom by one line per message, which
+is generally slow enough not to distract while composing input.
+Of course, this doesn't apply when receiving a large influx of
+messages, such as after typing \"/msg NickServ help\".
+
+Note that users should consider this option's non-nil behavior to
+be experimental.  It currently only works with Emacs 28+."
   :group 'erc-display
   :package-version '(ERC . "5.6") ; FIXME sync on release
-  :type 'boolean)
-
-(defcustom erc-scrolltobottom-relaxed nil
-  "Whether to forgo forcing prompt to the bottom of the window.
-When non-nil, and point is at the prompt, ERC scrolls the window
-up when inserting messages, making the prompt appear stationary.
-Users who find this effect too \"stagnant\" can adjust the option
-`erc-input-line-position', which ERC borrows to express a scroll
-step offset when this option is non-nil.  Setting that value to
-zero lets the prompt drift toward the bottom by one line per
-message, which is generally slow enough not to distract while
-composing input.  Of course, this doesn't apply when receiving a
-large influx of messages, such as after typing \"/msg NickServ
-help\".  Note that ERC only considers this option when the
-experimental companion option `erc-scrolltobottom-all' is enabled
-and, only then, during module setup."
-  :group 'erc-display
-  :package-version '(ERC . "5.6") ; FIXME sync on release
-  :type 'boolean)
+  :type '(choice boolean (const relaxed)))
 
 ;;;###autoload(autoload 'erc-scrolltobottom-mode "erc-goodies" nil t)
 (define-erc-module scrolltobottom nil
   "This mode causes the prompt to stay at the end of the window."
   ((add-hook 'erc-mode-hook #'erc--scrolltobottom-setup)
+   (when (and erc-scrolltobottom-all (< emacs-major-version 28))
+     (erc-button--display-error-notice-with-keys
+      "Option `erc-scrolltobottom-all' requires Emacs 28+. Disabling.")
+     (setopt erc-scrolltobottom-all nil))
    (unless erc--updating-modules-p (erc-buffer-do #'erc--scrolltobottom-setup))
    (if erc-scrolltobottom-all
        (progn
@@ -93,25 +94,17 @@ and, only then, during module setup."
      (add-hook 'erc-insert-done-hook #'erc-possibly-scroll-to-bottom)))
   ((remove-hook 'erc-mode-hook #'erc--scrolltobottom-setup)
    (erc-buffer-do #'erc--scrolltobottom-setup)
-   (if erc-scrolltobottom-all
-       (progn
-         (remove-hook 'erc-insert-pre-hook #'erc--scrolltobottom-on-pre-insert)
-         (remove-hook 'erc-send-completed-hook #'erc--scrolltobottom-all)
-         (remove-hook 'erc-insert-done-hook #'erc--scrolltobottom-all)
-         (remove-hook 'erc-pre-send-functions
-                      #'erc--scrolltobottom-on-pre-insert))
-     (remove-hook 'erc-insert-done-hook #'erc-possibly-scroll-to-bottom))))
+   (remove-hook 'erc-insert-pre-hook #'erc--scrolltobottom-on-pre-insert)
+   (remove-hook 'erc-send-completed-hook #'erc--scrolltobottom-all)
+   (remove-hook 'erc-insert-done-hook #'erc--scrolltobottom-all)
+   (remove-hook 'erc-pre-send-functions #'erc--scrolltobottom-on-pre-insert)
+   (remove-hook 'erc-insert-done-hook #'erc-possibly-scroll-to-bottom)))
 
 (defun erc-possibly-scroll-to-bottom ()
   "Like `erc-add-scroll-to-bottom', but only if window is selected."
   (when (eq (selected-window) (get-buffer-window))
     (erc-scroll-to-bottom)))
 
-(defvar-local erc--scrolltobottom-relaxed-commands '(end-of-buffer)
-  "Commands triggering a forced scroll to prompt.
-Only applies with `erc-scrolltobottom-relaxed' while away from
-prompt.")
-
 (defvar-local erc--scrolltobottom-window-info nil
   "Alist with windows as keys and lists of window-related info as values.
 Values are lists containing the last window start position and
@@ -119,34 +112,12 @@ the last \"window line\" of point.  The \"window line\", 
which
 may be nil, is the number of lines between `window-start' and
 `window-point', inclusive.")
 
-(defvar erc--scrolltobottom-post-force-commands
-  '(beginning-of-buffer
-    electric-newline-and-maybe-indent
-    newline
-    default-indent-new-line)
-  "Commands that force a scroll after execution at prompt.
-That is, ERC recalculates the window's start instead of blindly
-restoring it.")
-
-;; Unfortunately, this doesn't work when `erc-scrolltobottom-relaxed'
-;; is enabled (scaling up still moves the prompt).
+;; FIXME treat `end-of-buffer' specially and always recenter -1.
+;; FIXME make this work when `erc-scrolltobottom-all' is set to
+;; `relaxed'.
 (defvar erc--scrolltobottom-post-ignore-commands '(text-scale-adjust)
   "Commands to skip instead of force-scroll on `post-command-hook'.")
 
-(defvar erc--scrolltobottom-relaxed-skip-commands
-  '(recenter-top-bottom scroll-down-command)
-  "Commands exempt from triggering a stash and restore of `window-start'.
-Only applies with `erc-scrolltobottom-relaxed' while in the input
-area.")
-
-(defun erc--scrolltobottom-on-pre-command ()
-  (when (and (eq (selected-window) (get-buffer-window))
-             (>= (point) erc-input-marker))
-    (setq erc--scrolltobottom-window-info
-          (list (list (selected-window)
-                      (window-start)
-                      (count-screen-lines (window-start) (point-max)))))))
-
 (defun erc--scrolltobottom-on-post-command ()
   "Restore window start or scroll to prompt and recenter.
 When `erc--scrolltobottom-window-info' is non-nil and its first
@@ -154,55 +125,8 @@ item is associated with the selected window, restore start 
of
 window so long as prompt hasn't moved.  Expect buffer to be
 unnarrowed."
   (when (eq (selected-window) (get-buffer-window))
-    (if-let (((not (input-pending-p)))
-             (erc--scrolltobottom-window-info)
-             (found (car erc--scrolltobottom-window-info))
-             ((eq (car found) (selected-window)))
-             ((not (memq this-command
-                         erc--scrolltobottom-post-force-commands)))
-             ((= (nth 2 found)
-                 (count-screen-lines (window-start) (point-max)))))
-        (set-window-start (selected-window) (nth 1 found))
-      (unless (memq this-command erc--scrolltobottom-post-ignore-commands)
-        (erc--scrolltobottom-confirm)))
-    (setq erc--scrolltobottom-window-info nil)))
-
-(defun erc--scrolltobottom-on-pre-command-relaxed ()
-  "Maybe scroll to bottom when away from prompt.
-When `erc-scrolltobottom-relaxed' is active, only scroll when
-prompt is past window's end and the command is `end-of-buffer' or
-`self-insert-command' (assuming `move-to-prompt' is active).
-When at prompt and current command does not appear in
-`erc--scrolltobottom-relaxed-skip-commands', stash
-`erc--scrolltobottom-window-info' for the selected window.
-Assume an unnarrowed buffer."
-  (when (eq (selected-window) (get-buffer-window))
-    (when (and (not (input-pending-p))
-               (< (point) erc-input-marker)
-               (memq this-command erc--scrolltobottom-relaxed-commands)
-               (< (window-end nil t) erc-input-marker))
-      (save-excursion
-        (goto-char (point-max))
-        (recenter (or erc-input-line-position -1))))
-    (when (and (>= (point) erc-input-marker)
-               (not (memq this-command
-                          erc--scrolltobottom-relaxed-skip-commands)))
-      (setq erc--scrolltobottom-window-info
-            (list (list (selected-window)
-                        (window-start)
-                        (count-screen-lines (window-start) (point-max))))))))
-
-(defun erc--scrolltobottom-on-post-command-relaxed ()
-  "Set window start or scroll when data was captured on pre-command."
-  (when-let (((eq (selected-window) (get-buffer-window)))
-             (erc--scrolltobottom-window-info)
-             (found (car erc--scrolltobottom-window-info))
-             ((eq (car found) (selected-window))))
-    (if (and (not (memq this-command erc--scrolltobottom-post-force-commands))
-             (= (nth 2 found)
-                (count-screen-lines (window-start) (point-max))))
-        (set-window-start (selected-window) (nth 1 found))
-      (recenter (nth 2 found)))
+    (unless (memq this-command erc--scrolltobottom-post-ignore-commands)
+      (erc--scrolltobottom-confirm))
     (setq erc--scrolltobottom-window-info nil)))
 
 ;; It may be desirable to also restore the relative line position of
@@ -246,54 +170,33 @@ function used `window-scroll-functions', which was 
replaced by
   (declare (obsolete erc--scrolltobottom-setup "30.1"))
   (add-hook 'post-command-hook #'erc-scroll-to-bottom nil t))
 
-(cl-defgeneric erc--scrolltobottom-setup ()
-  "Arrange for scrolling to bottom on window configuration changes.
-Undo that arrangement when disabling `erc-scrolltobottom-mode'."
-  (if erc-scrolltobottom-mode
-      (add-hook 'post-command-hook #'erc-scroll-to-bottom nil t)
-    (remove-hook 'post-command-hook #'erc-scroll-to-bottom t)))
-
-(cl-defmethod erc--scrolltobottom-setup (&context
-                                         (erc-scrolltobottom-all (eql t)))
-  "Add and remove local hooks specific to `erc-scrolltobottom-all'."
+(defun erc--scrolltobottom-setup ()
+  "Perform buffer-local setup for module `scrolltobottom'."
   (if erc-scrolltobottom-mode
-      (if erc-scrolltobottom-relaxed
+      (if erc-scrolltobottom-all
           (progn
-            (when (or (bound-and-true-p erc-move-to-prompt-mode)
-                      (memq 'move-to-prompt erc-modules))
-              (cl-pushnew 'self-insert-command
-                          erc--scrolltobottom-relaxed-commands))
-            (add-hook 'post-command-hook
-                      #'erc--scrolltobottom-on-post-command-relaxed 60 t)
-            (add-hook 'pre-command-hook ; preempt `move-to-prompt'
-                      #'erc--scrolltobottom-on-pre-command-relaxed 60 t))
-        (add-hook 'window-configuration-change-hook
-                  #'erc--scrolltobottom-at-prompt-minibuffer-active nil t)
-        (add-hook 'pre-command-hook
-                  #'erc--scrolltobottom-on-pre-command 60 t)
-        (add-hook 'post-command-hook
-                  #'erc--scrolltobottom-on-post-command 60 t))
+            (setq-local read-minibuffer-restore-windows nil)
+            (unless (eq erc-scrolltobottom-all 'relaxed)
+              (add-hook 'window-configuration-change-hook
+                        #'erc--scrolltobottom-at-prompt-minibuffer-active 50 t)
+              (add-hook 'post-command-hook
+                        #'erc--scrolltobottom-on-post-command 50 t)))
+        (add-hook 'post-command-hook #'erc-scroll-to-bottom nil t))
+    (remove-hook 'post-command-hook #'erc-scroll-to-bottom t)
+    (remove-hook 'post-command-hook #'erc--scrolltobottom-on-post-command t)
     (remove-hook 'window-configuration-change-hook
                  #'erc--scrolltobottom-at-prompt-minibuffer-active t)
-    (remove-hook 'pre-command-hook
-                 #'erc--scrolltobottom-on-pre-command t)
-    (remove-hook 'post-command-hook
-                 #'erc--scrolltobottom-on-post-command t)
-    (remove-hook 'pre-command-hook
-                 #'erc--scrolltobottom-on-pre-command-relaxed t)
-    (remove-hook 'post-command-hook
-                 #'erc--scrolltobottom-on-post-command-relaxed t)
-    (kill-local-variable 'erc--scrolltobottom-relaxed-commands)
+    (kill-local-variable 'read-minibuffer-restore-windows)
     (kill-local-variable 'erc--scrolltobottom-window-info)))
 
 (defun erc--scrolltobottom-on-pre-insert (_)
-  "Remember the `window-start' before inserting a message."
+  "Remember `window-start' before inserting a message."
   (setq erc--scrolltobottom-window-info
         (mapcar (lambda (w)
                   (list w
                         (window-start w)
                         (and-let*
-                            ((erc-scrolltobottom-relaxed)
+                            (((eq erc-scrolltobottom-all 'relaxed))
                              (c (count-screen-lines (window-start w)
                                                     (point-max) nil w)))
                           (if (= ?\n (char-before (point-max))) (1+ c) c))))
@@ -339,8 +242,8 @@ variable `erc-input-line-position'."
 ;;;###autoload(autoload 'erc-readonly-mode "erc-goodies" nil t)
 (define-erc-module readonly nil
   "This mode causes all inserted text to be read-only."
-  ((add-hook 'erc-insert-post-hook #'erc-make-read-only)
-   (add-hook 'erc-send-post-hook #'erc-make-read-only))
+  ((add-hook 'erc-insert-post-hook #'erc-make-read-only 70)
+   (add-hook 'erc-send-post-hook #'erc-make-read-only 70))
   ((remove-hook 'erc-insert-post-hook #'erc-make-read-only)
    (remove-hook 'erc-send-post-hook #'erc-make-read-only)))
 
@@ -389,7 +292,9 @@ displays an arrow in the left fringe or margin.  When it's
 appropriate line.  A value of t does both."
   :group 'erc
   :package-version '(ERC . "5.6") ; FIXME sync on release
-  :type '(choice (const t) (const server) (const target)))
+  :type '(choice (const :tag "Use arrow" arrow)
+                 (const :tag "Use face" face)
+                 (const :tag "Use both arrow and face" t)))
 
 (defcustom erc-keep-place-indicator-buffer-type t
   "ERC buffer type in which to display `keep-place-indicator'.
diff --git a/lisp/erc/erc-log.el b/lisp/erc/erc-log.el
index 472cc1388a4..79fece5779e 100644
--- a/lisp/erc/erc-log.el
+++ b/lisp/erc/erc-log.el
@@ -276,11 +276,11 @@ The current buffer is given by BUFFER."
 
 (defun erc-log-all-but-server-buffers (buffer)
   "Return t if logging should be enabled in BUFFER.
-Returns nil if `erc-server-buffer-p' returns t."
+Return nil if BUFFER is a server buffer."
   (save-excursion
     (save-window-excursion
       (set-buffer buffer)
-      (not (erc-server-buffer-p)))))
+      (not (erc--server-buffer-p)))))
 
 (defun erc-save-query-buffers (process)
   "Save all buffers of the given PROCESS."
diff --git a/lisp/erc/erc-match.el b/lisp/erc/erc-match.el
index 50db8a132ec..8644e61106f 100644
--- a/lisp/erc/erc-match.el
+++ b/lisp/erc/erc-match.el
@@ -53,13 +53,14 @@ they are hidden or highlighted.  This is controlled via the 
variables
 you can decide whether the entire message or only the sending nick is
 highlighted."
   ((add-hook 'erc-insert-modify-hook #'erc-match-message 50)
-   (add-hook 'erc-mode-hook #'erc-match--modify-invisibility-spec)
-   (unless erc--updating-modules-p
-     (erc-buffer-do #'erc-match--modify-invisibility-spec))
+   (add-hook 'erc-mode-hook #'erc-match--setup)
+   (unless erc--updating-modules-p (erc-buffer-do #'erc-match--setup))
+   (add-hook 'erc-insert-post-hook #'erc-match--on-insert-post 50)
    (erc--modify-local-map t "C-c C-k" #'erc-go-to-log-matches-buffer))
   ((remove-hook 'erc-insert-modify-hook #'erc-match-message)
-   (remove-hook 'erc-mode-hook #'erc-match--modify-invisibility-spec)
-   (erc-match--modify-invisibility-spec)
+   (remove-hook 'erc-insert-post-hook #'erc-match--on-insert-post)
+   (remove-hook 'erc-mode-hook #'erc-match--setup)
+   (erc-buffer-do #'erc-match--setup)
    (erc--modify-local-map nil "C-c C-k" #'erc-go-to-log-matches-buffer)))
 
 ;; Remaining customizations
@@ -490,7 +491,9 @@ Use this defun with `erc-insert-modify-hook'."
          (message (buffer-substring message-beg (point-max))))
     (when (and vector
               (not (and erc-match-exclude-server-buffer
-                        (erc-server-buffer-p))))
+                         ;; FIXME replace with `erc--server-buffer-p'
+                         ;; or explain why that's unwise.
+                         (erc-server-or-unjoined-channel-buffer-p))))
       (mapc
        (lambda (match-type)
         (goto-char (point-min))
@@ -657,7 +660,20 @@ See `erc-log-match-format'."
 
 (defun erc-hide-fools (match-type _nickuserhost _message)
   "Hide comments from designated fools."
-  (when (eq match-type 'fool)
+  (when (and erc--msg-props (eq match-type 'fool))
+    (puthash 'erc--invisible 'erc-match-fool erc--msg-props)))
+
+;; FIXME remove, make public, or only add locally.
+;;
+;; ERC modules typically don't add internal functions to public hooks
+;; globally.  However, ERC 5.6 will likely include a general
+;; (internal) facility for adding invisible props, which will obviate
+;; the need for this function.  IOW, leaving this internal for now is
+;; an attempt to avoid the hassle of the deprecation process.
+(defun erc-match--on-insert-post ()
+  "Hide messages marked with the `erc--invisible' prop."
+  (when (erc--check-msg-prop 'erc--invisible 'erc-match-fool)
+    (remhash 'erc--invisible erc--msg-props)
     (erc--hide-message 'match-fools)))
 
 (defun erc-beep-on-match (match-type _nickuserhost _message)
@@ -666,14 +682,13 @@ This function is meant to be called from 
`erc-text-matched-hook'."
   (when (member match-type erc-beep-match-types)
     (beep)))
 
-(defun erc-match--modify-invisibility-spec ()
+(defun erc-match--setup ()
   "Add an `erc-match' property to the local spec."
   ;; Hopefully, this will be extended to do the same for other
   ;; invisible properties managed by this module.
   (if erc-match-mode
       (erc-match-toggle-hidden-fools +1)
-    (erc-with-all-buffers-of-server nil nil
-      (erc-match-toggle-hidden-fools -1))))
+    (erc-match-toggle-hidden-fools -1)))
 
 (defun erc-match-toggle-hidden-fools (arg)
   "Toggle fool visibility.
diff --git a/lisp/erc/erc-networks.el b/lisp/erc/erc-networks.el
index ba7990e87d6..dd047243a3c 100644
--- a/lisp/erc/erc-networks.el
+++ b/lisp/erc/erc-networks.el
@@ -53,7 +53,6 @@
 (defvar erc-server-process)
 (defvar erc-session-server)
 
-(declare-function erc--default-target "erc" nil)
 (declare-function erc--get-isupport-entry "erc-backend" (key &optional single))
 (declare-function erc-buffer-filter "erc" (predicate &optional proc))
 (declare-function erc-current-nick "erc" nil)
@@ -756,9 +755,8 @@ number, a list of numbers, or a list of port ranges."
 Each network is a list (NET MATCHER) where
 NET is a symbol naming that IRC network and
 MATCHER is used to find a corresponding network to a server while
-  connected to it.  If it is regexp, it's used to match against
-  `erc-server-announced-name'.  It can also be a function (predicate).
-  Then it is executed with the server buffer as current buffer."
+connected to it.  If it is a regexp, it's used to match against
+`erc-server-announced-name'."
   :type '(repeat
          (list :tag "Network"
                (symbol :tag "Network name")
@@ -992,12 +990,11 @@ object."
                                       (erc-networks--id-qualifying-len nid))
   (erc-networks--rename-server-buffer (or proc erc-server-process) parsed)
   (erc-networks--shrink-ids-and-buffer-names-any)
-  (erc-with-all-buffers-of-server
-      erc-server-process #'erc--default-target
-      (when-let* ((new-name (erc-networks--reconcile-buffer-names erc--target
-                                                                  nid))
-                  ((not (equal (buffer-name) new-name))))
-        (rename-buffer new-name 'unique))))
+  (erc-with-all-buffers-of-server erc-server-process #'erc-target
+    (when-let
+        ((new-name (erc-networks--reconcile-buffer-names erc--target nid))
+         ((not (equal (buffer-name) new-name))))
+      (rename-buffer new-name 'unique))))
 
 (cl-defgeneric erc-networks--id-ensure-comparable (self other)
   "Take measures to ensure two net identities are in comparable states.")
diff --git a/lisp/erc/erc-notify.el b/lisp/erc/erc-notify.el
index 55be8976ada..cf7ffbb40d7 100644
--- a/lisp/erc/erc-notify.el
+++ b/lisp/erc/erc-notify.el
@@ -218,7 +218,9 @@ with args, toggle notify status of people."
            ;; from your notify list.
            (dolist (buf (erc-buffer-list))
              (with-current-buffer buf
-               (if (erc-server-buffer-p)
+                ;; FIXME replace with `erc--server-buffer-p' or
+                ;; explain why that's unwise.
+                (if (erc-server-or-unjoined-channel-buffer-p)
                    (setq erc-last-ison (delete (car args) erc-last-ison))))))
        (setq erc-notify-list (cons (erc-string-no-properties (car args))
                                    erc-notify-list)))
diff --git a/lisp/erc/erc-speedbar.el b/lisp/erc/erc-speedbar.el
index 625d59530b0..bb5fad6f52f 100644
--- a/lisp/erc/erc-speedbar.el
+++ b/lisp/erc/erc-speedbar.el
@@ -135,7 +135,7 @@ This will add a speedbar major display mode."
   (erase-buffer)
   (let (serverp chanp queryp)
     (with-current-buffer buffer
-      (setq serverp (erc-server-buffer-p))
+      (setq serverp (erc--server-buffer-p))
       (setq chanp (erc-channel-p (erc-default-target)))
       (setq queryp (erc-query-buffer-p)))
     (cond (serverp
diff --git a/lisp/erc/erc-stamp.el b/lisp/erc/erc-stamp.el
index 0f3163bf68d..b515513dcb7 100644
--- a/lisp/erc/erc-stamp.el
+++ b/lisp/erc/erc-stamp.el
@@ -55,21 +55,22 @@ If nil, timestamping is turned off."
   :type '(choice (const nil)
                 (string)))
 
-;; FIXME remove surrounding whitespace from default value and have
-;; `erc-insert-timestamp-left-and-right' add it before insertion.
-
 (defcustom erc-timestamp-format-left "\n[%a %b %e %Y]\n"
-  "If set to a string, messages will be timestamped.
-This string is processed using `format-time-string'.
-Good examples are \"%T\" and \"%H:%M\".
-
-This timestamp is used for timestamps on the left side of the
-screen when `erc-insert-timestamp-function' is set to
-`erc-insert-timestamp-left-and-right'.
-
-If nil, timestamping is turned off."
-  :type '(choice (const nil)
-                (string)))
+  "Format recognized by `format-time-string' for date stamps.
+Only considered when `erc-insert-timestamp-function' is set to
+`erc-insert-timestamp-left-and-right'.  Used for displaying date
+stamps on their own line, between messages.  ERC inserts this
+flavor of stamp as a separate \"psuedo message\", so a final
+newline isn't necessary.  For compatibility, only additional
+trailing newlines beyond the first become empty lines.  For
+example, the default value results in an empty line after the
+previous message, followed by the timestamp on its own line,
+followed immediately by the next message on the next line.  ERC
+expects to display these stamps less frequently, so the
+formatting specifiers should reflect that.  To omit these stamps
+entirely, use a different `erc-insert-timestamp-function', such
+as `erc-timestamp-format-right'."
+  :type 'string)
 
 (defcustom erc-timestamp-format-right nil
   "If set to a string, messages will be timestamped.
@@ -175,9 +176,9 @@ from entering them and instead jump over them."
 ;;;###autoload(autoload 'erc-timestamp-mode "erc-stamp" nil t)
 (define-erc-module stamp timestamp
   "This mode timestamps messages in the channel buffers."
-  ((add-hook 'erc-mode-hook #'erc-munge-invisibility-spec)
-   (add-hook 'erc-insert-modify-hook #'erc-add-timestamp 60)
-   (add-hook 'erc-send-modify-hook #'erc-add-timestamp 60)
+  ((add-hook 'erc-mode-hook #'erc-stamp--setup)
+   (add-hook 'erc-insert-modify-hook #'erc-add-timestamp 70)
+   (add-hook 'erc-send-modify-hook #'erc-add-timestamp 70)
    (add-hook 'erc-mode-hook #'erc-stamp--recover-on-reconnect)
    (add-hook 'erc--pre-clear-functions #'erc-stamp--reset-on-clear)
    (unless erc--updating-modules-p (erc-buffer-do #'erc-stamp--setup)))
@@ -214,18 +215,29 @@ the stamp passed to `erc-insert-timestamp-function'.")
 
 (cl-defgeneric erc-stamp--current-time ()
   "Return a lisp time object to associate with an IRC message.
-This becomes the message's `erc-timestamp' text property."
+This becomes the message's `erc-ts' text property."
   (erc-compat--current-lisp-time))
 
 (cl-defmethod erc-stamp--current-time :around ()
-  (or erc-stamp--current-time (cl-call-next-method)))
+  (or erc-stamp--current-time
+      (and erc--msg-props (gethash 'erc-ts erc--msg-props))
+      (cl-call-next-method)))
+
+(defvar erc-stamp--skip nil
+  "Non-nil means inhibit `erc-add-timestamp' completely.")
+
+(defvar erc-stamp--allow-unmanaged nil
+  "Non-nil means `erc-add-timestamp' runs unconditionally.
+Escape hatch for third-parties using lower-level API functions,
+such as `erc-display-line', directly.")
 
 (defun erc-add-timestamp ()
   "Add timestamp and text-properties to message.
 
 This function is meant to be called from `erc-insert-modify-hook'
 or `erc-send-modify-hook'."
-  (progn ; remove this `progn' on next major refactor
+  (unless (or erc-stamp--skip (and (not erc-stamp--allow-unmanaged)
+                                   (null erc--msg-props)))
     (let* ((ct (erc-stamp--current-time))
            (invisible (get-text-property (point-min) 'invisible))
            (erc-stamp--invisible-property
@@ -233,6 +245,8 @@ or `erc-send-modify-hook'."
             (if invisible `(timestamp ,@(ensure-list invisible)) 'timestamp))
            (skipp (and erc-stamp--skip-when-invisible invisible))
            (erc-stamp--current-time ct))
+      (when erc--msg-props
+        (puthash 'erc-ts ct erc--msg-props))
       (unless skipp
         (funcall erc-insert-timestamp-function
                  (erc-format-timestamp ct erc-timestamp-format)))
@@ -244,12 +258,13 @@ or `erc-send-modify-hook'."
                  (erc-away-time))
        (funcall erc-insert-away-timestamp-function
                 (erc-format-timestamp ct erc-away-timestamp-format)))
-      (add-text-properties (point-min) (1- (point-max))
+      (when erc-stamp--allow-unmanaged
+        (add-text-properties (point-min) (1- (point-max))
                           ;; It's important for the function to
                           ;; be different on different entries (bug#22700).
                           (list 'cursor-sensor-functions
                                  ;; Regions are no longer contiguous ^
-                                 '(erc--echo-ts-csf) 'erc-timestamp ct)))))
+                                 '(erc--echo-ts-csf) 'erc-ts ct))))))
 
 (defvar-local erc-timestamp-last-window-width nil
   "The width of the last window that showed the current buffer.
@@ -260,9 +275,11 @@ buffer is not shown in any window.")
   "Last timestamp inserted into the buffer.")
 
 (defvar-local erc-timestamp-last-inserted-left nil
-  "Last timestamp inserted into the left side of the buffer.
-This is used when `erc-insert-timestamp-function' is set to
-`erc-timestamp-left-and-right'")
+  "Last \"date stamp\" inserted into the left side of the buffer.
+Used when `erc-insert-timestamp-function' is set to
+`erc-timestamp-left-and-right'.  If the format string specified
+by `erc-timestamp-format-left' includes trailing newlines, this
+value omits the last one.")
 
 (defvar-local erc-timestamp-last-inserted-right nil
   "Last timestamp inserted into the right side of the buffer.
@@ -362,19 +379,27 @@ non-nil."
   (goto-char (point-min))
   (while
       (progn
-        (when-let* (((< (point) (pos-eol)))
-                    (end (1- (pos-eol)))
-                    ((eq 'erc-timestamp (field-at-pos end)))
-                    (beg (field-beginning end))
-                    ;; Skip a line that's just a timestamp.
-                    ((> beg (point))))
+        (when-let (((< (point) (pos-eol)))
+                   (end (1- (pos-eol)))
+                   ((eq 'erc-timestamp (field-at-pos end)))
+                   (beg (field-beginning end))
+                   ;; Skip a line that's just a timestamp.
+                   ((> beg (point))))
           (delete-region beg (1+ end)))
-        (when-let (time (get-text-property (point) 'erc-timestamp))
+        (when-let (time (erc--get-inserted-msg-prop 'erc-ts))
           (insert (format-time-string "[%H:%M:%S] " time)))
         (zerop (forward-line))))
   "")
 
-(defvar erc-stamp--inherited-props '(line-prefix wrap-prefix))
+;; These are currently extended manually, but we could also bind
+;; `text-property-default-nonsticky' and call `insert-and-inherit'
+;; instead of `insert', but we'd have to pair the props with differing
+;; boolean values for left and right stamps.  Also, since this hook
+;; runs last, we can't expect overriding sticky props to be absent,
+;; even though, as of 5.6, `front-sticky' is only added by the
+;; `readonly' module after hooks run.
+(defvar erc-stamp--inherited-props '(line-prefix wrap-prefix)
+  "Extant properties at the start of a message inherited by the stamp.")
 
 (declare-function erc--remove-text-properties "erc" (string))
 
@@ -467,8 +492,11 @@ and `erc-stamp--margin-left-p', before activating the 
mode."
     (put-text-property erc-insert-marker (1- erc-input-marker)
                        'display `((margin left-margin) ,prompt))))
 
-(cl-defmethod erc-insert-timestamp-left (string)
+(defun erc-insert-timestamp-left (string)
   "Insert timestamps at the beginning of the line."
+  (erc--insert-timestamp-left string))
+
+(cl-defmethod erc--insert-timestamp-left (string)
   (goto-char (point-min))
   (let* ((ignore-p (and erc-timestamp-only-if-changed-flag
                        (string-equal string erc-timestamp-last-inserted)))
@@ -479,13 +507,12 @@ and `erc-stamp--margin-left-p', before activating the 
mode."
     (erc-put-text-property 0 len 'invisible erc-stamp--invisible-property s)
     (insert s)))
 
-(cl-defmethod erc-insert-timestamp-left
+(cl-defmethod erc--insert-timestamp-left
   (string &context (erc-stamp--display-margin-mode (eql t)))
   (unless (and erc-timestamp-only-if-changed-flag
                (string-equal string erc-timestamp-last-inserted))
     (goto-char (point-min))
-    (insert-before-markers-and-inherit
-     (setq erc-timestamp-last-inserted string))
+    (insert-and-inherit (setq erc-timestamp-last-inserted string))
     (dolist (p erc-stamp--inherited-props)
       (when-let ((v (get-text-property (point) p)))
         (put-text-property (point-min) (point) p v)))
@@ -573,8 +600,11 @@ printed just after each line's text (no alignment)."
       ;; intervening white space unless a hard break is warranted.
       (pcase erc-timestamp-use-align-to
         ((guard erc-stamp--display-margin-mode)
-         (put-text-property 0 (length string)
-                            'display `((margin right-margin) ,string) string))
+         (let ((s (propertize (substring-no-properties string)
+                              'invisible erc-stamp--invisible-property)))
+           (put-text-property 0 (length string) 'display
+                              `((margin right-margin) ,s)
+                              string)))
         ((and 't (guard (< col pos)))
          (insert " ")
          (put-text-property from (point) 'display `(space :align-to ,pos)))
@@ -599,30 +629,96 @@ printed just after each line's text (no alignment)."
       (when erc-timestamp-intangible
        (erc-put-text-property from (1+ (point)) 'cursor-intangible t)))))
 
-(defvar erc-stamp--insert-date-function #'insert
-  "Function to insert left \"left-right date\" stamp.
-A local module might use this to modify text properties,
-`insert-before-markers' or renarrow the region after insertion.")
+(defvar erc-stamp--insert-date-hook nil
+  "Functions appended to send and modify hooks when inserting date stamp.")
+
+(defvar-local erc-stamp--date-format-end nil
+  "Substring index marking usable portion of date stamp format.")
+
+(defun erc-stamp--propertize-left-date-stamp ()
+  (add-text-properties (point-min) (1- (point-max))
+                       '(field erc-timestamp erc-stamp-type date-left))
+  (erc--hide-message 'timestamp))
+
+;; A kludge to pass state from insert hook to nested insert hook.
+(defvar erc-stamp--current-datestamp-left nil)
+
+(defun erc-stamp--format-date-stamp (ct)
+  "Format left date stamp with `erc-timestamp-format-left'."
+  (unless erc-stamp--date-format-end
+    ;; Don't add text properties to the trailing newline.
+    (setq erc-stamp--date-format-end
+          (if (string-suffix-p "\n" erc-timestamp-format-left) -1 0)))
+  ;; Ignore existing `invisible' prop value because date stamps should
+  ;; never be hideable except via `timestamp'.
+  (let (erc-stamp--invisible-property)
+    (erc-format-timestamp ct (substring erc-timestamp-format-left
+                                        0 erc-stamp--date-format-end))))
+
+;; Calling `erc-display-message' from within a hook it's currently
+;; running is roundabout, but it's a definite means of ensuring hooks
+;; can act on the date stamp as a standalone message to do things like
+;; adjust invisibility props.
+(defun erc-stamp--insert-date-stamp-as-phony-message (string)
+  (cl-assert (string-empty-p string))
+  (setq string erc-stamp--current-datestamp-left)
+  (cl-assert string)
+  (let ((erc-stamp--skip t)
+        (erc--msg-props (map-into `((erc-msg . datestamp)
+                                    (erc-ts . ,erc-stamp--current-time))
+                                  'hash-table))
+        (erc-send-modify-hook `(,@erc-send-modify-hook
+                                erc-stamp--propertize-left-date-stamp
+                                ,@erc-stamp--insert-date-hook))
+        (erc-insert-modify-hook `(,@erc-insert-modify-hook
+                                  erc-stamp--propertize-left-date-stamp
+                                  ,@erc-stamp--insert-date-hook)))
+    (erc-display-message nil nil (current-buffer) string)
+    (setq erc-timestamp-last-inserted-left string)))
+
+(defun erc-stamp--lr-date-on-pre-modify (_)
+  (when-let ((ct (or erc-stamp--current-time (erc-stamp--current-time)))
+             (rendered (erc-stamp--format-date-stamp ct))
+             ((not (string-equal rendered erc-timestamp-last-inserted-left)))
+             (erc-stamp--current-datestamp-left rendered)
+             (erc-insert-timestamp-function
+              #'erc-stamp--insert-date-stamp-as-phony-message))
+    (save-restriction
+      (narrow-to-region (or erc--insert-marker erc-insert-marker)
+                        (or erc--insert-marker erc-insert-marker))
+      (let (erc-timestamp-format erc-away-timestamp-format)
+        (erc-add-timestamp)))))
 
 (defun erc-insert-timestamp-left-and-right (string)
   "Insert a stamp on either side when it changes.
 When the deprecated option `erc-timestamp-format-right' is nil,
 use STRING, which originates from `erc-timestamp-format', for the
-right-hand stamp.  Use `erc-timestamp-format-left' for the
-left-hand stamp and expect it to change less frequently."
+right-hand stamp.  Use `erc-timestamp-format-left' for formatting
+the left-sided \"date stamp,\" and expect it to change less
+frequently.  Include all but the final trailing newline present
+in the latter (if any) as part of the `erc-timestamp' field.
+Allow the stamp's `invisible' property to span that same interval
+but also cover the previous newline, in order to satisfy folding
+requirements related to `erc-legacy-invisible-bounds-p'.
+Additionally, ensure every date stamp is identifiable as such so
+that internal modules can easily distinguish between other
+left-sided stamps and date stamps inserted by this function."
+  (unless erc-stamp--date-format-end
+    (add-hook 'erc-insert-pre-hook #'erc-stamp--lr-date-on-pre-modify -95 t)
+    (add-hook 'erc-send-pre-functions #'erc-stamp--lr-date-on-pre-modify -95 t)
+    (let ((erc--insert-marker (point-min-marker))
+          (end-marker (point-max-marker)))
+      (set-marker-insertion-type erc--insert-marker t)
+      (erc-stamp--lr-date-on-pre-modify nil)
+      (narrow-to-region erc--insert-marker end-marker)
+      (set-marker end-marker nil)
+      (set-marker erc--insert-marker nil)))
   (let* ((ct (or erc-stamp--current-time (erc-stamp--current-time)))
-         (ts-left (erc-format-timestamp ct erc-timestamp-format-left))
          (ts-right (with-suppressed-warnings
                        ((obsolete erc-timestamp-format-right))
                      (if erc-timestamp-format-right
                          (erc-format-timestamp ct erc-timestamp-format-right)
                        string))))
-    ;; insert left timestamp
-    (unless (string-equal ts-left erc-timestamp-last-inserted-left)
-      (goto-char (point-min))
-      (erc-put-text-property 0 (length ts-left) 'field 'erc-timestamp ts-left)
-      (funcall erc-stamp--insert-date-function ts-left)
-      (setq erc-timestamp-last-inserted-left ts-left))
     ;; insert right timestamp
     (let ((erc-timestamp-only-if-changed-flag t)
          (erc-timestamp-last-inserted erc-timestamp-last-inserted-right))
@@ -639,8 +735,9 @@ Return the empty string if FORMAT is nil."
       (let ((ts (format-time-string format time erc-stamp--tz)))
        (erc-put-text-property 0 (length ts)
                               'font-lock-face 'erc-timestamp-face ts)
-        (erc-put-text-property 0 (length ts) 'invisible
-                               erc-stamp--invisible-property ts)
+        (when erc-stamp--invisible-property
+          (erc-put-text-property 0 (length ts) 'invisible
+                                 erc-stamp--invisible-property ts))
        ;; N.B. Later use categories instead of this harmless, but
        ;; inelegant, hack. -- BPT
        (and erc-timestamp-intangible
@@ -649,6 +746,8 @@ Return the empty string if FORMAT is nil."
        ts)
     ""))
 
+(defvar-local erc-stamp--csf-props-updated-p nil)
+
 ;; This function is used to munge `buffer-invisibility-spec' to an
 ;; appropriate value. Currently, it only handles timestamps, thus its
 ;; location.  If you add other features which affect invisibility,
@@ -661,10 +760,23 @@ Return the empty string if FORMAT is nil."
       (cursor-intangible-mode -1)))
   (if erc-echo-timestamps
       (progn
+        (dolist (hook '(erc-insert-post-hook erc-send-post-hook))
+          (add-hook hook #'erc-stamp--add-csf-on-post-modify nil t))
+        (erc--restore-initialize-priors erc-stamp-mode
+          erc-stamp--csf-props-updated-p nil)
+        (unless (or erc-stamp--allow-unmanaged erc-stamp--csf-props-updated-p)
+          (setq erc-stamp--csf-props-updated-p t)
+          (let ((erc--msg-props (map-into '((erc-ts . t)) 'hash-table)))
+            (with-silent-modifications
+              (erc--traverse-inserted (point-min) erc-insert-marker
+                                      #'erc-stamp--add-csf-on-post-modify))))
         (cursor-sensor-mode +1) ; idempotent
         (when (>= emacs-major-version 29)
           (add-function :before-until (local 'clear-message-function)
                         #'erc-stamp--on-clear-message)))
+    (dolist (hook '(erc-insert-post-hook erc-send-post-hook))
+      (remove-hook hook #'erc-stamp--add-csf-on-post-modify t))
+    (kill-local-variable 'erc-stamp--csf-props-updated-p)
     (when (bound-and-true-p cursor-sensor-mode)
       (cursor-sensor-mode -1))
     (remove-function (local 'clear-message-function)
@@ -673,12 +785,22 @@ Return the empty string if FORMAT is nil."
       (add-to-invisibility-spec 'timestamp)
     (remove-from-invisibility-spec 'timestamp)))
 
+(defun erc-stamp--add-csf-on-post-modify ()
+  "Add `cursor-sensor-functions' to narrowed buffer."
+  (when (erc--check-msg-prop 'erc-ts)
+    (put-text-property (point-min) (1- (point-max))
+                       'cursor-sensor-functions '(erc--echo-ts-csf))))
+
 (defun erc-stamp--setup ()
   "Enable or disable buffer-local `erc-stamp-mode' modifications."
   (if erc-stamp-mode
       (erc-munge-invisibility-spec)
     (let (erc-echo-timestamps erc-hide-timestamps erc-timestamp-intangible)
-      (erc-munge-invisibility-spec))))
+      (erc-munge-invisibility-spec))
+    ;; Undo local mods from `erc-insert-timestamp-left-and-right'.
+    (remove-hook 'erc-insert-pre-hook #'erc-stamp--lr-date-on-pre-modify t)
+    (remove-hook 'erc-send-pre-functions #'erc-stamp--lr-date-on-pre-modify t)
+    (kill-local-variable 'erc-stamp--date-format-end)))
 
 (defun erc-hide-timestamps ()
   "Hide timestamp information from display."
@@ -714,7 +836,7 @@ enabled when the message was inserted."
 (defun erc-stamp--on-clear-message (&rest _)
   "Return `dont-clear-message' when operating inside the same stamp."
   (and erc-stamp--last-stamp erc-echo-timestamps
-       (eq (get-text-property (point) 'erc-timestamp) erc-stamp--last-stamp)
+       (eq (erc--get-inserted-msg-prop 'erc-ts) erc-stamp--last-stamp)
        'dont-clear-message))
 
 (defun erc-echo-timestamp (dir stamp &optional zone)
@@ -724,7 +846,7 @@ hours (or seconds, if its abs value is larger than 14), and
 interpret a \"raw\" prefix as UTC.  To specify a zone for use
 with the option `erc-echo-timestamps', see the companion option
 `erc-echo-timestamp-zone'."
-  (interactive (list nil (get-text-property (point) 'erc-timestamp)
+  (interactive (list nil (erc--get-inserted-msg-prop 'erc-ts)
                      (pcase current-prefix-arg
                        ((and (pred numberp) v)
                         (if (<= (abs v) 14) (* v 3600) v))
@@ -738,18 +860,18 @@ with the option `erc-echo-timestamps', see the companion 
option
       (setq erc-stamp--last-stamp nil))))
 
 (defun erc--echo-ts-csf (_window _before dir)
-  (erc-echo-timestamp dir (get-text-property (point) 'erc-timestamp)))
+  (erc-echo-timestamp dir (erc--get-inserted-msg-prop 'erc-ts)))
 
 (defun erc-stamp--update-saved-position (&rest _)
-  (remove-function (local 'erc-stamp--insert-date-function)
-                   #'erc-stamp--update-saved-position)
-  (move-marker erc-last-saved-position (1- (point))))
+  (remove-hook 'erc-stamp--insert-date-hook
+               #'erc-stamp--update-saved-position t)
+  (move-marker erc-last-saved-position (1- (point-max))))
 
 (defun erc-stamp--reset-on-clear (pos)
   "Forget last-inserted stamps when POS is at insert marker."
   (when (= pos (1- erc-insert-marker))
-    (add-function :after (local 'erc-stamp--insert-date-function)
-                  #'erc-stamp--update-saved-position)
+    (add-hook 'erc-stamp--insert-date-hook
+              #'erc-stamp--update-saved-position 0 t)
     (setq erc-timestamp-last-inserted nil
           erc-timestamp-last-inserted-left nil
           erc-timestamp-last-inserted-right nil)))
diff --git a/lisp/erc/erc-track.el b/lisp/erc/erc-track.el
index 64e59a90047..c8f2e04c3eb 100644
--- a/lisp/erc/erc-track.el
+++ b/lisp/erc/erc-track.el
@@ -795,7 +795,9 @@ the current buffer is in `erc-mode'."
     (if (and (not (erc-buffer-visible (current-buffer)))
             (not (member this-channel erc-track-exclude))
             (not (and erc-track-exclude-server-buffer
-                      (erc-server-buffer-p)))
+                       ;; FIXME either use `erc--server-buffer-p' or
+                       ;; explain why that's unwise.
+                       (erc-server-or-unjoined-channel-buffer-p)))
             (not (erc-message-type-member
                   (or (erc-find-parsed-property)
                       (point-min))
diff --git a/lisp/erc/erc-truncate.el b/lisp/erc/erc-truncate.el
index 48d8408a85a..3350cbd13b7 100644
--- a/lisp/erc/erc-truncate.el
+++ b/lisp/erc/erc-truncate.el
@@ -102,7 +102,7 @@ present in `erc-modules'."
           ;; Truncate at message boundary (formerly line boundary
           ;; before 5.6).
          (goto-char end)
-          (goto-char (or (previous-single-property-change (point) 'erc-command)
+          (goto-char (or (erc--get-inserted-msg-bounds 'beg)
                          (pos-bol)))
          (setq end (point))
          ;; try to save the current buffer using
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index fb236f1f189..7d75ec49ccd 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -135,9 +135,11 @@ concerning buffers."
   "Running scripts at startup and with /LOAD."
   :group 'erc)
 
-;; Forward declarations
-(defvar erc-message-parsed)
+(defvar erc-message-parsed) ; only known to this file
+(defvar erc--msg-props nil)
+(defvar erc--msg-prop-overrides nil)
 
+;; Forward declarations
 (defvar tabbar--local-hlf)
 (defvar motif-version-string)
 (defvar gtk-version-string)
@@ -532,6 +534,8 @@ See also: `erc-remove-server-user' and
 
 Removes all users in the current channel.  This is called by
 `erc-server-PART' and `erc-server-QUIT'."
+  (when (erc--target-channel-p erc--target)
+    (setf (erc--target-channel-joined-p erc--target) nil))
   (when (and erc-server-connected
              (erc-server-process-alive)
              (hash-table-p erc-channel-users))
@@ -1139,9 +1143,13 @@ if they wish to avoid sending of a particular string.")
   "Insertion hook for functions that will change the text's appearance.
 This hook is called just after `erc-insert-pre-hook' when the value
 of `erc-insert-this' is t.
-While this hook is run, narrowing is in effect and `current-buffer' is
-the buffer where the text got inserted.  One possible value to add here
-is `erc-fill'."
+
+ERC runs this hook with the buffer narrowed to the bounds of the
+inserted message plus a trailing newline.  Built-in modules place
+their hook members at depths between 20 and 80, with those from
+the stamp module always running last.  Use the functions
+`erc-find-parsed-property' and `erc-get-parsed-vector' to locate
+and extract the `erc-response' object for the inserted message."
   :group 'erc-hooks
   :type 'hook)
 
@@ -1366,16 +1374,15 @@ buffer during local-module setup and `erc-mode-hook' 
activation.")
 (defmacro erc--restore-initialize-priors (mode &rest vars)
   "Restore local VARS for MODE from a previous session."
   (declare (indent 1))
-  (let ((existing (make-symbol "existing"))
+  (let ((priors (make-symbol "priors"))
+        (initp (make-symbol "initp"))
         ;;
-        restore initialize)
-    (while-let ((k (pop vars)) (v (pop vars)))
-      (push `(,k (alist-get ',k ,existing)) restore)
-      (push `(,k ,v) initialize))
-    `(if-let* ((,existing (or erc--server-reconnecting erc--target-priors))
-               ((alist-get ',mode ,existing)))
-         (setq ,@(mapcan #'identity (nreverse restore)))
-       (setq ,@(mapcan #'identity (nreverse initialize))))))
+        forms)
+    (while-let ((k (pop vars)))
+      (push `(,k (if ,initp (alist-get ',k ,priors) ,(pop vars))) forms))
+    `(let* ((,priors (or erc--server-reconnecting erc--target-priors))
+            (,initp (and ,priors (alist-get ',mode ,priors))))
+       (setq ,@(mapcan #'identity (nreverse forms))))))
 
 (defun erc--target-from-string (string)
   "Construct an `erc--target' variant from STRING."
@@ -1386,16 +1393,6 @@ buffer during local-module setup and `erc-mode-hook' 
activation.")
              #'make-erc--target)
            :string string :symbol (intern (erc-downcase string))))
 
-(defvar-local erc--target nil
-  "Info about a buffer's target, if any.")
-
-;; Temporary internal getter to ease transition to `erc--target'
-;; everywhere.  Will be replaced by updated `erc-default-target'.
-(defun erc--default-target ()
-  "Return target string or nil."
-  (when erc--target
-    (erc--target-string erc--target)))
-
 (defun erc-once-with-server-event (event f)
   "Run function F the next time EVENT occurs in the `current-buffer'.
 
@@ -1412,7 +1409,7 @@ Please be sure to use this function in server-buffers.  In
 channel-buffers it may not work at all, as it uses the LOCAL
 argument of `add-hook' and `remove-hook' to ensure multiserver
 capabilities."
-  (unless (erc-server-buffer-p)
+  (unless (erc--server-buffer-p)
     (error
      "You should only run `erc-once-with-server-event' in a server buffer"))
   (let ((fun (make-symbol "fun"))
@@ -1469,26 +1466,37 @@ the process buffer."
   (and (processp erc-server-process)
        (buffer-live-p (process-buffer erc-server-process))))
 
-(defun erc-server-buffer-p (&optional buffer)
+(define-obsolete-function-alias
+  'erc-server-buffer-p 'erc-server-or-unjoined-channel-buffer-p "30.1")
+(defun erc-server-or-unjoined-channel-buffer-p (&optional buffer)
   "Return non-nil if argument BUFFER is an ERC server buffer.
-
-If BUFFER is nil, the current buffer is used."
+If BUFFER is nil, use the current buffer.  For historical
+reasons, also return non-nil for channel buffers the client has
+parted or from which it's been kicked."
   (with-current-buffer (or buffer (current-buffer))
     (and (eq major-mode 'erc-mode)
          (null (erc-default-target)))))
 
+(defun erc--server-buffer-p (&optional buffer)
+  "Return non-nil if BUFFER is an ERC server buffer.
+Without BUFFER, use the current buffer."
+  (if buffer
+      (with-current-buffer buffer
+        (and (eq major-mode 'erc-mode) (null erc--target)))
+    (and (eq major-mode 'erc-mode) (null erc--target))))
+
 (defun erc-open-server-buffer-p (&optional buffer)
   "Return non-nil if BUFFER is an ERC server buffer with an open IRC process.
 
 If BUFFER is nil, the current buffer is used."
-  (and (erc-server-buffer-p buffer)
+  (and (erc--server-buffer-p buffer)
        (erc-server-process-alive buffer)))
 
 (defun erc-query-buffer-p (&optional buffer)
   "Return non-nil if BUFFER is an ERC query buffer.
 If BUFFER is nil, the current buffer is used."
   (with-current-buffer (or buffer (current-buffer))
-    (let ((target (erc-default-target)))
+    (let ((target (erc-target)))
       (and (eq major-mode 'erc-mode)
            target
            (not (memq (aref target 0) '(?# ?& ?+ ?!)))))))
@@ -1853,7 +1861,10 @@ All strings are compared according to IRC protocol case 
rules, see
 
 (defun erc-get-buffer (target &optional proc)
   "Return the buffer matching TARGET in the process PROC.
-If PROC is not supplied, all processes are searched."
+Without PROC, search all ERC buffers.  For historical reasons,
+skip buffers for channels the client has \"PART\"ed or from which
+it's been \"KICK\"ed.  Expect users to use a different function
+for finding targets independent of \"JOIN\"edness."
   (let ((downcased-target (erc-downcase target)))
     (catch 'buffer
       (erc-buffer-filter
@@ -2005,6 +2016,14 @@ buffer rather than a server buffer.")
   ;; each item is in the format '(old . new)
   (delete-dups (mapcar #'erc--normalize-module-symbol mods)))
 
+(defun erc--sort-modules (modules)
+  "Return a copy of MODULES, deduped and led by sorted built-ins."
+  (let (built-in third-party)
+    (dolist (mod modules)
+      (setq mod (erc--normalize-module-symbol mod))
+      (cl-pushnew mod (if (get mod 'erc--module) built-in third-party)))
+    `(,@(sort built-in #'string-lessp) ,@(nreverse third-party))))
+
 (defcustom erc-modules '( autojoin button completion fill imenu irccontrols
                           list match menu move-to-prompt netsplit
                           networks noncommands readonly ring stamp track)
@@ -2034,22 +2053,17 @@ removed from the list will be disabled."
                    (when (symbol-value f)
                      (message "Disabling `erc-%s'" module)
                      (funcall f 0))
+                   ;; Disable local module in all ERC buffers.
                    (unless (or (custom-variable-p f)
                                (not (fboundp 'erc-buffer-filter)))
                      (erc-buffer-filter (lambda ()
                                           (when (symbol-value f)
                                             (funcall f 0))
                                           (kill-local-variable f)))))))))
-         (let (built-in third-party)
-           (dolist (v val)
-             (setq v (erc--normalize-module-symbol v))
-             (if (get v 'erc--module)
-                 (push v built-in)
-               (push v third-party)))
-           ;; Calling `set-default-toplevel-value' complicates testing
-           (set sym (append (sort built-in #'string-lessp)
-                            (nreverse third-party))))
-         ;; this test is for the case where erc hasn't been loaded yet
+         ;; Calling `set-default-toplevel-value' complicates testing.
+         (set sym (erc--sort-modules val))
+         ;; Don't initialize modules on load, even though the rare
+         ;; third-party module may need it.
          (when (fboundp 'erc-update-modules)
            (unless erc--inside-mode-toggle-p
              (erc-update-modules))))
@@ -2113,26 +2127,51 @@ removed from the list will be disabled."
 (defun erc-update-modules ()
   "Enable minor mode for every module in `erc-modules'.
 Except ignore all local modules, which were introduced in ERC 5.5."
-  (erc--update-modules)
+  (erc--update-modules erc-modules)
   nil)
 
+(defvar erc--aberrant-modules nil
+  "Modules suspected of being improperly loaded.")
+
+(defun erc--warn-about-aberrant-modules ()
+  (when (and erc--aberrant-modules (not erc--target))
+    (erc-button--display-error-notice-with-keys-and-warn
+     "The following modules likely engage in unfavorable loading practices: "
+     (mapconcat (lambda (s) (format "`%s'" s)) erc--aberrant-modules ", ")
+     ". Please contact ERC with \\[erc-bug] if you believe this to be untrue."
+     " See Info:\"(erc) Module Loading\" for more.")
+    (setq erc--aberrant-modules nil)))
+
+(defvar erc--requiring-module-mode-p nil
+  "Non-nil while doing (require \\='erc-mymod) for `mymod' in `erc-modules'.
+Used for inhibiting potentially recursive `erc-update-modules'
+invocations by third-party packages.")
+
 (defun erc--find-mode (sym)
   (setq sym (erc--normalize-module-symbol sym))
-  (if-let* ((mode (intern-soft (concat "erc-" (symbol-name sym) "-mode")))
-            ((or (boundp mode)
-                 (and (fboundp mode)
-                      (autoload-do-load (symbol-function mode) mode)))))
+  (if-let ((mode (intern-soft (concat "erc-" (symbol-name sym) "-mode")))
+           ((and (fboundp mode)
+                 (autoload-do-load (symbol-function mode) mode)))
+           ((or (get sym 'erc--module)
+                (symbol-file mode)
+                (ignore (cl-pushnew sym erc--aberrant-modules)))))
       mode
-    (and (require (or (get sym 'erc--feature)
-                      (intern (concat "erc-" (symbol-name sym))))
-                  nil 'noerror)
-         (setq mode (intern-soft (concat "erc-" (symbol-name sym) "-mode")))
+    (and (or (and erc--requiring-module-mode-p
+                  ;; Also likely non-nil: (eq sym (car features))
+                  (cl-pushnew sym erc--aberrant-modules))
+             (let ((erc--requiring-module-mode-p t))
+               (require (or (get sym 'erc--feature)
+                            (intern (concat "erc-" (symbol-name sym))))
+                        nil 'noerror))
+             (memq sym erc--aberrant-modules))
+         (or mode (setq mode (intern-soft (concat "erc-" (symbol-name sym)
+                                                  "-mode"))))
          (fboundp mode)
          mode)))
 
-(defun erc--update-modules ()
+(defun erc--update-modules (modules)
   (let (local-modes)
-    (dolist (module erc-modules local-modes)
+    (dolist (module modules local-modes)
       (if-let ((mode (erc--find-mode module)))
           (if (custom-variable-p mode)
               (funcall mode 1)
@@ -2159,7 +2198,7 @@ realizes it's missing some required module \"foo\", it can
 confidently call (erc-foo-mode 1) without having to learn
 anything about the dependency's implementation.")
 
-(defvar erc--setup-buffer-hook nil
+(defvar erc--setup-buffer-hook '(erc--warn-about-aberrant-modules)
   "Internal hook for module setup involving windows and frames.")
 
 (defvar erc--display-context nil
@@ -2316,7 +2355,8 @@ Returns the buffer for the given server or channel."
     (setq old-point (point))
     (setq delayed-modules
           (erc--merge-local-modes (let ((erc--updating-modules-p t))
-                                    (erc--update-modules))
+                                    (erc--update-modules
+                                     (erc--sort-modules erc-modules)))
                                   (or erc--server-reconnecting
                                       erc--target-priors)))
 
@@ -2444,10 +2484,13 @@ in here get called with three parameters, SERVER, PORT 
and NICK."
   :type '(repeat function))
 
 (defcustom erc-after-connect nil
-  "Functions called after connecting to a server.
-This functions in this variable gets executed when an end of MOTD
-has been received.  All functions in here get called with the
-parameters SERVER and NICK."
+  "Abnormal hook run upon establishing a logical IRC connection.
+Runs on MOTD's end when `erc-server-connected' becomes non-nil.
+ERC calls members with `erc-server-announced-name', falling back
+to the 376/422 message's \"sender\", as well as the current nick,
+as given by the 376/422 message's \"target\" parameter, which is
+typically the same as that reported by `erc-current-nick'."
+  :package-version '(ERC . "5.6") ; FIXME sync on release
   :group 'erc-hooks
   :type '(repeat function))
 
@@ -2855,11 +2898,10 @@ If ARG is non-nil, show the *erc-protocol* buffer."
 (defun erc-send-action (tgt str &optional force)
   "Send CTCP ACTION information described by STR to TGT."
   (erc-send-ctcp-message tgt (format "ACTION %s" str) force)
-  (let ((erc-insert-pre-hook
-         (cons (lambda (s) ; Leave newline be.
-                 (put-text-property 0 (1- (length s)) 'erc-command 'PRIVMSG s)
-                 (put-text-property 0 (1- (length s)) 'erc-ctcp 'ACTION s))
-               erc-insert-pre-hook))
+  ;; Allow hooks that act on inserted PRIVMSG and NOTICES to process us.
+  (let ((erc--msg-prop-overrides '((erc-msg . msg)
+                                   (erc-cmd . PRIVMSG)
+                                   (erc-ctcp . ACTION)))
         (nick (erc-current-nick)))
     (setq nick (propertize nick 'erc-speaker nick))
     (erc-display-message nil '(t action input) (current-buffer)
@@ -2877,9 +2919,18 @@ I.e. any char in it has the `invisible' property set."
 
 The default is to remove it, since it causes ERC to take up extra
 memory.  If you have code that relies on this property, then set
-this option to nil."
+this option to nil.
+
+Note that this option is deprecated because a value of nil is
+impractical in prolonged sessions with more than a few channels.
+Use `erc-insert-post-hook' or similar and the helper function
+`erc-find-parsed-property' and friends to stash the current
+`erc-response' object as needed.  And instead of using this for
+debugging purposes, try `erc-debug-irc-protocol'."
   :type 'boolean
   :group 'erc)
+(make-obsolete-variable 'erc-remove-parsed-property
+                        "impractical when non-nil" "30.1")
 
 (define-inline erc--assert-input-bounds ()
   (inline-quote
@@ -2909,13 +2960,90 @@ this option to nil."
         (delete-region (point) (1- erc-input-marker))))
     (run-hooks 'erc--refresh-prompt-hook)))
 
-(defun erc-display-line-1 (string buffer)
-  "Display STRING in `erc-mode' BUFFER.
-Auxiliary function used in `erc-display-line'.  The line gets filtered to
-interpret the control characters.  Then, `erc-insert-pre-hook' gets called.
-If `erc-insert-this' is still t, STRING gets inserted into the buffer.
-Afterwards, `erc-insert-modify' and `erc-insert-post-hook' get called.
-If STRING is nil, the function does nothing."
+(defun erc--check-msg-prop (prop &optional val)
+  "Return PROP's value in `erc--msg-props' when populated.
+If VAL is a list, return non-nil if PROP appears in VAL.  If VAL
+is otherwise non-nil, return non-nil if VAL compares `eq' to the
+stored value.  Otherwise, return the stored value."
+  (and-let* ((erc--msg-props)
+             (v (gethash prop erc--msg-props)))
+    (if (consp val) (memq v val) (if val (eq v val) v))))
+
+(defmacro erc--get-inserted-msg-bounds (&optional only point)
+  "Return the bounds of a message in an ERC buffer.
+Return ONLY one side when the first arg is `end' or `beg'.  With
+POINT, search from POINT instead of `point'."
+  `(let* ((point ,(or point '(point)))
+          (at-start-p (get-text-property point 'erc-msg)))
+     (and-let*
+         (,@(and (member only '(nil 'beg))
+                 '((b (or (and at-start-p point)
+                          (and-let*
+                              ((p (previous-single-property-change point
+                                                                   'erc-msg)))
+                            (if (= p (1- point)) point (1- p)))))))
+          ,@(and (member only '(nil 'end))
+                 '((e (1- (next-single-property-change
+                           (if at-start-p (1+ point) point)
+                           'erc-msg nil erc-insert-marker))))))
+       ,(pcase only
+          ('(quote beg) 'b)
+          ('(quote end) 'e)
+          (_ '(cons b e))))))
+
+(defun erc--get-inserted-msg-prop (prop)
+  "Return the value of text property PROP for some message at point."
+  (and-let* ((stack-pos (erc--get-inserted-msg-bounds 'beg)))
+    (get-text-property stack-pos prop)))
+
+(defmacro erc--with-inserted-msg (&rest body)
+  "Simulate narrowing performed for send and insert hooks, and run BODY.
+Expect callers to know that this doesn't wrap BODY in
+`with-silent-modifications' or bind a temporary `erc--msg-props'."
+  `(when-let ((bounds (erc--get-inserted-msg-bounds)))
+     (save-restriction
+       (narrow-to-region (car bounds) (1+ (cdr bounds)))
+       ,@body)))
+
+(defun erc--traverse-inserted (beg end fn)
+  "Visit messages between BEG and END and run FN in narrowed buffer."
+  (setq end (min end (marker-position erc-insert-marker)))
+  (save-excursion
+    (goto-char beg)
+    (let ((b (if (get-text-property (point) 'erc-msg)
+                 (point)
+               (next-single-property-change (point) 'erc-msg nil end))))
+      (while-let ((b)
+                  ((< b end))
+                  (e (next-single-property-change (1+ b) 'erc-msg nil end)))
+        (save-restriction
+          (narrow-to-region b e)
+          (funcall fn))
+        (setq b e)))))
+
+(defvar erc--insert-marker nil
+  "Internal override for `erc-insert-marker'.")
+
+(define-obsolete-function-alias 'erc-display-line-1 'erc-insert-line "30.1")
+(defun erc-insert-line (string buffer)
+  "Insert STRING in an `erc-mode' BUFFER.
+When STRING is nil, do nothing.  Otherwise, start off by running
+`erc-insert-pre-hook' in BUFFER with `erc-insert-this' bound to
+t.  If the latter remains non-nil afterward, insert STRING into
+BUFFER, ensuring a trailing newline.  After that, narrow BUFFER
+around STRING, along with its final line ending, and run
+`erc-insert-modify' and `erc-insert-post-hook', respectively.  In
+all cases, run `erc-insert-done-hook' unnarrowed before exiting,
+and update positions in `buffer-undo-list'.
+
+In general, expect to be called from a higher-level insertion
+function, like `erc-display-message', especially when modules
+should consider STRING as a candidate for formatting with
+enhancements like indentation, fontification, timestamping, etc.
+Otherwise, when called directly, allow built-in modules to ignore
+STRING, which may make it appear incongruous in situ (unless
+preformatted or anticipated by third-party members of the various
+modification hooks)."
   (when string
     (with-current-buffer (or buffer (process-buffer erc-server-process))
       (let ((insert-position (marker-position erc-insert-marker)))
@@ -2927,11 +3055,13 @@ If STRING is nil, the function does nothing."
             (when (erc-string-invisible-p string)
               (erc-put-text-properties 0 (length string)
                                        '(invisible intangible) string)))
-          (erc-log (concat "erc-display-line: " string
+          (erc-log (concat "erc-display-message: " string
                            (format "(%S)" string) " in buffer "
                            (format "%s" buffer)))
           (setq erc-insert-this t)
           (run-hook-with-args 'erc-insert-pre-hook string)
+          (setq insert-position (marker-position (or erc--insert-marker
+                                                     erc-insert-marker)))
           (if (null erc-insert-this)
               ;; Leave erc-insert-this set to t as much as possible.  Fran
               ;; Litterio <franl> has seen erc-insert-this set to nil while
@@ -2951,10 +3081,17 @@ If STRING is nil, the function does nothing."
                   (run-hooks 'erc-insert-post-hook)
                   (when erc-remove-parsed-property
                     (remove-text-properties (point-min) (point-max)
-                                            '(erc-parsed nil))))
+                                            '(erc-parsed nil tags nil)))
+                  (cl-assert (> (- (point-max) (point-min)) 1))
+                  (let ((props (if erc--msg-props
+                                   (erc--order-text-properties-from-hash
+                                    erc--msg-props)
+                                 '(erc-msg unknown))))
+                    (add-text-properties (point-min) (1+ (point-min)) props)))
                 (erc--refresh-prompt)))))
         (run-hooks 'erc-insert-done-hook)
-        (erc-update-undo-list (- (or (marker-position erc-insert-marker)
+        (erc-update-undo-list (- (or (marker-position (or erc--insert-marker
+                                                          erc-insert-marker))
                                      (point-max))
                                  insert-position))))))
 
@@ -2988,39 +3125,45 @@ If STRING is nil, the function does nothing."
   "Check if NICK is a valid IRC nickname."
   (string-match (concat "\\`" erc-valid-nick-regexp "\\'") nick))
 
-(defun erc-display-line (string &optional buffer)
-  "Display STRING in the ERC BUFFER.
-All screen output must be done through this function.  If BUFFER is nil
-or omitted, the default ERC buffer for the `erc-session-server' is used.
-The BUFFER can be an actual buffer, a list of buffers, `all' or `active'.
-If BUFFER = `all', the string is displayed in all the ERC buffers for the
-current session.  `active' means the current active buffer
-\(`erc-active-buffer').  If the buffer can't be resolved, the current
-buffer is used.  `erc-display-line-1' is used to display STRING.
-
-If STRING is nil, the function does nothing."
-  (let (new-bufs)
+(defun erc--route-insertion (string buffer)
+  "Insert STRING in BUFFER.
+See `erc-display-message' for acceptable BUFFER types."
+  (let (seen msg-props)
     (dolist (buf (cond
                   ((bufferp buffer) (list buffer))
-                  ((listp buffer) buffer)
+                  ((consp buffer)
+                   (setq msg-props erc--msg-props)
+                   buffer)
                   ((processp buffer) (list (process-buffer buffer)))
                   ((eq 'all buffer)
                    ;; Hmm, or all of the same session server?
                    (erc-buffer-list nil erc-server-process))
-                  ((and (eq 'active buffer) (erc-active-buffer))
-                   (list (erc-active-buffer)))
+                  ((and-let* (((eq 'active buffer))
+                              (b (erc-active-buffer)))
+                        (list b)))
                   ((erc-server-buffer-live-p)
                    (list (process-buffer erc-server-process)))
                   (t (list (current-buffer)))))
       (when (buffer-live-p buf)
-        (erc-display-line-1 string buf)
-        (push buf new-bufs)))
-    (when (null new-bufs)
-      (erc-display-line-1 string (if (erc-server-buffer-live-p)
-                                     (process-buffer erc-server-process)
-                                   (current-buffer))))))
-
-(defvar erc--compose-text-properties nil
+        (when msg-props
+          (setq erc--msg-props (copy-hash-table msg-props)))
+        (erc-insert-line string buf)
+        (setq seen t)))
+    (unless (or seen (null buffer))
+      (erc--route-insertion string nil))))
+
+(defun erc-display-line (string &optional buffer)
+  "Insert STRING in BUFFER as a plain \"local\" message.
+Take pains to ensure modification hooks see messages created by
+the old pattern (erc-display-line (erc-make-notice) my-buffer) as
+being equivalent to a `erc-display-message' TYPE of `notice'."
+  (let ((erc--msg-prop-overrides erc--msg-prop-overrides))
+    (when (eq 'erc-notice-face (get-text-property 0 'font-lock-face string))
+      (unless (assq 'erc-msg erc--msg-prop-overrides)
+        (push '(erc-msg . notice) erc--msg-prop-overrides)))
+    (erc-display-message nil nil buffer string)))
+
+(defvar erc--merge-text-properties-p nil
   "Non-nil when `erc-put-text-property' defers to `erc--merge-prop'.")
 
 ;; To save space, we could maintain a map of all readable property
@@ -3048,6 +3191,30 @@ value.  See also `erc-button-add-face'."
             old (get-text-property pos prop object)
             end (next-single-property-change pos prop object to)))))
 
+(defun erc--remove-from-prop-value-list (from to prop val &optional object)
+  "Remove VAL from text prop value between FROM and TO.
+If current value is VAL itself, remove the property entirely.
+When VAL is a list, act as if this function were called
+repeatedly with VAL set to each of VAL's members."
+  (let ((old (get-text-property from prop object))
+        (pos from)
+        (end (next-single-property-change from prop object to))
+        new)
+    (while (< pos to)
+      (when old
+        (if (setq new (and (consp old) (if (consp val)
+                                           (seq-difference old val)
+                                         (remq val old))))
+            (put-text-property pos end prop
+                               (if (cdr new) new (car new)) object)
+          (when (pcase val
+                  ((pred consp) (or (consp old) (memq old val)))
+                  (_ (if (consp old) (memq val old) (eq old val))))
+            (remove-text-properties pos end (list prop nil) object))))
+      (setq pos end
+            old (get-text-property pos prop object)
+            end (next-single-property-change pos prop object to)))))
+
 (defvar erc-legacy-invisible-bounds-p nil
   "Whether to hide trailing rather than preceding newlines.
 Beginning in ERC 5.6, invisibility extends from a message's
@@ -3057,7 +3224,11 @@ preceding newline to its last non-newline character.")
 
 (defun erc--hide-message (value)
   "Apply `invisible' text-property with VALUE to current message.
-Expect to run in a narrowed buffer during message insertion."
+Expect to run in a narrowed buffer during message insertion.
+Begin the invisible interval at the previous message's trailing
+newline and end before the current message's.  If the preceding
+message ends in a double newline or there is no previous message,
+don't bother including the preceding newline."
   (if erc-legacy-invisible-bounds-p
       ;; Before ERC 5.6, this also used to add an `intangible'
       ;; property, but the docs say it's now obsolete.
@@ -3066,8 +3237,25 @@ Expect to run in a narrowed buffer during message 
insertion."
           (end (point-max)))
       (save-restriction
         (widen)
+        (when (or (<= beg 4) (= ?\n (char-before (- beg 2))))
+          (cl-incf beg))
         (erc--merge-prop (1- beg) (1- end) 'invisible value)))))
 
+(defvar erc--ranked-properties '(erc-msg erc-ts erc-cmd))
+
+(defun erc--order-text-properties-from-hash (table)
+  "Return a plist of text props from items in TABLE.
+Ensure props in `erc--ranked-properties' appear last and in
+reverse order so they end up sorted in buffer interval plists for
+retrieval by `text-properties-at' and friends."
+  (let (out)
+    (dolist (k erc--ranked-properties)
+      (when-let ((v (gethash k table)))
+        (remhash k table)
+        (setq out (nconc (list k v) out))))
+    (maphash (lambda (k v) (setq out (nconc (list k v) out))) table)
+    out))
+
 (defun erc-display-message-highlight (type string)
   "Highlight STRING according to TYPE, where erc-TYPE-face is an ERC face.
 
@@ -3281,30 +3469,76 @@ returns non-nil."
 (defun erc-display-message (parsed type buffer msg &rest args)
   "Display MSG in BUFFER.
 
-ARGS, PARSED, and TYPE are used to format MSG sensibly.
+Insert MSG or text derived from MSG into an ERC buffer, possibly
+after applying formatting by way of either a `format-spec' known
+to a message-catalog entry or a TYPE known to a specialized
+string handler.  Additionally, derive metadata, faces, and other
+text properties from the various overloaded parameters, such as
+PARSED, when it's an `erc-response' object, and MSG, when it's a
+key (symbol) for a \"message catalog\" entry.  Expect ARGS, when
+applicable, to be `format-spec' args known to such an entry, and
+TYPE, when non-nil, to be a symbol handled by
+`erc-display-message-highlight' (necessarily accompanied by a
+string MSG).  Expect BUFFER to be among the sort accepted by the
+function `erc-display-line'.
+
+Expect BUFFER to be a live `erc-mode' buffer, a list of such
+buffers, or the symbols `all' or `active'.  If `all', insert
+STRING in all buffers for the current session.  If `active',
+defer to the function `erc-active-buffer', which may return the
+session's server buffer if the previously active buffer has been
+killed.  If BUFFER is nil or a network process, pretend it's set
+to the appropriate server buffer.  Otherwise, use the current
+buffer.
 
 When TYPE is a list of symbols, call handlers from left to right
 without influencing how they behave when encountering existing
 faces.  As of ERC 5.6, expect a TYPE of (notice error) to insert
 MSG with `font-lock-face' as `erc-error-face' throughout.
 However, when the list of symbols begins with t, tell compatible
-handlers to compose rather than clobber faces.  For example, as
-of ERC 5.6, expect a TYPE of (t notice error) to result in MSG's
-`font-lock-face' being (erc-error-face erc-notice-face)
-throughout when `erc-notice-highlight-type' is set to its default
-`all'.
-
-See also `erc-format-message' and `erc-display-line'."
+handlers to compose rather than clobber faces.  For example,
+expect a TYPE of (t notice error) to result in `font-lock-face'
+being (erc-error-face erc-notice-face) throughout MSG when
+`erc-notice-highlight-type' is left at its default, `all'.
+
+As of ERC 5.6, assume third-party code will use this function
+instead of lower-level ones, like `erc-insert-line', when needing
+ERC to process arbitrary informative messages as if they'd been
+sent from a server.  That is, guarantee \"local\" messages, for
+which PARSED is typically nil, will be subject to buttonizing,
+filling, and other effects."
   (let ((string (if (symbolp msg)
                     (apply #'erc-format-message msg args)
                   msg))
+        (erc--msg-props
+         (or erc--msg-props
+             (let ((table (make-hash-table :size 5))
+                   (cmd (and parsed (erc--get-eq-comparable-cmd
+                                     (erc-response.command parsed)))))
+               (puthash 'erc-msg
+                        (cond ((and msg (symbolp msg)) msg)
+                              ((and cmd (memq cmd '(PRIVMSG NOTICE)) 'msg))
+                              (type (pcase type
+                                      ((pred symbolp) type)
+                                      ((pred listp)
+                                       (intern (mapconcat #'prin1-to-string
+                                                          type "-")))
+                                      (_ 'unknown)))
+                              (t 'unknown))
+                        table)
+               (when cmd
+                 (puthash 'erc-cmd cmd table))
+               (and erc--msg-prop-overrides
+                    (pcase-dolist (`(,k . ,v) erc--msg-prop-overrides)
+                      (puthash k v table)))
+               table)))
         (erc-message-parsed parsed))
     (setq string
           (cond
            ((null type)
             string)
            ((listp type)
-            (let ((erc--compose-text-properties
+            (let ((erc--merge-text-properties-p
                    (and (eq (car type) t) (setq type (cdr type)))))
               (dolist (type type)
                 (setq string (erc-display-message-highlight type string))))
@@ -3313,16 +3547,13 @@ See also `erc-format-message' and `erc-display-line'."
             (erc-display-message-highlight type string))))
 
     (if (not (erc-response-p parsed))
-        (erc-display-line string buffer)
+        (erc--route-insertion string buffer)
       (unless (erc-hide-current-message-p parsed)
         (erc-put-text-property 0 (length string) 'erc-parsed parsed string)
-        (put-text-property
-         0 (length string) 'erc-command
-         (erc--get-eq-comparable-cmd (erc-response.command parsed)) string)
        (when (erc-response.tags parsed)
          (erc-put-text-property 0 (length string) 'tags (erc-response.tags 
parsed)
                                 string))
-       (erc-display-line string buffer)))))
+        (erc--route-insertion string buffer)))))
 
 (defun erc-message-type-member (position list)
   "Return non-nil if the erc-parsed text-property at POSITION is in LIST.
@@ -3587,16 +3818,14 @@ If no USER argument is specified, list the contents of 
`erc-ignore-list'."
             (run-at-time timeout nil
                          (lambda ()
                            (erc--unignore-user user buffer))))
-          (erc-display-line
-           (erc-make-notice (format "Now ignoring %s" user))
-           'active)
+          (erc-display-message nil 'notice 'active
+                               (format "Now ignoring %s" user))
           (erc-with-server-buffer (add-to-list 'erc-ignore-list user))))
     (if (null (erc-with-server-buffer erc-ignore-list))
-        (erc-display-line (erc-make-notice "Ignore list is empty") 'active)
-      (erc-display-line (erc-make-notice "Ignore list:") 'active)
+        (erc-display-message nil 'notice 'active "Ignore list is empty")
+      (erc-display-message nil 'notice 'active "Ignore list:")
       (mapc (lambda (item)
-              (erc-display-line (erc-make-notice item)
-                             'active))
+              (erc-display-message nil 'notice 'active item))
             (erc-with-server-buffer erc-ignore-list))))
   t)
 
@@ -3610,9 +3839,8 @@ If no USER argument is specified, list the contents of 
`erc-ignore-list'."
           (unless (y-or-n-p (format "Remove this regexp (%s)? "
                                     ignored-nick))
             (setq ignored-nick nil))
-        (erc-display-line
-         (erc-make-notice (format "%s is not currently ignored!" user))
-         'active)))
+        (erc-display-message nil 'notice 'active
+                             (format "%s is not currently ignored!" user))))
     (when ignored-nick
       (erc--unignore-user user (current-buffer))))
   t)
@@ -3620,9 +3848,8 @@ If no USER argument is specified, list the contents of 
`erc-ignore-list'."
 (defun erc--unignore-user (user buffer)
   (when (buffer-live-p buffer)
     (with-current-buffer buffer
-      (erc-display-line
-       (erc-make-notice (format "No longer ignoring %s" user))
-       'active)
+      (erc-display-message nil 'notice 'active
+                           (format "No longer ignoring %s" user))
       (erc-with-server-buffer
         (setq erc-ignore-list (delete user erc-ignore-list))))))
 
@@ -4107,12 +4334,10 @@ See `erc-cmd-WHOIS' for more details."
                             (string-to-number
                              (cl-third
                               (erc-response.command-args parsed)))))
-                       (erc-display-line
-                        (erc-make-notice
+                       (erc-display-message nil 'notice origbuf
                          (format "%s has been idle for %s."
                                  (erc-string-no-properties nick)
                                  (erc-seconds-to-string idleseconds)))
-                        origbuf)
                        t)))
                   'erc-server-317-functions)
             symlist)
@@ -4416,10 +4641,7 @@ the message given by REASON."
     ;; kill them
     (run-at-time
      4 nil
-     (lambda ()
-       (dolist (buffer (erc-buffer-list (lambda (buf)
-                                          (not (erc-server-buffer-p buf)))))
-         (kill-buffer buffer)))))
+     #'erc-buffer-do (lambda () (when erc--target (kill-buffer)))))
   t)
 
 (defalias 'erc-cmd-GQ #'erc-cmd-GQUIT)
@@ -4661,8 +4883,7 @@ The ban list is fetched from the server if necessary."
 
     (cond
      ((not (erc-channel-p chnl))
-      (erc-display-line (erc-make-notice "You're not on a channel\n")
-                        'active))
+      (erc-display-message nil 'notice 'active "You're not on a channel\n"))
 
      ((not (get 'erc-channel-banlist 'received-from-server))
       (let ((old-367-hook erc-server-367-functions))
@@ -4681,9 +4902,8 @@ The ban list is fetched from the server if necessary."
           (erc-server-send (format "MODE %s b" chnl)))))
 
      ((null erc-channel-banlist)
-      (erc-display-line (erc-make-notice
-                         (format "No bans for channel: %s\n" chnl))
-                        'active)
+      (erc-display-message nil 'notice 'active
+                           (format "No bans for channel: %s\n" chnl))
       (put 'erc-channel-banlist 'received-from-server nil))
 
      (t
@@ -4697,10 +4917,9 @@ The ban list is fetched from the server if necessary."
                    "%-" (number-to-string (/ erc-fill-column 2)) "s"
                    "%" (number-to-string (/ erc-fill-column 2)) "s")))
 
-        (erc-display-line
-         (erc-make-notice (format "Ban list for channel: %s\n"
-                                  (erc-default-target)))
-         'active)
+        (erc-display-message
+         nil 'notice 'active
+         (format "Ban list for channel: %s\n" (erc-default-target)))
 
         (erc-display-line separator 'active)
         (erc-display-line (format fmt "Ban Mask" "Banned By") 'active)
@@ -4717,8 +4936,7 @@ The ban list is fetched from the server if necessary."
             'active))
          erc-channel-banlist)
 
-        (erc-display-line (erc-make-notice "End of Ban list")
-                          'active)
+        (erc-display-message nil 'notice 'active "End of Ban list")
         (put 'erc-channel-banlist 'received-from-server nil)))))
   t)
 
@@ -4732,9 +4950,7 @@ Unban all currently banned users in the current channel."
     (cond
 
      ((not (erc-channel-p chnl))
-      (erc-display-line
-       (erc-make-notice "You're not on a channel\n")
-       'active))
+      (erc-display-message nil 'notice 'active "You're not on a channel\n"))
 
      ((not (get 'erc-channel-banlist 'received-from-server))
       (let ((old-367-hook erc-server-367-functions))
@@ -4781,6 +4997,7 @@ Eventually add a # in front of it, if that turns it into 
a valid channel name."
      rear-nonsticky erc-prompt field front-sticky read-only
      ;; stamp
      cursor-intangible cursor-sensor-functions isearch-open-invisible
+     erc-stamp-type
      ;; match
      invisible intangible
      ;; button
@@ -5263,15 +5480,13 @@ and as second argument the event parsed as a vector."
   (and (erc-is-message-ctcp-p message)
        (not (string-match "^\C-aACTION.*\C-a$" message))))
 
-(define-inline erc--get-speaker-bounds ()
-  "Return the bounds of `erc-speaker' property when present.
+(defun erc--get-speaker-bounds ()
+  "Return the bounds of `erc-speaker' text property when present.
 Assume buffer is narrowed to the confines of an inserted message."
-  (inline-quote
-   (and-let*
-       (((memq (get-text-property (point) 'erc-command) '(PRIVMSG NOTICE)))
-        (beg (or (and (get-text-property (point-min) 'erc-speaker) (point-min))
-                 (next-single-property-change (point-min) 'erc-speaker))))
-     (cons beg (next-single-property-change beg 'erc-speaker)))))
+  (and-let* (((erc--check-msg-prop 'erc-msg 'msg))
+             (beg (text-property-not-all (point-min) (point-max)
+                                         'erc-speaker nil)))
+    (cons beg (next-single-property-change beg 'erc-speaker))))
 
 (defvar erc--cmem-from-nick-function #'erc--cmem-get-existing
   "Function maybe returning a \"channel member\" cons from a nick.
@@ -5529,9 +5744,7 @@ See also: `erc-echo-notice-in-user-buffers',
         (erc-load-script f)))))
 
 (defun erc-connection-established (proc parsed)
-  "Run just after connection.
-
-Set user modes and run `erc-after-connect' hook."
+  "Set user mode and run `erc-after-connect' hook in server buffer."
   (with-current-buffer (process-buffer proc)
     (unless erc-server-connected ; only once per session
       (let ((server (or erc-server-announced-name
@@ -5550,14 +5763,11 @@ Set user modes and run `erc-after-connect' hook."
         (erc-update-mode-line)
         (erc-set-initial-user-mode nick buffer)
         (erc-server-setup-periodical-ping buffer)
-        (run-hook-with-args 'erc-after-connect server nick))))
-
-  (when erc-unhide-query-prompt
-    (erc-with-all-buffers-of-server proc
-      nil ; FIXME use `erc--target' after bug#48598
-      (when (and (erc-default-target)
-                 (not (erc-channel-p (car erc-default-recipients))))
-        (erc--unhide-prompt)))))
+        (when erc-unhide-query-prompt
+          (erc-with-all-buffers-of-server erc-server-process nil
+            (when (and erc--target (not (erc--target-channel-p erc--target)))
+              (erc--unhide-prompt))))
+        (run-hook-with-args 'erc-after-connect server nick)))))
 
 (defun erc-set-initial-user-mode (nick buffer)
   "If `erc-user-mode' is non-nil for NICK, set the user modes.
@@ -5593,11 +5803,8 @@ See also `erc-display-message'."
         (while queries
           (let* ((type (upcase (car (split-string (car queries)))))
                  (hook (intern-soft (concat "erc-ctcp-query-" type "-hook")))
-                 (erc-insert-pre-hook
-                  (cons (lambda (s)
-                          (put-text-property 0 (1- (length s)) 'erc-ctcp
-                                             (intern type) s))
-                        erc-insert-pre-hook)))
+                 (erc--msg-prop-overrides `((erc-msg . msg)
+                                            (erc-ctcp . ,(intern type)))))
             (if (and hook (boundp hook))
                 (if (string-equal type "ACTION")
                     (run-hook-with-args-until-success
@@ -6323,7 +6530,7 @@ OBJECT is modified without being copied first.
 
 You can redefine or `defadvice' this function in order to add
 EmacsSpeak support."
-  (if erc--compose-text-properties
+  (if erc--merge-text-properties-p
       (erc--merge-prop start end property value object)
     (put-text-property start end property value object)))
 
@@ -6602,7 +6809,8 @@ ERC prints them as a single message joined by newlines.")
             (when-let (((not (erc--input-split-abortp state)))
                        (inhibit-read-only t)
                        (old-buf (current-buffer)))
-              (progn ; unprogn this during next major surgery
+              (let ((erc--msg-prop-overrides '((erc-cmd . PRIVMSG)
+                                               (erc-msg . msg))))
                 (erc-set-active-buffer (current-buffer))
                 ;; Kill the input and the prompt
                 (delete-region erc-input-marker (erc-end-of-input-line))
@@ -6749,17 +6957,24 @@ Return non-nil only if we actually send anything."
     (save-excursion
       (erc--assert-input-bounds)
       (let ((insert-position (marker-position (goto-char erc-insert-marker)))
+            (erc--msg-props (or erc--msg-props
+                                (map-into (cons '(erc-msg . self)
+                                                erc--msg-prop-overrides)
+                                          'hash-table)))
             beg)
         (insert (erc-format-my-nick))
         (setq beg (point))
         (insert line)
         (erc-put-text-property beg (point) 'font-lock-face 'erc-input-face)
-        (erc-put-text-property insert-position (point) 'erc-command 'PRIVMSG)
         (insert "\n")
         (save-restriction
           (narrow-to-region insert-position (point))
           (run-hooks 'erc-send-modify-hook)
-          (run-hooks 'erc-send-post-hook))
+          (run-hooks 'erc-send-post-hook)
+          (cl-assert (> (- (point-max) (point-min)) 1))
+          (add-text-properties (point-min) (1+ (point-min))
+                               (erc--order-text-properties-from-hash
+                                erc--msg-props)))
         (erc--refresh-prompt)))))
 
 (defun erc-command-symbol (command)
@@ -6840,28 +7055,16 @@ See also `erc-downcase'."
 ;; default target handling
 
 (defun erc--current-buffer-joined-p ()
-  "Return whether the current target buffer is joined."
-  ;; This may be a reliable means of detecting subscription status,
-  ;; but it's also roundabout and awkward.  Perhaps it's worth
-  ;; discussing adding a joined slot to `erc--target' for this.
+  "Return non-nil if the current buffer is a channel and is joined."
   (cl-assert erc--target)
   (and (erc--target-channel-p erc--target)
-       (erc-get-channel-user (erc-current-nick)) t))
-
-;; While `erc-default-target' happens to return nil in channel buffers
-;; you've parted or from which you've been kicked, using it to detect
-;; whether a channel is currently joined may become unreliable in the
-;; future.  For now, third-party code can use
-;;
-;;   (erc-get-channel-user (erc-current-nick))
-;;
-;; A predicate may be provided eventually.  For retrieving a target's
-;; name regardless of subscription or connection status, new library
-;; code should use `erc--default-target'.  Third-party code should
-;; continue to use `erc-default-target'.
+       (erc--target-channel-joined-p erc--target)
+       t))
 
 (defun erc-default-target ()
-  "Return the current default target (as a character string) or nil if none."
+  "Return the current channel or query target, if any.
+For historical reasons, return nil in channel buffers if not
+currently joined."
   (let ((tgt (car erc-default-recipients)))
     (cond
      ((not tgt) nil)
@@ -7423,15 +7626,14 @@ If it doesn't exist, create it."
   (unless (file-attributes dir) (make-directory dir))
   (or (file-accessible-directory-p dir) (error "Cannot access %s" dir)))
 
+;; FIXME make function obsolete or alias to something less confusing.
 (defun erc-kill-query-buffers (process)
-  "Kill all buffers of PROCESS.
-Does nothing if PROCESS is not a process object."
+  "Kill all target buffers of PROCESS, including channel buffers.
+Do nothing if PROCESS is not a process object."
   ;; here, we only want to match the channel buffers, to avoid
   ;; "selecting killed buffers" b0rkage.
   (when (processp process)
-    (erc-with-all-buffers-of-server process
-      (lambda ()
-       (not (erc-server-buffer-p)))
+    (erc-with-all-buffers-of-server process (lambda () erc--target)
       (kill-buffer (current-buffer)))))
 
 (defun erc-nick-at-point ()
@@ -8089,6 +8291,7 @@ See also `kill-buffer'."
   :group 'erc-hooks
   :type 'hook)
 
+;; FIXME alias and deprecate current *-function suffixed name.
 (defun erc-kill-buffer-function ()
   "Function to call when an ERC buffer is killed.
 This function should be on `kill-buffer-hook'.
@@ -8102,7 +8305,7 @@ or `erc-kill-buffer-hook' if any other buffer."
     (cond
      ((eq (erc-server-buffer) (current-buffer))
       (run-hooks 'erc-kill-server-hook))
-     ((erc-channel-p (or (erc-default-target) (buffer-name)))
+     ((erc--target-channel-p erc--target)
       (run-hooks 'erc-kill-channel-hook))
      (t
       (run-hooks 'erc-kill-buffer-hook)))))
@@ -8147,8 +8350,8 @@ This function should be on `erc-kill-channel-hook'."
   (text-property-not-all (point-min) (point-max) 'erc-parsed nil))
 
 (defun erc-restore-text-properties ()
-  "Restore the property `erc-parsed' for the region."
-  (when-let* ((parsed-posn (erc-find-parsed-property))
+  "Ensure the `erc-parsed' and `tags' props cover the entire message."
+  (when-let ((parsed-posn (erc-find-parsed-property))
               (found (erc-get-parsed-vector parsed-posn)))
     (put-text-property (point-min) (point-max) 'erc-parsed found)
     (when-let ((tags (get-text-property parsed-posn 'tags)))
@@ -8177,7 +8380,7 @@ This function should be on `erc-kill-channel-hook'."
 See also `erc-message-type'."
   ;; IRC numerics are three-digit numbers, possibly with leading 0s.
   ;; To invert: (if (numberp o) (format "%03d" o) (symbol-name o))
-  (if-let* ((n (string-to-number command)) ((zerop n))) (intern command) n))
+  (if-let ((n (string-to-number command)) ((zerop n))) (intern command) n))
 
 ;; Teach url.el how to open irc:// URLs with ERC.
 ;; To activate, customize `url-irc-function' to `url-irc-erc'.
diff --git a/lisp/eshell/em-cmpl.el b/lisp/eshell/em-cmpl.el
index 61f1237b907..0255da88dbd 100644
--- a/lisp/eshell/em-cmpl.el
+++ b/lisp/eshell/em-cmpl.el
@@ -377,7 +377,8 @@ to writing a completion function."
                 (throw 'pcompleted (elisp-completion-at-point)))
                (t
                 (eshell--pcomplete-insert-tab)))))
-    (when (get-text-property (1- end) 'comment)
+    (when (and (< begin end)
+               (get-text-property (1- end) 'comment))
       (eshell--pcomplete-insert-tab))
     (let ((pos (1- end)))
       (while (>= pos begin)
diff --git a/lisp/eshell/em-extpipe.el b/lisp/eshell/em-extpipe.el
index 5c9a0a85934..0d5c217f5f0 100644
--- a/lisp/eshell/em-extpipe.el
+++ b/lisp/eshell/em-extpipe.el
@@ -118,86 +118,87 @@ as though it were Eshell syntax."
   ;; other members of `eshell-parse-argument-hook'.  We must avoid
   ;; misinterpreting a quoted `*|', `*<' or `*>' as indicating an
   ;; external pipeline, hence the structure of the loop in `findbeg1'.
-  (cl-flet
-      ((findbeg1 (pat &optional go (bound (point-max)))
-         (let* ((start (point))
-                (result
-                 (catch 'found
-                   (while (> bound (point))
-                     (let* ((found
-                             (save-excursion
-                               (re-search-forward
-                                "\\(?:#?'\\|\"\\|\\\\\\)" bound t)))
-                            (next (or (and found (match-beginning 0))
-                                      bound)))
-                       (if (re-search-forward pat next t)
-                           (throw 'found (match-beginning 1))
-                         (goto-char next)
-                         (while (eshell-extpipe--or-with-catch
-                                 (eshell-parse-lisp-argument)
-                                 (eshell-parse-backslash)
-                                 (eshell-parse-double-quote)
-                                 (eshell-parse-literal-quote)))
-                         ;; Guard against an infinite loop if none of
-                         ;; the parsers moved us forward.
-                         (unless (or (> (point) next) (eobp))
-                           (forward-char 1))))))))
-           (goto-char (if (and result go) (match-end 0) start))
-           result)))
-    (unless (or eshell-current-argument eshell-current-quoted)
-      (let ((beg (point)) end
-            (next-marked (findbeg1 "\\(?:\\=\\|\\s-\\)\\(\\*[|<>]\\)"))
-            (next-unmarked
-             (or (findbeg1 "\\(?:\\=\\|[^*]\\|\\S-\\*\\)\\(|\\)")
-                 (point-max))))
-        (when (and next-marked (> next-unmarked next-marked)
-                   (or (> next-marked (point))
-                       (looking-back "\\`\\|\\s-" nil)))
-          ;; Skip to the final segment of the external pipeline.
-          (while (findbeg1 "\\(?:\\=\\|\\s-\\)\\(\\*|\\)" t))
-          ;; Find output redirections.
-          (while (findbeg1
-                  "\\([0-9]?>+&?[0-9]?\\s-*\\S-\\)" t next-unmarked)
-            ;; Is the output redirection Eshell-specific?  We have our
-            ;; own logic, rather than calling `eshell-parse-argument',
-            ;; to avoid specifying here all the possible cars of
-            ;; parsed special references -- `get-buffer-create' etc.
-            (forward-char -1)
-            (let ((this-end
-                   (save-match-data
-                     (cond ((looking-at "#<")
-                            (forward-char 1)
-                            (1+ (eshell-find-delimiter ?\< ?\>)))
-                           ((and (looking-at "/\\S-+")
-                                 (assoc (match-string 0)
-                                        eshell-virtual-targets))
-                            (match-end 0))))))
-              (cond ((and this-end end)
-                     (goto-char this-end))
-                    (this-end
-                     (goto-char this-end)
-                     (setq end (match-beginning 0)))
-                    (t
-                     (setq end nil)))))
-          ;; We've moved past all Eshell-specific output redirections
-          ;; we could find.  If there is only whitespace left, then
-          ;; `end' is right before redirections we should exclude;
-          ;; otherwise, we must include everything.
-          (unless (and end (skip-syntax-forward "\s" next-unmarked)
-                       (= next-unmarked (point)))
-            (setq end next-unmarked))
-          (let ((cmd (string-trim
-                      (buffer-substring-no-properties beg end))))
-            (goto-char end)
-            ;; We must now drop the asterisks, unless quoted/escaped.
-            (with-temp-buffer
-              (insert cmd)
-              (goto-char (point-min))
-              (cl-loop
-               for next = (findbeg1 "\\(?:\\=\\|\\s-\\)\\(\\*[|<>]\\)" t)
-               while next do (forward-char -2) (delete-char 1))
-              (eshell-finish-arg
-               `(eshell-external-pipeline ,(buffer-string))))))))))
+  (unless eshell-current-argument-plain
+    (cl-flet
+        ((findbeg1 (pat &optional go (bound (point-max)))
+           (let* ((start (point))
+                  (result
+                   (catch 'found
+                     (while (> bound (point))
+                       (let* ((found
+                               (save-excursion
+                                 (re-search-forward
+                                  "\\(?:#?'\\|\"\\|\\\\\\)" bound t)))
+                              (next (or (and found (match-beginning 0))
+                                        bound)))
+                         (if (re-search-forward pat next t)
+                             (throw 'found (match-beginning 1))
+                           (goto-char next)
+                           (while (eshell-extpipe--or-with-catch
+                                   (eshell-parse-lisp-argument)
+                                   (eshell-parse-backslash)
+                                   (eshell-parse-double-quote)
+                                   (eshell-parse-literal-quote)))
+                           ;; Guard against an infinite loop if none of
+                           ;; the parsers moved us forward.
+                           (unless (or (> (point) next) (eobp))
+                             (forward-char 1))))))))
+             (goto-char (if (and result go) (match-end 0) start))
+             result)))
+      (unless (or eshell-current-argument eshell-current-quoted)
+        (let ((beg (point)) end
+              (next-marked (findbeg1 "\\(?:\\=\\|\\s-\\)\\(\\*[|<>]\\)"))
+              (next-unmarked
+               (or (findbeg1 "\\(?:\\=\\|[^*]\\|\\S-\\*\\)\\(|\\)")
+                   (point-max))))
+          (when (and next-marked (> next-unmarked next-marked)
+                     (or (> next-marked (point))
+                         (looking-back "\\`\\|\\s-" nil)))
+            ;; Skip to the final segment of the external pipeline.
+            (while (findbeg1 "\\(?:\\=\\|\\s-\\)\\(\\*|\\)" t))
+            ;; Find output redirections.
+            (while (findbeg1
+                    "\\([0-9]?>+&?[0-9]?\\s-*\\S-\\)" t next-unmarked)
+              ;; Is the output redirection Eshell-specific?  We have our
+              ;; own logic, rather than calling `eshell-parse-argument',
+              ;; to avoid specifying here all the possible cars of
+              ;; parsed special references -- `get-buffer-create' etc.
+              (forward-char -1)
+              (let ((this-end
+                     (save-match-data
+                       (cond ((looking-at "#<")
+                              (forward-char 1)
+                              (1+ (eshell-find-delimiter ?\< ?\>)))
+                             ((and (looking-at "/\\S-+")
+                                   (assoc (match-string 0)
+                                          eshell-virtual-targets))
+                              (match-end 0))))))
+                (cond ((and this-end end)
+                       (goto-char this-end))
+                      (this-end
+                       (goto-char this-end)
+                       (setq end (match-beginning 0)))
+                      (t
+                       (setq end nil)))))
+            ;; We've moved past all Eshell-specific output redirections
+            ;; we could find.  If there is only whitespace left, then
+            ;; `end' is right before redirections we should exclude;
+            ;; otherwise, we must include everything.
+            (unless (and end (skip-syntax-forward "\s" next-unmarked)
+                         (= next-unmarked (point)))
+              (setq end next-unmarked))
+            (let ((cmd (string-trim
+                        (buffer-substring-no-properties beg end))))
+              (goto-char end)
+              ;; We must now drop the asterisks, unless quoted/escaped.
+              (with-temp-buffer
+                (insert cmd)
+                (goto-char (point-min))
+                (cl-loop
+                 for next = (findbeg1 "\\(?:\\=\\|\\s-\\)\\(\\*[|<>]\\)" t)
+                 while next do (forward-char -2) (delete-char 1))
+                (eshell-finish-arg
+                 `(eshell-external-pipeline ,(buffer-string)))))))))))
 
 (defun eshell-rewrite-external-pipeline (terms)
   "Rewrite an external pipeline in TERMS as parsed by
diff --git a/lisp/eshell/esh-arg.el b/lisp/eshell/esh-arg.el
index e7b5eef11db..2bdfdff8a3a 100644
--- a/lisp/eshell/esh-arg.el
+++ b/lisp/eshell/esh-arg.el
@@ -49,6 +49,8 @@ yield the values intended."
 (defvar eshell-arg-listified nil)
 (defvar eshell-nested-argument nil)
 (defvar eshell-current-quoted nil)
+(defvar eshell-current-argument-plain nil
+  "If non-nil, the current argument is \"plain\", and not part of a command.")
 (defvar eshell-inside-quote-regexp nil)
 (defvar eshell-outside-quote-regexp nil)
 
@@ -163,6 +165,43 @@ treated as a literal character."
   :type 'hook
   :group 'eshell-arg)
 
+(defvar eshell-special-ref-alist
+  '(("buffer"
+     (creation-function   eshell-get-buffer)
+     (insertion-function  eshell-insert-buffer-name)
+     (completion-function eshell-complete-buffer-ref))
+    ("marker"
+     (creation-function   eshell-get-marker)
+     (insertion-function  eshell-insert-marker)
+     (completion-function eshell-complete-marker-ref)))
+  "Alist of special reference types for Eshell.
+Each entry is a list of the form (TYPE (KEY VALUE)...).  TYPE is
+the name of the special reference type, and each KEY/VALUE pair
+represents a parameter for the type.  Eshell defines the
+following KEYs:
+
+* `creation-function'
+  A function taking any number of arguments that returns the Lisp
+  object for this special ref type.
+
+* `insertion-function'
+  An interactive function that returns the special reference in
+  string form.  This string should look like \"#<TYPE ARG...>\";
+  Eshell will pass the ARGs to `creation-function'.
+
+* `completion-function'
+  A function using Pcomplete to perform completion on any
+  arguments necessary for creating this special reference type.")
+
+(defcustom eshell-special-ref-default "buffer"
+  "The default type for special references when the type keyword is omitted.
+This should be a key in `eshell-special-ref-alist' (which see).
+Eshell will expand special refs like \"#<ARG...>\" into
+\"#<`eshell-special-ref-default' ARG...>\"."
+  :version "30.1"
+  :type 'string
+  :group 'eshell-arg)
+
 (defvar-keymap eshell-arg-mode-map
   "C-c M-b" #'eshell-insert-buffer-name)
 
@@ -184,11 +223,6 @@ treated as a literal character."
     (add-hook 'pcomplete-try-first-hook
               #'eshell-complete-special-reference nil t)))
 
-(defun eshell-insert-buffer-name (buffer-name)
-  "Insert BUFFER-NAME into the current buffer at point."
-  (interactive "BName of buffer: ")
-  (insert-and-inherit "#<buffer " buffer-name ">"))
-
 (defsubst eshell-escape-arg (string)
   "Return STRING with the `escaped' property on it."
   (if (stringp string)
@@ -505,42 +539,6 @@ leaves point where it was."
         (goto-char bound)
         (apply #'concat (nreverse strings))))))
 
-(defun eshell-parse-special-reference ()
-  "Parse a special syntax reference, of the form `#<args>'.
-
-args           := `type' `whitespace' `arbitrary-args' | `arbitrary-args'
-type           := \"buffer\" or \"process\"
-arbitrary-args := any string of characters.
-
-If the form has no `type', the syntax is parsed as if `type' were
-\"buffer\"."
-  (when (and (not eshell-current-argument)
-             (not eshell-current-quoted)
-             (looking-at (rx "#<" (? (group (or "buffer" "process"))
-                                     space))))
-    (let ((here (point)))
-      (goto-char (match-end 0)) ;; Go to the end of the match.
-      (let ((buffer-p (if (match-beginning 1)
-                          (equal (match-string 1) "buffer")
-                        t)) ; With no type keyword, assume we want a buffer.
-            (end (eshell-find-delimiter ?\< ?\>)))
-        (when (not end)
-          (when (match-beginning 1)
-            (goto-char (match-beginning 1)))
-          (throw 'eshell-incomplete "#<"))
-        (if (eshell-arg-delimiter (1+ end))
-            (prog1
-                (list (if buffer-p #'get-buffer-create #'get-process)
-                      ;; FIXME: We should probably parse this as a
-                      ;; real Eshell argument so that we get the
-                      ;; benefits of quoting, variable-expansion, etc.
-                      (string-trim-right
-                       (replace-regexp-in-string
-                        (rx "\\" (group anychar)) "\\1"
-                        (buffer-substring-no-properties (point) end))))
-              (goto-char (1+ end)))
-          (ignore (goto-char here)))))))
-
 (defun eshell-parse-delimiter ()
   "Parse an argument delimiter, which is essentially a command operator."
   ;; this `eshell-operator' keyword gets parsed out by
@@ -591,41 +589,158 @@ If no argument requested a splice, return nil."
     (when splicep
       grouped-args)))
 
-;;;_* Special ref completion
+;;; Special references
+
+(defsubst eshell--special-ref-function (type function)
+  "Get the specified FUNCTION for a particular special ref TYPE.
+If TYPE is nil, get the FUNCTION for the `eshell-special-ref-default'."
+  (cadr (assq function (assoc (or type eshell-special-ref-default)
+                              eshell-special-ref-alist))))
+
+(defun eshell-parse-special-reference ()
+  "Parse a special syntax reference, of the form `#<args>'.
+
+args           := `type' `whitespace' `arbitrary-args' | `arbitrary-args'
+type           := one of the keys in `eshell-special-ref-alist'
+arbitrary-args := any number of Eshell arguments
+
+If the form has no `type', the syntax is parsed as if `type' were
+`eshell-special-ref-default'."
+  (let ((here (point))
+        (special-ref-types (mapcar #'car eshell-special-ref-alist)))
+    (when (and (not eshell-current-argument)
+               (not eshell-current-quoted)
+               (looking-at (rx-to-string
+                            `(seq "#<" (? (group (or ,@special-ref-types))
+                                          (+ space)))
+                            t)))
+      (goto-char (match-end 0))         ; Go to the end of the match.
+      (let ((end (eshell-find-delimiter ?\< ?\>))
+            (creation-fun (eshell--special-ref-function
+                           (match-string 1) 'creation-function)))
+        (unless end
+          (when (match-beginning 1)
+            (goto-char (match-beginning 1)))
+          (throw 'eshell-incomplete "#<"))
+        (if (eshell-arg-delimiter (1+ end))
+            (prog1
+                (cons creation-fun
+                      (let ((eshell-current-argument-plain t))
+                        (eshell-parse-arguments (point) end)))
+              (goto-char (1+ end)))
+          (ignore (goto-char here)))))))
+
+(defun eshell-insert-special-reference (type &rest args)
+  "Insert a special reference of the specified TYPE.
+ARGS is a list of arguments to pass to the insertion function for
+TYPE (see `eshell-special-ref-alist')."
+  (interactive
+   (let* ((type (completing-read
+                 (format-prompt "Type" eshell-special-ref-default)
+                 (mapcar #'car eshell-special-ref-alist)
+                 nil 'require-match nil nil eshell-special-ref-default))
+          (insertion-fun (eshell--special-ref-function
+                          type 'insertion-function)))
+     (list :interactive (call-interactively insertion-fun))))
+  (if (eq type :interactive)
+      (car args)
+    (apply (eshell--special-ref-function type 'insertion-function) args)))
 
 (defun eshell-complete-special-reference ()
   "If there is a special reference, complete it."
-  (let ((arg (pcomplete-actual-arg)))
-    (when (string-match
-           (rx string-start
-               "#<" (? (group (or "buffer" "process")) space)
-               (group (* anychar))
-               string-end)
-           arg)
-      (let ((all-results (if (equal (match-string 1 arg) "process")
-                             (mapcar #'process-name (process-list))
-                           (mapcar #'buffer-name (buffer-list))))
-            (saw-type (match-beginning 1)))
-        (unless saw-type
-          ;; Include the special reference types as completion options.
-          (setq all-results (append '("buffer" "process") all-results)))
-        (setq pcomplete-stub (replace-regexp-in-string
-                              (rx "\\" (group anychar)) "\\1"
-                              (substring arg (match-beginning 2))))
-        ;; When finished with completion, add a trailing ">" (unless
-        ;; we just completed the initial "buffer" or "process"
-        ;; keyword).
-        (add-function
-         :before (var pcomplete-exit-function)
-         (lambda (value status)
-           (when (and (eq status 'finished)
-                      (or saw-type
-                          (not (member value '("buffer" "process")))))
-             (if (looking-at ">")
-                 (goto-char (match-end 0))
-               (insert ">")))))
-        (throw 'pcomplete-completions
-               (all-completions pcomplete-stub all-results))))))
+  (when (string-prefix-p "#<" (pcomplete-actual-arg))
+    (let ((special-ref-types (mapcar #'car eshell-special-ref-alist))
+          num-args explicit-type)
+      ;; When finished with completion, add a trailing ">" when
+      ;; appropriate.
+      (add-function
+       :around (var pcomplete-exit-function)
+       (lambda (oldfun value status)
+         (when (eq status 'finished)
+           ;; Don't count the special reference type (e.g. "buffer").
+           (when (or explicit-type
+                     (and (= num-args 1)
+                          (member value special-ref-types)))
+             (setq num-args (1- num-args)))
+           (let ((creation-fun (eshell--special-ref-function
+                                explicit-type 'creation-function)))
+             ;; Check if we already have the maximum number of
+             ;; arguments for this special ref type.  If so, finish
+             ;; the ref with ">".  Otherwise, insert a space and set
+             ;; the completion status to `sole'.
+             (if (eq (cdr (func-arity creation-fun)) num-args)
+                 (if (looking-at ">")
+                     (goto-char (match-end 0))
+                   (insert ">"))
+               (pcomplete-default-exit-function value status)
+               (setq status 'sole))
+             (funcall oldfun value status)))))
+      ;; Parse the arguments to this special reference and call the
+      ;; appropriate completion function.
+      (save-excursion
+        (eshell-with-temp-command (cons (+ 2 (pcomplete-begin)) (point))
+          (goto-char (point-max))
+          (let (pcomplete-args pcomplete-last pcomplete-index pcomplete-begins)
+            (when (let ((eshell-current-argument-plain t))
+                    (pcomplete-parse-arguments
+                     pcomplete-expand-before-complete))
+              (setq num-args (length pcomplete-args))
+              (if (= pcomplete-index pcomplete-last)
+                  ;; Call the default special ref completion function,
+                  ;; and also add the known special ref types as
+                  ;; possible completions.
+                  (throw 'pcomplete-completions
+                         (nconc
+                          (mapcar #'car eshell-special-ref-alist)
+                          (catch 'pcomplete-completions
+                            (funcall (eshell--special-ref-function
+                                      nil 'completion-function)))))
+                ;; Get the special ref type and call its completion
+                ;; function.
+                (let ((first (pcomplete-arg 'first)))
+                  (when (member first special-ref-types)
+                    ;; "Complete" the ref type (which we already
+                    ;; completed above).
+                    (pcomplete-here)
+                    (setq explicit-type first)))
+                (funcall (eshell--special-ref-function
+                          explicit-type 'completion-function))))))))))
+
+(defun eshell-get-buffer (buffer-or-name)
+  "Return the buffer specified by BUFFER-OR-NAME, creating a new one if needed.
+This is equivalent to `get-buffer-create', but only accepts a
+single argument."
+  (get-buffer-create buffer-or-name))
+
+(defun eshell-insert-buffer-name (buffer-name)
+  "Insert BUFFER-NAME into the current buffer at point."
+  (interactive "BName of buffer: ")
+  (insert-and-inherit "#<buffer " (eshell-quote-argument buffer-name) ">"))
+
+(defun eshell-complete-buffer-ref ()
+  "Perform completion for buffer references."
+  (pcomplete-here (mapcar #'buffer-name (buffer-list))))
+
+(defun eshell-get-marker (position buffer-or-name)
+  "Return the marker for character number POSITION in BUFFER-OR-NAME.
+BUFFER-OR-NAME can be a buffer or a string.  If a string and a
+live buffer with that name exists, use that buffer.  If no such
+buffer exists, create a new buffer with that name and use it."
+  (let ((marker (make-marker)))
+    (set-marker marker (string-to-number position)
+                (get-buffer-create buffer-or-name))))
+
+(defun eshell-insert-marker (position buffer-name)
+  "Insert a marker into the current buffer at point.
+This marker will point to POSITION in BUFFER-NAME."
+  (interactive "nPosition: \nBName of buffer: ")
+  (insert-and-inherit "#<marker " (number-to-string position) " "
+                      (eshell-quote-argument buffer-name) ">"))
+
+(defun eshell-complete-marker-ref ()
+  "Perform completion for marker references."
+  (pcomplete-here)
+  (pcomplete-here (mapcar #'buffer-name (buffer-list))))
 
 (provide 'esh-arg)
 ;;; esh-arg.el ends here
diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el
index 990d2ca1122..ecd947774ee 100644
--- a/lisp/eshell/esh-cmd.el
+++ b/lisp/eshell/esh-cmd.el
@@ -393,49 +393,6 @@ for a given process."
 
 ;; Command parsing
 
-(defsubst eshell--region-p (object)
-  "Return non-nil if OBJECT is a pair of numbers or markers."
-  (and (consp object)
-       (number-or-marker-p (car object))
-       (number-or-marker-p (cdr object))))
-
-(defmacro eshell-with-temp-command (command &rest body)
-  "Temporarily insert COMMAND into the buffer and execute the forms in BODY.
-
-COMMAND can be a string to insert, a cons cell (START . END)
-specifying a region in the current buffer, or (:file . FILENAME)
-to temporarily insert the contents of FILENAME.
-
-Before executing BODY, narrow the buffer to the text for COMMAND
-and and set point to the beginning of the narrowed region.
-
-The value returned is the last form in BODY."
-  (declare (indent 1))
-  (let ((command-sym (make-symbol "command"))
-        (begin-sym (make-symbol "begin"))
-        (end-sym (make-symbol "end")))
-    `(let ((,command-sym ,command))
-       (if (eshell--region-p ,command-sym)
-           (save-restriction
-             (narrow-to-region (car ,command-sym) (cdr ,command-sym))
-             (goto-char (car ,command-sym))
-             ,@body)
-         ;; Since parsing relies partly on buffer-local state
-         ;; (e.g. that of `eshell-parse-argument-hook'), we need to
-         ;; perform the parsing in the Eshell buffer.
-         (let ((,begin-sym (point)) ,end-sym)
-           (with-silent-modifications
-             (if (stringp ,command-sym)
-                 (insert ,command-sym)
-               (forward-char (cadr (insert-file-contents (cdr ,command-sym)))))
-             (setq ,end-sym (point))
-             (unwind-protect
-                 (save-restriction
-                   (narrow-to-region ,begin-sym ,end-sym)
-                   (goto-char ,begin-sym)
-                   ,@body)
-               (delete-region ,begin-sym ,end-sym))))))))
-
 (defun eshell-parse-command (command &optional args toplevel)
   "Parse the COMMAND, adding ARGS if given.
 COMMAND can be a string, a cons cell (START . END) demarcating a
diff --git a/lisp/eshell/esh-io.el b/lisp/eshell/esh-io.el
index d0f1e04e925..c29b96dd711 100644
--- a/lisp/eshell/esh-io.el
+++ b/lisp/eshell/esh-io.el
@@ -196,7 +196,8 @@ describing the mode, e.g. for using with 
`eshell-get-target'.")
 
 (defun eshell-parse-redirection ()
   "Parse an output redirection, such as `2>' or `>&'."
-  (when (not eshell-current-quoted)
+  (unless (or eshell-current-quoted
+              eshell-current-argument-plain)
     (cond
      ;; Copying a handle (e.g. `2>&1').
      ((looking-at (rx (? (group digit))
diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el
index 2b560afb92c..9d2cd1e67eb 100644
--- a/lisp/eshell/esh-mode.el
+++ b/lisp/eshell/esh-mode.el
@@ -361,6 +361,9 @@ and the hook `eshell-exit-hook'."
   (setq-local eshell-last-output-end (point-marker))
   (setq-local eshell-last-output-block-begin (point))
 
+  (add-function :filter-return (local 'filter-buffer-substring-function)
+                #'eshell--unmark-string-as-output)
+
   (let ((modules-list (copy-sequence eshell-modules-list)))
     (setq-local eshell-modules-list modules-list))
 
diff --git a/lisp/eshell/esh-proc.el b/lisp/eshell/esh-proc.el
index 126c7d0f26e..6561561440e 100644
--- a/lisp/eshell/esh-proc.el
+++ b/lisp/eshell/esh-proc.el
@@ -23,6 +23,7 @@
 
 ;;; Code:
 
+(require 'esh-arg)
 (require 'esh-io)
 (require 'esh-util)
 
@@ -40,13 +41,22 @@ finish."
   :version "24.1"                      ; removed eshell-proc-initialize
   :type 'hook)
 
+(defcustom eshell-process-wait-time 0.05
+  "The number of seconds to delay waiting for a synchronous process."
+  :version "30.1"
+  :type 'number)
+
 (defcustom eshell-process-wait-seconds 0
   "The number of seconds to delay waiting for a synchronous process."
   :type 'integer)
+(make-obsolete-variable 'eshell-process-wait-seconds
+                        'eshell-process-wait-time "30.1")
 
 (defcustom eshell-process-wait-milliseconds 50
   "The number of milliseconds to delay waiting for a synchronous process."
   :type 'integer)
+(make-obsolete-variable 'eshell-process-wait-milliseconds
+                        'eshell-process-wait-time "30.1")
 
 (defcustom eshell-done-messages-in-minibuffer t
   "If non-nil, subjob \"Done\" messages will display in minibuffer."
@@ -113,6 +123,7 @@ subjob.
 To add or remove elements of this list, see
 `eshell-record-process-object' and `eshell-remove-process-entry'.")
 
+(declare-function eshell-reset "esh-mode" (&optional no-hooks))
 (declare-function eshell-send-eof-to-process "esh-mode")
 (declare-function eshell-interactive-filter "esh-mode" (buffer string))
 (declare-function eshell-tail-process "esh-cmd")
@@ -148,18 +159,18 @@ PROC and STATUS to functions on the latter."
 (defun eshell-proc-initialize ()    ;Called from `eshell-mode' via intern-soft!
   "Initialize the process handling code."
   (make-local-variable 'eshell-process-list)
+  (setq-local eshell-special-ref-alist
+              (cons
+               `("process"
+                 (creation-function   get-process)
+                 (insertion-function  eshell-insert-process)
+                 (completion-function eshell-complete-process-ref))
+               eshell-special-ref-alist))
+
   (eshell-proc-mode))
 
-(defun eshell-reset-after-proc (status)
-  "Reset the command input location after a process terminates.
-The signals which will cause this to happen are matched by
-`eshell-reset-signals'."
-  (declare (obsolete nil "30.1"))
-  (when (and (stringp status)
-            (string-match eshell-reset-signals status))
-    (require 'esh-mode)
-    (declare-function eshell-reset "esh-mode" (&optional no-hooks))
-    (eshell-reset)))
+(define-obsolete-function-alias 'eshell-reset-after-proc
+  'eshell--reset-after-signal "30.1")
 
 (defun eshell-process-active-p (process)
   "Return non-nil if PROCESS is active.
@@ -178,8 +189,7 @@ This is like `process-live-p', but additionally checks 
whether
       (while (eshell-process-active-p proc)
         (when (input-pending-p)
           (discard-input))
-        (sit-for eshell-process-wait-seconds
-                 eshell-process-wait-milliseconds)))))
+        (sit-for eshell-process-wait-time)))))
 
 (defalias 'eshell/wait #'eshell-wait-for-process)
 
@@ -226,23 +236,6 @@ and signal names."
 
 (put 'eshell/kill 'eshell-no-numeric-conversions t)
 
-(defun eshell-read-process-name (prompt)
-  "Read the name of a process from the minibuffer, using completion.
-The prompt will be set to PROMPT."
-  (completing-read prompt
-                  (mapcar
-                    (lambda (proc)
-                      (cons (process-name proc) t))
-                   (process-list))
-                   nil t))
-
-(defun eshell-insert-process (process)
-  "Insert the name of PROCESS into the current buffer at point."
-  (interactive
-   (list (get-process
-         (eshell-read-process-name "Name of process: "))))
-  (insert-and-inherit "#<process " (process-name process) ">"))
-
 (defsubst eshell-record-process-object (object)
   "Record OBJECT as now running."
   (when (and eshell-subjob-messages
@@ -586,7 +579,7 @@ If QUERY is non-nil, query the user with QUERY before 
calling FUNC."
 
 (defcustom eshell-kill-process-wait-time 5
   "Seconds to wait between sending termination signals to a subprocess."
-  :type 'integer)
+  :type 'number)
 
 (defcustom eshell-kill-process-signals '(SIGINT SIGQUIT SIGKILL)
   "Signals used to kill processes when an Eshell buffer exits.
@@ -649,29 +642,41 @@ See the variable `eshell-kill-processes-on-exit'."
            (kill-buffer buf)))
       (message nil))))
 
+(defun eshell--reset-after-signal (status)
+  "Reset the prompt after a signal when necessary.
+STATUS is the status associated with the signal; if
+`eshell-reset-signals' matches status, reset the prompt.
+
+This is really only useful when \"signaling\" while there's no
+foreground process.  Otherwise, `eshell-resume-command' handles
+everything."
+  (when (and (stringp status)
+            (string-match eshell-reset-signals status))
+    (eshell-reset)))
+
 (defun eshell-interrupt-process ()
   "Interrupt a process."
   (interactive)
   (unless (eshell-process-interact 'interrupt-process)
-    (run-hook-with-args 'eshell-kill-hook nil "interrupt")))
+    (eshell--reset-after-signal "interrupt\n")))
 
 (defun eshell-kill-process ()
   "Kill a process."
   (interactive)
   (unless (eshell-process-interact 'kill-process)
-    (run-hook-with-args 'eshell-kill-hook nil "killed")))
+    (eshell--reset-after-signal "killed\n")))
 
 (defun eshell-quit-process ()
   "Send quit signal to process."
   (interactive)
   (unless (eshell-process-interact 'quit-process)
-    (run-hook-with-args 'eshell-kill-hook nil "quit")))
+    (eshell--reset-after-signal "quit\n")))
 
 ;(defun eshell-stop-process ()
 ;  "Send STOP signal to process."
 ;  (interactive)
 ;  (unless (eshell-process-interact 'stop-process)
-;    (run-hook-with-args 'eshell-kill-hook nil "stopped")))
+;    (eshell--reset-after-signal "stopped\n")))
 
 ;(defun eshell-continue-process ()
 ;  "Send CONTINUE signal to process."
@@ -680,7 +685,32 @@ See the variable `eshell-kill-processes-on-exit'."
 ;    ;; jww (1999-09-17): this signal is not dealt with yet.  For
 ;    ;; example, `eshell-reset' will be called, and so will
 ;    ;; `eshell-resume-eval'.
-;    (run-hook-with-args 'eshell-kill-hook nil "continue")))
+;    (eshell--reset-after-signal "continue\n")))
+
+;;; Special references
+
+(defun eshell-read-process-name (prompt)
+  "Read the name of a process from the minibuffer, using completion.
+The prompt will be set to PROMPT."
+  (completing-read prompt
+                  (mapcar
+                    (lambda (proc)
+                      (cons (process-name proc) t))
+                   (process-list))
+                   nil t))
+
+(defun eshell-insert-process (process)
+  "Insert the name of PROCESS into the current buffer at point."
+  (interactive
+   (list (get-process
+         (eshell-read-process-name "Name of process: "))))
+  (insert-and-inherit "#<process "
+                      (eshell-quote-argument (process-name process))
+                      ">"))
+
+(defun eshell-complete-process-ref ()
+  "Perform completion for process references."
+  (pcomplete-here (mapcar #'process-name (process-list))))
 
 (provide 'esh-proc)
 ;;; esh-proc.el ends here
diff --git a/lisp/eshell/esh-util.el b/lisp/eshell/esh-util.el
index 4c251a29269..b22c286c635 100644
--- a/lisp/eshell/esh-util.el
+++ b/lisp/eshell/esh-util.el
@@ -234,6 +234,57 @@ current buffer."
                 (eshell--mark-as-output start1 end1)))))
     (add-hook 'after-change-functions hook nil t)))
 
+(defun eshell--unmark-string-as-output (string)
+  "Unmark STRING as Eshell output."
+  (remove-list-of-text-properties
+   0 (length string)
+   '(rear-nonsticky front-sticky field insert-in-front-hooks)
+   string)
+  string)
+
+(defsubst eshell--region-p (object)
+  "Return non-nil if OBJECT is a pair of numbers or markers."
+  (and (consp object)
+       (number-or-marker-p (car object))
+       (number-or-marker-p (cdr object))))
+
+(defmacro eshell-with-temp-command (command &rest body)
+  "Temporarily insert COMMAND into the buffer and execute the forms in BODY.
+
+COMMAND can be a string to insert, a cons cell (START . END)
+specifying a region in the current buffer, or (:file . FILENAME)
+to temporarily insert the contents of FILENAME.
+
+Before executing BODY, narrow the buffer to the text for COMMAND
+and and set point to the beginning of the narrowed region.
+
+The value returned is the last form in BODY."
+  (declare (indent 1))
+  (let ((command-sym (make-symbol "command"))
+        (begin-sym (make-symbol "begin"))
+        (end-sym (make-symbol "end")))
+    `(let ((,command-sym ,command))
+       (if (eshell--region-p ,command-sym)
+           (save-restriction
+             (narrow-to-region (car ,command-sym) (cdr ,command-sym))
+             (goto-char (car ,command-sym))
+             ,@body)
+         ;; Since parsing relies partly on buffer-local state
+         ;; (e.g. that of `eshell-parse-argument-hook'), we need to
+         ;; perform the parsing in the Eshell buffer.
+         (let ((,begin-sym (point)) ,end-sym)
+           (with-silent-modifications
+             (if (stringp ,command-sym)
+                 (insert ,command-sym)
+               (forward-char (cadr (insert-file-contents (cdr ,command-sym)))))
+             (setq ,end-sym (point))
+             (unwind-protect
+                 (save-restriction
+                   (narrow-to-region ,begin-sym ,end-sym)
+                   (goto-char ,begin-sym)
+                   ,@body)
+               (delete-region ,begin-sym ,end-sym))))))))
+
 (defun eshell-find-delimiter
   (open close &optional bound reverse-p backslash-p)
   "From point, find the CLOSE delimiter corresponding to OPEN.
diff --git a/lisp/ffap.el b/lisp/ffap.el
index 6f477dd790b..942e218bf23 100644
--- a/lisp/ffap.el
+++ b/lisp/ffap.el
@@ -554,7 +554,7 @@ Looks at `ffap-ftp-default-user', returns \"\" for 
\"localhost\"."
     (concat "gopher://"; mach "/"))
    ;; www.ncsa.uiuc.edu
    ((and (string-match "\\`w\\(ww\\|eb\\)[-.]" mach))
-    (concat "http://"; mach "/"))
+    (concat "https://"; mach "/"))
    ;; More cases?
    (ffap-ftp-regexp (ffap-host-to-filename mach))
    ))
diff --git a/lisp/filenotify.el b/lisp/filenotify.el
index e9f8d4e515d..03bd4e51485 100644
--- a/lisp/filenotify.el
+++ b/lisp/filenotify.el
@@ -138,7 +138,7 @@ It is nil or a `file-notify--rename' defstruct where the 
cookie can be nil.")
                         ((memq action '(delete delete-self move-self)) 
'deleted)
                         ((eq action 'moved-from) 'renamed-from)
                         ((eq action 'moved-to) 'renamed-to)
-                        ((eq action 'ignored) 'stopped)))
+                        ((memq action '(ignored unmount)) 'stopped)))
                      actions))
    file file1-or-cookie))
 
@@ -153,7 +153,8 @@ It is nil or a `file-notify--rename' defstruct where the 
cookie can be nil.")
                         ((eq action 'write) 'changed)
                         ((memq action '(attrib link)) 'attribute-changed)
                         ((eq action 'delete) 'deleted)
-                        ((eq action 'rename) 'renamed)))
+                        ((eq action 'rename) 'renamed)
+                        ((eq action 'revoke) 'stopped)))
                      actions))
    file file1-or-cookie))
 
@@ -179,7 +180,8 @@ It is nil or a `file-notify--rename' defstruct where the 
cookie can be nil.")
                         ((memq action
                                '(created changed attribute-changed deleted))
                          action)
-                        ((eq action 'moved) 'renamed)))
+                        ((eq action 'moved) 'renamed)
+                        ((eq action 'unmounted) 'stopped)))
                      (if (consp actions) actions (list actions))))
    file file1-or-cookie))
 
@@ -195,6 +197,7 @@ It is nil or a `file-notify--rename' defstruct where the 
cookie can be nil.")
                  ((memq action '(created changed attribute-changed deleted))
                   action)
                  ((eq action 'moved) 'renamed)
+                 ((eq action 'unmounted) 'stopped)
                  ;; inotify actions:
                  ((eq action 'create) 'created)
                  ((eq action 'modify) 'changed)
@@ -202,7 +205,7 @@ It is nil or a `file-notify--rename' defstruct where the 
cookie can be nil.")
                  ((memq action '(delete delete-self move-self)) 'deleted)
                  ((eq action 'moved-from) 'renamed-from)
                  ((eq action 'moved-to) 'renamed-to)
-                 ((eq action 'ignored) 'stopped)))
+                 ((memq action '(ignored unmount)) 'stopped)))
               (if (consp actions) actions (list actions))))
    file file1-or-cookie))
 
@@ -339,7 +342,7 @@ DESC is the back-end descriptor.  ACTIONS is a list of:
   "Add a watch for FILE in DIR with FLAGS, using inotify."
   (inotify-add-watch dir
                      (append
-                      '(dont-follow)
+                      '(dont-follow ignored unmount)
                       (and (memq 'change flags)
                            '(create delete delete-self modify move-self move))
                       (and (memq 'attribute-change flags)
@@ -352,6 +355,7 @@ DESC is the back-end descriptor.  ACTIONS is a list of:
   ;; directories, so we watch each file directly.
   (kqueue-add-watch file
                     (append
+                     '(revoke)
                      (and (memq 'change flags)
                          '(create delete write extend rename))
                      (and (memq 'attribute-change flags)
diff --git a/lisp/files-x.el b/lisp/files-x.el
index 3ba7632d253..f6fbd44ce21 100644
--- a/lisp/files-x.el
+++ b/lisp/files-x.el
@@ -31,6 +31,8 @@
 ;;; Code:
 
 (eval-when-compile (require 'subr-x)) ; for string-trim-right
+(declare-function dosified-file-name "dos-fns" (file-name))
+(declare-function project-root "project" (project))
 
 
 ;;; Commands to add/delete file-local/directory-local variables.
@@ -410,7 +412,7 @@ then this function adds it."
 
 (defvar auto-insert) ; from autoinsert.el
 
-(defun modify-dir-local-variable (mode variable value op)
+(defun modify-dir-local-variable (mode variable value op &optional file)
   "Modify directory-local VARIABLE in .dir-locals.el depending on operation OP.
 
 If OP is `add-or-replace' then delete all existing settings of
@@ -422,28 +424,37 @@ If .dir-locals.el was not found and OP is not `delete' 
then create
 this file in the current directory.
 
 If OP is `delete' then delete all existing settings of VARIABLE
-from the MODE alist ignoring the input argument VALUE."
+from the MODE alist ignoring the input argument VALUE.
+
+Optional argument FILE, when non-nil, specifies what file to modify.  It
+should be an expanded filename."
   (catch 'exit
     (unless enable-local-variables
       (throw 'exit (message "Directory-local variables are disabled")))
-    (let* ((dir-or-cache (and (buffer-file-name)
-                              (not (file-remote-p (buffer-file-name)))
-                              (dir-locals-find-file (buffer-file-name))))
-           (variables-file
-            ;; If there are several .dir-locals, the user probably
-            ;; wants to edit the last one (the highest priority).
-            (cond ((stringp dir-or-cache)
-                   (car (last (dir-locals--all-files dir-or-cache))))
-                  ((consp dir-or-cache)        ; result from cache
-                   ;; If cache element has an mtime, assume it came
-                   ;; from a file.  Otherwise, assume it was set
-                   ;; directly.
-                   (if (nth 2 dir-or-cache)
-                       (car (last (dir-locals--all-files (car dir-or-cache))))
-                     (cadr dir-or-cache)))
-                  ;; Try to make a proper file-name.
-                  (t (expand-file-name dir-locals-file))))
-           variables)
+    (let ((variables-file
+           (if (stringp file)
+               file
+             (let ((dir-or-cache
+                    (and (buffer-file-name)
+                         (not (file-remote-p (buffer-file-name)))
+                         (dir-locals-find-file (buffer-file-name)))))
+               ;; If there are several .dir-locals, the user probably
+               ;; wants to edit the last one (the highest priority).
+               (cond
+                ((stringp dir-or-cache)
+                 (car (last (dir-locals--all-files dir-or-cache))))
+                ((consp dir-or-cache)  ; result from cache
+                 ;; If cache element has an mtime, assume it came
+                 ;; from a file.  Otherwise, assume it was set
+                 ;; directly.
+                 (if (nth 2 dir-or-cache)
+                     (car (last (dir-locals--all-files (car dir-or-cache))))
+                   (cadr dir-or-cache)))
+                ;; Try to make a proper file-name.
+                (t (expand-file-name (if (eq system-type 'ms-dos)
+                                         (dosified-file-name dir-locals-file)
+                                       dir-locals-file)))))))
+          variables)
       ;; 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.
@@ -527,33 +538,75 @@ from the MODE alist ignoring the input argument VALUE."
                                      (cdr mode-variables) "\n"))))
            variables "\n")))
 
+(defun read-dir-locals-file ()
+  "Read a dir-locals filename using completion.
+Intended to be used in the `interactive' spec of `add-dir-local-variable',
+`delete-dir-local-variable' and `copy-file-locals-to-dir-locals'.
+
+Returns the filename, expanded."
+  (let* ((pri dir-locals-file)
+         (sec (replace-regexp-in-string ".el$" "-2.el" dir-locals-file))
+         (dir (or (locate-dominating-file default-directory pri)
+                  (locate-dominating-file default-directory sec))))
+    (expand-file-name
+     (read-file-name
+      "File: "
+      (cond (dir)
+            ((when-let ((proj (and (featurep 'project) (project-current))))
+               (project-root proj))))
+      nil
+      (lambda (fname)
+        (member (file-name-nondirectory fname) (list pri sec)))
+      dir-locals-file))))
+
 ;;;###autoload
-(defun add-dir-local-variable (mode variable value)
-  "Add directory-local VARIABLE with its VALUE and MODE to .dir-locals.el."
+(defun add-dir-local-variable (mode variable value &optional file)
+  "Add directory-local VARIABLE with its VALUE and MODE to .dir-locals.el.
+
+With a prefix argument, prompt for the file to modify.
+
+When called from Lisp, FILE may be the expanded name of the dir-locals file
+where to add VARIABLE."
   (interactive
    (let (variable)
      (list
       (read-file-local-variable-mode)
       (setq variable (read-file-local-variable "Add directory-local variable"))
-      (read-file-local-variable-value variable))))
-  (modify-dir-local-variable mode variable value 'add-or-replace))
+      (read-file-local-variable-value variable)
+      (when current-prefix-arg
+        (read-dir-locals-file)))))
+  (modify-dir-local-variable mode variable value 'add-or-replace file))
 
 ;;;###autoload
-(defun delete-dir-local-variable (mode variable)
-  "Delete all MODE settings of file-local VARIABLE from .dir-locals.el."
+(defun delete-dir-local-variable (mode variable &optional file)
+  "Delete all MODE settings of dir-local VARIABLE from .dir-locals.el.
+
+With a prefix argument, prompt for the file to modify.
+
+When called from Lisp, FILE may be the expanded name of the dir-locals file
+from where to delete VARIABLE."
   (interactive
    (list
     (read-file-local-variable-mode)
-    (read-file-local-variable "Delete directory-local variable")))
-  (modify-dir-local-variable mode variable nil 'delete))
+    (read-file-local-variable "Delete directory-local variable")
+    (when current-prefix-arg
+      (read-dir-locals-file))))
+  (modify-dir-local-variable mode variable nil 'delete file))
 
 ;;;###autoload
-(defun copy-file-locals-to-dir-locals ()
-  "Copy file-local variables to .dir-locals.el."
-  (interactive)
+(defun copy-file-locals-to-dir-locals (&optional file)
+  "Copy file-local variables to .dir-locals.el.
+
+With a prefix argument, prompt for the file to modify.
+
+When called from Lisp, FILE may be the expanded name of the dir-locals file
+where to copy the file-local variables."
+  (interactive
+   (list (when current-prefix-arg
+           (read-dir-locals-file))))
   (dolist (elt file-local-variables-alist)
     (unless (assq (car elt) dir-local-variables-alist)
-      (add-dir-local-variable major-mode (car elt) (cdr elt)))))
+      (add-dir-local-variable major-mode (car elt) (cdr elt) file))))
 
 ;;;###autoload
 (defun copy-dir-locals-to-file-locals ()
diff --git a/lisp/files.el b/lisp/files.el
index ddae097f1d1..3d838cd3b8c 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -1135,9 +1135,11 @@ the function needs to examine, starting with FILE."
     (while (not (or root
                     (null file)
                     (string-match locate-dominating-stop-dir-regexp file)))
-      (setq try (if (stringp name)
-                    (and (file-directory-p file)
-                         (file-exists-p (expand-file-name name file)))
+      (setq file (if (file-directory-p file)
+                     file
+                   (file-name-directory file))
+            try (if (stringp name)
+                    (file-exists-p (expand-file-name name file))
                   (funcall name file)))
       (cond (try (setq root file))
             ((equal file (setq file (file-name-directory
@@ -5933,9 +5935,11 @@ Before and after saving the buffer, this function runs
                            buffer-file-name)
                          t))
        ;; If file not writable, see if we can make it writable
-       ;; temporarily while we write it.
-       ;; But no need to do so if we have just backed it up
-       ;; (setmodes is set) because that says we're superseding.
+       ;; temporarily while we write it (its original modes will be
+       ;; restored in 'basic-save-buffer' or, in case of an error, in
+       ;; the `unwind-protect' below).  But no need to do so if we
+       ;; have just backed it up (setmodes is set) because that says
+       ;; we're superseding.
        (cond ((and tempsetmodes (not setmodes))
               ;; Change the mode back, after writing.
               (setq setmodes
@@ -5944,12 +5948,17 @@ Before and after saving the buffer, this function runs
                                "Error getting extended attributes: %s"
                             (file-extended-attributes buffer-file-name))
                           buffer-file-name))
-              ;; If set-file-extended-attributes fails, fall back on
-              ;; set-file-modes.
-              (unless
-                  (with-demoted-errors "Error setting attributes: %s"
-                    (set-file-extended-attributes buffer-file-name
-                                                  (nth 1 setmodes)))
+              ;; If set-file-extended-attributes fails to make the
+              ;; file writable, fall back on set-file-modes.  Calling
+              ;; set-file-extended-attributes here may or may not be
+              ;; actually necessary.  However, since its exact
+              ;; behavior is highly port-specific, since calling it
+              ;; does not do any harm, and since the call has a long
+              ;; history, we decided to leave it in (bug#66546).
+              (with-demoted-errors "Error setting attributes: %s"
+                (set-file-extended-attributes buffer-file-name
+                                              (nth 1 setmodes)))
+              (unless (file-writable-p buffer-file-name)
                 (set-file-modes buffer-file-name
                                 (logior (car setmodes) 128)))))
        (let (success)
@@ -5962,12 +5971,22 @@ Before and after saving the buffer, this function runs
                               buffer-file-name nil t buffer-file-truename)
                 (when save-silently (message nil))
                (setq success t))
-           ;; If we get an error writing the new file, and we made
-           ;; the backup by renaming, undo the backing-up.
-           (and setmodes (not success)
-                (progn
-                  (rename-file (nth 2 setmodes) buffer-file-name t)
-                  (setq buffer-backed-up nil)))))))
+            (cond
+             ;; If we get an error writing the file, and there is no
+             ;; backup file, then we (most likely) made that file
+             ;; writable above.  Attempt to undo the write-access.
+             ((and setmodes (not success)
+                   (equal (nth 2 setmodes) buffer-file-name))
+             (with-demoted-errors "Error setting file modes: %S"
+               (set-file-modes buffer-file-name (car setmodes)))
+             (with-demoted-errors "Error setting attributes: %s"
+               (set-file-extended-attributes buffer-file-name
+                                             (nth 1 setmodes))))
+            ;; If we get an error writing the new file, and we made
+            ;; the backup by renaming, undo the backing-up.
+            ((and setmodes (not success))
+             (rename-file (nth 2 setmodes) buffer-file-name t)
+             (setq buffer-backed-up nil)))))))
     setmodes))
 
 (declare-function diff-no-select "diff"
@@ -7572,7 +7591,8 @@ files, you could say something like:
 In this example, if you're in \"src/emacs/emacs-27/lisp/abbrev.el\",
 and a \"src/emacs/emacs-28/lisp/abbrev.el\" file exists, it's now
 defined as a sibling."
-  :type 'sexp
+  :type '(alist :key-type (regexp :tag "Match")
+                :value-type (repeat (string :tag "Expansion")))
   :version "29.1")
 
 (defun find-sibling-file (file)
@@ -8317,13 +8337,12 @@ arguments as the running Emacs)."
        ;; Get a list of the indices of the args that are file names.
        (file-arg-indices
         (cdr (or (assq operation
-                       '(;; The first eight are special because they
+                       '(;; The first seven are special because they
                          ;; return a file name.  We want to include
                          ;; the /: in the return value.  So just
                          ;; avoid stripping it in the first place.
                           (abbreviate-file-name)
                           (directory-file-name)
-                          (expand-file-name)
                           (file-name-as-directory)
                           (file-name-directory)
                           (file-name-sans-versions)
@@ -8332,6 +8351,10 @@ arguments as the running Emacs)."
                          ;; `identity' means just return the first
                          ;; arg not stripped of its quoting.
                          (substitute-in-file-name identity)
+                          ;; `expand-file-name' shall do special case
+                          ;; for the first argument starting with
+                          ;; "/:~".  (Bug#65685)
+                          (expand-file-name expand-file-name)
                          ;; `add' means add "/:" to the result.
                          (file-truename add 0)
                           ;;`insert-file-contents' needs special handling.
@@ -8387,6 +8410,10 @@ arguments as the running Emacs)."
     (let ((tramp-mode (and tramp-mode (eq method 'local-copy))))
       (pcase method
         ('identity (car arguments))
+        ('expand-file-name
+         (when (string-prefix-p "/:~" (car arguments))
+           (setcar arguments (file-name-unquote (car arguments) t)))
+         (apply operation arguments))
         ('add (file-name-quote (apply operation arguments) t))
         ('buffer-file-name
          (let ((buffer-file-name (file-name-unquote buffer-file-name t)))
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index a3be5577f7a..f576d4e6147 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -8331,39 +8331,29 @@ articles."
 
 (defun gnus-summary-limit-to-age (age &optional younger-p)
   "Limit the summary buffer to articles that are older than (or equal) AGE 
days.
-If YOUNGER-P (the prefix) is non-nil, limit the summary buffer to
-articles that are younger than AGE days."
+Days are counted from midnight to midnight, and now to the
+previous midnight counts as day one.  If YOUNGER-P (the prefix)
+is non-nil, limit the summary buffer to articles that are younger
+than AGE days."
   (interactive
-   (let ((younger current-prefix-arg)
-        (days-got nil)
-        days)
-     (while (not days-got)
-       (setq days (if younger
-                     (read-string "Limit to articles younger than (in days, 
older when negative): ")
-                   (read-string
-                    "Limit to articles older than (in days, younger when 
negative): ")))
-       (when (> (length days) 0)
-        (setq days (read days)))
-       (if (numberp days)
-          (progn
-            (setq days-got t)
-            (when (< days 0)
-              (setq younger (not younger))
-              (setq days (* days -1))))
-        (message "Please enter a number.")
-        (sleep-for 1)))
+   (let* ((younger current-prefix-arg)
+         (days (read-number
+                 (if younger "Limit to articles younger than days: "
+                   "Limit to articles older than days: "))))
      (list days younger))
    gnus-summary-mode)
   (prog1
-      (let ((data gnus-newsgroup-data)
-           (cutoff (days-to-time age))
-           articles d date is-younger)
+      (let* ((data gnus-newsgroup-data)
+             (now (append '(0 0 0) (cdddr (decode-time))))
+             (delta (make-decoded-time :day (* -1 (- age 1))))
+             (cutoff (encode-time (decoded-time-add now delta)))
+            articles d date is-younger)
        (while (setq d (pop data))
          (when (and (mail-header-p (gnus-data-header d))
                     (setq date (mail-header-date (gnus-data-header d))))
            (setq is-younger (time-less-p
-                             (time-since (gnus-date-get-time date))
-                             cutoff))
+                             cutoff
+                             (gnus-date-get-time date)))
            (when (if younger-p
                      is-younger
                    (not is-younger))
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 969589bb942..0071c02c081 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -8971,32 +8971,61 @@ used to take the screenshot."
     retval))
 
 ;;;###autoload
-(defun message-mailto (&optional url)
+(defun message-mailto (&optional url subject body file-attachments)
   "Command to parse command line mailto: links.
 This is meant to be used for MIME handlers: Setting the handler
 for \"x-scheme-handler/mailto;\" to \"emacs -f message-mailto %u\"
 will then start up Emacs ready to compose mail.  For emacsclient use
-  emacsclient -e \\='(message-mailto \"%u\")'"
+  emacsclient -e \\='(message-mailto \"%u\")'
+
+To facilitate the use of this function within window systems that
+provide message subject, body and attachments independent of URL
+itself, the arguments SUBJECT, BODY and FILE-ATTACHMENTS may also
+provide alternative message subject and body text, which is
+inserted in lieu of nothing if URL does not incorporate such
+information itself, and a list of files to insert as attachments
+to the E-mail."
   (interactive)
   ;; <a 
href="mailto:someone@example.com?subject=This%20is%20the%20subject&cc=someone_else@example.com&body=This%20is%20the%20body";>Send
 email</a>
   (message-mail)
-  (message-mailto-1 (or url (pop command-line-args-left))))
+  (message-mailto-1 (or url (pop command-line-args-left))
+                    subject body file-attachments))
 
-(defun message-mailto-1 (url)
-  (let ((args (message-parse-mailto-url url)))
+(defun message-mailto-1 (url &optional subject body file-attachments)
+  (let ((args (message-parse-mailto-url url))
+        (need-body nil) (need-subject nil))
     (dolist (arg args)
       (unless (equal (car arg) "body")
        (message-position-on-field (capitalize (car arg)))
        (insert (string-replace
                 "\r\n" "\n"
                 (mapconcat #'identity (reverse (cdr arg)) ", ")))))
-    (when (assoc "body" args)
-      (message-goto-body)
-      (dolist (body (cdr (assoc "body" args)))
-       (insert body "\n")))
+    (if (assoc "body" args)
+        (progn
+          (message-goto-body)
+          (dolist (body (cdr (assoc "body" args)))
+           (insert body "\n")))
+      
+      (setq need-body t))
     (if (assoc "subject" args)
        (message-goto-body)
-      (message-goto-subject))))
+      (setq need-subject t)
+      (message-goto-subject))
+    ;; If either one of need-subject and need-body is non-nil then
+    ;; attempt to insert the absent information from an external
+    ;; SUBJECT or BODY.
+    (when (or need-body need-subject)
+      (when (and need-body body)
+        (message-goto-body)
+        (insert body))
+      (when (and need-subject subject)
+        (message-goto-subject)
+        (insert subject)
+        (message-goto-body)))
+    ;; Subsequently insert each attachment enumerated within
+    ;; FILE-ATTACHMENTS.
+    (dolist (file file-attachments)
+      (mml-attach-file file nil 'attachment))))
 
 (provide 'message)
 
diff --git a/lisp/gnus/nnweb.el b/lisp/gnus/nnweb.el
index d3bf138edeb..f175379f53d 100644
--- a/lisp/gnus/nnweb.el
+++ b/lisp/gnus/nnweb.el
@@ -42,37 +42,30 @@
 
 (defvoo nnweb-type 'google
   "What search engine type is being used.
-Valid types include `google', `dejanews', and `gmane'.")
+Valid types include `google' and `dejanews'.")
 
 (defvar nnweb-type-definition
   '((google
-     (id . "http://www.google.com/groups?as_umsgid=%s&hl=en&dmode=source";)
-     (result . "http://groups.google.com/group/%s/msg/%s?dmode=source";)
+     (id . "https://www.google.com/groups?as_umsgid=%s&hl=en&dmode=source";)
+     (result . "https://groups.google.com/group/%s/msg/%s?dmode=source";)
      (article . nnweb-google-wash-article)
      (reference . identity)
      (map . nnweb-google-create-mapping)
      (search . nnweb-google-search)
-     (address . "http://groups.google.com/groups";)
-     (base    . "http://groups.google.com";)
+     (address . "https://groups.google.com/groups";)
+     (base    . "https://groups.google.com";)
      (identifier . nnweb-google-identity))
+    ;; FIXME: Make obsolete?
     (dejanews ;; alias of google
-     (id . "http://www.google.com/groups?as_umsgid=%s&hl=en&dmode=source";)
-     (result . "http://groups.google.com/group/%s/msg/%s?dmode=source";)
+     (id . "https://www.google.com/groups?as_umsgid=%s&hl=en&dmode=source";)
+     (result . "https://groups.google.com/group/%s/msg/%s?dmode=source";)
      (article . nnweb-google-wash-article)
      (reference . identity)
      (map . nnweb-google-create-mapping)
      (search . nnweb-google-search)
-     (address . "http://groups.google.com/groups";)
-     (base    . "http://groups.google.com";)
-     (identifier . nnweb-google-identity))
-    (gmane
-     (article . nnweb-gmane-wash-article)
-     (id . "http://gmane.org/view.php?group=%s";)
-     (reference . identity)
-     (map . nnweb-gmane-create-mapping)
-     (search . nnweb-gmane-search)
-     (address . "http://search.gmane.org/nov.php";)
-     (identifier . nnweb-gmane-identity)))
+     (address . "https://groups.google.com/groups";)
+     (base    . "https://groups.google.com";)
+     (identifier . nnweb-google-identity)))
   "Type-definition alist.")
 
 (defvoo nnweb-search nil
@@ -254,6 +247,8 @@ Valid types include `google', `dejanews', and `gmane'.")
 
 (defun nnweb-definition (type &optional noerror)
   "Return the definition of TYPE."
+  (when (eq nnweb-type 'gmane)
+    (user-error "`gmane' is no longer a valid value for `nnweb-type'"))
   (let ((def (cdr (assq type (assq nnweb-type nnweb-type-definition)))))
     (when (and (not def)
               (not noerror))
@@ -277,6 +272,8 @@ Valid types include `google', `dejanews', and `gmane'.")
   (unless (gnus-buffer-live-p nnweb-buffer)
     (setq nnweb-buffer
          (save-current-buffer
+            (when (eq nnweb-type 'gmane)
+              (user-error "`gmane' is no longer a valid value for 
`nnweb-type'"))
             (nnheader-set-temp-buffer
              (format " *nnweb %s %s %s*"
                      nnweb-type nnweb-search server))
@@ -437,10 +434,11 @@ Valid types include `google', `dejanews', and `gmane'.")
     url))
 
 ;;;
-;;; gmane.org
+;;; gmane.org -- now obsolete as the gmane.org web interface is gone
 ;;;
 (defun nnweb-gmane-create-mapping ()
   "Perform the search and create a number-to-url alist."
+  (declare (obsolete nil "30.1"))
   (with-current-buffer nnweb-buffer
     (let ((case-fold-search t)
          (active (or (cadr (assoc nnweb-group nnweb-group-alist))
@@ -484,6 +482,7 @@ Valid types include `google', `dejanews', and `gmane'.")
            (sort (nconc nnweb-articles map) #'car-less-than-car)))))
 
 (defun nnweb-gmane-wash-article ()
+  (declare (obsolete nil "30.1"))
   (let ((case-fold-search t))
     (goto-char (point-min))
     (when (search-forward "<!--X-Head-of-Message-->" nil t)
@@ -495,6 +494,7 @@ Valid types include `google', `dejanews', and `gmane'.")
       (mm-url-remove-markup))))
 
 (defun nnweb-gmane-search (search)
+  (declare (obsolete nil "30.1"))
   (mm-url-insert
    (concat
     (nnweb-definition 'address)
@@ -511,6 +511,7 @@ Valid types include `google', `dejanews', and `gmane'.")
 
 (defun nnweb-gmane-identity (url)
   "Return a unique identifier based on URL."
+  (declare (obsolete nil "30.1"))
   (if (string-match "group=\\(.+\\)" url)
       (match-string 1 url)
     url))
diff --git a/lisp/help.el b/lisp/help.el
index e278dd17b7f..5ed93b60f3a 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -192,7 +192,7 @@ buffer.")
                       max-key-len (max (length key) max-key-len))
                 (push (list key (cdr ent) (car ent)) keys))))
           (when keys
-            (let ((fmt (format "%%-%ds %%-%ds%s" max-key-len max-cmd-len
+            (let ((fmt (format "%%s %%-%ds%s" max-cmd-len
                                (make-string padding ?\s)))
                   (width (+ max-key-len 1 max-cmd-len padding)))
               (push `(,width
@@ -203,10 +203,12 @@ buffer.")
                         'face 'bold)
                       ,@(mapcar (lambda (ent)
                                   (format fmt
-                                          (propertize
-                                           (car ent)
-                                           'quick-help-cmd
-                                           (caddr ent))
+                                          (concat
+                                           (propertize
+                                            (car ent)
+                                            'quick-help-cmd
+                                            (caddr ent))
+                                           (make-string (- max-key-len (length 
(car ent))) ?\s))
                                           (cadr ent)))
                                 keys))
                     blocks)))))
diff --git a/lisp/ido.el b/lisp/ido.el
index 041ed33aa99..2daf3bae717 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -1509,8 +1509,8 @@ Removes badly formatted data and ignored directories."
   (add-hook 'minibuffer-setup-hook #'ido-minibuffer-setup)
   (add-hook 'choose-completion-string-functions 
#'ido-choose-completion-string))
 
-(defun ido--ffap-find-file (file)
-  (find-file file))
+(defun ido--ffap-find-file (file &optional wildcard)
+  (find-file file wildcard))
 
 (define-minor-mode ido-everywhere
   "Toggle use of Ido for all buffer/file reading."
@@ -2326,7 +2326,7 @@ If cursor is not at the end of the user input, move to 
end of input."
                          (if (eq ido-use-filename-at-point 'guess)
                              (ffap-guesser)
                            (ffap-string-at-point))))
-              (not (string-match "\\`http:/" fn)))
+               (not (string-match (rx bos "http" (? "s") ":/") fn)))
           (let ((absolute-fn (expand-file-name fn)))
             (cond
              ((file-directory-p absolute-fn)
diff --git a/lisp/image-mode.el b/lisp/image-mode.el
index ecc7d73dd9e..d5ca6348c92 100644
--- a/lisp/image-mode.el
+++ b/lisp/image-mode.el
@@ -772,9 +772,8 @@ to switch back to
 
 ;;;###autoload
 (defun image-mode-to-text ()
-  "Set a non-image mode as major mode in combination with image minor mode.
-A non-mage major mode found from `auto-mode-alist' or fundamental mode
-displays an image file as text."
+  "Set current buffer's modes be a non-image major mode, plus 
`image-minor-mode'.
+A non-image major mode displays an image file as text."
   ;; image-mode-as-text = normal-mode + image-minor-mode
   (let ((previous-image-type image-type)) ; preserve `image-type'
     (major-mode-restore '(image-mode image-mode-as-text))
@@ -785,15 +784,14 @@ displays an image file as text."
       (image-toggle-display-text))))
 
 (defun image-mode-as-hex ()
-  "Set `hexl-mode' as major mode in combination with image minor mode.
-A non-mage major mode found from `auto-mode-alist' or fundamental mode
-displays an image file as hex.  `image-minor-mode' provides the key
-\\<image-mode-map>\\[image-toggle-hex-display] to switch back to `image-mode' \
-to display an image file as
-the actual image.
+  "Set current buffer's modes be `hexl-mode' major mode, plus 
`image-minor-mode'.
+This will by default display an image file as hex.  `image-minor-mode'
+provides the key sequence \\<image-mode-map>\\[image-toggle-hex-display] to \
+switch back to `image-mode' to display
+an image file's buffer as an image.
 
 You can use `image-mode-as-hex' in `auto-mode-alist' when you want to
-display an image file as hex initially.
+display image files as hex by default.
 
 See commands `image-mode' and `image-minor-mode' for more information
 on these modes."
diff --git a/lisp/leim/quail/cyrillic.el b/lisp/leim/quail/cyrillic.el
index d0874124fc7..5ba1c4801fd 100644
--- a/lisp/leim/quail/cyrillic.el
+++ b/lisp/leim/quail/cyrillic.el
@@ -38,12 +38,12 @@
 
 ;; This was `cyrillic-jcuken'.  Alexander Mikhailian
 ;; <mikhailian@altern.org> says:  "cyrillic-jcuken" is actually
-;; russian.  It is ok but a bit outdated.  This layout has been used
+;; Russian.  It is ok but a bit outdated.  This layout has been used
 ;; in typewriters for ages but it has been superseded on desktops by
 ;; a variation of this layout, implemented in M$ Windows software.
 ;; The Windows layout is greatly preferred because of the comma and
 ;; period being placed more conveniently and, of course, because of
-;; the popularity of Windows software. This layout is a common option
+;; the popularity of Windows software.  This layout is a common option
 ;; in X Windows and console layouts for GNU/Linux.  [See
 ;; `russian-computer' below.]
 (quail-define-package
diff --git a/lisp/loadup.el b/lisp/loadup.el
index 35c59dba453..07895228d0d 100644
--- a/lisp/loadup.el
+++ b/lisp/loadup.el
@@ -496,23 +496,23 @@ lost after dumping")))
 ;; At this point, we're ready to resume undo recording for scratch.
 (buffer-enable-undo "*scratch*")
 
-(defvar comp-subr-arities-h)
-(when (featurep 'native-compile)
-  ;; Save the arity for all primitives so the compiler can always
-  ;; retrive it even in case of redefinition.
-  (mapatoms (lambda (f)
-              (when (subr-primitive-p (symbol-function f))
-                (puthash f (func-arity f) comp-subr-arities-h))))
-  ;; Fix the compilation unit filename to have it working when
-  ;; installed or if the source directory got moved.  This is set to be
-  ;; a pair in the form of:
-  ;;     (rel-filename-from-install-bin . rel-filename-from-local-bin).
-  (let ((bin-dest-dir (cadr (member "--bin-dest" command-line-args)))
-        (eln-dest-dir (cadr (member "--eln-dest" command-line-args))))
-    (when (and bin-dest-dir eln-dest-dir)
-      (setq eln-dest-dir
-            (concat eln-dest-dir "native-lisp/" comp-native-version-dir "/"))
-      (maphash (lambda (_ cu)
+(defvar load--bin-dest-dir nil
+  "Store the original value passed by \"--bin-dest\" during dump.
+Internal use only.")
+(defvar load--eln-dest-dir nil
+  "Store the original value passed by \"--eln-dest\" during dump.
+Internal use only.")
+
+(defun load--fixup-all-elns ()
+  "Fix all compilation unit filename.
+This to have it working when installed or if Emacs source
+directory got moved.  This is set to be a pair in the form of:
+\(rel-filename-from-install-bin . rel-filename-from-local-bin)."
+  (when (and load--bin-dest-dir load--eln-dest-dir)
+    (setq eln-dest-dir
+          (concat load--eln-dest-dir "native-lisp/" comp-native-version-dir 
"/"))
+    (maphash (lambda (_ cu)
+               (when (stringp (native-comp-unit-file cu))
                  (let* ((file (native-comp-unit-file cu))
                         (preloaded (equal (substring (file-name-directory file)
                                                      -10 -1)
@@ -529,10 +529,20 @@ lost after dumping")))
                                           (file-name-nondirectory
                                            file)
                                           eln-dest-dir-eff)
-                                         bin-dest-dir)
+                                         load--bin-dest-dir)
                      ;; Relative filename from the built uninstalled binary.
-                     (file-relative-name file invocation-directory)))))
-              comp-loaded-comp-units-h)))
+                     (file-relative-name file invocation-directory))))))
+            comp-loaded-comp-units-h)))
+
+(defvar comp-subr-arities-h)
+(when (featurep 'native-compile)
+  ;; Save the arity for all primitives so the compiler can always
+  ;; retrive it even in case of redefinition.
+  (mapatoms (lambda (f)
+              (when (subr-primitive-p (symbol-function f))
+                (puthash f (func-arity f) comp-subr-arities-h))))
+  (setq load--bin-dest-dir (cadr (member "--bin-dest" command-line-args)))
+  (setq load--eln-dest-dir (cadr (member "--eln-dest" command-line-args)))
   ;; Set up the mechanism to allow inhibiting native-comp via
   ;; file-local variables.
   (defvar comp--no-native-compile (make-hash-table :test #'equal)))
diff --git a/lisp/ls-lisp.el b/lisp/ls-lisp.el
index efc06ffbbf8..c576819c5d0 100644
--- a/lisp/ls-lisp.el
+++ b/lisp/ls-lisp.el
@@ -169,7 +169,7 @@ A value of nil (or an empty list) means display none of 
them.
 
 Concepts come from UNIX: `links' means count of names associated with
 the file; `uid' means user (owner) identifier; `gid' means group
-identifier.
+identifier; `modes' means Unix-style permission bits (drwxrwxrwx).
 
 If emulation is MacOS then default is nil;
 if emulation is MS-Windows then default is `(links)' if platform is
@@ -180,7 +180,8 @@ if emulation is GNU then default is `(links uid gid)'."
   ;; Functionality suggested by Howard Melman <howard@silverstream.com>
   :type '(set (const :tag "Show Link Count" links)
              (const :tag "Show User" uid)
-             (const :tag "Show Group" gid))
+             (const :tag "Show Group" gid)
+              (const :tag "Show Modes" modes))
   :group 'ls-lisp)
 
 (defcustom ls-lisp-use-insert-directory-program
@@ -810,7 +811,7 @@ SWITCHES and TIME-INDEX give the full switch list and time 
data."
                          (fceiling (/ file-size 1024.0)))))
             (if (memq 'modes ls-lisp-verbosity)
                drwxrwxrwx      ; modes string
-              (substring drwxrwxrwx 0 1)) ; "d" or "-" for directory vs file
+              (substring drwxrwxrwx 0 4)) ; "d" or "-" for directory vs file
            (if (memq 'links ls-lisp-verbosity)
                (format "%3d" (file-attribute-link-number file-attr)))
            ;; Numeric uid/gid are more confusing than helpful;
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index 3a348ebcdc6..94c2b50c724 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -1804,7 +1804,7 @@ mail status in mode line"))
     (bindings--define-key menu [project-find-regexp] '(menu-item "Find 
Regexp..." project-find-regexp :help "Search for a regexp in files belonging to 
current project"))
     (bindings--define-key menu [separator-project-search] menu-bar-separator)
     (bindings--define-key menu [project-kill-buffers] '(menu-item "Kill 
Buffers..." project-kill-buffers :help "Kill the buffers belonging to the 
current project"))
-    (bindings--define-key menu [project-list-buffers] '(menu-item "List 
Buffers..." project-list-buffers :help "Pop up a window listing all Emacs 
buffers belonging to current project"))
+    (bindings--define-key menu [project-list-buffers] '(menu-item "List 
Buffers" project-list-buffers :help "Pop up a window listing all Emacs buffers 
belonging to current project"))
     (bindings--define-key menu [project-switch-to-buffer] '(menu-item "Switch 
To Buffer..." project-switch-to-buffer :help "Prompt for a buffer belonging to 
current project, and switch to it"))
     (bindings--define-key menu [separator-project-buffers] menu-bar-separator)
     (bindings--define-key menu [project-async-shell-command] '(menu-item 
"Async Shell Command..." project-async-shell-command :help "Invoke a shell 
command in project root asynchronously in background"))
@@ -1814,7 +1814,7 @@ mail status in mode line"))
     (bindings--define-key menu [project-compile] '(menu-item "Compile..." 
project-compile :help "Invoke compiler or Make for current project, view 
errors"))
     (bindings--define-key menu [separator-project-programs] menu-bar-separator)
     (bindings--define-key menu [project-switch-project] '(menu-item "Switch 
Project..." project-switch-project :help "Switch to another project and then 
run a command"))
-    (bindings--define-key menu [project-vc-dir] '(menu-item "VC Dir..." 
project-vc-dir :help "Show the VC status of the project repository"))
+    (bindings--define-key menu [project-vc-dir] '(menu-item "VC Dir" 
project-vc-dir :help "Show the VC status of the project repository"))
     (bindings--define-key menu [project-dired] '(menu-item "Open Project Root" 
project-dired :help "Read the root directory of the current project, to operate 
on its files"))
     (bindings--define-key menu [project-find-dir] '(menu-item "Open 
Directory..." project-find-dir :help "Open existing directory that belongs to 
current project"))
     (bindings--define-key menu [project-or-external-find-file] '(menu-item 
"Open File Including External Roots..." project-or-external-find-file :help 
"Open existing file that belongs to current project or its external roots"))
@@ -2314,12 +2314,12 @@ The menu shows all the killed text sequences stored in 
`kill-ring'."
 
 ;;; Buffers Menu
 
-(defcustom buffers-menu-max-size (if (display-graphic-p) 15 10)
+;; Increasing this more might be problematic on TTY frames.  See Bug#64398.
+(defcustom buffers-menu-max-size 15
   "Maximum number of entries which may appear on the Buffers menu.
 If this is a number, only that many most-recently-selected
 buffers are shown.
 If this is nil, all buffers are shown."
-  :initialize #'custom-initialize-delay
   :type '(choice natnum
                  (const :tag "All" nil))
   :group 'menu
@@ -2467,12 +2467,9 @@ It must accept a buffer as its only required argument.")
         ;; Make the menu of buffers proper.
         (setq buffers-menu
                (let ((i 0)
-                     (limit (if (boundp 'buffers-menu-max-size)
-                                (and (integerp buffers-menu-max-size)
-                                     (> buffers-menu-max-size 1)
-                                     buffers-menu-max-size)
-                              ;; Used when bootstrapping.
-                              10))
+                    (limit (and (integerp buffers-menu-max-size)
+                                (> buffers-menu-max-size 1)
+                                buffers-menu-max-size))
                      alist)
                 ;; Put into each element of buffer-list
                 ;; the name for actual display,
diff --git a/lisp/mh-e/mh-mime.el b/lisp/mh-e/mh-mime.el
index 6c498d8df71..b493f7d86dd 100644
--- a/lisp/mh-e/mh-mime.el
+++ b/lisp/mh-e/mh-mime.el
@@ -1355,6 +1355,7 @@ See also \\[mh-mh-to-mime]."
     ("ftp")             ; RFC2046 File Transfer Protocol
     ("gopher")          ; RFC1738 The Gopher Protocol
     ("http")            ; RFC1738 Hypertext Transfer Protocol
+    ("https")           ; RFC2818 HTTP Over TLS
     ("local-file")      ; RFC2046 Local file access
     ("mail-server")     ; RFC2046 mail-server Electronic mail address
     ("mailto")          ; RFC1738 Electronic mail address
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index 11bfeb1b339..7cbc8e569a5 100644
--- a/lisp/net/browse-url.el
+++ b/lisp/net/browse-url.el
@@ -1305,7 +1305,7 @@ Default to the URL around or before point."
   (let* ((scheme (save-match-data
                    (if (string-match "\\(.+\\):/" url)
                        (match-string 1 url)
-                     "http")))
+                     browse-url-default-scheme)))
          (mime (concat "application/x-vnd.Be.URL." scheme)))
     (haiku-roster-launch mime (vector url))))
 
diff --git a/lisp/net/dictionary.el b/lisp/net/dictionary.el
index ca706c3c6e9..d1f92334ee2 100644
--- a/lisp/net/dictionary.el
+++ b/lisp/net/dictionary.el
@@ -309,12 +309,12 @@ Otherwise, `dictionary-search' displays definitions in a 
*Dictionary* buffer."
   :version "30.1")
 
 (defface dictionary-word-definition-face
-'((((supports (:family "DejaVu Serif")))
-   (:family "DejaVu Serif"))
-  (((type x))
-   (:font "Sans Serif"))
-  (t
-   (:font "default")))
+  '((((supports (:family "DejaVu Serif")))
+     (:family "DejaVu Serif"))
+    (((type x))
+     (:font "Sans Serif"))
+    (t
+     (:font "default")))
 "The face that is used for displaying the definition of the word."
 :group 'dictionary
 :version "28.1")
@@ -405,6 +405,22 @@ Otherwise, `dictionary-search' displays definitions in a 
*Dictionary* buffer."
   "M-SPC" #'scroll-down-command
   "DEL"   #'scroll-down-command)
 
+(easy-menu-define dictionary-mode-menu dictionary-mode-map
+  "Menu for the Dictionary mode."
+  '("Dictionary"
+    ["Search Definition" dictionary-search
+     :help "Look up a new word"]
+    ["List Matching Words" dictionary-match-words
+     :help "List all words matching a pattern"]
+    ["Lookup Word At Point" dictionary-lookup-definition
+     :help "Look up the word at point"]
+    ["Select Dictionary" dictionary-select-dictionary
+     :help "Select one or more dictionaries to search within"]
+    ["Select Match Strategy" dictionary-select-strategy
+     :help "Select the algorithm to match queries and entries with"]
+    ["Back" dictionary-previous
+     :help "Return to the previous match or location"]))
+
 (defvar dictionary-connection
   nil
   "The current network connection.")
@@ -423,6 +439,30 @@ Otherwise, `dictionary-search' displays definitions in a 
*Dictionary* buffer."
 ;; Basic function providing startup actions
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
+(defvar dictionary-tool-bar-map
+  (let ((map (make-sparse-keymap)))
+    ;; Most of these items are the same as in the default tool bar
+    ;; map, but with extraneous items removed, and with extra search
+    ;; and navigation items.
+    (tool-bar-local-item-from-menu 'find-file "new" map
+                                   nil :label "New File"
+                                  :vert-only t)
+    (tool-bar-local-item-from-menu 'menu-find-file-existing "open" map
+                                   nil :label "Open" :vert-only t)
+    (tool-bar-local-item-from-menu 'dired "diropen" map nil :vert-only t)
+    (tool-bar-local-item-from-menu 'kill-this-buffer "close" map nil
+                                   :vert-only t)
+    (define-key-after map [separator-1] menu-bar-separator)
+    (tool-bar-local-item-from-menu 'dictionary-search "search"
+                                  map dictionary-mode-map :vert-only t
+                                   :help "Start a new search query.")
+    (tool-bar-local-item-from-menu 'dictionary-previous "left-arrow"
+                                  map dictionary-mode-map
+                                   :vert-only t
+                                   :help "Go backwards in history.")
+    map)
+  "Like the default `tool-bar-map', but with additions for Dictionary mode")
+
 ;;;###autoload
 (define-derived-mode dictionary-mode special-mode "Dictionary"
   "Mode for searching a dictionary.
@@ -452,6 +492,8 @@ This is a quick reference to this mode describing the 
default key bindings:
   (make-local-variable 'dictionary-positions)
   (make-local-variable 'dictionary-default-dictionary)
   (make-local-variable 'dictionary-default-strategy)
+  ;; Replace the tool bar map with `dictionary-tool-bar-map'.
+  (setq-local tool-bar-map dictionary-tool-bar-map)
   (add-hook 'kill-buffer-hook #'dictionary-close t t))
 
 ;;;###autoload
diff --git a/lisp/net/mairix.el b/lisp/net/mairix.el
index 4f90470d4fb..4ef179003de 100644
--- a/lisp/net/mairix.el
+++ b/lisp/net/mairix.el
@@ -60,8 +60,7 @@
 
 ;;; History:
 
-;; 07/28/2008: version 0.2. Added VM interface, written by Ulrich
-;; Mueller.
+;; 07/28/2008: version 0.2. Added VM interface, written by Ulrich Müller.
 
 ;; 07/14/2008: Initial release
 
@@ -288,7 +287,7 @@ Currently there are `threads' and `flags'.")
     (message-field-value field)))
 
 ;;; VM
-;;; written by Ulrich Mueller
+;;; written by Ulrich Müller
 
 (declare-function vm-quit "ext:vm-folder" (&optional no-change))
 (declare-function vm-visit-folder "ext:vm-startup"
diff --git a/lisp/net/newst-backend.el b/lisp/net/newst-backend.el
index 055a38a76e3..726134874ff 100644
--- a/lisp/net/newst-backend.el
+++ b/lisp/net/newst-backend.el
@@ -618,13 +618,13 @@ If URL is nil it is searched at point."
                    (end-of-line)
                    (and
                     (re-search-backward
-                     "http://";
+                     (rx "http" (? "s") "://")
                      (if (> (point) (+ (point-min) 100))
                          (- (point) 100)
                        (point-min))
                      t)
                     (re-search-forward
-                     "http://[-a-zA-Z0-9&/_.]*";
+                     (rx "http" (? "s") "://" (zero-or-more (any 
"-a-zA-Z0-9&/_.")))
                      (if (< (point) (- (point-max) 200))
                          (+ (point) 200)
                        (point-max))
diff --git a/lisp/net/nsm.el b/lisp/net/nsm.el
index 7cbeb48f5be..274cca7123a 100644
--- a/lisp/net/nsm.el
+++ b/lisp/net/nsm.el
@@ -149,10 +149,11 @@ unencrypted."
     (dhe-prime-kx           medium)
     (sha1-sig               medium)
     (ecdsa-cbc-cipher       medium)
+    ;; Deprecated by NIST from 2016/2023 (see also CVE-2016-2183).
+    (3des-cipher            medium)
     ;; Towards TLS 1.3
     (dhe-kx                 high)
     (rsa-kx                 high)
-    (3des-cipher            high)
     (cbc-cipher             high))
   "This variable specifies what TLS connection checks to perform.
 It's an alist where the key is the name of the check, and the
@@ -169,13 +170,13 @@ otherwise.
 
 See also: `nsm-check-tls-connection', `nsm-save-host-names',
 `nsm-settings-file'"
-  :version "27.1"
   :type '(repeat (list (symbol :tag "Check function")
                        (choice :tag "Level"
                                :value medium
                                (const :tag "Low" low)
                                (const :tag "Medium" medium)
-                               (const :tag "High" high)))))
+                               (const :tag "High" high))))
+  :version "30.1")
 
 (defun nsm-save-fingerprint-maybe (host port status &rest _)
   "Save the certificate's fingerprint.
@@ -386,12 +387,11 @@ between the user and the server, to downgrade vulnerable 
TLS
 connections to insecure 512-bit export grade cryptography.
 
 The Logjam paper suggests using 1024-bit prime on the client to
-mitigate some effects of this attack, and upgrade to 2048-bit as
-soon as server configurations allow.  According to SSLLabs' SSL
-Pulse tracker, only about 75% of server support 2048-bit key
-exchange in June 2018[2].  To provide a balance between
-compatibility and security, this function only checks for a
-minimum key strength of 1024-bit.
+mitigate some effects of this attack, and upgrading to 2048-bit
+as soon as server configurations allow.  According to SSLLabs'
+SSL Pulse tracker the overwhelming majority of servers support
+2048-bit key exchange in October 2023[2].  This function
+therefore checks for a minimum key strength of 2048 bits.
 
 See also: `nsm-protocol-check--dhe-kx'
 
@@ -403,10 +403,10 @@ Diffie-Hellman Fails in Practice\", `https://weakdh.org/'
 `https://www.ssllabs.com/ssl-pulse/'"
   (let ((prime-bits (plist-get status :diffie-hellman-prime-bits)))
     (if (and (string-match "^\\bDHE\\b" (plist-get status :key-exchange))
-             (< prime-bits 1024))
+             (< prime-bits 2048))
         (format-message
          "Diffie-Hellman key strength (%s bits) too weak (%s bits)"
-         prime-bits 1024))))
+         prime-bits 2048))))
 
 (defun nsm-protocol-check--dhe-kx (_host _port status &optional _settings)
   "Check for existence of DH key exchange based on integer factorization.
@@ -484,7 +484,7 @@ because of MAC-then-encrypt.  This construction is 
vulnerable to
 padding oracle attacks[1].
 
 Since GnuTLS 3.4.0, the TLS encrypt-then-MAC extension[2] has
-been enabled by default[3]. If encrypt-then-MAC is negotiated,
+been enabled by default[3].  If encrypt-then-MAC is negotiated,
 this check has no effect.
 
 Reference:
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index 3f6242d9347..7cc7adc45c7 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -392,8 +392,9 @@ and the cdr part is used for encoding."
                                     (cons (coding-system :tag "Decode")
                                           (coding-system :tag "Encode")))))
 
-(defcustom rcirc-multiline-major-mode 'fundamental-mode
+(defcustom rcirc-multiline-major-mode #'text-mode
   "Major-mode function to use in multiline edit buffers."
+  :version "30.1"
   :type 'function)
 
 (defcustom rcirc-nick-completion-format "%s: "
diff --git a/lisp/net/sieve-manage.el b/lisp/net/sieve-manage.el
index 5bee4f4c4ad..81f50e74987 100644
--- a/lisp/net/sieve-manage.el
+++ b/lisp/net/sieve-manage.el
@@ -511,7 +511,7 @@ If NAME is nil, return the full server list of 
capabilities."
     (while (not pos)
       (setq pos (search-forward-regexp pattern nil t))
       (goto-char (point-min))
-      (sleep-for 0 50))
+      (sleep-for 0.05))
     pos))
 
 (defun sieve-manage-drop-next-answer ()
diff --git a/lisp/net/socks.el b/lisp/net/socks.el
index 968a28d2be8..e572e5c9bdf 100644
--- a/lisp/net/socks.el
+++ b/lisp/net/socks.el
@@ -162,6 +162,7 @@
          (radio-button-choice :tag "SOCKS Version"
                               :format "%t: %v"
                               (const :tag "SOCKS v4  " :format "%t" :value 4)
+                               (const :tag "SOCKS v4a"  :format "%t" :value 4a)
                               (const :tag "SOCKS v5"   :format "%t" :value 
5))))
 
 
@@ -202,6 +203,12 @@
     "Command not supported"
     "Address type not supported"))
 
+(defconst socks--errors-4
+  '("Granted"
+    "Rejected or failed"
+    "Cannot connect to identd on the client"
+    "Client and identd report differing user IDs"))
+
 ;; The socks v5 address types
 (defconst socks-address-type-v4   1)
 (defconst socks-address-type-name 3)
@@ -309,7 +316,8 @@
                     ((pred (= socks-address-type-name))
                      (if (< (length string) 5)
                          255
-                       (+ 1 (aref string 4)))))))
+                        (+ 1 (aref string 4))))
+                     (0 0))))
          (if (< (length string) desired-len)
              nil                       ; Need to spin some more
            (process-put proc 'socks-state socks-state-connected)
@@ -399,6 +407,7 @@ When ATYPE indicates an IP, param ADDRESS must be given as 
raw bytes."
                (format "%c%s" (length address) address))
               (t
                (error "Unknown address type: %d" atype))))
+        trailing
        request version)
     (or (process-get proc 'socks)
         (error "socks-send-command called on non-SOCKS connection %S" proc))
@@ -415,6 +424,12 @@ When ATYPE indicates an IP, param ADDRESS must be given as 
raw bytes."
                             (t
                              (error "Unsupported address type for HTTP: %d" 
atype)))
                            port)))
+     ((and (eq version '4a)
+           (setf addr "\0\0\0\1"
+                 trailing (concat address "\0")
+                 version 4 ; become version 4
+                 (process-get proc 'socks-server-protocol) 4)
+           nil)) ; fall through
      ((equal version 4)
       (setq request (concat
                     (unibyte-string
@@ -423,8 +438,9 @@ When ATYPE indicates an IP, param ADDRESS must be given as 
raw bytes."
                      (ash port -8)       ; port, high byte
                      (logand port #xff)) ; port, low byte
                     addr                 ; address
-                    (user-full-name)     ; username
-                    "\0")))              ; terminate username
+                     socks-username       ; username
+                     "\0"                 ; terminate username
+                     trailing)))          ; optional host to look up
      ((equal version 5)
       (setq request (concat
                     (unibyte-string
@@ -445,7 +461,13 @@ When ATYPE indicates an IP, param ADDRESS must be given as 
raw bytes."
        nil                             ; Sweet sweet success!
       (delete-process proc)
       (error "SOCKS: %s"
-             (nth (or (process-get proc 'socks-reply) 1) socks-errors)))
+             (let ((err (process-get proc 'socks-reply)))
+               (if (eql version 5)
+                   (nth (or err 1) socks-errors)
+                 ;; The defined error codes for v4 range from
+                 ;; 90-93, but we store them in a simple list.
+                 (nth (pcase err (90 0) (92 2) (93 3) (_ 1))
+                      socks--errors-4)))))
     proc))
 
 
diff --git a/lisp/net/tramp-cmds.el b/lisp/net/tramp-cmds.el
index 22fb7eee8f3..f56c93c370d 100644
--- a/lisp/net/tramp-cmds.el
+++ b/lisp/net/tramp-cmds.el
@@ -610,7 +610,7 @@ If the buffer runs `dired', the buffer is reverted."
   (interactive)
   (cond
    ((buffer-file-name)
-    (find-alternate-file (tramp-file-name-with-sudo (buffer-name))))
+    (find-alternate-file (tramp-file-name-with-sudo (buffer-file-name))))
    ((tramp-dired-buffer-p)
     (dired-unadvertise (expand-file-name default-directory))
     (setq default-directory (tramp-file-name-with-sudo default-directory)
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el
index 577760f806c..451c033a044 100644
--- a/lisp/net/tramp-gvfs.el
+++ b/lisp/net/tramp-gvfs.el
@@ -1208,6 +1208,9 @@ file names."
       (tramp-run-real-handler #'expand-file-name (list name))
     ;; Dissect NAME.
     (with-parsed-tramp-file-name name nil
+      ;; Tilde expansion shall be possible also for quoted localname.
+      (when (string-prefix-p "~" (file-name-unquote localname))
+       (setq localname (file-name-unquote localname)))
       ;; If there is a default location, expand tilde.
       (when (string-match
             (rx bos "~" (group (* (not "/"))) (group (* nonl)) eos) localname)
@@ -1490,10 +1493,10 @@ If FILE-SYSTEM is non-nil, return file system 
attributes."
            (cond
             ((and (memq 'change flags) (memq 'attribute-change flags))
              '(created changed changes-done-hint moved deleted
-                       attribute-changed))
+                       attribute-changed unmounted))
             ((memq 'change flags)
-             '(created changed changes-done-hint moved deleted))
-            ((memq 'attribute-change flags) '(attribute-changed))))
+             '(created changed changes-done-hint moved deleted unmounted))
+            ((memq 'attribute-change flags) '(attribute-changed unmounted))))
           (p (apply
               #'start-process
               "gvfs-monitor" (generate-new-buffer " *gvfs-monitor*")
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 95c27626166..ba6dbdf0c39 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -2835,6 +2835,9 @@ the result will be a local, non-Tramp, file name."
           (tramp-run-real-handler #'expand-file-name (list name)))
        (unless (tramp-run-real-handler #'file-name-absolute-p (list localname))
          (setq localname (concat "~/" localname)))
+        ;; Tilde expansion shall be possible also for quoted localname.
+       (when (string-prefix-p "~" (file-name-unquote localname))
+         (setq localname (file-name-unquote localname)))
        ;; Tilde expansion if necessary.  This needs a shell which
        ;; groks tilde expansion!  The function `tramp-find-shell' is
        ;; supposed to find such a shell on the remote host.  Please
@@ -3802,11 +3805,12 @@ Fall back to normal file name handler if no Tramp 
handler exists."
              (cond
               ((and (memq 'change flags) (memq 'attribute-change flags))
                (concat "create,modify,move,moved_from,moved_to,move_self,"
-                       "delete,delete_self,attrib,ignored"))
+                       "delete,delete_self,attrib"))
               ((memq 'change flags)
                (concat "create,modify,move,moved_from,moved_to,move_self,"
-                       "delete,delete_self,ignored"))
-              ((memq 'attribute-change flags) "attrib,ignored"))
+                       "delete,delete_self"))
+              ((memq 'attribute-change flags) "attrib"))
+              events (concat events ",ignored,unmount")
              ;; "-P" has been added to version 3.21, so we cannot assume it 
yet.
              sequence `(,command "-mq" "-e" ,events ,localname)
              ;; Make events a list of symbols.
@@ -3821,10 +3825,10 @@ Fall back to normal file name handler if no Tramp 
handler exists."
              (cond
               ((and (memq 'change flags) (memq 'attribute-change flags))
                '(created changed changes-done-hint moved deleted
-                         attribute-changed))
+                         attribute-changed unmounted))
               ((memq 'change flags)
-               '(created changed changes-done-hint moved deleted))
-              ((memq 'attribute-change flags) '(attribute-changed)))
+               '(created changed changes-done-hint moved deleted unmounted))
+              ((memq 'attribute-change flags) '(attribute-changed unmounted)))
              sequence `(,command "monitor" ,localname)))
        ;; None.
        (t (tramp-error
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el
index f3f2c40e62c..ac1b29f08cd 100644
--- a/lisp/net/tramp-smb.el
+++ b/lisp/net/tramp-smb.el
@@ -722,6 +722,9 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are 
completely ignored."
       (tramp-run-real-handler #'expand-file-name (list name))
     ;; Dissect NAME.
     (with-parsed-tramp-file-name name nil
+      ;; Tilde expansion shall be possible also for quoted localname.
+      (when (string-prefix-p "~" (file-name-unquote localname))
+       (setq localname (file-name-unquote localname)))
       ;; Tilde expansion if necessary.
       (when (string-match
             (rx bos "~" (group (* (not "/"))) (group (* nonl)) eos) localname)
diff --git a/lisp/net/tramp-sudoedit.el b/lisp/net/tramp-sudoedit.el
index c22bfd7ff5c..40e438435fc 100644
--- a/lisp/net/tramp-sudoedit.el
+++ b/lisp/net/tramp-sudoedit.el
@@ -381,6 +381,9 @@ the result will be a local, non-Tramp, file name."
       ;; but to the root home directory.
       (when (tramp-string-empty-or-nil-p localname)
        (setq localname "~"))
+      ;; Tilde expansion shall be possible also for quoted localname.
+      (when (string-prefix-p "~" (file-name-unquote localname))
+       (setq localname (file-name-unquote localname)))
       (unless (file-name-absolute-p localname)
        (setq localname (format "~%s/%s" user localname)))
       (when (string-match
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index bff9a010c3b..7cc9b0c14a2 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -414,7 +414,7 @@ Another host name is useful only in combination with
   ;; an external method.
   (cond
    ;; PuTTY is installed.  We don't take it, if it is installed on a
-   ;; non-windows system, or pscp from the pssh (parallel ssh) package
+   ;; non-Windows system, or pscp from the pssh (parallel ssh) package
    ;; is found.
    ((and (eq system-type 'windows-nt) (executable-find "pscp")) "pscp")
    ;; There is an ssh installation.
@@ -3811,6 +3811,9 @@ Let-bind it when necessary.")
     (with-parsed-tramp-file-name name nil
       (unless (tramp-run-real-handler #'file-name-absolute-p (list localname))
        (setq localname (concat "/" localname)))
+      ;; Tilde expansion shall be possible also for quoted localname.
+      (when (string-prefix-p "~" (file-name-unquote localname))
+       (setq localname (file-name-unquote localname)))
       ;; Expand tilde.  Usually, the methods applying this handler do
       ;; not support tilde expansion.  But users could declare a
       ;; respective connection property.  (Bug#53847)
diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el
index 4d56cf367e3..aefe14e845e 100644
--- a/lisp/net/trampver.el
+++ b/lisp/net/trampver.el
@@ -105,7 +105,7 @@
          ("2.3.5.26.3" . "26.3")
          ("2.4.3.27.1" . "27.1") ("2.4.5.27.2" . "27.2")
          ("2.5.2.28.1" . "28.1") ("2.5.3.28.2" . "28.2") ("2.5.4" . "28.3")
-         ("2.6.0.29.1" . "29.1")))
+         ("2.6.0.29.1" . "29.1") ("2.6.2.29.2" . "29.2")))
 
 (add-hook 'tramp-unload-hook
          (lambda ()
diff --git a/lisp/net/webjump.el b/lisp/net/webjump.el
index fe7c3679876..77f00578a48 100644
--- a/lisp/net/webjump.el
+++ b/lisp/net/webjump.el
@@ -1,6 +1,6 @@
 ;;; webjump.el --- programmable Web hotlist  -*- lexical-binding: t; -*-
 
-;; Copyright (C) 1996-1997, 2001-2023 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2023 Free Software Foundation, Inc.
 
 ;; Author:     Neil W. Van Dyke <nwv@acm.org>
 ;; Maintainer: emacs-devel@gnu.org
@@ -123,7 +123,7 @@ external browser like IceCat."
     ;; Misc. general interest.
     ("National Weather Service" . webjump-to-iwin)
     ("Usenet FAQs" .
-     "www.faqs.org/faqs/")
+     "http://www.faqs.org/faqs/";)
     ("RTFM Usenet FAQs by Group" .
      "ftp://rtfm.mit.edu/pub/usenet-by-group/";)
     ("RTFM Usenet FAQs by Hierarchy" .
@@ -132,7 +132,7 @@ external browser like IceCat."
 
     ;; Computer social issues, privacy, professionalism.
     ("Association for Computing Machinery" . "www.acm.org")
-    ("Computer Professionals for Social Responsibility" . "www.cpsr.org")
+    ("Computer Professionals for Social Responsibility" . 
"http://www.cpsr.org";)
     ("Electronic Frontier Foundation" . "www.eff.org")
     ("IEEE Computer Society" . "www.computer.org")
     ("Risks Digest" . webjump-to-risks)
@@ -194,7 +194,7 @@ If the symbol of a function is given, then the function 
will be called with the
 Web site name (the one you specified in the CAR of the alist cell) as a
 parameter.  This might come in handy for various kludges.
 
-For convenience, if the `http://', `ftp://', or `file://' prefix is missing
+For convenience, if the `https://', `ftp://', or `file://' prefix is missing
 from a URL, WebJump will make a guess at what you wanted and prepend it before
 submitting the URL."
   :type '(alist :key-type (string :tag "Name")
@@ -262,33 +262,22 @@ Please submit bug reports and other feedback to the 
author, Neil W. Van Dyke
                (completing-read "WebJump to site: " webjump-sites nil t)
                webjump-sites t))
         (name (car item))
-        (expr (cdr item)))
-    (if webjump-use-internal-browser
-        (browse-url-with-browser-kind
-         'internal (webjump-url-fix
-                    (cond ((not expr) "")
-                          ((stringp expr) expr)
-                          ((vectorp expr) (webjump-builtin expr name))
-                          ((listp expr) (eval expr t))
-                          ((symbolp expr)
-                           (if (fboundp expr)
-                               (funcall expr name)
-                             (error "WebJump URL function \"%s\" undefined"
-                                    expr)))
-                          (t (error "WebJump URL expression for \"%s\" invalid"
-                                    name)))))
-      (browse-url (webjump-url-fix
-                   (cond ((not expr) "")
-                         ((stringp expr) expr)
-                         ((vectorp expr) (webjump-builtin expr name))
-                         ((listp expr) (eval expr t))
-                         ((symbolp expr)
-                          (if (fboundp expr)
-                              (funcall expr name)
-                            (error "WebJump URL function \"%s\" undefined"
-                                   expr)))
-                         (t (error "WebJump URL expression for \"%s\" invalid"
-                                   name))))))))
+         (expr (cdr item))
+         (fun (if webjump-use-internal-browser
+                  (apply-partially #'browse-url-with-browser-kind 'internal)
+                #'browse-url)))
+    (funcall fun (webjump-url-fix
+                  (cond ((not expr) "")
+                        ((stringp expr) expr)
+                        ((vectorp expr) (webjump-builtin expr name))
+                        ((listp expr) (eval expr t))
+                        ((symbolp expr)
+                         (if (fboundp expr)
+                             (funcall expr name)
+                           (error "WebJump URL function \"%s\" undefined"
+                                  expr)))
+                        (t (error "WebJump URL expression for \"%s\" invalid"
+                                  name)))))))
 
 (defun webjump-builtin (expr name)
   (if (< (length expr) 1)
@@ -380,9 +369,11 @@ Please submit bug reports and other feedback to the 
author, Neil W. Van Dyke
       ((string-match "^[a-zA-Z]+:" url) url)
       ((string-match "^/" url) (concat "file://" url))
       ((string-match "^\\([^\\./]+\\)" url)
+       ;; FIXME: ftp.gnu.org and many others now prefer HTTPS instead
+       ;;        of FTP.  Does this heuristic make sense these days?
        (concat (if (string= (downcase (match-string 1 url)) "ftp")
                   "ftp"
-                "http")
+                 "https")
               "://"
               url))
       (t url)))))
diff --git a/lisp/org/ob-lua.el b/lisp/org/ob-lua.el
index 81521d9e0a5..7eaf5e00b13 100644
--- a/lisp/org/ob-lua.el
+++ b/lisp/org/ob-lua.el
@@ -326,7 +326,7 @@ last statement in BODY, as elisp."
 If RESULT-TYPE equals `output' then return standard output as a
 string.  If RESULT-TYPE equals `value' then return the value of the
 last statement in BODY, as elisp."
-  (let* ((send-wait (lambda () (comint-send-input nil t) (sleep-for 0 5)))
+  (let* ((send-wait (lambda () (comint-send-input nil t) (sleep-for 0.005)))
         (dump-last-value
          (lambda
            (tmp-file pp)
diff --git a/lisp/org/ob-python.el b/lisp/org/ob-python.el
index 6c05d1c8b2a..48a906a1934 100644
--- a/lisp/org/ob-python.el
+++ b/lisp/org/ob-python.el
@@ -235,7 +235,7 @@ then create.  Return the initialized session."
           ;; multiple prompts during initialization.
           (with-current-buffer py-buffer
             (while (not org-babel-python--initialized)
-              (sleep-for 0 10)))
+              (sleep-for 0.01)))
         (org-babel-comint-wait-for-output py-buffer))
       (setq org-babel-python-buffers
            (cons (cons session py-buffer)
@@ -403,7 +403,7 @@ last statement in BODY, as elisp."
                      (body (org-babel-python-format-session-value
                             tmp-src-file tmp-results-file result-params)))
                 (org-babel-python--send-string session body)
-                (sleep-for 0 10)
+                 (sleep-for 0.01)
                 (org-babel-eval-read-file tmp-results-file)))))))
     (org-babel-result-cond result-params
       results
diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el
index d3e61643190..38e81d9d713 100644
--- a/lisp/org/org-agenda.el
+++ b/lisp/org/org-agenda.el
@@ -6784,7 +6784,8 @@ scheduled items with an hour specification like [h]h:mm."
                          (let ((deadline (time-to-days
                                            (when (org-element-property 
:deadline el)
                                              (org-time-string-to-time
-                                              (org-element-property :deadline 
el))))))
+                                              (org-element-interpret-data
+                                               (org-element-property :deadline 
el)))))))
                            (and (<= schedule deadline) (> current deadline))))
                         (`not-today pastschedp)
                         (`t t)
diff --git a/lisp/org/org-colview.el b/lisp/org/org-colview.el
index 28cfd0d910c..475416ecf74 100644
--- a/lisp/org/org-colview.el
+++ b/lisp/org/org-colview.el
@@ -525,7 +525,8 @@ for the duration of the command.")
       (setq header-line-format org-previous-header-line-format)
       (kill-local-variable 'org-previous-header-line-format)
       (remove-hook 'post-command-hook #'org-columns-hscroll-title 'local))
-    (set-marker org-columns-begin-marker nil)
+    (when (markerp org-columns-begin-marker)
+      (set-marker org-columns-begin-marker nil))
     (when (markerp org-columns-top-level-marker)
       (set-marker org-columns-top-level-marker nil))
     (with-silent-modifications
diff --git a/lisp/org/org-version.el b/lisp/org/org-version.el
index a859fe6d412..cfef38581c6 100644
--- a/lisp/org/org-version.el
+++ b/lisp/org/org-version.el
@@ -5,13 +5,13 @@
 (defun org-release ()
   "The release version of Org.
 Inserted by installing Org mode or when a release is made."
-   (let ((org-release "9.6.9"))
+   (let ((org-release "9.6.10"))
      org-release))
 ;;;###autoload
 (defun org-git-version ()
   "The Git version of Org mode.
 Inserted by installing Org or when a release is made."
-   (let ((org-git-version "release_9.6.9"))
+   (let ((org-git-version "release_9.6.10"))
      org-git-version))
 
 (provide 'org-version)
diff --git a/lisp/org/org.el b/lisp/org/org.el
index 9ca7f155614..8b02721a859 100644
--- a/lisp/org/org.el
+++ b/lisp/org/org.el
@@ -9,7 +9,7 @@
 ;; URL: https://orgmode.org
 ;; Package-Requires: ((emacs "26.1"))
 
-;; Version: 9.6.9
+;; Version: 9.6.10
 
 ;; This file is part of GNU Emacs.
 ;;
diff --git a/lisp/pcmpl-unix.el b/lisp/pcmpl-unix.el
index e6b67256a4c..7af5f2bce74 100644
--- a/lisp/pcmpl-unix.el
+++ b/lisp/pcmpl-unix.el
@@ -685,6 +685,14 @@ Includes files as well as host names followed by a colon."
   (funcall (or (pcomplete-find-completion-function (pcomplete-arg 1))
               pcomplete-default-completion-function)))
 
+;;;###autoload
+(defun pcomplete/doas ()
+  "Completion for the `doas' command."
+  (pcomplete-opt "C(pcomplete-entries)Lnsu(pcmpl-unix-user-names)")
+  (funcall pcomplete-command-completion-function)
+  (funcall (or (pcomplete-find-completion-function (pcomplete-arg 1))
+               pcomplete-default-completion-function)))
+
 (provide 'pcmpl-unix)
 
 ;;; pcmpl-unix.el ends here
diff --git a/lisp/pcomplete.el b/lisp/pcomplete.el
index 0457f1b00c0..3dde001328d 100644
--- a/lisp/pcomplete.el
+++ b/lisp/pcomplete.el
@@ -685,35 +685,13 @@ parts of the list.
 
 The OFFSET argument is added to/taken away from the index that will be
 used.  This is really only useful with `first' and `last', for
-accessing absolute argument positions.
-
-When the argument has been transformed into something that is not
-a string by `pcomplete-parse-arguments-function', the text
-representation of the argument, namely what the user actually
-typed in, is returned, and the value of the argument is stored in
-the pcomplete-arg-value text property of that string."
-  (let ((arg
-         (nth (+ (pcase index
-                  ('first 0)
-                  ('last  pcomplete-last)
-                  (_      (- pcomplete-index (or index 0))))
-                (or offset 0))
-              pcomplete-args)))
-    (if (or (stringp arg)
-            ;; FIXME: 'last' is handled specially in Emacs 29, because
-            ;; 'pcomplete-parse-arguments' accepts a list of strings
-            ;; (which are completion candidates) as return value for
-            ;; (pcomplete-arg 'last).  See below: "it means it's a
-            ;; list of completions computed during parsing,
-            ;; e.g. Eshell uses that to turn globs into lists of
-            ;; completions".  This special case will be dealt with
-            ;; differently in Emacs 30: the pcomplete-arg-value
-            ;; property will be used by 'pcomplete-parse-arguments'.
-            (eq index 'last))
-        arg
-      (propertize
-       (car (split-string (pcomplete-actual-arg index offset)))
-       'pcomplete-arg-value arg))))
+accessing absolute argument positions."
+  (nth (+ (pcase index
+            ('first 0)
+            ('last  pcomplete-last)
+            (_      (- pcomplete-index (or index 0))))
+          (or offset 0))
+       pcomplete-args))
 
 (defun pcomplete-begin (&optional index offset)
   "Return the beginning position of the INDEXth argument.
diff --git a/lisp/printing.el b/lisp/printing.el
index 8aea58e157b..cb43f7e40dc 100644
--- a/lisp/printing.el
+++ b/lisp/printing.el
@@ -1,6 +1,6 @@
 ;;; printing.el --- printing utilities  -*- lexical-binding:t -*-
 
-;; Copyright (C) 2000-2001, 2003-2023 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2023 Free Software Foundation, Inc.
 
 ;; Author: Vinicius Jose Latorre <viniciusjl.gnu@gmail.com>
 ;; Keywords: wp, print, PostScript
@@ -5518,7 +5518,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order."
          (setq ext (cdr ext)
                found nil))
        found)
-    ;; non-windows systems
+    ;; non-Windows systems
     (and (file-regular-p cmd)
         (file-executable-p cmd)
         cmd)))
diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el
index 15b103a081f..658892414bc 100644
--- a/lisp/progmodes/cc-cmds.el
+++ b/lisp/progmodes/cc-cmds.el
@@ -4909,7 +4909,8 @@ If a fill prefix is specified, it overrides all the 
above."
           (setq c-lit-limits (c-literal-limits nil nil t)))
         (unless c-lit-type
           (setq c-lit-type (c-literal-type c-lit-limits)))
-        (if (memq (cond ((c-query-and-set-macro-start) 'cpp)
+        (if (memq (cond ((memq c-lit-type '(c c++ string)) c-lit-type)
+                        ((c-query-and-set-macro-start) 'cpp)
                         ((null c-lit-type) 'code)
                         (t c-lit-type))
                   c-ignore-auto-fill)
diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el
index 8662e0cade6..e15ce54da7f 100644
--- a/lisp/progmodes/cc-defs.el
+++ b/lisp/progmodes/cc-defs.el
@@ -927,7 +927,8 @@ be after it."
      (when dest (goto-char dest) t)))
 
 (defmacro c-beginning-of-defun-1 ()
-  ;; Wrapper around beginning-of-defun.
+  ;; Wrapper around beginning-of-defun.  Note that the return value from this
+  ;; macro has no significance.
   ;;
   ;; NOTE: This function should contain the only explicit use of
   ;; beginning-of-defun in CC Mode.  Eventually something better than
@@ -940,44 +941,49 @@ be after it."
   ;; `c-parse-state'.
 
   `(progn
-     (if (and ,(fboundp 'buffer-syntactic-context-depth)
-             c-enable-xemacs-performance-kludge-p)
-        ,(when (fboundp 'buffer-syntactic-context-depth)
-           ;; XEmacs only.  This can improve the performance of
-           ;; c-parse-state to between 3 and 60 times faster when
-           ;; braces are hung.  It can also degrade performance by
-           ;; about as much when braces are not hung.
-           '(let (beginning-of-defun-function end-of-defun-function
-                                              pos)
-              (while (not pos)
-                (save-restriction
-                  (widen)
-                  (setq pos (c-safe-scan-lists
-                             (point) -1 (buffer-syntactic-context-depth))))
-                (cond
-                 ((bobp) (setq pos (point-min)))
-                 ((not pos)
-                  (let ((distance (skip-chars-backward "^{")))
-                    ;; unbalanced parenthesis, while invalid C code,
-                    ;; shouldn't cause an infloop!  See unbal.c
-                    (when (zerop distance)
-                      ;; Punt!
-                      (beginning-of-defun)
-                      (setq pos (point)))))
-                 ((= pos 0))
-                 ((not (eq (char-after pos) ?{))
-                  (goto-char pos)
-                  (setq pos nil))
-                 ))
-              (goto-char pos)))
-       ;; Emacs, which doesn't have buffer-syntactic-context-depth
-       (let (beginning-of-defun-function end-of-defun-function)
-        (beginning-of-defun)))
-     ;; if defun-prompt-regexp is non-nil, b-o-d won't leave us at the
-     ;; open brace.
-     (and defun-prompt-regexp
-         (looking-at defun-prompt-regexp)
-         (goto-char (match-end 0)))))
+     (while
+        (progn
+          (if (and ,(fboundp 'buffer-syntactic-context-depth)
+                   c-enable-xemacs-performance-kludge-p)
+              ,(when (fboundp 'buffer-syntactic-context-depth)
+                 ;; XEmacs only.  This can improve the performance of
+                 ;; c-parse-state to between 3 and 60 times faster when
+                 ;; braces are hung.  It can also degrade performance by
+                 ;; about as much when braces are not hung.
+                 '(let (beginning-of-defun-function end-of-defun-function
+                                                    pos)
+                    (while (not pos)
+                      (save-restriction
+                        (widen)
+                        (setq pos (c-safe-scan-lists
+                                   (point) -1 
(buffer-syntactic-context-depth))))
+                      (cond
+                       ((bobp) (setq pos (point-min)))
+                       ((not pos)
+                        (let ((distance (skip-chars-backward "^{")))
+                          ;; unbalanced parenthesis, while invalid C code,
+                          ;; shouldn't cause an infloop!  See unbal.c
+                          (when (zerop distance)
+                            ;; Punt!
+                            (beginning-of-defun)
+                            (setq pos (point)))))
+                       ((= pos 0))
+                       ((not (eq (char-after pos) ?{))
+                        (goto-char pos)
+                        (setq pos nil))
+                       ))
+                    (goto-char pos)))
+            ;; Emacs, which doesn't have buffer-syntactic-context-depth
+            (let (beginning-of-defun-function end-of-defun-function)
+              (beginning-of-defun)))
+          (and (not (bobp))
+               ;; if defun-prompt-regexp is non-nil, b-o-d won't leave us at
+               ;; the open brace.
+               defun-prompt-regexp
+               (looking-at (concat defun-prompt-regexp "\\s("))
+               (or (not (eq (char-before (match-end 0)) ?{))
+                   (progn (goto-char (1- (match-end 0)))
+                          nil)))))))
 
 
 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index e687f44d657..f5e0d21108f 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -12266,11 +12266,14 @@ comment at the start of cc-engine.el for more info."
                       ;; Each time around the following checks one
                       ;; declaration (which may contain several identifiers).
                       (while (and
-                              (consp (setq decl-or-cast
-                                           (c-forward-decl-or-cast-1
-                                            after-prec-token
-                                            nil ; Or 'arglist ???
-                                            nil)))
+                              (not (eq (char-after) ?{))
+                              (or
+                               (consp (setq decl-or-cast
+                                            (c-forward-decl-or-cast-1
+                                             after-prec-token
+                                             nil ; Or 'arglist ???
+                                             nil)))
+                               (throw 'knr nil))
                               (memq (char-after) '(?\; ?\,))
                               (goto-char (car decl-or-cast))
                               (save-excursion
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 2b0519c314d..d8ba2b35ded 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -683,7 +683,10 @@ File = \\(.+\\), Line = \\([0-9]+\\)\\(?:, Column = 
\\([0-9]+\\)\\)?"
   "Alist of values for `compilation-error-regexp-alist'.")
 
 (defcustom compilation-error-regexp-alist
-  (mapcar #'car compilation-error-regexp-alist-alist)
+  ;; Omit `omake' by default: its mere presence here triggers special 
processing
+  ;; and modifies regexps for other rules (see `compilation-parse-errors'),
+  ;; which may slow down matching (or even cause mismatches).
+  (delq 'omake (mapcar #'car compilation-error-regexp-alist-alist))
   "Alist that specifies how to match errors in compiler output.
 On GNU and Unix, any string is a valid filename, so these
 matchers must make some common sense assumptions, which catch
@@ -2725,7 +2728,7 @@ looking for the next message."
          (compilation-loop > compilation-next-single-property-change 1-
                            (if (get-buffer-process (current-buffer))
                                "No more %ss yet"
-                             "Moved past last %s")
+                             "Past last %s")
                            (point-max))
        ;; Don't move "back" to message at or before point.
        ;; Pass an explicit (point-min) to make sure pt is non-nil.
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
index 1736b45c72d..807927aa86d 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -473,12 +473,6 @@ If nil, the value of `cperl-indent-level' will be used."
   :group 'cperl)
 (make-obsolete-variable 'cperl-under-as-char 'superword-mode "24.4")
 
-(defcustom cperl-extra-perl-args ""
-  "Extra arguments to use when starting Perl.
-Currently used with `cperl-check-syntax' only."
-  :type 'string
-  :group 'cperl)
-
 (defcustom cperl-message-electric-keyword t
   "Non-nil means that the `cperl-electric-keyword' prints a help message."
   :type 'boolean
@@ -550,6 +544,18 @@ This way enabling/disabling of menu items is more correct."
   :version "29.1")
 ;;;###autoload(put 'cperl-file-style 'safe-local-variable 'stringp)
 
+(defcustom cperl-fontify-trailer
+  'perl-code
+  "How to fontify text after an \"__END__\" or \"__DATA__\" token.
+If \"perl-code\", treat as Perl code for fontification, and
+examine for imenu entries.  Use this setting if you have trailing
+POD documentation, or for modules which use AutoLoad or
+AutoSplit.  If \"comment\", treat as comment, and do not look for
+imenu entries."
+  :type '(choice (const perl-code)
+                (const comment))
+  :group 'cperl-faces)
+
 (defcustom cperl-ps-print-face-properties
   '((font-lock-keyword-face            nil nil         bold shadow)
     (font-lock-variable-name-face      nil nil         bold)
@@ -619,10 +625,7 @@ This way enabling/disabling of menu items is more correct."
 ;;; Short extra-docs.
 
 (defvar cperl-tips 'please-ignore-this-line
-  "Note that to enable Compile choices in the menu you need to install
-mode-compile.el.
-
-If your Emacs does not default to `cperl-mode' on Perl files, and you
+  "If your Emacs does not default to `cperl-mode' on Perl files, and you
 want it to: put the following into your .emacs file:
 
   (add-to-list \\='major-mode-remap-alist \\='(perl-mode . cperl-mode))
@@ -1044,12 +1047,6 @@ Unless KEEP, removes the old indentation."
     ["Comment region" cperl-comment-region (use-region-p)]
     ["Uncomment region" cperl-uncomment-region (use-region-p)]
     "----"
-    ["Run" mode-compile (fboundp 'mode-compile)]
-    ["Kill" mode-compile-kill (and (fboundp 'mode-compile-kill)
-                                   (get-buffer "*compilation*"))]
-    ["Next error" next-error (get-buffer "*compilation*")]
-    ["Check syntax" cperl-check-syntax (fboundp 'mode-compile)]
-    "----"
     ["Debugger" cperl-db t]
     "----"
     ("Tools"
@@ -2841,6 +2838,7 @@ Will not look before LIM."
                   ;; in which case this line is the first argument decl.
                   (skip-chars-forward " \t")
                   (cperl-backward-to-noncomment (or old-indent (point-min)))
+                   ;; Determine whether point is between statements
                   (setq state
                         (or (bobp)
                             (eq (point) old-indent) ; old-indent was at comment
@@ -2859,7 +2857,8 @@ Will not look before LIM."
                                    (looking-at
                                      (rx (sequence (0+ blank)
                                                    (eval cperl--label-rx))))))
-                            (get-text-property (point) 'first-format-line)))
+                            (get-text-property (1- (point)) 'first-format-line)
+                             (equal (get-text-property (point) 'syntax-type) 
'format)))
 
                   ;; Look at previous line that's at column 0
                   ;; to determine whether we are in top-level decls
@@ -3961,8 +3960,8 @@ recursive calls in starting lines of here-documents."
           "\\([^\"'`\n]*\\)"           ; 4 + 1
           "\\4"
           "\\|"
-          ;; Second variant: Identifier or \ID (same as 'ID') or empty
-          "\\\\?\\(\\([a-zA-Z_][a-zA-Z_0-9]*\\)?\\)" ; 5 + 1, 6 + 1
+          ;; Second variant: Identifier or \ID (same as 'ID')
+          "\\\\?\\(\\([a-zA-Z_][a-zA-Z_0-9]*\\)\\)" ; 5 + 1, 6 + 1
           ;; Do not have <<= or << 30 or <<30 or << $blah.
           ;; "\\([^= \t0-9$@%&]\\|[ \t]+[^ \t\n0-9$@%&]\\)" ; 6 + 1
           "\\)"
@@ -4189,9 +4188,8 @@ recursive calls in starting lines of here-documents."
                ;; 1+6=7 extra () before this:
                ;;"^[ \t]*\\(format\\)[ \t]*\\([a-zA-Z0-9_]+\\)?[ \t]*=[ \t]*$"
                (setq b (point)
-                     name (if (match-beginning 8) ; 7 + 1
-                              (buffer-substring (match-beginning 8) ; 7 + 1
-                                                (match-end 8)) ; 7 + 1
+                     name (if (match-beginning 9) ; 7 + 2
+                               (match-string-no-properties 9)        ; 7 + 2
                             "")
                      tb (match-beginning 0))
                (setq argument nil)
@@ -4224,10 +4222,10 @@ recursive calls in starting lines of here-documents."
                (if (looking-at "^\\.$") ; ";" is not supported yet
                    (progn
                      ;; Highlight the ending delimiter
-                     (cperl-postpone-fontification (point) (+ (point) 2)
+                     (cperl-postpone-fontification (point) (+ (point) 1)
                                                    'face font-lock-string-face)
-                     (cperl-commentify (point) (+ (point) 2) nil)
-                     (cperl-put-do-not-fontify (point) (+ (point) 2) t))
+                     (cperl-commentify (point) (+ (point) 1) nil)
+                     (cperl-put-do-not-fontify (point) (+ (point) 1) t))
                  (setq warning-message
                         (format "End of format `%s' not found." name))
                  (or (car err-l) (setcar err-l b)))
@@ -4913,8 +4911,9 @@ recursive calls in starting lines of here-documents."
               ;; 1+6+2+1+1+6+1+1=19 extra () before this:
               ;; "__\\(END\\|DATA\\)__"
               ((match-beginning 20)    ; __END__, __DATA__
-               (setq bb (match-end 0))
-               ;; (put-text-property b (1+ bb) 'syntax-type 'pod) ; Cheat
+                (if (eq cperl-fontify-trailer 'perl-code)
+                   (setq bb (match-end 0))
+                  (setq bb (point-max)))
                (cperl-commentify b bb nil)
                (setq end t))
               ;; "\\\\\\(['`\"($]\\)"
@@ -6049,35 +6048,6 @@ functions (which they are not).  Inherits from 
`default'.")
             ;; (matcher subexp facespec)
            '("^[ \t]*format[ \t]+\\([a-zA-Z_][a-zA-Z_0-9:]*\\)[ \t]*=[ \t]*$"
              1 font-lock-function-name-face)
-            ;; -------- bareword hash key: $foo{bar}, $foo[1]{bar}
-            ;; (matcher (subexp facespec) ...
-            `(,(rx (or (in "]}\\%@>*&")
-                       (sequence "$" (eval cperl--normal-identifier-rx)))
-                   (0+ blank) "{" (0+ blank)
-                   (group-n 1 (sequence (opt "-")
-                                        (eval cperl--basic-identifier-rx)))
-                   (0+ blank) "}")
-;;         '("\\([]}\\%@>*&]\\|\\$[a-zA-Z0-9_:]*\\)[ \t]*{[ 
\t]*\\(-?[a-zA-Z0-9_:]+\\)[ \t]*}"
-             (1 font-lock-string-face t)
-              ;; -------- anchored bareword hash key: $foo{bar}{baz}
-              ;; ... (anchored-matcher pre-form post-form subex-highlighters)
-              (,(rx point
-                    (0+ blank) "{" (0+ blank)
-                    (group-n 1 (sequence (opt "-")
-                                         (eval cperl--basic-identifier-rx)))
-                    (0+ blank) "}")
-              ;; ("\\=[ \t]*{[ \t]*\\(-?[a-zA-Z0-9_:]+\\)[ \t]*}"
-              nil nil
-              (1 font-lock-string-face t)))
-            ;; -------- hash element assignments with bareword key => value
-            ;; (matcher subexp facespec)
-            `(,(rx (in "[ \t{,()")
-                   (group-n 1 (sequence (opt "-")
-                                        (eval cperl--basic-identifier-rx)))
-                   (0+ blank) "=>")
-              1 font-lock-string-face t)
-            ;;     '("[[ \t{,(]\\(-?[a-zA-Z0-9_:]+\\)[ \t]*=>" 1
-            ;;       font-lock-string-face t)
             ;; -------- labels
             ;; (matcher subexp facespec)
             `(,(rx
@@ -6177,32 +6147,33 @@ functions (which they are not).  Inherits from 
`default'.")
          (setq
           t-font-lock-keywords-1
           `(
-             ;; -------- arrays and hashes.  Access to elements is fixed below
-             ;; (matcher subexp facespec)
-             ;; facespec is an expression to distinguish between arrays and 
hashes
-             (,(rx (group-n 1 (group-n 2 (or (in "@%") "$#"))
-                            (eval cperl--normal-identifier-rx)))
-              1
-;;          ("\\(\\([@%]\\|\\$#\\)[a-zA-Z_:][a-zA-Z0-9_:]*\\)" 1
-             (if (eq (char-after (match-beginning 2)) ?%)
-                 'cperl-hash-face
-               'cperl-array-face)
-             nil)
-             ;; -------- access to array/hash elements
-             ;; (matcher subexp facespec)
-             ;; facespec is an expression to distinguish between arrays and 
hashes
-             (,(rx (group-n 1 (group-n 2 (in "$@%"))
-                            (eval cperl--normal-identifier-rx))
-                   (0+ blank)
-                   (group-n 3 (in "[{")))
-;;          ("\\(\\([$@%]+\\)[a-zA-Z_:][a-zA-Z0-9_:]*\\)[ \t]*\\([[{]\\)"
-             1
-             (if (= (- (match-end 2) (match-beginning 2)) 1)
-                 (if (eq (char-after (match-beginning 3)) ?{)
-                     'cperl-hash-face
-                   'cperl-array-face)             ; arrays and hashes
-               font-lock-variable-name-face)      ; Just to put something
-             t)                                   ; override previous
+            ;; -------- bareword hash key: $foo{bar}, $foo[1]{bar}
+            ;; (matcher (subexp facespec) ...
+            (,(rx (or (in "]}\\%@>*&")
+                       (sequence "$" (eval cperl--normal-identifier-rx)))
+                   (0+ blank) "{" (0+ blank)
+                   (group-n 1 (sequence (opt "-")
+                                        (eval cperl--basic-identifier-rx)))
+                   (0+ blank) "}")
+;;         '("\\([]}\\%@>*&]\\|\\$[a-zA-Z0-9_:]*\\)[ \t]*{[ 
\t]*\\(-?[a-zA-Z0-9_:]+\\)[ \t]*}"
+             (1 font-lock-string-face)
+              ;; -------- anchored bareword hash key: $foo{bar}{baz}
+              ;; ... (anchored-matcher pre-form post-form subex-highlighters)
+              (,(rx point
+                    (0+ blank) "{" (0+ blank)
+                    (group-n 1 (sequence (opt "-")
+                                         (eval cperl--basic-identifier-rx)))
+                    (0+ blank) "}")
+              ;; ("\\=[ \t]*{[ \t]*\\(-?[a-zA-Z0-9_:]+\\)[ \t]*}"
+              nil nil
+              (1 font-lock-string-face)))
+            ;; -------- hash element assignments with bareword key => value
+            ;; (matcher subexp facespec)
+            (,(rx (in "[ \t{,()")
+                   (group-n 1 (sequence (opt "-")
+                                        (eval cperl--basic-identifier-rx)))
+                   (0+ blank) "=>")
+              1 font-lock-string-face)
              ;; -------- @$ array dereferences, $#$ last array index
              ;; (matcher (subexp facespec) (subexp facespec))
              (,(rx (group-n 1 (or "@" "$#"))
@@ -6221,6 +6192,32 @@ functions (which they are not).  Inherits from 
`default'.")
             ;; ("\\(%\\)\\(\\$+\\([a-zA-Z_:][a-zA-Z0-9_:]*\\|[^ \t\n]\\)\\)"
              (1 'cperl-hash-face)
              (2 font-lock-variable-name-face))
+             ;; -------- access to array/hash elements
+             ;; (matcher subexp facespec)
+             ;; facespec is an expression to distinguish between arrays and 
hashes
+             (,(rx (group-n 1 (group-n 2 (in "$@%"))
+                            (eval cperl--normal-identifier-rx))
+                   (0+ blank)
+                   (group-n 3 (in "[{")))
+;;          ("\\(\\([$@%]+\\)[a-zA-Z_:][a-zA-Z0-9_:]*\\)[ \t]*\\([[{]\\)"
+             1
+             (if (= (- (match-end 2) (match-beginning 2)) 1)
+                 (if (eq (char-after (match-beginning 3)) ?{)
+                     'cperl-hash-face
+                   'cperl-array-face)             ; arrays and hashes
+               font-lock-variable-name-face)      ; Just to put something
+             nil)                                 ; do not override previous
+             ;; -------- "Pure" arrays and hashes.
+             ;; (matcher subexp facespec)
+             ;; facespec is an expression to distinguish between arrays and 
hashes
+             (,(rx (group-n 1 (group-n 2 (or (in "@%") "$#"))
+                            (eval cperl--normal-identifier-rx)))
+              1
+;;          ("\\(\\([@%]\\|\\$#\\)[a-zA-Z_:][a-zA-Z0-9_:]*\\)" 1
+             (if (eq (char-after (match-beginning 2)) ?%)
+                 'cperl-hash-face
+               'cperl-array-face)
+             nil)
 ;;("\\([smy]\\|tr\\)\\([^a-z_A-Z0-9]\\)\\(\\([^\n\\]*||\\)\\)\\2")
 ;;; Too much noise from \s* @s[ and friends
             ;;("\\(\\<\\([msy]\\|tr\\)[ \t]*\\([^ 
\t\na-zA-Z0-9_]\\)\\|\\(/\\)\\)"
@@ -6549,13 +6546,6 @@ side-effect of memorizing only.  Examples in 
`cperl-style-examples'."
            cperl-old-style (cdr cperl-old-style))
       (set (car setting) (cdr setting)))))
 
-(defvar perl-dbg-flags)
-(defun cperl-check-syntax ()
-  (interactive)
-  (require 'mode-compile)
-  (let ((perl-dbg-flags (concat cperl-extra-perl-args " -wc")))
-    (eval '(mode-compile))))           ; Avoid a warning
-
 (declare-function Info-find-node "info"
                  (filename nodename &optional no-going-back strict-case
                             noerror))
diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index e511df01850..eba66503bf7 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -467,7 +467,9 @@ ACTION is the default value for commands not in the alist."
   "If non-nil, show progress of long running LSP server work.
 If set to `messages', use *Messages* buffer, else use Eglot's
 mode line indicator."
-  :type 'boolean
+  :type '(choice (const :tag "Don't show progress" nil)
+                 (const :tag "Show progress in *Messages*" messages)
+                 (const :tag "Show progress in Eglot's mode line indicator" t))
   :version "1.10")
 
 (defcustom eglot-ignored-server-capabilities (list)
@@ -504,10 +506,6 @@ under cursor."
   "If non-nil, Eglot will not send the Emacs process id to the language server.
 This can be useful when using docker to run a language server.")
 
-;; Customizable via `completion-category-overrides'.
-(when (assoc 'flex completion-styles-alist)
-  (add-to-list 'completion-category-defaults '(eglot (styles flex basic))))
-
 
 ;;; Constants
 ;;;
@@ -3036,11 +3034,32 @@ for which LSP on-type-formatting should be requested."
 
 (defun eglot--capf-session-flush (&optional _) (setq eglot--capf-session 
:none))
 
+(defun eglot--dumb-flex (pat comp ignorecase)
+  "Return destructively fontified COMP iff PAT matches it."
+  (cl-loop with lcomp = (length comp)
+           with case-fold-search = ignorecase
+           initially (remove-list-of-text-properties 0 lcomp '(face) comp)
+           for x across pat
+           for i = (cl-loop for j from (if i (1+ i) 0) below lcomp
+                            when (char-equal x (aref comp j)) return j)
+           unless i do (cl-return nil)
+           ;; FIXME: could do much better here and coalesce intervals
+           do (add-face-text-property i (1+ i) 'completions-common-part
+                                      nil comp)
+           finally (cl-return comp)))
+
+(defun eglot--dumb-allc (pat table pred _point) (funcall table pat pred t))
+
+(add-to-list 'completion-category-defaults '(eglot-capf (styles 
eglot--dumb-flex)))
+(add-to-list 'completion-styles-alist '(eglot--dumb-flex ignore 
eglot--dumb-allc))
+
 (defun eglot-completion-at-point ()
   "Eglot's `completion-at-point' function."
   ;; Commit logs for this function help understand what's going on.
   (when-let (completion-capability (eglot-server-capable :completionProvider))
     (let* ((server (eglot--current-server-or-lose))
+           (bounds (or (bounds-of-thing-at-point 'symbol)
+                       (cons (point) (point))))
            (sort-completions
             (lambda (completions)
               (cl-sort completions
@@ -3049,10 +3068,9 @@ for which LSP on-type-formatting should be requested."
                               (plist-get
                                (get-text-property 0 'eglot--lsp-item c)
                                :sortText)))))
-           (metadata `(metadata (category . eglot)
+           (metadata `(metadata (category . eglot-capf)
                                 (display-sort-function . ,sort-completions)))
            (local-cache :none)
-           (bounds (bounds-of-thing-at-point 'symbol))
            (orig-pos (point))
            (resolved (make-hash-table))
            (proxies
@@ -3068,9 +3086,7 @@ for which LSP on-type-formatting should be requested."
                        (cachep (and (listp resp) items
                                     eglot-cache-session-completions
                                     (eq (plist-get resp :isIncomplete) 
:json-false)))
-                       (bounds (or bounds
-                                   (cons (point) (point))))
-                       (proxies
+                       (retval
                         (mapcar
                          (jsonrpc-lambda
                              (&rest item &key label insertText insertTextFormat
@@ -3093,8 +3109,8 @@ for which LSP on-type-formatting should be requested."
                          items)))
                   ;; (trace-values "Requested" (length proxies) cachep bounds)
                   (setq eglot--capf-session
-                        (if cachep (list bounds proxies resolved orig-pos) 
:none))
-                  (setq local-cache proxies)))))
+                        (if cachep (list bounds retval resolved orig-pos) 
:none))
+                  (setq local-cache retval)))))
            (resolve-maybe
             ;; Maybe completion/resolve JSON object `lsp-comp' into
             ;; another JSON object, if at all possible.  Otherwise,
@@ -3108,7 +3124,6 @@ for which LSP on-type-formatting should be requested."
                             (eglot--request server :completionItem/resolve
                                             lsp-comp :cancel-on-input t)
                           lsp-comp))))))
-      (unless bounds (setq bounds (cons (point) (point))))
       (when (and (consp eglot--capf-session)
                  (= (car bounds) (car (nth 0 eglot--capf-session)))
                  (>= (cdr bounds) (cdr (nth 0 eglot--capf-session))))
@@ -3120,24 +3135,26 @@ for which LSP on-type-formatting should be requested."
       (list
        (car bounds)
        (cdr bounds)
-       (lambda (probe pred action)
+       (lambda (pattern pred action)
          (cond
           ((eq action 'metadata) metadata)               ; metadata
           ((eq action 'lambda)                           ; test-completion
-           (test-completion probe (funcall proxies)))
+           (test-completion pattern (funcall proxies)))
           ((eq (car-safe action) 'boundaries) nil)       ; boundaries
           ((null action)                                 ; try-completion
-           (try-completion probe (funcall proxies)))
+           (try-completion pattern (funcall proxies)))
           ((eq action t)                                 ; all-completions
-           (all-completions
-            ""
-            (funcall proxies)
-            (lambda (proxy)
-              (let* ((item (get-text-property 0 'eglot--lsp-item proxy))
-                     (filterText (plist-get item :filterText)))
-                (and (or (null pred) (funcall pred proxy))
-                     (string-prefix-p
-                      probe (or filterText proxy) 
completion-ignore-case))))))))
+           (let ((comps (funcall proxies)))
+             (dolist (c comps) (eglot--dumb-flex pattern c t))
+             (all-completions
+              ""
+              comps
+              (lambda (proxy)
+                (let* ((item (get-text-property 0 'eglot--lsp-item proxy))
+                       (filterText (plist-get item :filterText)))
+                  (and (or (null pred) (funcall pred proxy))
+                       (eglot--dumb-flex
+                        pattern (or filterText proxy) 
completion-ignore-case)))))))))
        :annotation-function
        (lambda (proxy)
          (eglot--dbind ((CompletionItem) detail kind)
diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index 997df648289..30295b29005 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/progmodes/elisp-mode.el
@@ -465,7 +465,11 @@ use of `macroexpand-all' as a way to find the \"underlying 
raw code\".")
                    (message "Ignoring macroexpansion error: %S" err) form))))
              (sexp
               (unwind-protect
-                  (let ((warning-minimum-log-level :emergency))
+                  ;; Silence any macro expansion errors when
+                  ;; attempting completion at point (bug#58148).
+                  (let ((inhibit-message t)
+                        (macroexp-inhibit-compiler-macros t)
+                        (warning-minimum-log-level :emergency))
                     (advice-add 'macroexpand-1 :around macroexpand-advice)
                     (macroexpand-all sexp elisp--local-macroenv))
                 (advice-remove 'macroexpand-1 macroexpand-advice)))
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el
index cb95f29b5fe..d48dcc6659d 100644
--- a/lisp/progmodes/etags.el
+++ b/lisp/progmodes/etags.el
@@ -1729,6 +1729,21 @@ if the file was newly read in, the value is the 
filename."
   (fileloop-next-file novisit)
   (switch-to-buffer (current-buffer)))
 
+(defun etags--ensure-file (file)
+  "Ensure FILE can be visited.
+
+FILE should be an expanded file name.
+This function tries to locate FILE, possibly adding it a suffix
+present in `tags-compression-info-list'.  If the file can't be found,
+signals an error.
+Else, returns the filename that can be visited for sure."
+  (let ((f (locate-file file nil (if auto-compression-mode
+                                    tags-compression-info-list
+                                  '("")))))
+    (unless f
+      (signal 'file-missing (list "Cannot locate file in TAGS" file)))
+    f))
+
 (defun tags--all-files ()
   (save-excursion
     (let ((cbuf (current-buffer))
@@ -1750,7 +1765,7 @@ if the file was newly read in, the value is the filename."
           ;; list later returned by (tags-table-files).
           (setf (if tail (cdr tail) files)
                 (mapcar #'expand-file-name (tags-table-files)))))
-      files)))
+      (mapcar #'etags--ensure-file files))))
 
 (make-obsolete-variable 'tags-loop-operate 'fileloop-initialize "27.1")
 (defvar tags-loop-operate nil
@@ -2137,7 +2152,7 @@ file name, add `tag-partial-file-name-match-p' to the 
list value.")
               (beginning-of-line)
               (pcase-let* ((tag-info (etags-snarf-tag))
                            (`(,hint ,line . _) tag-info))
-                (let* ((file (file-of-tag))
+                (let* ((file (etags--ensure-file (file-of-tag)))
                        (mark-key (cons file line)))
                   (unless (gethash mark-key marks)
                     (let ((loc (xref-make-etags-location
diff --git a/lisp/progmodes/fortran.el b/lisp/progmodes/fortran.el
index 32cb56ababd..02c40943ebf 100644
--- a/lisp/progmodes/fortran.el
+++ b/lisp/progmodes/fortran.el
@@ -37,7 +37,7 @@
 
 ;; We acknowledge many contributions and valuable suggestions by
 ;; Lawrence R. Dodd, Ralf Fassel, Ralph Finch, Stephen Gildea,
-;; Dr. Anil Gokhale, Ulrich Mueller, Mark Neale, Eric Prestemon,
+;; Dr. Anil Gokhale, Ulrich Müller, Mark Neale, Eric Prestemon,
 ;; Gary Sabot and Richard Stallman.
 
 ;;; Code:
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index 3cc63aab84f..70af736372e 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -80,7 +80,7 @@
 
 (defgroup gud nil
   "The \"Grand Unified Debugger\" interface.
-Supported debuggers include gdb, sdb, dbx, xdb, perldb,
+Supported debuggers include gdb, lldb, sdb, dbx, xdb, perldb,
 pdb (Python), and jdb."
   :group 'processes
   :group 'tools)
@@ -173,13 +173,13 @@ Check it when `gud-running' is t")
   "<next>" `(,(propertize "next" 'face 'font-lock-doc-face) . gud-next)
   "<until>" `(menu-item
               ,(propertize "until" 'face 'font-lock-doc-face) gud-until
-              :visible (memq gud-minor-mode '(gdbmi gdb perldb)))
+              :visible (memq gud-minor-mode '(gdbmi gdb lldb perldb)))
   "<cont>" `(menu-item
            ,(propertize "cont" 'face 'font-lock-doc-face) gud-cont
            :visible (not (eq gud-minor-mode 'gdbmi)))
   "<run>" `(menu-item
           ,(propertize "run" 'face 'font-lock-doc-face) gud-run
-          :visible (memq gud-minor-mode '(gdbmi gdb dbx jdb)))
+          :visible (memq gud-minor-mode '(gdbmi gdb lldb dbx jdb)))
   "<go>" `(menu-bar-item
          ,(propertize " go " 'face 'font-lock-doc-face) gud-go
          :visible (and (eq gud-minor-mode 'gdbmi)
@@ -231,13 +231,13 @@ Check it when `gud-running' is t")
      :enable (not gud-running)]
     ["Next Instruction" gud-nexti
      :enable (not gud-running)
-     :visible (memq gud-minor-mode '(gdbmi gdb dbx))]
+     :visible (memq gud-minor-mode '(gdbmi gdb lldb dbx))]
     ["Step Instruction" gud-stepi
      :enable (not gud-running)
-     :visible (memq gud-minor-mode '(gdbmi gdb dbx))]
+     :visible (memq gud-minor-mode '(gdbmi gdb lldb dbx))]
     ["Finish Function" gud-finish
      :enable (not gud-running)
-     :visible (memq gud-minor-mode '(gdbmi gdb guiler xdb jdb pdb))]
+     :visible (memq gud-minor-mode '(gdbmi gdb lldb guiler xdb jdb pdb))]
     ["Watch Expression" gud-watch
      :enable (not gud-running)
      :visible (eq gud-minor-mode 'gdbmi)]
@@ -248,7 +248,7 @@ Check it when `gud-running' is t")
                "Dump object"
               "Print Dereference")
      :enable (not gud-running)
-     :visible (memq gud-minor-mode '(gdbmi gdb jdb))]
+     :visible (memq gud-minor-mode '(gdbmi gdb lldb jdb))]
     ["Print S-expression" gud-pp
      :enable (and (not gud-running)
                  (bound-and-true-p gdb-active-process))
@@ -259,23 +259,23 @@ Check it when `gud-running' is t")
                   (eq gud-minor-mode 'gdbmi))]
     ["Down Stack" gud-down
      :enable (not gud-running)
-     :visible (memq gud-minor-mode '(gdbmi gdb guiler dbx xdb jdb pdb))]
+     :visible (memq gud-minor-mode '(gdbmi gdb lldb guiler dbx xdb jdb pdb))]
     ["Up Stack" gud-up
      :enable (not gud-running)
      :visible (memq gud-minor-mode
-                   '(gdbmi gdb guiler dbx xdb jdb pdb))]
+                   '(gdbmi gdb lldb guiler dbx xdb jdb pdb))]
     ["Set Breakpoint" gud-break
      :enable (or (not gud-running) gud-async-running)
      :visible (gud-tool-bar-item-visible-no-fringe)]
     ["Temporary Breakpoint" gud-tbreak
      :enable (or (not gud-running) gud-async-running)
-     :visible (memq gud-minor-mode '(gdbmi gdb sdb xdb))]
+     :visible (memq gud-minor-mode '(gdbmi gdb lldb sdb xdb))]
     ["Remove Breakpoint" gud-remove
      :enable (or (not gud-running) gud-async-running)
      :visible (gud-tool-bar-item-visible-no-fringe)]
     ["Continue to selection" gud-until
      :enable (not gud-running)
-     :visible (and (memq gud-minor-mode '(gdbmi gdb perldb))
+     :visible (and (memq gud-minor-mode '(gdbmi gdb lldb perldb))
                   (gud-tool-bar-item-visible-no-fringe))]
     ["Stop" gud-stop-subjob
      :visible (or (not (memq gud-minor-mode '(gdbmi pdb)))
@@ -288,7 +288,7 @@ Check it when `gud-running' is t")
                    (gdb-show-run-p))]
     ["Run" gud-run
      :enable (or (not gud-running) gud-async-running)
-     :visible (or (memq gud-minor-mode '(gdb dbx jdb))
+     :visible (or (memq gud-minor-mode '(gdb lldb dbx jdb))
                  (and (eq gud-minor-mode 'gdbmi)
                       (or (not (gdb-show-run-p))
                           (bound-and-true-p
@@ -299,7 +299,7 @@ Check it when `gud-running' is t")
                  (display-graphic-p)
                  (fboundp 'x-show-tip))
      :visible (memq gud-minor-mode
-                   '(gdbmi guiler dbx sdb xdb pdb))
+                   '(gdbmi lldb guiler dbx sdb xdb pdb))
      :button (:toggle . gud-tooltip-mode)]
     ["Info (debugger)" gud-goto-info]))
 
@@ -708,7 +708,7 @@ The option \"--fullname\" must be included in this value."
   (setq gud-marker-acc (concat gud-marker-acc string))
   (let ((output ""))
 
-    ;; Process all the complete markers in this chunk.
+    ;; Processn all the complete markers in this chunk.
     (while (string-match gud-gdb-marker-regexp gud-marker-acc)
       (setq
 
@@ -973,6 +973,7 @@ It is passed through `gud-gdb-marker-filter' before we look 
at it."
       (setq gud-gdb-fetch-lines-string string)
       "")))
 
+
 ;; gdb speedbar functions
 
 ;; Part of the macro expansion of dframe-with-attached-buffer.
@@ -2702,10 +2703,12 @@ gud, see `gud-mode'."
 (define-derived-mode gud-mode comint-mode "Debugger"
   "Major mode for interacting with an inferior debugger process.
 
-   You start it up with one of the commands \\[gdb], \\[sdb], \\[dbx],
-\\[perldb], \\[xdb], or \\[jdb].  Each entry point finishes by executing a
-hook; `gdb-mode-hook', `sdb-mode-hook', `dbx-mode-hook',
-`perldb-mode-hook', `xdb-mode-hook', or `jdb-mode-hook' respectively.
+   You start it up with one of the commands \\[gdb], \\[lldb],
+\\[sdb], \\[dbx], \\[perldb], \\[xdb], or \\[jdb].  Each entry
+point finishes by executing a hook; `gdb-mode-hook',
+`lldb-mode-hook' `sdb-mode-hook', `dbx-mode-hook',
+`perldb-mode-hook', `xdb-mode-hook', or `jdb-mode-hook'
+respectively.
 
 After startup, the following commands are available in both the GUD
 interaction buffer and any source buffer GUD visits due to a breakpoint stop
@@ -2735,11 +2738,11 @@ Under gdb, sdb and xdb, \\[gud-tbreak] behaves exactly 
like \\[gud-break],
 except that the breakpoint is temporary; that is, it is removed when
 execution stops on it.
 
-Under gdb, dbx, and xdb, \\[gud-up] pops up through an enclosing stack
-frame.  \\[gud-down] drops back down through one.
+Under gdb, lldb, dbx, and xdb, \\[gud-up] pops up through an
+enclosing stack frame.  \\[gud-down] drops back down through one.
 
-If you are using gdb or xdb, \\[gud-finish] runs execution to the return from
-the current function and stops.
+If you are using gdb, lldb, or xdb, \\[gud-finish] runs execution
+to the return from the current function and stops.
 
 All the keystrokes above are accessible in the GUD buffer
 with the prefix C-c, and in all buffers through the prefix C-x C-a.
@@ -2942,6 +2945,10 @@ It is saved for when this flag is not set.")
 (declare-function speedbar-change-initial-expansion-list "speedbar" (new))
 (defvar speedbar-previously-used-expansion-list-name)
 
+(defvar gud-highlight-current-line-overlay nil
+  "Overlay created for `gud-highlight-current-line'.
+It is nil if not yet present.")
+
 (defun gud-sentinel (proc msg)
   (cond ((null (buffer-name (process-buffer proc)))
         ;; buffer killed
@@ -2958,6 +2965,10 @@ It is saved for when this flag is not set.")
        ((memq (process-status proc) '(signal exit))
         ;; Stop displaying an arrow in a source file.
         (setq gud-overlay-arrow-position nil)
+         ;; And any highlight overlays.
+         (when gud-highlight-current-line-overlay
+           (delete-overlay gud-highlight-current-line-overlay)
+           (setq gud-highlight-current-line-overlay nil))
         (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer)
                   'gdbmi)
             (gdb-reset)
@@ -3009,7 +3020,12 @@ Obeying it means displaying in another window the 
specified file and line."
   (interactive)
   (when gud-last-frame
     (gud-set-buffer)
-    (gud-display-line (car gud-last-frame) (cdr gud-last-frame))
+    ;; Support either (file . line) or (file line column).
+    (if (consp (cdr gud-last-frame))
+        (let ((line (cadr gud-last-frame))
+              (column (caddr gud-last-frame)))
+          (gud-display-line (car gud-last-frame) line column))
+      (gud-display-line (car gud-last-frame) (cdr gud-last-frame)))
     (setq gud-last-last-frame gud-last-frame
          gud-last-frame nil)))
 
@@ -3024,7 +3040,25 @@ Obeying it means displaying in another window the 
specified file and line."
 ;; region-restriction if that's possible.  We use an explicit display-buffer
 ;; to get around the fact that this is called inside a save-excursion.
 
-(defun gud-display-line (true-file line)
+(defcustom gud-highlight-current-line nil
+  "Whether Gud should highlight the source line being debugged.
+If non-nil, Gud will accentuate the source code line previously
+executed upon each pause in the debugee's execution with an
+overlay in the face `gud-highlight-current-line-face'.
+
+If nil, yet one of `hl-line-mode' or `global-hl-line-mode' (which
+see) is enabled, then the emphasis imposed by either of those
+major modes is instead momentarily moved to the aforesaid source
+line, until it is displaced by subsequent cursor motion."
+  :version "30.1"
+  :type 'boolean)
+
+(defface gud-highlight-current-line-face
+  '((t :inherit highlight :extend t))
+  "Face for highlighting the source code line being executed."
+  :version "30.1")
+
+(defun gud-display-line (true-file line &optional column)
   (let* ((last-nonmenu-event t)         ; Prevent use of dialog box for 
questions.
         (buffer
          (with-current-buffer gud-comint-buffer
@@ -3050,17 +3084,37 @@ Obeying it means displaying in another window the 
specified file and line."
          (goto-char (point-min))
          (forward-line (1- line))
          (setq pos (point))
+          (when column
+            (forward-char (1- column)))
          (or gud-overlay-arrow-position
              (setq gud-overlay-arrow-position (make-marker)))
          (set-marker gud-overlay-arrow-position (point) (current-buffer))
-         ;; If they turned on hl-line, move the hl-line highlight to
-         ;; the arrow's line.
-         (when (featurep 'hl-line)
-           (cond
-            (global-hl-line-mode
-             (global-hl-line-highlight))
-            ((and hl-line-mode hl-line-sticky-flag)
-             (hl-line-highlight)))))
+          (if gud-highlight-current-line
+              (progn
+                (unless gud-highlight-current-line-overlay
+                  ;; Create the highlight overlay if it does not yet
+                  ;; exist.
+                  (let ((overlay (make-overlay (point) (point))))
+                    (overlay-put overlay 'priority -45) ; 5 less than hl-line.
+                    (overlay-put overlay 'face 
'gud-highlight-current-line-face)
+                    (setq gud-highlight-current-line-overlay overlay)))
+                ;; Next, move the overlay to the current line.
+                (move-overlay gud-highlight-current-line-overlay
+                              (line-beginning-position)
+                              (line-beginning-position 2)
+                              (current-buffer)))
+            ;; Delete any overlay introduced if g-h-c-l-f has changed.
+            (when gud-highlight-current-line-overlay
+              (delete-overlay gud-highlight-current-line-overlay)
+              (setq gud-highlight-current-line-overlay nil))
+           ;; If they turned on hl-line, move the hl-line highlight to
+           ;; the arrow's line.
+           (when (featurep 'hl-line)
+             (cond
+              (global-hl-line-mode
+               (global-hl-line-highlight))
+              ((and hl-line-mode hl-line-sticky-flag)
+               (hl-line-highlight))))))
        (cond ((or (< pos (point-min)) (> pos (point-max)))
               (widen)
               (goto-char pos))))
@@ -3723,13 +3777,17 @@ With arg, dereference expr if ARG is positive, 
otherwise do not dereference."
 ; gdb-mi.el gets around this problem.
 (defun gud-tooltip-process-output (process output)
   "Process debugger output and show it in a tooltip window."
-  (remove-function (process-filter process) #'gud-tooltip-process-output)
-  (tooltip-show (tooltip-strip-prompt process output)
-                (or gud-tooltip-echo-area (not tooltip-mode))))
+  ;; First line is the print command itself.
+  (unless (string-search (gud-tooltip-print-command "") output)
+    (remove-function (process-filter process)
+                     #'gud-tooltip-process-output)
+    (tooltip-show (tooltip-strip-prompt process output)
+                  (or gud-tooltip-echo-area (not tooltip-mode)))))
 
 (defun gud-tooltip-print-command (expr)
   "Return a suitable command to print the expression EXPR."
   (pcase gud-minor-mode
+    ('lldb (format "dwim-print -- %s" expr))
     ('gdbmi (concat "-data-evaluate-expression \"" expr "\""))
     ('guiler expr)
     ('dbx (concat "print " expr))
@@ -3791,11 +3849,312 @@ so they have been disabled."))
                       (gdb-input
                       (concat cmd "\n")
                       (lambda () (gdb-tooltip-print expr))))
+                  ;; Not gdbmi.
                   (add-function :override (process-filter process)
                                 #'gud-tooltip-process-output)
                  (gud-basic-call cmd))
                expr))))))))
 
+
+;; 'gud-lldb-history' and 'gud-gud-lldb-command-name' are required
+;; because 'gud-symbol' uses their values if they are present.  Their
+;; names are deduced from the minor-mode name.
+(defvar gud-lldb-history nil)
+
+(defcustom gud-gud-lldb-command-name "lldb"
+  "Default command to invoke LLDB in order to debug a program with it."
+  :type 'string
+  :version "30.1")
+
+(defun gud-lldb-marker-filter (string)
+  "Deduce interesting stuff from process output STRING."
+
+  ;; Pick information from our own frame info line "!gud LINE:COL:FILE"
+  ;; because the file name in the standard LLDB frame-format doesn't have
+  ;; a directory.
+  (setq string
+        (replace-regexp-in-string
+         (rx bol "!gud "
+             (group (+ digit)) ":"            ; 1: line
+             (group (* digit)) ":"            ; 2: column
+             (group (+ (not (in "\n\r"))))    ; 3: file
+             (* "\r") "\n")
+         (lambda (m)
+           (let ((line (string-to-number (match-string 1 m)))
+                 (col (string-to-number (match-string 2 m)))
+                 (file  (match-string 3 m)))
+             (setq gud-last-frame (list file line col)))
+           ;; Remove the line so that the user won't see it.
+           "")
+         string t t))
+
+  (when (string-match (rx "Process " (1+ digit) " exited with status")
+                      string)
+    ;; Process 72874 exited with status = 9 (0x00000009) killed.
+    ;; Doesn't seem to be changeable as of LLDB 17.0.2.
+    (setq gud-last-last-frame nil)
+    (setq gud-overlay-arrow-position nil))
+
+  ;; LLDB sometimes emits certain ECMA-48 sequences even if TERM is "dumb":
+  ;; CHA (Character Horizontal Absolute) and ED (Erase in Display),
+  ;; seemingly to undo previous output on the same line.
+  ;; Filter out these sequences here while carrying out their edits.
+  (let ((bol (pos-bol)))
+    (when (> (point) bol)
+      ;; Move the current line to the string, so that control sequences
+      ;; can delete parts of it.
+      (setq string (concat (buffer-substring-no-properties bol (point))
+                           string))
+      (let ((inhibit-read-only t))
+        (delete-region bol (point)))))
+  (let ((ofs 0))
+    (while (string-match (rx (group (* (not (in "\e\n"))))  ; preceding chars
+                             "\e["                          ; CSI
+                             (? (group (+ digit)))          ; argument
+                             (group (in "GJ")))             ; CHA or ED
+                         string ofs)
+      (let* ((start (match-beginning 1))
+             (prefix-end (match-end 1))
+             (op (aref string (match-beginning 3)))
+             (end (match-end 0))
+             (keep-end
+              (if (eq op ?G)
+                  ;; Move to absolute column (CHA)
+                  (min prefix-end
+                       (+ start
+                          (if (match-beginning 2)
+                              (1- (string-to-number (match-string 2 string)))
+                            0)))
+                ;; Erase in display (ED): no further action.
+                prefix-end)))
+        ;; Delete the control sequence and possibly part of the preceding 
chars.
+        (setq string (concat (substring string 0 keep-end)
+                             (substring string end)))
+        (setq ofs start))))
+  string)
+
+;; According to SBCommandInterpreter.cpp, the return value of
+;; HandleCompletions is as follows:
+;;
+;; Index 1 to the end contain all the completions.
+;;
+;; At index 0:
+;;
+;; If all completions have a common prefix, this is the shortest
+;; completion, with the common prefix removed from it.
+;;
+;; If it is the completion for a whole word, a space is added at the
+;; end.
+;;
+;; So, the prefix is what could be added to make the command partially
+;; complete.
+;;
+;; If there is no common prefix, index 0 has an empty string "".
+
+(defcustom gud-lldb-max-completions 20
+  "Maximum number of completions to request from LLDB."
+  :type 'integer
+  :version "30.1")
+
+(defconst gud--lldb-python-init-string
+  "\
+deb = lldb.debugger
+inst = deb.GetInstanceName()
+ff = deb.GetInternalVariableValue('frame-format', inst).GetStringAtIndex(0)
+ff = ff[:-1] + '!gud 
${line.number}:${line.column}:${line.file.fullpath}\\\\n\"'
+_ = deb.SetInternalVariable('frame-format', ff, inst)
+def gud_complete(s, max):
+    interpreter = lldb.debugger.GetCommandInterpreter()
+    string_list = lldb.SBStringList()
+    interpreter.HandleCompletion(s, len(s), len(s), max, string_list)
+    print('gud-completions: ##(')
+    # Specifying a max count doesn't seem to work in LLDB 17.
+    max = min(max, string_list.GetSize())
+    for i in range(max):
+        print(f'\"{string_list.GetStringAtIndex(i)}\" ')
+    print(')##')
+"
+  "Python code sent to LLDB for gud-specific initialisation.")
+
+(defun gud-lldb-fetch-completions (context command)
+  "Return the data to complete the LLDB command before point.
+This is what the Python function we installed at initialzation
+time returns, as a Lisp list.
+Maximum number of completions requested from LLDB is controlled
+by `gud-lldb-max-completions', which see."
+  (let* ((process (get-buffer-process gud-comint-buffer))
+         (to-complete (concat context command))
+         (output-buffer (get-buffer-create "*lldb-completions*")))
+    ;; Send the completion command with output to our buffer
+    (with-current-buffer output-buffer
+      (erase-buffer))
+    (comint-redirect-send-command-to-process
+     (format "script --language python -- gud_complete('%s', %d)"
+             to-complete gud-lldb-max-completions)
+     output-buffer process nil t)
+    ;; Wait for output
+    (unwind-protect
+        (while (not comint-redirect-completed)
+          (accept-process-output process 2))
+      (comint-redirect-cleanup))
+    ;; Process the completion output.
+    (with-current-buffer output-buffer
+      (goto-char (point-min))
+      (when (search-forward "gud-completions: ##" nil t)
+        (read (current-buffer))))))
+
+(defun gud-lldb-completions (context command)
+  "Completion table for LLDB commands."
+  (let ((completions (gud-lldb-fetch-completions context command)))
+    ;; If this is a cmpletion for w whole word, return a completion
+    ;; list that contains that word only, with a space appended.
+    (if (string-suffix-p " " (car completions))
+        (list (concat (cadr completions) " "))
+      (cdr completions))))
+
+(defun gud-lldb-completion-at-point ()
+  "Return the data to complete the LLDB command before point."
+  (let* ((end (point))
+         (line-start (comint-line-beginning-position))
+         (start (save-excursion
+                  (skip-chars-backward "^ " line-start)
+                  (point)))
+         (context (buffer-substring line-start start)))
+    (list (copy-marker start t)
+          end
+          (completion-table-dynamic
+           (apply-partially #'gud-lldb-completions context)))))
+
+(defun gud-lldb-send-python (python)
+  (gud-basic-call "script --language python --")
+  (mapc #'gud-basic-call (split-string python "\n"))
+  (gud-basic-call "exit()"))
+
+(defun gud-lldb-initialize ()
+  "Initialize the LLDB process as needed for this debug session."
+  (gud-lldb-send-python gud--lldb-python-init-string)
+  (gud-basic-call "settings set stop-line-count-before 0")
+  (gud-basic-call "settings set stop-line-count-after 0"))
+
+;;;###autoload
+(defun lldb (command-line)
+  "Run LLDB passing it COMMAND-LINE as arguments.
+If COMMAND-LINE names a program FILE to debug, LLDB will run in
+a buffer named *gud-FILE*, and the directory containing FILE
+becomes the initial working directory and source-file directory
+for the debug session.  If you don't want `default-directory' to
+change to the directory of FILE, specify FILE without leading
+directories, in which case FILE should reside either in the
+directory of the buffer from which this command is invoked, or
+it can be found by searching PATH.
+
+If COMMAND-LINE requests that LLDB attaches to a process PID, LLDB
+will run in *gud-PID*, otherwise it will run in *gud*; in these
+cases the initial working directory is the `default-directory' of
+the buffer in which this command was invoked.
+
+Please note that completion framework that complete while you
+type, like Corfu, do not work well with this mode.  You should
+consider to turn them off in this mode.
+
+This command runs functions from `lldb-mode-hook'. "
+  (interactive (list (gud-query-cmdline 'lldb)))
+
+  (when (and gud-comint-buffer
+            (buffer-name gud-comint-buffer)
+            (get-buffer-process gud-comint-buffer)
+            (with-current-buffer gud-comint-buffer (eq gud-minor-mode 
'gud-lldb)))
+    (gdb-restore-windows)
+    ;; FIXME: Copied from gud-gdb, but what does that even say?
+    (error "Multiple debugging requires restarting in text command mode"))
+
+  (gud-common-init command-line nil 'gud-lldb-marker-filter)
+  (setq-local gud-minor-mode 'lldb)
+
+  (gud-def gud-break
+           "breakpoint set --joint-specifier %f:%l"
+           "\C-b"
+           "Set breakpoint at current line.")
+  (gud-def gud-tbreak
+           "_regexp-break %f:%l"
+           "\C-t"
+          "Set temporary breakpoint at current line.")
+  (gud-def gud-remove
+           "breakpoint clear  --line %l --file %f"
+           "\C-d"
+           "Remove breakpoint at current line")
+  (gud-def gud-step "thread step-in --count %p"
+           "\C-s"
+           "Step one source line with display.")
+  (gud-def gud-stepi
+           "thread step-inst --count %p"
+           "\C-i"
+           "Step one instruction with display.")
+  (gud-def gud-next
+           "thread step-over --count %p"
+           "\C-n"
+           "Step one line (skip functions).")
+  (gud-def gud-nexti
+           "thread step-inst-over --count %p"
+           nil
+           "Step one instruction (skip functions).")
+  (gud-def gud-cont
+           "process continue --ignore-count %p"
+           "\C-r"
+           "Continue with display.")
+  (gud-def gud-finish
+           "thread step-out"
+           "\C-f"
+           "Finish executing current function.")
+  (gud-def gud-jump
+          (progn
+             (gud-call "_regexp-break %f:%l" arg)
+             (gud-call "_regexp-jump %f:%l"))
+          "\C-j"
+           "Set execution address to current line.")
+  (gud-def gud-up
+           "_regexp-up %p"
+           "<"
+           "Up N stack frames (numeric arg).")
+  (gud-def gud-down
+           "_regexp-down %p"
+           ">"
+           "Down N stack frames (numeric arg).")
+  (gud-def gud-print
+           "dwim-print %e"
+           "\C-p"
+           "Evaluate C expression at point.")
+  (gud-def gud-pstar
+           "dwim-print *%e"
+           nil
+          "Evaluate C dereferenced pointer expression at point.")
+  (gud-def gud-pv
+           "xprint %e"
+           "\C-v"
+           "Print value of lisp variable (for debugging Emacs only).")
+  (gud-def gud-until
+           "thread until %l"
+           "\C-u"
+           "Continue to current line.")
+  (gud-def gud-run
+           ;; Extension for process launch --tty?
+           "process launch -X true"
+          nil
+           "Run the program.")
+
+  (add-hook 'completion-at-point-functions
+            #'gud-lldb-completion-at-point
+            nil 'local)
+  (keymap-local-set "<tab>" #'completion-at-point)
+
+  (gud-set-repeat-map-property 'gud-gdb-repeat-map)
+  (setq comint-prompt-regexp (rx line-start "(lldb)" (0+ blank)))
+  (setq comint-process-echoes t)
+  (setq paragraph-start comint-prompt-regexp)
+  (setq gud-running nil)
+  (gud-lldb-initialize)
+  (run-hooks 'lldb-mode-hook))
+
 (provide 'gud)
 
 ;;; gud.el ends here
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el
index 9ca6bee8454..6fd714940b6 100644
--- a/lisp/progmodes/js.el
+++ b/lisp/progmodes/js.el
@@ -3854,7 +3854,7 @@ See `treesit-thing-settings' for more information.")
     "pair"
     "jsx")
   "Nodes that designate sexps in JavaScript.
-See `treesit-sexp-type-regexp' for more information.")
+See `treesit-thing-settings' for more information.")
 
 ;;;###autoload
 (define-derived-mode js-ts-mode js-base-mode "JavaScript"
diff --git a/lisp/progmodes/lua-ts-mode.el b/lisp/progmodes/lua-ts-mode.el
index 030a3585158..2193779b759 100644
--- a/lisp/progmodes/lua-ts-mode.el
+++ b/lisp/progmodes/lua-ts-mode.el
@@ -38,7 +38,12 @@
   (require 'cl-lib)
   (require 'rx))
 
+(declare-function treesit-induce-sparse-tree "treesit.c")
 (declare-function treesit-node-child-by-field-name "treesit.c")
+(declare-function treesit-node-child-count "treesit.c")
+(declare-function treesit-node-first-child-for-pos "treesit.c")
+(declare-function treesit-node-parent "treesit.c")
+(declare-function treesit-node-start "treesit.c")
 (declare-function treesit-node-type "treesit.c")
 (declare-function treesit-parser-create "treesit.c")
 (declare-function treesit-search-subtree "treesit.c")
@@ -48,6 +53,15 @@
   :prefix "lua-ts-"
   :group 'languages)
 
+(defcustom lua-ts-mode-hook nil
+  "Hook run after entering `lua-ts-mode'."
+  :type 'hook
+  :options '(flymake-mode
+             hs-minor-mode
+             outline-minor-mode)
+  :group 'lua-ts
+  :version "30.1")
+
 (defcustom lua-ts-indent-offset 4
   "Number of spaces for each indentation step in `lua-ts-mode'."
   :type 'natnum
@@ -57,7 +71,7 @@
 
 (defcustom lua-ts-luacheck-program "luacheck"
   "Location of the Luacheck program."
-  :type '(choice (const nil) string)
+  :type '(choice (const :tag "None" nil) string)
   :group 'lua-ts
   :version "30.1")
 
@@ -70,7 +84,7 @@
 
 (defcustom lua-ts-inferior-program "lua"
   "Program to run in the inferior Lua process."
-  :type '(choice (const nil) string)
+  :type '(choice (const :tag "None" nil) string)
   :group 'lua-ts
   :version "30.1")
 
@@ -82,13 +96,28 @@
 
 (defcustom lua-ts-inferior-startfile nil
   "File to load into the inferior Lua process at startup."
-  :type '(choice (const nil) (file :must-match t))
+  :type '(choice (const :tag "None" nil) (file :must-match t))
+  :group 'lua-ts
+  :version "30.1")
+
+(defcustom lua-ts-inferior-prompt ">"
+  "Prompt used by the inferior Lua process."
+  :type 'string
+  :safe 'stringp
+  :group 'lua-ts
+  :version "30.1")
+
+(defcustom lua-ts-inferior-prompt-continue ">>"
+  "Continuation prompt used by the inferior Lua process."
+  :type 'string
+  :safe 'stringp
   :group 'lua-ts
   :version "30.1")
 
-(defcustom lua-ts-inferior-prompt-regexp "^>>?[[:blank:]]"
-  "Regular expression matching the prompt of the inferior Lua process."
-  :type 'regexp
+(defcustom lua-ts-inferior-history nil
+  "File used to save command history of the inferior Lua process."
+  :type '(choice (const :tag "None" nil) file)
+  :safe 'string-or-null-p
   :group 'lua-ts
   :version "30.1")
 
@@ -103,6 +132,12 @@
     "close" "flush" "lines" "read" "seek" "setvbuf" "write")
   "Lua built-in functions for tree-sitter font-locking.")
 
+(defvar lua-ts--keywords
+  '("and" "do" "else" "elseif" "end" "for" "function"
+    "goto" "if" "in" "local" "not" "or" "repeat"
+    "return" "then" "until" "while")
+  "Lua keywords for tree-sitter font-locking and navigation.")
+
 (defvar lua-ts--font-lock-settings
   (treesit-font-lock-rules
    :language 'lua
@@ -167,13 +202,11 @@
 
    :language 'lua
    :feature 'keyword
-   '((break_statement) @font-lock-keyword-face
+   `((break_statement) @font-lock-keyword-face
      (true) @font-lock-constant-face
      (false) @font-lock-constant-face
      (nil) @font-lock-constant-face
-     ["and" "do" "else" "elseif" "end" "for" "function"
-      "goto" "if" "in" "local" "not" "or" "repeat"
-      "return" "then" "until" "while"]
+     ,(vconcat lua-ts--keywords)
      @font-lock-keyword-face)
 
    :language 'lua
@@ -235,27 +268,145 @@
 
 (defvar lua-ts--simple-indent-rules
   `((lua
+     ((or (node-is "comment")
+          (parent-is "comment_content")
+          (parent-is "string_content")
+          (node-is "]]"))
+      no-indent 0)
+     ((and (n-p-gp "field" "table_constructor" "arguments")
+           lua-ts--multi-arg-function-call-matcher)
+      parent lua-ts-indent-offset)
+     ((and (n-p-gp "}" "table_constructor" "arguments")
+           lua-ts--multi-arg-function-call-matcher)
+      parent 0)
+     ((or (node-is "do")
+          (node-is "then")
+          (node-is "elseif_statement")
+          (node-is "else_statement")
+          (node-is "until")
+          (node-is ")")
+          (node-is "}"))
+      standalone-parent 0)
+     ((or (and (parent-is "arguments") lua-ts--first-child-matcher)
+          (and (parent-is "parameters") lua-ts--first-child-matcher)
+          (and (parent-is "table_constructor") lua-ts--first-child-matcher))
+      standalone-parent lua-ts-indent-offset)
+     ((or (parent-is "arguments")
+          (parent-is "parameters")
+          (parent-is "table_constructor"))
+      (nth-sibling 1) 0)
+     ((and (n-p-gp "block" "function_definition" "parenthesized_expression")
+           lua-ts--nested-function-block-matcher
+           lua-ts--nested-function-block-include-matcher)
+      parent lua-ts-indent-offset)
+     ((and (n-p-gp "block" "function_definition" "arguments")
+           lua-ts--nested-function-argument-matcher)
+      parent lua-ts-indent-offset)
+     ((match "function_definition" "parenthesized_expression")
+      standalone-parent lua-ts-indent-offset)
+     ((node-is "block") standalone-parent lua-ts-indent-offset)
+     ((parent-is "block") parent 0)
+     ((and (node-is "end") lua-ts--end-line-matcher)
+      standalone-parent lua-ts--end-indent-offset)
+     ((match "end" "function_declaration") parent 0)
+     ((and (n-p-gp "end" "function_definition" "parenthesized_expression")
+           lua-ts--nested-function-end-argument-matcher)
+      parent 0)
+     ((and (n-p-gp "end" "function_definition" "parenthesized_expression")
+           lua-ts--nested-function-block-matcher
+           lua-ts--nested-function-end-matcher
+           lua-ts--nested-function-last-function-matcher)
+      parent 0)
+     ((n-p-gp "end" "function_definition" "arguments") parent 0)
+     ((or (match "end" "function_definition")
+          (node-is "end"))
+      standalone-parent 0)
+     ((or (parent-is "function_declaration")
+          (parent-is "function_definition")
+          (parent-is "do_statement")
+          (parent-is "for_statement")
+          (parent-is "repeat_statement")
+          (parent-is "while_statement")
+          (parent-is "if_statement")
+          (parent-is "else_statement")
+          (parent-is "elseif_statement"))
+      standalone-parent lua-ts-indent-offset)
      ((parent-is "chunk") column-0 0)
-     ((node-is "comment_end") column-0 0)
-     ((parent-is "block") parent-bol 0)
-     ((node-is "}") parent-bol 0)
-     ((node-is ")") parent-bol 0)
-     ((node-is "else_statement") parent-bol 0)
-     ((node-is "elseif_statement") parent-bol 0)
-     ((node-is "end") parent-bol 0)
-     ((node-is "until") parent-bol 0)
-     ((parent-is "for_statement") parent-bol lua-ts-indent-offset)
-     ((parent-is "function_declaration") parent-bol lua-ts-indent-offset)
-     ((parent-is "function_definition") parent-bol lua-ts-indent-offset)
-     ((parent-is "if_statement") parent-bol lua-ts-indent-offset)
-     ((parent-is "else_statement") parent-bol lua-ts-indent-offset)
-     ((parent-is "repeat_statement") parent-bol lua-ts-indent-offset)
-     ((parent-is "while_statement") parent-bol lua-ts-indent-offset)
-     ((parent-is "table_constructor") parent-bol lua-ts-indent-offset)
-     ((parent-is "arguments") parent-bol lua-ts-indent-offset)
-     ((parent-is "parameters") parent-bol lua-ts-indent-offset)
      ((parent-is "ERROR") no-indent 0))))
 
+(defun lua-ts--end-line-matcher (&rest _)
+  "Matches if there is more than one `end' on the current line."
+  (> (lua-ts--end-count) 1))
+
+(defun lua-ts--end-indent-offset (&rest _)
+  "Calculate indent offset based on `end' count."
+  (- (* (1- (lua-ts--end-count)) lua-ts-indent-offset)))
+
+(defun lua-ts--end-count ()
+  "Count the number of `end's on the current line."
+  (count-matches "end" (line-beginning-position) (line-end-position)))
+
+(defun lua-ts--first-child-matcher (node &rest _)
+  "Matches if NODE is the first among its siblings."
+  (= (treesit-node-index node) 1))
+
+(defun lua-ts--function-definition-p (node)
+  "Return t if NODE is a function_definition."
+  (equal "function_definition" (treesit-node-type node)))
+
+(defun lua-ts--g-g-g-parent (node)
+  "Return the great-great-grand-parent of NODE."
+  (let* ((parent (treesit-node-parent node))
+         (g-parent (treesit-node-parent parent))
+         (g-g-parent (treesit-node-parent g-parent)))
+    (treesit-node-parent g-g-parent)))
+
+(defun lua-ts--multi-arg-function-call-matcher (_n parent &rest _)
+  "Matches if PARENT has multiple arguments."
+  (> (treesit-node-child-count (treesit-node-parent parent)) 3))
+
+(defun lua-ts--nested-function-argument-matcher (node &rest _)
+  "Matches if NODE is in a nested function argument."
+  (save-excursion
+    (goto-char (treesit-node-start node))
+    (treesit-beginning-of-defun)
+    (backward-char 2)
+    (not (looking-at ")("))))
+
+(defun lua-ts--nested-function-block-matcher (node &rest _)
+  "Matches if NODE is in a nested function block."
+  (let* ((g-g-g-parent (lua-ts--g-g-g-parent node))
+         (g-g-g-type (treesit-node-type g-g-g-parent)))
+    (not (equal g-g-g-type "chunk"))))
+
+(defun lua-ts--nested-function-block-include-matcher (node _p bol &rest _)
+  "Matches if NODE's child at BOL is not another block."
+  (let* ((child (treesit-node-first-child-for-pos node bol))
+         (child-type (treesit-node-type child))
+         (g-g-g-type (treesit-node-type (lua-ts--g-g-g-parent node))))
+    (or (equal child-type "assignment_statement")
+        (and (equal child-type "return_statement")
+             (or (equal g-g-g-type "arguments")
+                 (and (equal g-g-g-type "expression_list")
+                      (not (treesit-search-subtree child 
"function_call"))))))))
+
+(defun lua-ts--nested-function-end-matcher (node &rest _)
+  "Matches if NODE is the `end' of a nested function."
+  (save-excursion
+    (goto-char (treesit-node-start node))
+    (treesit-beginning-of-defun)
+    (looking-at "function[[:space:]]*")))
+
+(defun lua-ts--nested-function-end-argument-matcher (node &rest _)
+  "Matches if great-great-grandparent of NODE is arguments."
+  (equal "arguments" (treesit-node-type (lua-ts--g-g-g-parent node))))
+
+(defun lua-ts--nested-function-last-function-matcher (_n parent &rest _)
+  "Matches if PARENT is the last nested function."
+  (let ((sparse-tree
+         (treesit-induce-sparse-tree parent #'lua-ts--function-definition-p)))
+    (= 1 (length (cadr sparse-tree)))))
+
 (defvar lua-ts--syntax-table
   (let ((table (make-syntax-table)))
     (modify-syntax-entry ?+  "."    table)
@@ -292,6 +443,33 @@ Return nil if there is no name or if NODE is not a defun 
node."
        (and (treesit-search-subtree node "function_definition" nil nil 1)
             (treesit-node-text child t))))))
 
+(defun lua-ts--named-function-p (node)
+  "Matches if NODE is a named function."
+  (let ((type (treesit-node-type node)))
+    (or (equal "function_declaration" type)
+        (and (equal "field" type)
+             (equal "function_definition"
+                    (treesit-node-type
+                     (treesit-node-child-by-field-name
+                      node "value")))
+             (treesit-node-child-by-field-name node "name")))))
+
+(defun lua-ts--require-name-function (node)
+  "Return name of NODE to use for requires in imenu."
+  (when-let* (((lua-ts--require-p node))
+              (parent (treesit-node-parent node))
+              (parent-type (treesit-node-type parent)))
+    (if (equal "expression_list" parent-type)
+        (let* ((g-parent (treesit-node-parent parent))
+               (name (treesit-node-child-by-field-name g-parent "name")))
+          (treesit-node-text name t))
+      (treesit-node-text (treesit-search-subtree node "string_content") t))))
+
+(defun lua-ts--require-p (node)
+  "Matches if NODE is a require statement."
+  (let ((name (treesit-node-child-by-field-name node "name")))
+    (equal "require" (treesit-node-text name t))))
+
 (defvar-local lua-ts--flymake-process nil)
 
 (defun lua-ts-flymake-luacheck (report-fn &rest _args)
@@ -352,26 +530,126 @@ Calls REPORT-FN directly."
 (defun lua-ts-inferior-lua ()
   "Run a Lua interpreter in an inferior process."
   (interactive)
-  (let* ((buffer lua-ts-inferior-buffer)
-         (name (string-replace "*" "" buffer))
-         (program lua-ts-inferior-program)
-         (prompt-regexp lua-ts-inferior-prompt-regexp)
-         (switches lua-ts-inferior-options)
-         (startfile lua-ts-inferior-startfile))
-    (unless (comint-check-proc buffer)
-      (set-buffer (apply (function make-comint) name program startfile 
switches))
+  (unless (comint-check-proc lua-ts-inferior-buffer)
+    (apply #'make-comint-in-buffer
+           (string-replace "*" "" lua-ts-inferior-buffer)
+           lua-ts-inferior-buffer
+           lua-ts-inferior-program
+           lua-ts-inferior-startfile
+           lua-ts-inferior-options)
+    (when lua-ts-inferior-history
+        (set-process-sentinel (get-buffer-process lua-ts-inferior-buffer)
+                              'lua-ts-inferior--write-history))
+    (with-current-buffer lua-ts-inferior-buffer
       (setq-local comint-input-ignoredups t
+                  comint-input-ring-file-name lua-ts-inferior-history
+                  comint-use-prompt-regexp t
                   comint-prompt-read-only t
-                  comint-prompt-regexp prompt-regexp
-                  comint-use-prompt-regexp t))
-    (select-window (display-buffer buffer '((display-buffer-reuse-window
-                                             display-buffer-pop-up-frame)
-                                            (reusable-frames . t))))))
+                  comint-prompt-regexp (rx-to-string `(: bol
+                                                         
,lua-ts-inferior-prompt
+                                                         (1+ space))))
+      (comint-read-input-ring t)
+      (add-hook 'comint-preoutput-filter-functions
+                (lambda (string)
+                  (if (or (not (equal (buffer-name) lua-ts-inferior-buffer))
+                          (equal string
+                                 (concat lua-ts-inferior-prompt-continue " ")))
+                      string
+                    (concat
+                     ;; Filter out the extra prompt characters that
+                     ;; accumulate in the output when sending regions
+                     ;; to the inferior process.
+                     (replace-regexp-in-string (rx-to-string
+                                                `(: bol
+                                                    (* ,lua-ts-inferior-prompt
+                                                       (? 
,lua-ts-inferior-prompt)
+                                                       (1+ space))
+                                                    (group (* nonl))))
+                                               "\\1" string)
+                     ;; Re-add the prompt for the next line.
+                     lua-ts-inferior-prompt " "))))))
+  (select-window (display-buffer lua-ts-inferior-buffer
+                                 '((display-buffer-reuse-window
+                                    display-buffer-pop-up-frame)
+                                   (reusable-frames . t))))
+  (get-buffer-process (current-buffer)))
+
+(defun lua-ts-send-buffer ()
+  "Send current buffer to the inferior Lua process."
+  (interactive)
+  (lua-ts-send-region (point-min) (point-max)))
+
+(defun lua-ts-send-file (file)
+  "Send contents of FILE to the inferior Lua process."
+  (interactive "f")
+  (with-temp-buffer
+    (insert-file-contents-literally file)
+    (lua-ts-send-region (point-min) (point-max))))
+
+(defun lua-ts-send-region (beg end)
+  "Send region between BEG and END to the inferior Lua process."
+  (interactive "r")
+  (let ((string (buffer-substring-no-properties beg end))
+        (proc-buffer (lua-ts-inferior-lua)))
+    (comint-send-string proc-buffer "print()") ; Prevent output from
+    (comint-send-string proc-buffer "\n")      ; appearing at prompt.
+    (comint-send-string proc-buffer string)
+    (comint-send-string proc-buffer "\n")))
+
+(defun lua-ts-show-process-buffer ()
+  "Show the inferior Lua process buffer."
+  (interactive)
+  (display-buffer lua-ts-inferior-buffer))
+
+(defun lua-ts-hide-process-buffer ()
+  "Hide the inferior Lua process buffer."
+  (interactive)
+  (delete-windows-on lua-ts-inferior-buffer))
+
+(defun lua-ts-kill-process ()
+  "Kill the inferior Lua process."
+  (interactive)
+  (with-current-buffer lua-ts-inferior-buffer
+    (kill-buffer-and-window)))
+
+(defun lua-ts-inferior--write-history (process _)
+  "Write history file for inferior Lua PROCESS."
+  ;; Depending on how the process is killed the buffer may not be
+  ;; around anymore; e.g. `kill-buffer'.
+  (when-let* ((buffer (process-buffer process))
+              ((buffer-live-p (process-buffer process))))
+    (with-current-buffer buffer (comint-write-input-ring))))
+
+(defvar lua-ts-mode-map
+  (let ((map (make-sparse-keymap "Lua")))
+    (define-key map "\C-c\C-n" 'lua-ts-inferior-lua)
+    (define-key map "\C-c\C-c" 'lua-ts-send-buffer)
+    (define-key map "\C-c\C-l" 'lua-ts-send-file)
+    (define-key map "\C-c\C-r" 'lua-ts-send-region)
+    map)
+  "Keymap for `lua-ts-mode' buffers.")
+
+(easy-menu-define lua-ts-mode-menu lua-ts-mode-map
+  "Menu bar entry for `lua-ts-mode'."
+  `("Lua"
+    ["Evaluate Buffer" lua-ts-send-buffer]
+    ["Evaluate File" lua-ts-send-file]
+    ["Evaluate Region" lua-ts-send-region]
+    "--"
+    ["Start Process" lua-ts-inferior-lua]
+    ["Show Process Buffer" lua-ts-show-process-buffer]
+    ["Hide Process Buffer" lua-ts-hide-process-buffer]
+    ["Kill Process" lua-ts-kill-process]
+    "--"
+    ["Customize" (lambda () (interactive) (customize-group "lua-ts"))]))
 
 ;;;###autoload
 (define-derived-mode lua-ts-mode prog-mode "Lua"
-  "Major mode for editing Lua files, powered by tree-sitter."
+  "Major mode for editing Lua files, powered by tree-sitter.
+
+\\{lua-ts-mode-map}"
   :syntax-table lua-ts--syntax-table
+  (use-local-map lua-ts-mode-map)
 
   (when (treesit-ready-p 'lua)
     (treesit-parser-create 'lua)
@@ -404,31 +682,52 @@ Calls REPORT-FN directly."
                 (rx (or "function_declaration" "function_definition")))
     (setq-local treesit-thing-settings
                 `((lua
-                   (sentence ,(rx (or "do_statement"
-                                      "field"
-                                      "for_statement"
-                                      "function_call"
-                                      "if_statement"
-                                      "repeat_statement"
-                                      "return_statement"
-                                      "variable_declaration"
-                                      "while_statement")))
-                   (sexp ,(rx (or "arguments"
-                                  "block"
-                                  "parameters"
-                                  "string"
-                                  "table_constructor")))
+                   (function ,(rx (or "function_declaration"
+                                      "function_definition")))
+                   (keyword ,(regexp-opt lua-ts--keywords
+                                         'symbols))
+                   (loop-statement ,(rx (or "do_statement"
+                                            "for_statement"
+                                            "repeat_statement"
+                                            "while_statement")))
+                   (sentence (or function
+                                 loop-statement
+                                 ,(rx (or "assignment_statement"
+                                          "comment"
+                                          "field"
+                                          "function_call"
+                                          "if_statement"
+                                          "return_statement"
+                                          "variable_declaration"))))
+                   (sexp (or function
+                             keyword
+                             loop-statement
+                             ,(rx (or "arguments"
+                                      "break_statement"
+                                      "expression_list"
+                                      "false"
+                                      "identifier"
+                                      "nil"
+                                      "number"
+                                      "parameters"
+                                      "parenthesized_expression"
+                                      "string"
+                                      "table_constructor"
+                                      "true"
+                                      "vararg_expression"))))
                    (text "comment"))))
 
     ;; Imenu.
     (setq-local treesit-simple-imenu-settings
-                `(("Variable" ,(rx bos "variable_declaration" eos) nil nil)
-                  ("Function" ,(rx bos
-                                   (or "function_declaration"
-                                       "function_definition"
-                                       "field")
-                                   eos)
-                   nil nil)))
+                `(("Requires"
+                   "\\`function_call\\'"
+                   lua-ts--require-p
+                   lua-ts--require-name-function)
+                  ("Variables" "\\`variable_declaration\\'" nil nil)
+                  (nil
+                   "\\`\\(?:f\\(?:ield\\|unction_declaration\\)\\)\\'"
+                   lua-ts--named-function-p
+                   nil)))
 
     ;; Which-function.
     (setq-local which-func-functions (treesit-defun-at-point))
@@ -443,6 +742,9 @@ Calls REPORT-FN directly."
                                            "function"))
                                   symbol-end)))))
 
+    ;; Align.
+    (setq-local align-indent-before-aligning t)
+
     (treesit-major-mode-setup))
 
   (add-hook 'flymake-diagnostic-functions #'lua-ts-flymake-luacheck nil 
'local))
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index 2e6ae89a443..fda1081eb62 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -4,8 +4,8 @@
 ;; Version: 0.10.0
 ;; Package-Requires: ((emacs "26.1") (xref "1.4.0"))
 
-;; This is a GNU ELPA :core package.  Avoid using functionality that
-;; not compatible with the version of Emacs recorded above.
+;; This is a GNU ELPA :core package.  Avoid functionality that is not
+;; compatible with the version of Emacs recorded above.
 
 ;; This file is part of GNU Emacs.
 
@@ -880,6 +880,17 @@ DIRS must contain directory names."
         (call-interactively cmd)
       (user-error "%s is undefined" (key-description key)))))
 
+(defun project--other-place-prefix (place &optional extra-keymap)
+  (cl-assert (member place '(window frame tab)))
+  (prefix-command-preserve-state)
+  (let ((inhibit-message t)) (funcall (intern (format "other-%s-prefix" 
place))))
+  (message "Display next project command buffer in a new %s..." place)
+  ;; Should return exitfun from set-transient-map
+  (set-transient-map (if extra-keymap
+                         (make-composed-keymap project-prefix-map
+                                               extra-keymap)
+                       project-prefix-map)))
+
 ;;;###autoload
 (defun project-other-window-command ()
   "Run project command, displaying resultant buffer in another window.
@@ -889,9 +900,11 @@ The following commands are available:
 \\{project-prefix-map}
 \\{project-other-window-map}"
   (interactive)
-  (project--other-place-command '((display-buffer-pop-up-window)
-                                  (inhibit-same-window . t))
-                                project-other-window-map))
+  (if (< emacs-major-version 30)
+      (project--other-place-command '((display-buffer-pop-up-window)
+                                      (inhibit-same-window . t))
+                                    project-other-window-map)
+    (project--other-place-prefix 'window project-other-window-map)))
 
 ;;;###autoload (define-key ctl-x-4-map "p" #'project-other-window-command)
 
@@ -904,8 +917,10 @@ The following commands are available:
 \\{project-prefix-map}
 \\{project-other-frame-map}"
   (interactive)
-  (project--other-place-command '((display-buffer-pop-up-frame))
-                                project-other-frame-map))
+  (if (< emacs-major-version 30)
+      (project--other-place-command '((display-buffer-pop-up-frame))
+                                    project-other-frame-map)
+    (project--other-place-prefix 'frame project-other-frame-map)))
 
 ;;;###autoload (define-key ctl-x-5-map "p" #'project-other-frame-command)
 
@@ -917,7 +932,9 @@ The following commands are available:
 
 \\{project-prefix-map}"
   (interactive)
-  (project--other-place-command '((display-buffer-in-new-tab))))
+  (if (< emacs-major-version 30)
+      (project--other-place-command '((display-buffer-in-new-tab)))
+    (project--other-place-prefix 'tab)))
 
 ;;;###autoload
 (when (bound-and-true-p tab-prefix-map)
@@ -1620,7 +1637,7 @@ Also see the `project-kill-buffers-display-buffer-list' 
variable."
                        (yes-or-no-p
                         (format "Kill %d buffers in %s? "
                                 (length bufs)
-                                (project-root pr))))))
+                                (project-name pr))))))
     (cond (no-confirm
            (mapc #'kill-buffer bufs))
           ((null bufs)
@@ -1924,6 +1941,15 @@ Otherwise, use the face `help-key-binding' in the 
prompt."
   :version "30.1")
 
 (defun project--keymap-prompt ()
+  "Return a prompt for the project switching using the prefix map."
+  (let (keys)
+    (map-keymap
+     (lambda (evt _)
+       (when (characterp evt) (push evt keys)))
+     project-prefix-map)
+    (mapconcat (lambda (key) (help-key-description (string key) nil)) keys " 
")))
+
+(defun project--menu-prompt ()
   "Return a prompt for the project switching dispatch menu."
   (mapconcat
    (pcase-lambda (`(,cmd ,label ,key))
@@ -1962,20 +1988,30 @@ Otherwise, use the face `help-key-binding' in the 
prompt."
               (when-let ((cmd (nth 0 row))
                          (keychar (nth 2 row)))
                 (define-key temp-map (vector keychar) cmd)))))
-         command)
+         command
+         choice)
     (while (not command)
       (let* ((overriding-local-map commands-map)
-             (choice (read-key-sequence (project--keymap-prompt))))
+             (prompt (if project-switch-use-entire-map
+                         (project--keymap-prompt)
+                       (project--menu-prompt))))
+        (when choice
+          (setq prompt (concat prompt
+                               (format " %s: %s"
+                                       (propertize "Unrecognized input"
+                                                   'face 'warning)
+                                       (help-key-description choice nil)))))
+        (setq choice (read-key-sequence (concat "Choose: " prompt)))
         (when (setq command (lookup-key commands-map choice))
+          (when (numberp command) (setq command nil))
           (unless (or project-switch-use-entire-map
                       (assq command commands-menu))
-            ;; TODO: Add some hint to the prompt, like "key not
-            ;; recognized" or something.
             (setq command nil)))
         (let ((global-command (lookup-key (current-global-map) choice)))
           (when (memq global-command
                       '(keyboard-quit keyboard-escape-quit))
             (call-interactively global-command)))))
+    (message nil)
     command))
 
 ;;;###autoload
@@ -2010,5 +2046,43 @@ would otherwise have the same name."
           (file-relative-name dirname root))))
     dirname))
 
+;;; Project mode-line
+
+;;;###autoload
+(defcustom project-mode-line nil
+  "Whether to show current project name and Project menu on the mode line.
+This feature requires the presence of the following item in
+`mode-line-format': `(project-mode-line project-mode-line-format)'; it
+is part of the default mode line beginning with Emacs 30."
+  :type 'boolean
+  :group 'project
+  :version "30.1")
+
+(defvar project-menu-entry
+  `(menu-item "Project" ,menu-bar-project-menu))
+
+(defvar project-mode-line-map
+  (let ((map (make-sparse-keymap)))
+    (define-key map [mode-line down-mouse-1] project-menu-entry)
+    map))
+
+(defvar project-mode-line-face nil
+  "Face name to use for the project name on the mode line.")
+
+(defvar project-mode-line-format '(:eval (project-mode-line-format)))
+(put 'project-mode-line-format 'risky-local-variable t)
+
+(defun project-mode-line-format ()
+  "Compose the project mode-line."
+  (when-let ((project (project-current)))
+    (concat
+     " "
+     (propertize
+      (project-name project)
+      'face project-mode-line-face
+      'mouse-face 'mode-line-highlight
+      'help-echo "mouse-1: Project menu"
+      'local-map project-mode-line-map))))
+
 (provide 'project)
 ;;; project.el ends here
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el
index 9d80bbd72dd..5c34ddc562b 100644
--- a/lisp/progmodes/ruby-mode.el
+++ b/lisp/progmodes/ruby-mode.el
@@ -516,7 +516,9 @@ is customizable via `ruby-encoding-magic-comment-style'.
 
 When set to `always-utf8' an utf-8 comment will always be added,
 even if it's not required."
-  :type 'boolean :group 'ruby)
+  :type '(choice (const :tag "Don't insert" nil)
+                 (const :tag "Insert utf-8 comment always" always-utf8)
+                 (const :tag "Insert only when required" t)))
 
 (defcustom ruby-encoding-magic-comment-style 'ruby
   "The style of the magic encoding comment to use."
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index cc521cb0591..de76e175a10 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -869,7 +869,7 @@ See `sh-feature'.")
   "Default expressions to highlight in Shell Script modes.  See `sh-feature'.")
 
 (defvar sh-font-lock-keywords-var-1
-  '((sh "[ \t]in\\>"))
+  '((sh "[ \t]\\(in\\|do\\)\\>"))
   "Subdued level highlighting for Shell Script modes.")
 
 (defvar sh-font-lock-keywords-var-2 ()
@@ -1809,8 +1809,8 @@ before the newline and in that case point should be just 
before the token."
   (concat "\\(?:^\\|[^\\]\\)\\(?:\\\\\\\\\\)*"
           "\\(" sh-smie--sh-operators-re "\\)"))
 
-(defun sh-smie--sh-keyword-in-p ()
-  "Assuming we're looking at \"in\", return non-nil if it's a keyword.
+(defun sh-smie--sh-keyword-in/do-p (tok)
+  "When looking at TOK (either \"in\" or \"do\"), non-nil if TOK is a keyword.
 Does not preserve point."
   (let ((forward-sexp-function nil)
         (words nil)                     ;We've seen words.
@@ -1832,7 +1832,10 @@ Does not preserve point."
        ((equal prev ";")
         (if words (setq newline t)
           (setq res 'keyword)))
-       ((member prev '("case" "for" "select")) (setq res 'keyword))
+       ((member prev (if (string= tok "in")
+                         '("case" "for" "select")
+                       '("for" "select")))
+        (setq res 'keyword))
        ((assoc prev smie-grammar) (setq res 'word))
        (t
         (if newline
@@ -1844,7 +1847,7 @@ Does not preserve point."
   "Non-nil if TOK (at which we're looking) really is a keyword."
   (cond
    ((looking-at "[[:alnum:]_]+=") nil)
-   ((equal tok "in") (sh-smie--sh-keyword-in-p))
+   ((member tok '("in" "do")) (sh-smie--sh-keyword-in/do-p tok))
    (t (sh-smie--keyword-p))))
 
 (defun sh-smie--default-forward-token ()
diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el
index 855ba4b50cf..2eec4bcd21a 100644
--- a/lisp/progmodes/verilog-mode.el
+++ b/lisp/progmodes/verilog-mode.el
@@ -5374,10 +5374,7 @@ primitive or interface named NAME."
                                 (goto-char (match-end 0))
                                 (setq there (point))
                                 (setq err nil)
-                                (setq str (concat " // " cntx 
(verilog-get-expr))))
-
-                               (;-- otherwise...
-                                (setq str " // auto-endcomment confused "))))
+                                (setq str (concat " // " cntx 
(verilog-get-expr))))))
 
                              ((and
                                (verilog-in-case-region-p) ;-- handle case item 
differently
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index b7bfb192d87..81618428bf3 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -281,9 +281,10 @@ current project's main and external roots."
          (xref-references-in-directory identifier dir)
        (message "Searching %s... done" dir)))
    (let ((pr (project-current t)))
-     (cons
-      (xref--project-root pr)
-      (project-external-roots pr)))))
+     (project-combine-directories
+      (cons
+       (xref--project-root pr)
+       (project-external-roots pr))))))
 
 (cl-defgeneric xref-backend-apropos (backend pattern)
   "Find all symbols that match PATTERN string.
@@ -638,6 +639,18 @@ If SELECT is non-nil, select the target window."
   "Face used to highlight matches in the xref buffer."
   :version "28.1")
 
+(defvar-local xref-num-matches-found 0)
+
+(defvar xref-num-matches-face 'compilation-info
+  "Face name to show the number of matches on the mode line.")
+
+(defconst xref-mode-line-matches
+  `(" [" (:propertize (:eval (int-to-string xref-num-matches-found))
+                      face ,xref-num-matches-face
+                      help-echo "Number of matches so far")
+    "]"))
+(put 'xref-mode-line-matches 'risky-local-variable t)
+
 (defmacro xref--with-dedicated-window (&rest body)
   `(let* ((xref-w (get-buffer-window xref-buffer-name))
           (xref-w-dedicated (window-dedicated-p xref-w)))
@@ -1235,6 +1248,8 @@ Return an alist of the form ((GROUP . (XREF ...)) ...)."
       (xref--ensure-default-directory dd (current-buffer))
       (xref--xref-buffer-mode)
       (xref--show-common-initialize xref-alist fetcher alist)
+      (setq xref-num-matches-found (length xrefs))
+      (setq mode-line-process (list xref-mode-line-matches))
       (pop-to-buffer (current-buffer))
       (setq buf (current-buffer)))
     (xref--auto-jump-first buf (assoc-default 'auto-jump alist))
diff --git a/lisp/simple.el b/lisp/simple.el
index 0a8d721b155..dca5c9445a8 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -10675,10 +10675,10 @@ See also `normal-erase-is-backspace'."
          (t
           (if enabled
               (progn
-                (keyboard-translate ?\C-h ?\C-?)
-                (keyboard-translate ?\C-? ?\C-d))
-            (keyboard-translate ?\C-h ?\C-h)
-            (keyboard-translate ?\C-? ?\C-?))))
+                 (key-translate "C-h" "DEL")
+                 (key-translate "DEL" "C-d"))
+             (key-translate "C-h" "C-h")
+             (key-translate "DEL" "DEL"))))
 
     (if (called-interactively-p 'interactive)
        (message "Delete key deletes %s"
diff --git a/lisp/so-long.el b/lisp/so-long.el
index b93b047ce55..b7cfce31173 100644
--- a/lisp/so-long.el
+++ b/lisp/so-long.el
@@ -310,7 +310,7 @@
 ;; possibly also `so-long-max-lines' and `so-long-skip-leading-comments' (these
 ;; latter two are not used by default starting from Emacs 28.1).  E.g.:
 ;;
-;;   (add-hook 'js-mode-hook 'my-js-mode-hook)
+;;   (add-hook 'js-mode-hook #'my-js-mode-hook)
 ;;
 ;;   (defun my-js-mode-hook ()
 ;;     "Custom `js-mode' behaviors."
@@ -324,7 +324,7 @@
 ;; set `bidi-inhibit-bpa' in XML files, on the basis that XML files with long
 ;; lines are less likely to trigger BPA-related performance problems:
 ;;
-;;   (add-hook 'nxml-mode-hook 'my-nxml-mode-hook)
+;;   (add-hook 'nxml-mode-hook #'my-nxml-mode-hook)
 ;;
 ;;   (defun my-nxml-mode-hook ()
 ;;     "Custom `nxml-mode' behaviors."
@@ -366,7 +366,7 @@
 ;; variable.  Refer to M-: (info "(emacs) Specifying File Variables") RET
 ;;
 ;; `so-long-minor-mode' can also be called directly if desired.  e.g.:
-;; (add-hook 'FOO-mode-hook 'so-long-minor-mode)
+;; (add-hook 'FOO-mode-hook #'so-long-minor-mode)
 ;;
 ;; In Emacs 26.1 or later (see "Caveats" below) you also have the option of
 ;; using file-local and directory-local variables to determine how `so-long'
@@ -1320,8 +1320,8 @@ This minor mode is a standard `so-long-action' option."
           (so-long--ensure-enabled)
           (setq so-long--active t
                 so-long-detected-p t
-                so-long-function 'turn-on-so-long-minor-mode
-                so-long-revert-function 'turn-off-so-long-minor-mode)
+                so-long-function #'turn-on-so-long-minor-mode
+                so-long-revert-function #'turn-off-so-long-minor-mode)
           (so-long-remember-all :reset)
           (unless (derived-mode-p 'so-long-mode)
             (setq so-long-mode-line-info (so-long-mode-line-info))))
@@ -1345,7 +1345,7 @@ This minor mode is a standard `so-long-action' option."
 
 (defvar so-long-mode-map
   (let ((map (make-sparse-keymap)))
-    (define-key map (kbd "C-c C-c") 'so-long-revert)
+    (define-key map (kbd "C-c C-c") #'so-long-revert)
     ;; Define the major mode menu.  We have an awkward issue whereby
     ;; [menu-bar so-long] is already defined in the global map and is
     ;; :visible so-long-detected-p, but we also want this to be
@@ -1396,12 +1396,12 @@ configure the behavior."
     (so-long--ensure-enabled)
     (setq so-long--active t
           so-long-detected-p t
-          so-long-function 'so-long-mode
-          so-long-revert-function 'so-long-mode-revert))
+          so-long-function #'so-long-mode
+          so-long-revert-function #'so-long-mode-revert))
   ;; Use `after-change-major-mode-hook' to disable minor modes and override
   ;; variables.  Append, to act after any globalized modes have acted.
   (add-hook 'after-change-major-mode-hook
-            'so-long-after-change-major-mode :append :local)
+            #'so-long-after-change-major-mode :append :local)
   ;; Override variables.  This is the first of two instances where we do this
   ;; (the other being `so-long-after-change-major-mode').  It is desirable to
   ;; set variables here in order to cover cases where the setting of a variable
@@ -1591,8 +1591,8 @@ because we do not want to downgrade the major mode in 
that scenario."
     (when (and (symbolp (so-long-function))
                (provided-mode-derived-p (so-long-function) 'so-long-mode))
       ;; Downgrade from `so-long-mode' to the `so-long-minor-mode' behavior.
-      (setq so-long-function 'turn-on-so-long-minor-mode
-            so-long-revert-function 'turn-off-so-long-minor-mode))))
+      (setq so-long-function #'turn-on-so-long-minor-mode
+            so-long-revert-function #'turn-off-so-long-minor-mode))))
 
 (defun so-long-inhibit (&optional _mode)
   "Prevent `global-so-long-mode' from having any effect.
@@ -1897,7 +1897,6 @@ Use \\[so-long-commentary] for more information.
 Use \\[so-long-customize] to open the customization group `so-long' to
 configure the behavior."
   :global t
-  :group 'so-long
   (if global-so-long-mode
       ;; Enable
       (progn
@@ -2030,7 +2029,7 @@ If it appears in `%s', you should remove it."
   ;; Update to version 1.0 from earlier versions:
   (when (version< so-long-version "1.0")
     (remove-hook 'change-major-mode-hook 'so-long-change-major-mode)
-    (eval-and-compile (require 'advice)) ;; Both macros and functions.
+    (require 'advice) ;; It should already be loaded, but just in case.
     (declare-function ad-find-advice "advice")
     (declare-function ad-remove-advice "advice")
     (declare-function ad-activate "advice")
diff --git a/lisp/speedbar.el b/lisp/speedbar.el
index 67d4e8c4df1..51c5962cb66 100644
--- a/lisp/speedbar.el
+++ b/lisp/speedbar.el
@@ -631,7 +631,7 @@ function `speedbar-extension-list-to-regex'.")
   (append '(".[ch]\\(\\+\\+\\|pp\\|c\\|h\\|xx\\)?" ".tex\\(i\\(nfo\\)?\\)?"
            ".el" ".emacs" ".l" ".lsp" ".p" ".java" ".js" 
".f\\(90\\|77\\|or\\)?")
          (if speedbar-use-imenu-flag
-             '(".ad[abs]" ".p[lm]" ".tcl" ".m" ".scm" ".pm" ".py" ".g"
+             '(".ad[abs]" ".p[lm]" ".tcl" ".m" ".scm" ".pm" ".py" ".g" ".lua"
                ;; html is not supported by default, but an imenu tags package
                ;; is available.  Also, html files are nice to be able to see.
                ".s?html"
diff --git a/lisp/subr.el b/lisp/subr.el
index 2aaaa521bb5..743c94e3b2e 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1963,6 +1963,7 @@ be a list of the form returned by `event-start' and 
`event-end'."
 (set-advertised-calling-convention 'redirect-frame-focus '(frame focus-frame) 
"24.3")
 (set-advertised-calling-convention 'libxml-parse-xml-region '(&optional start 
end base-url) "27.1")
 (set-advertised-calling-convention 'libxml-parse-html-region '(&optional start 
end base-url) "27.1")
+(set-advertised-calling-convention 'sleep-for '(seconds) "30.1")
 (set-advertised-calling-convention 'time-convert '(time form) "29.1")
 
 ;;;; Obsolescence declarations for variables, and aliases.
@@ -3412,7 +3413,7 @@ causes it to evaluate `help-form' and display the result."
     (message "%s%s" prompt (char-to-string char))
     char))
 
-(defun sit-for (seconds &optional nodisp obsolete)
+(defun sit-for (seconds &optional nodisp)
   "Redisplay, then wait for SECONDS seconds.  Stop when input is available.
 SECONDS may be a floating-point value.
 \(On operating systems that do not support waiting for fractions of a
@@ -3421,29 +3422,11 @@ second, floating-point values are rounded down to the 
nearest integer.)
 If optional arg NODISP is t, don't redisplay, just wait for input.
 Redisplay does not happen if input is available before it starts.
 
-Value is t if waited the full time with no input arriving, and nil otherwise.
-
-An obsolete, but still supported form is
-\(sit-for SECONDS &optional MILLISECONDS NODISP)
-where the optional arg MILLISECONDS specifies an additional wait period,
-in milliseconds; this was useful when Emacs was built without
-floating point support."
-  (declare (advertised-calling-convention (seconds &optional nodisp) "22.1")
-           (compiler-macro
-            (lambda (form)
-              (if (not (or (numberp nodisp) obsolete)) form
-                (macroexp-warn-and-return
-                 (format-message "Obsolete calling convention for `sit-for'")
-                 `(,(car form) (+ ,seconds (/ (or ,nodisp 0) 1000.0)) 
,obsolete)
-                 '(obsolete sit-for))))))
+Value is t if waited the full time with no input arriving, and nil otherwise."
   ;; This used to be implemented in C until the following discussion:
   ;; https://lists.gnu.org/r/emacs-devel/2006-07/msg00401.html
   ;; Then it was moved here using an implementation based on an idle timer,
   ;; which was then replaced by the use of read-event.
-  (if (numberp nodisp)
-      (setq seconds (+ seconds (* 1e-3 nodisp))
-            nodisp obsolete)
-    (if obsolete (setq nodisp obsolete)))
   (cond
    (noninteractive
     (sleep-for seconds)
@@ -7299,13 +7282,15 @@ lines."
             (setq start (length string)))))
       (nreverse lines))))
 
-(defun buffer-match-p (condition buffer-or-name &optional arg)
+(defvar buffer-match-p--past-warnings nil)
+
+(defun buffer-match-p (condition buffer-or-name &rest args)
   "Return non-nil if BUFFER-OR-NAME matches CONDITION.
 CONDITION is either:
 - the symbol t, to always match,
 - the symbol nil, which never matches,
 - a regular expression, to match a buffer name,
-- a predicate function that takes BUFFER-OR-NAME and ARG as
+- a predicate function that takes BUFFER-OR-NAME plus ARGS as
   arguments, and returns non-nil if the buffer matches,
 - a cons-cell, where the car describes how to interpret the cdr.
   The car can be one of the following:
@@ -7330,9 +7315,18 @@ CONDITION is either:
                       ((pred stringp)
                        (string-match-p condition (buffer-name buffer)))
                       ((pred functionp)
-                       (if (eq 1 (cdr (func-arity condition)))
-                           (funcall condition buffer-or-name)
-                         (funcall condition buffer-or-name arg)))
+                       (if (cdr args)
+                           ;; New in Emacs>29.1. no need for compatibility 
hack.
+                           (apply condition buffer-or-name args)
+                         (condition-case-unless-debug err
+                             (apply condition buffer-or-name args)
+                           (wrong-number-of-arguments
+                            (unless (member condition
+                                            buffer-match-p--past-warnings)
+                              (message "%s" (error-message-string err))
+                              (push condition buffer-match-p--past-warnings))
+                            (apply condition buffer-or-name
+                                   (if args nil '(nil)))))))
                       (`(major-mode . ,mode)
                        (eq
                         (buffer-local-value 'major-mode buffer)
@@ -7354,17 +7348,17 @@ CONDITION is either:
                 (throw 'match t)))))))
     (funcall match (list condition))))
 
-(defun match-buffers (condition &optional buffers arg)
+(defun match-buffers (condition &optional buffers &rest args)
   "Return a list of buffers that match CONDITION, or nil if none match.
 See `buffer-match-p' for various supported CONDITIONs.
 By default all buffers are checked, but the optional
 argument BUFFERS can restrict that: its value should be
 an explicit list of buffers to check.
-Optional argument ARG is passed to `buffer-match-p', for
+Optional arguments ARGS are passed to `buffer-match-p', for
 predicate conditions in CONDITION."
   (let (bufs)
     (dolist (buf (or buffers (buffer-list)))
-      (when (buffer-match-p condition (get-buffer buf) arg)
+      (when (apply #'buffer-match-p condition (get-buffer buf) args)
         (push buf bufs)))
     bufs))
 
diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el
index d2815c03ebf..e21367255a0 100644
--- a/lisp/tab-bar.el
+++ b/lisp/tab-bar.el
@@ -1227,7 +1227,9 @@ tab bar might wrap to the second line when it shouldn't.")
                    ((< prev-width width)
                     (let* ((space (apply #'propertize " "
                                          (text-properties-at 0 name)))
-                           (ins-pos (- len (if close-p 1 0)))
+                           (ins-pos (- len (if close-p
+                                               (length tab-bar-close-button)
+                                             0)))
                            (prev-name name))
                       (while continue
                         (setq name (concat (substring name 0 ins-pos)
diff --git a/lisp/term.el b/lisp/term.el
index b8466b21332..b2875e4a17f 100644
--- a/lisp/term.el
+++ b/lisp/term.el
@@ -486,7 +486,7 @@ Customize this option to nil if you want the previous 
behavior."
 
 (defcustom term-scroll-to-bottom-on-output nil
   "Controls whether interpreter output causes window to scroll.
-If nil, then do not scroll.  If t or `all', scroll all windows showing buffer.
+If nil, then do not scroll.  If t, scroll all windows showing buffer.
 If `this', scroll only the selected window.
 If `others', scroll only those that are not the selected window.
 
@@ -494,7 +494,12 @@ The default is nil.
 
 See variable `term-scroll-show-maximum-output'.
 This variable is buffer-local."
-  :type 'boolean
+  :type '(choice (const :tag "Don't scroll" nil)
+                 (const :tag "Scroll selected window only" this)
+                 (const :tag "Scroll unselected windows" others)
+                 ;; We also recognize `all', but we don't advertise it
+                 ;; anymore.  (Bug#66071)
+                 (other :tag "Scroll all windows" t))
   :group 'term)
 
 (defcustom term-scroll-snap-to-bottom t
diff --git a/lisp/term/android-win.el b/lisp/term/android-win.el
index db873c176c8..f3f5c227df0 100644
--- a/lisp/term/android-win.el
+++ b/lisp/term/android-win.el
@@ -233,5 +233,63 @@ EVENT is a preedit-text event."
 (defconst x-pointer-invisible 0)
 
 
+;; Drag-and-drop.  There are two formats of drag and drop event under
+;; Android.  The data field of the first is set to a cons of X and Y,
+;; which represent a position within a frame that something is being
+;; dragged over, whereas that of the second is a cons of either symbol
+;; `uri' or `text' and a list of URIs or text to insert.
+;;
+;; If a content:// URI is encountered, then it in turn designates a
+;; file within the special-purpose /content/by-authority directory,
+;; which facilitates accessing such atypical files.
+
+(declare-function url-type "url-parse")
+(declare-function url-host "url-parse")
+(declare-function url-filename "url-parse")
+
+(defun android-handle-dnd-event (event)
+  "Respond to a drag-and-drop event EVENT.
+If it reflects the motion of an item above a frame, call
+`dnd-handle-movement' to move the cursor or scroll the window
+under the item pursuant to the pertinent user options.
+
+If it reflects dropped text, insert such text within window at
+the location of the drop.
+
+If it reflects a list of URIs, then open each URI, converting
+content:// URIs into the special file names which represent them."
+  (interactive "e")
+  (let ((message (caddr event))
+        (posn (event-start event)))
+    (cond ((fixnump (car message))
+           (dnd-handle-movement posn))
+          ((eq (car message) 'text)
+           (let ((window (posn-window posn)))
+             (with-selected-window window
+               (unless mouse-yank-at-point
+                 (goto-char (posn-point (event-start event))))
+               (dnd-insert-text window 'copy (cdr message)))))
+          ((eq (car message) 'uri)
+           (let ((uri-list (split-string (cdr message)
+                                         "[\0\r\n]" t))
+                 (dnd-unescape-file-uris t))
+             (dolist (uri uri-list)
+               (ignore-errors
+                 (let ((url (url-generic-parse-url uri)))
+                   (when (equal (url-type url) "content")
+                     ;; Replace URI with a matching /content file
+                     ;; name.
+                     (setq uri (format "file:/content/by-authority/%s%s"
+                                       (url-host url)
+                                       (url-filename url))
+                           ;; And guarantee that this file URI is not
+                           ;; subject to URI decoding, for it must be
+                           ;; transformed back into a content URI.
+                           dnd-unescape-file-uris nil))))
+               (dnd-handle-one-url (posn-window posn) 'copy uri)))))))
+
+(define-key special-event-map [drag-n-drop] 'android-handle-dnd-event)
+
+
 (provide 'android-win)
 ;; android-win.el ends here.
diff --git a/lisp/term/bobcat.el b/lisp/term/bobcat.el
index 983c8cded2f..0c2eba486a3 100644
--- a/lisp/term/bobcat.el
+++ b/lisp/term/bobcat.el
@@ -3,8 +3,8 @@
 (defun terminal-init-bobcat ()
   "Terminal initialization function for bobcat."
   ;; HP terminals usually encourage using ^H as the rubout character
-  (keyboard-translate ?\177 ?\^h)
-  (keyboard-translate ?\^h ?\177))
+  (key-translate "DEL" "C-h")
+  (key-translate "C-h" "DEL"))
 
 (provide 'term/bobcat)
 
diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el
index 295ef2b3f4c..5ed4e46e0a5 100644
--- a/lisp/term/xterm.el
+++ b/lisp/term/xterm.el
@@ -725,7 +725,7 @@ Return the pasted text as a string."
         ;; `tty-set-up-initial-frame-faces' only once, but that
         ;; caused the light background faces to be computed
         ;; incorrectly.  See:
-        ;; http://permalink.gmane.org/gmane.emacs.devel/119627
+        ;; https://lists.gnu.org/r/emacs-devel/2010-01/msg00439.html
         (when recompute-faces
           (tty-set-up-initial-frame-faces))))))
 
diff --git a/lisp/textmodes/dns-mode.el b/lisp/textmodes/dns-mode.el
index 1b5f0c1d94b..bc3fa8d8e3a 100644
--- a/lisp/textmodes/dns-mode.el
+++ b/lisp/textmodes/dns-mode.el
@@ -132,6 +132,7 @@ manually with \\[dns-mode-soa-increment-serial]."
     (modify-syntax-entry ?\; "<   " table)
     (modify-syntax-entry ?\n ">   " table)
     (modify-syntax-entry ?\" "\""   table)
+    (modify-syntax-entry ?\\ "\\"   table)
     table)
   "Syntax table in use in DNS master file buffers.")
 
diff --git a/lisp/thingatpt.el b/lisp/thingatpt.el
index 72acb0b749f..5d4f4df9131 100644
--- a/lisp/thingatpt.el
+++ b/lisp/thingatpt.el
@@ -565,9 +565,9 @@ looks like an email address, \"ftp://\"; if it starts with
         ;; If it looks like ftp.example.com. treat it as ftp.
         (if (string-match "\\`ftp\\." str)
             (setq str (concat "ftp://"; str)))
-        ;; If it looks like www.example.com. treat it as http.
+         ;; If it looks like www.example.com. treat it as https.
         (if (string-match "\\`www\\." str)
-            (setq str (concat "http://"; str)))
+             (setq str (concat "https://"; str)))
         ;; Otherwise, it just isn't a URI.
         (setq str nil)))
       str)))
diff --git a/lisp/touch-screen.el b/lisp/touch-screen.el
index 2621aebf037..ea1e27a263b 100644
--- a/lisp/touch-screen.el
+++ b/lisp/touch-screen.el
@@ -58,25 +58,30 @@ This is always cleared upon any significant state change.")
 If non-nil, the touch screen key event translation machinery
 is being called from `read-sequence' or some similar function.")
 
+(defgroup touch-screen nil
+  "Interact with Emacs from touch screen devices."
+  :group 'mouse
+  :version "30.0")
+
 (defcustom touch-screen-display-keyboard nil
   "If non-nil, always display the on screen keyboard.
 A buffer local value means to always display the on screen
 keyboard when the buffer is selected."
   :type 'boolean
-  :group 'mouse
+  :group 'touch-screen
   :version "30.1")
 
 (defcustom touch-screen-delay 0.7
   "Delay in seconds before Emacs considers a touch to be a long-press."
   :type 'number
-  :group 'mouse
+  :group 'touch-screen
   :version "30.1")
 
 (defcustom touch-screen-precision-scroll nil
   "Whether or not to use precision scrolling for touch screens.
 See `pixel-scroll-precision-mode' for more details."
   :type 'boolean
-  :group 'mouse
+  :group 'touch-screen
   :version "30.1")
 
 (defcustom touch-screen-word-select nil
@@ -84,7 +89,7 @@ See `pixel-scroll-precision-mode' for more details."
 If non-nil, long-press events (see `touch-screen-delay') followed
 by dragging will try to select entire words."
   :type 'boolean
-  :group 'mouse
+  :group 'touch-screen
   :version "30.1")
 
 (defcustom touch-screen-extend-selection nil
@@ -93,7 +98,7 @@ When enabled, tapping on the character containing the point or
 mark will resume dragging where it left off while the region is
 active."
   :type 'boolean
-  :group 'mouse
+  :group 'touch-screen
   :version "30.1")
 
 (defcustom touch-screen-preview-select nil
@@ -102,7 +107,15 @@ When enabled, a preview of the visible line within the 
window
 will be displayed in the echo area while dragging combined with
 an indication of the position of point within that line."
   :type 'boolean
-  :group 'mouse
+  :group 'touch-screen
+  :version "30.1")
+
+(defcustom touch-screen-enable-hscroll t
+  "If non-nil, hscroll can be changed from the touch screen.
+When enabled, tapping on a window and dragging your finger left
+or right will scroll that window horizontally."
+  :type 'boolean
+  :group 'touch-screen
   :version "30.1")
 
 (defvar-local touch-screen-word-select-bounds nil
@@ -229,7 +242,12 @@ horizontal scrolling according to the movement in DX."
                             (>= (- accumulator) column-width))
                        (progn
                          (setq accumulator (+ accumulator column-width))
-                         (scroll-right 1)
+                         ;; Maintain both hscroll counters even when
+                         ;; it's disabled to prevent unintentional or
+                         ;; patently horizontal gestures from
+                         ;; scrolling the window vertically.
+                         (when touch-screen-enable-hscroll
+                           (scroll-right 1))
                          (setq lines-hscrolled (1+ lines-hscrolled))
                          (when (not (zerop accumulator))
                            ;; If there is still an outstanding amount
@@ -238,7 +256,8 @@ horizontal scrolling according to the movement in DX."
                      (when (and (> accumulator 0)
                                 (>= accumulator column-width))
                        (setq accumulator (- accumulator column-width))
-                       (scroll-left 1)
+                       (when touch-screen-enable-hscroll
+                         (scroll-left 1))
                        (setq lines-hscrolled (1+ lines-hscrolled))
                        (when (not (zerop accumulator))
                          ;; If there is still an outstanding amount to
diff --git a/lisp/treesit.el b/lisp/treesit.el
index 402417c6ca9..80bdf164b07 100644
--- a/lisp/treesit.el
+++ b/lisp/treesit.el
@@ -32,9 +32,8 @@
 
 ;;; Code:
 
-(eval-when-compile (require 'cl-lib))
 (eval-when-compile (require 'subr-x)) ; For `string-join'.
-(require 'cl-seq)
+(require 'cl-lib)
 (require 'font-lock)
 (require 'seq)
 
@@ -893,6 +892,8 @@ Other keywords include:
              `append'   Append the new face to existing ones.
              `prepend'  Prepend the new face to existing ones.
              `keep'     Fill-in regions without an existing face.
+  :default-language  LANGUAGE  Every QUERY after this keyword
+                               will use LANGUAGE by default.
 
 Capture names in QUERY should be face names like
 `font-lock-keyword-face'.  The captured node will be fontified
@@ -922,12 +923,22 @@ name, it is ignored."
           ;; that following queries will apply to.
           current-language current-override
           current-feature
+          ;; DEFAULT-LANGUAGE will be chosen when current-language is
+          ;; not set.
+          default-language
           ;; The list this function returns.
           (result nil))
       (while query-specs
         (let ((token (pop query-specs)))
           (pcase token
             ;; (1) Process keywords.
+            (:default-language
+             (let ((lang (pop query-specs)))
+               (when (or (not (symbolp lang)) (null lang))
+                 (signal 'treesit-font-lock-error
+                         `("Value of :default-language should be a symbol"
+                           ,lang)))
+               (setq default-language lang)))
             (:language
              (let ((lang (pop query-specs)))
                (when (or (not (symbolp lang)) (null lang))
@@ -955,23 +966,24 @@ name, it is ignored."
                (setq current-feature var)))
             ;; (2) Process query.
             ((pred treesit-query-p)
-             (when (null current-language)
-               (signal 'treesit-font-lock-error
-                       `("Language unspecified, use :language keyword to 
specify a language for this query" ,token)))
-             (when (null current-feature)
-               (signal 'treesit-font-lock-error
-                       `("Feature unspecified, use :feature keyword to specify 
the feature name for this query" ,token)))
-             (if (treesit-compiled-query-p token)
-                 (push `(,current-language token) result)
-               (push `(,(treesit-query-compile current-language token)
-                       t
-                       ,current-feature
-                       ,current-override)
-                     result))
-             ;; Clears any configurations set for this query.
-             (setq current-language nil
-                   current-override nil
-                   current-feature nil))
+             (let ((lang (or default-language current-language)))
+               (when (null lang)
+                 (signal 'treesit-font-lock-error
+                         `("Language unspecified, use :language keyword or 
:default-language to specify a language for this query" ,token)))
+               (when (null current-feature)
+                 (signal 'treesit-font-lock-error
+                         `("Feature unspecified, use :feature keyword to 
specify the feature name for this query" ,token)))
+               (if (treesit-compiled-query-p token)
+                   (push `(,lang token) result)
+                 (push `(,(treesit-query-compile lang token)
+                         t
+                         ,current-feature
+                         ,current-override)
+                       result))
+               ;; Clears any configurations set for this query.
+               (setq current-language nil
+                     current-override nil
+                     current-feature nil)))
             (_ (signal 'treesit-font-lock-error
                        `("Unexpected value" ,token))))))
       (nreverse result))))
@@ -2132,7 +2144,7 @@ If LANGUAGE is nil, return the first definition for THING 
in
                                     (copy-tree (cdr entry)))
                                   treesit-thing-settings)))))
 
-(defalias 'treesit-thing-defined-p 'treesit-thing-definition
+(defalias 'treesit-thing-defined-p #'treesit-thing-definition
   "Return non-nil if THING is defined.")
 
 (defun treesit-beginning-of-thing (thing &optional arg tactic)
@@ -2889,7 +2901,9 @@ to the offending pattern and highlight the pattern."
                   (start (nth 1 data))
                   (inhibit-read-only t))
              (erase-buffer)
-             (insert (treesit-query-expand query))
+             (insert (if (stringp query)
+                         query
+                       (treesit-query-expand query)))
              (goto-char start)
              (search-forward " " nil t)
              (put-text-property start (point) 'face 'error)
diff --git a/lisp/type-break.el b/lisp/type-break.el
index 494ed80c496..d3371d66863 100644
--- a/lisp/type-break.el
+++ b/lisp/type-break.el
@@ -77,7 +77,8 @@ rest from typing, then the next typing break is simply 
rescheduled for later.
 If a break is interrupted before this much time elapses, the user will be
 asked whether or not really to interrupt the break."
   :set-after '(type-break-interval)
-  :type 'natnum
+  :type '(choice (const :tag "Don't check idle time" nil)
+                 natnum)
   :group 'type-break)
 
 (defcustom type-break-good-break-interval nil
@@ -201,7 +202,8 @@ key is pressed."
   "Name of file used to save state across sessions.
 If this is nil, no data will be saved across sessions."
   :version "24.4"                       ; added locate-user
-  :type 'file)
+  :type '(choice (const :tag "Don't save data" nil)
+                 file))
 
 (defvar type-break-post-command-hook '(type-break-check)
   "Hook run indirectly by `post-command-hook' for typing break functions.
diff --git a/lisp/vc/ediff.el b/lisp/vc/ediff.el
index 24836e1b1c1..7e3b20d8939 100644
--- a/lisp/vc/ediff.el
+++ b/lisp/vc/ediff.el
@@ -909,7 +909,7 @@ MERGE-AUTOSTORE-DIR is the directory in which to store 
merged files."
 (defun ediff-windows-wordwise (dumb-mode &optional wind-A wind-B startup-hooks)
   "Compare WIND-A and WIND-B, which are selected by clicking, wordwise.
 This compares the portions of text visible in each of the two windows.
-With prefix argument, DUMB-MODE, or on a non-windowing display, works as
+With prefix argument, DUMB-MODE, or on a non-graphical display, works as
 follows:
 If WIND-A is nil, use selected window.
 If WIND-B is nil, use window next to WIND-A.
@@ -923,7 +923,7 @@ arguments after setting up the Ediff buffers."
 (defun ediff-windows-linewise (dumb-mode &optional wind-A wind-B startup-hooks)
   "Compare WIND-A and WIND-B, which are selected by clicking, linewise.
 This compares the portions of text visible in each of the two windows.
-With prefix argument, DUMB-MODE, or on a non-windowing display, works as
+With prefix argument, DUMB-MODE, or on a non-graphical display, works as
 follows:
 If WIND-A is nil, use selected window.
 If WIND-B is nil, use window next to WIND-A.
@@ -935,7 +935,7 @@ arguments after setting up the Ediff buffers."
 
 ;; Compare visible portions of text in WIND-A and WIND-B, which are
 ;; selected by clicking.
-;; With prefix argument, DUMB-MODE, or on a non-windowing display,
+;; With prefix argument, DUMB-MODE, or on a non-graphical display,
 ;; works as follows:
 ;; If WIND-A is nil, use selected window.
 ;; If WIND-B is nil, use window next to WIND-A.
diff --git a/lisp/vc/log-edit.el b/lisp/vc/log-edit.el
index 1e249c637a6..c77f4494c1a 100644
--- a/lisp/vc/log-edit.el
+++ b/lisp/vc/log-edit.el
@@ -1219,7 +1219,10 @@ line of MSG."
       (let ((pt (point)))
         (and (zerop (forward-line 1))
              (looking-at "\n\\|\\'")
-             (let ((summary (buffer-substring-no-properties pt (1- (point)))))
+             (let ((summary (buffer-substring-no-properties pt
+                                                            (if (bolp)
+                                                                (1- (point))
+                                                              (point)))))
                (skip-chars-forward " \n")
                (delete-region pt (point))
                (log-edit-set-header "Summary" summary)))))))
diff --git a/lisp/vc/smerge-mode.el b/lisp/vc/smerge-mode.el
index 7847a6c7670..e42b82c7064 100644
--- a/lisp/vc/smerge-mode.el
+++ b/lisp/vc/smerge-mode.el
@@ -1239,7 +1239,11 @@ spacing of the \"Lower\" chunk."
     (write-region beg1 end1 file1 nil 'nomessage)
     (write-region beg2 end2 file2 nil 'nomessage)
     (unwind-protect
-       (with-current-buffer (get-buffer-create smerge-diff-buffer-name)
+       (save-current-buffer
+          (if-let (buffer (get-buffer smerge-diff-buffer-name))
+              (set-buffer buffer)
+            (set-buffer (get-buffer-create smerge-diff-buffer-name))
+            (setq buffer-read-only t))
          (setq default-directory dir)
          (let ((inhibit-read-only t))
            (erase-buffer)
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index 5c21a5b884e..9ec45c59893 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -416,15 +416,18 @@ in the order given by `git status'."
 
 (defun vc-git-mode-line-string (file)
   "Return a string for `vc-mode-line' to put in the mode line for FILE."
-  (let* ((rev (vc-working-revision file 'Git))
-         (disp-rev (or (vc-git--symbolic-ref file)
-                       (and rev (substring rev 0 7))))
-         (def-ml (vc-default-mode-line-string 'Git file))
-         (help-echo (get-text-property 0 'help-echo def-ml))
-         (face   (get-text-property 0 'face def-ml)))
-    (propertize (concat (substring def-ml 0 4) disp-rev)
-                'face face
-                'help-echo (concat help-echo "\nCurrent revision: " rev))))
+  (pcase-let* ((backend-name "Git")
+               (state (vc-state file))
+               (`(,state-echo ,face ,indicator)
+                (vc-mode-line-state state))
+               (rev (vc-working-revision file 'Git))
+               (disp-rev (or (vc-git--symbolic-ref file)
+                             (and rev (substring rev 0 7))))
+               (state-string (concat backend-name indicator disp-rev)))
+    (propertize state-string 'face face 'help-echo
+                (concat state-echo " under the " backend-name
+                        " version control system"
+                        "\nCurrent revision: " rev))))
 
 (cl-defstruct (vc-git-extra-fileinfo
             (:copier nil)
diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el
index c3e563a1f10..89b2814a0a3 100644
--- a/lisp/vc/vc-hg.el
+++ b/lisp/vc/vc-hg.el
@@ -216,8 +216,9 @@ If `ask', you will be prompted for a branch type."
 
 (defun vc-hg-state (file)
   "Hg-specific version of `vc-state'."
-  (let ((state (vc-hg-state-fast file)))
-    (if (eq state 'unsupported) (vc-hg-state-slow file) state)))
+  (unless (file-directory-p file)
+    (let ((state (vc-hg-state-fast file)))
+      (if (eq state 'unsupported) (vc-hg-state-slow file) state))))
 
 (defun vc-hg-state-slow (file)
   "Determine status of FILE by running hg."
@@ -351,47 +352,22 @@ specific file to query."
 
 (defun vc-hg-mode-line-string (file)
   "Hg-specific version of `vc-mode-line-string'."
-  (let* ((backend-name "Hg")
-         (truename (file-truename file))
-         (state (vc-state truename))
-         (state-echo nil)
-         (face nil)
-         (rev (and state
-                   (let ((default-directory
-                          (expand-file-name (vc-hg-root truename))))
-                     (vc-hg--symbolic-revision
-                      "."
-                      (and vc-hg-use-file-version-for-mode-line-version
-                           truename)))))
-         (rev (or rev "???")))
-    (propertize
-     (cond ((or (eq state 'up-to-date)
-                (eq state 'needs-update))
-            (setq state-echo "Up to date file")
-            (setq face 'vc-up-to-date-state)
-            (concat backend-name "-" rev))
-           ((eq state 'added)
-            (setq state-echo "Locally added file")
-            (setq face 'vc-locally-added-state)
-            (concat backend-name "@" rev))
-           ((eq state 'conflict)
-            (setq state-echo "File contains conflicts after the last merge")
-            (setq face 'vc-conflict-state)
-            (concat backend-name "!" rev))
-           ((eq state 'removed)
-            (setq state-echo "File removed from the VC system")
-            (setq face 'vc-removed-state)
-            (concat backend-name "!" rev))
-           ((eq state 'missing)
-            (setq state-echo "File tracked by the VC system, but missing from 
the file system")
-            (setq face 'vc-missing-state)
-            (concat backend-name "?" rev))
-           (t
-            (setq state-echo "Locally modified file")
-            (setq face 'vc-edited-state)
-            (concat backend-name ":" rev)))
-     'face face
-     'help-echo (concat state-echo " under the " backend-name
+  (pcase-let* ((backend-name "Hg")
+               (truename (file-truename file))
+               (state (vc-state truename))
+               (`(,state-echo ,face ,indicator)
+                (vc-mode-line-state state))
+               (rev (and state
+                         (let ((default-directory
+                                (expand-file-name (vc-hg-root truename))))
+                           (vc-hg--symbolic-revision
+                            "."
+                            (and vc-hg-use-file-version-for-mode-line-version
+                                 truename)))))
+               (rev (or rev "???"))
+               (state-string (concat backend-name indicator rev)))
+    (propertize state-string 'face face 'help-echo
+                (concat state-echo " under the " backend-name
                         " version control system"))))
 
 ;;; History functions
diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el
index a4de0a6e791..c16fb63b2ff 100644
--- a/lisp/vc/vc-hooks.el
+++ b/lisp/vc/vc-hooks.el
@@ -705,6 +705,50 @@ If BACKEND is passed use it as the VC backend when 
computing the result."
   (force-mode-line-update)
   backend)
 
+(defun vc-mode-line-state (state)
+  "Return a list of data to display on the mode line.
+The argument STATE should contain the version control state returned
+from `vc-state'.  The returned list includes three elements: the echo
+string, the face name, and the indicator that usually is one character."
+  (let (state-echo face indicator)
+    (cond ((or (eq state 'up-to-date)
+               (eq state 'needs-update))
+           (setq state-echo "Up to date file")
+           (setq face 'vc-up-to-date-state)
+           (setq indicator "-"))
+          ((stringp state)
+           (setq state-echo (concat "File locked by" state))
+           (setq face 'vc-locked-state)
+           (setq indicator (concat ":" state ":")))
+          ((eq state 'added)
+           (setq state-echo "Locally added file")
+           (setq face 'vc-locally-added-state)
+           (setq indicator "@"))
+          ((eq state 'conflict)
+           (setq state-echo "File contains conflicts after the last merge")
+           (setq face 'vc-conflict-state)
+           (setq indicator "!"))
+          ((eq state 'removed)
+           (setq state-echo "File removed from the VC system")
+           (setq face 'vc-removed-state)
+           (setq indicator "!"))
+          ((eq state 'missing)
+           (setq state-echo "File tracked by the VC system, but missing from 
the file system")
+           (setq face 'vc-missing-state)
+           (setq indicator "?"))
+          ((eq state 'ignored)
+           (setq state-echo "File tracked by the VC system, but ignored")
+           (setq face 'vc-ignored-state)
+           (setq indicator "!"))
+          (t
+           ;; Not just for the 'edited state, but also a fallback
+           ;; for all other states.  Think about different symbols
+           ;; for 'needs-update and 'needs-merge.
+           (setq state-echo "Locally modified file")
+           (setq face 'vc-edited-state)
+           (setq indicator ":")))
+    (list state-echo face indicator)))
+
 (defun vc-default-mode-line-string (backend file)
   "Return a string for `vc-mode-line' to put in the mode line for FILE.
 Format:
@@ -717,51 +761,15 @@ Format:
   \"BACKEND?REV\"        if the file is under VC, but is missing
 
 This function assumes that the file is registered."
-  (let* ((backend-name (symbol-name backend))
-        (state   (vc-state file backend))
-        (state-echo nil)
-        (face nil)
-        (rev     (vc-working-revision file backend)))
-    (propertize
-     (cond ((or (eq state 'up-to-date)
-               (eq state 'needs-update))
-           (setq state-echo "Up to date file")
-           (setq face 'vc-up-to-date-state)
-           (concat backend-name "-" rev))
-          ((stringp state)
-           (setq state-echo (concat "File locked by" state))
-           (setq face 'vc-locked-state)
-           (concat backend-name ":" state ":" rev))
-           ((eq state 'added)
-            (setq state-echo "Locally added file")
-           (setq face 'vc-locally-added-state)
-            (concat backend-name "@" rev))
-           ((eq state 'conflict)
-            (setq state-echo "File contains conflicts after the last merge")
-           (setq face 'vc-conflict-state)
-            (concat backend-name "!" rev))
-           ((eq state 'removed)
-            (setq state-echo "File removed from the VC system")
-           (setq face 'vc-removed-state)
-            (concat backend-name "!" rev))
-           ((eq state 'missing)
-            (setq state-echo "File tracked by the VC system, but missing from 
the file system")
-           (setq face 'vc-missing-state)
-            (concat backend-name "?" rev))
-           ((eq state 'ignored)
-            (setq state-echo "File tracked by the VC system, but ignored")
-            (setq face 'vc-ignored-state)
-            (concat backend-name "!" rev))
-          (t
-           ;; Not just for the 'edited state, but also a fallback
-           ;; for all other states.  Think about different symbols
-           ;; for 'needs-update and 'needs-merge.
-           (setq state-echo "Locally modified file")
-           (setq face 'vc-edited-state)
-           (concat backend-name ":" rev)))
-     'face face
-     'help-echo (concat state-echo " under the " backend-name
-                       " version control system"))))
+  (pcase-let* ((backend-name (symbol-name backend))
+               (state (vc-state file backend))
+               (rev (vc-working-revision file backend))
+               (`(,state-echo ,face ,indicator)
+                (vc-mode-line-state state))
+               (state-string (concat backend-name indicator rev)))
+    (propertize state-string 'face face 'help-echo
+                (concat state-echo " under the " backend-name
+                        " version control system"))))
 
 (defun vc-follow-link ()
   "If current buffer visits a symbolic link, visit the real file.
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 7f334397a5e..95f9218dcbf 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -1211,18 +1211,23 @@ BEWARE: this function may change the current buffer."
 (defun vc-next-action (verbose)
   "Do the next logical version control operation on the current fileset.
 This requires that all files in the current VC fileset be in the
-same state.  If not, signal an error.
-
-For merging-based version control systems:
-  If every file in the VC fileset is not registered for version
-   control, register the fileset (but don't commit).
-  If every work file in the VC fileset is added or changed, pop
-   up a *vc-log* buffer to commit the fileset.
+same state.  If they are not, signal an error.  Also signal an error if
+files in the fileset are missing (removed, but tracked by version control),
+or are ignored by the version control system.
+
+For modern merging-based version control systems:
+  If every file in the fileset is not registered for version
+   control, register the fileset (but don't commit).  If VERBOSE is
+   non-nil (interactively, the prefix argument), ask for the VC
+   backend with which to register the fileset.
+  If every work file in the VC fileset is either added or modified,
+   pop up a *vc-log* buffer to commit the fileset changes.
   For a centralized version control system, if any work file in
    the VC fileset is out of date, offer to update the fileset.
 
 For old-style locking-based version control systems, like RCS:
-  If every file is not registered, register the file(s).
+  If every file is not registered, register the file(s); with a prefix
+   argument, allow to specify the VC backend for registration.
   If every file is registered and unlocked, check out (lock)
    the file(s) for editing.
   If every file is locked by you and has changes, pop up a
@@ -1230,14 +1235,21 @@ For old-style locking-based version control systems, 
like RCS:
    read-only copy of each changed file after checking in.
   If every file is locked by you and unchanged, unlock them.
   If every file is locked by someone else, offer to steal the lock.
+  If files are unlocked, but have changes, offer to either claim the
+   lock or revert to the last checked-in version.
+
+If this command is invoked from a patch buffer under `diff-mode', it
+will apply the diffs from the patch and pop up a *vc-log* buffer to
+check-in the resulting changes.
 
 When using this command to register a new file (or files), it
 will automatically deduce which VC repository to register it
 with, using the most specific one.
 
 If VERBOSE is non-nil (interactively, the prefix argument),
-you can specify a VC backend or (for centralized VCS only)
-the revision ID or branch ID."
+you can specify another VC backend for the file(s),
+or (for centralized VCS only) the revision ID or branch ID
+from which to check out the file(s)."
   (interactive "P")
   (let* ((vc-fileset (vc-deduce-fileset nil t 'state-model-only-files))
          (backend (car vc-fileset))
@@ -1264,6 +1276,8 @@ the revision ID or branch ID."
       (error "Fileset files are missing, so cannot be operated on"))
      ((eq state 'ignored)
       (error "Fileset files are ignored by the version-control system"))
+     ;; Fileset comes from a diff-mode buffer, see
+     ;; 'diff-vc-deduce-fileset', and the buffer is the patch to apply.
      ((eq model 'patch)
       (vc-checkin files backend nil nil nil (buffer-string)))
      ((or (null state) (eq state 'unregistered))
@@ -1724,7 +1738,8 @@ Runs the normal hooks `vc-before-checkin-hook' and 
`vc-checkin-hook'."
                                              nil
                                              "-p1"
                                              "-r" null-device
-                                             "--no-backup-if-mismatch"
+                                             "--posix"
+                                             "--remove-empty-files"
                                              "-i" "-"))
               (user-error "Patch failed: %s" (buffer-string))))
           (vc-call-backend backend 'checkin files comment))
@@ -2224,7 +2239,7 @@ saving the buffer."
     (vc-maybe-buffer-sync not-urgent)
     (let ((backend (vc-deduce-backend))
          (default-directory default-directory)
-         rootdir working-revision)
+         rootdir)
       (if backend
          (setq rootdir (vc-call-backend backend 'root default-directory))
        (setq rootdir (read-directory-name "Directory for VC root-diff: "))
@@ -2232,14 +2247,13 @@ saving the buffer."
        (if backend
            (setq default-directory rootdir)
          (error "Directory is not version controlled")))
-      (setq working-revision (vc-working-revision rootdir))
       ;; VC diff for the root directory produces output that is
       ;; relative to it.  Bind default-directory to the root directory
       ;; here, this way the *vc-diff* buffer is setup correctly, so
       ;; relative file names work.
       (let ((default-directory rootdir))
         (vc-diff-internal
-         t (list backend (list rootdir) working-revision) nil nil
+         t (list backend (list rootdir)) nil nil
          (called-interactively-p 'interactive))))))
 
 ;;;###autoload
@@ -3169,14 +3183,13 @@ its name; otherwise return nil."
   (vc-resynch-buffer file t t))
 
 ;;;###autoload
-(defun vc-switch-backend (file backend)
+(defun vc-change-backend (file backend)
   "Make BACKEND the current version control system for FILE.
 FILE must already be registered in BACKEND.  The change is not
 permanent, only for the current session.  This function only changes
 VC's perspective on FILE, it does not register or unregister it.
 By default, this command cycles through the registered backends.
 To get a prompt, use a prefix argument."
-  (declare (obsolete nil "28.1"))
   (interactive
    (list
     (or buffer-file-name
@@ -3207,6 +3220,9 @@ To get a prompt, use a prefix argument."
       (error "%s is not registered in %s" file backend))
     (vc-mode-line file)))
 
+(define-obsolete-function-alias 'vc-switch-backend #'vc-change-backend
+  "30.1")
+
 ;;;###autoload
 (defun vc-transfer-file (file new-backend)
   "Transfer FILE to another version control system NEW-BACKEND.
@@ -3231,8 +3247,7 @@ backend to NEW-BACKEND, and unregister FILE from the 
current backend.
     (if registered
        (set-file-modes file (logior (file-modes file) 128))
       ;; `registered' might have switched under us.
-      (with-suppressed-warnings ((obsolete vc-switch-backend))
-        (vc-switch-backend file old-backend))
+      (vc-change-backend file old-backend)
       (let* ((rev (vc-working-revision file))
             (modified-file (and edited (make-temp-file file)))
             (unmodified-file (and modified-file (vc-version-backup-file 
file))))
@@ -3251,19 +3266,16 @@ backend to NEW-BACKEND, and unregister FILE from the 
current backend.
                    (vc-revert-file file))))
              (vc-call-backend new-backend 'receive-file file rev))
          (when modified-file
-            (with-suppressed-warnings ((obsolete vc-switch-backend))
-              (vc-switch-backend file new-backend))
+            (vc-change-backend file new-backend)
            (unless (eq (vc-checkout-model new-backend (list file)) 'implicit)
              (vc-checkout file))
            (rename-file modified-file file 'ok-if-already-exists)
            (vc-file-setprop file 'vc-checkout-time nil)))))
     (when move
-      (with-suppressed-warnings ((obsolete vc-switch-backend))
-        (vc-switch-backend file old-backend))
+      (vc-change-backend file old-backend)
       (setq comment (vc-call-backend old-backend 'comment-history file))
       (vc-call-backend old-backend 'unregister file))
-    (with-suppressed-warnings ((obsolete vc-switch-backend))
-      (vc-switch-backend file new-backend))
+    (vc-change-backend file new-backend)
     (when (or move edited)
       (vc-file-setprop file 'vc-state 'edited)
       (vc-mode-line file new-backend)
diff --git a/lisp/window.el b/lisp/window.el
index 2f9b46ebb0a..06d5cfc0077 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -7468,6 +7468,64 @@ Return WINDOW if BUFFER and WINDOW are live."
 The actual non-nil value of this variable will be copied to the
 `window-dedicated-p' flag.")
 
+(defcustom toggle-window-dedicated-flag 'interactive
+  "What dedicated flag should `toggle-window-dedicated' use by default.
+
+If `toggle-window-dedicated' does not receive a flag argument,
+the value of this variable is used and passed to
+`set-window-dedicated-p'.  Setting this to t will make
+`toggle-window-dedicated' use strong dedication by default.  Any
+other non-nil value will result in the same kind of non-strong
+dedication."
+  :type '(choice (const :tag "Strongly dedicated" t)
+                 (const :tag "Dedicated" interactive))
+  :version "30.0"
+  :group 'windows)
+
+(defun toggle-window-dedicated (&optional window flag interactive)
+  "Toggle whether WINDOW is dedicated to its current buffer.
+
+WINDOW must be a live window and defaults to the selected one.
+If FLAG is t (interactively, the prefix argument), make the window
+\"strongly\" dedicated to its buffer.  FLAG defaults to a non-nil,
+non-t value, and is passed to `set-window-dedicated-p', which see.
+If INTERACTIVE is non-nil, print a message describing the dedication
+status of WINDOW, after toggling it.  Interactively, this argument is
+always non-nil.
+
+When a window is dedicated to its buffer, `display-buffer' will avoid
+displaying another buffer in it, if possible.  When a window is
+strongly dedicated to its buffer, changing the buffer shown in the
+window will usually signal an error.
+
+You can control the default of FLAG with
+`toggle-window-dedicated-flag'.  Consequently, if you set that
+variable to t, strong dedication will be used by default and
+\\[universal-argument] will make the window weakly dedicated.
+
+See the info node `(elisp)Dedicated Windows' for more details."
+  (interactive "i\nP\np")
+  (setq window (window-normalize-window window))
+  (setq flag (cond
+              ((consp flag)
+               (if (eq toggle-window-dedicated-flag t)
+                   'interactive
+                 t))
+              ((null flag) toggle-window-dedicated-flag)
+              (t flag)))
+  (if (window-dedicated-p window)
+      (set-window-dedicated-p window nil)
+    (set-window-dedicated-p window flag))
+  (when interactive
+    (message "Window is %s dedicated to buffer %s"
+             (let ((status (window-dedicated-p window)))
+               (cond
+                ((null status) "no longer")
+                ((eq status t) "now strongly")
+                (t "now")))
+             (current-buffer))
+    (force-mode-line-update)))
+
 (defconst display-buffer--action-function-custom-type
   '(choice :tag "Function"
           (const :tag "--" ignore) ; default for insertion
@@ -7535,10 +7593,8 @@ where:
   arguments: a buffer to display and an alist of the same form as
   ALIST.  See `display-buffer' for details.
 
-`display-buffer' scans this alist until it either finds a
-matching regular expression or the function specified by a
-condition returns non-nil.  In any of these cases, it adds the
-associated action to the list of actions it will try."
+`display-buffer' scans this alist until the CONDITION is satisfied
+and adds the associated ACTION to the list of actions it will try."
   :type `(alist :key-type
                (choice :tag "Condition"
                        regexp
@@ -10750,6 +10806,7 @@ Used in `repeat-mode'."
   "2" #'split-root-window-below
   "3" #'split-root-window-right
   "s" #'window-toggle-side-windows
+  "d" #'toggle-window-dedicated
   "^ f" #'tear-off-window
   "^ t" #'tab-window-detach
   "-" #'fit-window-to-buffer
diff --git a/lisp/woman.el b/lisp/woman.el
index e20a2399c00..b908e81a994 100644
--- a/lisp/woman.el
+++ b/lisp/woman.el
@@ -34,6 +34,10 @@
 ;; the emulation is modified to include the reformatting done by the
 ;; Emacs `man' command.  No hyphenation is performed.
 
+;; Note that `M-x woman' doesn’t yet support the latest features of
+;; modern man pages, so we recommend using `M-x man' if that is
+;; available on your system.
+
 ;; Advantages
 
 ;;   Much more direct, does not require any external programs.
@@ -1149,7 +1153,11 @@ speed.  With a prefix argument, force the caches to be
 updated (e.g. to re-interpret the current directory).
 
 Used non-interactively, arguments are optional: if given then TOPIC
-should be a topic string and non-nil RE-CACHE forces re-caching."
+should be a topic string and non-nil RE-CACHE forces re-caching.
+
+Note that `M-x woman' doesn’t yet support the latest features of
+modern man pages, so we recommend using `M-x man' if that is
+available on your system."
   (interactive (list nil current-prefix-arg))
   ;; The following test is for non-interactive calls via emacsclient, etc.
   (if (or (not (stringp topic)) (string-match-p "\\S " topic))
diff --git a/oldXMenu/ChangeLog.1 b/oldXMenu/ChangeLog.1
index 2de6071a33c..0e0d0ea4ce5 100644
--- a/oldXMenu/ChangeLog.1
+++ b/oldXMenu/ChangeLog.1
@@ -240,7 +240,7 @@
 
        * Relicense all FSF files to GPLv3 or later.
 
-2007-06-04  Ulrich Mueller  <ulm@gentoo.org>  (tiny change)
+2007-06-04  Ulrich Müller  <ulm@gentoo.org>  (tiny change)
 
        * ChgPane.c, ChgSel.c: Quiet --with-x-toolkit=no
        compilation warnings: #include <config.h>.
@@ -249,7 +249,7 @@
 
        * Version 22.1 released.
 
-2007-05-30  Ulrich Mueller  <ulm@gentoo.org>  (tiny change)
+2007-05-30  Ulrich Müller  <ulm@gentoo.org>  (tiny change)
 
        * XMakeAssoc.c (XMakeAssoc): Use malloc rather than xmalloc.
 
diff --git a/src/.lldbinit b/src/.lldbinit
index f5fcdd7b597..a5789f49122 100644
--- a/src/.lldbinit
+++ b/src/.lldbinit
@@ -30,4 +30,7 @@ script -- sys.path.append('../etc')
 # Load our Python files
 command script import emacs_lldb
 
+# Print with children provider, depth 2.
+command alias xprint frame variable -P 2
+
 # end.
diff --git a/src/ChangeLog.11 b/src/ChangeLog.11
index bfd4fef4e80..b1e476e56fd 100644
--- a/src/ChangeLog.11
+++ b/src/ChangeLog.11
@@ -12876,7 +12876,7 @@
 
        * editfns.c (Ftranspose_regions): Doc fix (Bug#3248).
 
-2009-05-10  Ulrich Mueller  <ulm@gentoo.org>
+2009-05-10  Ulrich Müller  <ulm@gentoo.org>
 
        * s/gnu-linux.h: Make GCPROs and UNGCPRO no-ops also on SuperH.
 
@@ -12978,7 +12978,7 @@
        * process.c (create_process): Clean up merger residues of
        2008-07-17 change.
 
-2009-04-29  Ulrich Mueller  <ulm@gentoo.org>
+2009-04-29  Ulrich Müller  <ulm@gentoo.org>
 
        * lread.c (Vread_circle): New variable.
        (read1): Disable recursive read if Vread_circle is nil.
@@ -14860,7 +14860,7 @@
 
        * process.c (Fsystem_process_attributes, syms_of_process):
        Fix typo in name of Ssystem_process_attributes.
-       Reported by Ulrich Mueller <ulm@kph.uni-mainz.de>.
+       Reported by Ulrich Müller <ulm@kph.uni-mainz.de>.
 
 2008-12-11  Juanma Barranquero  <lekktu@gmail.com>
 
@@ -15356,7 +15356,7 @@
        * keyboard.c (command_loop_1): Handle NORECORD in call of
        Fselect_frame (currently ifdefd).
 
-2008-11-02  Ulrich Mueller  <ulm@kph.uni-mainz.de>
+2008-11-02  Ulrich Müller  <ulm@kph.uni-mainz.de>
 
        * emacs.c (USAGE2): Untabify.
 
@@ -15626,7 +15626,7 @@
        (Fset_window_buffer): Respect any non-nil dedicated value for
        window.  Rename "buffer" argument to "buffer_or_name".
 
-2008-10-18  Ulrich Mueller  <ulm@gentoo.org>
+2008-10-18  Ulrich Müller  <ulm@gentoo.org>
 
        * m/sh3.h: New file, machine description for SuperH.
 
@@ -23405,7 +23405,7 @@
        * Makefile.in (lisp): Add ${lispsource}language/tai-viet.el.
        (shortlisp): Add ../lisp/language/tai-viet.el.
 
-2008-02-01  Ulrich Mueller  <ulm@gentoo.org>
+2008-02-01  Ulrich Müller  <ulm@gentoo.org>
 
        * Makefile.in (${lispsource}international/charprop.el): Depend on
        temacs${EXEEXT}.
diff --git a/src/ChangeLog.4 b/src/ChangeLog.4
index 0c47d979ecc..8d4b3594eaf 100644
--- a/src/ChangeLog.4
+++ b/src/ChangeLog.4
@@ -3490,7 +3490,7 @@
 
        * Makefile.in.in (temacs): Delete redundant use of LDFLAGS.
 
-1994-01-02  Ulrich Mueller  (ulm@vsnhd1.cern.ch)
+1994-01-02  Ulrich Müller  (ulm@vsnhd1.cern.ch)
 
        * sysdep.c (get_system_name): If the official name of the host is
        not a fully qualified domain name, then try to find one in the
diff --git a/src/android.c b/src/android.c
index aa4033c676f..9f0e966a602 100644
--- a/src/android.c
+++ b/src/android.c
@@ -104,6 +104,7 @@ struct android_emacs_window
   jmethodID make_input_focus;
   jmethodID raise;
   jmethodID lower;
+  jmethodID reconfigure;
   jmethodID get_window_geometry;
   jmethodID translate_coordinates;
   jmethodID set_dont_accept_focus;
@@ -1755,6 +1756,7 @@ android_init_emacs_window (void)
   FIND_METHOD (make_input_focus, "makeInputFocus", "(J)V");
   FIND_METHOD (raise, "raise", "()V");
   FIND_METHOD (lower, "lower", "()V");
+  FIND_METHOD (reconfigure, "reconfigure", "(Lorg/gnu/emacs/EmacsWindow;I)V");
   FIND_METHOD (get_window_geometry, "getWindowGeometry",
               "()[I");
   FIND_METHOD (translate_coordinates, "translateCoordinates",
@@ -1824,7 +1826,7 @@ NATIVE_NAME (initEmacs) (JNIEnv *env, jobject object, 
jarray argv,
   android_java_env = env;
 
   nelements = (*env)->GetArrayLength (env, argv);
-  c_argv = alloca (sizeof *c_argv * nelements);
+  c_argv = alloca (sizeof *c_argv * (nelements + 1));
 
   for (i = 0; i < nelements; ++i)
     {
@@ -1842,6 +1844,8 @@ NATIVE_NAME (initEmacs) (JNIEnv *env, jobject object, 
jarray argv,
       (*env)->ReleaseStringUTFChars (env, (jstring) argument, c_argument);
     }
 
+  c_argv[nelements] = NULL;
+
   android_init_emacs_service ();
   android_init_emacs_pixmap ();
   android_init_graphics_point ();
@@ -2317,6 +2321,100 @@ NATIVE_NAME (sendExpose) (JNIEnv *env, jobject object,
   return event_serial;
 }
 
+JNIEXPORT jboolean JNICALL
+NATIVE_NAME (sendDndDrag) (JNIEnv *env, jobject object,
+                          jshort window, jint x, jint y)
+{
+  JNI_STACK_ALIGNMENT_PROLOGUE;
+
+  union android_event event;
+
+  event.dnd.type = ANDROID_DND_DRAG_EVENT;
+  event.dnd.serial = ++event_serial;
+  event.dnd.window = window;
+  event.dnd.x = x;
+  event.dnd.y = y;
+  event.dnd.uri_or_string = NULL;
+  event.dnd.length = 0;
+
+  android_write_event (&event);
+  return event_serial;
+}
+
+JNIEXPORT jboolean JNICALL
+NATIVE_NAME (sendDndUri) (JNIEnv *env, jobject object,
+                         jshort window, jint x, jint y,
+                         jstring string)
+{
+  JNI_STACK_ALIGNMENT_PROLOGUE;
+
+  union android_event event;
+  const jchar *characters;
+  jsize length;
+  uint16_t *buffer;
+
+  event.dnd.type = ANDROID_DND_URI_EVENT;
+  event.dnd.serial = ++event_serial;
+  event.dnd.window = window;
+  event.dnd.x = x;
+  event.dnd.y = y;
+
+  length = (*env)->GetStringLength (env, string);
+  buffer = malloc (length * sizeof *buffer);
+  characters = (*env)->GetStringChars (env, string, NULL);
+
+  if (!characters)
+    /* The JVM has run out of memory; return and let the out of memory
+       error take its course.  */
+    return 0;
+
+  memcpy (buffer, characters, length * sizeof *buffer);
+  (*env)->ReleaseStringChars (env, string, characters);
+
+  event.dnd.uri_or_string = buffer;
+  event.dnd.length = length;
+
+  android_write_event (&event);
+  return event_serial;
+}
+
+JNIEXPORT jboolean JNICALL
+NATIVE_NAME (sendDndText) (JNIEnv *env, jobject object,
+                          jshort window, jint x, jint y,
+                          jstring string)
+{
+  JNI_STACK_ALIGNMENT_PROLOGUE;
+
+  union android_event event;
+  const jchar *characters;
+  jsize length;
+  uint16_t *buffer;
+
+  event.dnd.type = ANDROID_DND_TEXT_EVENT;
+  event.dnd.serial = ++event_serial;
+  event.dnd.window = window;
+  event.dnd.x = x;
+  event.dnd.y = y;
+
+  length = (*env)->GetStringLength (env, string);
+  buffer = malloc (length * sizeof *buffer);
+  characters = (*env)->GetStringChars (env, string, NULL);
+
+  if (!characters)
+    /* The JVM has run out of memory; return and let the out of memory
+       error take its course.  */
+    return 0;
+
+  memcpy (buffer, characters, length * sizeof *buffer);
+  (*env)->ReleaseStringChars (env, string, characters);
+
+  event.dnd.uri_or_string = buffer;
+  event.dnd.length = length;
+
+  android_write_event (&event);
+  return event_serial;
+}
+
 JNIEXPORT jboolean JNICALL
 NATIVE_NAME (shouldForwardMultimediaButtons) (JNIEnv *env,
                                              jobject object)
@@ -4407,6 +4505,7 @@ android_fill_polygon (android_drawable drawable, struct 
android_gc *gc,
                                                 service_class.fill_polygon,
                                                 drawable_object,
                                                 gcontext, array);
+  android_exception_check_1 (array);
   ANDROID_DELETE_LOCAL_REF (array);
 }
 
@@ -4429,6 +4528,10 @@ android_draw_rectangle (android_drawable handle, struct 
android_gc *gc,
                                                 drawable, gcontext,
                                                 (jint) x, (jint) y,
                                                 (jint) width, (jint) height);
+
+  /* In lieu of android_exception_check, clear all exceptions after
+     calling this frequently called graphics operation.  */
+  (*android_java_env)->ExceptionClear (android_java_env);
 }
 
 void
@@ -4449,6 +4552,10 @@ android_draw_point (android_drawable handle, struct 
android_gc *gc,
                                                 service_class.draw_point,
                                                 drawable, gcontext,
                                                 (jint) x, (jint) y);
+
+  /* In lieu of android_exception_check, clear all exceptions after
+     calling this frequently called graphics operation.  */
+  (*android_java_env)->ExceptionClear (android_java_env);
 }
 
 void
@@ -4470,6 +4577,10 @@ android_draw_line (android_drawable handle, struct 
android_gc *gc,
                                                 drawable, gcontext,
                                                 (jint) x, (jint) y,
                                                 (jint) x2, (jint) y2);
+
+  /* In lieu of android_exception_check, clear all exceptions after
+     calling this frequently called graphics operation.  */
+  (*android_java_env)->ExceptionClear (android_java_env);
 }
 
 android_pixmap
@@ -4963,6 +5074,37 @@ android_lower_window (android_window handle)
   android_exception_check ();
 }
 
+void
+android_reconfigure_wm_window (android_window handle,
+                              enum android_wc_value_mask value_mask,
+                              struct android_window_changes *values)
+{
+  jobject sibling, window;
+
+  window = android_resolve_handle (handle, ANDROID_HANDLE_WINDOW);
+
+  if (!(value_mask & ANDROID_CW_STACK_MODE))
+    return;
+
+  /* If value_mask & ANDROID_CW_SIBLING, place HANDLE above or below
+     values->sibling pursuant to values->stack_mode; else, reposition
+     it at the top or the bottom of its parent.  */
+
+  sibling = NULL;
+
+  if (value_mask & ANDROID_CW_SIBLING)
+    sibling = android_resolve_handle (values->sibling,
+                                     ANDROID_HANDLE_WINDOW);
+
+  (*android_java_env)->CallNonvirtualVoidMethod (android_java_env,
+                                                window,
+                                                window_class.class,
+                                                window_class.reconfigure,
+                                                sibling,
+                                                (jint) values->stack_mode);
+  android_exception_check ();
+}
+
 int
 android_query_tree (android_window handle, android_window *root_return,
                    android_window *parent_return,
@@ -5246,7 +5388,7 @@ android_wc_lookup_string (android_key_pressed_event 
*event,
    The caller must take care to unlock the bitmap data afterwards.  */
 
 unsigned char *
-android_lock_bitmap (android_window drawable,
+android_lock_bitmap (android_drawable drawable,
                     AndroidBitmapInfo *bitmap_info,
                     jobject *bitmap_return)
 {
@@ -5262,9 +5404,15 @@ android_lock_bitmap (android_window drawable,
                                                  object,
                                                  drawable_class.get_bitmap);
   if (!bitmap)
-    /* NULL is returned when the bitmap does not currently exist due
-       to ongoing reconfiguration on the main thread.  */
-    return NULL;
+    {
+      /* Report any exception signaled.  */
+      android_exception_check ();
+
+      /* If no exception was signaled, then NULL was returned as the
+        bitmap does not presently exist due to window reconfiguration
+        on the main thread.  */
+      return NULL;
+    }
 
   memset (bitmap_info, 0, sizeof *bitmap_info);
 
@@ -5490,22 +5638,40 @@ android_toggle_on_screen_keyboard (android_window 
window, bool show)
 
 
 
+#if defined __clang_major__ && __clang_major__ < 5
+# define HAS_BUILTIN_TRAP 0
+#elif 3 < __GNUC__ + (3 < __GNUC_MINOR__ + (4 <= __GNUC_PATCHLEVEL__))
+# define HAS_BUILTIN_TRAP 1
+#elif defined __has_builtin
+# define HAS_BUILTIN_TRAP __has_builtin (__builtin_trap)
+#else /* !__has_builtin */
+# define HAS_BUILTIN_TRAP 0
+#endif /* defined __clang_major__ && __clang_major__ < 5 */
+
 /* emacs_abort implementation for Android.  This logs a stack
    trace.  */
 
 void
 emacs_abort (void)
 {
+#ifndef HAS_BUILTIN_TRAP
   volatile char *foo;
+#endif /* !HAS_BUILTIN_TRAP */
 
   __android_log_print (ANDROID_LOG_FATAL, __func__,
-                      "emacs_abort called, please review the ensuing"
+                      "emacs_abort called, please review the following"
                       " stack trace");
 
-  /* Cause a NULL pointer dereference to make debuggerd generate a
+#ifndef HAS_BUILTIN_TRAP
+  /* Induce a NULL pointer dereference to make debuggerd generate a
      tombstone.  */
   foo = NULL;
   *foo = '\0';
+#else /* HAS_BUILTIN_TRAP */
+  /* Crash through __builtin_trap instead.  This appears to more
+     uniformly elicit crash reports from debuggerd.  */
+  __builtin_trap ();
+#endif /* !HAS_BUILTIN_TRAP */
 
   abort ();
 }
@@ -5593,15 +5759,20 @@ android_verify_jni_string (const char *name)
 }
 
 /* Given a Lisp string TEXT, return a local reference to an equivalent
-   Java string.  */
+   Java string.  Each argument following TEXT should be NULL or a
+   local reference that will be freed if creating the string fails,
+   whereupon memory_full will also be signaled.  */
 
 jstring
-android_build_string (Lisp_Object text)
+android_build_string (Lisp_Object text, ...)
 {
   Lisp_Object encoded;
   jstring string;
   size_t nchars;
   jchar *characters;
+  va_list ap;
+  jobject object;
+
   USE_SAFE_ALLOCA;
 
   /* Directly encode TEXT if it contains no non-ASCII characters, or
@@ -5619,9 +5790,11 @@ android_build_string (Lisp_Object text)
     {
       string = (*android_java_env)->NewStringUTF (android_java_env,
                                                  SSDATA (text));
-      android_exception_check ();
-      SAFE_FREE ();
 
+      if ((*android_java_env)->ExceptionCheck (android_java_env))
+       goto error;
+
+      SAFE_FREE ();
       return string;
     }
 
@@ -5640,10 +5813,36 @@ android_build_string (Lisp_Object text)
   string
     = (*android_java_env)->NewString (android_java_env,
                                      characters, nchars);
-  android_exception_check ();
+
+  if ((*android_java_env)->ExceptionCheck (android_java_env))
+    goto error;
 
   SAFE_FREE ();
   return string;
+
+ error:
+  /* An exception arose while creating the string.  When this
+     transpires, an assumption is made that the error was induced by
+     running out of memory.  Delete each of the local references
+     within AP.  */
+
+  va_start (ap, text);
+
+  __android_log_print (ANDROID_LOG_WARN, __func__,
+                      "Possible out of memory error. "
+                      " The Java exception follows:  ");
+  /* Describe exactly what went wrong.  */
+  (*android_java_env)->ExceptionDescribe (android_java_env);
+  (*android_java_env)->ExceptionClear (android_java_env);
+
+  /* Now remove each and every local reference provided after
+     OBJECT.  */
+
+  while ((object = va_arg (ap, jobject)))
+    ANDROID_DELETE_LOCAL_REF (object);
+
+  va_end (ap);
+  memory_full (0);
 }
 
 /* Do the same, except TEXT is constant string data in ASCII or
@@ -6154,7 +6353,7 @@ android_browse_url (Lisp_Object url, Lisp_Object send)
   Lisp_Object tem;
   const char *buffer;
 
-  string = android_build_string (url);
+  string = android_build_string (url, NULL);
   value
     = (*android_java_env)->CallNonvirtualObjectMethod (android_java_env,
                                                       emacs_service,
@@ -6205,7 +6404,7 @@ android_restart_emacs (void)
   exit (0);
 }
 
-/* Return a number from 1 to 33 describing the version of Android
+/* Return a number from 1 to 34 describing the version of Android
    Emacs is running on.
 
    This is different from __ANDROID_API__, as that describes the
diff --git a/src/android.h b/src/android.h
index d4605c11ad0..28d9d25930e 100644
--- a/src/android.h
+++ b/src/android.h
@@ -108,7 +108,7 @@ extern void android_set_dont_focus_on_map (android_window, 
bool);
 extern void android_set_dont_accept_focus (android_window, bool);
 
 extern int android_verify_jni_string (const char *);
-extern jstring android_build_string (Lisp_Object);
+extern jstring android_build_string (Lisp_Object, ...);
 extern jstring android_build_jstring (const char *);
 extern void android_exception_check (void);
 extern void android_exception_check_1 (jobject);
diff --git a/src/androidfns.c b/src/androidfns.c
index 3ee9f7634aa..772a4f51e78 100644
--- a/src/androidfns.c
+++ b/src/androidfns.c
@@ -1591,7 +1591,8 @@ and width values are in pixels.
 #endif
 }
 
-DEFUN ("android-frame-edges", Fandroid_frame_edges, Sandroid_frame_edges, 0, 
2, 0,
+DEFUN ("android-frame-edges", Fandroid_frame_edges,
+       Sandroid_frame_edges, 0, 2, 0,
        doc: /* Return edge coordinates of FRAME.
 FRAME must be a live frame and defaults to the selected one.  The return
 value is a list of the form (LEFT, TOP, RIGHT, BOTTOM).  All values are
@@ -1693,6 +1694,28 @@ TERMINAL is a frame.  */)
 #endif
 }
 
+#ifndef ANDROID_STUBIFY
+
+static void
+android_frame_restack (struct frame *f1, struct frame *f2,
+                      bool above_flag)
+{
+  android_window window1;
+  struct android_window_changes wc;
+  unsigned long mask;
+
+  window1 = FRAME_ANDROID_WINDOW (f1);
+  wc.sibling = FRAME_ANDROID_WINDOW (f2);
+  wc.stack_mode = above_flag ? ANDROID_ABOVE : ANDROID_BELOW;
+  mask = ANDROID_CW_SIBLING | ANDROID_CW_STACK_MODE;
+
+  block_input ();
+  android_reconfigure_wm_window (window1, mask, &wc);
+  unblock_input ();
+}
+
+#endif /* !ANDROID_STUBIFY */
+
 DEFUN ("android-frame-restack", Fandroid_frame_restack,
        Sandroid_frame_restack, 2, 3, 0,
        doc: /* Restack FRAME1 below FRAME2.
@@ -1709,19 +1732,25 @@ that of FRAME2.  Hence the position of FRAME2 in its 
display's Z
 \(stacking) order relative to all other frames excluding FRAME1 remains
 unaltered.
 
-The Android system refuses to restack windows, so this does not
-work.  */)
-  (Lisp_Object frame1, Lisp_Object frame2, Lisp_Object frame3)
+Android does not facilitate restacking top-level windows managed by
+its own window manager; nor is it possible to restack frames that are
+children of different parents.  Consequently, this function only
+functions when FRAME1 and FRAME2 are both child frames subordinate to
+the same parent frame.  */)
+  (Lisp_Object frame1, Lisp_Object frame2, Lisp_Object above)
 {
 #ifdef ANDROID_STUBIFY
   error ("Android cross-compilation stub called!");
   return Qnil;
-#else
-  /* This is not supported on Android because of limitations in the
-     platform that prevent ViewGroups from restacking
-     SurfaceViews.  */
-  return Qnil;
-#endif
+#else /* !ANDROID_STUBIFY */
+  struct frame *f1 = decode_live_frame (frame1);
+  struct frame *f2 = decode_live_frame (frame2);
+
+  if (!(FRAME_ANDROID_WINDOW (f1) && FRAME_ANDROID_WINDOW (f2)))
+    error ("Cannot restack frames");
+  android_frame_restack (f1, f2, !NILP (above));
+  return Qt;
+#endif /* ANDROID_STUBIFY */
 }
 
 DEFUN ("android-mouse-absolute-pixel-position",
diff --git a/src/androidgui.h b/src/androidgui.h
index 14225f7bf80..5fab5023ba4 100644
--- a/src/androidgui.h
+++ b/src/androidgui.h
@@ -248,6 +248,9 @@ enum android_event_type
     ANDROID_CONTEXT_MENU,
     ANDROID_EXPOSE,
     ANDROID_INPUT_METHOD,
+    ANDROID_DND_DRAG_EVENT,
+    ANDROID_DND_URI_EVENT,
+    ANDROID_DND_TEXT_EVENT,
   };
 
 struct android_any_event
@@ -463,6 +466,7 @@ enum android_ime_operation
     ANDROID_IME_END_BATCH_EDIT,
     ANDROID_IME_REQUEST_SELECTION_UPDATE,
     ANDROID_IME_REQUEST_CURSOR_UPDATES,
+    ANDROID_IME_REPLACE_TEXT,
   };
 
 enum
@@ -509,6 +513,28 @@ struct android_ime_event
   unsigned long counter;
 };
 
+struct android_dnd_event
+{
+  /* Type of the event.  */
+  enum android_event_type type;
+
+  /* The event serial.  */
+  unsigned long serial;
+
+  /* The window that gave rise to the event.  */
+  android_window window;
+
+  /* X and Y coordinates of the event.  */
+  int x, y;
+
+  /* Data tied to this event, such as a URI or clipboard string.
+     Must be deallocated with `free'.  */
+  unsigned short *uri_or_string;
+
+  /* Length of that data.  */
+  size_t length;
+};
+
 union android_event
 {
   enum android_event_type type;
@@ -540,6 +566,11 @@ union android_event
 
   /* This is used to dispatch input method editing requests.  */
   struct android_ime_event ime;
+
+  /* There is no analog under X because Android defines a strict DND
+     protocol, whereas there exist several competing X protocols
+     implemented in terms of X client messages.  */
+  struct android_dnd_event dnd;
 };
 
 enum
@@ -563,6 +594,24 @@ enum android_ic_mode
     ANDROID_IC_MODE_TEXT   = 2,
   };
 
+enum android_stack_mode
+  {
+    ANDROID_ABOVE = 0,
+    ANDROID_BELOW = 1,
+  };
+
+enum android_wc_value_mask
+  {
+    ANDROID_CW_SIBLING   = 0,
+    ANDROID_CW_STACK_MODE = 1,
+  };
+
+struct android_window_changes
+{
+  android_window sibling;
+  enum android_stack_mode stack_mode;
+};
+
 extern int android_pending (void);
 extern void android_next_event (union android_event *);
 extern bool android_check_if_event (union android_event *,
@@ -642,6 +691,9 @@ extern void android_bell (void);
 extern void android_set_input_focus (android_window, unsigned long);
 extern void android_raise_window (android_window);
 extern void android_lower_window (android_window);
+extern void android_reconfigure_wm_window (android_window,
+                                          enum android_wc_value_mask,
+                                          struct android_window_changes *);
 extern int android_query_tree (android_window, android_window *,
                               android_window *, android_window **,
                               unsigned int *);
diff --git a/src/androidmenu.c b/src/androidmenu.c
index ed26bdafa85..1f4d91b527d 100644
--- a/src/androidmenu.c
+++ b/src/androidmenu.c
@@ -278,7 +278,7 @@ android_menu_show (struct frame *f, int x, int y, int 
menuflags,
 
   title_string = NULL;
   if (STRINGP (title) && menu_items_n_panes < 2)
-    title_string = android_build_string (title);
+    title_string = android_build_string (title, NULL);
 
   /* Push the first local frame for the context menu.  */
   method = menu_class.create_context_menu;
@@ -370,7 +370,7 @@ android_menu_show (struct frame *f, int x, int y, int 
menuflags,
            pane_name = Fsubstring (pane_name, make_fixnum (1), Qnil);
 
          /* Add the pane.  */
-         temp = android_build_string (pane_name);
+         temp = android_build_string (pane_name, NULL);
          android_exception_check ();
 
          (*env)->CallNonvirtualVoidMethod (env, current_context_menu,
@@ -399,7 +399,7 @@ android_menu_show (struct frame *f, int x, int y, int 
menuflags,
            {
              /* This is a submenu.  Add it.  */
              title_string = (!NILP (item_name)
-                             ? android_build_string (item_name)
+                             ? android_build_string (item_name, NULL)
                              : NULL);
              help_string = NULL;
 
@@ -408,7 +408,7 @@ android_menu_show (struct frame *f, int x, int y, int 
menuflags,
 
              if (android_get_current_api_level () >= 26
                  && STRINGP (help))
-               help_string = android_build_string (help);
+               help_string = android_build_string (help, NULL);
 
              store = current_context_menu;
              current_context_menu
@@ -443,7 +443,7 @@ android_menu_show (struct frame *f, int x, int y, int 
menuflags,
              /* Add this menu item with the appropriate state.  */
 
              title_string = (!NILP (item_name)
-                             ? android_build_string (item_name)
+                             ? android_build_string (item_name, NULL)
                              : NULL);
              help_string = NULL;
 
@@ -452,7 +452,7 @@ android_menu_show (struct frame *f, int x, int y, int 
menuflags,
 
              if (android_get_current_api_level () >= 26
                  && STRINGP (help))
-               help_string = android_build_string (help);
+               help_string = android_build_string (help, NULL);
 
              /* Determine whether or not to display a check box.  */
 
@@ -686,7 +686,7 @@ android_dialog_show (struct frame *f, Lisp_Object title,
                 : android_build_jstring ("Question"));
 
   /* And the title.  */
-  java_title = android_build_string (title);
+  java_title = android_build_string (title, NULL);
 
   /* Now create the dialog.  */
   method = dialog_class.create_dialog;
@@ -738,7 +738,7 @@ android_dialog_show (struct frame *f, Lisp_Object title,
            }
 
          /* Add the button.  */
-         temp = android_build_string (item_name);
+         temp = android_build_string (item_name, NULL);
          (*env)->CallNonvirtualVoidMethod (env, dialog,
                                            dialog_class.class,
                                            dialog_class.add_button,
diff --git a/src/androidselect.c b/src/androidselect.c
index cf2265d4cf4..3f025351093 100644
--- a/src/androidselect.c
+++ b/src/androidselect.c
@@ -613,10 +613,12 @@ android_notifications_notify_1 (Lisp_Object title, 
Lisp_Object body,
           (long int) (boot_time.tv_sec / 2), id);
 
   /* Encode all strings into their Java counterparts.  */
-  title1 = android_build_string (title);
-  body1  = android_build_string (body);
-  group1 = android_build_string (group);
-  identifier1 = android_build_jstring (identifier);
+  title1 = android_build_string (title, NULL);
+  body1  = android_build_string (body, title1, NULL);
+  group1 = android_build_string (group, body1, title1, NULL);
+  identifier1
+    = (*android_java_env)->NewStringUTF (android_java_env, identifier);
+  android_exception_check_3 (title1, body1, group1);
 
   /* Create the notification.  */
   notification
diff --git a/src/androidterm.c b/src/androidterm.c
index 438f8ce1fbb..9d6517cce2b 100644
--- a/src/androidterm.c
+++ b/src/androidterm.c
@@ -687,9 +687,17 @@ android_handle_ime_event (union android_event *event, 
struct frame *f)
     {
     case ANDROID_IME_COMMIT_TEXT:
     case ANDROID_IME_SET_COMPOSING_TEXT:
+    case ANDROID_IME_REPLACE_TEXT:
       text = android_decode_utf16 (event->ime.text,
                                   event->ime.length);
       xfree (event->ime.text);
+
+      /* Return should text be long enough that it overflows ptrdiff_t.
+        Such circumstances are detected within android_decode_utf16.  */
+
+      if (NILP (text))
+       return;
+
       break;
 
     default:
@@ -773,6 +781,12 @@ android_handle_ime_event (union android_event *event, 
struct frame *f)
     case ANDROID_IME_REQUEST_CURSOR_UPDATES:
       android_request_cursor_updates (f, event->ime.length);
       break;
+
+    case ANDROID_IME_REPLACE_TEXT:
+      replace_text (f, event->ime.start, event->ime.end,
+                   text, event->ime.position,
+                   event->ime.counter);
+      break;
     }
 }
 
@@ -1692,6 +1706,45 @@ handle_one_android_event (struct android_display_info 
*dpyinfo,
 
       goto OTHER;
 
+    case ANDROID_DND_DRAG_EVENT:
+
+      if (!any)
+       goto OTHER;
+
+      /* Generate a drag and drop event to convey its position.  */
+      inev.ie.kind = DRAG_N_DROP_EVENT;
+      XSETFRAME (inev.ie.frame_or_window, any);
+      inev.ie.timestamp = ANDROID_CURRENT_TIME;
+      XSETINT (inev.ie.x, event->dnd.x);
+      XSETINT (inev.ie.y, event->dnd.y);
+      inev.ie.arg = Fcons (inev.ie.x, inev.ie.y);
+      goto OTHER;
+
+    case ANDROID_DND_URI_EVENT:
+    case ANDROID_DND_TEXT_EVENT:
+
+      if (!any)
+       {
+         free (event->dnd.uri_or_string);
+         goto OTHER;
+       }
+
+      /* An item was dropped over ANY, and is a file in the form of a
+        content or file URI or a string to be inserted.  Generate an
+        event with this information.  */
+
+      inev.ie.kind = DRAG_N_DROP_EVENT;
+      XSETFRAME (inev.ie.frame_or_window, any);
+      inev.ie.timestamp = ANDROID_CURRENT_TIME;
+      XSETINT (inev.ie.x, event->dnd.x);
+      XSETINT (inev.ie.y, event->dnd.y);
+      inev.ie.arg = Fcons ((event->type == ANDROID_DND_TEXT_EVENT
+                           ? Qtext : Quri),
+                          android_decode_utf16 (event->dnd.uri_or_string,
+                                                event->dnd.length));
+      free (event->dnd.uri_or_string);
+      goto OTHER;
+
     default:
       goto OTHER;
     }
@@ -2515,7 +2568,8 @@ android_draw_fringe_bitmap (struct window *w, struct 
glyph_row *row,
 
       /* Intersect the destination rectangle with that of the row.
         Setting a clip mask overrides the clip rectangles provided by
-        x_clip_to_row, so clipping must be performed by hand.  */
+        android_clip_to_row, so clipping must be performed by
+        hand.  */
 
       image_rect.x = p->x;
       image_rect.y = p->y;
@@ -4856,6 +4910,39 @@ NATIVE_NAME (finishComposingText) (JNIEnv *env, jobject 
object,
   android_write_event (&event);
 }
 
+JNIEXPORT void JNICALL
+NATIVE_NAME (replaceText) (JNIEnv *env, jobject object, jshort window,
+                          jint start, jint end, jobject text,
+                          int new_cursor_position, jobject attribute)
+{
+  JNI_STACK_ALIGNMENT_PROLOGUE;
+
+  union android_event event;
+  size_t length;
+
+  /* First, obtain a copy of the Java string.  */
+  text = android_copy_java_string (env, text, &length);
+
+  if (!text)
+    return;
+
+  /* Next, populate the event with the information in this function's
+     arguments.  */
+
+  event.ime.type = ANDROID_INPUT_METHOD;
+  event.ime.serial = ++event_serial;
+  event.ime.window = window;
+  event.ime.operation = ANDROID_IME_REPLACE_TEXT;
+  event.ime.start = start + 1;
+  event.ime.end = end + 1;
+  event.ime.length = length;
+  event.ime.position = new_cursor_position;
+  event.ime.text = text;
+  event.ime.counter = ++edit_counter;
+
+  android_write_event (&event);
+}
+
 /* Structure describing the context used for a text query.  */
 
 struct android_conversion_query_context
@@ -6545,6 +6632,10 @@ Emacs is running on.  */);
   pdumper_do_now_and_after_load (android_set_build_fingerprint);
 
   DEFSYM (Qx_underline_at_descent_line, "x-underline-at-descent-line");
+
+  /* Symbols defined for DND events.  */
+  DEFSYM (Quri, "uri");
+  DEFSYM (Qtext, "text");
 }
 
 void
diff --git a/src/androidvfs.c b/src/androidvfs.c
index 0e5bbf8a13e..f89a82cfcc6 100644
--- a/src/androidvfs.c
+++ b/src/androidvfs.c
@@ -2898,6 +2898,7 @@ android_check_content_access (const char *uri, int mode)
 {
   jobject string;
   jboolean rc, read, write;
+  jmethodID method;
 
   string = (*android_java_env)->NewStringUTF (android_java_env, uri);
   android_exception_check ();
@@ -2907,11 +2908,13 @@ android_check_content_access (const char *uri, int mode)
 
   read = (bool) (mode & R_OK || (mode == F_OK));
   write = (bool) (mode & W_OK);
+  method = service_class.check_content_uri;
 
-  rc = (*android_java_env)->CallBooleanMethod (android_java_env,
-                                              emacs_service,
-                                              service_class.check_content_uri,
-                                              string, read, write);
+  rc = (*android_java_env)->CallNonvirtualBooleanMethod (android_java_env,
+                                                        emacs_service,
+                                                        service_class.class,
+                                                        method, string, read,
+                                                        write);
   android_exception_check_1 (string);
   ANDROID_DELETE_LOCAL_REF (string);
   return rc;
@@ -3013,6 +3016,15 @@ android_authority_name (struct android_vnode *vnode, 
char *name,
       if (*name == '/')
        name++, length -= 1;
 
+      /* If the provided URI is a directory, return NULL and set errno
+        to ENOTDIR.  Content files are never directories.  */
+
+      if (name[length - 1] == '/')
+       {
+         errno = ENOTDIR;
+         return NULL;
+       }
+
       /* NAME must be a valid JNI string, so that it can be encoded
         properly.  */
 
@@ -3995,8 +4007,11 @@ android_saf_exception_check (int n, ...)
   /* First, check for an exception.  */
 
   if (!(*env)->ExceptionCheck (env))
-    /* No exception has taken place.  Return 0.  */
-    return 0;
+    {
+      /* No exception has taken place.  Return 0.  */
+      va_end (ap);
+      return 0;
+    }
 
   /* Print the exception.  */
   (*env)->ExceptionDescribe (env);
@@ -4045,6 +4060,7 @@ android_saf_exception_check (int n, ...)
   /* expression is still a local reference! */
   ANDROID_DELETE_LOCAL_REF ((jobject) exception);
   errno = new_errno;
+  va_end (ap);
   return 1;
 }
 
diff --git a/src/dispnew.c b/src/dispnew.c
index d6a27ac29ec..e4037494775 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -6206,9 +6206,9 @@ bitch_at_user (void)
 DEFUN ("sleep-for", Fsleep_for, Ssleep_for, 1, 2, 0,
        doc: /* Pause, without updating display, for SECONDS seconds.
 SECONDS may be a floating-point value, meaning that you can wait for a
-fraction of a second.  Optional second arg MILLISECONDS specifies an
-additional wait period, in milliseconds; this is for backwards compatibility.
-\(Not all operating systems support waiting for a fraction of a second.)  */)
+fraction of a second.
+An optional second arg MILLISECONDS can be provided but is deprecated:
+it specifies an additional wait period, in milliseconds.  */)
   (Lisp_Object seconds, Lisp_Object milliseconds)
 {
   double duration = extract_float (seconds);
diff --git a/src/eval.c b/src/eval.c
index 697e73678f2..deaca515eb6 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -2387,9 +2387,13 @@ static Lisp_Object list_of_t;  /* Never-modified 
constant containing (t).  */
 
 DEFUN ("eval", Feval, Seval, 1, 2, 0,
        doc: /* Evaluate FORM and return its value.
-If LEXICAL is t, evaluate using lexical scoping.
-LEXICAL can also be an actual lexical environment, in the form of an
-alist mapping symbols to their value.  */)
+If LEXICAL is `t', evaluate using lexical binding by default.
+This is the recommended value.
+
+If absent or `nil', use dynamic scoping only.
+
+LEXICAL can also represent an actual lexical environment; see the Info
+node `(elisp)Eval' for details.  */)
   (Lisp_Object form, Lisp_Object lexical)
 {
   specpdl_ref count = SPECPDL_INDEX ();
diff --git a/src/frame.h b/src/frame.h
index f4726f1c0e5..d826ae56e8b 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -90,6 +90,7 @@ enum text_conversion_operation
     TEXTCONV_DELETE_SURROUNDING_TEXT,
     TEXTCONV_REQUEST_POINT_UPDATE,
     TEXTCONV_BARRIER,
+    TEXTCONV_REPLACE_TEXT,
   };
 
 /* Structure describing a single edit being performed by the input
diff --git a/src/gfilenotify.c b/src/gfilenotify.c
index de09ffe5fd3..3dd6390db10 100644
--- a/src/gfilenotify.c
+++ b/src/gfilenotify.c
@@ -88,7 +88,9 @@ dir_monitor_callback (GFileMonitor *monitor,
           && !NILP (Fmember (symbol, list5 (Qchanged, Qchanges_done_hint,
                                             Qdeleted, Qcreated, Qmoved))))
          || (!NILP (Fmember (Qattribute_change, flags))
-             && EQ (symbol, Qattribute_changed)))
+             && EQ (symbol, Qattribute_changed))
+         || (!NILP (Fmember (Qwatch_mounts, flags))
+             && EQ (symbol, Qunmounted)))
        {
          /* Construct an event.  */
          EVENT_INIT (event);
@@ -105,8 +107,8 @@ dir_monitor_callback (GFileMonitor *monitor,
          /* XD_DEBUG_MESSAGE ("%s", XD_OBJECT_TO_STRING (event.arg));  */
        }
 
-      /* Cancel monitor if file or directory is deleted.  */
-      if (!NILP (Fmember (symbol, list2 (Qdeleted, Qmoved)))
+      /* Cancel monitor if file or directory is deleted or unmounted.  */
+      if (!NILP (Fmember (symbol, list3 (Qdeleted, Qmoved, Qunmounted)))
          && strcmp (name, SSDATA (XCAR (XCDR (watch_object)))) == 0
          && !g_file_monitor_is_cancelled (monitor))
        g_file_monitor_cancel (monitor);
diff --git a/src/haiku_support.cc b/src/haiku_support.cc
index 3fc90385af3..33ad5889043 100644
--- a/src/haiku_support.cc
+++ b/src/haiku_support.cc
@@ -1059,6 +1059,8 @@ public:
        msg->FindInt64 ("when", &rq.time);
 
        rq.modifiers = 0;
+       rq.keysym = 0;
+
        uint32_t mods = modifiers ();
 
        if (mods & B_SHIFT_KEY)
@@ -1073,10 +1075,39 @@ public:
        if (mods & B_OPTION_KEY)
          rq.modifiers |= HAIKU_MODIFIER_SUPER;
 
-       ret = keysym_from_raw_char (raw, key, &rq.keysym);
+       /* mods & B_SHIFT_KEY should be inverted if keycode is
+          situated in the numeric keypad and Num Lock is set, for
+          this transformation is not effected on key events
+          themselves.  */
+
+       if (mods & B_NUM_LOCK)
+         {
+           switch (key)
+             {
+             case 0x37:
+             case 0x38:
+             case 0x39:
+             case 0x48:
+             case 0x49:
+             case 0x4a:
+             case 0x58:
+             case 0x59:
+             case 0x5a:
+             case 0x64:
+             case 0x65:
+               mods ^= B_SHIFT_KEY;
+
+               /* If shift is set at this juncture, map these keys to
+                  the digits they represent.  Because raw is not
+                  affected by Num Lock, keysym_from_raw_char will map
+                  this to the keysym yielded by this key in the
+                  absence of any modifiers.  */
+               if (mods & B_SHIFT_KEY)
+                 goto map_keysym;
+             }
+         }
 
-       if (!ret)
-         rq.keysym = 0;
+       ret = keysym_from_raw_char (raw, key, &rq.keysym);
 
        if (ret < 0)
          return;
@@ -1087,6 +1118,7 @@ public:
          {
            if (mods & B_SHIFT_KEY)
              {
+         map_keysym:
                if (mods & B_CAPS_LOCK)
                  map_caps_shift (key, &rq.multibyte_char);
                else
diff --git a/src/image.c b/src/image.c
index 84db9bfb3b8..9a465f0b180 100644
--- a/src/image.c
+++ b/src/image.c
@@ -4355,6 +4355,27 @@ slurp_file (image_fd fd, ptrdiff_t *size)
   return buf;
 }
 
+/* Like slurp_file above, but with added error handling.  Value is
+   null if an error occurred.  Set SIZE to the size of the file.
+   IMAGE_TYPE describes the image type (e.g. "PNG").  */
+
+static char *
+slurp_image (Lisp_Object filename, ptrdiff_t *size, const char *image_type)
+{
+  image_fd fd;
+  Lisp_Object file = image_find_image_fd (filename, &fd);
+  if (!STRINGP (file))
+    {
+      image_not_found_error (filename);
+      return NULL;
+    }
+  char *result = slurp_file (fd, size);
+  if (result == NULL)
+    image_error ("Error loading %s image `%s'",
+                make_unibyte_string (image_type, strlen (image_type)),
+                file);
+  return result;
+}
 
 
 /***********************************************************************
@@ -5073,22 +5094,10 @@ xbm_load (struct frame *f, struct image *img)
   file_name = image_spec_value (img->spec, QCfile, NULL);
   if (STRINGP (file_name))
     {
-      image_fd fd;
-      Lisp_Object file = image_find_image_fd (file_name, &fd);
-      if (!STRINGP (file))
-       {
-         image_not_found_error (file_name);
-         return false;
-       }
-
       ptrdiff_t size;
-      char *contents = slurp_file (fd, &size);
+      char *contents = slurp_image (file_name, &size, "XBM");
       if (contents == NULL)
-       {
-         image_error ("Error loading XBM image `%s'", file);
-         return 0;
-       }
-
+       return false;
       success_p = xbm_load_image (f, img, contents, contents + size);
       xfree (contents);
     }
@@ -6369,21 +6378,10 @@ xpm_load (struct frame *f,
   file_name = image_spec_value (img->spec, QCfile, NULL);
   if (STRINGP (file_name))
     {
-      image_fd fd;
-      Lisp_Object file = image_find_image_fd (file_name, &fd);
-      if (!STRINGP (file))
-       {
-         image_not_found_error (file_name);
-         return false;
-       }
-
       ptrdiff_t size;
-      char *contents = slurp_file (fd, &size);
+      char *contents = slurp_image (file_name, &size, "XPM");
       if (contents == NULL)
-       {
-         image_error ("Error loading XPM image `%s'", file);
-         return 0;
-       }
+       return false;
 
       success_p = xpm_load_image (f, img, contents, contents + size);
       xfree (contents);
@@ -7398,21 +7396,10 @@ pbm_load (struct frame *f, struct image *img)
 
   if (STRINGP (specified_file))
     {
-      image_fd fd;
-      Lisp_Object file = image_find_image_fd (specified_file, &fd);
-      if (!STRINGP (file))
-       {
-         image_not_found_error (specified_file);
-         return false;
-       }
-
       ptrdiff_t size;
-      contents = slurp_file (fd, &size);
+      contents = slurp_image (specified_file, &size, "PBM");
       if (contents == NULL)
-       {
-         image_error ("Error reading `%s'", file);
-         return 0;
-       }
+       return false;
 
       p = contents;
       end = contents + size;
@@ -10302,20 +10289,9 @@ webp_load (struct frame *f, struct image *img)
 
   if (NILP (specified_data))
     {
-      image_fd fd;
-      file = image_find_image_fd (specified_file, &fd);
-      if (!STRINGP (file))
-       {
-         image_not_found_error (specified_file);
-         return false;
-       }
-
-      contents = (uint8_t *) slurp_file (fd, &size);
+      contents = (uint8_t *) slurp_image (specified_file, &size, "WebP");
       if (contents == NULL)
-       {
-         image_error ("Error loading WebP image `%s'", file);
-         return false;
-       }
+       return false;
     }
   else
     {
@@ -11722,7 +11698,7 @@ svg_load (struct frame *f, struct image *img)
       if (contents == NULL)
        {
          image_error ("Error loading SVG image `%s'", file);
-         return 0;
+         return false;
        }
       /* If the file was slurped into memory properly, parse it.  */
       if (!STRINGP (base_uri))
diff --git a/src/indent.c b/src/indent.c
index eda85f2e94d..7d34d3638d9 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -2031,7 +2031,7 @@ vmotion (ptrdiff_t from, ptrdiff_t from_byte,
 }
 
 /* Return the width taken by line-number display in window W.  */
-static void
+void
 line_number_display_width (struct window *w, int *width, int *pixel_width)
 {
   if (NILP (Vdisplay_line_numbers))
@@ -2101,7 +2101,7 @@ numbers on display.  */)
 {
   int width, pixel_width;
   struct window *w = XWINDOW (selected_window);
-  line_number_display_width (XWINDOW (selected_window), &width, &pixel_width);
+  line_number_display_width (w, &width, &pixel_width);
   if (EQ (pixelwise, Qcolumns))
     {
       struct frame *f = XFRAME (w->frame);
diff --git a/src/inotify.c b/src/inotify.c
index 105ff5a9d8a..f50b9ddcaa7 100644
--- a/src/inotify.c
+++ b/src/inotify.c
@@ -148,6 +148,11 @@ symbol_to_inotifymask (Lisp_Object symb)
   else if (EQ (symb, Qonlydir))
     return IN_ONLYDIR;
 
+  else if (EQ (symb, Qignored))
+    return IN_IGNORED;
+  else if (EQ (symb, Qunmount))
+    return IN_UNMOUNT;
+
   else if (EQ (symb, Qt) || EQ (symb, Qall_events))
     return IN_ALL_EVENTS;
   else
@@ -512,12 +517,14 @@ it invalid.  */)
 #ifdef INOTIFY_DEBUG
 DEFUN ("inotify-watch-list", Finotify_watch_list, Sinotify_watch_list, 0, 0, 0,
        doc: /* Return a copy of the internal watch_list.  */)
+  (void)
 {
   return Fcopy_sequence (watch_list);
 }
 
 DEFUN ("inotify-allocated-p", Finotify_allocated_p, Sinotify_allocated_p, 0, 
0, 0,
        doc: /* Return non-nil, if an inotify instance is allocated.  */)
+  (void)
 {
   return inotifyfd < 0 ? Qnil : Qt;
 }
diff --git a/src/keyboard.c b/src/keyboard.c
index f756f163e87..dc2f78a7c26 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -4999,6 +4999,7 @@ const char *const lispy_function_keys[] =
        function keys that Emacs recognizes.  */
     [111] = "escape",
     [112] = "delete",
+    [116] = "scroll",
     [120] = "sysrq",
     [121] = "break",
     [122] = "home",
@@ -5019,15 +5020,19 @@ const char *const lispy_function_keys[] =
     [140] = "f10",
     [141] = "f11",
     [142] = "f12",
+    [143] = "kp-numlock",
     [160] = "kp-ret",
     [164] = "volume-mute",
+    [165] = "info",
     [19]  = "up",
     [20]  = "down",
+    [211] = "zenkaku-hankaku",
     [213] = "muhenkan",
     [214] = "henkan",
     [215] = "hiragana-katakana",
     [218] = "kana",
     [21]  = "left",
+    [223] = "sleep",
     [22]  = "right",
     [23]  = "select",
     [24]  = "volume-up",
@@ -5035,6 +5040,7 @@ const char *const lispy_function_keys[] =
     [25]  = "volume-down",
     [268] = "kp-up-left",
     [269] = "kp-down-left",
+    [26]  = "power",
     [270] = "kp-up-right",
     [271] = "kp-down-right",
     [272] = "media-skip-forward",
@@ -5042,7 +5048,9 @@ const char *const lispy_function_keys[] =
     [277] = "cut",
     [278] = "copy",
     [279] = "paste",
+    [285] = "browser-refresh",
     [28]  = "clear",
+    [300] = "XF86Forward",
     [4]          = "XF86Back",
     [61]  = "tab",
     [66]  = "return",
@@ -5056,6 +5064,7 @@ const char *const lispy_function_keys[] =
     [89]  = "media-rewind",
     [92]  = "prior",
     [93]  = "next",
+    [95]  = "mode-change",
   };
 
 #elif defined HAVE_NTGUI
@@ -5522,6 +5531,10 @@ static Lisp_Object button_down_location;
    the down mouse event.  */
 static Lisp_Object frame_relative_event_pos;
 
+/* The line-number display width, in columns, at the time of most
+   recent down mouse event.  */
+static int down_mouse_line_number_width;
+
 /* Information about the most recent up-going button event:  Which
    button, what location, and what time.  */
 
@@ -5918,6 +5931,57 @@ coords_in_tab_bar_window (struct frame *f, int x, int y)
 
 #endif /* HAVE_WINDOW_SYSTEM */
 
+static void
+save_line_number_display_width (struct input_event *event)
+{
+  struct window *w;
+  int pixel_width;
+
+  if (WINDOWP (event->frame_or_window))
+    w = XWINDOW (event->frame_or_window);
+  else if (FRAMEP (event->frame_or_window))
+    w = XWINDOW (XFRAME (event->frame_or_window)->selected_window);
+  else
+    w = XWINDOW (selected_window);
+  line_number_display_width (w, &down_mouse_line_number_width, &pixel_width);
+}
+
+/* Return non-zero if the change of position from START_POS to END_POS
+   is likely to be the effect of horizontal scrolling due to a change
+   in line-number width produced by redisplay between two mouse
+   events, like mouse-down followed by mouse-up, at those positions.
+   This is used to decide whether to converts mouse-down followed by
+   mouse-up event into a mouse-drag event.  */
+static bool
+line_number_mode_hscroll (Lisp_Object start_pos, Lisp_Object end_pos)
+{
+  if (!EQ (Fcar (start_pos), Fcar (end_pos)) /* different window */
+      || list_length (start_pos) < 7        /* no COL/ROW info */
+      || list_length (end_pos) < 7)
+    return false;
+
+  Lisp_Object start_col_row = Fnth (make_fixnum (6), start_pos);
+  Lisp_Object end_col_row = Fnth (make_fixnum (6), end_pos);
+  Lisp_Object window = Fcar (end_pos);
+  int col_width, pixel_width;
+  Lisp_Object start_col, end_col;
+  struct window *w;
+  if (!WINDOW_VALID_P (window))
+    {
+      if (WINDOW_LIVE_P (window))
+       window = XFRAME (window)->selected_window;
+      else
+       window = selected_window;
+    }
+  w = XWINDOW (window);
+  line_number_display_width (w, &col_width, &pixel_width);
+  start_col = Fcar (start_col_row);
+  end_col = Fcar (end_col_row);
+  return EQ (start_col, end_col)
+        && down_mouse_line_number_width >= 0
+        && col_width != down_mouse_line_number_width;
+}
+
 /* Given a struct input_event, build the lisp event which represents
    it.  If EVENT is 0, build a mouse movement event from the mouse
    movement buffer, which should have a movement event in it.
@@ -6320,6 +6384,8 @@ make_lispy_event (struct input_event *event)
            *start_pos_ptr = Fcopy_alist (position);
            frame_relative_event_pos = Fcons (event->x, event->y);
            ignore_mouse_drag_p = false;
+           /* Squirrel away the line-number width, if any.  */
+           save_line_number_display_width (event);
          }
 
        /* Now we're releasing a button - check the coordinates to
@@ -6365,12 +6431,18 @@ make_lispy_event (struct input_event *event)
                          it's probably OK to ignore it as well.  */
                       && (EQ (Fcar (Fcdr (start_pos)),
                               Fcar (Fcdr (position))) /* Same buffer pos */
+                          /* Redisplay hscrolled text between down- and
+                              up-events due to display-line-numbers-mode.  */
+                          || line_number_mode_hscroll (start_pos, position)
                           || !EQ (Fcar (start_pos),
                                   Fcar (position))))) /* Different window */
+
                  {
                    /* Mouse has moved enough.  */
                    button_down_time = 0;
                    click_or_drag_modifier = drag_modifier;
+                   /* Reset the value for future clicks.  */
+                   down_mouse_line_number_width = -1;
                  }
                else if (((!EQ (Fcar (start_pos), Fcar (position)))
                          || (!EQ (Fcar (Fcdr (start_pos)),
diff --git a/src/kqueue.c b/src/kqueue.c
index 22c279b7ce3..43d5f40624b 100644
--- a/src/kqueue.c
+++ b/src/kqueue.c
@@ -320,13 +320,16 @@ kqueue_callback (int fd, void *data)
        directory is monitored.  */
     if (kev.fflags & NOTE_RENAME)
       actions = Fcons (Qrename, actions);
+    if (kev.fflags & NOTE_REVOKE)
+      actions = Fcons (Qrevoke, actions);
 
     /* Create the event.  */
     if (! NILP (actions))
       kqueue_generate_event (watch_object, actions, file, Qnil);
 
-    /* Cancel monitor if file or directory is deleted or renamed.  */
-    if (kev.fflags & (NOTE_DELETE | NOTE_RENAME))
+    /* Cancel monitor if file or directory is deleted or renamed or
+       the file system is unmounted.  */
+    if (kev.fflags & (NOTE_DELETE | NOTE_RENAME | NOTE_REVOKE))
       Fkqueue_rm_watch (descriptor);
   }
   return;
@@ -351,6 +354,7 @@ following symbols:
   `attrib' -- a FILE attribute was changed
   `link'   -- a FILE's link count was changed
   `rename' -- FILE was moved to FILE1
+  `revoke' -- FILE was unmounted
 
 When any event happens, Emacs will call the CALLBACK function passing
 it a single argument EVENT, which is of the form
@@ -437,6 +441,7 @@ only when the upper directory of the renamed file is 
watched.  */)
   if (! NILP (Fmember (Qattrib, flags))) fflags |= NOTE_ATTRIB;
   if (! NILP (Fmember (Qlink, flags)))   fflags |= NOTE_LINK;
   if (! NILP (Fmember (Qrename, flags))) fflags |= NOTE_RENAME;
+  if (! NILP (Fmember (Qrevoke, flags))) fflags |= NOTE_REVOKE;
 
   /* Register event.  */
   EV_SET (&kev, fd, EVFILT_VNODE, EV_ADD | EV_ENABLE | EV_CLEAR,
@@ -526,6 +531,7 @@ syms_of_kqueue (void)
   DEFSYM (Qattrib, "attrib");  /* NOTE_ATTRIB  */
   DEFSYM (Qlink, "link");      /* NOTE_LINK  */
   DEFSYM (Qrename, "rename");  /* NOTE_RENAME  */
+  DEFSYM (Qrevoke, "revoke");  /* NOTE_REVOKE  */
 
   staticpro (&watch_list);
 
diff --git a/src/lisp.h b/src/lisp.h
index fb9800732d9..cfeeb4957ae 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -4885,6 +4885,7 @@ extern void keys_of_keyboard (void);
 
 /* Defined in indent.c.  */
 extern ptrdiff_t current_column (void);
+extern void line_number_display_width (struct window *, int *, int *);
 extern void invalidate_current_column (void);
 extern bool indented_beyond_p (ptrdiff_t, ptrdiff_t, EMACS_INT);
 extern void syms_of_indent (void);
diff --git a/src/nsfns.m b/src/nsfns.m
index 082e06698b2..038a3fa23ad 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -3987,7 +3987,12 @@ be used as the image of the icon representing the frame. 
 */);
 
   DEFVAR_BOOL ("ns-use-proxy-icon", ns_use_proxy_icon,
                doc: /* When non-nil display a proxy icon in the titlebar.
-Default is t.  */);
+The proxy icon can be used to drag the file associated with the
+current buffer to other applications, a printer, the desktop, etc., in
+the same way you can from Finder.  Note that you might have to disable
+`tool-bar-mode' to see the proxy icon.
+
+The default value is t.  */);
   ns_use_proxy_icon = true;
 
   DEFVAR_LISP ("x-max-tooltip-size", Vx_max_tooltip_size,
diff --git a/src/nsmenu.m b/src/nsmenu.m
index 4a86864176d..fb356c6b861 100644
--- a/src/nsmenu.m
+++ b/src/nsmenu.m
@@ -768,6 +768,10 @@ prettify_key (const char *key)
                             pressure: 0];
 
   context_menu_value = -1;
+#ifdef NS_IMPL_COCOA
+  /* Don't let the system add a Services menu here.  */
+  self.allowsContextMenuPlugIns = NO;
+#endif
   [NSMenu popUpContextMenu: self withEvent: event forView: view];
   retVal = context_menu_value;
   context_menu_value = 0;
diff --git a/src/nsterm.m b/src/nsterm.m
index 4e0dfa58c63..11535f071eb 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -554,29 +554,32 @@ ns_init_locale (void)
 /* macOS doesn't set any environment variables for the locale when run
    from the GUI. Get the locale from the OS and set LANG.  */
 {
-  NSLocale *locale = [NSLocale currentLocale];
-
   NSTRACE ("ns_init_locale");
 
-  /* If we were run from a terminal then assume an unset LANG variable
-     is intentional and don't try to "fix" it.  */
-  if (!isatty (STDIN_FILENO))
+  /* Either use LANG, if set, or try to construct LANG from
+     NSLocale.  */
+  const char *lang = getenv ("LANG");
+  if (lang == NULL || *lang == 0)
     {
-      char *oldLocale = setlocale (LC_ALL, NULL);
-      /* It seems macOS should probably use UTF-8 everywhere.
-         'localeIdentifier' does not specify the encoding, and I can't
-         find any way to get the OS to tell us which encoding to use,
-         so hard-code '.UTF-8'.  */
-      NSString *localeID = [NSString stringWithFormat:@"%@.UTF-8",
-                                     [locale localeIdentifier]];
-
-      /* Check the locale ID is valid and if so set LANG, but not if
-         it is already set.  */
-      if (setlocale (LC_ALL, [localeID UTF8String]))
-        setenv("LANG", [localeID UTF8String], 0);
+      const NSLocale *locale = [NSLocale currentLocale];
+      const NSString *localeID = [NSString stringWithFormat:@"%@.UTF-8",
+                                          [locale localeIdentifier]];
+      lang = [localeID UTF8String];
+    }
 
-      setlocale (LC_ALL, oldLocale);
+  /* Check if LANG can be used for initializing the locale.  If not,
+     use a default setting.  Note that Emacs' main will undo the
+     setlocale below, initializing the locale from the
+     environment.  */
+  if (setlocale (LC_ALL, lang) == NULL)
+    {
+      const char *const default_lang = "en_US.UTF-8";
+      fprintf (stderr, "LANG=%s cannot be used, using %s instead.\n",
+              lang, default_lang);
+      lang = default_lang;
     }
+
+  setenv ("LANG", lang, 1);
 }
 
 
@@ -6110,6 +6113,11 @@ ns_term_shutdown (int sig)
 
 */
 
+- (BOOL) applicationSupportsSecureRestorableState: (NSApplication *)app
+{
+  return YES;
+}
+
 - (void) terminate: (id)sender
 {
   struct input_event ie;
diff --git a/src/pdumper.c b/src/pdumper.c
index ce4faefdaea..315a31e2bcb 100644
--- a/src/pdumper.c
+++ b/src/pdumper.c
@@ -4090,6 +4090,10 @@ types.  */)
   if (!NILP (XCDR (Fall_threads ())))
     error ("No other Lisp threads can be running when this function is 
called");
 
+#ifdef HAVE_NATIVE_COMP
+  CALLN (Ffuncall, intern_c_string ("load--fixup-all-elns"));
+#endif
+
   check_pure_size ();
 
   /* Clear out any detritus in memory.  */
diff --git a/src/print.c b/src/print.c
index eb20cfb1c47..4eee8319f65 100644
--- a/src/print.c
+++ b/src/print.c
@@ -2008,7 +2008,7 @@ print_vectorlike (Lisp_Object obj, Lisp_Object 
printcharfun, bool escapeflag,
       {
        struct Lisp_Native_Comp_Unit *cu = XNATIVE_COMP_UNIT (obj);
        print_c_string ("#<native compilation unit: ", printcharfun);
-       print_string (cu->file, printcharfun);
+       print_object (cu->file, printcharfun, escapeflag);
        printchar (' ', printcharfun);
        print_object (cu->optimize_qualities, printcharfun, escapeflag);
        printchar ('>', printcharfun);
diff --git a/src/process.c b/src/process.c
index 2376d0f288d..8419b1e88ca 100644
--- a/src/process.c
+++ b/src/process.c
@@ -1279,7 +1279,8 @@ static void
 update_process_mark (struct Lisp_Process *p)
 {
   Lisp_Object buffer = p->buffer;
-  if (BUFFERP (buffer))
+  if (BUFFERP (buffer)
+      && XMARKER (p->mark)->buffer != XBUFFER (buffer))
     set_marker_both (p->mark, buffer,
                     BUF_ZV (XBUFFER (buffer)),
                     BUF_ZV_BYTE (XBUFFER (buffer)));
@@ -2206,10 +2207,15 @@ create_process (Lisp_Object process, char **new_argv, 
Lisp_Object current_dir)
       inchannel = p->open_fd[READ_FROM_SUBPROCESS];
       forkout = p->open_fd[SUBPROCESS_STDOUT];
 
-#if (defined (GNU_LINUX) || defined __ANDROID__)       \
-  && defined (F_SETPIPE_SZ)
-      fcntl (inchannel, F_SETPIPE_SZ, read_process_output_max);
-#endif /* (GNU_LINUX || __ANDROID__) && F_SETPIPE_SZ */
+#if defined(F_SETPIPE_SZ) && defined(F_GETPIPE_SZ)
+      /* If they requested larger reads than the default system pipe
+         capacity, try enlarging the capacity to match the request.  */
+      if (read_process_output_max > fcntl (inchannel, F_GETPIPE_SZ))
+       {
+         int readmax = clip_to_bounds (1, read_process_output_max, INT_MAX);
+         fcntl (inchannel, F_SETPIPE_SZ, readmax);
+       }
+#endif
     }
 
   if (!NILP (p->stderrproc))
diff --git a/src/sfnt.c b/src/sfnt.c
index 360b0cd2d4d..7559055e8c2 100644
--- a/src/sfnt.c
+++ b/src/sfnt.c
@@ -1122,8 +1122,8 @@ sfnt_lookup_glyph_2 (sfnt_char character,
          : 0);
 }
 
-/* Like `bsearch'.  However, return the highest element above KEY if
-   it could not be found.  */
+/* Like `bsearch', but return the element ordered exactly above KEY if
+   one exists and KEY itself cannot be located.  */
 
 static void *
 sfnt_bsearch_above (const void *key, const void *base,
@@ -1146,12 +1146,18 @@ sfnt_bsearch_above (const void *key, const void *base,
       mid = low + (high - low) / 2;
       sample = bytes + mid * size;
 
-      if (compar (key, sample) > 0)
+      if ((*compar) (key, sample) > 0)
        low = mid + 1;
       else
        high = mid;
     }
 
+  sample = bytes + low * size;
+
+  if (low == nmemb - 1
+      && (*compar) (key, sample) > 0)
+    return NULL;
+
   return (unsigned char *) bytes + low * size;
 }
 
@@ -1287,7 +1293,7 @@ sfnt_lookup_glyph_8 (sfnt_char character,
                                  sizeof format8->groups[0],
                                  sfnt_compare_char);
 
-      if (group->start_char_code > character)
+      if (!group || group->start_char_code > character)
        /* No glyph matches this group.  */
        return 0;
 
@@ -1336,7 +1342,7 @@ sfnt_lookup_glyph_12 (sfnt_char character,
                                  sizeof format12->groups[0],
                                  sfnt_compare_char);
 
-      if (group->start_char_code > character)
+      if (!group || group->start_char_code > character)
        /* No glyph matches this group.  */
        return 0;
 
@@ -12291,18 +12297,47 @@ sfnt_interpret_compound_glyph (struct sfnt_glyph 
*glyph,
 
 /* Unicode Variation Sequence (UVS) support.
 
-   Unicode defines a mechanism by which a two-codepoint sequence
-   consisting of a ``base character'' and ``variation selector'' is
-   able to produce a glyph that is a variant of the glyph that would
-   conventionally have been mapped to the ``base character''.
-
-   TrueType describes variation selector sequences through a type of
-   character mapping table that is given the format 14.  The character
-   mapping table consists of an array of variation selectors, each of
-   which have a corresponding ``default UVS table'', which describes
-   ranges of ``base characters'' having no special variant glyphs, and
-   a ``non-default UVS table'', which is a map of ``base characters''
-   to their corresponding variant glyphs.  */
+   Unicode defines a mechanism by which two-codepoint sequences
+   comprising a ``base character'' and ``variation selector'' combine
+   to produce a glyph besides that which is mapped to the ``base
+   character'' itself.
+
+   TrueType stores variation selector sequences inside a special type
+   of character mapping table that is given the format 14.  The
+   character mapping table consists of an array of variation
+   selectors, each of which is assigned a ``default UVS table''
+   recording ranges of ``base characters'' absent special variant
+   glyphs, and a ``non-default UVS table'', linking ``base
+   characters'' to their respective variant glyphs.
+
+   Unicode variation selectors occupy the range formed between 0xfe00
+   and 0xfe0f, along with that from 0xe0100 to 0xe01ef, within the
+   Unicode codespace.  When a variation selector is encountered as
+   text is being examined for display with a particular font, that
+   font's character mapping table is indexed by it, yielding a default
+   and non-default UVS table.  If the base character (which is
+   directly behind the variation selector) is subsequently located
+   within the default UVS table, then the glyph represented by this
+   union of base character and variation selector is that designated
+   by the base character within any UCS-4 or BMP character mapping
+   table in the font.  Since this glyph is at variance with that
+   derived from the base character only when the character set of the
+   character mapping table otherwise consulted is not UCS-4 or BMP,
+   the distinction between those two glyphs is largely notional.
+   Should the nondefault UVS table hold the base character, then the
+   glyph is conversely that enumerated in said table, whose indexing
+   is facilitated by sfnt_variation_glyph_for_char.  And if the base
+   character isn't present within either table or the tables for the
+   variation selector are absent in the first place, then the two
+   codepoints constituting the sequence are immiscible and therefore
+   the sequence cannot apply to the font.
+
+   The approach taken by Emacs character composition routines is
+   diametric to the approach illustrated above: in place of searching
+   for variation glyphs each time a variation selector character is
+   encountered, these routines ascertain which glyphs are linked to
+   each base character that they have adjudged subject to variation in
+   advance.  See sfntfont_get_variation_glyphs.  */
 
 /* Read a default UVS table from the font file FD, at the specified
    OFFSET.  Value is the default UVS table upon success, else
@@ -12682,6 +12717,26 @@ sfnt_compare_uvs_mapping (const void *k, const void *v)
   return 1;
 }
 
+/* Compare *(sfnt_char *) K to the Unicode value range V.  */
+
+static int
+sfnt_compare_unicode_value_range (const void *k, const void *v)
+{
+  const sfnt_char *key;
+  const struct sfnt_unicode_value_range *value;
+
+  key = k;
+  value = v;
+
+  if (*key < value->start_unicode_value)
+    return -1;
+  else if ((*key - value->start_unicode_value
+           <= value->additional_count))
+    return 0;
+
+  return 1;
+}
+
 /* Return the ID of a variation glyph for the character C in the
    nondefault UVS mapping table UVS.
 
@@ -12701,6 +12756,21 @@ sfnt_variation_glyph_for_char (struct 
sfnt_nondefault_uvs_table *uvs,
   return mapping ? mapping->base_character_value : 0;
 }
 
+/* Return whether the character C is present in the default UVS
+   mapping table UVS.  */
+
+TEST_STATIC bool
+sfnt_is_character_default (struct sfnt_default_uvs_table *uvs,
+                          sfnt_char c)
+{
+  /* UVS->ranges comprises ranges of characters sorted in increasing
+     order; these ranges cannot overlap.  */
+
+  return (bsearch (&c, uvs->ranges, uvs->num_unicode_value_ranges,
+                  sizeof *uvs->ranges,
+                  sfnt_compare_unicode_value_range) != NULL);
+}
+
 
 
 #if defined HAVE_MMAP && !defined TEST
@@ -12837,9 +12907,13 @@ sfnt_read_table (int fd, struct sfnt_offset_subtable 
*subtable,
 
 /* Glyph variations.  Instead of defining separate fonts for each
    combination of weight, width and slant (bold, condensed, italic,
-   etc), some fonts specify a list of ``variation axes'', each of
-   which determines one delta to apply to each point in every
-   glyph.
+   etc), some fonts specify a list of ``variation axes'', which are
+   options that accept values consisting of numbers on scales
+   governing deltas applied to select points in their glyphs.
+
+   Particular styles within the font are then supplied as sets of
+   values on these scales to which their respective axes are set,
+   termed ``instances''.
 
    This optional information is specified in the `fvar' (font
    variation), `gvar' (glyph variation) and `cvar' (CVT variation)
@@ -14042,7 +14116,7 @@ sfnt_compute_tuple_scale (struct sfnt_blend *blend, 
bool intermediate_p,
       if (intermediate_p)
        {
          start = intermediate_start[i] * 4;
-         end = intermediate_start[i] * 4;
+         end = intermediate_end[i] * 4;
        }
 
       /* Ignore tuples that can be skipped.  */
@@ -14595,7 +14669,7 @@ sfnt_vary_simple_glyph (struct sfnt_blend *blend, 
sfnt_glyph id,
     coords = alloca (gvar->axis_count * sizeof *coords * 3);
 
   intermediate_start = coords + gvar->axis_count;
-  intermediate_end = coords + gvar->axis_count;
+  intermediate_end = intermediate_start + gvar->axis_count;
 
   /* Allocate arrays of booleans and fwords to keep track of which
      points have been touched.  */
@@ -14967,7 +15041,7 @@ sfnt_vary_compound_glyph (struct sfnt_blend *blend, 
sfnt_glyph id,
     coords = alloca (gvar->axis_count * sizeof *coords * 3);
 
   intermediate_start = coords + gvar->axis_count;
-  intermediate_end = coords + gvar->axis_count;
+  intermediate_end = intermediate_start + gvar->axis_count;
 
   while (ntuples--)
     {
@@ -19152,10 +19226,11 @@ static void
 sfnt_test_uvs (int fd, struct sfnt_cmap_format_14 *format14)
 {
   struct sfnt_uvs_context *context;
-  size_t i, j;
+  size_t i, j, k;
   sfnt_glyph glyph;
   sfnt_char c;
   struct sfnt_nondefault_uvs_table *uvs;
+  struct sfnt_default_uvs_table *default_uvs;
 
   context = sfnt_create_uvs_context (format14, fd);
 
@@ -19170,6 +19245,27 @@ sfnt_test_uvs (int fd, struct sfnt_cmap_format_14 
*format14)
 
       for (i = 0; i < context->num_records; ++i)
        {
+         if (context->records[i].default_uvs)
+           {
+             default_uvs = context->records[i].default_uvs;
+
+             for (j = 0; j < default_uvs->num_unicode_value_ranges; ++j)
+               {
+                 fprintf (stderr, "   Default UVS: %u, %u\n",
+                          default_uvs->ranges[j].start_unicode_value,
+                          default_uvs->ranges[j].additional_count);
+
+                 c = default_uvs->ranges[j].start_unicode_value;
+                 k = 0;
+
+                 for (; k <= default_uvs->ranges[j].additional_count; ++k)
+                   {
+                     if (!sfnt_is_character_default (default_uvs, c + k))
+                       abort ();
+                   }
+               }
+           }
+
          if (!context->records[i].nondefault_uvs)
            continue;
 
diff --git a/src/sfnt.h b/src/sfnt.h
index 6602d240051..41c1f6f74e8 100644
--- a/src/sfnt.h
+++ b/src/sfnt.h
@@ -1526,6 +1526,12 @@ extern sfnt_glyph sfnt_variation_glyph_for_char 
(PROTOTYPE);
 
 #undef PROTOTYPE
 
+#define PROTOTYPE struct sfnt_default_uvs_table *, sfnt_char
+
+extern bool sfnt_is_character_default (PROTOTYPE);
+
+#undef PROTOTYPE
+
 
 
 #ifdef HAVE_MMAP
diff --git a/src/sfntfont-android.c b/src/sfntfont-android.c
index 53589078cda..e49615210eb 100644
--- a/src/sfntfont-android.c
+++ b/src/sfntfont-android.c
@@ -746,29 +746,54 @@ syms_of_sfntfont_android_for_pdumper (void)
 void
 init_sfntfont_android (void)
 {
+  int api_level;
+
   if (!android_init_gui)
     return;
 
-  /* Make sure to pick the right Sans Serif font depending on what
+  api_level = android_get_current_api_level ();
+
+  /* Make sure to pick the proper Sans Serif and Serif fonts for the
      version of Android the device is running.  */
-  if (android_get_current_api_level () >= 15)
+
+  if (api_level >= 21)
+    /* Android 5.0 and later distribute Noto Serif in lieu of Droid
+       Serif.  */
+    Vsfnt_default_family_alist
+      = list4 (Fcons (build_string ("Monospace"),
+                     build_string ("Droid Sans Mono")),
+              /* Android doesn't come with a Monospace Serif font, so
+                 this will have to do.  */
+              Fcons (build_string ("Monospace Serif"),
+                     build_string ("Droid Sans Mono")),
+              Fcons (build_string ("Sans Serif"),
+                     build_string ("Roboto")),
+              Fcons (build_string ("DejaVu Serif"),
+                     build_string ("Noto Serif")));
+  else if (api_level >= 15)
+    /* Android 4.0 and later distribute Roboto in lieu of Droid
+       Sans.  */
     Vsfnt_default_family_alist
-      = list3 (Fcons (build_string ("Monospace"),
+      = list4 (Fcons (build_string ("Monospace"),
                      build_string ("Droid Sans Mono")),
               /* Android doesn't come with a Monospace Serif font, so
                  this will have to do.  */
               Fcons (build_string ("Monospace Serif"),
                      build_string ("Droid Sans Mono")),
               Fcons (build_string ("Sans Serif"),
-                     build_string ("Roboto")));
+                     build_string ("Roboto")),
+              Fcons (build_string ("DejaVu Serif"),
+                     build_string ("Droid Serif")));
   else
     Vsfnt_default_family_alist
-      = list3 (Fcons (build_string ("Monospace"),
+      = list4 (Fcons (build_string ("Monospace"),
                      build_string ("Droid Sans Mono")),
               Fcons (build_string ("Monospace Serif"),
                      build_string ("Droid Sans Mono")),
               Fcons (build_string ("Sans Serif"),
-                     build_string ("Droid Sans")));
+                     build_string ("Droid Sans")),
+              Fcons (build_string ("DejaVu Serif"),
+                     build_string ("Droid Serif")));
 
   /* Set up the user fonts directory.  This directory is ``fonts'' in
      the Emacs files directory.  */
diff --git a/src/sfntfont.c b/src/sfntfont.c
index 3506742a92b..35b37396ccd 100644
--- a/src/sfntfont.c
+++ b/src/sfntfont.c
@@ -2784,7 +2784,9 @@ sfntfont_setup_interpreter (struct sfnt_font_info *info,
 static void
 sfnt_close_tables (struct sfnt_font_tables *tables)
 {
+#ifdef HAVE_MMAP
   int rc;
+#endif /* HAVE_MMAP */
 
   xfree (tables->cmap);
   xfree (tables->hhea);
@@ -2839,7 +2841,10 @@ sfnt_open_tables (struct sfnt_font_desc *desc)
 {
   struct sfnt_font_tables *tables;
   struct sfnt_offset_subtable *subtable;
-  int fd, i, rc;
+  int fd, i;
+#ifdef HAVE_MMAP
+  int rc;
+#endif /* HAVE_MMAP */
   struct sfnt_cmap_encoding_subtable *subtables;
   struct sfnt_cmap_encoding_subtable_data **data;
   struct sfnt_cmap_format_14 *format14;
@@ -3715,9 +3720,10 @@ sfntfont_get_variation_glyphs (struct font *font, int c,
                               unsigned variations[256])
 {
   struct sfnt_font_info *info;
-  size_t i;
+  size_t i, index;
   int n;
   struct sfnt_mapped_variation_selector_record *record;
+  sfnt_glyph default_glyph;
 
   info = (struct sfnt_font_info *) font;
   n = 0;
@@ -3738,12 +3744,37 @@ sfntfont_get_variation_glyphs (struct font *font, int c,
         && info->uvs->records[i].selector < 0xfe00)
     ++i;
 
+  /* Get the glyph represented by C, used when C is present within a
+     default value table.  */
+
+  default_glyph = sfntfont_lookup_glyph (info, c);
+
   /* Fill in selectors 0 to 15.  */
 
   while (i < info->uvs->num_records
         && info->uvs->records[i].selector <= 0xfe0f)
     {
       record = &info->uvs->records[i];
+      index = info->uvs->records[i].selector - 0xfe00 + 16;
+
+      /* Handle invalid unsorted tables.  */
+
+      if (record->selector < 0xfe00)
+       return 0;
+
+      /* If there are default mappings in this record, ascertain if
+        this glyph matches one of them.  */
+
+      if (record->default_uvs
+         && sfnt_is_character_default (record->default_uvs, c))
+       {
+         variations[index] = default_glyph;
+
+         if (default_glyph)
+           ++n;
+
+         goto next_selector;
+       }
 
       /* If record has no non-default mappings, continue on to the
         next selector.  */
@@ -3751,18 +3782,13 @@ sfntfont_get_variation_glyphs (struct font *font, int c,
       if (!record->nondefault_uvs)
        goto next_selector;
 
-      /* Handle invalid unsorted tables.  */
-
-      if (record->selector < 0xfe00)
-       return 0;
-
       /* Find the glyph ID associated with C and put it in
         VARIATIONS.  */
 
-      variations[info->uvs->records[i].selector - 0xfe00]
+      variations[index]
        = sfnt_variation_glyph_for_char (record->nondefault_uvs, c);
 
-      if (variations[info->uvs->records[i].selector - 0xfe00])
+      if (variations[index])
        ++n;
 
     next_selector:
@@ -3782,6 +3808,26 @@ sfntfont_get_variation_glyphs (struct font *font, int c,
         && info->uvs->records[i].selector <= 0xe01ef)
     {
       record = &info->uvs->records[i];
+      index = info->uvs->records[i].selector - 0xe0100 + 16;
+
+      /* Handle invalid unsorted tables.  */
+
+      if (record->selector < 0xe0100)
+       return 0;
+
+      /* If there are default mappings in this record, ascertain if
+        this glyph matches one of them.  */
+
+      if (record->default_uvs
+         && sfnt_is_character_default (record->default_uvs, c))
+       {
+         variations[index] = default_glyph;
+
+         if (default_glyph)
+           ++n;
+
+         goto next_selector_1;
+       }
 
       /* If record has no non-default mappings, continue on to the
         next selector.  */
@@ -3789,18 +3835,13 @@ sfntfont_get_variation_glyphs (struct font *font, int c,
       if (!record->nondefault_uvs)
        goto next_selector_1;
 
-      /* Handle invalid unsorted tables.  */
-
-      if (record->selector < 0xe0100)
-       return 0;
-
       /* Find the glyph ID associated with C and put it in
         VARIATIONS.  */
 
-      variations[info->uvs->records[i].selector - 0xe0100 + 16]
+      variations[index]
        = sfnt_variation_glyph_for_char (record->nondefault_uvs, c);
 
-      if (variations[info->uvs->records[i].selector - 0xe0100 + 16])
+      if (variations[index])
        ++n;
 
     next_selector_1:
@@ -3836,7 +3877,7 @@ sfntfont_detect_sigbus (void *addr)
   return false;
 }
 
-#endif
+#endif /* HAVE_MMAP */
 
 
 
diff --git a/src/textconv.c b/src/textconv.c
index 57daa7e53b6..bd72562317f 100644
--- a/src/textconv.c
+++ b/src/textconv.c
@@ -616,6 +616,12 @@ really_commit_text (struct frame *f, EMACS_INT position,
          end = max (mark, PT);
        }
 
+      /* If it transpires that the start of the compose region is not
+        point, move point there.  */
+
+      if (start != PT)
+       set_point (start);
+
       /* Now delete whatever needs to go.  */
 
       del_range_1 (start, end, true, false);
@@ -635,7 +641,7 @@ really_commit_text (struct frame *f, EMACS_INT position,
          record_buffer_change (start, PT, text);
        }
 
-      /* Move to a the position specified in POSITION.  */
+      /* Move to the position specified in POSITION.  */
 
       if (position <= 0)
        {
@@ -1154,6 +1160,135 @@ really_set_point_and_mark (struct frame *f, ptrdiff_t 
point,
   unbind_to (count, Qnil);
 }
 
+/* Remove the composing region.  Replace the text between START and
+   END in F's selected window with TEXT, then set point to POSITION
+   relative to it.  If the mark is active, deactivate it.  */
+
+static void
+really_replace_text (struct frame *f, ptrdiff_t start, ptrdiff_t end,
+                    Lisp_Object text, ptrdiff_t position)
+{
+  specpdl_ref count;
+  ptrdiff_t new_start, new_end, wanted;
+  struct window *w;
+
+  /* If F's old selected window is no longer alive, fail.  */
+
+  if (!WINDOW_LIVE_P (f->old_selected_window))
+    return;
+
+  count = SPECPDL_INDEX ();
+  record_unwind_protect (restore_selected_window,
+                        selected_window);
+
+  /* Make the composition region markers point elsewhere.  */
+
+  if (!NILP (f->conversion.compose_region_start))
+    {
+      Fset_marker (f->conversion.compose_region_start, Qnil, Qnil);
+      Fset_marker (f->conversion.compose_region_end, Qnil, Qnil);
+      f->conversion.compose_region_start = Qnil;
+      f->conversion.compose_region_end = Qnil;
+
+      /* Notify the IME of an update to the composition region,
+        inasmuch as the point might not change if START and END are
+        identical and TEXT is empty, among other circumstances.  */
+
+      if (text_interface
+         && text_interface->compose_region_changed)
+       (*text_interface->compose_region_changed) (f);
+    }
+
+  /* Delete the composition region overlay.  */
+
+  if (!NILP (f->conversion.compose_region_overlay))
+    Fdelete_overlay (f->conversion.compose_region_overlay);
+
+  /* Temporarily switch to F's selected window at the time of the last
+     redisplay.  */
+  select_window (f->old_selected_window, Qt);
+
+  /* Sort START and END by magnitude.  */
+  new_start = min (start, end);
+  new_end   = max (start, end);
+
+  /* Now constrain both to the accessible region.  */
+
+  if (new_start < BEGV)
+    new_start = BEGV;
+  else if (new_start > ZV)
+    new_start = ZV;
+
+  if (new_end < BEGV)
+    new_end = BEGV;
+  else if (new_end > ZV)
+    new_end = ZV;
+
+  start = new_start;
+  end   = new_end;
+
+  /* This should deactivate the mark.  */
+  call0 (Qdeactivate_mark);
+
+  /* Go to start.  */
+  set_point (start);
+
+  /* Now delete the text in between, and save PT before TEXT is
+     inserted.  */
+  del_range_1 (start, end, true, false);
+  record_buffer_change (start, start, Qt);
+  wanted = PT;
+
+  /* So long as TEXT isn't empty, insert it now.  */
+
+  if (SCHARS (text))
+    {
+      /* Insert the new text.  Make sure to inherit text properties
+        from the surroundings: if this doesn't happen, CC Mode
+        fontification might grow confused and become very slow.  */
+
+      insert_from_string (text, 0, 0, SCHARS (text),
+                         SBYTES (text), true);
+      record_buffer_change (start, PT, text);
+    }
+
+  /* Now, move point to the position designated by POSITION.  */
+
+  if (position <= 0)
+    {
+      if (INT_ADD_WRAPV (wanted, position, &wanted)
+         || wanted < BEGV)
+       wanted = BEGV;
+
+      if (wanted > ZV)
+       wanted = ZV;
+
+      set_point (wanted);
+    }
+  else
+    {
+      wanted = PT;
+
+      if (INT_ADD_WRAPV (wanted, position - 1, &wanted)
+         || wanted > ZV)
+       wanted = ZV;
+
+      if (wanted < BEGV)
+       wanted = BEGV;
+
+      set_point (wanted);
+    }
+
+  /* Print some debugging information.  */
+  TEXTCONV_DEBUG ("text inserted: %s, point now: %zd",
+                 SSDATA (text), PT);
+
+  /* Update the ephemeral last point.  */
+  w = XWINDOW (selected_window);
+  w->ephemeral_last_point = PT;
+  unbind_to (count, Qnil);
+}
+
 /* Complete the edit specified by the counter value inside *TOKEN.  */
 
 static void
@@ -1325,6 +1460,13 @@ handle_pending_conversion_events_1 (struct frame *f,
       if (w)
        w->ephemeral_last_point = window_point (w);
       break;
+
+    case TEXTCONV_REPLACE_TEXT:
+      really_replace_text (f, XFIXNUM (XCAR (data)),
+                          XFIXNUM (XCAR (XCDR (data))),
+                          XCAR (XCDR (XCDR (data))),
+                          XFIXNUM (XCAR (XCDR (XCDR (XCDR (data))))));
+      break;
     }
 
   /* Signal success.  */
@@ -1679,6 +1821,30 @@ textconv_barrier (struct frame *f, unsigned long counter)
   input_pending = true;
 }
 
+/* Remove the composing region.  Replace the text between START and
+   END within F's selected window with TEXT; deactivate the mark if it
+   is active.  Subsequently, set point to POSITION relative to TEXT,
+   much as `commit_text' would.  */
+
+void
+replace_text (struct frame *f, ptrdiff_t start, ptrdiff_t end,
+             Lisp_Object text, ptrdiff_t position,
+             unsigned long counter)
+{
+  struct text_conversion_action *action, **last;
+
+  action = xmalloc (sizeof *action);
+  action->operation = TEXTCONV_REPLACE_TEXT;
+  action->data = list4 (make_fixnum (start), make_fixnum (end),
+                       text, make_fixnum (position));
+  action->next = NULL;
+  action->counter = counter;
+  for (last = &f->conversion.actions; *last; last = &(*last)->next)
+    ;;
+  *last = action;
+  input_pending = true;
+}
+
 /* Return N characters of text around point in frame F's old selected
    window.
 
diff --git a/src/textconv.h b/src/textconv.h
index feac5b805af..c677c07e9aa 100644
--- a/src/textconv.h
+++ b/src/textconv.h
@@ -142,6 +142,9 @@ extern void delete_surrounding_text (struct frame *, 
ptrdiff_t,
                                     ptrdiff_t, unsigned long);
 extern void request_point_update (struct frame *, unsigned long);
 extern void textconv_barrier (struct frame *, unsigned long);
+extern void replace_text (struct frame *, ptrdiff_t, ptrdiff_t,
+                         Lisp_Object, ptrdiff_t, unsigned long);
+
 extern char *get_extracted_text (struct frame *, ptrdiff_t, ptrdiff_t *,
                                 ptrdiff_t *, ptrdiff_t *, ptrdiff_t *,
                                 ptrdiff_t *, bool *);
diff --git a/src/xdisp.c b/src/xdisp.c
index f1980c4f20c..b9009df5df9 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -35544,12 +35544,10 @@ note_mouse_highlight (struct frame *f, int x, int y)
     {
       note_tab_bar_highlight (f, x, y);
       if (tab_bar__dragging_in_progress)
-       {
          cursor = FRAME_OUTPUT_DATA (f)->hand_cursor;
-         goto set_cursor;
-       }
       else
-       return;
+       cursor = FRAME_OUTPUT_DATA (f)->nontext_cursor;
+      goto set_cursor;
     }
   else
     {
@@ -35567,7 +35565,8 @@ note_mouse_highlight (struct frame *f, int x, int y)
   if (EQ (window, f->tool_bar_window))
     {
       note_tool_bar_highlight (f, x, y);
-      return;
+      cursor = FRAME_OUTPUT_DATA (f)->nontext_cursor;
+      goto set_cursor;
     }
 #endif
 
@@ -37046,14 +37045,15 @@ See also `overlay-arrow-string'.  */);
   Voverlay_arrow_position = Qnil;
 
   DEFVAR_LISP ("overlay-arrow-string", Voverlay_arrow_string,
-    doc: /* String to display as an arrow in non-window frames.
+    doc: /* String to display as an arrow in text-mode frames.
 See also `overlay-arrow-position'.  */);
   Voverlay_arrow_string = build_pure_c_string ("=>");
 
   DEFVAR_LISP ("overlay-arrow-variable-list", Voverlay_arrow_variable_list,
     doc: /* List of variables (symbols) which hold markers for overlay arrows.
 The symbols on this list are examined during redisplay to determine
-where to display overlay arrows.  */);
+where to display overlay arrows.
+See also `overlay-arrow-string'.  */);
   Voverlay_arrow_variable_list
     = list1 (intern_c_string ("overlay-arrow-position"));
 
diff --git a/src/xterm.c b/src/xterm.c
index 517bdf57aab..5d491e63778 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -11820,7 +11820,9 @@ x_frame_highlight (struct frame *f)
   x_stop_ignoring_errors (dpyinfo);
   unblock_input ();
   gui_update_cursor (f, true);
-  x_set_frame_alpha (f);
+
+  if (!FRAME_X_OUTPUT (f)->alpha_identical_p)
+    x_set_frame_alpha (f);
 }
 
 static void
@@ -11844,7 +11846,15 @@ x_frame_unhighlight (struct frame *f)
   unblock_input ();
 
   gui_update_cursor (f, true);
-  x_set_frame_alpha (f);
+
+  /* Eschew modifying the frame alpha when the alpha values for
+     focused and background frames are identical; otherwise, this will
+     upset the order in which changes to the alpha property
+     immediately subsequent to a focus change are propagated into a
+     frame's alpha property.  (bug#66398) */
+
+  if (!FRAME_X_OUTPUT (f)->alpha_identical_p)
+    x_set_frame_alpha (f);
 }
 
 /* The focus has changed.  Update the frames as necessary to reflect
diff --git a/test/lisp/align-resources/lua-ts-mode.erts 
b/test/lisp/align-resources/lua-ts-mode.erts
new file mode 100644
index 00000000000..b0473ad6cdf
--- /dev/null
+++ b/test/lisp/align-resources/lua-ts-mode.erts
@@ -0,0 +1,67 @@
+Name: align assignments
+
+=-=
+local first=1
+local s <const> =2
+local last=3
+=-=
+local first     = 1
+local s <const> = 2
+local last      = 3
+=-=-=
+
+Name: align fields
+
+=-=
+local Table={
+first=1,
+second=2,
+last=3,
+}
+=-=
+local Table = {
+    first   = 1,
+    second  = 2,
+    last    = 3,
+}
+=-=-=
+
+Name: align comments
+
+=-=
+local first-- 1
+local second -- 2
+local last      -- 3
+=-=
+local first         -- 1
+local second        -- 2
+local last          -- 3
+=-=-=
+
+Name: align assignments and comments
+
+=-=
+local first=1-- one
+local second=2 -- two
+local last=3    -- three
+=-=
+local first  = 1    -- one
+local second = 2    -- two
+local last   = 3    -- three
+=-=-=
+
+Name: align fields and comments
+
+=-=
+local T={
+first=1,--one
+second=2, --two
+last=3,         --three
+}
+=-=
+local T    = {
+    first  = 1,     --one
+    second = 2,     --two
+    last   = 3,     --three
+}
+=-=-=
diff --git a/test/lisp/align-tests.el b/test/lisp/align-tests.el
index a4d9303827f..f8dd7dcfb9b 100644
--- a/test/lisp/align-tests.el
+++ b/test/lisp/align-tests.el
@@ -49,6 +49,15 @@
   (ert-test-erts-file (ert-resource-file "latex-mode.erts")
                       (test-align-transform-fun #'latex-mode)))
 
+(autoload 'treesit-ready-p "treesit")
+
+(ert-deftest align-lua ()
+  (skip-unless (treesit-ready-p 'lua))
+  (let ((comment-column 20)
+        (indent-tabs-mode nil))
+    (ert-test-erts-file (ert-resource-file "lua-ts-mode.erts")
+                        (test-align-transform-fun #'lua-ts-mode))))
+
 (ert-deftest align-python ()
   (ert-test-erts-file (ert-resource-file "python-mode.erts")
                       (test-align-transform-fun #'python-mode)))
diff --git a/test/lisp/emacs-lisp/bytecomp-resources/no-byte-compile.el 
b/test/lisp/emacs-lisp/bytecomp-resources/no-byte-compile.el
index 00ad1947507..1de5cf66b66 100644
--- a/test/lisp/emacs-lisp/bytecomp-resources/no-byte-compile.el
+++ b/test/lisp/emacs-lisp/bytecomp-resources/no-byte-compile.el
@@ -1 +1 @@
-;; -*- no-byte-compile: t; -*-
+;; -*- no-byte-compile: t; lexical-binding: t; -*-
diff --git a/test/lisp/emacs-lisp/bytecomp-tests.el 
b/test/lisp/emacs-lisp/bytecomp-tests.el
index 8469313bd24..ed813802776 100644
--- a/test/lisp/emacs-lisp/bytecomp-tests.el
+++ b/test/lisp/emacs-lisp/bytecomp-tests.el
@@ -1302,6 +1302,30 @@ byte-compiled.  Run with dynamic binding."
        (let ((elc (concat ,file-name-var ".elc")))
          (if (file-exists-p elc) (delete-file elc))))))
 
+(defun bytecomp-tests--log-from-compilation (source)
+  "Compile the string SOURCE and return the compilation log output."
+  (let ((text-quoting-style 'grave)
+        (byte-compile-log-buffer (generate-new-buffer " *Compile-Log*")))
+    (with-current-buffer byte-compile-log-buffer
+      (let ((inhibit-read-only t)) (erase-buffer)))
+    (bytecomp-tests--with-temp-file el-file
+      (write-region source nil el-file)
+      (byte-compile-file el-file))
+    (with-current-buffer byte-compile-log-buffer
+      (buffer-string))))
+
+(ert-deftest bytecomp-tests--lexical-binding-cookie ()
+  (cl-flet ((cookie-warning (source)
+              (string-search
+               "file has no `lexical-binding' directive on its first line"
+               (bytecomp-tests--log-from-compilation source))))
+    (let ((some-code "(defun my-fun () 12)\n"))
+      (should-not (cookie-warning
+                   (concat ";;; -*-lexical-binding:t-*-\n" some-code)))
+      (should-not (cookie-warning
+                   (concat ";;; -*-lexical-binding:nil-*-\n" some-code)))
+      (should (cookie-warning some-code)))))
+
 (ert-deftest bytecomp-tests--unescaped-char-literals ()
   "Check that byte compiling warns about unescaped character
 literals (Bug#20852)."
@@ -1310,7 +1334,9 @@ literals (Bug#20852)."
         (byte-compile-debug t)
         (text-quoting-style 'grave))
     (bytecomp-tests--with-temp-file source
-      (write-region "(list ?) ?( ?; ?\" ?[ ?])" nil source)
+      (write-region (concat ";;; -*-lexical-binding:t-*-\n"
+                            "(list ?) ?( ?; ?\" ?[ ?])")
+                    nil source)
       (bytecomp-tests--with-temp-file destination
         (let* ((byte-compile-dest-file-function (lambda (_) destination))
                (err (should-error (byte-compile-file source))))
@@ -1322,7 +1348,9 @@ literals (Bug#20852)."
                                     "`?\\]' expected!")))))))
     ;; But don't warn in subsequent compilations (Bug#36068).
     (bytecomp-tests--with-temp-file source
-      (write-region "(list 1 2 3)" nil source)
+      (write-region (concat ";;; -*-lexical-binding:t-*-\n"
+                            "(list 1 2 3)")
+                    nil source)
       (bytecomp-tests--with-temp-file destination
         (let ((byte-compile-dest-file-function (lambda (_) destination)))
           (should (byte-compile-file source)))))))
@@ -1330,6 +1358,7 @@ literals (Bug#20852)."
 (ert-deftest bytecomp-tests-function-put ()
   "Check `function-put' operates during compilation."
   (bytecomp-tests--with-temp-file source
+    (insert  ";;; -*-lexical-binding:t-*-\n")
     (dolist (form '((function-put 'bytecomp-tests--foo 'foo 1)
                     (function-put 'bytecomp-tests--foo 'bar 2)
                     (defmacro bytecomp-tests--foobar ()
@@ -1636,7 +1665,8 @@ writable (Bug#44631)."
            (byte-compile-error-on-warn t))
       (unwind-protect
           (progn
-            (write-region "" nil input-file nil nil nil 'excl)
+            (write-region ";;; -*-lexical-binding:t-*-\n"
+                          nil input-file nil nil nil 'excl)
             (write-region "" nil output-file nil nil nil 'excl)
             (set-file-modes input-file #o400)
             (set-file-modes output-file #o200)
@@ -1700,7 +1730,8 @@ mountpoint (Bug#44631)."
     (let* ((default-directory directory)
            (byte-compile-dest-file-function (lambda (_) "test.elc"))
            (byte-compile-error-on-warn t))
-      (write-region "" nil "test.el" nil nil nil 'excl)
+      (write-region  ";;; -*-lexical-binding:t-*-\n"
+                     nil "test.el" nil nil nil 'excl)
       (should (byte-compile-file "test.el"))
       (should (file-regular-p "test.elc"))
       (should (cl-plusp (file-attribute-size
diff --git a/test/lisp/emacs-lisp/comp-cstr-tests.el 
b/test/lisp/emacs-lisp/comp-cstr-tests.el
index 78d9bb49b98..d2f552af6fa 100644
--- a/test/lisp/emacs-lisp/comp-cstr-tests.el
+++ b/test/lisp/emacs-lisp/comp-cstr-tests.el
@@ -191,7 +191,7 @@
       ;; 74
       ((and boolean (or number marker)) . nil)
       ;; 75
-      ((and atom (or number marker)) . (or marker number))
+      ((and atom (or number marker)) . number-or-marker)
       ;; 76
       ((and symbol (or number marker)) . nil)
       ;; 77
@@ -217,7 +217,16 @@
       ;; 87
       ((and (or null integer) (not (or null integer))) . nil)
       ;; 88
-      ((and (or (member a b c)) (not (or (member a b)))) . (member c)))
+      ((and (or (member a b c)) (not (or (member a b)))) . (member c))
+      ;; 89
+      ((or cons symbol) . list)
+      ;; 90
+      ((or string char-table bool-vector vector) . array)
+      ;; 91
+      ((or string char-table bool-vector vector number) . (or array number))
+      ;; 92
+      ((or string char-table bool-vector vector cons symbol number) .
+       (or number sequence)))
     "Alist type specifier -> expected type specifier."))
 
 (defmacro comp-cstr-synthesize-tests ()
diff --git a/test/lisp/erc/erc-fill-tests.el b/test/lisp/erc/erc-fill-tests.el
index b81d0c15558..80f5fd22ac6 100644
--- a/test/lisp/erc/erc-fill-tests.el
+++ b/test/lisp/erc/erc-fill-tests.el
@@ -31,10 +31,14 @@
 
 (defun erc-fill-tests--insert-privmsg (speaker &rest msg-parts)
   (declare (indent 1))
-  (let ((msg (erc-format-privmessage speaker
-                                     (apply #'concat msg-parts) nil t)))
-    (put-text-property 0 (length msg) 'erc-command 'PRIVMSG msg)
-    (erc-display-message nil nil (current-buffer) msg)))
+  (let* ((msg (erc-format-privmessage speaker
+                                      (apply #'concat msg-parts) nil t))
+         ;; (erc--msg-prop-overrides '((erc-msg . msg) (erc-cmd . PRIVMSG)))
+         (parsed (make-erc-response :unparsed msg :sender speaker
+                                    :command "PRIVMSG"
+                                    :command-args (list "#chan" msg)
+                                    :contents msg)))
+    (erc-display-message parsed nil (current-buffer) msg)))
 
 (defun erc-fill-tests--wrap-populate (test)
   (let ((original-window-buffer (window-buffer (selected-window)))
@@ -75,8 +79,8 @@
 
           (erc-fill-tests--insert-privmsg "alice"
             "bob: come, you are a tedious fool: to the purpose. "
-            "What was done to Elbow's wife, that he hath cause to complain of? 
"
-            "Come me to what was done to her.")
+            "What was done to Elbow's wife, that he hath cause to complain of?"
+            " Come me to what was done to her.")
 
           ;; Introduce an artificial gap in properties `line-prefix' and
           ;; `wrap-prefix' and later ensure they're not incremented twice.
@@ -111,6 +115,14 @@
       (should (get-text-property (pos-bol) 'line-prefix))
       (should (get-text-property (1- (pos-eol)) 'line-prefix))
       (should-not (get-text-property (pos-eol) 'line-prefix))
+      ;; Spans entire line uninterrupted.
+      (let* ((val (get-text-property (pos-bol) 'line-prefix))
+             (end (text-property-not-all (pos-bol) (point-max)
+                                         'line-prefix val)))
+        (when (and (/= end (pos-eol)) (= ?? (char-before end)))
+          (setq end (text-property-not-all (1+ end) (point-max)
+                                           'line-prefix val)))
+        (should (eq end (pos-eol))))
       (should (equal (get-text-property (pos-bol) 'wrap-prefix)
                      '(space :width erc-fill--wrap-value)))
       (should-not (get-text-property (pos-eol) 'wrap-prefix))
@@ -145,7 +157,7 @@
                                (number-to-string erc-fill--wrap-value)
                                (prin1-to-string got))))
     (with-current-buffer (generate-new-buffer name)
-      (push name erc-fill-tests--buffers)
+      (push (current-buffer) erc-fill-tests--buffers)
       (with-silent-modifications
         (insert (setq got (read repr))))
       (erc-mode))
@@ -153,15 +165,31 @@
         (with-temp-file expect-file
           (insert repr))
       (if (file-exists-p expect-file)
-          ;; Compare set-equal over intervals.  This comparison is
-          ;; less useful for messages treated by other modules because
-          ;; it doesn't compare "nested" props belonging to
-          ;; string-valued properties, like timestamps.
-          (should (equal-including-properties
-                   (read repr)
-                   (read (with-temp-buffer
-                           (insert-file-contents-literally expect-file)
-                           (buffer-string)))))
+          ;; Ensure string-valued properties, like timestamps, aren't
+          ;; recursive (signals `max-lisp-eval-depth' exceeded).
+          (named-let assert-equal
+              ((latest (read repr))
+               (expect (read (with-temp-buffer
+                               (insert-file-contents-literally expect-file)
+                               (buffer-string)))))
+            (pcase latest
+              ((or "" 'nil) t)
+              ((pred stringp)
+               (should (equal-including-properties latest expect))
+               (let ((latest-intervals (object-intervals latest))
+                     (expect-intervals (object-intervals expect)))
+                 (while-let ((l-iv (pop latest-intervals))
+                             (x-iv (pop expect-intervals))
+                             (l-tab (map-into (nth 2 l-iv) 'hash-table))
+                             (x-tab (map-into (nth 2 x-iv) 'hash-table)))
+                   (pcase-dolist (`(,l-k . ,l-v) (map-pairs l-tab))
+                     (assert-equal l-v (gethash l-k x-tab))
+                     (remhash l-k x-tab))
+                   (should (zerop (hash-table-count x-tab))))))
+              ((pred sequencep)
+               (assert-equal (seq-first latest) (seq-first expect))
+               (assert-equal (seq-rest latest) (seq-rest expect)))
+              (_ (should (equal latest expect)))))
         (message "Snapshot file missing: %S" expect-file)))))
 
 ;; To inspect variable pitch, set `erc-mode-hook' to
@@ -175,36 +203,46 @@
   (unless (>= emacs-major-version 29)
     (ert-skip "Emacs version too low, missing `buffer-text-pixel-size'"))
 
-  (erc-fill-tests--wrap-populate
-
-   (lambda ()
-     (should (= erc-fill--wrap-value 27))
-     (erc-fill-tests--wrap-check-prefixes "*** " "<alice> " "<bob> ")
-     (erc-fill-tests--compare "monospace-01-start")
-
-     (ert-info ("Shift right by one (plus)")
-       ;; Args are all `erc-fill-wrap-nudge' +1 because interactive "p"
-       (ert-with-message-capture messages
-         ;; M-x erc-fill-wrap-nudge RET =
-         (ert-simulate-command '(erc-fill-wrap-nudge 2))
-         (should (string-match (rx "for further adjustment") messages)))
-       (should (= erc-fill--wrap-value 29))
-       (erc-fill-tests--wrap-check-prefixes "*** " "<alice> " "<bob> ")
-       (erc-fill-tests--compare "monospace-02-right"))
-
-     (ert-info ("Shift left by five")
-       ;; "M-x erc-fill-wrap-nudge RET -----"
-       (ert-simulate-command '(erc-fill-wrap-nudge -4))
-       (should (= erc-fill--wrap-value 25))
-       (erc-fill-tests--wrap-check-prefixes "*** " "<alice> " "<bob> ")
-       (erc-fill-tests--compare "monospace-03-left"))
+  (let ((erc-prompt (lambda () "ABC>")))
+    (erc-fill-tests--wrap-populate
 
-     (ert-info ("Reset")
-       ;; M-x erc-fill-wrap-nudge RET 0
-       (ert-simulate-command '(erc-fill-wrap-nudge 0))
+     (lambda ()
        (should (= erc-fill--wrap-value 27))
        (erc-fill-tests--wrap-check-prefixes "*** " "<alice> " "<bob> ")
-       (erc-fill-tests--compare "monospace-04-reset")))))
+       (erc-fill-tests--compare "monospace-01-start")
+
+       (ert-info ("Shift right by one (plus)")
+         ;; Args are all `erc-fill-wrap-nudge' +1 because interactive "p"
+         (ert-with-message-capture messages
+           ;; M-x erc-fill-wrap-nudge RET =
+           (ert-simulate-command '(erc-fill-wrap-nudge 2))
+           (should (string-match (rx "for further adjustment") messages)))
+         (should (= erc-fill--wrap-value 29))
+         (erc-fill-tests--wrap-check-prefixes "*** " "<alice> " "<bob> ")
+         (erc-fill-tests--compare "monospace-02-right"))
+
+       (ert-info ("Shift left by five")
+         ;; "M-x erc-fill-wrap-nudge RET -----"
+         (ert-simulate-command '(erc-fill-wrap-nudge -4))
+         (should (= erc-fill--wrap-value 25))
+         (erc-fill-tests--wrap-check-prefixes "*** " "<alice> " "<bob> ")
+         (erc-fill-tests--compare "monospace-03-left"))
+
+       (ert-info ("Reset")
+         ;; M-x erc-fill-wrap-nudge RET 0
+         (ert-simulate-command '(erc-fill-wrap-nudge 0))
+         (should (= erc-fill--wrap-value 27))
+         (erc-fill-tests--wrap-check-prefixes "*** " "<alice> " "<bob> ")
+         (erc-fill-tests--compare "monospace-04-reset"))
+
+       (erc--assert-input-bounds)))))
+
+(defun erc-fill-tests--simulate-refill ()
+  ;; Simulate `erc-fill-wrap-refill-buffer' synchronously and without
+  ;; a progress reporter.
+  (save-excursion
+    (with-silent-modifications
+      (erc-fill--wrap-rejigger-region (point-min) erc-insert-marker nil nil))))
 
 (ert-deftest erc-fill-wrap--merge ()
   :tags '(:unstable)
@@ -217,7 +255,9 @@
      (erc-update-channel-member
       "#chan" "Dummy" "Dummy" t nil nil nil nil nil "fake" "~u" nil nil t)
 
-     ;; Set this here so that the first few messages are from 1970
+     ;; Set this here so that the first few messages are from 1970.
+     ;; Following the current date stamp, the speaker isn't merged
+     ;; even though it's continued: "<bob> zero."
      (let ((erc-fill-tests--time-vals (lambda () 1680332400)))
        (erc-fill-tests--insert-privmsg "bob" "zero.")
        (erc-fill-tests--insert-privmsg "alice" "one.")
@@ -239,7 +279,12 @@
        (erc-fill-tests--wrap-check-prefixes
         "*** " "<alice> " "<bob> "
         "<bob> " "<alice> " "<alice> " "<bob> " "<bob> " "<Dummy> " "<Dummy> ")
-       (erc-fill-tests--compare "merge-02-right")))))
+       (erc-fill-tests--compare "merge-02-right")
+
+       (ert-info ("Command `erc-fill-wrap-refill-buffer' is idempotent")
+         (kill-buffer (pop erc-fill-tests--buffers))
+         (erc-fill-tests--simulate-refill) ; idempotent
+         (erc-fill-tests--compare "merge-02-right"))))))
 
 (ert-deftest erc-fill-wrap--merge-action ()
   :tags '(:unstable)
diff --git a/test/lisp/erc/erc-networks-tests.el 
b/test/lisp/erc/erc-networks-tests.el
index e95d99c128f..d0f1dddf6b3 100644
--- a/test/lisp/erc/erc-networks-tests.el
+++ b/test/lisp/erc/erc-networks-tests.el
@@ -623,11 +623,6 @@
                                :symbol 'foonet/dummy
                                :parts [foonet "dummy"]
                                :len 2)
-             ;; `erc-kill-buffer-function' uses legacy target detection
-             ;; but falls back on buffer name, so no need for:
-             ;;
-             ;;   erc-default-recipients '("#a")
-             ;;
              erc--target (erc--target-from-string "#a")
              erc-server-process (with-temp-buffer
                                   (erc-networks-tests--create-dead-proc)))
@@ -1206,7 +1201,7 @@
           calls)
       (erc-mode)
 
-      (cl-letf (((symbol-function 'erc-display-line)
+      (cl-letf (((symbol-function 'erc--route-insertion)
                  (lambda (&rest r) (push r calls))))
 
         (ert-info ("Signals when `erc-server-announced-name' unset")
diff --git a/test/lisp/erc/erc-scenarios-base-reuse-buffers.el 
b/test/lisp/erc/erc-scenarios-base-reuse-buffers.el
index 71027a0c138..af483bb1a52 100644
--- a/test/lisp/erc/erc-scenarios-base-reuse-buffers.el
+++ b/test/lisp/erc/erc-scenarios-base-reuse-buffers.el
@@ -124,6 +124,7 @@ Adapted from scenario clash-of-chans/uniquify described in 
Bug#48598:
         (erc-d-t-search-for 1 "shake my sword")
         (erc-cmd-PART "#chan")
         (funcall expect 3 "You have left channel #chan")
+        (should-not (erc-get-channel-user (erc-current-nick)))
         (erc-cmd-JOIN "#chan")))
 
     (ert-info ("Part #chan@barnet")
@@ -139,6 +140,7 @@ Adapted from scenario clash-of-chans/uniquify described in 
Bug#48598:
       (get-buffer "#chan/127.0.0.1<3>"))
 
     (ert-info ("Activity continues in new, <n>-suffixed #chan@foonet buffer")
+      ;; The first /JOIN did not cause the same buffer to be reused.
       (with-current-buffer "#chan/127.0.0.1"
         (should-not (erc-get-channel-user (erc-current-nick))))
       (with-current-buffer "#chan/127.0.0.1<3>"
diff --git a/test/lisp/erc/erc-scenarios-display-message.el 
b/test/lisp/erc/erc-scenarios-display-message.el
new file mode 100644
index 00000000000..51bdf305ad5
--- /dev/null
+++ b/test/lisp/erc/erc-scenarios-display-message.el
@@ -0,0 +1,64 @@
+;;; erc-scenarios-display-message.el --- erc-display-message -*- 
lexical-binding: t -*-
+
+;; Copyright (C) 2023 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 <https://www.gnu.org/licenses/>.
+
+;;; Code:
+
+(require 'ert-x)
+(eval-and-compile
+  (let ((load-path (cons (ert-resource-directory) load-path)))
+    (require 'erc-scenarios-common)))
+
+(ert-deftest erc-scenarios-display-message--multibuf ()
+  :tags '(:expensive-test)
+  (erc-scenarios-common-with-cleanup
+      ((erc-scenarios-common-dialog "base/display-message")
+       (dumb-server (erc-d-run "localhost" t 'multibuf))
+       (port (process-contact dumb-server :service))
+       (erc-server-flood-penalty 0.1)
+       (erc-modules (cons 'fill-wrap erc-modules))
+       (erc-autojoin-channels-alist '((foonet "#chan")))
+       (expect (erc-d-t-make-expecter)))
+
+    (ert-info ("Connect to foonet")
+      (with-current-buffer (erc :server "127.0.0.1"
+                                :port port
+                                :nick "tester"
+                                :full-name "tester")
+        (funcall expect 10 "debug mode")))
+
+    (ert-info ("User dummy is a member of #chan")
+      (with-current-buffer (erc-d-t-wait-for 5 (get-buffer "#chan"))
+        (funcall expect 10 "dummy")))
+
+    (ert-info ("Dummy's QUIT notice in query contains metadata props")
+      (with-current-buffer (erc-d-t-wait-for 5 (get-buffer "dummy"))
+        (funcall expect 10 "<dummy> hi")
+        (funcall expect 10 "*** dummy (~u@rdjcgiwfuwqmc.irc) has quit")
+        (should (eq 'QUIT (get-text-property (match-beginning 0) 'erc-msg)))))
+
+    (ert-info ("Dummy's QUIT notice in #chan contains metadata props")
+      (with-current-buffer (erc-d-t-wait-for 5 (get-buffer "#chan"))
+        (funcall expect 10 "*** dummy (~u@rdjcgiwfuwqmc.irc) has quit")
+        (should (eq 'QUIT (get-text-property (match-beginning 0) 'erc-msg)))))
+
+    (erc-cmd-QUIT "")))
+
+(eval-when-compile (require 'erc-join))
+
+;;; erc-scenarios-display-message.el ends here
diff --git a/test/lisp/erc/erc-scenarios-log.el 
b/test/lisp/erc/erc-scenarios-log.el
index fd030d90c2f..cd28ea54b2e 100644
--- a/test/lisp/erc/erc-scenarios-log.el
+++ b/test/lisp/erc/erc-scenarios-log.el
@@ -81,6 +81,7 @@
 
 (ert-deftest erc-scenarios-log--clear-stamp ()
   :tags '(:expensive-test)
+  (require 'erc-stamp)
   (erc-scenarios-common-with-cleanup
       ((erc-scenarios-common-dialog "base/assoc/bouncer-history")
        (dumb-server (erc-d-run "localhost" t 'foonet))
@@ -148,7 +149,7 @@
     (when noninteractive (delete-directory tempdir :recursive))))
 
 (ert-deftest erc-scenarios-log--truncate ()
-  :tags '(:expensive-test)
+  :tags '(:expensive-test :unstable)
   (erc-scenarios-common-with-cleanup
       ((erc-scenarios-common-dialog "base/assoc/bouncer-history")
        (dumb-server (erc-d-run "localhost" t 'foonet))
diff --git a/test/lisp/erc/erc-scenarios-match.el 
b/test/lisp/erc/erc-scenarios-match.el
index cd899fddb98..17f7649566e 100644
--- a/test/lisp/erc/erc-scenarios-match.el
+++ b/test/lisp/erc/erc-scenarios-match.el
@@ -55,7 +55,8 @@
                                 :nick "tester")
         ;; Module `timestamp' follows `match' in insertion hooks.
         (should (memq 'erc-add-timestamp
-                      (memq 'erc-match-message erc-insert-modify-hook)))
+                      (memq 'erc-match-message
+                            (default-value 'erc-insert-modify-hook))))
         ;; The "match type" is `current-nick'.
         (funcall expect 5 "tester")
         (should (eq (get-text-property (1- (point)) 'font-lock-face)
@@ -91,7 +92,8 @@
                                 :nick "tester")
         ;; Module `timestamp' follows `match' in insertion hooks.
         (should (memq 'erc-add-timestamp
-                      (memq 'erc-match-message erc-insert-modify-hook)))
+                      (memq 'erc-match-message
+                            (default-value 'erc-insert-modify-hook))))
         (funcall expect 5 "This server is in debug mode")))
 
     (ert-info ("Ensure lines featuring \"bob\" are invisible")
@@ -132,7 +134,7 @@
 
        ;; Leading stamp has combined `invisible' property value.
        (should (equal (get-text-property (pos-bol) 'invisible)
-                      '(timestamp match-fools)))
+                      '(match-fools timestamp)))
 
        ;; Message proper has the `invisible' property `match-fools'.
        (let ((msg-beg (next-single-property-change (pos-bol) 'invisible)))
@@ -151,29 +153,13 @@
           (= (next-single-property-change msg-beg 'invisible nil (pos-eol))
              (pos-eol))))))))
 
-(defun erc-scenarios-match--find-bol ()
-  (save-excursion
-    (should (get-text-property (1- (point)) 'erc-command))
-    (goto-char (should (previous-single-property-change (point) 'erc-command)))
-    (pos-bol)))
-
-(defun erc-scenarios-match--find-eol ()
-  (save-excursion
-    (if-let ((next (next-single-property-change (point) 'erc-command)))
-        (goto-char next)
-      ;; We're already at the end of the message.
-      (should (get-text-property (1- (point)) 'erc-command)))
-    (pos-eol)))
-
 ;; In most cases, `erc-hide-fools' makes line endings invisible.
 (defun erc-scenarios-match--stamp-right-fools-invisible ()
-  :tags '(:expensive-test)
   (let ((erc-insert-timestamp-function #'erc-insert-timestamp-right))
     (erc-scenarios-match--invisible-stamp
 
      (lambda ()
-       (let ((beg (erc-scenarios-match--find-bol))
-             (end (erc-scenarios-match--find-eol)))
+       (pcase-let ((`(,beg . ,end) (erc--get-inserted-msg-bounds)))
          ;; The end of the message is a newline.
          (should (= ?\n (char-after end)))
 
@@ -182,7 +168,7 @@
 
          ;; Stamps have a combined `invisible' property value.
          (should (equal (get-text-property (1- end) 'invisible)
-                        '(timestamp match-fools)))
+                        '(match-fools timestamp)))
 
          ;; The final newline is hidden by `match', not `stamps'
          (with-suppressed-warnings ((obsolete erc-legacy-invisible-bounds-p))
@@ -198,14 +184,14 @@
          ;; It ends just before the timestamp.
          (let ((msg-end (next-single-property-change (pos-bol) 'invisible)))
            (should (equal (get-text-property msg-end 'invisible)
-                          '(timestamp match-fools)))
+                          '(match-fools timestamp)))
 
            ;; Stamp's `invisible' property extends throughout the stamp
            ;; and ends before the trailing newline.
            (should (= (next-single-property-change msg-end 'invisible) end)))))
 
      (lambda ()
-       (let ((end (erc-scenarios-match--find-eol)))
+       (let ((end (erc--get-inserted-msg-bounds 'end)))
          ;; This message has a time stamp like all the others.
          (should (eq (field-at-pos (1- end)) 'erc-timestamp))
 
@@ -244,7 +230,7 @@
 
        ;; Stamps have a combined `invisible' property value.
        (should (equal (get-text-property (1- (pos-eol)) 'invisible)
-                      '(timestamp match-fools)))
+                      '(match-fools timestamp)))
 
        ;; The message proper has the `invisible' property `match-fools',
        ;; which starts at the preceding newline...
@@ -253,7 +239,7 @@
        ;; ... and ends just before the timestamp.
        (let ((msgend (next-single-property-change (1- (pos-bol)) 'invisible)))
          (should (equal (get-text-property msgend 'invisible)
-                        '(timestamp match-fools)))
+                        '(match-fools timestamp)))
 
          ;; The newline before `erc-insert-marker' is still visible.
          (should-not (get-text-property (pos-eol) 'invisible))
@@ -271,7 +257,172 @@
        (let ((inv-beg (next-single-property-change (1- (pos-bol)) 'invisible)))
          (should (eq (get-text-property inv-beg 'invisible) 'timestamp)))))))
 
-(defun erc-scenarios-match--stamp-both-invisible-fill-static ()
+(defun erc-scenarios-match--fill-wrap-stamp-dedented-p (point)
+  (pcase (get-text-property point 'line-prefix)
+    (`(space :width (- erc-fill--wrap-value (,n)))
+     (if (display-graphic-p) (< 100 n 200) (< 10 n 30)))
+    (`(space :width (- erc-fill--wrap-value ,n))
+     (< 10 n 30))))
+
+(ert-deftest erc-scenarios-match--hide-fools/stamp-both/fill-wrap ()
+
+  ;; Rewind the clock to known date artificially.  We should probably
+  ;; use a ticks/hz cons on 29+.
+  (let ((erc-stamp--current-time 704591940)
+        (erc-stamp--tz t)
+        (erc-fill-function #'erc-fill-wrap)
+        (bob-utterance-counter 0))
+
+    (erc-scenarios-match--invisible-stamp
+
+     (lambda ()
+       (ert-info ("Baseline check")
+         ;; False date printed initially before anyone speaks.
+         (when (zerop bob-utterance-counter)
+           (save-excursion
+             (goto-char (point-min))
+             (search-forward "[Wed Apr 29 1992]")
+             ;; First stamp in a buffer is not invisible from previous
+             ;; newline (before stamp's own leading newline).
+             (should (= 4 (match-beginning 0)))
+             (should (get-text-property 3 'invisible))
+             (should-not (get-text-property 2 'invisible))
+             (should (erc-scenarios-match--fill-wrap-stamp-dedented-p 4))
+             (search-forward "[23:59]"))))
+
+       (ert-info ("Line endings in Bob's messages are invisible")
+         ;; The message proper has the `invisible' property `match-fools'.
+         (should (eq (get-text-property (pos-bol) 'invisible) 'match-fools))
+         (pcase-let ((`(,mbeg . ,mend) (erc--get-inserted-msg-bounds)))
+           (should (= (char-after mend) ?\n))
+           (should-not (field-at-pos mend))
+           (should-not (field-at-pos mbeg))
+
+           (when (= bob-utterance-counter 1)
+             (let ((right-stamp (field-end mbeg)))
+               (should (eq 'erc-timestamp (field-at-pos right-stamp)))
+               (should (= mend (field-end right-stamp)))
+               (should (eq (field-at-pos (1- mend)) 'erc-timestamp))))
+
+           ;; The `erc-ts' property is present in prop stack.
+           (should (get-text-property (pos-bol) 'erc-ts))
+           (should-not (next-single-property-change (1+ (pos-bol)) 'erc-ts))
+
+           ;; Line ending has the `invisible' property `match-fools'.
+           (should (eq (get-text-property mbeg 'invisible) 'match-fools))
+           (should-not (get-text-property mend 'invisible))))
+
+       ;; Only the message right after Alice speaks contains stamps.
+       (when (= 1 bob-utterance-counter)
+
+         (ert-info ("Date stamp occupying previous line is invisible")
+           (should (eq 'match-fools (get-text-property (point) 'invisible)))
+           (save-excursion
+             (forward-line -1)
+             (goto-char (pos-bol))
+             (should (looking-at (rx "[Mon May  4 1992]")))
+             (ert-info ("Stamp's NL `invisible' as fool, not timestamp")
+               (let ((end (match-end 0)))
+                 (should (eq (char-after end) ?\n))
+                 (should (eq 'timestamp
+                             (get-text-property (1- end) 'invisible)))
+                 (should (eq 'match-fools
+                             (get-text-property end 'invisible)))))
+             (should (erc-scenarios-match--fill-wrap-stamp-dedented-p (point)))
+             ;; Date stamp has a combined `invisible' property value
+             ;; that starts at the previous message's trailing newline
+             ;; and extends until the start of the message proper.
+             (should (equal ?\n (char-before (point))))
+             (should (equal ?\n (char-before (1- (point)))))
+             (let ((val (get-text-property (- (point) 2) 'invisible)))
+               (should (equal val 'timestamp))
+               (should (= (text-property-not-all (- (point) 2) (point-max)
+                                                 'invisible val)
+                          (pos-eol))))))
+
+         (ert-info ("Current message's RHS stamp is hidden")
+           ;; Right stamp has `match-fools' property.
+           (save-excursion
+             (should-not (field-at-pos (point)))
+             (should (eq (field-at-pos (1- (pos-eol))) 'erc-timestamp)))
+
+           ;; Stamp invisibility starts where message's ends.
+           (let ((msgend (next-single-property-change (pos-bol) 'invisible)))
+             ;; Stamp has a combined `invisible' property value.
+             (should (equal (get-text-property msgend 'invisible)
+                            '(match-fools timestamp)))
+
+             ;; Combined `invisible' property spans entire timestamp.
+             (should (= (next-single-property-change msgend 'invisible)
+                        (pos-eol))))))
+
+       (cl-incf bob-utterance-counter))
+
+     ;; Alice.
+     (lambda ()
+       ;; Set clock ahead a week or so.
+       (setq erc-stamp--current-time 704962800)
+
+       ;; This message has no time stamp and is completely visible.
+       (should-not (eq (field-at-pos (1- (pos-eol))) 'erc-timestamp))
+       (should-not (next-single-property-change (pos-bol) 'invisible))))))
+
+;; This asserts that speaker hiding by `erc-fill-wrap-merge' doesn't
+;; take place after a series of hidden fool messages with an
+;; intervening outgoing message followed immediately by a non-fool
+;; message from the last non-hidden speaker (other than the user).
+(ert-deftest erc-scenarios-match--hide-fools/stamp-both/fill-wrap/speak ()
+
+  (erc-scenarios-common-with-cleanup
+      ((erc-scenarios-common-dialog "match/fools")
+       (erc-stamp--current-time 704591940)
+       (dumb-server (erc-d-run "localhost" t 'fill-wrap))
+       (erc-stamp--tz t)
+       (erc-fill-function #'erc-fill-wrap)
+       (port (process-contact dumb-server :service))
+       (erc-server-flood-penalty 0.1)
+       (erc-timestamp-only-if-changed-flag nil)
+       (erc-fools '("bob"))
+       (erc-text-matched-hook '(erc-hide-fools))
+       (erc-autojoin-channels-alist '((FooNet "#chan")))
+       (expect (erc-d-t-make-expecter)))
+
+    (ert-info ("Connect")
+      (with-current-buffer (erc :server "127.0.0.1"
+                                :port port
+                                :full-name "tester"
+                                :password "changeme"
+                                :nick "tester")
+        ;; Module `timestamp' follows `match' in insertion hooks.
+        (should (memq 'erc-add-timestamp
+                      (memq 'erc-match-message
+                            (default-value 'erc-insert-modify-hook))))
+        (funcall expect 5 "This server is in debug mode")))
+
+    (ert-info ("Ensure lines featuring \"bob\" are invisible")
+      (with-current-buffer (erc-d-t-wait-for 10 (get-buffer "#chan"))
+        (should (funcall expect 10 "<alice> None better than"))
+        (should (funcall expect 10 "<alice> bob: Still we went"))
+        (should (funcall expect 10 "<bob> alice: Give me your hand"))
+        (erc-scenarios-common-say "hey")
+        (should (funcall expect 10 "<bob> You have paid the heavens"))
+        (should (funcall expect 10 "<alice> bob: In the sick air"))
+        (should (funcall expect 10 "<alice> The web of our life"))
+
+        ;; Regression (see leading comment).
+        (should-not (equal "" (get-text-property (pos-bol) 'display)))
+
+        ;; No remaining meta-data positions, no more timestamps.
+        (should-not (next-single-property-change (1+ (pos-bol)) 'erc-ts))
+        ;; No remaining invisible messages.
+        (should-not (text-property-not-all (pos-bol) erc-insert-marker
+                                           'invisible nil))
+
+        (should (funcall expect 10 "ERC>"))
+        (should-not (get-text-property (pos-bol) 'invisible))
+        (should-not (get-text-property (point) 'invisible))))))
+
+(defun erc-scenarios-match--stamp-both-invisible-fill-static (assert-ds)
   (should (eq erc-insert-timestamp-function
               #'erc-insert-timestamp-left-and-right))
 
@@ -295,21 +446,20 @@
        (ert-info ("Line endings in Bob's messages are invisible")
          ;; The message proper has the `invisible' property `match-fools'.
          (should (eq (get-text-property (pos-bol) 'invisible) 'match-fools))
-         (let* ((mbeg (next-single-property-change (pos-bol) 'erc-command))
-                (mend (next-single-property-change mbeg 'erc-command)))
+         (pcase-let ((`(,mbeg . ,mend) (erc--get-inserted-msg-bounds)))
 
-           (if (/= 1 bob-utterance-counter)
-               (should-not (field-at-pos mend))
+           (should (= (char-after mend) ?\n))
+           (should-not (field-at-pos mbeg))
+           (should-not (field-at-pos mend))
+           (when (= 1 bob-utterance-counter)
              ;; For Bob's stamped message, check newline after stamp.
-             (should (eq (field-at-pos mend) 'erc-timestamp))
-             (setq mend (field-end mend)))
+             (should (eq (field-at-pos (field-end mbeg)) 'erc-timestamp))
+             (should (eq (field-at-pos (1- mend)) 'erc-timestamp)))
 
-           ;; The `erc-timestamp' property spans entire messages,
-           ;; including stamps and filled text, which makes for
-           ;; convenient traversal when `erc-stamp-mode' is enabled.
-           (should (get-text-property (pos-bol) 'erc-timestamp))
-           (should (= (next-single-property-change (pos-bol) 'erc-timestamp)
-                      mend))
+           ;; The `erc-ts' property is present in the message's
+           ;; width 1 prop collection at its first char.
+           (should (get-text-property (pos-bol) 'erc-ts))
+           (should-not (next-single-property-change (1+ (pos-bol)) 'erc-ts))
 
            ;; Line ending has the `invisible' property `match-fools'.
            (should (= (char-after mend) ?\n))
@@ -327,12 +477,8 @@
              (forward-line -1)
              (goto-char (pos-bol))
              (should (looking-at (rx "[Mon May  4 1992]")))
-             ;; Date stamp has a combined `invisible' property value
-             ;; that extends until the start of the message proper.
-             (should (equal (get-text-property (point) 'invisible)
-                            '(timestamp match-fools)))
-             (should (= (next-single-property-change (point) 'invisible)
-                        (1+ (pos-eol))))))
+             (should (= ?\n (char-after (- (point) 2)))) ; welcome!\n
+             (funcall assert-ds))) ; "assert date stamp"
 
          (ert-info ("Folding preserved despite invisibility")
            ;; Message has a trailing time stamp, but it's been folded
@@ -346,7 +492,7 @@
            (let ((msgend (next-single-property-change (pos-bol) 'invisible)))
              ;; Stamp has a combined `invisible' property value.
              (should (equal (get-text-property msgend 'invisible)
-                            '(timestamp match-fools)))
+                            '(match-fools timestamp)))
 
              ;; Combined `invisible' property spans entire timestamp.
              (should (= (next-single-property-change msgend 'invisible)
@@ -365,13 +511,45 @@
 
 (ert-deftest erc-scenarios-match--stamp-both-invisible-fill-static ()
   :tags '(:expensive-test)
-  (erc-scenarios-match--stamp-both-invisible-fill-static))
+  (erc-scenarios-match--stamp-both-invisible-fill-static
+
+   (lambda ()
+     ;; Date stamp has an `invisible' property that starts from the
+     ;; newline delimiting the current and previous messages and
+     ;; extends until the stamp's final newline.  It is not combined
+     ;; with the old value, `match-fools'.
+     (let ((delim-pos (- (point) 2)))
+       (should (equal 'timestamp (get-text-property delim-pos 'invisible)))
+       ;; Stamp-only invisibility ends before its last newline.
+       (should (= (text-property-not-all delim-pos (point-max)
+                                         'invisible 'timestamp)
+                  (match-end 0))))))) ; pos-eol
 
 (ert-deftest erc-scenarios-match--stamp-both-invisible-fill-static--nooffset ()
   :tags '(:expensive-test)
   (with-suppressed-warnings ((obsolete erc-legacy-invisible-bounds-p))
     (should-not erc-legacy-invisible-bounds-p)
+
     (let ((erc-legacy-invisible-bounds-p t))
-      (erc-scenarios-match--stamp-both-invisible-fill-static))))
+      (erc-scenarios-match--stamp-both-invisible-fill-static
+
+       (lambda ()
+         ;; Date stamp has an `invisible' property that covers its
+         ;; format string exactly.  It is not combined with the old
+         ;; value, `match-fools'.
+         (let ((delim-prev (- (point) 2)))
+           (should-not (get-text-property delim-prev 'invisible))
+           (should (eq 'erc-timestamp (field-at-pos (point))))
+           (should (= (next-single-property-change delim-prev 'invisible)
+                      (field-beginning (point))))
+           (should (equal 'timestamp
+                          (get-text-property (1- (point)) 'invisible)))
+           ;; Field stops before final newline because the date stamp
+           ;; is (now, as of ERC 5.6) its own standalone message.
+           (should (= ?\n (char-after (field-end (point)))))
+           ;; Stamp-only invisibility includes last newline.
+           (should (= (text-property-not-all (1- (point)) (point-max)
+                                             'invisible 'timestamp)
+                      (1+ (field-end (point)))))))))))
 
 ;;; erc-scenarios-match.el ends here
diff --git a/test/lisp/erc/erc-scenarios-scrolltobottom-relaxed.el 
b/test/lisp/erc/erc-scenarios-scrolltobottom-relaxed.el
index 7d256bf711b..68ea0b1b070 100644
--- a/test/lisp/erc/erc-scenarios-scrolltobottom-relaxed.el
+++ b/test/lisp/erc/erc-scenarios-scrolltobottom-relaxed.el
@@ -1,4 +1,4 @@
-;;; erc-scenarios-scrolltobottom-relaxed.el --- erc-scrolltobottom-relaxed -*- 
lexical-binding: t -*-
+;;; erc-scenarios-scrolltobottom-relaxed.el --- erc-scrolltobottom-all relaxed 
-*- lexical-binding: t -*-
 
 ;; Copyright (C) 2023 Free Software Foundation, Inc.
 
@@ -40,8 +40,7 @@
        (dumb-server (erc-d-run "localhost" t 'help))
        (port (process-contact dumb-server :service))
        (erc-modules `(scrolltobottom fill-wrap ,@erc-modules))
-       (erc-scrolltobottom-all t)
-       (erc-scrolltobottom-relaxed t)
+       (erc-scrolltobottom-all 'relaxed)
        (erc-server-flood-penalty 0.1)
        (expect (erc-d-t-make-expecter))
        lower upper)
diff --git a/test/lisp/erc/erc-scenarios-stamp.el 
b/test/lisp/erc/erc-scenarios-stamp.el
new file mode 100644
index 00000000000..d6b5d868ce5
--- /dev/null
+++ b/test/lisp/erc/erc-scenarios-stamp.el
@@ -0,0 +1,90 @@
+;;; erc-scenarios-stamp.el --- Misc `erc-stamp' scenarios -*- lexical-binding: 
t -*-
+
+;; Copyright (C) 2023 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 <https://www.gnu.org/licenses/>.
+
+;;; Code:
+
+(require 'ert-x)
+(eval-and-compile
+  (let ((load-path (cons (ert-resource-directory) load-path)))
+    (require 'erc-scenarios-common)))
+
+(require 'erc-stamp)
+
+(defvar erc-scenarios-stamp--user-marker nil)
+
+(defun erc-scenarios-stamp--on-post-modify ()
+  (when-let (((erc--check-msg-prop 'erc-cmd 4)))
+    (set-marker erc-scenarios-stamp--user-marker (point-max))
+    (ert-info ("User marker correctly placed at `erc-insert-marker'")
+      (should (= ?\n (char-before erc-scenarios-stamp--user-marker)))
+      (should (= erc-scenarios-stamp--user-marker erc-insert-marker))
+      (save-excursion
+        (goto-char erc-scenarios-stamp--user-marker)
+        ;; The raw message ends in " Iabefhkloqv".  However,
+        ;; `erc-server-004' only prints up to the 5th parameter.
+        (should (looking-back "CEIMRUabefhiklmnoqstuv\n"))))))
+
+(ert-deftest erc-scenarios-stamp--left/display-margin-mode ()
+
+  (erc-scenarios-common-with-cleanup
+      ((erc-scenarios-common-dialog "base/reconnect")
+       (dumb-server (erc-d-run "localhost" t 'unexpected-disconnect))
+       (port (process-contact dumb-server :service))
+       (erc-scenarios-stamp--user-marker (make-marker))
+       (erc-stamp--current-time 704591940)
+       (erc-stamp--tz t)
+       (erc-server-flood-penalty 0.1)
+       (erc-timestamp-only-if-changed-flag nil)
+       (erc-insert-timestamp-function #'erc-insert-timestamp-left)
+       (erc-modules (cons 'fill-wrap erc-modules))
+       (erc-timestamp-only-if-changed-flag nil)
+       (expect (erc-d-t-make-expecter)))
+
+    (ert-info ("Connect")
+      (with-current-buffer (erc :server "127.0.0.1"
+                                :port port
+                                :full-name "tester"
+                                :nick "tester")
+
+        (add-hook 'erc-insert-post-hook #'erc-scenarios-stamp--on-post-modify
+                  nil t)
+        (funcall expect 5 "This server is in debug mode")
+
+        (ert-info ("Stamps appear in left margin and are invisible")
+          (should (eq 'erc-timestamp (field-at-pos (pos-bol))))
+          (should (= (pos-bol) (field-beginning (pos-bol))))
+          (should (eq 'msg (get-text-property (pos-bol) 'erc-msg)))
+          (should (eq 'NOTICE (get-text-property (pos-bol) 'erc-cmd)))
+          (should (= ?- (char-after (field-end (pos-bol)))))
+          (should (equal (get-text-property (1+ (field-end (pos-bol)))
+                                            'erc-speaker)
+                         "irc.foonet.org"))
+          (should (pcase (get-text-property (pos-bol) 'display)
+                    (`((margin left-margin) ,s)
+                     (eq 'timestamp (get-text-property 0 'invisible s))))))
+
+        ;; We set a third-party marker at the end of 004's message (on
+        ;; then "\n"), post-insertion.
+        (ert-info ("User markers untouched by subsequent message left stamp")
+          (save-excursion
+            (goto-char erc-scenarios-stamp--user-marker)
+            (should (looking-back "CEIMRUabefhiklmnoqstuv\n"))
+            (should (looking-at (rx "[")))))))))
+
+;;; erc-scenarios-stamp.el ends here
diff --git a/test/lisp/erc/erc-stamp-tests.el b/test/lisp/erc/erc-stamp-tests.el
index 46a05729066..cc61d599387 100644
--- a/test/lisp/erc/erc-stamp-tests.el
+++ b/test/lisp/erc/erc-stamp-tests.el
@@ -279,7 +279,7 @@
 
   (should-not erc-echo-timestamps)
   (should-not erc-stamp--last-stamp)
-  (insert (propertize "abc" 'erc-timestamp 433483200))
+  (insert (propertize "a" 'erc-ts 433483200 'erc-msg 'msg) "bc")
   (goto-char (point-min))
   (let ((inhibit-message t)
         (erc-echo-timestamp-format "%Y-%m-%d %H:%M:%S %Z")
diff --git a/test/lisp/erc/erc-tests.el b/test/lisp/erc/erc-tests.el
index 8a68eca6196..57bf5860ac4 100644
--- a/test/lisp/erc/erc-tests.el
+++ b/test/lisp/erc/erc-tests.el
@@ -69,26 +69,25 @@
     (with-current-buffer (get-buffer-create "#foo")
       (erc-mode)
       (setq erc-server-process proc-exnet)
-      (setq erc-default-recipients '("#foo")))
+      (setq erc--target (erc--target-from-string "#foo")))
 
     (with-current-buffer (get-buffer-create "#spam")
       (erc-mode)
       (setq erc-server-process proc-onet)
-      (setq erc-default-recipients '("#spam")))
+      (setq erc--target (erc--target-from-string "#spam")))
 
     (with-current-buffer (get-buffer-create "#bar")
       (erc-mode)
       (setq erc-server-process proc-onet)
-      (setq erc-default-recipients '("#bar")))
+      (setq erc--target (erc--target-from-string "#bar")))
 
     (with-current-buffer (get-buffer-create "#baz")
       (erc-mode)
       (setq erc-server-process proc-exnet)
-      (setq erc-default-recipients '("#baz")))
+      (setq erc--target (erc--target-from-string "#baz")))
 
     (should (eq (get-buffer-process "ExampleNet") proc-exnet))
-    (erc-with-all-buffers-of-server (get-buffer-process "ExampleNet")
-      nil
+    (erc-with-all-buffers-of-server (get-buffer-process "ExampleNet") nil
       (kill-buffer))
 
     (should-not (get-buffer "ExampleNet"))
@@ -102,8 +101,7 @@
            (calls 0)
            (get-test (lambda () (cl-incf calls) test)))
 
-      (erc-with-all-buffers-of-server proc-onet
-        (funcall get-test)
+      (erc-with-all-buffers-of-server proc-onet (funcall get-test)
         (kill-buffer))
 
       (should (= calls 1)))
@@ -292,6 +290,8 @@
                                (cl-incf counter))))
          erc-accidental-paste-threshold-seconds
          erc-insert-modify-hook
+         (erc-modules (remq 'stamp erc-modules))
+         (erc-send-input-line-function #'ignore)
          (erc--input-review-functions erc--input-review-functions)
          erc-send-completed-hook)
 
@@ -356,7 +356,8 @@
         (should (looking-back "#chan@ServNet 11> "))
         (should (= (point) erc-input-marker))
         (insert "/query bob")
-        (erc-send-current-line)
+        (let (erc-modules)
+          (erc-send-current-line))
         ;; Last command not inserted
         (save-excursion (forward-line -1)
                         (should (looking-at "<tester> Howdy")))
@@ -796,23 +797,20 @@
       (should (erc--valid-local-channel-p "&local")))))
 
 (ert-deftest erc--restore-initialize-priors ()
-  ;; This `pcase' expands to 100+k.  Guess we could do something like
-  ;; (and `(,_ ((,e . ,_) . ,_) . ,_) v) first and then return a
-  ;; (equal `(if-let* ((,e ...)...)...) v) to cut it down to < 1k.
   (should (pcase (macroexpand-1 '(erc--restore-initialize-priors erc-my-mode
                                    foo (ignore 1 2 3)
-                                   bar #'spam))
-            (`(if-let* ((,e (or erc--server-reconnecting erc--target-priors))
-                        ((alist-get 'erc-my-mode ,e)))
-                  (setq foo (alist-get 'foo ,e)
-                        bar (alist-get 'bar ,e))
-                (setq foo (ignore 1 2 3)
-                      bar #'spam))
+                                   bar #'spam
+                                   baz nil))
+            (`(let* ((,p (or erc--server-reconnecting erc--target-priors))
+                     (,q (and ,p (alist-get 'erc-my-mode ,p))))
+                (setq foo (if ,q (alist-get 'foo ,p) (ignore 1 2 3))
+                      bar (if ,q (alist-get 'bar ,p) #'spam)
+                      baz (if ,q (alist-get 'baz ,p) nil)))
              t))))
 
 (ert-deftest erc--target-from-string ()
   (should (equal (erc--target-from-string "#chan")
-                 #s(erc--target-channel "#chan" \#chan)))
+                 #s(erc--target-channel "#chan" \#chan nil)))
 
   (should (equal (erc--target-from-string "Bob")
                  #s(erc--target "Bob" bob)))
@@ -820,7 +818,7 @@
   (let ((erc--isupport-params (make-hash-table)))
     (puthash 'CHANTYPES  '("&#") erc--isupport-params)
     (should (equal (erc--target-from-string "&Bitlbee")
-                   #s(erc--target-channel-local "&Bitlbee" &bitlbee)))))
+                   #s(erc--target-channel-local "&Bitlbee" &bitlbee nil)))))
 
 (ert-deftest erc--modify-local-map ()
   (when (and (bound-and-true-p erc-irccontrols-mode)
@@ -1434,6 +1432,44 @@
 
           (should-not calls))))))
 
+(ert-deftest erc--order-text-properties-from-hash ()
+  (let ((table (map-into '((a . 1)
+                           (erc-ts . 0)
+                           (erc-msg . s005)
+                           (b . 2)
+                           (erc-cmd . 5)
+                           (c . 3))
+                         'hash-table)))
+    (with-temp-buffer
+      (erc-mode)
+      (insert "abc\n")
+      (add-text-properties 1 2 (erc--order-text-properties-from-hash table))
+      (should (equal '( erc-msg s005
+                        erc-ts 0
+                        erc-cmd 5
+                        a 1
+                        b 2
+                        c 3)
+                     (text-properties-at (point-min)))))))
+
+(ert-deftest erc--check-msg-prop ()
+  (let ((erc--msg-props (map-into '((a . 1) (b . x)) 'hash-table)))
+    (should (eq 1 (erc--check-msg-prop 'a)))
+    (should (erc--check-msg-prop 'a 1))
+    (should-not (erc--check-msg-prop 'a 2))
+
+    (should (eq 'x (erc--check-msg-prop 'b)))
+    (should (erc--check-msg-prop 'b 'x))
+    (should-not (erc--check-msg-prop 'b 1))
+
+    (should (erc--check-msg-prop 'a '(1 42)))
+    (should-not (erc--check-msg-prop 'a '(2 42)))
+
+    (let ((props '(42 x)))
+      (should (erc--check-msg-prop 'b props)))
+    (let ((v '(42 y)))
+      (should-not (erc--check-msg-prop 'b v)))))
+
 (defmacro erc-tests--equal-including-properties (a b)
   (list (if (< emacs-major-version 29)
             'ert-equal-including-properties
@@ -1478,6 +1514,175 @@
     (when noninteractive
       (kill-buffer))))
 
+(ert-deftest erc--remove-from-prop-value-list ()
+  (with-current-buffer (get-buffer-create "*erc-test*")
+    ;; Non-list match.
+    (insert "abc\n")
+    (put-text-property 1 2 'erc-test 'a)
+    (put-text-property 2 3 'erc-test 'b)
+    (put-text-property 3 4 'erc-test 'c)
+    (should (erc-tests--equal-including-properties
+             (buffer-substring 1 4) #("abc"
+                                      0 1 (erc-test a)
+                                      1 2 (erc-test b)
+                                      2 3 (erc-test c))))
+
+    (erc--remove-from-prop-value-list 1 4 'erc-test 'b)
+    (should (erc-tests--equal-including-properties
+             (buffer-substring 1 4) #("abc"
+                                      0 1 (erc-test a)
+                                      2 3 (erc-test c))))
+    (erc--remove-from-prop-value-list 1 4 'erc-test 'a)
+    (should (erc-tests--equal-including-properties
+             (buffer-substring 1 4) #("abc" 2 3 (erc-test c))))
+    (erc--remove-from-prop-value-list 1 4 'erc-test 'c)
+    (should (erc-tests--equal-including-properties
+             (buffer-substring 1 4) "abc"))
+
+    ;; List match.
+    (goto-char (point-min))
+    (insert "def\n")
+    (put-text-property 1 2 'erc-test '(d x))
+    (put-text-property 2 3 'erc-test '(e y))
+    (put-text-property 3 4 'erc-test '(f z))
+    (should (erc-tests--equal-including-properties
+             (buffer-substring 1 4) #("def"
+                                      0 1 (erc-test (d x))
+                                      1 2 (erc-test (e y))
+                                      2 3 (erc-test (f z)))))
+    (erc--remove-from-prop-value-list 1 4 'erc-test 'y)
+    (should (erc-tests--equal-including-properties
+             (buffer-substring 1 4) #("def"
+                                      0 1 (erc-test (d x))
+                                      1 2 (erc-test e)
+                                      2 3 (erc-test (f z)))))
+    (erc--remove-from-prop-value-list 1 4 'erc-test 'd)
+    (erc--remove-from-prop-value-list 1 4 'erc-test 'f)
+    (should (erc-tests--equal-including-properties
+             (buffer-substring 1 4) #("def"
+                                      0 1 (erc-test x)
+                                      1 2 (erc-test e)
+                                      2 3 (erc-test z))))
+    (erc--remove-from-prop-value-list 1 4 'erc-test 'e)
+    (erc--remove-from-prop-value-list 1 4 'erc-test 'z)
+    (erc--remove-from-prop-value-list 1 4 'erc-test 'x)
+    (should (erc-tests--equal-including-properties
+             (buffer-substring 1 4) "def"))
+
+    ;; List match.
+    (goto-char (point-min))
+    (insert "ghi\n")
+    (put-text-property 1 2 'erc-test '(g x))
+    (put-text-property 2 3 'erc-test '(h x))
+    (put-text-property 3 4 'erc-test '(i y))
+    (should (erc-tests--equal-including-properties
+             (buffer-substring 1 4) #("ghi"
+                                      0 1 (erc-test (g x))
+                                      1 2 (erc-test (h x))
+                                      2 3 (erc-test (i y)))))
+    (erc--remove-from-prop-value-list 1 4 'erc-test 'x)
+    (should (erc-tests--equal-including-properties
+             (buffer-substring 1 4) #("ghi"
+                                      0 1 (erc-test g)
+                                      1 2 (erc-test h)
+                                      2 3 (erc-test (i y)))))
+    (erc--remove-from-prop-value-list 1 2 'erc-test 'g) ; narrowed
+    (erc--remove-from-prop-value-list 3 4 'erc-test 'i) ; narrowed
+    (should (erc-tests--equal-including-properties
+             (buffer-substring 1 4) #("ghi"
+                                      1 2 (erc-test h)
+                                      2 3 (erc-test y))))
+
+    ;; Pathological (,c) case (hopefully not created by ERC)
+    (goto-char (point-min))
+    (insert "jkl\n")
+    (put-text-property 1 2 'erc-test '(j x))
+    (put-text-property 2 3 'erc-test '(k))
+    (put-text-property 3 4 'erc-test '(k))
+    (erc--remove-from-prop-value-list 1 4 'erc-test 'k)
+    (should (erc-tests--equal-including-properties
+             (buffer-substring 1 4) #("jkl" 0 1 (erc-test (j x)))))
+
+    (when noninteractive
+      (kill-buffer))))
+
+(ert-deftest erc--remove-from-prop-value-list/many ()
+  (with-current-buffer (get-buffer-create "*erc-test*")
+    ;; Non-list match.
+    (insert "abc\n")
+    (put-text-property 1 2 'erc-test 'a)
+    (put-text-property 2 3 'erc-test 'b)
+    (put-text-property 3 4 'erc-test 'c)
+    (should (erc-tests--equal-including-properties
+             (buffer-substring 1 4) #("abc"
+                                      0 1 (erc-test a)
+                                      1 2 (erc-test b)
+                                      2 3 (erc-test c))))
+
+    (erc--remove-from-prop-value-list 1 4 'erc-test '(a b))
+    (should (erc-tests--equal-including-properties
+             (buffer-substring 1 4) #("abc" 2 3 (erc-test c))))
+    (erc--remove-from-prop-value-list 1 4 'erc-test 'a)
+    (should (erc-tests--equal-including-properties
+             (buffer-substring 1 4) #("abc" 2 3 (erc-test c))))
+    (erc--remove-from-prop-value-list 1 4 'erc-test '(c))
+    (should (erc-tests--equal-including-properties
+             (buffer-substring 1 4) "abc"))
+
+    ;; List match.
+    (goto-char (point-min))
+    (insert "def\n")
+    (put-text-property 1 2 'erc-test '(d x y))
+    (put-text-property 2 3 'erc-test '(e y))
+    (put-text-property 3 4 'erc-test '(f z))
+    (should (erc-tests--equal-including-properties
+             (buffer-substring 1 4) #("def"
+                                      0 1 (erc-test (d x y))
+                                      1 2 (erc-test (e y))
+                                      2 3 (erc-test (f z)))))
+    (erc--remove-from-prop-value-list 1 4 'erc-test '(d y f))
+    (should (erc-tests--equal-including-properties
+             (buffer-substring 1 4) #("def"
+                                      0 1 (erc-test x)
+                                      1 2 (erc-test e)
+                                      2 3 (erc-test z))))
+    (erc--remove-from-prop-value-list 1 4 'erc-test '(e z x))
+    (should (erc-tests--equal-including-properties
+             (buffer-substring 1 4) "def"))
+
+    ;; Narrowed beg.
+    (goto-char (point-min))
+    (insert "ghi\n")
+    (put-text-property 1 2 'erc-test '(g x))
+    (put-text-property 2 3 'erc-test '(h x))
+    (put-text-property 3 4 'erc-test '(i x))
+    (should (erc-tests--equal-including-properties
+             (buffer-substring 1 4) #("ghi"
+                                      0 1 (erc-test (g x))
+                                      1 2 (erc-test (h x))
+                                      2 3 (erc-test (i x)))))
+    (erc--remove-from-prop-value-list 1 3 'erc-test '(x g i))
+    (should (erc-tests--equal-including-properties
+             (buffer-substring 1 4) #("ghi"
+                                      1 2 (erc-test h)
+                                      2 3 (erc-test (i x)))))
+
+    ;; Narrowed middle.
+    (goto-char (point-min))
+    (insert "jkl\n")
+    (put-text-property 1 2 'erc-test '(j x))
+    (put-text-property 2 3 'erc-test '(k))
+    (put-text-property 3 4 'erc-test '(l y z))
+    (erc--remove-from-prop-value-list 3 4 'erc-test '(k x y z))
+    (should (erc-tests--equal-including-properties
+             (buffer-substring 1 4) #("jkl"
+                                      0 1 (erc-test (j x))
+                                      1 2 (erc-test (k))
+                                      2 3 (erc-test l))))
+
+    (when noninteractive
+      (kill-buffer))))
+
 (ert-deftest erc--split-string-shell-cmd ()
 
   ;; Leading and trailing space
@@ -1639,6 +1844,7 @@
         (erc-mode)
         (setq erc-server-process (buffer-local-value 'erc-server-process
                                                      (get-buffer "ExampleNet"))
+              erc--target (erc--target-from-string "#chan")
               erc-default-recipients '("#chan")
               erc-channel-users (make-hash-table :test 'equal)
               erc-network 'ExampleNet)
@@ -1731,6 +1937,69 @@
                2 5 (erc-speaker "Bob" font-lock-face erc-nick-default-face)
                5 12 (font-lock-face erc-default-face))))))
 
+(ert-deftest erc--route-insertion ()
+  (erc-tests--send-prep)
+  (erc-tests--set-fake-server-process "sleep" "1")
+  (setq erc-networks--id (erc-networks--id-create 'foonet))
+
+  (let* ((erc-modules) ; for `erc--open-target'
+         (server-buffer (current-buffer))
+         (spam-buffer (save-excursion (erc--open-target "#spam")))
+         (chan-buffer (save-excursion (erc--open-target "#chan")))
+         calls)
+    (cl-letf (((symbol-function 'erc-insert-line)
+               (lambda (&rest r) (push (cons 'line-1 r) calls))))
+
+      (with-current-buffer chan-buffer
+
+        (ert-info ("Null `buffer' routes to live server-buffer")
+          (erc--route-insertion "null" nil)
+          (should (equal (pop calls) `(line-1 "null" ,server-buffer)))
+          (should-not calls))
+
+        (ert-info ("Cons `buffer' routes to live members")
+          ;; Copies a let-bound `erc--msg-props' before mutating.
+          (let* ((table (map-into '(erc-msg msg) 'hash-table))
+                 (erc--msg-props table))
+            (erc--route-insertion "cons" (list server-buffer spam-buffer))
+            (should-not (eq table erc--msg-props)))
+          (should (equal (pop calls) `(line-1 "cons" ,spam-buffer)))
+          (should (equal (pop calls) `(line-1 "cons" ,server-buffer)))
+          (should-not calls))
+
+        (ert-info ("Variant `all' inserts in all session buffers")
+          (erc--route-insertion "all" 'all)
+          (should (equal (pop calls) `(line-1 "all" ,chan-buffer)))
+          (should (equal (pop calls) `(line-1 "all" ,spam-buffer)))
+          (should (equal (pop calls) `(line-1 "all" ,server-buffer)))
+          (should-not calls))
+
+        (ert-info ("Variant `active' routes to active buffer if alive")
+          (should (eq chan-buffer (erc-with-server-buffer erc-active-buffer)))
+          (erc-set-active-buffer spam-buffer)
+          (erc--route-insertion "act" 'active)
+          (should (equal (pop calls) `(line-1 "act" ,spam-buffer)))
+          (should (eq (erc-active-buffer) spam-buffer))
+          (should-not calls))
+
+        (ert-info ("Variant `active' falls back to current buffer")
+          (should (eq spam-buffer (erc-active-buffer)))
+          (kill-buffer "#spam")
+          (erc--route-insertion "nact" 'active)
+          (should (equal (pop calls) `(line-1 "nact" ,server-buffer)))
+          (should (eq (erc-with-server-buffer erc-active-buffer)
+                      server-buffer))
+          (should-not calls))
+
+        (ert-info ("Dead single buffer defaults to live server-buffer")
+          (should-not (get-buffer "#spam"))
+          (erc--route-insertion "dead" 'spam-buffer)
+          (should (equal (pop calls) `(line-1 "dead" ,server-buffer)))
+          (should-not calls))))
+
+    (should-not (buffer-live-p spam-buffer))
+    (kill-buffer chan-buffer)))
+
 (defvar erc-tests--ipv6-examples
   '("1:2:3:4:5:6:7:8"
     "::ffff:10.0.0.1" "::ffff:1.2.3.4" "::ffff:0.0.0.0"
@@ -2248,14 +2517,14 @@
 
    '( :erc-insert-modify-hook (erc-controls-highlight ; 0
                                erc-button-add-buttons ; 30
-                               erc-fill ; 40
                                erc-match-message ; 50
-                               erc-add-timestamp) ; 60
+                               erc-fill ; 60
+                               erc-add-timestamp) ; 70
 
       :erc-send-modify-hook ( erc-controls-highlight ; 0
                               erc-button-add-buttons ; 30
                               erc-fill ; 40
-                              erc-add-timestamp)))) ; 50
+                              erc-add-timestamp)))) ; 70
 
 (ert-deftest erc-migrate-modules ()
   (should (equal (erc-migrate-modules '(autojoin timestamp button))
@@ -2296,65 +2565,131 @@
   (should (eq (erc--find-group 'smiley nil) 'erc))
   (should (eq (erc--find-group 'unmorse nil) 'erc)))
 
-(ert-deftest erc--update-modules ()
-  (let (calls
-        erc-modules
-        erc-kill-channel-hook erc-kill-server-hook erc-kill-buffer-hook)
+(ert-deftest erc--sort-modules ()
+  (should (equal (erc--sort-modules '(networks foo fill bar fill stamp bar))
+                 ;; Third-party mods appear in original order.
+                 '(fill networks stamp foo bar))))
 
-    ;; This `lbaz' module is unknown, so ERC looks for it via the
-    ;; symbol proerty `erc--feature' and, failing that, by
-    ;; `require'ing its "erc-" prefixed symbol.
-    (should-not (intern-soft "erc-lbaz-mode"))
+(defun erc-tests--update-modules (fn)
+  (let* ((calls nil)
+         (custom-modes nil)
+         (on-load nil)
+         (text-quoting-style 'grave)
+
+         (get-calls (lambda () (prog1 (nreverse calls) (setq calls nil))))
+
+         (add-onload (lambda (m k v)
+                       (put (intern m) 'erc--feature k)
+                       (push (cons k (lambda () (funcall v m))) on-load)))
+
+         (mk-cmd (lambda (module)
+                   (let ((mode (intern (format "erc-%s-mode" module))))
+                     (fset mode (lambda (n) (push (cons mode n) calls))))))
+
+         (mk-builtin (lambda (module-string)
+                       (let ((s (intern module-string)))
+                         (put s 'erc--module s))))
+
+         (mk-global (lambda (module)
+                      (push (intern (format "erc-%s-mode" module))
+                            custom-modes))))
 
     (cl-letf (((symbol-function 'require)
                (lambda (s &rest _)
-                 (when (eq s 'erc--lbaz-feature)
-                   (fset (intern "erc-lbaz-mode") ; local module
-                         (lambda (n) (push (cons 'lbaz n) calls))))
-                 (push s calls)))
-
-              ;; Local modules
-              ((symbol-function 'erc-lbar-mode)
-               (lambda (n) (push (cons 'lbar n) calls)))
-              ((get 'lbaz 'erc--feature) 'erc--lbaz-feature)
-
-              ;; Global modules
-              ((symbol-function 'erc-gfoo-mode)
-               (lambda (n) (push (cons 'gfoo n) calls)))
-              ((get 'erc-gfoo-mode 'standard-value) 'ignore)
+                 ;; Simulate library being loaded, things defined.
+                 (when-let ((h (alist-get s on-load))) (funcall h))
+                 (push (cons 'req s) calls)))
+
+              ;; Spoof global module detection.
+              ((symbol-function 'custom-variable-p)
+               (lambda (v) (memq v custom-modes))))
+
+      (funcall fn get-calls add-onload mk-cmd mk-builtin mk-global))
+    (should-not erc--aberrant-modules)))
+
+(ert-deftest erc--update-modules/unknown ()
+  (erc-tests--update-modules
+
+   (lambda (get-calls _ mk-cmd _ mk-global)
+
+     (ert-info ("Baseline")
+       (let* ((erc-modules '(foo))
+              (obarray (obarray-make))
+              (err (should-error (erc--update-modules erc-modules))))
+         (should (equal (cadr err) "`foo' is not a known ERC module"))
+         (should (equal (funcall get-calls)
+                        `((req . ,(intern-soft "erc-foo")))))))
+
+     ;; Module's mode command exists but lacks an associated file.
+     (ert-info ("Bad autoload flagged as suspect")
+       (should-not erc--aberrant-modules)
+       (let* ((erc--aberrant-modules nil)
+              (obarray (obarray-make))
+              (erc-modules (list (intern "foo"))))
+
+         ;; Create a mode activation command.
+         (funcall mk-cmd "foo")
+
+         ;; Make the mode var global.
+         (funcall mk-global "foo")
+
+         ;; No local modules to return.
+         (should-not (erc--update-modules erc-modules))
+         (should (equal (mapcar #'prin1-to-string erc--aberrant-modules)
+                        '("foo")))
+         ;; ERC requires the library via prefixed module name.
+         (should (equal (mapcar #'prin1-to-string (funcall get-calls))
+                        `("(req . erc-foo)" "(erc-foo-mode . 1)"))))))))
+
+;; A local module (here, `lo2') lacks a mode toggle, so ERC tries to
+;; load its defining library, first via the symbol property
+;; `erc--feature', and then via an "erc-" prefixed symbol.
+(ert-deftest erc--update-modules/local ()
+  (erc-tests--update-modules
+
+   (lambda (get-calls add-onload mk-cmd mk-builtin mk-global)
+
+     (let* ((obarray (obarray-make 20))
+            (erc-modules (mapcar #'intern '("glo" "lo1" "lo2"))))
+
+       ;; Create a global and a local module.
+       (mapc mk-cmd '("glo" "lo1"))
+       (mapc mk-builtin '("glo" "lo1"))
+       (funcall mk-global "glo")
+       (funcall add-onload "lo2" 'explicit-feature-lib mk-cmd)
+
+       ;; Returns local modules.
+       (should (equal (mapcar #'symbol-name (erc--update-modules erc-modules))
+                      '("erc-lo2-mode" "erc-lo1-mode")))
+
+       ;; Requiring `erc-lo2' defines `erc-lo2-mode'.
+       (should (equal (mapcar #'prin1-to-string (funcall get-calls))
+                      `("(erc-glo-mode . 1)"
+                        "(req . explicit-feature-lib)")))))))
+
+(ert-deftest erc--update-modules/realistic ()
+  (let ((calls nil)
+        ;; Module `pcomplete' "resolves" to `completion'.
+        (erc-modules '(pcomplete autojoin networks)))
+    (cl-letf (((symbol-function 'require)
+               (lambda (s &rest _) (push (cons 'req s) calls)))
+
+              ;; Spoof global module detection.
+              ((symbol-function 'custom-variable-p)
+               (lambda (v)
+                 (memq v '(erc-autojoin-mode erc-networks-mode
+                                             erc-completion-mode))))
+              ;; Mock and spy real builtins.
               ((symbol-function 'erc-autojoin-mode)
                (lambda (n) (push (cons 'autojoin n) calls)))
-              ((get 'erc-autojoin-mode 'standard-value) 'ignore)
               ((symbol-function 'erc-networks-mode)
                (lambda (n) (push (cons 'networks n) calls)))
-              ((get 'erc-networks-mode 'standard-value) 'ignore)
               ((symbol-function 'erc-completion-mode)
-               (lambda (n) (push (cons 'completion n) calls)))
-              ((get 'erc-completion-mode 'standard-value) 'ignore))
-
-      (ert-info ("Unknown module")
-        (setq erc-modules '(lfoo))
-        (should-error (erc--update-modules))
-        (should (equal (pop calls) 'erc-lfoo))
-        (should-not calls))
+               (lambda (n) (push (cons 'completion n) calls))))
 
-      (ert-info ("Local modules")
-        (setq erc-modules '(gfoo lbar lbaz))
-        ;; Don't expose the mode here
-        (should (equal (mapcar #'symbol-name (erc--update-modules))
-                       '("erc-lbaz-mode" "erc-lbar-mode")))
-        ;; Lbaz required because unknown.
-        (should (equal (nreverse calls) '((gfoo . 1) erc--lbaz-feature)))
-        (fmakunbound (intern "erc-lbaz-mode"))
-        (unintern (intern "erc-lbaz-mode") obarray)
-        (setq calls nil))
-
-      (ert-info ("Global modules") ; `pcomplete' resolved to `completion'
-        (setq erc-modules '(pcomplete autojoin networks))
-        (should-not (erc--update-modules)) ; no locals
-        (should (equal (nreverse calls)
-                       '((completion . 1) (autojoin . 1) (networks . 1))))
-        (setq calls nil)))))
+      (should-not (erc--update-modules erc-modules)) ; no locals
+      (should (equal (nreverse calls)
+                     '((completion . 1) (autojoin . 1) (networks . 1)))))))
 
 (ert-deftest erc--merge-local-modes ()
   (cl-letf (((get 'erc-b-mode 'erc-module) 'b)
diff --git a/test/lisp/erc/resources/base/assoc/multi-net/barnet.eld 
b/test/lisp/erc/resources/base/assoc/multi-net/barnet.eld
index c62a22a11c7..4c2b1d61e24 100644
--- a/test/lisp/erc/resources/base/assoc/multi-net/barnet.eld
+++ b/test/lisp/erc/resources/base/assoc/multi-net/barnet.eld
@@ -1,7 +1,7 @@
 ;; -*- mode: lisp-data; -*-
-((pass 1 "PASS :changeme"))
-((nick 1 "NICK tester"))
-((user 1 "USER user 0 * :tester")
+((pass 10 "PASS :changeme"))
+((nick 10 "NICK tester"))
+((user 10 "USER user 0 * :tester")
  (0 ":irc.barnet.org 001 tester :Welcome to the barnet IRC Network tester")
  (0 ":irc.barnet.org 002 tester :Your host is irc.barnet.org, running version 
oragono-2.6.0-7481bf0385b95b16")
  (0 ":irc.barnet.org 003 tester :This server was created Tue, 04 May 2021 
05:06:19 UTC")
@@ -18,16 +18,16 @@
  (0 ":irc.barnet.org 266 tester 3 3 :Current global users 3, max 3")
  (0 ":irc.barnet.org 422 tester :MOTD File is missing"))
 
-((mode-user 8 "MODE tester +i")
+((mode-user 10 "MODE tester +i")
  (0 ":irc.barnet.org 221 tester +i")
  (0 ":irc.barnet.org NOTICE tester :This server is in debug mode and is 
logging all user I/O. If you do not wish for everything you send to be readable 
by the server owner(s), please disconnect."))
 
-((join 2 "JOIN #chan")
+((join 10 "JOIN #chan")
  (0 ":tester!~u@jnu48g2wrycbw.irc JOIN #chan")
  (0 ":irc.barnet.org 353 tester = #chan :@mike joe tester")
  (0 ":irc.barnet.org 366 tester #chan :End of NAMES list"))
 
-((mode 2 "MODE #chan")
+((mode 10 "MODE #chan")
  (0 ":irc.barnet.org 324 tester #chan +nt")
  (0 ":irc.barnet.org 329 tester #chan 1620104779")
  (0.1 ":mike!~u@kd7gmjbnbkn8c.irc PRIVMSG #chan :tester, welcome!")
diff --git a/test/lisp/erc/resources/base/assoc/multi-net/foonet.eld 
b/test/lisp/erc/resources/base/assoc/multi-net/foonet.eld
index f30b7deca11..bfa324642ce 100644
--- a/test/lisp/erc/resources/base/assoc/multi-net/foonet.eld
+++ b/test/lisp/erc/resources/base/assoc/multi-net/foonet.eld
@@ -1,7 +1,7 @@
 ;; -*- mode: lisp-data; -*-
-((pass 1 "PASS :changeme"))
-((nick 1 "NICK tester"))
-((user 1 "USER user 0 * :tester")
+((pass 10 "PASS :changeme"))
+((nick 10 "NICK tester"))
+((user 10 "USER user 0 * :tester")
  (0 ":irc.foonet.org 001 tester :Welcome to the foonet IRC Network tester")
  (0 ":irc.foonet.org 002 tester :Your host is irc.foonet.org, running version 
oragono-2.6.0-7481bf0385b95b16")
  (0 ":irc.foonet.org 003 tester :This server was created Tue, 04 May 2021 
05:06:18 UTC")
@@ -18,16 +18,16 @@
  (0 ":irc.foonet.org 266 tester 3 3 :Current global users 3, max 3")
  (0 ":irc.foonet.org 422 tester :MOTD File is missing"))
 
-((mode-user 8 "MODE tester +i")
+((mode-user 10 "MODE tester +i")
  (0 ":irc.foonet.org 221 tester +i")
  (0 ":irc.foonet.org NOTICE tester :This server is in debug mode and is 
logging all user I/O. If you do not wish for everything you send to be readable 
by the server owner(s), please disconnect."))
 
-((join 2 "JOIN #chan")
+((join 10 "JOIN #chan")
  (0 ":tester!~u@9g6b728983yd2.irc JOIN #chan")
  (0 ":irc.foonet.org 353 tester = #chan :alice tester @bob")
  (0 ":irc.foonet.org 366 tester #chan :End of NAMES list"))
 
-((mode 2 "MODE #chan")
+((mode 10 "MODE #chan")
  (0 ":irc.foonet.org 324 tester #chan +nt")
  (0 ":irc.foonet.org 329 tester #chan 1620104779")
  (0.1 ":bob!~u@rz2v467q4rwhy.irc PRIVMSG #chan :tester, welcome!")
diff --git a/test/lisp/erc/resources/base/display-message/multibuf.eld 
b/test/lisp/erc/resources/base/display-message/multibuf.eld
new file mode 100644
index 00000000000..e49a654cd06
--- /dev/null
+++ b/test/lisp/erc/resources/base/display-message/multibuf.eld
@@ -0,0 +1,45 @@
+;; -*- mode: lisp-data; -*-
+((nick 10 "NICK tester"))
+((user 10 "USER user 0 * :tester")
+ (0.00 ":irc.foonet.org 001 tester :Welcome to the foonet IRC Network tester")
+ (0.01 ":irc.foonet.org 002 tester :Your host is irc.foonet.org, running 
version ergo-v2.11.1")
+ (0.01 ":irc.foonet.org 003 tester :This server was created Sat, 14 Oct 2023 
16:08:20 UTC")
+ (0.02 ":irc.foonet.org 004 tester irc.foonet.org ergo-v2.11.1 BERTZios 
CEIMRUabefhiklmnoqstuv Iabefhkloqv")
+ (0.00 ":irc.foonet.org 005 tester AWAYLEN=390 BOT=B CASEMAPPING=ascii 
CHANLIMIT=#:100 CHANMODES=Ibe,k,fl,CEMRUimnstu CHANNELLEN=64 CHANTYPES=# 
CHATHISTORY=1000 ELIST=U EXCEPTS EXTBAN=,m FORWARD=f INVEX :are supported by 
this server")
+ (0.01 ":irc.foonet.org 005 tester KICKLEN=390 MAXLIST=beI:60 MAXTARGETS=4 
MODES MONITOR=100 NETWORK=foonet NICKLEN=32 PREFIX=(qaohv)~&@%+ STATUSMSG=~&@%+ 
TARGMAX=NAMES:1,LIST:1,KICK:,WHOIS:1,USERHOST:10,PRIVMSG:4,TAGMSG:4,NOTICE:4,MONITOR:100
 TOPICLEN=390 UTF8ONLY WHOX :are supported by this server")
+ (0.01 ":irc.foonet.org 005 tester draft/CHATHISTORY=1000 :are supported by 
this server")
+ (0.00 ":irc.foonet.org 251 tester :There are 0 users and 5 invisible on 1 
server(s)")
+ (0.00 ":irc.foonet.org 252 tester 0 :IRC Operators online")
+ (0.00 ":irc.foonet.org 253 tester 0 :unregistered connections")
+ (0.00 ":irc.foonet.org 254 tester 2 :channels formed")
+ (0.00 ":irc.foonet.org 255 tester :I have 5 clients and 0 servers")
+ (0.00 ":irc.foonet.org 265 tester 5 5 :Current local users 5, max 5")
+ (0.02 ":irc.foonet.org 266 tester 5 5 :Current global users 5, max 5")
+ (0.01 ":irc.foonet.org 422 tester :MOTD File is missing")
+ (0.00 ":irc.foonet.org 221 tester +i")
+ (0.01 ":irc.foonet.org NOTICE tester :This server is in debug mode and is 
logging all user I/O. If you do not wish for everything you send to be readable 
by the server owner(s), please disconnect."))
+
+((mode 10 "MODE tester +i")
+ (0.00 ":irc.foonet.org 221 tester +i"))
+
+((join 10 "JOIN #chan")
+ (0.03 ":tester!~u@rdjcgiwfuwqmc.irc JOIN #chan")
+ (0.03 ":irc.foonet.org 353 tester = #chan :@fsbot bob alice dummy tester")
+ (0.01 ":irc.foonet.org 366 tester #chan :End of NAMES list")
+ (0.00 ":bob!~u@uee7kge7ua5sy.irc PRIVMSG #chan :tester, welcome!")
+ (0.01 ":alice!~u@uee7kge7ua5sy.irc PRIVMSG #chan :tester, welcome!"))
+
+((mode 10 "MODE #chan")
+ (0.01 ":bob!~u@uee7kge7ua5sy.irc PRIVMSG #chan :alice: Persuade this rude 
wretch willingly to die.")
+ (0.01 ":irc.foonet.org 324 tester #chan +Cnt")
+ (0.01 ":irc.foonet.org 329 tester #chan 1697299707")
+ (0.03 ":alice!~u@uee7kge7ua5sy.irc PRIVMSG #chan :bob: It might be yours or 
hers, for aught I know.")
+ (0.07 ":bob!~u@uee7kge7ua5sy.irc PRIVMSG #chan :Would all themselves laugh 
mortal.")
+ (0.04 ":dummy!~u@rdjcgiwfuwqmc.irc PRIVMSG tester :hi")
+ (0.06 ":bob!~u@uee7kge7ua5sy.irc PRIVMSG #chan :alice: It hath pleased the 
devil drunkenness to give place to the devil wrath; one unperfectness shows me 
another, to make me frankly despise myself.")
+ (0.05 ":dummy!~u@rdjcgiwfuwqmc.irc QUIT :Quit: \2ERC\2 5.6-git (IRC client 
for GNU Emacs 30.0.50)")
+ (0.08 ":alice!~u@uee7kge7ua5sy.irc PRIVMSG #chan :You speak of him when he 
was less furnished than now he is with that which makes him both without and 
within."))
+
+((quit 10 "QUIT :\2ERC\2")
+ (0.04 ":tester!~u@rdjcgiwfuwqmc.irc QUIT :Quit: \2ERC\2 5.x (IRC client for 
GNU Emacs)")
+ (0.02 "ERROR :Quit: \2ERC\2 5.x (IRC client for GNU Emacs)"))
diff --git a/test/lisp/erc/resources/base/netid/bouncer/barnet-drop.eld 
b/test/lisp/erc/resources/base/netid/bouncer/barnet-drop.eld
index 686a47f68a3..04959954c4f 100644
--- a/test/lisp/erc/resources/base/netid/bouncer/barnet-drop.eld
+++ b/test/lisp/erc/resources/base/netid/bouncer/barnet-drop.eld
@@ -22,14 +22,14 @@
  (0 ":irc.znc.in 306 tester :You have been marked as being away")
  (0 ":irc.barnet.org 305 tester :You are no longer marked as being away"))
 
-((join 1 "JOIN #chan")
+((join 10 "JOIN #chan")
  (0 ":tester!~u@awyxgybtkx7uq.irc JOIN #chan")
  (0 ":irc.barnet.org 353 tester = #chan :@joe mike tester")
  (0 ":irc.barnet.org 366 tester #chan :End of NAMES list")
  (0.1 ":joe!~u@awyxgybtkx7uq.irc PRIVMSG #chan :tester, welcome!")
  (0 ":mike!~u@awyxgybtkx7uq.irc PRIVMSG #chan :tester, welcome!"))
 
-((mode 1 "MODE #chan")
+((mode 10 "MODE #chan")
  (0 ":irc.barnet.org 324 tester #chan +nt")
  (0 ":irc.barnet.org 329 tester #chan 1620805269")
  (0.1 ":mike!~u@awyxgybtkx7uq.irc PRIVMSG #chan :joe: But you have outfaced 
them all.")
diff --git a/test/lisp/erc/resources/base/netid/bouncer/foonet-drop.eld 
b/test/lisp/erc/resources/base/netid/bouncer/foonet-drop.eld
index b99621cc311..d0445cd1dd5 100644
--- a/test/lisp/erc/resources/base/netid/bouncer/foonet-drop.eld
+++ b/test/lisp/erc/resources/base/netid/bouncer/foonet-drop.eld
@@ -1,5 +1,5 @@
 ;; -*- mode: lisp-data; -*-
-((pass 1 "PASS :foonet:changeme"))
+((pass 10 "PASS :foonet:changeme"))
 ((nick 1 "NICK tester"))
 ((user 1 "USER user 0 * :tester")
  (0 ":irc.foonet.org 001 tester :Welcome to the foonet IRC Network tester")
@@ -22,14 +22,14 @@
  (0 ":irc.znc.in 306 tester :You have been marked as being away")
  (0 ":irc.foonet.org 305 tester :You are no longer marked as being away"))
 
-((join 1 "JOIN #chan")
+((join 10 "JOIN #chan")
  (0 ":tester!~u@ertp7idh9jtgi.irc JOIN #chan")
  (0 ":irc.foonet.org 353 tester = #chan :@alice bob tester")
  (0 ":irc.foonet.org 366 tester #chan :End of NAMES list")
  (0.1 ":alice!~u@ertp7idh9jtgi.irc PRIVMSG #chan :tester, welcome!")
  (0 ":bob!~u@ertp7idh9jtgi.irc PRIVMSG #chan :tester, welcome!"))
 
-((mode 1 "MODE #chan")
+((mode 10 "MODE #chan")
  (0 ":irc.foonet.org 324 tester #chan +nt")
  (0 ":irc.foonet.org 329 tester #chan 1620805271")
  (0.1 ":alice!~u@ertp7idh9jtgi.irc PRIVMSG #chan :bob: He cannot be heard of. 
Out of doubt he is transported.")
diff --git a/test/lisp/erc/resources/base/renick/queries/solo.eld 
b/test/lisp/erc/resources/base/renick/queries/solo.eld
index 12fa7d264e9..fa4c075adac 100644
--- a/test/lisp/erc/resources/base/renick/queries/solo.eld
+++ b/test/lisp/erc/resources/base/renick/queries/solo.eld
@@ -30,7 +30,7 @@
  (0 ":irc.foonet.org NOTICE tester :[09:56:57] This server is in debug mode 
and is logging all user I/O. If you do not wish for everything you send to be 
readable by the server owner(s), please disconnect.")
  (0 ":irc.foonet.org 305 tester :You are no longer marked as being away"))
 
-((mode 1 "MODE #foo")
+((mode 10 "MODE #foo")
  (0 ":irc.foonet.org 324 tester #foo +nt")
  (0 ":irc.foonet.org 329 tester #foo 1622454985")
  (0.1 ":alice!~u@gq7yjr7gsu7nn.irc PRIVMSG #foo :bob: Farewell, pretty lady: 
you must hold the credit of your father.")
diff --git a/test/lisp/erc/resources/base/reuse-buffers/channel/barnet.eld 
b/test/lisp/erc/resources/base/reuse-buffers/channel/barnet.eld
index efc2506fd6f..d106a45cf66 100644
--- a/test/lisp/erc/resources/base/reuse-buffers/channel/barnet.eld
+++ b/test/lisp/erc/resources/base/reuse-buffers/channel/barnet.eld
@@ -56,7 +56,7 @@
  (0.1 ":mike!~u@wvys46tx8tpmk.irc PRIVMSG #chan :tester, welcome!")
  (0 ":joe!~u@wvys46tx8tpmk.irc PRIVMSG #chan :tester, welcome!"))
 
-((mode 1 "MODE #chan")
+((mode 10 "MODE #chan")
  (0 ":irc.barnet.org 324 tester #chan +nt")
  (0 ":irc.barnet.org 329 tester #chan 1620205534")
  (0.1 ":mike!~u@wvys46tx8tpmk.irc PRIVMSG #chan :joe: Chi non te vede, non te 
pretia.")
diff --git a/test/lisp/erc/resources/base/reuse-buffers/channel/foonet.eld 
b/test/lisp/erc/resources/base/reuse-buffers/channel/foonet.eld
index a11cfac2e73..603afa2fc3e 100644
--- a/test/lisp/erc/resources/base/reuse-buffers/channel/foonet.eld
+++ b/test/lisp/erc/resources/base/reuse-buffers/channel/foonet.eld
@@ -52,7 +52,7 @@
  (0.1 ":alice!~u@yppdd5tt4admc.irc PRIVMSG #chan :tester, welcome!")
  (0 ":bob!~u@yppdd5tt4admc.irc PRIVMSG #chan :tester, welcome!"))
 
-((mode 1 "MODE #chan")
+((mode 10 "MODE #chan")
  (0 ":irc.foonet.org 324 tester #chan +nt")
  (0 ":irc.foonet.org 329 tester #chan 1620205534")
  (0.1 ":bob!~u@yppdd5tt4admc.irc PRIVMSG #chan :alice: Thou desirest me to 
stop in my tale against the hair.")
diff --git a/test/lisp/erc/resources/erc-d/resources/dynamic-foonet.eld 
b/test/lisp/erc/resources/erc-d/resources/dynamic-foonet.eld
index 4855c178861..e5532980644 100644
--- a/test/lisp/erc/resources/erc-d/resources/dynamic-foonet.eld
+++ b/test/lisp/erc/resources/erc-d/resources/dynamic-foonet.eld
@@ -24,7 +24,7 @@
  (0 ":irc.foonet.org 353 alice = #chan :+alice!~alice@example.com 
@%+bob!~bob@example.org")
  (0 ":irc.foonet.org 366 alice #chan :End of NAMES list"))
 
-((mode 2 "MODE #chan")
+((mode 3 "MODE #chan")
  (0 ":irc.foonet.org 324 tester #chan +nt")
  (0 ":irc.foonet.org 329 tester #chan 1620805269")
  (0.1 ":alice!~u@awyxgybtkx7uq.irc PRIVMSG #chan :bob: Yes, a dozen; and as 
many to the vantage, as would store the world they played for.")
diff --git a/test/lisp/erc/resources/erc-scenarios-common.el 
b/test/lisp/erc/resources/erc-scenarios-common.el
index 5354b300b47..9e134e6932f 100644
--- a/test/lisp/erc/resources/erc-scenarios-common.el
+++ b/test/lisp/erc/resources/erc-scenarios-common.el
@@ -574,7 +574,7 @@ buffer-naming collisions involving bouncers in ERC."
                                 :password "changeme"
                                 :full-name "tester")
         (erc-scenarios-common-assert-initial-buf-name nil port)
-        (erc-d-t-wait-for 3 (eq (erc-network) 'foonet))
+        (erc-d-t-wait-for 6 (eq (erc-network) 'foonet))
         (erc-d-t-wait-for 3 (string= (buffer-name) "foonet"))
         (funcall expect 5 "foonet")))
 
@@ -713,7 +713,7 @@ Bug#48598: 28.0.50; buffer-naming collisions involving 
bouncers in ERC."
         (erc-d-t-wait-for 3 (eq erc-server-process erc-server-process-foo))
         (funcall expect 3 "<bob>")
         (erc-d-t-absent-for 0.1 "<joe>")
-        (funcall expect 10 "not given me")))
+        (funcall expect 20 "not given me")))
 
     (ert-info ("All #chan@barnet output received")
       (with-current-buffer chan-buf-bar
diff --git a/test/lisp/erc/resources/fill/snapshots/merge-01-start.eld 
b/test/lisp/erc/resources/fill/snapshots/merge-01-start.eld
index 689bacc7012..8a6f2289f5d 100644
--- a/test/lisp/erc/resources/fill/snapshots/merge-01-start.eld
+++ b/test/lisp/erc/resources/fill/snapshots/merge-01-start.eld
@@ -1 +1 @@
-#("\n\n\n[Thu Jan  1 1970]\n*** This server is in debug mode and is logging 
all user I/O. If you do not wish for everything you send to be readable by the 
server owner(s), please disconnect.[00:00]\n<alice> bob: come, you are a 
tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause 
to complain of? Come me to what was done to her.\n<bob> alice: Either your 
unparagoned mistress is dead, or she's outprized by a trifle.\n\n[Sat Apr  1 
2023]\n<bob> zero.[07:00]\n<alic [...]
\ No newline at end of file
+#("\n\n\n[Thu Jan  1 1970]\n*** This server is in debug mode and is logging 
all user I/O. If you do not wish for everything you send to be readable by the 
server owner(s), please disconnect.[00:00]\n<alice> bob: come, you are a 
tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause 
to complain of? Come me to what was done to her.\n<bob> alice: Either your 
unparagoned mistress is dead, or she's outprized by a trifle.\n\n[Sat Apr  1 
2023]\n<bob> zero.[07:00]\n<alic [...]
diff --git a/test/lisp/erc/resources/fill/snapshots/merge-02-right.eld 
b/test/lisp/erc/resources/fill/snapshots/merge-02-right.eld
index 9fa23a7d332..3eb4be4919b 100644
--- a/test/lisp/erc/resources/fill/snapshots/merge-02-right.eld
+++ b/test/lisp/erc/resources/fill/snapshots/merge-02-right.eld
@@ -1 +1 @@
-#("\n\n\n[Thu Jan  1 1970]\n*** This server is in debug mode and is logging 
all user I/O. If you do not wish for everything you send to be readable by the 
server owner(s), please disconnect.[00:00]\n<alice> bob: come, you are a 
tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause 
to complain of? Come me to what was done to her.\n<bob> alice: Either your 
unparagoned mistress is dead, or she's outprized by a trifle.\n\n[Sat Apr  1 
2023]\n<bob> zero.[07:00]\n<alic [...]
\ No newline at end of file
+#("\n\n\n[Thu Jan  1 1970]\n*** This server is in debug mode and is logging 
all user I/O. If you do not wish for everything you send to be readable by the 
server owner(s), please disconnect.[00:00]\n<alice> bob: come, you are a 
tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause 
to complain of? Come me to what was done to her.\n<bob> alice: Either your 
unparagoned mistress is dead, or she's outprized by a trifle.\n\n[Sat Apr  1 
2023]\n<bob> zero.[07:00]\n<alic [...]
diff --git a/test/lisp/erc/resources/fill/snapshots/merge-wrap-01.eld 
b/test/lisp/erc/resources/fill/snapshots/merge-wrap-01.eld
index a3d533c87b5..82c6d52cf7c 100644
--- a/test/lisp/erc/resources/fill/snapshots/merge-wrap-01.eld
+++ b/test/lisp/erc/resources/fill/snapshots/merge-wrap-01.eld
@@ -1 +1 @@
-#("\n\n\n[Thu Jan  1 1970]\n*** This server is in debug mode and is logging 
all user I/O. If you do not wish for everything you send to be readable by the 
server owner(s), please disconnect.[00:00]\n<alice> bob: come, you are a 
tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause 
to complain of? Come me to what was done to her.\n<bob> alice: Either your 
unparagoned mistress is dead, or she's outprized by a trifle.\n\n[Sat Apr  1 
2023]\n<bob> zero.[07:00]\n* bob [...]
\ No newline at end of file
+#("\n\n\n[Thu Jan  1 1970]\n*** This server is in debug mode and is logging 
all user I/O. If you do not wish for everything you send to be readable by the 
server owner(s), please disconnect.[00:00]\n<alice> bob: come, you are a 
tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause 
to complain of? Come me to what was done to her.\n<bob> alice: Either your 
unparagoned mistress is dead, or she's outprized by a trifle.\n\n[Sat Apr  1 
2023]\n<bob> zero.[07:00]\n* bob [...]
diff --git a/test/lisp/erc/resources/fill/snapshots/monospace-01-start.eld 
b/test/lisp/erc/resources/fill/snapshots/monospace-01-start.eld
index 80c9e1d80f5..84a1e34670c 100644
--- a/test/lisp/erc/resources/fill/snapshots/monospace-01-start.eld
+++ b/test/lisp/erc/resources/fill/snapshots/monospace-01-start.eld
@@ -1 +1 @@
-#("\n\n\n[Thu Jan  1 1970]\n*** This server is in debug mode and is logging 
all user I/O. If you do not wish for everything you send to be readable by the 
server owner(s), please disconnect.[00:00]\n<alice> bob: come, you are a 
tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause 
to complain of? Come me to what was done to her.\n<bob> alice: Either your 
unparagoned mistress is dead, or she's outprized by a trifle.\n" 2 20 
(erc-timestamp 0 line-prefix (space :wi [...]
\ No newline at end of file
+#("\n\n\n[Thu Jan  1 1970]\n*** This server is in debug mode and is logging 
all user I/O. If you do not wish for everything you send to be readable by the 
server owner(s), please disconnect.[00:00]\n<alice> bob: come, you are a 
tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause 
to complain of? Come me to what was done to her.\n<bob> alice: Either your 
unparagoned mistress is dead, or she's outprized by a trifle.\n" 2 3 (erc-msg 
datestamp erc-ts 0 field erc-ti [...]
diff --git a/test/lisp/erc/resources/fill/snapshots/monospace-02-right.eld 
b/test/lisp/erc/resources/fill/snapshots/monospace-02-right.eld
index e675695f660..83394f2f639 100644
--- a/test/lisp/erc/resources/fill/snapshots/monospace-02-right.eld
+++ b/test/lisp/erc/resources/fill/snapshots/monospace-02-right.eld
@@ -1 +1 @@
-#("\n\n\n[Thu Jan  1 1970]\n*** This server is in debug mode and is logging 
all user I/O. If you do not wish for everything you send to be readable by the 
server owner(s), please disconnect.[00:00]\n<alice> bob: come, you are a 
tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause 
to complain of? Come me to what was done to her.\n<bob> alice: Either your 
unparagoned mistress is dead, or she's outprized by a trifle.\n" 2 20 
(erc-timestamp 0 line-prefix (space :wi [...]
\ No newline at end of file
+#("\n\n\n[Thu Jan  1 1970]\n*** This server is in debug mode and is logging 
all user I/O. If you do not wish for everything you send to be readable by the 
server owner(s), please disconnect.[00:00]\n<alice> bob: come, you are a 
tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause 
to complain of? Come me to what was done to her.\n<bob> alice: Either your 
unparagoned mistress is dead, or she's outprized by a trifle.\n" 2 3 (erc-msg 
datestamp erc-ts 0 field erc-ti [...]
diff --git a/test/lisp/erc/resources/fill/snapshots/monospace-03-left.eld 
b/test/lisp/erc/resources/fill/snapshots/monospace-03-left.eld
index a6070c2e3ff..1605628b29f 100644
--- a/test/lisp/erc/resources/fill/snapshots/monospace-03-left.eld
+++ b/test/lisp/erc/resources/fill/snapshots/monospace-03-left.eld
@@ -1 +1 @@
-#("\n\n\n[Thu Jan  1 1970]\n*** This server is in debug mode and is logging 
all user I/O. If you do not wish for everything you send to be readable by the 
server owner(s), please disconnect.[00:00]\n<alice> bob: come, you are a 
tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause 
to complain of? Come me to what was done to her.\n<bob> alice: Either your 
unparagoned mistress is dead, or she's outprized by a trifle.\n" 2 20 
(erc-timestamp 0 line-prefix (space :wi [...]
\ No newline at end of file
+#("\n\n\n[Thu Jan  1 1970]\n*** This server is in debug mode and is logging 
all user I/O. If you do not wish for everything you send to be readable by the 
server owner(s), please disconnect.[00:00]\n<alice> bob: come, you are a 
tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause 
to complain of? Come me to what was done to her.\n<bob> alice: Either your 
unparagoned mistress is dead, or she's outprized by a trifle.\n" 2 3 (erc-msg 
datestamp erc-ts 0 field erc-ti [...]
diff --git a/test/lisp/erc/resources/fill/snapshots/monospace-04-reset.eld 
b/test/lisp/erc/resources/fill/snapshots/monospace-04-reset.eld
index 80c9e1d80f5..84a1e34670c 100644
--- a/test/lisp/erc/resources/fill/snapshots/monospace-04-reset.eld
+++ b/test/lisp/erc/resources/fill/snapshots/monospace-04-reset.eld
@@ -1 +1 @@
-#("\n\n\n[Thu Jan  1 1970]\n*** This server is in debug mode and is logging 
all user I/O. If you do not wish for everything you send to be readable by the 
server owner(s), please disconnect.[00:00]\n<alice> bob: come, you are a 
tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause 
to complain of? Come me to what was done to her.\n<bob> alice: Either your 
unparagoned mistress is dead, or she's outprized by a trifle.\n" 2 20 
(erc-timestamp 0 line-prefix (space :wi [...]
\ No newline at end of file
+#("\n\n\n[Thu Jan  1 1970]\n*** This server is in debug mode and is logging 
all user I/O. If you do not wish for everything you send to be readable by the 
server owner(s), please disconnect.[00:00]\n<alice> bob: come, you are a 
tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause 
to complain of? Come me to what was done to her.\n<bob> alice: Either your 
unparagoned mistress is dead, or she's outprized by a trifle.\n" 2 3 (erc-msg 
datestamp erc-ts 0 field erc-ti [...]
diff --git a/test/lisp/erc/resources/fill/snapshots/spacing-01-mono.eld 
b/test/lisp/erc/resources/fill/snapshots/spacing-01-mono.eld
index 2b8766c27f4..7a7e01de49d 100644
--- a/test/lisp/erc/resources/fill/snapshots/spacing-01-mono.eld
+++ b/test/lisp/erc/resources/fill/snapshots/spacing-01-mono.eld
@@ -1 +1 @@
-#("\n\n\n[Thu Jan  1 1970]\n*** This server is in debug mode and is logging 
all user I/O. If you do not wish for everything you send to be readable by the 
server owner(s), please disconnect.[00:00]\n<alice> bob: come, you are a 
tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause 
to complain of? Come me to what was done to her.\n<bob> alice: Either your 
unparagoned mistress is dead, or she's outprized by a trifle.\n<bob> This 
buffer is for text.\n*** one two th [...]
\ No newline at end of file
+#("\n\n\n[Thu Jan  1 1970]\n*** This server is in debug mode and is logging 
all user I/O. If you do not wish for everything you send to be readable by the 
server owner(s), please disconnect.[00:00]\n<alice> bob: come, you are a 
tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause 
to complain of? Come me to what was done to her.\n<bob> alice: Either your 
unparagoned mistress is dead, or she's outprized by a trifle.\n<bob> This 
buffer is for text.\n*** one two th [...]
diff --git a/test/lisp/erc/resources/fill/snapshots/stamps-left-01.eld 
b/test/lisp/erc/resources/fill/snapshots/stamps-left-01.eld
index f62b65cd170..bb248ffb28e 100644
--- a/test/lisp/erc/resources/fill/snapshots/stamps-left-01.eld
+++ b/test/lisp/erc/resources/fill/snapshots/stamps-left-01.eld
@@ -1 +1 @@
-#("\n\n[00:00]*** This server is in debug mode and is logging all user I/O. If 
you do not wish for everything you send to be readable by the server owner(s), 
please disconnect.\n[00:00]<alice> bob: come, you are a tedious fool: to the 
purpose. What was done to Elbow's wife, that he hath cause to complain of? Come 
me to what was done to her.\n[00:00]<bob> alice: Either your unparagoned 
mistress is dead, or she's outprized by a trifle.\n" 2 9 (erc-timestamp 0 
display (#4=(margin left-margi [...]
\ No newline at end of file
+#("\n\n[00:00]*** This server is in debug mode and is logging all user I/O. If 
you do not wish for everything you send to be readable by the server owner(s), 
please disconnect.\n[00:00]<alice> bob: come, you are a tedious fool: to the 
purpose. What was done to Elbow's wife, that he hath cause to complain of? Come 
me to what was done to her.\n[00:00]<bob> alice: Either your unparagoned 
mistress is dead, or she's outprized by a trifle.\n" 2 3 (erc-msg notice erc-ts 
0 display #3=(#5=(margin [...]
diff --git a/test/lisp/erc/resources/join/network-id/foonet.eld 
b/test/lisp/erc/resources/join/network-id/foonet.eld
index 7d63f5f0c6c..74a107f8144 100644
--- a/test/lisp/erc/resources/join/network-id/foonet.eld
+++ b/test/lisp/erc/resources/join/network-id/foonet.eld
@@ -1,8 +1,8 @@
 ;; -*- mode: lisp-data; -*-
 ((pass 10 "PASS :foonet:changeme"))
-((nick 1 "NICK tester"))
+((nick 10 "NICK tester"))
 
-((user 1 "USER user 0 * :tester")
+((user 10 "USER user 0 * :tester")
  (0 ":irc.foonet.org 001 tester :Welcome to the foonet IRC Network tester")
  (0 ":irc.foonet.org 002 tester :Your host is irc.foonet.org, running version 
oragono-2.6.0-7481bf0385b95b16")
  (0 ":irc.foonet.org 003 tester :This server was created Mon, 10 May 2021 
00:58:22 UTC")
diff --git a/test/lisp/erc/resources/base/assoc/multi-net/foonet.eld 
b/test/lisp/erc/resources/match/fools/fill-wrap.eld
similarity index 51%
copy from test/lisp/erc/resources/base/assoc/multi-net/foonet.eld
copy to test/lisp/erc/resources/match/fools/fill-wrap.eld
index f30b7deca11..dff75ef9cd2 100644
--- a/test/lisp/erc/resources/base/assoc/multi-net/foonet.eld
+++ b/test/lisp/erc/resources/match/fools/fill-wrap.eld
@@ -1,5 +1,5 @@
 ;; -*- mode: lisp-data; -*-
-((pass 1 "PASS :changeme"))
+((pass 10 "PASS :changeme"))
 ((nick 1 "NICK tester"))
 ((user 1 "USER user 0 * :tester")
  (0 ":irc.foonet.org 001 tester :Welcome to the foonet IRC Network tester")
@@ -7,7 +7,7 @@
  (0 ":irc.foonet.org 003 tester :This server was created Tue, 04 May 2021 
05:06:18 UTC")
  (0 ":irc.foonet.org 004 tester irc.foonet.org oragono-2.6.0-7481bf0385b95b16 
BERTZios CEIMRUabefhiklmnoqstuv Iabefhkloqv")
  (0 ":irc.foonet.org 005 tester AWAYLEN=390 BOT=B CASEMAPPING=ascii 
CHANLIMIT=#:100 CHANMODES=Ibe,k,fl,CEMRUimnstu CHANNELLEN=64 CHANTYPES=# 
ELIST=U EXCEPTS EXTBAN=,m FORWARD=f INVEX KICKLEN=390 :are supported by this 
server")
- (0 ":irc.foonet.org 005 tester MAXLIST=beI:60 MAXTARGETS=4 MODES MONITOR=100 
NETWORK=foonet NICKLEN=32 PREFIX=(qaohv)~&@%+ STATUSMSG=~&@%+ 
TARGMAX=NAMES:1,LIST:1,KICK:1,WHOIS:1,USERHOST:10,PRIVMSG:4,TAGMSG:4,NOTICE:4,MONITOR:100
 TOPICLEN=390 UTF8MAPPING=rfc8265 UTF8ONLY WHOX :are supported by this server")
+ (0 ":irc.foonet.org 005 tester MAXLIST=beI:60 MAXTARGETS=4 MODES MONITOR=100 
NETWORK=FooNet NICKLEN=32 PREFIX=(qaohv)~&@%+ STATUSMSG=~&@%+ 
TARGMAX=NAMES:1,LIST:1,KICK:1,WHOIS:1,USERHOST:10,PRIVMSG:4,TAGMSG:4,NOTICE:4,MONITOR:100
 TOPICLEN=390 UTF8MAPPING=rfc8265 UTF8ONLY WHOX :are supported by this server")
  (0 ":irc.foonet.org 005 tester draft/CHATHISTORY=100 :are supported by this 
server")
  (0 ":irc.foonet.org 251 tester :There are 0 users and 3 invisible on 1 
server(s)")
  (0 ":irc.foonet.org 252 tester 0 :IRC Operators online")
@@ -18,28 +18,24 @@
  (0 ":irc.foonet.org 266 tester 3 3 :Current global users 3, max 3")
  (0 ":irc.foonet.org 422 tester :MOTD File is missing"))
 
-((mode-user 8 "MODE tester +i")
+((mode-user 10 "MODE tester +i")
  (0 ":irc.foonet.org 221 tester +i")
  (0 ":irc.foonet.org NOTICE tester :This server is in debug mode and is 
logging all user I/O. If you do not wish for everything you send to be readable 
by the server owner(s), please disconnect."))
 
-((join 2 "JOIN #chan")
+((join 6 "JOIN #chan")
  (0 ":tester!~u@9g6b728983yd2.irc JOIN #chan")
  (0 ":irc.foonet.org 353 tester = #chan :alice tester @bob")
  (0 ":irc.foonet.org 366 tester #chan :End of NAMES list"))
 
-((mode 2 "MODE #chan")
+((mode 5 "MODE #chan")
  (0 ":irc.foonet.org 324 tester #chan +nt")
  (0 ":irc.foonet.org 329 tester #chan 1620104779")
  (0.1 ":bob!~u@rz2v467q4rwhy.irc PRIVMSG #chan :tester, welcome!")
- (0.1 ":alice!~u@rz2v467q4rwhy.irc PRIVMSG #chan :tester, welcome!")
- (0.1 ":bob!~u@rz2v467q4rwhy.irc PRIVMSG #chan :alice: But, as it seems, did 
violence on herself.")
- (0.1 ":alice!~u@rz2v467q4rwhy.irc PRIVMSG #chan :bob: Well, this is the 
forest of Arden.")
- (0.1 ":bob!~u@rz2v467q4rwhy.irc PRIVMSG #chan :alice: Signior Iachimo will 
not from it. Pray, let us follow 'em.")
- (0.1 ":alice!~u@rz2v467q4rwhy.irc PRIVMSG #chan :bob: Our queen and all her 
elves come here anon.")
- (0.1 ":bob!~u@rz2v467q4rwhy.irc PRIVMSG #chan :alice: The ground is bloody; 
search about the churchyard.")
- (0.1 ":alice!~u@rz2v467q4rwhy.irc PRIVMSG #chan :bob: You have discharged 
this honestly: keep it to yourself. Many likelihoods informed me of this 
before, which hung so tottering in the balance that I could neither believe nor 
misdoubt. Pray you, leave me: stall this in your bosom; and I thank you for 
your honest care. I will speak with you further anon.")
- (0.1 ":bob!~u@rz2v467q4rwhy.irc PRIVMSG #chan :alice: Give me that mattock, 
and the wrenching iron.")
- (0.1 ":alice!~u@rz2v467q4rwhy.irc PRIVMSG #chan :bob: Stand you! You have 
land enough of your own; but he added to your having, gave you some ground.")
- (0.1 ":bob!~u@rz2v467q4rwhy.irc PRIVMSG #chan :alice: Excellent workman! Thou 
canst not paint a man so bad as is thyself.")
- (0.1 ":alice!~u@rz2v467q4rwhy.irc PRIVMSG #chan :bob: And will you, being a 
man of your breeding, be married under a bush, like a beggar ? Get you to 
church, and have a good priest that can tell you what marriage is: this fellow 
will but join you together as they join wainscot; then one of you will prove a 
shrunk panel, and like green timber, warp, warp.")
- (0.1 ":bob!~u@rz2v467q4rwhy.irc PRIVMSG #chan :alice: Live, and be 
prosperous; and farewell, good fellow."))
+ (0 ":alice!~u@rz2v467q4rwhy.irc PRIVMSG #chan :None better than to let him 
fetch off his drum, which you hear him so confidently undertake to do.")
+ (0 ":alice!~u@rz2v467q4rwhy.irc PRIVMSG #chan :bob: Still we went coupled and 
inseparable.")
+ (0 ":bob!~u@rz2v467q4rwhy.irc PRIVMSG #chan :alice: Give me your hand. This 
hand is moist, my lady."))
+
+((privmsg 5 "PRIVMSG #chan :hey")
+ (0 ":bob!~u@rz2v467q4rwhy.irc PRIVMSG #chan :You have paid the heavens your 
function, and the prisoner the very debt of your calling. I have laboured for 
the poor gentleman to the extremest shore of my modesty; but my brother justice 
have I found so severe, that he hath forced me to tell him he is indeed 
Justice.")
+ (0 ":alice!~u@rz2v467q4rwhy.irc PRIVMSG #chan :bob: In the sick air: let not 
thy sword skip one.")
+ (0 ":alice!~u@rz2v467q4rwhy.irc PRIVMSG #chan :The web of our life is of a 
mingled yarn, good and ill together: our virtues would be proud if our faults 
whipped them not; and our crimes would despair if they were not cherished by 
our virtues."))
diff --git a/test/lisp/erc/resources/sasl/scram-sha-1.eld 
b/test/lisp/erc/resources/sasl/scram-sha-1.eld
index 49980e9e12a..d6adf529c5d 100644
--- a/test/lisp/erc/resources/sasl/scram-sha-1.eld
+++ b/test/lisp/erc/resources/sasl/scram-sha-1.eld
@@ -42,6 +42,6 @@
  (0 ":jaguar.test 372 jilles :   ~~ or rkpryyrag gb rnpu bgure ~~")
  (0 ":jaguar.test 376 jilles :End of message of the day."))
 
-((mode-user 1.2 "MODE jilles +i")
+((mode-user 10 "MODE jilles +i")
  (0 ":jilles!~jilles@127.0.0.1 MODE jilles :+ri")
  (0 ":jaguar.test 306 jilles :You have been marked as being away"))
diff --git a/test/lisp/erc/resources/sasl/scram-sha-256.eld 
b/test/lisp/erc/resources/sasl/scram-sha-256.eld
index 74de9a23ecf..8b16f7109cf 100644
--- a/test/lisp/erc/resources/sasl/scram-sha-256.eld
+++ b/test/lisp/erc/resources/sasl/scram-sha-256.eld
@@ -42,6 +42,6 @@
  (0 ":jaguar.test 372 jilles :   ~~ or rkpryyrag gb rnpu bgure ~~")
  (0 ":jaguar.test 376 jilles :End of message of the day."))
 
-((mode-user 1.2 "MODE jilles +i")
+((mode-user 10 "MODE jilles +i")
  (0 ":jilles!~jilles@127.0.0.1 MODE jilles :+ri")
  (0 ":jaguar.test 306 jilles :You have been marked as being away"))
diff --git a/test/lisp/eshell/em-cmpl-tests.el 
b/test/lisp/eshell/em-cmpl-tests.el
index 29a41625d5e..dd3c338ac54 100644
--- a/test/lisp/eshell/em-cmpl-tests.el
+++ b/test/lisp/eshell/em-cmpl-tests.el
@@ -243,14 +243,17 @@ See <lisp/eshell/esh-cmd.el>."
                   "echo $(eshell/echo"))))
 
 (ert-deftest em-cmpl-test/special-ref-completion/type ()
-  "Test completion of the start of special references like \"#<buffer\".
+  "Test completion of the start of special reference types like \"#<buffer\".
 See <lisp/eshell/esh-arg.el>."
   (with-temp-eshell
    (should (equal (eshell-insert-and-complete "echo hi > #<buf")
                   "echo hi > #<buffer ")))
   (with-temp-eshell
    (should (equal (eshell-insert-and-complete "echo hi > #<proc")
-                  "echo hi > #<process "))))
+                  "echo hi > #<process ")))
+  (with-temp-eshell
+   (should (equal (eshell-insert-and-complete "echo hi > #<mark")
+                  "echo hi > #<marker "))))
 
 (ert-deftest em-cmpl-test/special-ref-completion/implicit-buffer ()
   "Test completion of special references like \"#<buf>\".
@@ -282,6 +285,31 @@ See <lisp/eshell/esh-arg.el>."
                       (format "echo hi > #<buffer %s> "
                               (string-replace " " "\\ " bufname))))))))
 
+(ert-deftest em-cmpl-test/special-ref-completion/marker ()
+  "Test completion of special references like \"#<marker 1 buf>\".
+See <lisp/eshell/esh-arg.el>."
+  (let (bufname)
+    (with-temp-buffer
+      (setq bufname (rename-buffer "my-buffer" t))
+      ;; Complete the buffer name in various forms.
+      (with-temp-eshell
+       (should (equal (eshell-insert-and-complete
+                       "echo hi > #<marker 1 my-buf")
+                      (format "echo hi > #<marker 1 %s> " bufname))))
+      (with-temp-eshell
+       (should (equal (eshell-insert-and-complete
+                       "echo hi > #<marker 1 #<my-buf")
+                      (format "echo hi > #<marker 1 #<%s>> " bufname))))
+      (with-temp-eshell
+       (should (equal (eshell-insert-and-complete
+                       "echo hi > #<marker 1 #<buffer my-buf")
+                      (format "echo hi > #<marker 1 #<buffer %s>> " bufname))))
+      ;; Partially-complete the "buffer" type name.
+      (with-temp-eshell
+       (should (equal (eshell-insert-and-complete
+                       "echo hi > #<marker 1 #<buf")
+                      "echo hi > #<marker 1 #<buffer "))))))
+
 (ert-deftest em-cmpl-test/variable-ref-completion ()
   "Test completion of variable references like \"$var\".
 See <lisp/eshell/esh-var.el>."
diff --git a/test/lisp/eshell/em-extpipe-tests.el 
b/test/lisp/eshell/em-extpipe-tests.el
index bdffcd9b320..6984ec2de59 100644
--- a/test/lisp/eshell/em-extpipe-tests.el
+++ b/test/lisp/eshell/em-extpipe-tests.el
@@ -55,7 +55,9 @@
                              "temp\\([^>]\\|\\'\\)" temp
                              (string-replace
                               "#<buffer temp>"
-                              (concat "#<buffer " (buffer-name temp-buffer) 
">")
+                              (format "#<buffer %s>"
+                                      (eshell-quote-argument
+                                       (buffer-name temp-buffer)))
                               input))))
                        ,@body)
                    (when (buffer-name temp-buffer)
@@ -110,7 +112,7 @@
    '(progn
       (ignore
        (eshell-set-output-handle 1 'overwrite
-                                (get-buffer-create "temp")))
+                                (eshell-get-buffer "temp")))
       (eshell-named-command "sh"
                            (list "-c" "echo \"bar\" | rev"))))
   (with-substitute-for-temp
@@ -133,7 +135,7 @@
    '(progn
       (ignore
        (eshell-set-output-handle 1 'overwrite
-                                (get-buffer-create "quux")))
+                                (eshell-get-buffer "quux")))
       (ignore
        (eshell-set-output-handle 1 'append
                                 (get-process "other")))
diff --git a/test/lisp/eshell/esh-arg-tests.el 
b/test/lisp/eshell/esh-arg-tests.el
index c883db3907f..1eb8e08b883 100644
--- a/test/lisp/eshell/esh-arg-tests.el
+++ b/test/lisp/eshell/esh-arg-tests.el
@@ -118,7 +118,68 @@ treated literally, as a backslash and a newline."
      (format "echo #<buffer %s>" (buffer-name))
      (current-buffer))))
 
-(ert-deftest esh-arg-test/special-reference/special ()
+(ert-deftest esh-arg-test/special-reference/marker ()
+  "Test that \"#<marker N buf>\" refers to a marker in the buffer \"buf\"."
+  (with-temp-buffer
+    (rename-buffer "my-buffer" t)
+    (insert "hello")
+    (let ((marker (make-marker)))
+      (set-marker marker 1 (current-buffer))
+      (eshell-command-result-equal
+       (format "echo #<marker 1 %s>" (buffer-name))
+       marker))))
+
+(ert-deftest esh-arg-test/special-reference/quoted ()
+  "Test that '#<buffer \"foo bar\">' refers to the buffer \"foo bar\"."
+  (with-temp-buffer
+    (rename-buffer "foo bar" t)
+    (eshell-command-result-equal
+     (format "echo #<buffer \"%s\">" (buffer-name))
+     (current-buffer))
+    (eshell-command-result-equal
+     (format "echo #<buffer '%s'>" (buffer-name))
+     (current-buffer))))
+
+(ert-deftest esh-arg-test/special-reference/nested ()
+  "Test that nested special references work correctly."
+  (with-temp-buffer
+    (rename-buffer "my-buffer" t)
+    (insert "hello")
+    (let ((marker (make-marker)))
+      (set-marker marker 1 (current-buffer))
+      (eshell-command-result-equal
+       (format "echo #<marker 1 #<%s>>" (buffer-name))
+       marker)
+      (eshell-command-result-equal
+       (format "echo #<marker 1 #<buffer %s>>" (buffer-name))
+       marker))))
+
+(ert-deftest esh-arg-test/special-reference/var-expansion ()
+  "Test that variable expansion inside special references works."
+  (with-temp-buffer
+    (rename-buffer "my-buffer" t)
+    (let ((eshell-test-value (buffer-name)))
+      (eshell-command-result-equal
+       "echo #<buffer $eshell-test-value>"
+       (current-buffer))
+      (eshell-command-result-equal
+       "echo #<buffer \"$eshell-test-value\">"
+       (current-buffer)))))
+
+(ert-deftest esh-arg-test/special-reference/lisp-form ()
+  "Test that Lisp forms inside special references work."
+  (with-temp-eshell
+   (let ((marker (make-marker))
+         eshell-test-value)
+     (set-marker marker 1 (current-buffer))
+     (eshell-insert-command
+      "setq eshell-test-value #<marker 1 (current-buffer)>")
+     (should (equal eshell-test-value marker))
+     (eshell-insert-command
+      "setq eshell-test-value #<marker 1 #<buffer (buffer-name)>>")
+     (should (equal eshell-test-value marker)))))
+
+(ert-deftest esh-arg-test/special-reference/special-characters ()
   "Test that \"#<...>\" works correctly when escaping special characters."
   (with-temp-buffer
     (rename-buffer "<my buffer>" t)
diff --git a/test/lisp/eshell/eshell-tests.el b/test/lisp/eshell/eshell-tests.el
index b02e5fca592..d2ef44ae507 100644
--- a/test/lisp/eshell/eshell-tests.el
+++ b/test/lisp/eshell/eshell-tests.el
@@ -195,6 +195,25 @@ insert the queued one at the next prompt, and finally run 
it."
    (eshell-send-input)
    (eshell-match-output "(\"hello\" \"there\")")))
 
+(ert-deftest eshell-test/yank-output ()
+  "Test that yanking a line of output into the next prompt works (bug#66469)."
+  (with-temp-eshell
+   (eshell-insert-command "echo hello")
+   ;; Go to the output and kill the line of text.
+   (forward-line -1)
+   (kill-line)
+   ;; Go to the last prompt and yank the previous output.
+   (goto-char (point-max))
+   (yank)
+   ;; Go to the beginning of the prompt and add some text.
+   (move-beginning-of-line 1)
+   (insert-and-inherit "echo ")
+   ;; Make sure when we go to the beginning of the line, we go to the
+   ;; right spot (before the "echo").
+   (move-end-of-line 1)
+   (move-beginning-of-line 1)
+   (should (looking-at "echo hello"))))
+
 (provide 'eshell-tests)
 
 ;;; eshell-tests.el ends here
diff --git a/test/lisp/filenotify-tests.el b/test/lisp/filenotify-tests.el
index 57099add08b..eb485a10a92 100644
--- a/test/lisp/filenotify-tests.el
+++ b/test/lisp/filenotify-tests.el
@@ -973,8 +973,7 @@ delivered."
             (setq file-notify--test-desc auto-revert-notify-watch-descriptor)
 
            ;; GKqueueFileMonitor does not report the `changed' event.
-           (skip-unless
-             (not (eq (file-notify--test-monitor) 'GKqueueFileMonitor)))
+           (skip-when (eq (file-notify--test-monitor) 'GKqueueFileMonitor))
 
            ;; Check, that file notification has been used.
            (should auto-revert-mode)
@@ -1708,6 +1707,71 @@ the file watch."
 (file-notify--deftest-remote file-notify-test11-symlinks
   "Check `file-notify-test11-symlinks' for remote files.")
 
+(ert-deftest file-notify-test12-unmount ()
+  "Check that file notification stop after unmounting the filesystem."
+  :tags '(:expensive-test)
+  (skip-unless (file-notify--test-local-enabled))
+  ;; This test does not work for w32notify.
+  (skip-when (string-equal (file-notify--test-library) "w32notify"))
+
+  (unwind-protect
+      (progn
+       (setq file-notify--test-tmpfile (file-notify--test-make-temp-name))
+       ;; File monitors like kqueue insist, that the watched file
+       ;; exists.  Directory monitors are not bound to this
+       ;; restriction.
+       (when (string-equal (file-notify--test-library) "kqueue")
+         (write-region
+          "any text" nil file-notify--test-tmpfile nil 'no-message))
+
+       (should
+        (setq file-notify--test-desc
+              (file-notify--test-add-watch
+                file-notify--test-tmpfile
+                '(attribute-change change) #'file-notify--test-event-handler)))
+        (should (file-notify-valid-p file-notify--test-desc))
+
+        ;; Unmounting the filesystem should stop watching.
+        (file-notify--test-with-actions '(stopped)
+          ;; We emulate unmounting by calling
+          ;; `file-notify-handle-event' with a corresponding event.
+          (file-notify-handle-event
+           (make-file-notify
+            :-event
+            (list file-notify--test-desc
+                  (pcase (file-notify--test-library)
+                    ((or "inotify" "inotifywait") '(unmount isdir))
+                    ((or "gfilenotify" "gio") '(unmounted))
+                    ("kqueue" '(revoke))
+                    (err (ert-fail (format "Library %s not supported" err))))
+                  (pcase (file-notify--test-library)
+                    ("kqueue" (file-local-name file-notify--test-tmpfile))
+                    (_ (file-local-name file-notify--test-tmpdir)))
+                  ;; In the inotify case, there is a 4th slot `cookie'.
+                  ;; Since it is unused for `unmount', we ignore it.
+                  )
+            :-callback
+            (pcase (file-notify--test-library)
+              ("inotify" #'file-notify--callback-inotify)
+              ("gfilenotify" #'file-notify--callback-gfilenotify)
+              ("kqueue" #'file-notify--callback-kqueue)
+              ((or "inotifywait" "gio") #'file-notify-callback)
+              (err (ert-fail (format "Library %s not supported" err)))))))
+
+        ;; The watch has been stopped.
+        (should-not (file-notify-valid-p file-notify--test-desc))
+
+        ;; The environment shall be cleaned up.
+        (when (string-equal (file-notify--test-library) "kqueue")
+          (delete-file file-notify--test-tmpfile))
+        (file-notify--test-cleanup-p))
+
+    ;; Cleanup.
+    (file-notify--test-cleanup)))
+
+(file-notify--deftest-remote file-notify-test12-unmount
+  "Check `file-notify-test12-unmount' for remote files.")
+
 (defun file-notify-test-all (&optional interactive)
   "Run all tests for \\[file-notify]."
   (interactive "p")
diff --git a/test/lisp/files-tests.el b/test/lisp/files-tests.el
index 0e460009cea..63ce4dab7eb 100644
--- a/test/lisp/files-tests.el
+++ b/test/lisp/files-tests.el
@@ -683,6 +683,24 @@ unquoted file names."
   (files-tests--with-temp-non-special-and-file-name-handler (tmpfile nospecial)
     (should (equal (expand-file-name nospecial) nospecial))))
 
+(ert-deftest files-tests-file-name-non-special-expand-file-name-tilde ()
+  (let ((process-environment
+         (cons (format "HOME=%s" (file-truename temporary-file-directory))
+               process-environment))
+        abbreviated-home-dir)
+    (files-tests--with-temp-non-special (tmpfile nospecial)
+      (let (file-name-handler-alist)
+        (setq nospecial (file-name-quote (abbreviate-file-name tmpfile))))
+      (should (equal (expand-file-name nospecial)
+                     (expand-file-name (file-name-unquote nospecial t)))))
+    (files-tests--with-temp-non-special-and-file-name-handler (tmpfile 
nospecial)
+      (let (file-name-handler-alist)
+        (setq nospecial (file-name-quote (abbreviate-file-name tmpfile))))
+      (should-not
+       (equal (expand-file-name nospecial)
+              ;; The file name handler deletes the ".special" extension.
+              (expand-file-name (file-name-unquote nospecial t)))))))
+
 (ert-deftest files-tests-file-name-non-special-file-accessible-directory-p ()
   (files-tests--with-temp-non-special (tmpdir nospecial-dir t)
     (should (file-accessible-directory-p nospecial-dir)))
diff --git a/test/lisp/net/socks-tests.el b/test/lisp/net/socks-tests.el
index 958e2ff44a8..1a4bac37bf9 100644
--- a/test/lisp/net/socks-tests.el
+++ b/test/lisp/net/socks-tests.el
@@ -63,21 +63,21 @@
     (process-put proc 'socks-state socks-state-waiting)
     (process-put proc 'socks-server-protocol 4)
     (ert-info ("Receive initial incomplete segment")
-      (socks-filter proc (concat [0 90 0 0 93 184 216]))
-      ;; From example.com: OK status ^      ^ msg start
+      (socks-filter proc (unibyte-string 0 90 0 0 93 184 216))
+      ;; From example.com: OK status       ^      ^ msg start
       (ert-info ("State still set to waiting")
         (should (eq (process-get proc 'socks-state) socks-state-waiting)))
       (ert-info ("Response field is nil because processing incomplete")
         (should-not (process-get proc 'socks-response)))
       (ert-info ("Scratch field holds stashed partial payload")
-        (should (string= (concat [0 90 0 0 93 184 216])
+        (should (string= (unibyte-string 0 90 0 0 93 184 216)
                          (process-get proc 'socks-scratch)))))
     (ert-info ("Last part arrives")
       (socks-filter proc "\42") ; ?\" 34
       (ert-info ("State transitions to complete (length check passes)")
         (should (eq (process-get proc 'socks-state) socks-state-connected)))
       (ert-info ("Scratch and response fields hold stash w. last chunk")
-        (should (string= (concat [0 90 0 0 93 184 216 34])
+        (should (string= (unibyte-string 0 90 0 0 93 184 216 34)
                          (process-get proc 'socks-response)))
         (should (string= (process-get proc 'socks-response)
                          (process-get proc 'socks-scratch)))))
@@ -133,17 +133,19 @@ Vectors must match verbatim.  Strings are considered 
regex patterns.")
 (defun socks-tests-canned-server-create ()
   "Create and return a fake SOCKS server."
   (let* ((port (nth 2 socks-server))
-         (name (format "socks-server:%d" port))
+         (name (format "socks-server:%s"
+                       (if (numberp port) port (ert-test-name 
(ert-running-test)))))
          (pats socks-tests-canned-server-patterns)
          (filt (lambda (proc line)
                  (pcase-let ((`(,pat . ,resp) (pop pats)))
                    (unless (or (and (vectorp pat) (equal pat (vconcat line)))
-                               (string-match-p pat line))
+                               (and (stringp pat) (string-match-p pat line)))
                      (error "Unknown request: %s" line))
+                   (setq resp (apply #'unibyte-string (append resp nil)))
                    (let ((print-escape-control-characters t))
                      (message "[%s] <- %s" name (prin1-to-string line))
                      (message "[%s] -> %s" name (prin1-to-string resp)))
-                   (process-send-string proc (concat resp)))))
+                   (process-send-string proc resp))))
          (serv (make-network-process :server 1
                                      :buffer (get-buffer-create name)
                                      :filter filt
@@ -151,8 +153,10 @@ Vectors must match verbatim.  Strings are considered regex 
patterns.")
                                      :family 'ipv4
                                      :host 'local
                                      :coding 'binary
-                                     :service port)))
+                                     :service (or port t))))
     (set-process-query-on-exit-flag serv nil)
+    (unless (numberp (nth 2 socks-server))
+      (setf (nth 2 socks-server) (process-contact serv :service)))
     serv))
 
 (defvar socks-tests--hello-world-http-request-pattern
@@ -161,9 +165,9 @@ Vectors must match verbatim.  Strings are considered regex 
patterns.")
                          "Content-Length: 13\r\n\r\n"
                          "Hello World!\n")))
 
-(defun socks-tests-perform-hello-world-http-request ()
+(defun socks-tests-perform-hello-world-http-request (&optional method)
   "Start canned server, validate hello-world response, and finalize."
-  (let* ((url-gateway-method 'socks)
+  (let* ((url-gateway-method (or method 'socks))
          (url (url-generic-parse-url "http://example.com";))
          (server (socks-tests-canned-server-create))
          ;;
@@ -191,8 +195,9 @@ Vectors must match verbatim.  Strings are considered regex 
patterns.")
 
 (ert-deftest socks-tests-v4-basic ()
   "Show correct preparation of SOCKS4 connect command (Bug#46342)."
-  (let ((socks-server '("server" "127.0.0.1" 10079 4))
+  (let ((socks-server '("server" "127.0.0.1" t 4))
         (url-user-agent "Test/4-basic")
+        (socks-username "foo")
         (socks-tests-canned-server-patterns
          `(([4 1 0 80 93 184 216 34 ?f ?o ?o 0] . [0 90 0 0 0 0 0 0])
            ,socks-tests--hello-world-http-request-pattern))
@@ -201,11 +206,35 @@ Vectors must match verbatim.  Strings are considered 
regex patterns.")
       (cl-letf (((symbol-function 'socks-nslookup-host)
                  (lambda (host)
                    (should (equal host "example.com"))
-                   (list 93 184 216 34)))
-                ((symbol-function 'user-full-name)
-                 (lambda (&optional _) "foo")))
+                   (list 93 184 216 34))))
         (socks-tests-perform-hello-world-http-request)))))
 
+(ert-deftest socks-tests-v4a-basic ()
+  "Show correct preparation of SOCKS4a connect command."
+  (let ((socks-server '("server" "127.0.0.1" t 4a))
+        (socks-username "foo")
+        (url-user-agent "Test/4a-basic")
+        (socks-tests-canned-server-patterns
+         `(([4 1 0 80 0 0 0 1 ?f ?o ?o 0 ?e ?x ?a ?m ?p ?l ?e ?. ?c ?o ?m 0]
+            . [0 90 0 0 0 0 0 0])
+           ,socks-tests--hello-world-http-request-pattern)))
+    (ert-info ("Make HTTP request over SOCKS4A")
+      (socks-tests-perform-hello-world-http-request))))
+
+(ert-deftest socks-tests-v4a-error ()
+  "Show error signaled when destination address rejected."
+  (let ((socks-server '("server" "127.0.0.1" t 4a))
+        (url-user-agent "Test/4a-basic")
+        (socks-username "")
+        (socks-tests-canned-server-patterns
+         `(([4 1 0 80 0 0 0 1 0 ?e ?x ?a ?m ?p ?l ?e ?. ?c ?o ?m 0]
+            . [0 91 0 0 0 0 0 0])
+           ,socks-tests--hello-world-http-request-pattern)))
+    (ert-info ("Make HTTP request over SOCKS4A")
+      (let ((err (should-error
+                  (socks-tests-perform-hello-world-http-request))))
+        (should (equal err '(error "SOCKS: Rejected or failed")))))))
+
 ;; Replace first pattern below with ([5 3 0 1 2] . [5 2]) to validate
 ;; against curl 7.71 with the following options:
 ;; $ curl --verbose -U foo:bar --proxy socks5h://127.0.0.1:10080 example.com
@@ -213,7 +242,7 @@ Vectors must match verbatim.  Strings are considered regex 
patterns.")
 (ert-deftest socks-tests-v5-auth-user-pass ()
   "Verify correct handling of SOCKS5 user/pass authentication."
   (should (assq 2 socks-authentication-methods))
-  (let ((socks-server '("server" "127.0.0.1" 10080 5))
+  (let ((socks-server '("server" "127.0.0.1" t 5))
         (socks-username "foo")
         (socks-password "bar")
         (url-user-agent "Test/auth-user-pass")
@@ -247,7 +276,7 @@ Vectors must match verbatim.  Strings are considered regex 
patterns.")
 (ert-deftest socks-tests-v5-auth-user-pass-blank ()
   "Verify correct SOCKS5 user/pass authentication with empty pass."
   (should (assq 2 socks-authentication-methods))
-  (let ((socks-server '("server" "127.0.0.1" 10081 5))
+  (let ((socks-server '("server" "127.0.0.1" t 5))
         (socks-username "foo") ; defaults to (user-login-name)
         (socks-password "") ; simulate user hitting enter when prompted
         (url-user-agent "Test/auth-user-pass-blank")
@@ -264,9 +293,9 @@ Vectors must match verbatim.  Strings are considered regex 
patterns.")
 ;; against curl 7.71 with the following options:
 ;; $ curl --verbose --proxy socks5h://127.0.0.1:10082 example.com
 
-(ert-deftest socks-tests-v5-auth-none ()
+(defun socks-tests-v5-auth-none (method)
   "Verify correct handling of SOCKS5 when auth method 0 requested."
-  (let ((socks-server '("server" "127.0.0.1" 10082 5))
+  (let ((socks-server '("server" "127.0.0.1" t 5))
         (socks-authentication-methods (append socks-authentication-methods
                                               nil))
         (url-user-agent "Test/auth-none")
@@ -278,7 +307,24 @@ Vectors must match verbatim.  Strings are considered regex 
patterns.")
     (socks-unregister-authentication-method 2)
     (should-not (assq 2 socks-authentication-methods))
     (ert-info ("Make HTTP request over SOCKS5 with no auth method")
-      (socks-tests-perform-hello-world-http-request)))
+      (socks-tests-perform-hello-world-http-request method)))
   (should (assq 2 socks-authentication-methods)))
 
+(ert-deftest socks-tests-v5-auth-none ()
+  (socks-tests-v5-auth-none 'socks))
+
+;; This simulates the top-level advice around `open-network-stream'
+;; that's applied when loading the library with a non-nil
+;; `socks-override-functions'.
+(ert-deftest socks-override-functions ()
+  (should-not socks-override-functions)
+  (should-not (advice-member-p #'socks--open-network-stream
+                               'open-network-stream))
+  (advice-add 'open-network-stream :around #'socks--open-network-stream)
+  (unwind-protect (let ((socks-override-functions t))
+                    (socks-tests-v5-auth-none 'native))
+    (advice-remove 'open-network-stream #'socks--open-network-stream))
+  (should-not (advice-member-p #'socks--open-network-stream
+                               'open-network-stream)))
+
 ;;; socks-tests.el ends here
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index 0136e0abd5b..a2460686e96 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -2325,6 +2325,17 @@ is greater than 10.
       (should (string-equal (expand-file-name local dir) dir))
       (should (string-equal (expand-file-name (concat dir local)) dir)))))
 
+;; The following test is inspired by Bug#65685.
+(ert-deftest tramp-test05-expand-file-name-tilde ()
+  "Check `expand-file-name'."
+  (skip-unless (tramp--test-enabled))
+  (skip-unless (not (tramp--test-ange-ftp-p)))
+
+  (let ((dir (file-remote-p ert-remote-temporary-file-directory))
+       (tramp-tolerate-tilde t))
+    (should (string-equal (expand-file-name (concat dir "~"))
+                         (expand-file-name (concat dir "/:~"))))))
+
 (ert-deftest tramp-test06-directory-file-name ()
   "Check `directory-file-name'.
 This checks also `file-name-as-directory', `file-name-directory',
diff --git a/test/lisp/progmodes/compile-tests.el 
b/test/lisp/progmodes/compile-tests.el
index 078eef36774..d497644c389 100644
--- a/test/lisp/progmodes/compile-tests.el
+++ b/test/lisp/progmodes/compile-tests.el
@@ -121,9 +121,7 @@
     ;; cucumber
     (cucumber "Scenario: undefined step  # features/cucumber.feature:3"
      29 nil 3 "features/cucumber.feature")
-    ;; This rule is actually handled by the `cucumber' pattern but when
-    ;; `omake' is included, then `gnu' matches it first.
-    (gnu "      /home/gusev/.rvm/foo/bar.rb:500:in `_wrap_assertion'"
+    (cucumber "      /home/gusev/.rvm/foo/bar.rb:500:in `_wrap_assertion'"
      1 nil 500 "/home/gusev/.rvm/foo/bar.rb")
     ;; edg-1 edg-2
     (edg-1 "build/intel/debug/../../../struct.cpp(42): error: identifier 
\"foo\" is undefined"
@@ -312,10 +310,6 @@
      1 nil 109 "..\\src\\ctrl\\lister.c")
     (watcom "..\\src\\ctrl\\lister.c(120): Warning! W201: Unreachable code"
      1 nil 120 "..\\src\\ctrl\\lister.c")
-    ;; omake
-    ;; FIXME: This doesn't actually test the omake rule.
-    (gnu "      alpha.c:5:15: error: expected ';' after expression"
-     1 15 5 "alpha.c")
     ;; oracle
     (oracle "Semantic error at line 528, column 5, file erosacqdb.pc:"
      1 5 528 "erosacqdb.pc")
@@ -497,8 +491,22 @@ The test data is in `compile-tests--test-regexps-data'."
     (font-lock-mode -1)
     (let ((compilation-num-errors-found 0)
           (compilation-num-warnings-found 0)
-          (compilation-num-infos-found 0))
-      (mapc #'compile--test-error-line compile-tests--test-regexps-data)
+          (compilation-num-infos-found 0)
+          (all-rules (mapcar #'car compilation-error-regexp-alist-alist)))
+
+      ;; Test all built-in rules except `omake' to avoid interference.
+      (let ((compilation-error-regexp-alist (remq 'omake all-rules)))
+        (mapc #'compile--test-error-line compile-tests--test-regexps-data))
+
+      ;; Test the `omake' rule separately.
+      ;; This doesn't actually test the `omake' rule itself but its
+      ;; indirect effects.
+      (let ((compilation-error-regexp-alist all-rules)
+            (test
+             '(gnu "      alpha.c:5:15: error: expected ';' after expression"
+                   1 15 5 "alpha.c")))
+        (compile--test-error-line test))
+
       (should (eq compilation-num-errors-found 100))
       (should (eq compilation-num-warnings-found 35))
       (should (eq compilation-num-infos-found 28)))))
diff --git a/test/lisp/progmodes/cperl-mode-resources/cperl-bug-65834.pl 
b/test/lisp/progmodes/cperl-mode-resources/cperl-bug-65834.pl
new file mode 100644
index 00000000000..775a113ac17
--- /dev/null
+++ b/test/lisp/progmodes/cperl-mode-resources/cperl-bug-65834.pl
@@ -0,0 +1,5 @@
+# -*- mode: cperl -*-
+if ($t->[3]<<5) {
+  return 0;
+}
+# comment
diff --git a/test/lisp/progmodes/cperl-mode-resources/cperl-bug-66145.pl 
b/test/lisp/progmodes/cperl-mode-resources/cperl-bug-66145.pl
new file mode 100644
index 00000000000..70f12346ded
--- /dev/null
+++ b/test/lisp/progmodes/cperl-mode-resources/cperl-bug-66145.pl
@@ -0,0 +1,62 @@
+# The original code, from the bug report, with variables renamed
+
+sub foo {
+  # Here we do something like
+  # this: $array_comment [ num_things ]->{key_comment}
+}
+
+# --------------------------------------------------
+# Comments containing hash and array sigils
+
+# This is an @array, and this is a %hash
+# $array_comment[$index] = $hash_comment{key_comment}
+# The last element has the index $#array_comment
+# my @a_slice = @array_comment[1,2,3];
+# my @h_slice = @hash_comment{qw(a b c)};
+# my %a_set   = %array_comment[1,2,3];
+# my %h_set   = %hash_comment{qw(a b c)};
+
+# --------------------------------------------------
+# in POD
+
+=head1 NAME
+
+cperl-bug-66145 - don't fontify arrays and hashes in POD
+
+=head1 SYNOPSIS
+
+   $array_comment[$index] = $hash_comment{key_comment};
+   @array_comment = qw(in pod);
+   %hash_comment  = key_comment => q(pod);
+   @array_comment = @array_comment[1,2,3];
+   @array_comment = @hash_comment{qw(a b c)};
+   %hash_comment  = %array_comment[1,2,3];
+   %hash_comment  = %hash_comment{qw(a b c)};
+
+=cut
+
+# --------------------------------------------------
+# in strings
+
+my @strings = (
+    q/$array_string[$index] = $hash_string{key_string};/,
+    q/my @array_string = qw(in unquoted string);/,
+    q/my %hash_string  = (key_string => q(pod);)/,
+    q/@array_string    = @array_string[1,2,3];/,
+    q/@array_string    = @hash_string{qw(a b c)};/,
+    q/%hash_string     = %array_string[1,2,3];/,
+    q/%hash_string     = %hash_string{qw(a b c)};/,
+);
+
+# --------------------------------------------------
+# in a HERE-document (perl-mode has an extra face for that)
+
+my $here = <<DONE;
+   $array_here[$index_here] = $hash_here{key_here};
+   @array_here = qw(in a hrere-document);
+   %hash_here  = key_here => q(pod);
+   @array_here = @array_here[1,2,3];
+   @array_here = @hash_here{qw(a b c)};
+   %hash_here  = %array_here[1,2,3];
+   %hash_here  = %hash_here{qw(a b c)};
+DONE
diff --git a/test/lisp/progmodes/cperl-mode-resources/cperl-bug-66161.pl 
b/test/lisp/progmodes/cperl-mode-resources/cperl-bug-66161.pl
new file mode 100644
index 00000000000..e39cfdd3b24
--- /dev/null
+++ b/test/lisp/progmodes/cperl-mode-resources/cperl-bug-66161.pl
@@ -0,0 +1,13 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+print("Hello World\n");
+
+__END__
+
+TODO:
+What's happening?
+
+It's all messed up.
diff --git a/test/lisp/progmodes/cperl-mode-tests.el 
b/test/lisp/progmodes/cperl-mode-tests.el
index a29ee54b6b9..0af44c8e08d 100644
--- a/test/lisp/progmodes/cperl-mode-tests.el
+++ b/test/lisp/progmodes/cperl-mode-tests.el
@@ -1379,6 +1379,59 @@ as a regex."
        (forward-line 1))))
   (cperl-set-style-back))
 
+(ert-deftest cperl-test-bug-65834 ()
+  "Verify that CPerl mode identifies a left-shift operator.
+Left-shift and here-documents both use the \"<<\" operator.
+In the code provided by this bug report, it needs to be
+detected as left-shift operator."
+  (with-temp-buffer
+    (insert-file-contents (ert-resource-file "cperl-bug-65834.pl"))
+    (funcall cperl-test-mode)
+    (font-lock-ensure)
+    (search-forward "retur")             ; leaves point before the "n"
+    (should (equal (get-text-property (point) 'face)
+                   font-lock-keyword-face))
+    (search-forward "# comm")           ; leaves point before "ent"
+    (should (equal (get-text-property (point) 'face)
+                   font-lock-comment-face))))
+
+(ert-deftest cperl-test-bug-66145 ()
+  "Verify that hashes and arrays are only fontified in code.
+In strings, comments and POD the syntaxified faces should
+prevail.  The tests exercise all combinations of sigils $@% and
+parenthesess [{ for comments, POD, strings and HERE-documents.
+Fontification in code for `cperl-mode' is done in the tests
+beginning with `cperl-test-unicode`."
+  (let ((types '("array" "hash" "key"))
+        (faces `(("string"  . font-lock-string-face)
+                 ("comment" . font-lock-comment-face)
+                 ("here"    . ,(if (equal cperl-test-mode 'perl-mode)
+                                   'perl-heredoc
+                                 font-lock-string-face)))))
+    (with-temp-buffer
+      (insert-file-contents (ert-resource-file "cperl-bug-66145.pl"))
+      (funcall cperl-test-mode)
+      (font-lock-ensure)
+      (dolist (type types)
+        (goto-char (point-min))
+        (while (re-search-forward (concat type "_\\([a-z]+\\)") nil t)
+          (should (equal (get-text-property (match-beginning 1) 'face)
+                         (cdr (assoc (match-string-no-properties 1)
+                                     faces)))))))))
+
+(ert-deftest cperl-test-bug-66161 ()
+  "Verify that text after \"__END__\" is fontified as comment.
+For `cperl-mode', this needs the custom variable
+`cperl-fontify-trailer' to be set to `comment'.  Per default,
+cperl-mode fontifies text after the delimiter as Perl code."
+  (with-temp-buffer
+    (insert-file-contents (ert-resource-file "cperl-bug-66161.pl"))
+    (setq cperl-fontify-trailer 'comment)
+    (funcall cperl-test-mode)
+    (font-lock-ensure)
+    (search-forward "TODO")             ; leaves point before the colon
+    (should (equal (get-text-property (point) 'face)
+                   font-lock-comment-face))))
 
 (ert-deftest test-indentation ()
   (ert-test-erts-file (ert-resource-file "cperl-indents.erts")))
diff --git a/test/lisp/progmodes/lua-ts-mode-resources/indent.erts 
b/test/lisp/progmodes/lua-ts-mode-resources/indent.erts
index 040225c8580..9797467bbe5 100644
--- a/test/lisp/progmodes/lua-ts-mode-resources/indent.erts
+++ b/test/lisp/progmodes/lua-ts-mode-resources/indent.erts
@@ -5,148 +5,675 @@ Code:
     (lua-ts-mode)
     (indent-region (point-min) (point-max)))
 
-Name: Basic Indent
+Name: Chunk Indent
 
 =-=
-      print(
-0,
-      1
-)
+ print(1)
+       print(2)
+=-=
+print(1)
+print(2)
+=-=-=
 
-local function f(o)
-   if o.x > o.y then
- return o.x
-elseif o.y > o.z then
-           return o.y
-      else
-return o.z
-            end
+Name: Function Indent
+
+=-=
+function f1(n)
+print(n)
+return n + 1
 end
 
-f({
- x = 1,
-  y = 2,
-   z = 3,
-})
+local function f2(n)
+print(n)
+return n * 2
+end
 
-;(function()
-return false
-)()
+local f3 = function(n)
+print(n)
+return n / 3
+end
+
+function f4(...)
+local f = function (...)
+if ok
+then print(1)
+else print(0)
+end
+end
+return f
+end
+
+function f5(...)
+local f = function (...)
+if ok
+then
+print(1)
+else
+print(0)
+end
+end
+return f
+end
+
+function f6(...)
+local f = function (...)
+if ok then
+print(1)
+else
+print(0)
+end
+end
+return f
+end
+
+;(function ()
+ return true
+ end)()
 =-=
-print(
-  0,
-  1
-)
+function f1(n)
+  print(n)
+  return n + 1
+end
 
-local function f(o)
-  if o.x > o.y then
-    return o.x
-  elseif o.y > o.z then
-    return o.y
-  else
-    return o.z
+local function f2(n)
+  print(n)
+  return n * 2
+end
+
+local f3 = function(n)
+  print(n)
+  return n / 3
+end
+
+function f4(...)
+  local f = function (...)
+    if ok
+    then print(1)
+    else print(0)
+    end
   end
+  return f
 end
 
-f({
-  x = 1,
-  y = 2,
-  z = 3,
-})
+function f5(...)
+  local f = function (...)
+    if ok
+    then
+      print(1)
+    else
+      print(0)
+    end
+  end
+  return f
+end
+
+function f6(...)
+  local f = function (...)
+    if ok then
+      print(1)
+    else
+      print(0)
+    end
+  end
+  return f
+end
 
-;(function()
-  return false
-)()
+;(function ()
+  return true
+end)()
 =-=-=
 
-Name: Argument Indent
+Name: Conditional Indent
 
 =-=
-function h(
-string,
-number,
-options)
-print(string, number, options)
+if true then
+print(true)
+return 1
+elseif false then
+print(false)
+return -1
+else
+print(nil)
+return 0
 end
 
-local p = h(
-"sring",
-        1000,
-      {
-cost = 2,
-length = 8,
-       parallelism = 4,
-})
+if true
+ then
+ print(true)
+ return 1
+ elseif false
+ then
+ print(false)
+ return -1
+ else
+ print(nil)
+ return 0
+end
+
+if true
+ then return 1
+ elseif false
+ then return -1
+ else return 0
+end
 =-=
-function h(
-  string,
-  number,
-  options)
-  print(string, number, options)
+if true then
+  print(true)
+  return 1
+elseif false then
+  print(false)
+  return -1
+else
+  print(nil)
+  return 0
 end
 
-local p = h(
-  "sring",
-  1000,
-  {
-    cost = 2,
-    length = 8,
-    parallelism = 4,
-  })
+if true
+then
+  print(true)
+  return 1
+elseif false
+then
+  print(false)
+  return -1
+else
+  print(nil)
+  return 0
+end
+
+if true
+then return 1
+elseif false
+then return -1
+else return 0
+end
 =-=-=
 
-Name: Continuation Indent
+Name: Loop Indent
 
 =-=
+for k,v in pairs({}) do
+ print(k)
+ print(v)
+end
+
+for i=1,10
+ do print(i)
+end
+
+while n < 10 do
+ n = n + 1
+ print(n)
+end
+
+while n < 10
+ do
+ n = n + 1
+ print(n)
+end
+
+for i=0,9 do
+repeat n = n+1
+ until n > 99
+end
+
+repeat
+z = z * 2
+print(z)
+until z > 12
+
+ for i,x in ipairs(t) do
+ while i < 9
+ do
+ local n = t[x]
+ repeat n = n + 1
+ until n > #t
+ while n < 99
+ do
+ print(n)
+ end
+ end
+ print(t[i])
+ end
+
+do
+local a = b
+print(a + 1)
+end
+=-=
+for k,v in pairs({}) do
+  print(k)
+  print(v)
+end
+
+for i=1,10
+do print(i)
+end
+
+while n < 10 do
+  n = n + 1
+  print(n)
+end
+
+while n < 10
+do
+  n = n + 1
+  print(n)
+end
+
+for i=0,9 do
+  repeat n = n+1
+  until n > 99
+end
+
+repeat
+  z = z * 2
+  print(z)
+until z > 12
+
+for i,x in ipairs(t) do
+  while i < 9
+  do
+    local n = t[x]
+    repeat n = n + 1
+    until n > #t
+    while n < 99
+    do
+      print(n)
+    end
+  end
+  print(t[i])
+end
+
+do
+  local a = b
+  print(a + 1)
+end
+=-=-=
+
+Name: Bracket Indent
+
+=-=
+fn(
+  )
+
+tb={
+   }
+=-=
+fn(
+)
+
+tb={
+}
+=-=-=
+
+Name: Multi-line String Indent
+
+=-=
+local s = [[
+      Multi-line
+    string content
+    ]]
+
 function f()
   local str = [[
   multi-line
        string
     ]]
---[[
-multi-line
-comment
-    ]]
 return true
 end
 =-=
+local s = [[
+      Multi-line
+    string content
+    ]]
+
 function f()
   local str = [[
   multi-line
        string
     ]]
-  --[[
+  return true
+end
+=-=-=
+
+Name: Multi-line Comment Indent
+
+=-=
+--[[
+      Multi-line
+    comment content
+ ]]
+
+function f()
+--[[
+multi-line
+   comment
+    ]]
+  return true
+end
+=-=
+--[[
+      Multi-line
+    comment content
+ ]]
+
+function f()
+--[[
 multi-line
-comment
+   comment
     ]]
   return true
 end
 =-=-=
 
-Name: Loop Indent
+Name: Argument Indent
+
+=-=
+ h(
+ "string",
+ 1000
+ )
+
+local p = h(
+"string",
+        1000
+)
+
+fn(1,
+2,
+     3)
+
+fn( 1, 2,
+3, 4 )
+
+f({
+x = 1,
+y = 2,
+z = 3,
+})
+
+f({ x = 1,
+y = 2,
+z = 3, })
+
+Test({
+a=1
+})
+
+Test({
+a = 1,
+b = 2,
+},
+nil)
+=-=
+h(
+  "string",
+  1000
+)
+
+local p = h(
+  "string",
+  1000
+)
+
+fn(1,
+   2,
+   3)
+
+fn( 1, 2,
+    3, 4 )
+
+f({
+  x = 1,
+  y = 2,
+  z = 3,
+})
+
+f({ x = 1,
+    y = 2,
+    z = 3, })
+
+Test({
+  a=1
+})
+
+Test({
+       a = 1,
+       b = 2,
+     },
+     nil)
+=-=-=
+
+Name: Parameter Indent
 
 =-=
-for k, v in pairs({}) do
-        print(k, v)
+function f1(
+a,
+b
+)
+print(a,b)
 end
 
-while n < 10 do
-n = n + 1
+local function f2(a,
+                b)
+print(a,b)
 end
 
-repeat
-z = z * 2
- until z > 12
+local f3 = function( a, b,
+                c, d )
+print(a,b,c,d)
+end
 =-=
-for k, v in pairs({}) do
-  print(k, v)
+function f1(
+  a,
+  b
+)
+  print(a,b)
 end
 
-while n < 10 do
-  n = n + 1
+local function f2(a,
+                  b)
+  print(a,b)
 end
 
-repeat
-  z = z * 2
-until z > 12
+local f3 = function( a, b,
+                     c, d )
+  print(a,b,c,d)
+end
+=-=-=
+
+Name: Table Indent
+
+=-=
+local Other = {
+    First={up={Step=true,Jump=true},
+        down={Step=true,Jump=true},
+        left={Step=true,Jump=true},
+        right={Step=true,Jump=true}},
+    Second={up={Step=true,Jump=true},
+        down={Step=true,Jump=true},
+        left={Step=true,Jump=true},
+        right={Step=true,Jump=true}},
+    Third={up={Goto=true},
+        down={Goto=true},
+        left={Goto=true},
+        right={Goto=true}}
+}
+
+local Other = {
+a = 1,
+ b = 2,
+  c = 3,
+}
+=-=
+local Other = {
+  First={up={Step=true,Jump=true},
+         down={Step=true,Jump=true},
+         left={Step=true,Jump=true},
+         right={Step=true,Jump=true}},
+  Second={up={Step=true,Jump=true},
+          down={Step=true,Jump=true},
+          left={Step=true,Jump=true},
+          right={Step=true,Jump=true}},
+  Third={up={Goto=true},
+         down={Goto=true},
+         left={Goto=true},
+         right={Goto=true}}
+}
+
+local Other = {
+  a = 1,
+  b = 2,
+  c = 3,
+}
+=-=-=
+
+Code:
+  (lambda ()
+    (setq indent-tabs-mode nil)
+    (setq lua-ts-indent-offset 4)
+    (lua-ts-mode)
+    (indent-region (point-min) (point-max)))
+
+Name: End Indent
+
+=-=
+function f(x)
+    for y=1,x.y do
+        for x=1,x.z do
+            if x.y and x.z then
+                if y <= x then
+                    y = y + 1
+   end end end end
+    return {x,y} or {math.random(),math.random()}
+ end
+
+for y=1,x.y do
+    for x=1,x.z do
+        if x.y and x.z then
+            if y <= x then
+                y = y + 1
+           end
+ end end end
+=-=
+function f(x)
+    for y=1,x.y do
+        for x=1,x.z do
+            if x.y and x.z then
+                if y <= x then
+                    y = y + 1
+    end end end end
+    return {x,y} or {math.random(),math.random()}
+end
+
+for y=1,x.y do
+    for x=1,x.z do
+        if x.y and x.z then
+            if y <= x then
+                y = y + 1
+            end
+end end end
+=-=-=
+
+Name: Nested Function Indent
+
+=-=
+function a(...)
+    return (function (x)
+                return x
+            end)(foo(...))
+end
+
+function b(n)
+    local x = 1
+    return function (i)
+        return function (...)
+            return (function (n, ...)
+                return function (f, ...)
+                    return (function (...)
+                        if ... and x < 9 then
+                            x = x + 1
+                            return ...
+                    end end)(n(f, ...))
+                end, ...
+            end)(i(...))
+end end end
+
+function c(f)
+    local f1 = function (...)
+        if nil ~= ... then
+            return f(...)
+        end
+    end
+    return function (i)
+        return function (...)
+            local fn = function (n, ...)
+                local x = function (f, ...)
+                    return f1(n(f, ...))
+                end
+                return x
+            end
+            return fn(i(...))
+        end
+    end
+end
+
+function d(f)
+    local f1 = function (c, f, ...)
+        if ... then
+            if f(...) then
+                return ...
+            else
+                return c(f, ...)
+    end end end
+    return function (i)
+        return function (...)
+            return (function (n, ...)
+                local function j (f, ...)
+                    return f1(j, f, n(f, ...))
+                end
+                return j, ...
+            end)(i(...))
+end end end
+
+function e (n, t)
+    return function (i)
+        return function (...)
+            return (
+                function (n, ...)
+                    local x, y, z = 0, {}
+                    return (function (f, ...)
+                        return (function (i, ...) return i(i, ...) end)(
+                            function (i, ...)
+                                return f(function (x, ...)
+                                             return i(i, ...)(x, ...)
+                                         end, ...)
+                            end)
+                    end)(function (j)
+                        return function(f, ...)
+                            return (function (c, f, ...)
+                                if ... then
+                                    if n+1 == x then
+                                        local y1, x1 = y, x
+                                        y, x = {}, 0
+                                        return (function (...)
+                                                    z = ...
+                                                    return ...
+                                                end)(t(y1-1, x1-1, ...))
+                                    else
+                                        x = x - 1
+                                        return c(f,
+                                                 (function (...)
+                                                      z = ...
+                                                      return ...
+                                                  end)(t(y, x, ...)))
+                                    end
+                                elseif x ~= 0 then
+                                    x = 0
+                                    return z, y
+                            end end)(j, f, n(f, ...))
+                    end end), ...
+                end)(i(...))
+end end end
 =-=-=
diff --git a/test/lisp/progmodes/lua-ts-mode-resources/movement.erts 
b/test/lisp/progmodes/lua-ts-mode-resources/movement.erts
index 770aa23b18d..11e86f12926 100644
--- a/test/lisp/progmodes/lua-ts-mode-resources/movement.erts
+++ b/test/lisp/progmodes/lua-ts-mode-resources/movement.erts
@@ -147,7 +147,7 @@ end|
 print(1)
 =-=-=
 
-Name: forward-sentence moves over for statements
+Name: forward-sentence moves over do statements
 
 =-=
 |do
@@ -417,34 +417,6 @@ Code:
 
 Point-Char: |
 
-Name: forward-sexp moves over blocks
-
-=-=
-local function Test()
-  |local t = {
-    a = 1,
-  }
-
-  if true then
-    print(1)
-  else
-    print(0)
-  end
-end
-=-=
-local function Test()
-  local t = {
-    a = 1,
-  }
-
-  if true then
-    print(1)
-  else
-    print(0)
-  end|
-end
-=-=-=
-
 Name: forward-sexp moves over arguments
 
 =-=
@@ -481,41 +453,91 @@ local t = { 1,
   3 }|
 =-=-=
 
-Code:
-  (lambda ()
-    (lua-ts-mode)
-    (backward-sexp 1))
+Name: forward-sexp moves over parenthesized expressions
 
-Point-Char: |
+=-=
+|(function (x) return x + 1 end)(41)
+=-=
+(function (x) return x + 1 end)|(41)
+=-=-=
 
-Name: backward-sexp moves over blocks
+Name: forward-sexp moves over function declarations
 
 =-=
-local function Test()
-  local t = {
-    a = 1,
-  }
+|function foo (x)
+    if false then
+        print "foo"
+    elseif true then
+        print "bar"
+    end
+end
+=-=
+function foo (x)
+    if false then
+        print "foo"
+    elseif true then
+        print "bar"
+    end
+end|
+=-=-=
 
-  if true then
-    print(1)
-  else
-    print(0)
-  end|
+Name: forward-sexp moves over do statements
+
+=-=
+|do
+  print(a + 1)
 end
 =-=
-local function Test()
-  |local t = {
-    a = 1,
-  }
+do
+  print(a + 1)
+end|
+=-=-=
 
-  if true then
-    print(1)
-  else
-    print(0)
-  end
+Name: forward-sexp moves over for statements
+
+=-=
+|for k,v in pairs({}) do
+  print(k, v)
+end
+=-=
+for k,v in pairs({}) do
+  print(k, v)
+end|
+=-=-=
+
+Name: forward-sexp moves over repeat statements
+
+=-=
+|repeat
+  n = n + 1
+until n > 10
+=-=
+repeat
+  n = n + 1
+until n > 10|
+=-=-=
+
+Name: forward-sexp moves over while statements
+
+=-=
+|while n < 99
+do
+  n = n+1
 end
+=-=
+while n < 99
+do
+  n = n+1
+end|
 =-=-=
 
+Code:
+  (lambda ()
+    (lua-ts-mode)
+    (backward-sexp 1))
+
+Point-Char: |
+
 Name: backward-sexp moves over arguments
 
 =-=
@@ -551,3 +573,31 @@ local t = |{ 1,
   2,
   3 }
 =-=-=
+
+Name: backward-sexp moves over parenthesized expressions
+
+=-=
+(function (x) return x + 1 end)|(41)
+=-=
+|(function (x) return x + 1 end)(41)
+=-=-=
+
+Name: backward-sexp moves over function declarations
+
+=-=
+function foo (x)
+    if false then
+        print "foo"
+    elseif true then
+        print "bar"
+    end
+end|
+=-=
+|function foo (x)
+    if false then
+        print "foo"
+    elseif true then
+        print "bar"
+    end
+end
+=-=-=
diff --git a/test/lisp/progmodes/sh-script-resources/sh-indents.erts 
b/test/lisp/progmodes/sh-script-resources/sh-indents.erts
index 1f92610b3aa..36f4e4c22ab 100644
--- a/test/lisp/progmodes/sh-script-resources/sh-indents.erts
+++ b/test/lisp/progmodes/sh-script-resources/sh-indents.erts
@@ -38,3 +38,10 @@ if test ;then
 fi
 other
 =-=-=
+
+Name: sh-indents5
+
+=-=
+for i do echo 1; done
+for i; do echo 1; done
+=-=-=
diff --git a/test/lisp/progmodes/sh-script-tests.el 
b/test/lisp/progmodes/sh-script-tests.el
index 52c1303c414..135d7afe3fe 100644
--- a/test/lisp/progmodes/sh-script-tests.el
+++ b/test/lisp/progmodes/sh-script-tests.el
@@ -87,4 +87,15 @@
   (should-not (test-sh-back "foo;bar"))
   (should (test-sh-back "foo#zot")))
 
+(ert-deftest sh-script-test-do-fontification ()
+  "Test that \"do\" gets fontified correctly, even with no \";\"."
+  (with-temp-buffer
+    (shell-script-mode)
+    (insert "for i do echo 1; done")
+    (font-lock-ensure)
+    (goto-char (point-min))
+    (search-forward "do")
+    (forward-char -1)
+    (should (equal (get-text-property (point) 'face) 
'font-lock-keyword-face))))
+
 ;;; sh-script-tests.el ends here
diff --git a/test/src/comp-tests.el b/test/src/comp-tests.el
index 4444ab61219..2b3c3dd4c75 100644
--- a/test/src/comp-tests.el
+++ b/test/src/comp-tests.el
@@ -977,7 +977,7 @@ Return a list of results."
          (if (= x y)
              x
            'foo))
-       '(or (member foo) marker number))
+       '(or (member foo) number-or-marker))
 
       ;; 14
       ((defun comp-tests-ret-type-spec-f (x)
@@ -1117,7 +1117,7 @@ Return a list of results."
       ((defun comp-tests-ret-type-spec-f (x)
         (when (> x 1.0)
           x))
-       '(or null marker number))
+       '(or null number-or-marker))
 
       ;; 36
       ((defun comp-tests-ret-type-spec-f (x y)



reply via email to

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