emacs-diffs
[Top][All Lists]
Advanced

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

scratch/comp-static-data 99896f21267 10/16: Merge branch 'master' into s


From: Vibhav Pant
Subject: scratch/comp-static-data 99896f21267 10/16: Merge branch 'master' into scratch/comp-static-data
Date: Thu, 19 Jan 2023 12:44:46 -0500 (EST)

branch: scratch/comp-static-data
commit 99896f2126718593f2185078e9d052ac48b13b52
Merge: 6bf897449b6 0be40fbe43c
Author: Vibhav Pant <vibhavp@gmail.com>
Commit: Vibhav Pant <vibhavp@gmail.com>

    Merge branch 'master' into scratch/comp-static-data
---
 .../tree-sitter/html-manual/Accessing-Node.html    |   2 +-
 .../html-manual/Language-Definitions.html          |   2 +-
 .../html-manual/Parser_002dbased-Font-Lock.html    |   2 +-
 .../tree-sitter/html-manual/Retrieving-Node.html   |  10 +-
 .../html-manual/Tree_002dsitter-C-API.html         |  12 +-
 admin/notes/tree-sitter/starter-guide              |   2 +-
 build-aux/config.guess                             |   2 +-
 build-aux/config.sub                               |   2 +-
 doc/lispref/modes.texi                             |   2 +-
 doc/lispref/parsing.texi                           |  33 +-
 doc/misc/texinfo.tex                               | 735 ++++++++++-----------
 doc/misc/tramp.texi                                |  29 +-
 doc/misc/trampver.texi                             |   4 +-
 etc/NEWS                                           |  64 +-
 etc/NEWS.29                                        | 265 ++++----
 lib-src/Makefile.in                                |   5 +-
 lib/alloca.in.h                                    |   4 +-
 lib/attribute.h                                    |   2 +-
 lib/binary-io.h                                    |   3 +-
 lib/c-ctype.h                                      |   3 +-
 lib/c-strcasecmp.c                                 |   3 +-
 lib/c-strncasecmp.c                                |   3 +-
 lib/careadlinkat.c                                 |   4 +-
 lib/cloexec.c                                      |   3 +-
 lib/close-stream.c                                 |   3 +-
 lib/diffseq.h                                      |   4 +-
 lib/dup2.c                                         |   3 +-
 lib/file-has-acl.c                                 |   9 +-
 lib/filemode.h                                     |   4 +-
 lib/filename.h                                     |   2 +-
 lib/fpending.c                                     |   4 +-
 lib/fpending.h                                     |   4 +-
 lib/fsusage.c                                      |   4 +-
 lib/getgroups.c                                    |   3 +-
 lib/getloadavg.c                                   |   4 +-
 lib/gettext.h                                      |   4 +-
 lib/gettime.c                                      |   3 +-
 lib/gettimeofday.c                                 |   3 +-
 lib/gnulib.mk.in                                   |   5 +
 lib/group-member.c                                 |   4 +-
 lib/limits.in.h                                    |   4 +-
 lib/malloc.c                                       |   3 +-
 lib/malloc/scratch_buffer.h                        |   2 +-
 lib/malloc/scratch_buffer_grow.c                   |   2 +-
 lib/malloc/scratch_buffer_grow_preserve.c          |   2 +-
 lib/malloc/scratch_buffer_set_array_size.c         |   2 +-
 lib/md5-stream.c                                   |   4 +-
 lib/md5.c                                          |   4 +-
 lib/md5.h                                          |   4 +-
 lib/memmem.c                                       |   4 +-
 lib/memrchr.c                                      |   4 +-
 lib/memset_explicit.c                              |   2 +-
 lib/mktime-internal.h                              |   2 +-
 lib/mktime.c                                       |   2 +-
 lib/nanosleep.c                                    |   3 +-
 lib/regex.c                                        |   2 +-
 lib/regex.h                                        |   2 +-
 lib/save-cwd.h                                     |   4 +-
 lib/sha1.c                                         |   3 +-
 lib/sig2str.c                                      |   3 +-
 lib/stdio.in.h                                     |   8 +
 lib/stdlib.in.h                                    |   3 +-
 lib/string.in.h                                    |  20 +-
 lib/strtoimax.c                                    |   4 +-
 lib/strtol.c                                       |   4 +-
 lib/strtoll.c                                      |   4 +-
 lib/time_r.c                                       |   3 +-
 lib/timegm.c                                       |   2 +-
 lib/verify.h                                       |  16 +-
 lib/xalloc-oversized.h                             |   3 +-
 lisp/cedet/semantic/symref/grep.el                 |   5 +
 lisp/dired-x.el                                    |   6 +-
 lisp/dired.el                                      |   2 +-
 lisp/files.el                                      |  12 +-
 lisp/font-lock.el                                  |   6 +
 lisp/net/tramp-adb.el                              |  49 +-
 lisp/net/tramp-archive.el                          |  45 +-
 lisp/net/tramp-cache.el                            |   7 +-
 lisp/net/tramp-cmds.el                             |   6 +-
 lisp/net/tramp-compat.el                           | 157 +----
 lisp/net/tramp-container.el                        |  67 +-
 lisp/net/tramp-crypt.el                            |  54 +-
 lisp/net/tramp-fuse.el                             |  17 +-
 lisp/net/tramp-gvfs.el                             |  57 +-
 lisp/net/tramp-integration.el                      |   3 +-
 lisp/net/tramp-rclone.el                           |   2 +-
 lisp/net/tramp-sh.el                               | 152 ++---
 lisp/net/tramp-smb.el                              |  53 +-
 lisp/net/tramp-sshfs.el                            |   5 +-
 lisp/net/tramp-sudoedit.el                         |  77 +--
 lisp/net/tramp.el                                  | 346 ++++------
 lisp/net/trampver.el                               |  21 +-
 lisp/progmodes/c-ts-mode.el                        |  14 +-
 lisp/progmodes/csharp-mode.el                      |   3 +
 lisp/progmodes/js.el                               |   4 +-
 lisp/progmodes/ruby-ts-mode.el                     | 103 ++-
 lisp/progmodes/typescript-ts-mode.el               |   4 +-
 lisp/simple.el                                     |  11 +-
 lisp/subr.el                                       |   3 +-
 lisp/textmodes/toml-ts-mode.el                     |   1 -
 lisp/treesit.el                                    |  60 +-
 lisp/wid-edit.el                                   |   4 +-
 m4/acl.m4                                          |  16 +-
 m4/alloca.m4                                       |   4 +-
 m4/d-type.m4                                       |   3 +-
 m4/dup2.m4                                         |   3 +-
 m4/extensions.m4                                   |  11 +-
 m4/filemode.m4                                     |   3 +-
 m4/fsusage.m4                                      |   3 +-
 m4/getgroups.m4                                    |   3 +-
 m4/getloadavg.m4                                   |   4 +-
 m4/getrandom.m4                                    |  10 +-
 m4/gettime.m4                                      |   3 +-
 m4/gettimeofday.m4                                 |   3 +-
 m4/gnulib-common.m4                                |  37 +-
 m4/gnulib-comp.m4                                  |   2 -
 m4/group-member.m4                                 |   3 +-
 m4/largefile.m4                                    | 327 +++++++--
 m4/mempcpy.m4                                      |   4 +-
 m4/memrchr.m4                                      |   4 +-
 m4/memset_explicit.m4                              |   2 +-
 m4/mktime.m4                                       |   4 +-
 m4/nstrftime.m4                                    |   3 +-
 m4/pathmax.m4                                      |   4 +-
 m4/sig2str.m4                                      |   3 +-
 m4/ssize_t.m4                                      |   3 +-
 m4/stat-time.m4                                    |   4 +-
 m4/stdio_h.m4                                      |  14 +-
 m4/strnlen.m4                                      |   4 +-
 m4/strtoimax.m4                                    |   3 +-
 m4/strtoll.m4                                      |   3 +-
 m4/time_h.m4                                       |   3 +-
 m4/timespec.m4                                     |   3 +-
 src/fns.c                                          |   3 +-
 src/gnutls.c                                       |   2 +-
 src/xdisp.c                                        |  19 +-
 test/lisp/net/tramp-archive-tests.el               |  27 +-
 test/lisp/net/tramp-tests.el                       | 437 +++++-------
 test/lisp/wid-edit-tests.el                        |  16 +
 139 files changed, 1824 insertions(+), 1916 deletions(-)

diff --git a/admin/notes/tree-sitter/html-manual/Accessing-Node.html 
b/admin/notes/tree-sitter/html-manual/Accessing-Node.html
index 9e7a4b68299..afbbdaa11b5 100644
--- a/admin/notes/tree-sitter/html-manual/Accessing-Node.html
+++ b/admin/notes/tree-sitter/html-manual/Accessing-Node.html
@@ -187,7 +187,7 @@ of <var>node</var> as a child of its parent.
 </p></dd></dl>
 
 <dl class="def">
-<dt id="index-treesit_002dchild_002dcount"><span class="category">Function: 
</span><span><strong>treesit-child-count</strong> <em>node &amp;optional 
named</em><a href='#index-treesit_002dchild_002dcount' class='copiable-anchor'> 
&para;</a></span></dt>
+<dt id="index-treesit_002dchild_002dcount"><span class="category">Function: 
</span><span><strong>treesit-node-child-count</strong> <em>node &amp;optional 
named</em><a href='#index-treesit_002dchild_002dcount' class='copiable-anchor'> 
&para;</a></span></dt>
 <dd><p>This function finds the number of children of <var>node</var>.  If
 <var>named</var> is non-nil, it only counts named child (see <a 
href="Language-Definitions.html#tree_002dsitter-named-node">named node</a>).
 </p></dd></dl>
diff --git a/admin/notes/tree-sitter/html-manual/Language-Definitions.html 
b/admin/notes/tree-sitter/html-manual/Language-Definitions.html
index 6c17e8c3344..9b1e0021272 100644
--- a/admin/notes/tree-sitter/html-manual/Language-Definitions.html
+++ b/admin/notes/tree-sitter/html-manual/Language-Definitions.html
@@ -94,7 +94,7 @@ specified by <code>user-emacs-directory</code> (see <a 
href="Init-File.html">The
 </li></ul>
 
 <p>In each of these directories, Emacs looks for a file with file-name
-extensions specified by the variable <code>treesit-load-suffixes</code>.
+extensions specified by the variable <code>dynamic-library-suffixes</code>.
 </p>
 <p>If Emacs cannot find the library or has problems loading it, Emacs
 signals the <code>treesit-load-language-error</code> error.  The data of
diff --git 
a/admin/notes/tree-sitter/html-manual/Parser_002dbased-Font-Lock.html 
b/admin/notes/tree-sitter/html-manual/Parser_002dbased-Font-Lock.html
index 670f235bd20..a3fe6622162 100644
--- a/admin/notes/tree-sitter/html-manual/Parser_002dbased-Font-Lock.html
+++ b/admin/notes/tree-sitter/html-manual/Parser_002dbased-Font-Lock.html
@@ -134,7 +134,7 @@ example:
 tree-sitter query in either the string, s-expression or compiled form.
 </p>
 <p>For each <var>query</var>, the <var>:keyword</var>/<var>value</var> pairs 
that
-precede it add meta information to it.  The <code>:lang</code> keyword
+precede it add meta information to it.  The <code>:language</code> keyword
 declares <var>query</var>&rsquo;s language.  The <code>:feature</code> keyword 
sets the
 feature name of <var>query</var>.  Users can control which features are
 enabled with <code>font-lock-maximum-decoration</code> and
diff --git a/admin/notes/tree-sitter/html-manual/Retrieving-Node.html 
b/admin/notes/tree-sitter/html-manual/Retrieving-Node.html
index 58e87e8df7f..16eeb0b1091 100644
--- a/admin/notes/tree-sitter/html-manual/Retrieving-Node.html
+++ b/admin/notes/tree-sitter/html-manual/Retrieving-Node.html
@@ -201,13 +201,13 @@ is the string text.
 </p></dd></dl>
 
 <dl class="def">
-<dt id="index-treesit_002dnext_002dsibling"><span class="category">Function: 
</span><span><strong>treesit-next-sibling</strong> <em>node &amp;optional 
named</em><a href='#index-treesit_002dnext_002dsibling' 
class='copiable-anchor'> &para;</a></span></dt>
+<dt id="index-treesit_002dnext_002dsibling"><span class="category">Function: 
</span><span><strong>treesit-node-next-sibling</strong> <em>node &amp;optional 
named</em><a href='#index-treesit_002dnext_002dsibling' 
class='copiable-anchor'> &para;</a></span></dt>
 <dd><p>This function finds the next sibling of <var>node</var>.  If 
<var>named</var> is
 non-<code>nil</code>, it finds the next named sibling.
 </p></dd></dl>
 
 <dl class="def">
-<dt id="index-treesit_002dprev_002dsibling"><span class="category">Function: 
</span><span><strong>treesit-prev-sibling</strong> <em>node &amp;optional 
named</em><a href='#index-treesit_002dprev_002dsibling' 
class='copiable-anchor'> &para;</a></span></dt>
+<dt id="index-treesit_002dprev_002dsibling"><span class="category">Function: 
</span><span><strong>treesit-node-prev-sibling</strong> <em>node &amp;optional 
named</em><a href='#index-treesit_002dprev_002dsibling' 
class='copiable-anchor'> &para;</a></span></dt>
 <dd><p>This function finds the previous sibling of <var>node</var>.  If
 <var>named</var> is non-<code>nil</code>, it finds the previous named sibling.
 </p></dd></dl>
@@ -221,13 +221,13 @@ assign <em>field names</em> to child nodes (see <a 
href="Language-Definitions.ht
 could have a <code>declarator</code> node and a <code>body</code> node.
 </p>
 <dl class="def">
-<dt id="index-treesit_002dchild_002dby_002dfield_002dname"><span 
class="category">Function: 
</span><span><strong>treesit-child-by-field-name</strong> <em>node 
field-name</em><a href='#index-treesit_002dchild_002dby_002dfield_002dname' 
class='copiable-anchor'> &para;</a></span></dt>
+<dt id="index-treesit_002dchild_002dby_002dfield_002dname"><span 
class="category">Function: 
</span><span><strong>treesit-node-child-by-field-name</strong> <em>node 
field-name</em><a href='#index-treesit_002dchild_002dby_002dfield_002dname' 
class='copiable-anchor'> &para;</a></span></dt>
 <dd><p>This function finds the child of <var>node</var> whose field name is
 <var>field-name</var>, a string.
 </p>
 <div class="example">
 <pre class="example">;; Get the child that has &quot;body&quot; as its field 
name.
-(treesit-child-by-field-name node &quot;body&quot;)
+(treesit-node-child-by-field-name node &quot;body&quot;)
   &rArr; #&lt;treesit-node (compound_statement) in 45-89&gt;
 </pre></div>
 </dd></dl>
@@ -237,7 +237,7 @@ could have a <code>declarator</code> node and a 
<code>body</code> node.
 <span id="index-syntax-tree-nodes_002c-by-position"></span>
 
 <dl class="def">
-<dt id="index-treesit_002dfirst_002dchild_002dfor_002dpos"><span 
class="category">Function: 
</span><span><strong>treesit-first-child-for-pos</strong> <em>node pos 
&amp;optional named</em><a 
href='#index-treesit_002dfirst_002dchild_002dfor_002dpos' 
class='copiable-anchor'> &para;</a></span></dt>
+<dt id="index-treesit_002dfirst_002dchild_002dfor_002dpos"><span 
class="category">Function: 
</span><span><strong>treesit-node-first-child-for-pos</strong> <em>node pos 
&amp;optional named</em><a 
href='#index-treesit_002dfirst_002dchild_002dfor_002dpos' 
class='copiable-anchor'> &para;</a></span></dt>
 <dd><p>This function finds the first child of <var>node</var> that extends 
beyond
 buffer position <var>pos</var>.  &ldquo;Extends beyond&rdquo; means the end of 
the
 child node is greater or equal to <var>pos</var>.  This function only looks
diff --git a/admin/notes/tree-sitter/html-manual/Tree_002dsitter-C-API.html 
b/admin/notes/tree-sitter/html-manual/Tree_002dsitter-C-API.html
index 0c827b3e755..1d992b828ea 100644
--- a/admin/notes/tree-sitter/html-manual/Tree_002dsitter-C-API.html
+++ b/admin/notes/tree-sitter/html-manual/Tree_002dsitter-C-API.html
@@ -142,12 +142,12 @@ ts_node_named_child                     treesit-node-child
 ts_node_named_child_count               treesit-node-child-count
 ts_node_child_by_field_name             treesit-node-by-field-name
 ts_node_child_by_field_id
-ts_node_next_sibling                    treesit-next-sibling
-ts_node_prev_sibling                    treesit-prev-sibling
-ts_node_next_named_sibling              treesit-next-sibling
-ts_node_prev_named_sibling              treesit-prev-sibling
-ts_node_first_child_for_byte            treesit-first-child-for-pos
-ts_node_first_named_child_for_byte      treesit-first-child-for-pos
+ts_node_next_sibling                    treesit-node-next-sibling
+ts_node_prev_sibling                    treesit-node-prev-sibling
+ts_node_next_named_sibling              treesit-node-next-sibling
+ts_node_prev_named_sibling              treesit-node-prev-sibling
+ts_node_first_child_for_byte            treesit-node-first-child-for-pos
+ts_node_first_named_child_for_byte      treesit-node-first-child-for-pos
 ts_node_descendant_for_byte_range       treesit-descendant-for-range
 ts_node_descendant_for_point_range
 ts_node_named_descendant_for_byte_range treesit-descendant-for-range
diff --git a/admin/notes/tree-sitter/starter-guide 
b/admin/notes/tree-sitter/starter-guide
index a6a4c647f23..606f7891dfa 100644
--- a/admin/notes/tree-sitter/starter-guide
+++ b/admin/notes/tree-sitter/starter-guide
@@ -238,7 +238,7 @@ Concretely, something like this:
   ...
   (cond
    ;; Tree-sitter.
-   ((treesit-ready-p 'python-mode 'python)
+   ((treesit-ready-p 'python)
     (treesit-parser-create 'python)
     (setq-local treesit-font-lock-settings python--treesit-settings)
     (setq-local treesit-font-lock-feature-list
diff --git a/build-aux/config.guess b/build-aux/config.guess
index b30b9fdc8ef..980b0208381 100755
--- a/build-aux/config.guess
+++ b/build-aux/config.guess
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright 1992-2023 Free Software Foundation, Inc.
+#   Copyright 1992-2022 Free Software Foundation, Inc.
 
 # shellcheck disable=SC2006,SC2268 # see below for rationale
 
diff --git a/build-aux/config.sub b/build-aux/config.sub
index 9e118bdee3c..baf1512b3c0 100755
--- a/build-aux/config.sub
+++ b/build-aux/config.sub
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Configuration validation subroutine script.
-#   Copyright 1992-2023 Free Software Foundation, Inc.
+#   Copyright 1992-2022 Free Software Foundation, Inc.
 
 # shellcheck disable=SC2006,SC2268 # see below for rationale
 
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index dffd6653369..b2dd294ea28 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -4054,7 +4054,7 @@ tree-sitter query in either the string, s-expression or 
compiled form.
 
 @c FIXME: Cross-ref treesit-font-lock-level to user manual.
 For each @var{query}, the @var{:keyword}/@var{value} pairs that
-precede it add meta information to it.  The @code{:lang} keyword
+precede it add meta information to it.  The @code{:language} keyword
 declares @var{query}'s language.  The @code{:feature} keyword sets the
 feature name of @var{query}.  Users can control which features are
 enabled with @code{treesit-font-lock-level} and
diff --git a/doc/lispref/parsing.texi b/doc/lispref/parsing.texi
index 19a22c121de..9635427f940 100644
--- a/doc/lispref/parsing.texi
+++ b/doc/lispref/parsing.texi
@@ -65,7 +65,6 @@ For example, the C language grammar is represented as the 
symbol
 
 @vindex treesit-extra-load-path
 @vindex treesit-load-language-error
-@vindex treesit-load-suffixes
 Tree-sitter language grammar are distributed as dynamic libraries.
 In order to use a language grammar in Emacs, you need to make sure
 that the dynamic library is installed on the system.  Emacs looks for
@@ -83,7 +82,7 @@ and finally, in the system's default locations for dynamic 
libraries.
 @end itemize
 
 In each of these directories, Emacs looks for a file with file-name
-extensions specified by the variable @code{treesit-load-suffixes}.
+extensions specified by the variable @code{dynamic-library-suffixes}.
 
 If Emacs cannot find the library or has problems loading it, Emacs
 signals the @code{treesit-load-language-error} error.  The data of
@@ -677,12 +676,12 @@ This function returns all of @var{node}'s children as a 
list.  If
 @var{named} is non-@code{nil}, it retrieves only named nodes.
 @end defun
 
-@defun treesit-next-sibling node &optional named
+@defun treesit-node-next-sibling node &optional named
 This function finds the next sibling of @var{node}.  If @var{named} is
 non-@code{nil}, it finds the next named sibling.
 @end defun
 
-@defun treesit-prev-sibling node &optional named
+@defun treesit-node-prev-sibling node &optional named
 This function finds the previous sibling of @var{node}.  If
 @var{named} is non-@code{nil}, it finds the previous named sibling.
 @end defun
@@ -696,14 +695,14 @@ assign @dfn{field names} to child nodes 
(@pxref{tree-sitter node field
 name, field name}).  For example, a @code{function_definition} node
 could have a @code{declarator} node and a @code{body} node.
 
-@defun treesit-child-by-field-name node field-name
+@defun treesit-node-child-by-field-name node field-name
 This function finds the child of @var{node} whose field name is
 @var{field-name}, a string.
 
 @example
 @group
 ;; Get the child that has "body" as its field name.
-(treesit-child-by-field-name node "body")
+(treesit-node-child-by-field-name node "body")
   @result{} #<treesit-node (compound_statement) in 45-89>
 @end group
 @end example
@@ -713,7 +712,7 @@ This function finds the child of @var{node} whose field 
name is
 @cindex nodes, by position
 @cindex syntax tree nodes, by position
 
-@defun treesit-first-child-for-pos node pos &optional named
+@defun treesit-node-first-child-for-pos node pos &optional named
 This function finds the first child of @var{node} that extends beyond
 buffer position @var{pos}.  ``Extends beyond'' means the end of the
 child node is greater or equal to @var{pos}.  This function only looks
@@ -1002,7 +1001,7 @@ Note that @var{n} counts both named and anonymous child.  
And @var{n}
 could be negative, e.g., @code{-1} represents the last child.
 @end defun
 
-@defun treesit-child-count node &optional named
+@defun treesit-node-child-count node &optional named
 This function finds the number of children of @var{node}.  If
 @var{named} is non-@code{nil}, it only counts named children
 (@pxref{tree-sitter named node, named node}).
@@ -1694,7 +1693,7 @@ this pattern:
   ...
   (cond
    ;; Tree-sitter setup.
-   ((treesit-ready-p 'woomy-mode 'woomy)
+   ((treesit-ready-p 'woomy)
     (setq-local treesit-variables ...)
     (treesit-major-mode-setup))
    ;; Non-tree-sitter setup.
@@ -1706,7 +1705,7 @@ this pattern:
 First, the major mode should use @code{treesit-ready-p} to determine
 whether tree-sitter can be activated in this mode.
 
-@defun treesit-ready-p mode language &optional quiet
+@defun treesit-ready-p language &optional quiet
 This function checks for conditions for activating tree-sitter.  It
 checks whether Emacs was built with tree-sitter, whether the buffer's
 size is not too large for tree-sitter to handle it, and whether the
@@ -1734,7 +1733,7 @@ If @code{treesit-font-lock-settings} (@pxref{Parser-based 
Font Lock})
 is non-@code{nil}, it sets up fontification.
 
 @item
-If @code{treesit-simple-indent-rules} (@pxref{Parser-based Font Lock})
+If @code{treesit-simple-indent-rules} (@pxref{Parser-based Indentation})
 is non-@code{nil}, it sets up indentation.
 
 @item
@@ -1897,12 +1896,12 @@ ts_node_named_child                     
treesit-node-child
 ts_node_named_child_count               treesit-node-child-count
 ts_node_child_by_field_name             treesit-node-by-field-name
 ts_node_child_by_field_id
-ts_node_next_sibling                    treesit-next-sibling
-ts_node_prev_sibling                    treesit-prev-sibling
-ts_node_next_named_sibling              treesit-next-sibling
-ts_node_prev_named_sibling              treesit-prev-sibling
-ts_node_first_child_for_byte            treesit-first-child-for-pos
-ts_node_first_named_child_for_byte      treesit-first-child-for-pos
+ts_node_next_sibling                    treesit-node-next-sibling
+ts_node_prev_sibling                    treesit-node-prev-sibling
+ts_node_next_named_sibling              treesit-node-next-sibling
+ts_node_prev_named_sibling              treesit-node-prev-sibling
+ts_node_first_child_for_byte            treesit-node-first-child-for-pos
+ts_node_first_named_child_for_byte      treesit-node-first-child-for-pos
 ts_node_descendant_for_byte_range       treesit-descendant-for-range
 ts_node_descendant_for_point_range
 ts_node_named_descendant_for_byte_range treesit-descendant-for-range
diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex
index 7c4520637a7..3cccf01d958 100644
--- a/doc/misc/texinfo.tex
+++ b/doc/misc/texinfo.tex
@@ -3,9 +3,9 @@
 % Load plain if necessary, i.e., if running under initex.
 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
 %
-\def\texinfoversion{2022-12-19.22}
+\def\texinfoversion{2023-01-02.21}
 %
-% Copyright 1985--1986, 1988, 1990--2023 Free Software Foundation, Inc.
+% Copyright 1985, 1986, 1988, 1990-2023 Free Software Foundation, Inc.
 %
 % This texinfo.tex file is free software: you can redistribute it and/or
 % modify it under the terms of the GNU General Public License as
@@ -58,12 +58,6 @@
 
 \message{Loading texinfo [version \texinfoversion]:}
 
-% If in a .fmt file, print the version number
-% and turn on active characters that we couldn't do earlier because
-% they might have appeared in the input file name.
-\everyjob{\message{[Texinfo version \texinfoversion]}%
-  \catcode`+=\active \catcode`\_=\active}
-
 % LaTeX's \typeout.  This ensures that the messages it is used for
 % are identical in format to the corresponding ones from latex/pdflatex.
 \def\typeout{\immediate\write17}%
@@ -530,7 +524,7 @@
 
 % ... but they get defined via ``\envdef\foo{...}'':
 \long\def\envdef#1#2{\def#1{\startenvironment#1#2}}
-\def\envparseargdef#1#2{\parseargdef#1{\startenvironment#1#2}}
+\long\def\envparseargdef#1#2{\parseargdef#1{\startenvironment#1#2}}
 
 % Check whether we're in the right environment:
 \def\checkenv#1{%
@@ -1200,13 +1194,17 @@ output) for that.)}
   %
   % Set color, and create a mark which defines \thiscolor accordingly,
   % so that \makeheadline knows which color to restore.
+  \def\curcolor{0 0 0}%
   \def\setcolor#1{%
-    \xdef\currentcolordefs{\gdef\noexpand\thiscolor{#1}}%
-    \domark
-    \pdfsetcolor{#1}%
+    \ifx#1\curcolor\else
+      \xdef\currentcolordefs{\gdef\noexpand\thiscolor{#1}}%
+      \domark
+      \pdfsetcolor{#1}%
+      \xdef\curcolor{#1}%
+    \fi
   }
   %
-  \def\maincolor{\rgbBlack}
+  \let\maincolor\rgbBlack
   \pdfsetcolor{\maincolor}
   \edef\thiscolor{\maincolor}
   \def\currentcolordefs{}
@@ -1362,7 +1360,7 @@ output) for that.)}
   %
   % by default, use black for everything.
   \def\urlcolor{\rgbBlack}
-  \def\linkcolor{\rgbBlack}
+  \let\linkcolor\rgbBlack
   \def\endlink{\setcolor{\maincolor}\pdfendlink}
   %
   % Adding outlines to PDF; macros for calculating structure of outlines
@@ -2683,6 +2681,7 @@ end
 \gdef\setcodequotes{\let`\codequoteleft \let'\codequoteright}
 \gdef\setregularquotes{\let`\lq \let'\rq}
 }
+\setregularquotes
 
 % Allow an option to not use regular directed right quote/apostrophe
 % (char 0x27), but instead the undirected quote from cmtt (char 0x0d).
@@ -3744,8 +3743,8 @@ $$%
               want the contents after the title page.}}%
 
 \parseargdef\shorttitlepage{%
-  \begingroup \hbox{}\vskip 1.5in \chaprm \centerline{#1}%
-  \endgroup\page\hbox{}\page}
+  {\headingsoff \begingroup \hbox{}\vskip 1.5in \chaprm \centerline{#1}%
+  \endgroup\page\hbox{}\page}\pageone}
 
 \envdef\titlepage{%
   % Open one extra group, as we want to close it in the middle of \Etitlepage.
@@ -4795,21 +4794,6 @@ $$%
 \def\docodeindexxxx #1{\docind{\indexname}{#1}}
 
 
-% Used for the aux, toc and index files to prevent expansion of Texinfo
-% commands.
-%
-\def\atdummies{%
-  \definedummyletter\@%
-  \definedummyletter\ %
-  \definedummyletter\{%
-  \definedummyletter\}%
-  \definedummyletter\&%
-  %
-  % Do the redefinitions.
-  \definedummies
-  \otherbackslash
-}
-
 % \definedummyword defines \#1 as \string\#1\space, thus effectively
 % preventing its expansion.  This is used only for control words,
 % not control letters, because the \space would be incorrect for
@@ -4825,110 +4809,91 @@ $$%
 %
 \def\definedummyword  #1{\def#1{\string#1\space}}%
 \def\definedummyletter#1{\def#1{\string#1}}%
-\let\definedummyaccent\definedummyletter
 
-% Called from \atdummies to prevent the expansion of commands.
+% Used for the aux, toc and index files to prevent expansion of Texinfo
+% commands.  Most of the commands are controlled through the
+% \ifdummies conditional.
 %
-\def\definedummies{%
+\def\atdummies{%
+  \dummiestrue
   %
-  \let\commondummyword\definedummyword
-  \let\commondummyletter\definedummyletter
-  \let\commondummyaccent\definedummyaccent
-  \commondummiesnofonts
+  \definedummyletter\@%
+  \definedummyletter\ %
+  \definedummyletter\{%
+  \definedummyletter\}%
+  \definedummyletter\&%
   %
   \definedummyletter\_%
   \definedummyletter\-%
   %
-  % Non-English letters.
-  \definedummyword\AA
-  \definedummyword\AE
-  \definedummyword\DH
-  \definedummyword\L
-  \definedummyword\O
-  \definedummyword\OE
-  \definedummyword\TH
-  \definedummyword\aa
-  \definedummyword\ae
-  \definedummyword\dh
-  \definedummyword\exclamdown
-  \definedummyword\l
-  \definedummyword\o
-  \definedummyword\oe
-  \definedummyword\ordf
-  \definedummyword\ordm
-  \definedummyword\questiondown
-  \definedummyword\ss
-  \definedummyword\th
-  %
-  % Although these internal commands shouldn't show up, sometimes they do.
-  \definedummyword\bf
-  \definedummyword\gtr
-  \definedummyword\hat
-  \definedummyword\less
-  \definedummyword\sf
-  \definedummyword\sl
-  \definedummyword\tclose
-  \definedummyword\tt
-  %
-  \definedummyword\LaTeX
-  \definedummyword\TeX
-  %
-  % Assorted special characters.
-  \definedummyword\ampchar
-  \definedummyword\atchar
-  \definedummyword\arrow
-  \definedummyword\backslashchar
-  \definedummyword\bullet
-  \definedummyword\comma
-  \definedummyword\copyright
-  \definedummyword\registeredsymbol
-  \definedummyword\dots
-  \definedummyword\enddots
-  \definedummyword\entrybreak
-  \definedummyword\equiv
-  \definedummyword\error
-  \definedummyword\euro
-  \definedummyword\expansion
-  \definedummyword\geq
-  \definedummyword\guillemetleft
-  \definedummyword\guillemetright
-  \definedummyword\guilsinglleft
-  \definedummyword\guilsinglright
-  \definedummyword\lbracechar
-  \definedummyword\leq
-  \definedummyword\mathopsup
-  \definedummyword\minus
-  \definedummyword\ogonek
-  \definedummyword\pounds
-  \definedummyword\point
-  \definedummyword\print
-  \definedummyword\quotedblbase
-  \definedummyword\quotedblleft
-  \definedummyword\quotedblright
-  \definedummyword\quoteleft
-  \definedummyword\quoteright
-  \definedummyword\quotesinglbase
-  \definedummyword\rbracechar
-  \definedummyword\result
-  \definedummyword\sub
-  \definedummyword\sup
-  \definedummyword\textdegree
-  %
   \definedummyword\subentry
   %
   % We want to disable all macros so that they are not expanded by \write.
+  \let\commondummyword\definedummyword
   \macrolist
   \let\value\dummyvalue
   %
-  \normalturnoffactive
-}
-
-% \commondummiesnofonts: common to \definedummies and \indexnofonts.
-% Define \commondummyletter, \commondummyaccent and \commondummyword before
-% using.  Used for accents, font commands, and various control letters.
-%
-\def\commondummiesnofonts{%
-  % Control letters and accents.
+  \turnoffactive
+}
+
+\newif\ifdummies
+\newif\ifindexnofonts
+
+\def\commondummyletter#1{%
+  \expandafter\let\csname\string#1:impl\endcsname#1%
+  \edef#1{%
+    \noexpand\ifindexnofonts
+      % empty expansion
+    \noexpand\else
+      \noexpand\ifdummies\string#1%
+      \noexpand\else
+        \noexpand\jumptwofi % dispose of the \fi
+        \expandafter\noexpand\csname\string#1:impl\endcsname
+      \noexpand\fi
+    \noexpand\fi}%
+}
+
+\def\commondummyaccent#1{%
+  \expandafter\let\csname\string#1:impl\endcsname#1%
+  \edef#1{%
+    \noexpand\ifindexnofonts
+      \noexpand\expandafter % dispose of \else ... \fi
+      \noexpand\asis
+    \noexpand\else
+      \noexpand\ifdummies\string#1%
+      \noexpand\else
+        \noexpand\jumptwofi % dispose of the \fi
+        \expandafter\noexpand\csname\string#1:impl\endcsname
+      \noexpand\fi
+    \noexpand\fi}%
+}
+
+% Like \commondummyaccent but add a \space at the end of the dummy expansion
+% #2 is the expansion used for \indexnofonts.  #2 is always followed by
+% \asis to remove a pair of following braces.
+\def\commondummyword#1#2{%
+  \expandafter\let\csname\string#1:impl\endcsname#1%
+  \expandafter\def\csname\string#1:ixnf\endcsname{#2\asis}%
+  \edef#1{%
+    \noexpand\ifindexnofonts
+      \noexpand\expandafter % dispose of \else ... \fi
+      \expandafter\noexpand\csname\string#1:ixnf\endcsname
+    \noexpand\else
+      \noexpand\ifdummies\string#1\space
+      \noexpand\else
+        \noexpand\jumptwofi % dispose of the \fi \fi
+        \expandafter\noexpand\csname\string#1:impl\endcsname
+      \noexpand\fi
+    \noexpand\fi}%
+}
+\def\jumptwofi#1\fi\fi{\fi\fi#1}
+
+% For \atdummies and \indexnofonts.  \atdummies sets
+% \dummiestrue and \indexnofonts sets \indexnofontstrue.
+\def\definedummies{
+  % @-sign is always an escape character when reading auxiliary files
+  \escapechar = `\@
+  %
   \commondummyletter\!%
   \commondummyaccent\"%
   \commondummyaccent\'%
@@ -4942,58 +4907,123 @@ $$%
   \commondummyaccent\^%
   \commondummyaccent\`%
   \commondummyaccent\~%
-  \commondummyword\u
-  \commondummyword\v
-  \commondummyword\H
-  \commondummyword\dotaccent
-  \commondummyword\ogonek
-  \commondummyword\ringaccent
-  \commondummyword\tieaccent
-  \commondummyword\ubaraccent
-  \commondummyword\udotaccent
-  \commondummyword\dotless
+  %
+  % Control letters and accents.
+  \commondummyword\u          {}%
+  \commondummyword\v          {}%
+  \commondummyword\H          {}%
+  \commondummyword\dotaccent  {}%
+  \commondummyword\ogonek     {}%
+  \commondummyword\ringaccent {}%
+  \commondummyword\tieaccent  {}%
+  \commondummyword\ubaraccent {}%
+  \commondummyword\udotaccent {}%
+  \commondummyword\dotless    {}%
   %
   % Texinfo font commands.
-  \commondummyword\b
-  \commondummyword\i
-  \commondummyword\r
-  \commondummyword\sansserif
-  \commondummyword\sc
-  \commondummyword\slanted
-  \commondummyword\t
+  \commondummyword\b          {}%
+  \commondummyword\i          {}%
+  \commondummyword\r          {}%
+  \commondummyword\sansserif  {}%
+  \commondummyword\sc         {}%
+  \commondummyword\slanted    {}%
+  \commondummyword\t          {}%
   %
   % Commands that take arguments.
-  \commondummyword\abbr
-  \commondummyword\acronym
-  \commondummyword\anchor
-  \commondummyword\cite
-  \commondummyword\code
-  \commondummyword\command
-  \commondummyword\dfn
-  \commondummyword\dmn
-  \commondummyword\email
-  \commondummyword\emph
-  \commondummyword\env
-  \commondummyword\file
-  \commondummyword\image
-  \commondummyword\indicateurl
-  \commondummyword\inforef
-  \commondummyword\kbd
-  \commondummyword\key
-  \commondummyword\math
-  \commondummyword\option
-  \commondummyword\pxref
-  \commondummyword\ref
-  \commondummyword\samp
-  \commondummyword\strong
-  \commondummyword\tie
-  \commondummyword\U
-  \commondummyword\uref
-  \commondummyword\url
-  \commondummyword\var
-  \commondummyword\verb
-  \commondummyword\w
-  \commondummyword\xref
+  \commondummyword\abbr       {}%
+  \commondummyword\acronym    {}%
+  \commondummyword\anchor     {}%
+  \commondummyword\cite       {}%
+  \commondummyword\code       {}%
+  \commondummyword\command    {}%
+  \commondummyword\dfn        {}%
+  \commondummyword\dmn        {}%
+  \commondummyword\email      {}%
+  \commondummyword\emph       {}%
+  \commondummyword\env        {}%
+  \commondummyword\file       {}%
+  \commondummyword\image      {}%
+  \commondummyword\indicateurl{}%
+  \commondummyword\inforef    {}%
+  \commondummyword\kbd        {}%
+  \commondummyword\key        {}%
+  \commondummyword\math       {}%
+  \commondummyword\option     {}%
+  \commondummyword\pxref      {}%
+  \commondummyword\ref        {}%
+  \commondummyword\samp       {}%
+  \commondummyword\strong     {}%
+  \commondummyword\tie        {}%
+  \commondummyword\U          {}%
+  \commondummyword\uref       {}%
+  \commondummyword\url        {}%
+  \commondummyword\var        {}%
+  \commondummyword\verb       {}%
+  \commondummyword\w          {}%
+  \commondummyword\xref       {}%
+  %
+  \commondummyword\AA               {AA}%
+  \commondummyword\AE               {AE}%
+  \commondummyword\DH               {DZZ}%
+  \commondummyword\L                {L}%
+  \commondummyword\O                {O}%
+  \commondummyword\OE               {OE}%
+  \commondummyword\TH               {TH}%
+  \commondummyword\aa               {aa}%
+  \commondummyword\ae               {ae}%
+  \commondummyword\dh               {dzz}%
+  \commondummyword\exclamdown       {!}%
+  \commondummyword\l                {l}%
+  \commondummyword\o                {o}%
+  \commondummyword\oe               {oe}%
+  \commondummyword\ordf             {a}%
+  \commondummyword\ordm             {o}%
+  \commondummyword\questiondown     {?}%
+  \commondummyword\ss               {ss}%
+  \commondummyword\th               {th}%
+  %
+  \commondummyword\LaTeX            {LaTeX}%
+  \commondummyword\TeX              {TeX}%
+  %
+  % Assorted special characters.
+  \commondummyword\ampchar          {\normalamp}%
+  \commondummyword\atchar           {\@}%
+  \commondummyword\arrow            {->}%
+  \commondummyword\backslashchar    {}%
+  \commondummyword\bullet           {bullet}%
+  \commondummyword\comma            {,}%
+  \commondummyword\copyright        {copyright}%
+  \commondummyword\dots             {...}%
+  \commondummyword\enddots          {...}%
+  \commondummyword\entrybreak       {}%
+  \commondummyword\equiv            {===}%
+  \commondummyword\error            {error}%
+  \commondummyword\euro             {euro}%
+  \commondummyword\expansion        {==>}%
+  \commondummyword\geq              {>=}%
+  \commondummyword\guillemetleft    {<<}%
+  \commondummyword\guillemetright   {>>}%
+  \commondummyword\guilsinglleft    {<}%
+  \commondummyword\guilsinglright   {>}%
+  \commondummyword\lbracechar       {\{}%
+  \commondummyword\leq              {<=}%
+  \commondummyword\mathopsup        {sup}%
+  \commondummyword\minus            {-}%
+  \commondummyword\pounds           {pounds}%
+  \commondummyword\point            {.}%
+  \commondummyword\print            {-|}%
+  \commondummyword\quotedblbase     {"}%
+  \commondummyword\quotedblleft     {"}%
+  \commondummyword\quotedblright    {"}%
+  \commondummyword\quoteleft        {`}%
+  \commondummyword\quoteright       {'}%
+  \commondummyword\quotesinglbase   {,}%
+  \commondummyword\rbracechar       {\}}%
+  \commondummyword\registeredsymbol {R}%
+  \commondummyword\result           {=>}%
+  \commondummyword\sub              {}%
+  \commondummyword\sup              {}%
+  \commondummyword\textdegree       {o}%
 }
 
 \let\indexlbrace\relax
@@ -5044,18 +5074,7 @@ $$%
 % would be for a given command (usually its argument).
 %
 \def\indexnofonts{%
-  % Accent commands should become @asis.
-  \def\commondummyaccent##1{\let##1\asis}%
-  % We can just ignore other control letters.
-  \def\commondummyletter##1{\let##1\empty}%
-  % All control words become @asis by default; overrides below.
-  \let\commondummyword\commondummyaccent
-  \commondummiesnofonts
-  %
-  % Don't no-op \tt, since it isn't a user-level command
-  % and is used in the definitions of the active chars like <, >, |, etc.
-  % Likewise with the other plain tex font commands.
-  %\let\tt=\asis
+  \indexnofontstrue
   %
   \def\ { }%
   \def\@{@}%
@@ -5067,65 +5086,6 @@ $$%
   \let\lbracechar\{%
   \let\rbracechar\}%
   %
-  % Non-English letters.
-  \def\AA{AA}%
-  \def\AE{AE}%
-  \def\DH{DZZ}%
-  \def\L{L}%
-  \def\OE{OE}%
-  \def\O{O}%
-  \def\TH{TH}%
-  \def\aa{aa}%
-  \def\ae{ae}%
-  \def\dh{dzz}%
-  \def\exclamdown{!}%
-  \def\l{l}%
-  \def\oe{oe}%
-  \def\ordf{a}%
-  \def\ordm{o}%
-  \def\o{o}%
-  \def\questiondown{?}%
-  \def\ss{ss}%
-  \def\th{th}%
-  %
-  \let\do\indexnofontsdef
-  %
-  \do\LaTeX{LaTeX}%
-  \do\TeX{TeX}%
-  %
-  % Assorted special characters.
-  \do\atchar{@}%
-  \do\arrow{->}%
-  \do\bullet{bullet}%
-  \do\comma{,}%
-  \do\copyright{copyright}%
-  \do\dots{...}%
-  \do\enddots{...}%
-  \do\equiv{==}%
-  \do\error{error}%
-  \do\euro{euro}%
-  \do\expansion{==>}%
-  \do\geq{>=}%
-  \do\guillemetleft{<<}%
-  \do\guillemetright{>>}%
-  \do\guilsinglleft{<}%
-  \do\guilsinglright{>}%
-  \do\leq{<=}%
-  \do\lbracechar{\{}%
-  \do\minus{-}%
-  \do\point{.}%
-  \do\pounds{pounds}%
-  \do\print{-|}%
-  \do\quotedblbase{"}%
-  \do\quotedblleft{"}%
-  \do\quotedblright{"}%
-  \do\quoteleft{`}%
-  \do\quoteright{'}%
-  \do\quotesinglbase{,}%
-  \do\rbracechar{\}}%
-  \do\registeredsymbol{R}%
-  \do\result{=>}%
-  \do\textdegree{o}%
   %
   % We need to get rid of all macros, leaving only the arguments (if present).
   % Of course this is not nearly correct, but it is the best we can do for now.
@@ -5137,14 +5097,11 @@ $$%
   % to take a single TeX argument.  The case of a macro invocation that
   % goes to end-of-line is not handled.
   %
+  \def\commondummyword##1{\let##1\asis}%
   \macrolist
   \let\value\indexnofontsvalue
 }
 
-% Give the control sequence a definition that removes the {} that follows
-% its use, e.g. @AA{} -> AA
-\def\indexnofontsdef#1#2{\def#1##1{#2}}%
-
 
 
 
@@ -7135,8 +7092,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 \newdimen\cartouter\newdimen\cartinner
 \newskip\normbskip\newskip\normpskip\newskip\normlskip
 
-
-\envdef\cartouche{%
+\envparseargdef\cartouche{%
   \cartouchefontdefs
   \ifhmode\par\fi  % can't be in the midst of a paragraph.
   \startsavinginserts
@@ -7166,16 +7122,19 @@ might help (with 'rm \jobname.?? \jobname.??s')%
       \baselineskip=0pt\parskip=0pt\lineskip=0pt
       \carttop
       \hbox\bgroup
-         \hskip\lskip
-         \vrule\kern3pt
-         \vbox\bgroup
-             \kern3pt
-             \hsize=\cartinner
-             \baselineskip=\normbskip
-             \lineskip=\normlskip
-             \parskip=\normpskip
-             \vskip -\parskip
-             \comment % For explanation, see the end of def\group.
+          \hskip\lskip
+          \vrule\kern3pt
+          \vbox\bgroup
+              \hsize=\cartinner
+              \baselineskip=\normbskip
+              \lineskip=\normlskip
+              \parskip=\normpskip
+              \def\arg{#1}%
+              \ifx\arg\empty\else
+                \centerV{\hfil \bf #1 \hfil}%
+              \fi
+              \kern3pt
+              \vskip -\parskip
 }
 \def\Ecartouche{%
               \ifhmode\par\fi
@@ -7858,10 +7817,12 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 
 % Print arguments.  Use slanted for @def*, typewriter for @deftype*.
 \def\defunargs#1{%
-  \df \ifdoingtypefn \tt \else \sl \fi
-  \ifflagclear{txicodevaristt}{}%
-    {\def\var##1{{\setregularquotes \ttsl ##1}}}%
-  #1%
+  \bgroup
+    \df \ifdoingtypefn \tt \else \sl \fi
+    \ifflagclear{txicodevaristt}{}%
+       {\def\var##1{{\setregularquotes \ttsl ##1}}}%
+    #1%
+  \egroup
 }
 
 % We want ()&[] to print specially on the defun line.
@@ -9900,12 +9861,10 @@ directory should work if nowhere else does.}
        % For native Unicode handling (XeTeX and LuaTeX)
        \nativeunicodechardefs
      \else
-       % For treating UTF-8 as byte sequences (TeX, eTeX and pdfTeX)
+       % For treating UTF-8 as byte sequences (TeX, eTeX and pdfTeX).
+       % Since we already invoke \utfeightchardefs at the top level,
+       % making non-ascii chars active is sufficient.
        \setnonasciicharscatcode\active
-       % since we already invoked \utfeightchardefs at the top level
-       % (below), do not re-invoke it, otherwise our check for duplicated
-       % definitions gets triggered.  Making non-ascii chars active is
-       % sufficient.
      \fi
   %
   \else
@@ -9930,7 +9889,6 @@ directory should work if nowhere else does.}
   \fi
 }
 
-% emacs-page
 % A message to be logged when using a character that isn't available
 % the default font encoding (OT1).
 %
@@ -9939,12 +9897,6 @@ directory should work if nowhere else does.}
 % Take account of \c (plain) vs. \, (Texinfo) difference.
 \def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi}
 
-% First, make active non-ASCII characters in order for them to be
-% correctly categorized when TeX reads the replacement text of
-% macros containing the character definitions.
-\setnonasciicharscatcode\active
-%
-
 \def\gdefchar#1#2{%
 \gdef#1{%
    \ifpassthroughchars
@@ -9954,8 +9906,14 @@ directory should work if nowhere else does.}
    \fi
 }}
 
+\begingroup
+
+% Make non-ASCII characters active for defining the character definition
+% macros.
+\setnonasciicharscatcode\active
+
 % Latin1 (ISO-8859-1) character definitions.
-\def\latonechardefs{%
+\gdef\latonechardefs{%
   \gdefchar^^a0{\tie}
   \gdefchar^^a1{\exclamdown}
   \gdefchar^^a2{{\tcfont \char162}} % cent
@@ -10060,7 +10018,7 @@ directory should work if nowhere else does.}
 }
 
 % Latin9 (ISO-8859-15) encoding character definitions.
-\def\latninechardefs{%
+\gdef\latninechardefs{%
   % Encoding is almost identical to Latin1.
   \latonechardefs
   %
@@ -10075,7 +10033,7 @@ directory should work if nowhere else does.}
 }
 
 % Latin2 (ISO-8859-2) character definitions.
-\def\lattwochardefs{%
+\gdef\lattwochardefs{%
   \gdefchar^^a0{\tie}
   \gdefchar^^a1{\ogonek{A}}
   \gdefchar^^a2{\u{}}
@@ -10179,6 +10137,8 @@ directory should work if nowhere else does.}
   \gdefchar^^ff{\dotaccent{}}
 }
 
+\endgroup % active chars
+
 % UTF-8 character definitions.
 %
 % This code to support UTF-8 is based on LaTeX's utf8.def, with some
@@ -11231,14 +11191,14 @@ directory should work if nowhere else does.}
    \relax
 }
 
-% Define all Unicode characters we know about.  This makes UTF-8 the default
-% input encoding and allows @U to work.
+% Define all Unicode characters we know about
 \iftxinativeunicodecapable
   \nativeunicodechardefsatu
 \else
   \utfeightchardefs
 \fi
 
+
 \message{formatting,}
 
 \newdimen\defaultparindent \defaultparindent = 15pt
@@ -11566,7 +11526,7 @@ directory should work if nowhere else does.}
   \fi
 }
 
-\microtypeON
+\microtypeOFF
 
 \parseargdef\microtype{%
   \def\txiarg{#1}%
@@ -11583,6 +11543,9 @@ directory should work if nowhere else does.}
 
 \message{and turning on texinfo input format.}
 
+% Make UTF-8 the default encoding.
+\documentencodingzzz{UTF-8}
+
 \def^^L{\par} % remove \outer, so ^L can appear in an @comment
 \catcode`\^^K = 10 % treat vertical tab as whitespace
 
@@ -11645,23 +11608,32 @@ directory should work if nowhere else does.}
 % Used sometimes to turn off (effectively) the active characters even after
 % parsing them.
 \def\turnoffactive{%
-  \normalturnoffactive
+  \passthroughcharstrue
+  \let-=\normaldash
+  \let"=\normaldoublequote
+  \let$=\normaldollar %$ font-lock fix
+  \let+=\normalplus
+  \let<=\normalless
+  \let>=\normalgreater
+  \let^=\normalcaret
+  \let_=\normalunderscore
+  \let|=\normalverticalbar
+  \let~=\normaltilde
   \otherbackslash
+  \setregularquotes
+  \unsepspaces
 }
 
-\catcode`\@=0
+% If a .fmt file is being used, characters that might appear in a file
+% name cannot be active until we have parsed the command line.
+% So turn them off again, and have \loadconf turn them back on.
+\catcode`+=\other \catcode`\_=\other
+
 
 % \backslashcurfont outputs one backslash character in current font,
 % as in \char`\\.
 \global\chardef\backslashcurfont=`\\
 
-% \realbackslash is an actual character `\' with catcode other.
-{\catcode`\\=\other @gdef@realbackslash{\}}
-
-% In Texinfo, backslash is an active character; it prints the backslash
-% in fixed width font.
-\catcode`\\=\active  % @ for escape char from now on.
-
 % Print a typewriter backslash.  For math mode, we can't simply use
 % \backslashcurfont: the story here is that in math mode, the \char
 % of \backslashcurfont ends up printing the roman \ from the math symbol
@@ -11671,109 +11643,120 @@ directory should work if nowhere else does.}
 % ignored family value; char position "5C).  We can't use " for the
 % usual hex value because it has already been made active.
 
-@def@ttbackslash{{@tt @ifmmode @mathchar29020 @else @backslashcurfont @fi}}
-@let@backslashchar = @ttbackslash % @backslashchar{} is for user documents.
-
-% \otherbackslash defines an active \ to be a literal `\' character with
-% catcode other.
-@gdef@otherbackslash{@let\=@realbackslash}
-
-% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
-% the literal character `\'.
-%
-{@catcode`- = @active
- @gdef@normalturnoffactive{%
-   @passthroughcharstrue
-   @let-=@normaldash
-   @let"=@normaldoublequote
-   @let$=@normaldollar %$ font-lock fix
-   @let+=@normalplus
-   @let<=@normalless
-   @let>=@normalgreater
-   @let^=@normalcaret
-   @let_=@normalunderscore
-   @let|=@normalverticalbar
-   @let~=@normaltilde
-   @let\=@ttbackslash
-   @setregularquotes
-   @unsepspaces
- }
-}
+\def\ttbackslash{{\tt \ifmmode \mathchar29020 \else \backslashcurfont \fi}}
+\let\backslashchar = \ttbackslash % \backslashchar{} is for user documents.
 
-% If a .fmt file is being used, characters that might appear in a file
-% name cannot be active until we have parsed the command line.
-% So turn them off again, and have @fixbackslash turn them back on.
-@catcode`+=@other @catcode`@_=@other
-
-% \enablebackslashhack - allow file to begin `\input texinfo'
-%
-% If a .fmt file is being used, we don't want the `\input texinfo' to show up.
-% That is what \eatinput is for; after that, the `\' should revert to printing
-% a backslash.
-% If the file did not have a `\input texinfo', then it is turned off after
-% the first line; otherwise the first `\' in the file would cause an error.
-% This is used on the very last line of this file, texinfo.tex.
-% We also use @c to call @fixbackslash, in case ends of lines are hidden.
-{
-@catcode`@^=7
-@catcode`@^^M=13@gdef@enablebackslashhack{%
-  @global@let\ = @eatinput%
-  @catcode`@^^M=13%
-  @def@c{@fixbackslash@c}%
-  % Definition for the newline at the end of this file.
-  @def ^^M{@let^^M@secondlinenl}%
-  % Definition for a newline in the main Texinfo file.
-  @gdef @secondlinenl{@fixbackslash}%
+% These are made active for url-breaking, so need
+% active definitions as the normal characters.
+\def\normaldot{.}
+\def\normalquest{?}
+\def\normalslash{/}
+
+% \newlinesloadsconf - call \loadconf as soon as possible in the
+% file, e.g. at the first newline.
+%
+{\catcode`\^=7
+\catcode`\^^M=13
+\gdef\newlineloadsconf{%
+  \catcode`\^^M=13 %
+  \newlineloadsconfzz%
+}
+\gdef\newlineloadsconfzz#1^^M{%
+  \def\c{\loadconf\c}%
+  % Definition for the first newline read in the file
+  \def ^^M{\loadconf}%
   % In case the first line has a whole-line command on it
-  @let@originalparsearg@parsearg
-  @def@parsearg{@fixbackslash@originalparsearg}
+  \let\originalparsearg\parsearg%
+  \def\parsearg{\loadconf\originalparsearg}%
 }}
 
-{@catcode`@^=7 @catcode`@^^M=13%
-@gdef@eatinput input texinfo#1^^M{@fixbackslash}}
 
 % Emergency active definition of newline, in case an active newline token
 % appears by mistake.
-{@catcode`@^=7 @catcode13=13%
-@gdef@enableemergencynewline{%
-  @gdef^^M{%
-    @par%
-    %<warning: active newline>@par%
+{\catcode`\^=7 \catcode13=13%
+\gdef\enableemergencynewline{%
+  \gdef^^M{%
+    \par%
+    %<warning: active newline>\par%
 }}}
 
 
-@gdef@fixbackslash{%
-  @ifx\@eatinput @let\ = @ttbackslash @fi
-  @catcode13=5 % regular end of line
-  @enableemergencynewline
-  @let@c=@comment
-  @let@parsearg@originalparsearg
+% \loadconf gets called at the beginning of every Texinfo file.
+% If texinfo.cnf is present on the system, read it.  Useful for site-wide
+% @afourpaper, etc.  Not opening texinfo.cnf directly in texinfo.tex
+% makes it possible to make a format file for Texinfo.
+%
+\gdef\loadconf{%
+  \relax  % Terminate the filename if running as "tex '&texinfo' FILE.texi".
+  %
+  % Turn off the definitions that trigger \loadconf
+  \everyjobreset
+  \catcode13=5 % regular end of line
+  \enableemergencynewline
+  \let\c=\comment
+  \let\parsearg\originalparsearg
+  %
   % Also turn back on active characters that might appear in the input
   % file name, in case not using a pre-dumped format.
-  @catcode`+=@active
-  @catcode`@_=@active
-  %
-  % If texinfo.cnf is present on the system, read it.
-  % Useful for site-wide @afourpaper, etc.  This macro, @fixbackslash, gets
-  % called at the beginning of every Texinfo file.  Not opening texinfo.cnf
-  % directly in this file, texinfo.tex, makes it possible to make a format
-  % file for Texinfo.
+  \catcode`+=\active
+  \catcode`\_=\active
   %
-  @openin 1 texinfo.cnf
-  @ifeof 1 @else @input texinfo.cnf @fi
-  @closein 1
+  \openin 1 texinfo.cnf
+  \ifeof 1 \else \input texinfo.cnf \fi
+  \closein 1
 }
 
+% Redefine some control sequences to be controlled by the \ifdummies
+% and \ifindexnofonts switches.  Do this at the end so that the control
+% sequences are all defined.
+\definedummies
+
+
+
+
+\catcode`\@=0
+
+% \realbackslash is an actual character `\' with catcode other.
+{\catcode`\\=\other @gdef@realbackslash{\}}
+
+% In Texinfo, backslash is an active character; it prints the backslash
+% in fixed width font.
+\catcode`\\=\active  % @ for escape char from now on.
+
+@let\ = @ttbackslash
+
+% If in a .fmt file, print the version number.
+% \eatinput stops the `\input texinfo' from showing up.
+% After that, `\' should revert to printing a backslash.
+% Turn on active characters that we couldn't do earlier because
+% they might have appeared in the input file name.
+%
+@everyjob{@message{[Texinfo version @texinfoversion]}%
+  @global@let\ = @eatinput
+  @catcode`+=@active @catcode`@_=@active}
+
+{@catcode`@^=7 @catcode`@^^M=13%
+@gdef@eatinput input texinfo#1^^M{@loadconf}}
+
+@def@everyjobreset{@ifx\@eatinput @let\ = @ttbackslash @fi}
+
+% \otherbackslash defines an active \ to be a literal `\' character with
+% catcode other.
+@gdef@otherbackslash{@let\=@realbackslash}
+
+% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
+% the literal character `\'.
+%
+{@catcode`- = @active
+ @gdef@normalturnoffactive{%
+   @turnoffactive
+   @let\=@ttbackslash
+ }
+}
 
 % Say @foo, not \foo, in error messages.
 @escapechar = `@@
 
-% These (along with & and #) are made active for url-breaking, so need
-% active definitions as the normal characters.
-@def@normaldot{.}
-@def@normalquest{?}
-@def@normalslash{/}
-
 % These look ok in all fonts, so just make them not special.
 % @hashchar{} gets its own user-level command, because of #line.
 @catcode`@& = @other @def@normalamp{&}
@@ -11788,15 +11771,11 @@ directory should work if nowhere else does.}
 @c Do this last of all since we use ` in the previous @catcode assignments.
 @catcode`@'=@active
 @catcode`@`=@active
-@setregularquotes
 
 @c Local variables:
 @c eval: (add-hook 'before-save-hook 'time-stamp nil t)
 @c time-stamp-pattern: "texinfoversion{%Y-%02m-%02d.%02H}"
-@c page-delimiter: "^\\\\message\\|emacs-page"
+@c page-delimiter: "^\\\\message"
 @c End:
 
-@c vim:sw=2:
-
-@enablebackslashhack
-
+@newlineloadsconf
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi
index 56436d32970..7f66dc9e849 100644
--- a/doc/misc/tramp.texi
+++ b/doc/misc/tramp.texi
@@ -1,5 +1,5 @@
 \input texinfo   @c -*- mode: texinfo; coding: utf-8 -*-
-@setfilename ../info/tramp
+@setfilename ../../info/tramp.info
 @c %**start of header
 @include docstyle.texi
 @c In the Tramp GIT, the version number and the bug report address
@@ -927,6 +927,17 @@ pod is used.
 
 This method does not support user names.
 
+@item @option{toolbox}
+@cindex method @option{toolbox}
+@cindex @option{toolbox} method
+
+Integration of Toolbox system containers.  The host name may be either
+a container's name or ID, as returned by @samp{toolbox list -c}.
+Without a host name, the default Toolbox container for the host will
+be used.
+
+This method does not support user names.
+
 @end table
 
 
@@ -3928,12 +3939,12 @@ connection-local variables.
 
 @vindex async-shell-command-width
 @vindex COLUMNS@r{, environment variable}
-If Emacs supports the user option @code{async-shell-command-width}
-(since @w{Emacs 27}), @value{tramp} cares about its value for
-asynchronous shell commands.  It specifies the number of display
-columns for command output.  For synchronous shell commands, a similar
-effect can be achieved by adding the environment variable
-@env{COLUMNS} to @code{tramp-remote-process-environment}.
+@value{tramp} cares about the user option
+@code{async-shell-command-width} for asynchronous shell commands.  It
+specifies the number of display columns for command output.  For
+synchronous shell commands, a similar effect can be achieved by adding
+the environment variable @env{COLUMNS} to
+@code{tramp-remote-process-environment}.
 
 
 @subsection Running @code{eshell} on a remote host
@@ -4824,8 +4835,8 @@ Where is the latest @value{tramp}?
 @item
 Which systems does it work on?
 
-The package works successfully on @w{Emacs 26}, @w{Emacs 27}, @w{Emacs
-28}, and @w{Emacs 29}.
+The package works successfully on @w{Emacs 27}, @w{Emacs 28}, @w{Emacs
+29}, and @w{Emacs 30}.
 
 While Unix and Unix-like systems are the primary remote targets,
 @value{tramp} has equal success connecting to other platforms, such as
diff --git a/doc/misc/trampver.texi b/doc/misc/trampver.texi
index dce02933f2b..2f505c6acea 100644
--- a/doc/misc/trampver.texi
+++ b/doc/misc/trampver.texi
@@ -7,10 +7,10 @@
 
 @c In the  Tramp GIT, the version number and the bug report address
 @c are auto-frobbed from configure.ac.
-@set trampver 2.6.0-pre
+@set trampver 2.7.0-pre
 @set trampurl https://www.gnu.org/software/tramp/
 @set tramp-bug-report-address tramp-devel@@gnu.org
-@set emacsver 26.1
+@set emacsver 27.1
 
 @c Other flags from configuration.
 @set instprefix /usr/local
diff --git a/etc/NEWS b/etc/NEWS
index 1ab6822da3f..690e9c3faa9 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1,6 +1,6 @@
 GNU Emacs NEWS -- history of user-visible changes.
 
-Copyright (C) 2021-2023 Free Software Foundation, Inc.
+Copyright (C) 2022-2023 Free Software Foundation, Inc.
 See the end of the file for license conditions.
 
 Please send Emacs bug reports to 'bug-gnu-emacs@gnu.org'.
@@ -32,13 +32,13 @@ applies, and please also update docstrings as needed.
 
 ** X selection requests are now handled much faster and asynchronously.
 This means it should be less necessary to disable the likes of
-`select-active-regions' when Emacs is running over a slow network
+'select-active-regions' when Emacs is running over a slow network
 connection.
 
 ** Emacs now updates invisible frames that are made visible by a compositor.
 If an invisible or an iconified frame is shown to the user by the
 compositing manager, Emacs will now redisplay such a frame even though
-'frame-visible-' returns nil or 'icon' for it.  This can happen, for
+'frame-visible-p' returns nil or 'icon' for it.  This can happen, for
 example, as part of preview for iconified frames.
 
 +++
@@ -48,11 +48,11 @@ as it has in batch mode since Emacs 24.
 
 * Editing Changes in Emacs 30.1
 
-** New helper 'transpose-sexps-function'
-Emacs now can set this defvar to customize the behavior of the
+** New helper variable 'transpose-sexps-function'.
+Emacs now can set this variable to customize the behavior of the
 'transpose-sexps' function.
 
-** New function 'treesit-transpose-sexps'
+** New function 'treesit-transpose-sexps'.
 treesit.el now unconditionally sets 'transpose-sexps-function' for all
 Tree-sitter modes.  This functionality utilizes the new
 'transpose-sexps-function'.
@@ -60,20 +60,20 @@ Tree-sitter modes.  This functionality utilizes the new
 
 * Changes in Specialized Modes and Packages in Emacs 30.1
 ---
-** Variable order and truncation can now be configured in gdb-many-window mode.
-The new variable 'gdb-locals-table-row-config' allows users to
+** Variable order and truncation can now be configured in 'gdb-many-windows'.
+The new user option 'gdb-locals-table-row-config' allows users to
 configure the order and max length of various properties in the local
 variables buffer when using 'gdb-many-windows'.
 
-By default, this variable is set to write the properties in the order:
+By default, this user option is set to write the properties in the order:
 name, type and value, where the name and type are truncated to 20
 characters, and the value is truncated according to the value of
 'gdb-locals-value-limit'.
 
-If you want to get back the old behavior, set
-'gdb-locals-table-row-config' to  the value
+If you want to get back the old behavior, set the user option to the value
 
-  ((type . 0)(name . 0)(value . ,gdb-locals-value-limit)).
+    (setopt gdb-locals-table-row-config
+            `((type . 0) (name . 0) (value . ,gdb-locals-value-limit)))
 
 ** VC
 
@@ -83,7 +83,7 @@ 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.
 
-** bs
+** Buffer Selection
 
 ---
 *** New user option 'bs-default-action-list'.
@@ -102,32 +102,45 @@ manual.
 
 +++
 *** 'eshell-read-aliases-list' is now an interactive command.
-After manually editing 'eshell-aliases-file', you can use
-'M-x eshell-read-aliases-list' to load the edited aliases.
+After manually editing 'eshell-aliases-file', you can use this command
+to load the edited aliases.
 
 ** Prog Mode
+
 +++
-*** New command 'prog-fill-reindent-defun'
+*** New command 'prog-fill-reindent-defun'.
 This command either fills a single paragraph in a defun, such as a
-doc-string, or a comment, or (re)indents the surrounding defun if
+docstring, or a comment, or (re)indents the surrounding defun if
 point is not in a comment or a string.  It is by default bound to
 'M-q' in 'prog-mode' and all its descendants.
+
+** Tramp
+
++++
+*** New connection method "toolbox".
+This allow accessing system containers provided by Toolbox.
+
 
 * New Modes and Packages in Emacs 30.1
+
 ---
-** The highly accessible Modus themes collection has six items
+** The highly accessible Modus themes collection has six items.
 The 'modus-operandi' and 'modus-vivendi' are the main themes that have
 been part of Emacs since version 28.  The former is light, the latter
 dark.  In addition to these, we now have 'modus-operandi-tinted' and
 'modus-vivendi-tinted' for easier legibility, as well as
 'modus-operandi-deuteranopia' and 'modus-vivendi-deuteranopia' to
 cover the needs of users with red-green color deficiency.  The Info
-manual of the themes describes the details and showcases all their
-customization options.
+manual "(modus-themes) Top" describes the details and showcases all
+their customization options.
 
 
 * Incompatible Lisp Changes in Emacs 30.1
 
+** User option 'tramp-completion-reread-directory-timeout' has been removed.
+This user option has been obsoleted in Emacs 27, use
+'remote-file-name-inhibit-cache' instead.
+
 
 * Lisp Changes in Emacs 30.1
 
@@ -139,7 +152,7 @@ The compiler now warns about an empty body argument to 
'when',
 'unless', 'ignore-error' and 'with-suppressed-warnings' in addition to
 the existing warnings for 'let' and 'let*'.  Example:
 
-  (when (> x 2))
+    (when (> x 2))
 
 This warning can be suppressed using 'with-suppressed-warnings' with
 the warning name 'empty-body'.
@@ -149,9 +162,9 @@ the warning name 'empty-body'.
 The compiler now warns about quoted condition (error) names
 in 'condition-case' and 'ignore-error'.  Example:
 
-  (condition-case nil
-      (/ x y)
-    ('arith-error "division by zero"))
+    (condition-case nil
+        (/ x y)
+      ('arith-error "division by zero"))
 
 Quoting them adds the error name 'quote' to those handled or ignored
 respectively, which was probably not intended.
@@ -162,7 +175,7 @@ The compiler now warns about comparisons by identity with a 
literal
 string, cons, vector, record, function, large integer or float as this
 may not match any value at all.  Example:
 
-  (eq x "hello")
+    (eq x "hello")
 
 Only literals for symbols and small integers (fixnums), including
 characters, are guaranteed to have a consistent (unique) identity.
@@ -177,7 +190,6 @@ compared reliably at all.
 This warning can be suppressed using 'with-suppressed-warnings' with
 the warning name 'suspicious'.
 
-
 
 * Changes in Emacs 30.1 on Non-Free Operating Systems
 
diff --git a/etc/NEWS.29 b/etc/NEWS.29
index 38a8798507a..5901b2718e9 100644
--- a/etc/NEWS.29
+++ b/etc/NEWS.29
@@ -332,7 +332,7 @@ this off, disable the new 'isearch-fold-quotes-mode' minor 
mode.
 
 ---
 ** Sorting commands no longer necessarily change modification status.
-In earlier Emacs versions, commands like 'M-x sort-lines' would always
+In earlier Emacs versions, commands like 'sort-lines' would always
 change buffer modification status to "modified", whether they changed
 something in the buffer or not.  This has been changed: the buffer is
 marked as modified only if the sorting ended up actually changing the
@@ -383,7 +383,7 @@ files that were compiled with an old EIEIO (Emacs<25).
 This is to open up the 'C-x 8 .' map to bind further characters there.
 
 ---
-** 'C-x 8 =' moved to 'C-x 8 = ='.
+** 'C-x 8 =' has been moved to 'C-x 8 = ='.
 You can now use 'C-x 8 =' to insert several characters with macron;
 for example, 'C-x 8 = a' will insert U+0101 LATIN SMALL LETTER A WITH
 MACRON.  To insert a lone macron, type 'C-x 8 = =' instead of the
@@ -393,8 +393,8 @@ previous 'C-x ='.
 
 *** Eshell's PATH is now derived from 'exec-path'.
 For consistency with remote connections, Eshell now uses 'exec-path'
-to determine the execution path on the local system, instead of using
-the PATH environment variable directly.
+to determine the execution path on the local or remote system, instead
+of using the PATH environment variable directly.
 
 ---
 *** 'source' and '.' no longer accept the '--help' option.
@@ -416,12 +416,12 @@ To pipe both stdout and stderr, use the '|&' operator 
instead of '|'.
 
 ---
 ** The 'delete-forward-char' command now deletes by grapheme clusters.
-This command is by default bound to the <Delete> function key
-(a.k.a. <deletechar>).  When invoked without a prefix argument or with
-a positive prefix numeric argument, the command will now delete
+This command is by default bound to the '<Delete>' function key
+(a.k.a. '<deletechar>').  When invoked without a prefix argument or
+with a positive prefix numeric argument, the command will now delete
 complete grapheme clusters produced by character composition.  For
-example, if point is before an Emoji sequence, pressing <Delete> will
-delete the entire sequence, not just a single character at its
+example, if point is before an Emoji sequence, pressing '<Delete>'
+will delete the entire sequence, not just a single character at its
 beginning.
 
 +++
@@ -510,7 +510,7 @@ performance, but the latter is closer to a drop-in 
replacement.
 
 ---
 ** The thumbs.el library is now obsolete.
-We recommend using 'M-x image-dired' instead.
+We recommend using command 'image-dired' instead.
 
 ---
 ** The autoarg.el library is now marked obsolete.
@@ -648,7 +648,7 @@ duplicated on its right-hand side.
 
 +++
 ** 'network-lookup-address-info' can now check numeric IP address validity.
-Specifying 'numeric' as the new optional 'hints' argument makes it
+Specifying 'numeric' as the new optional HINTS argument makes it
 check if the passed address is a valid IPv4/IPv6 address (without DNS
 traffic).
 
@@ -697,7 +697,7 @@ This is like 'save-buffers-kill-emacs', but instead of just 
killing
 the current Emacs process at the end, it starts a new Emacs process
 (using the same command line arguments as the running Emacs process).
 'kill-emacs' and 'save-buffers-kill-emacs' have also gained new
-optional parameters to restart instead of just killing the current
+optional arguments to restart instead of just killing the current
 process.
 
 ** Drag and Drop
@@ -798,6 +798,7 @@ filter/sentinel error has been handled.
 These faces are primarily meant for use with tree-sitter.  They are:
 'font-lock-bracket-face', 'font-lock-delimiter-face',
 'font-lock-escape-face', 'font-lock-number-face',
+'font-lock-regexp-face',
 'font-lock-misc-punctuation-face', 'font-lock-operator-face',
 'font-lock-property-face', and 'font-lock-punctuation-face'.
 
@@ -902,7 +903,7 @@ the 'COLORTERM' environment variable is set to the value 
"truecolor".
 
 ---
 *** Select active regions with xterm selection support.
-On terminals with xterm setSelection support, the active region may be
+On terminals with xterm "setSelection" support, the active region may be
 saved to the X primary selection, following the
 'select-active-regions' variable.  This support is enabled when
 'tty-select-active-regions' is non-nil.
@@ -1041,7 +1042,7 @@ instead.
 *** New user option 'help-enable-variable-value-editing'.
 If enabled, 'e' on a value in "*Help*" will pop you to a new buffer
 where you can edit the value.  This is not enabled by default, because
-it's easy to make an edit that yields an invalid result.
+it is easy to make an edit that yields an invalid result.
 
 ---
 *** 'C-h b' uses outlining by default.
@@ -1086,7 +1087,7 @@ helpful commands for various tasks.  You can toggle the 
display using
 'C-h C-q'.
 
 ** Emacs now comes with Org v9.6.
-See the file ORG-NEWS for user-visible changes in Org.
+See the file "ORG-NEWS" for user-visible changes in Org.
 
 ** Outline Mode
 
@@ -1135,14 +1136,14 @@ buffer on that frame.
 *** 'display-buffer' now can set up the body size of the chosen window.
 For example, a 'display-buffer-alist' entry of
 
-    '(window-width . (body-columns . 40))'
+    (window-width . (body-columns . 40))
 
 will make the body of the chosen window 40 columns wide.  For the
 height use 'window-height' and 'body-lines', respectively.
 
 ---
 *** You can customize on which window 'scroll-other-window' operates.
-This is controlled by the new 'other-window-scroll-default' user option.
+This is controlled by the new 'other-window-scroll-default' variable.
 
 ** Frames
 
@@ -1182,7 +1183,7 @@ LRI).  The new command 'highlight-confusing-reorderings' 
finds and
 highlights segments of buffer text whose reordering for display is
 suspicious and could be malicious.
 
-** Emacs server and client changes
+** Emacs Server and Client
 
 +++
 *** New command-line option '-r'/'--reuse-frame' for emacsclient.
@@ -1215,9 +1216,9 @@ available options can be restored by enabling this option.
 *** New user option 'rcirc-bridge-bot-alist'.
 If you are in a channel where a bot is responsible for bridging
 between networks, you can use this variable to make these messages
-appear more native.  For example you might set the option to:
+appear more native.  For example, you might set the option to:
 
-    (setq rcirc-bridge-bot-alist '(("bridge" . "{\\(.+?\\)}[[:space:]]+")))
+    (setopt rcirc-bridge-bot-alist '(("bridge" . "{\\(.+?\\)}[[:space:]]+")))
 
 for messages like
 
@@ -1256,6 +1257,7 @@ will wait forever for redisplay to finish.  (We believe 
you won't need
 this feature, given the ability to display buffers with very long
 lines.)
 
+
 * Editing Changes in Emacs 29.1
 
 +++
@@ -1313,12 +1315,12 @@ dragged.
 ---
 ** New user option 'yank-menu-max-items'.
 Customize this option to limit the number of entries in the menu
-"Edit->Paste from Kill Menu".  The default is 60.
+"Edit → Paste from Kill Menu".  The default is 60.
 
 +++
 ** Performing a pinch gesture on a touchpad now increases the text scale.
 
-** show-paren-mode
+** Show Paren Mode
 
 +++
 *** New user option 'show-paren-context-when-offscreen'.
@@ -1358,15 +1360,16 @@ you don't want to enable input fontification by default.
 
 ---
 *** New user options for alternate wheel events.
-The options 'mouse-wheel-down-alternate-event',
-'mouse-wheel-up-alternate-event', 'mouse-wheel-left-alternate-event',
-and 'mouse-wheel-right-alternate-event' have been added to better
-support systems where two kinds of wheel events can be received.
+The user options 'mouse-wheel-down-alternate-event' and
+'mouse-wheel-up-alternate-event' as well as the variables
+'mouse-wheel-left-alternate-event' and
+'mouse-wheel-right-alternate-event' have been added to better support
+systems where two kinds of wheel events can be received.
 
-** Internationalization changes
+** Internationalization
 
 ---
-*** The <Delete> function key now allows deleting the entire composed sequence.
+*** The '<Delete>' function key now allows deleting the entire composed 
sequence.
 For the details, see the item about the 'delete-forward-char' command
 above.
 
@@ -1471,7 +1474,7 @@ change the input method's translation rules, customize 
the user option
 'tamil-translation-rules'.
 
 ---
-*** New tamil99 input method for the Tamil language.
+*** New 'tamil99' input method for the Tamil language.
 This supports the keyboard layout specifically designed for the Tamil
 language.
 
@@ -1505,7 +1508,7 @@ If non-nil and there's only one matching option, 
auto-select that.
 If non-nil, this user option describes what entries not to add to the
 database stored on disk.
 
-** Auth-Source
+** Auth Source
 
 +++
 *** New user option 'auth-source-pass-extra-query-keywords'.
@@ -1537,7 +1540,7 @@ The corresponding key 'Y' is now bound by default in 
Dired.
 
 +++
 *** 'dired-do-relsymlink-regexp' moved from dired-x to dired.
-The corresponding key '% Y' is now bound by default in Dired.
+The corresponding key sequence '% Y' is now bound by default in Dired.
 
 ---
 *** 'M-G' is now bound to 'dired-goto-subdir'.
@@ -1583,7 +1586,7 @@ Dired will now, by default, include the free space in the 
first line
 instead of having it on a separate line.  To get the previous behavior
 back, say:
 
-    (setq dired-free-space 'separate)
+    (setopt dired-free-space 'separate)
 
 ---
 *** New user option 'dired-make-directory-clickable'.
@@ -1676,7 +1679,7 @@ this invocation as its default.
 This is bound to 'H' and toggles whether to hide or show the widget
 contents.
 
-** Diff mode
+** Diff Mode
 
 ---
 *** New user option 'diff-whitespace-style'.
@@ -1826,7 +1829,7 @@ only jump if the location of the first error is known), 
and
 
 +++
 *** New user option 'compilation-max-output-line-length'.
-Lines longer than the value of this variable will have their ends
+Lines longer than the value of this option will have their ends
 hidden, with a button to reveal the hidden text.  This speeds up
 operations like grepping on files that have few newlines.  The default
 value is 400; set to nil to disable hiding.
@@ -1858,10 +1861,10 @@ uses the 'key-parse' syntax.  It replaces the old 
'kmacro-lambda-form'
 
 ---
 ** savehist.el can now truncate variables that are too long.
-An element of 'savehist-additional-variables' can now be of the form
-'(VARIABLE . MAX-ELTS)', which means to truncate the VARIABLE's value to
-at most MAX-ELTS elements (if the value is a list) before saving the
-value.
+An element of user option 'savehist-additional-variables' can now be
+of the form '(VARIABLE . MAX-ELTS)', which means to truncate the
+VARIABLE's value to at most MAX-ELTS elements (if the value is a list)
+before saving the value.
 
 ** Minibuffer and Completions
 
@@ -1978,7 +1981,7 @@ command accepts the Unicode name of an Emoji (for 
example, "smiling
 face" or "heart with arrow"), like 'C-x 8 e e', with minibuffer
 completion, and adds the Emoji into the search string.
 
-** Glyphless characters
+** Glyphless Characters
 
 +++
 *** New minor mode 'glyphless-display-mode'.
@@ -1995,7 +1998,7 @@ and GUI terminals.
 *** "Replacement character" feature for undisplayable characters on TTYs.
 The 'acronym' method of displaying glyphless characters on text-mode
 frames treats single-character acronyms specially: they are displayed
-without the surrounding [..] "box", thus in effect treating such
+without the surrounding '[..]' "box", thus in effect treating such
 "acronyms" as replacement characters.
 
 ** Registers
@@ -2007,7 +2010,7 @@ For instance, to enable jumping to the "*Messages*" 
buffer with
 
     (set-register ?m '(buffer . "*Messages*"))
 
-** Pixel-fill
+** Pixel Fill
 
 +++
 *** This is a new package that deals with filling variable-pitch text.
@@ -2019,11 +2022,11 @@ This fills the region to be no wider than a specified 
pixel width.
 ** Info
 
 +++
-*** 'M-x info-apropos' now takes a prefix argument to search for regexps.
+*** Command 'info-apropos' now takes a prefix argument to search for regexps.
 
 ---
 *** New command 'Info-goto-node-web' and key binding 'G'.
-This will take you to the gnu.org web server's version of the current
+This will take you to the "gnu.org" web server's version of the current
 info node.  This command only works for the Emacs and Emacs Lisp manuals.
 
 ** Shortdoc
@@ -2164,9 +2167,9 @@ main Emacs initialization file ("~/.emacs" or 
"~/.emacs.d/init.el").
 
 +++
 *** 'eudc-expansion-overwrites-query' to 'eudc-expansion-save-query-as-kill'.
-'eudc-expansion-overwrites-query' is renamed to
+The user option 'eudc-expansion-overwrites-query' is renamed to
 'eudc-expansion-save-query-as-kill' to reflect the actual behavior of
-the user option.
+the user option.  The former is kept as alias.
 
 +++
 *** New command 'eudc-expand-try-all'.
@@ -2180,7 +2183,7 @@ for a name that happens to match a contact in one's BBDB.
 *** New behavior and default for user option 'eudc-inline-expansion-format'.
 EUDC inline expansion result formatting defaulted to
 
-    '("%s %s <%s>" firstname name email)
+    ("%s %s <%s>" firstname name email)
 
 Since email address specifications need to comply with RFC 5322 in
 order to be useful in messages, there was a risk to produce syntax
@@ -2227,8 +2230,9 @@ are supported only.
 The 'eww-auto-rename-buffer' user option can be configured to rename
 rendered web pages by using their title, URL, or a user-defined
 function which returns a string.  For the first two cases, the length
-of the resulting name is controlled by 'eww-buffer-name-length'.  By
-default, no automatic renaming is performed.
+of the resulting name is controlled by the user option
+'eww-buffer-name-length'.  By default, no automatic renaming is
+performed.
 
 +++
 *** New user option 'shr-allowed-images'.
@@ -2247,7 +2251,7 @@ doesn't work on other systems.  Also see etc/PROBLEMS.
 These are used to alter an URL before using it.  By default it removes
 the common "utm_" trackers from URLs.
 
-** Find-Dired
+** Find Dired
 
 ---
 *** New command 'find-dired-with-command'.
@@ -2264,14 +2268,14 @@ Message, referred to as 'gnus-summary-tool-bar-retro',
 'gnus-group-tool-bar-retro' and 'message-tool-bar-retro', and
 'gnus-summary-tool-bar-gnome', 'gnus-group-tool-bar-gnome' and
 'message-tool-bar-gnome'.  The "retro" tool bars have been removed (as
-well as the icons used), and the "Gnome" tool bars are now the only
+well as the icons used), and the "gnome" tool bars are now the only
 pre-defined toolbars.
 
 ---
 *** 'gnus-summary-up-thread' and 'gnus-summary-down-thread' bindings removed.
-The 'gnus-summary-down-thread' binding to "M-C-d" was shadowed by
+The 'gnus-summary-down-thread' binding to 'M-C-d' was shadowed by
 'gnus-summary-read-document', and these commands are also available on
-"T-u" and "T-d" respectively.
+'T u' and 'T d' respectively.
 
 ---
 *** Gnus now uses a variable-pitch font in the headers by default.
@@ -2355,7 +2359,7 @@ displayed in the "*Help*" buffer will be linked to the 
documentation
 for the command they are bound to.  This does not affect listings of
 key bindings and functions (such as 'C-h b').
 
-** Info-look
+** Info Look
 
 ---
 *** info-look specs can now be expanded at run time instead of a load time.
@@ -2363,14 +2367,14 @@ The new ':doc-spec-function' element can be used to 
compute the
 ':doc-spec' element when the user asks for info on that particular
 mode (instead of at load time).
 
-** Ansi-color
+** Ansi Color
 
 ---
 *** Support for ANSI 256-color and 24-bit colors.
 256-color and 24-bit color codes are now handled by ANSI color
 filters and displayed with the specified color.
 
-** Term-mode
+** Term Mode
 
 ---
 *** New user option 'term-bind-function-keys'.
@@ -2434,7 +2438,7 @@ matches.
 ---
 *** New function 'xref-show-xrefs'.
 
-** File notifications
+** File Notifications
 
 +++
 *** The new command 'file-notify-rm-all-watches' removes all file 
notifications.
@@ -2505,7 +2509,7 @@ The old name was confusing, and is now an obsolete 
function alias.
 *** Users can now add special image conversion functions.
 This is done via 'image-converter-add-handler'.
 
-** Image-Dired
+** Image Dired
 
 +++
 *** 'image-dired-image-mode' is now based on 'image-mode'.
@@ -2606,9 +2610,9 @@ programs.  Version 0.9.0 adds two larger thumbnail sizes: 
512x512 and
 to use it; it is not enabled by default.
 
 ---
-*** Reduce dependency on external "exiftool" command.
-The 'image-dired-copy-with-exif-file-name' no longer requires an
-external "exiftool" command to be available.  The user options
+*** Reduce dependency on external "exiftool" program.
+The 'image-dired-copy-with-exif-file-name' command no longer requires
+an external "exiftool" program to be available.  The user options
 'image-dired-cmd-read-exif-data-program' and
 'image-dired-cmd-read-exif-data-options' are now obsolete.
 
@@ -2712,7 +2716,7 @@ fringe (or nil to disable showing this marker).
 This is a convenience function to extract the field data from
 'exif-parse-file' and 'exif-parse-buffer'.
 
-** Xwidgets
+** Xwidget
 
 ---
 *** New user option 'xwidget-webkit-buffer-name-format'.
@@ -2755,7 +2759,7 @@ and friends.
 
 +++
 *** New connection methods "docker", "podman" and "kubernetes".
-They allow accessing environments provided by Docker and similar
+They allow accessing containers provided by Docker and similar
 programs.
 
 ---
@@ -2853,7 +2857,7 @@ will cause the whole command to be passed to the 
operating system
 shell.  This is particularly useful to bypass Eshell's own pipelining
 support for pipelines which will move a lot of data.  See section
 "Running Shell Pipelines Natively" in the Eshell manual, node
-"(eshell) Input/Output".
+"(eshell) Pipelines".
 
 +++
 *** New module to help supplying absolute file names to remote commands.
@@ -2908,8 +2912,8 @@ values passed as a single token, such as '-oVALUE' or
 commands" in the "(eshell) Built-ins" node of the Eshell manual.
 
 ---
-*** Eshell globs ending with '/' now match only directories.
-Additionally, globs ending with '**/' or '***/' no longer raise an
+*** Eshell globs ending with "/" now match only directories.
+Additionally, globs ending with "**/" or "***/" no longer raise an
 error, and now expand to all directories recursively (following
 symlinks in the latter case).
 
@@ -3052,7 +3056,7 @@ The old name is still available as an obsolete function 
alias.
 *** The url-irc library now understands "ircs://" links.
 
 ---
-*** New command 'world-clock-copy-time-as-kill' for 'M-x world-clock'.
+*** New command 'world-clock-copy-time-as-kill' for 'world-clock-mode'.
 It copies the current line into the kill ring.
 
 ---
@@ -3061,17 +3065,17 @@ The new face 'abbrev-table-name' is used to display the 
abbrev table
 name.
 
 ---
-*** New key binding 'O' in 'M-x list-buffers'.
+*** New key binding 'O' in "*Buffer List*".
 This key is now bound to 'Buffer-menu-view-other-window', which will
 view this line's buffer in View mode in another window.
 
-** Scheme mode
+** Scheme Mode
 
 ---
 *** Auto-detection of Scheme library files.
 Emacs now automatically enables the Scheme mode when opening R6RS
-Scheme Library Source ('.sls') files and R7RS Scheme Library
-Definition ('.sld') files.
+Scheme Library Source (".sls") files and R7RS Scheme Library
+Definition (".sld") files.
 
 ---
 *** Imenu members for R6RS and R7RS library members.
@@ -3086,10 +3090,10 @@ Imenu now lists the members directly nested in R6RS 
Scheme libraries
 Emacs now comes with the Eglot package, which enhances various Emacs
 features, such as completion, documentation, error detection, etc.,
 based on data provided by language servers using the Language Server
-Protocol (LSP).
+Protocol (LSP).  See the new Info manual "(eglot) Top" for more.
 
 +++
-*** use-package: Declarative package configuration.
+** use-package: Declarative package configuration.
 use-package is now shipped with Emacs.  It provides the 'use-package'
 macro, which allows you to isolate package configuration in your init
 file in a way that is declarative, tidy, and performance-oriented.
@@ -3157,6 +3161,15 @@ files, the new modes based on tree-sitter are for now 
entirely
 optional, and you must turn them on manually, or customize
 'auto-mode-alist' to turn them on automatically.
 
+Where no major modes previously existed in Emacs for editing the kinds
+of files for which Emacs now provides a tree-sitter based mode, Emacs
+will now try to enable these new modes automatically when you visit
+such files, and will display a warning if the tree-sitter library or
+the parser grammar library is not available.  To prevent the warnings,
+either build Emacs with tree-sitter and install the grammar libraries,
+or customize 'auto-mode-alist' to specify some other major mode (or
+even 'fundamental-mode') for those kinds of files.
+
 Each major mode based on tree-sitter needs a language grammar library,
 usually named "libtree-sitter-LANG.so" ("libtree-sitter-LANG.dll" on
 MS-Windows), where LANG is the corresponding language name.  Emacs
@@ -3242,9 +3255,8 @@ extension is ".cmake".
 
 +++
 *** New major mode 'toml-ts-mode'.
-A major mode based on the tree-sitter library for editing files
-written in TOML, a format for writing configuration files.  It is
-auto-enabled for files with the ".toml" extension.
+An optional major mode based on the tree-sitter library for editing
+files written in TOML, a format for writing configuration files.
 
 +++
 *** New major mode 'go-ts-mode'.
@@ -3323,13 +3335,13 @@ auto-scaling applied.  (This only makes a difference on 
HiDPI
 displays.)
 
 +++
-** Changes in how "raw" in-memory xbm images are specified.
+** Changes in how "raw" in-memory XBM images are specified.
 Some years back Emacs gained the ability to scale images, and you
 could then specify ':width' and ':height' when using 'create-image' on all
-image types -- except xbm images, because this format already used the
+image types -- except XBM images, because this format already used the
 ':width' and ':height' arguments to specify the width/height of the "raw"
 in-memory format.  This meant that if you used these specifications
-on, for instance, xbm files, Emacs would refuse to display them.  This
+on, for instance, XBM files, Emacs would refuse to display them.  This
 has been changed, and ':width'/':height' now works as with all other image
 formats, and the way to specify the width/height of the "raw"
 in-memory format is now by using ':data-width' and ':data-height'.
@@ -3340,7 +3352,7 @@ The various "loaddefs.el" files in the Emacs tree (which 
contain
 information about autoloads, built-in packages and package prefixes)
 used to be generated by functions in autoloads.el.  These are now
 generated by loaddefs-gen.el instead.  This leads to functionally
-equivalent "loaddef.el" files, but they do not use exactly the same
+equivalent "loaddefs.el" files, but they do not use exactly the same
 syntax, so using 'M-x update-file-autoloads' no longer works.  (This
 didn't work well in most files in the past, either, but it will now
 signal an error in any file.)
@@ -3485,7 +3497,7 @@ This change is now applied in 'dired-insert-directory'.
 
 ---
 ** 'compilation-last-buffer' is (finally) declared obsolete.
-It's been obsolete since Emacs-22.1, actually.
+It has been obsolete since Emacs 22.1, actually.
 
 ---
 ** Calling 'lsh' now elicits a byte-compiler warning.
@@ -3515,9 +3527,9 @@ but switching to 'ash' is generally much preferable.
 'command-history-map', 'compilation-parse-errors-function',
 'completion-annotate-function', 'condition-case-no-debug',
 'count-lines-region', 'crisp-mode-modeline-string',
-'custom-print-functions', 'custom-print-functions',
-'cvs-string-prefix-p', 'data-debug-map', 'deferred-action-function',
-'deferred-action-list', 'dired-pop-to-buffer', 'dired-shrink-to-fit',
+'custom-print-functions', 'cvs-string-prefix-p', 'data-debug-map',
+'deferred-action-function', 'deferred-action-list',
+'dired-pop-to-buffer', 'dired-shrink-to-fit',
 'dired-sort-set-modeline', 'dired-x-submit-report',
 'display-buffer-function',
 'ediff-choose-window-setup-function-automatically',
@@ -3539,11 +3551,10 @@ but switching to 'ash' is generally much preferable.
 'inhibit-first-line-modes-suffixes', 'input-method-inactivate-hook',
 'intdos', 'javascript-generic-mode', 'javascript-generic-mode-hook',
 'latex-string-prefix-p', 'macro-declaration-function' (function),
-'macro-declaration-function' (variable), 'mail-complete-function',
-'mail-completion-at-point-function',
-'mail-mailer-swallows-blank-line', 'mail-sent-via', 'make-register',
-'makefile-complete', 'menu-bar-kill-ring-save',
-'meta-complete-symbol', 'meta-mode-map',
+'macro-declaration-function' (variable), 'mail-complete',
+'mail-complete-function', 'mail-mailer-swallows-blank-line',
+'mail-sent-via', 'make-register', 'makefile-complete',
+'menu-bar-kill-ring-save', 'meta-complete-symbol', 'meta-mode-map',
 'mh-kill-folder-suppress-prompt-hooks',
 'minibuffer-completing-symbol',
 'minibuffer-local-filename-must-match-map', 'mode25', 'mode4350',
@@ -3714,7 +3725,7 @@ This can be used to specify what forms to put into 
'command-history'
 when executing commands interactively.
 
 +++
-** The FORM arg of 'time-convert' is mandatory.
+** The FORM argument of 'time-convert' is mandatory.
 'time-convert' can still be called without it, as before, but the
 compiler now emits a warning about this deprecated usage.
 
@@ -3731,7 +3742,7 @@ TIMEOUT is the idle time after which to deactivate the 
transient map.
 The default timeout value can be defined by the new variable
 'set-transient-map-timeout'.
 
-** Connection-local variables
+** Connection Local Variables
 
 +++
 *** Some connection-local variables are now user options.
@@ -3760,7 +3771,7 @@ Reference manual for more information.
 
 +++
 ** 'plist-get', 'plist-put' and 'plist-member' are no longer limited to 'eq'.
-These function now take an optional comparison predicate argument.
+These function now take an optional comparison PREDICATE argument.
 
 +++
 ** 'read-multiple-choice' can now use long-form answers.
@@ -3820,7 +3831,7 @@ When called with a new optional argument UNICODE non-nil, 
'max-char'
 will now report the maximum valid codepoint defined by the Unicode
 Standard.
 
-** seq
+** Seq
 
 +++
 *** New function 'seq-split'.
@@ -3858,8 +3869,8 @@ It is called whenever the configuration of different 
monitors on a
 display changes.
 
 +++
-** 'prin1' and 'prin1-to-string' now take an optional OVERRIDES parameter.
-This parameter can be used to override values of print-related settings.
+** 'prin1' and 'prin1-to-string' now take an optional OVERRIDES argument.
+This argument can be used to override values of print-related settings.
 
 +++
 ** New minor mode 'header-line-indent-mode'.
@@ -3868,9 +3879,9 @@ be kept aligned with the buffer contents when the user 
switches
 'display-line-numbers-mode' on or off.
 
 +++
-** New minor mode 'lost-selection-mode'.
-This minor mode makes Emacs deactivate the mark in all buffers when
-the primary selection is obtained by another program.
+** New global minor mode 'lost-selection-mode'.
+This global minor mode makes Emacs deactivate the mark in all buffers
+when the primary selection is obtained by another program.
 
 ---
 ** On X, Emacs will try to preserve selection ownership when a frame is 
deleted.
@@ -3885,7 +3896,7 @@ setting the user option 'x-auto-preserve-selections' to 
nil.
 ** New predicate 'char-uppercase-p'.
 This returns non-nil if its argument its an uppercase character.
 
-** Byte compilation
+** Byte Compilation
 
 ---
 *** Byte compilation will now warn about some quoting mistakes in docstrings.
@@ -3903,7 +3914,7 @@ should really be present in the docstring, they should be 
quoted with
 
 ---
 *** Byte compilation will now warn about some malformed 'defcustom' types.
-It's very common to write 'defcustom' types on the form:
+It is very common to write 'defcustom' types on the form:
 
     :type '(choice (const :tag "foo" 'bar))
 
@@ -3982,7 +3993,7 @@ batch-based Emacs scripts.
 This works like 'buttonize', but for a region instead of a string.
 
 +++
-** 'macroexp-let2*' can omit TEST arg and use single-var bindings.
+** 'macroexp-let2*' can omit TEST argument and use single-var bindings.
 
 +++
 ** New macro-writing macros, 'cl-with-gensyms' and 'cl-once-only'.
@@ -3995,7 +4006,7 @@ from which the last input event originated, and 
'device-class' can be
 used to determine the type of an input device.
 
 +++
-** 'track-mouse' can have a new value 'drag-source'.
+** Variable 'track-mouse' can have a new value 'drag-source'.
 This means the same as 'dropping', but modifies the mouse position
 list in reported motion events if there is no frame underneath the
 mouse pointer.
@@ -4043,7 +4054,7 @@ frequently than once in a second.
 
 ---
 ** New function 'bidi-string-strip-control-characters'.
-This utility function is meant for displaying strings when it's
+This utility function is meant for displaying strings when it is
 essential that there's no bidirectional context.  It removes all the
 bidirectional formatting control characters (such as RLM, LRO, PDF,
 etc.) from its argument string.  The characters it removes are listed
@@ -4101,21 +4112,21 @@ them towards or away from each other.
 
 +++
 ** New hook 'x-pre-popup-menu-hook'.
-This hook is run before 'x-popup-menu' is about to display a
+This hook, run before 'x-popup-menu', is about to display a
 deck-of-cards menu on screen.
 
 ---
 ** New hook 'post-select-region-hook'.
-This hook is run immediately after 'select-active-regions' causes the
-region to be set as the primary selection.
+This hook is run immediately after 'select-active-regions'.  It causes
+the region to be set as the primary selection.
 
 +++
 ** New function 'buffer-match-p'.
 Check if a buffer satisfies some condition.  Some examples for
 conditions can be regular expressions that match a buffer name, a
 cons-cell like '(major-mode . shell-mode)' that matches any buffer
-where 'major-mode' is 'shell-mode' or a combined with a condition like
-'(and "\\`\\*.+\\*\\'" (major-mode . special-mode))'.
+where 'major-mode' is 'shell-mode' or a combination with a condition
+like '(and "\\`\\*.+\\*\\'" (major-mode . special-mode))'.
 
 +++
 ** New function 'match-buffers'.
@@ -4123,19 +4134,19 @@ It uses 'buffer-match-p' to gather a list of buffers 
that match a
 condition.
 
 ---
-** New optional arguments 'text-face' and 'default-face' for 'tooltip-show'.
+** New optional arguments TEXT-FACE and DEFAULT-FACE for 'tooltip-show'.
 They allow changing the faces used for the tooltip text and frame
 colors of the resulting tooltip frame from the default 'tooltip' face.
 
-** Text security and suspiciousness
+** Text Security and Suspiciousness
 
 +++
 *** New library textsec.el.
 This library contains a number of checks for whether a string is
 "suspicious".  This usually means that the string contains characters
 that have glyphs that can be confused with other, more commonly used
-glyphs, or contain bidirectional (or other) formatting characters that
-may be used to confuse a user.
+glyphs, or contains bidirectional (or other) formatting characters
+that may be used to confuse a user.
 
 +++
 *** New user option 'textsec-check'.
@@ -4153,7 +4164,7 @@ This is the main function Emacs applications should be 
using to check
 whether a string is suspicious.  It heeds the 'textsec-check' user
 option.
 
-** Keymaps and key definitions
+** Keymaps and Key Definitions
 
 +++
 *** 'where-is-internal' can now filter events marked as non key events.
@@ -4189,7 +4200,7 @@ de-emphasized in the documentation.
 *** Use 'keymap-set-after' instead of 'define-key-after'.
 
 +++
-*** Use 'keymap-lookup' instead of 'lookup-keymap' and 'key-binding'.
+*** Use 'keymap-lookup' instead of 'lookup-key' and 'key-binding'.
 
 +++
 *** Use 'keymap-local-lookup' instead of 'local-key-binding'.
@@ -4277,9 +4288,9 @@ instance) when covering huge amounts of data (that has no 
meaningful
 searchable data, like image data) with a 'display' text property.
 
 +++
-** 'insert-image' now takes an INHIBIT-ISEARCH optional parameter.
+** 'insert-image' now takes an INHIBIT-ISEARCH optional argument.
 It marks the image with the 'inhibit-isearch' text property, which
-inhibits 'isearch' matching the STRING parameter.
+inhibits 'isearch' matching the STRING argument.
 
 ---
 ** New variable 'replace-regexp-function'.
@@ -4347,7 +4358,7 @@ character width/height.
 This means the vscroll will not be reset when set on a window that is
 "frozen" due to a mini-window being resized.
 
-** XDG support
+** XDG Support
 
 ---
 *** New function 'xdg-state-home'.
@@ -4393,7 +4404,7 @@ This holds the value of the previous call to 
'set-locale-environment'.
 This macro can be used to change the locale temporarily while
 executing code.
 
-** table.el
+** Table
 
 ---
 *** New user option 'table-latex-environment'.
@@ -4419,8 +4430,8 @@ local variables and removes overlays and text properties.
 
 +++
 ** 'kill-all-local-variables' can now kill all local variables.
-If given the new optional KILL-PERMANENT argument, also kill permanent
-local variables.
+If given the new optional KILL-PERMANENT argument, it also kills
+permanent local variables.
 
 +++
 ** Third 'mapconcat' argument SEPARATOR is now optional.
@@ -4438,7 +4449,7 @@ This macro allows defining keymap variables more 
conveniently.
 Use ':repeat t' to have all bindings be repeatable or for more
 advanced usage:
 
-    ':repeat (:enter (commands ...) :exit (commands ...))'
+    :repeat (:enter (commands ...) :exit (commands ...))
 
 ---
 ** 'kbd' can now be used in built-in, preloaded libraries.
@@ -4479,7 +4490,7 @@ an exact match, then the lowercased '[menu-bar foo\ bar]' 
and finally
 '[menu-bar foo-bar]'.  This further improves backwards-compatibility
 when converting menus to use 'easy-menu-define'.
 
-** xwidgets
+** Xwidget
 
 +++
 *** The function 'make-xwidget' now accepts an optional RELATED argument.
@@ -4531,7 +4542,7 @@ commits to the load.
 
 +++
 *** New event type 'xwidget-display-event'.
-These events are sent whenever an xwidget requests that Emacs display
+These events are sent whenever an xwidget requests that Emacs displays
 another xwidget.  The only arguments to this event are the xwidget
 that should be displayed, and the xwidget that asked to display it.
 
@@ -4556,10 +4567,10 @@ temporary transition aid for Emacs 27, has served its 
purpose.
 '(encode-time (list SECOND MINUTE HOUR DAY MONTH YEAR nil -1 nil))'.
 
 +++
-** 'date-to-time' now accepts arguments that lacks month, day, or time.
+** 'date-to-time' now accepts arguments that lack month, day, or time.
 The function now assumes the earliest possible values if its argument
 lacks month, day, or time.  For example, (date-to-time "2021-12-04")
-now assumes a time of 00:00 instead of signaling an error.
+now assumes a time of "00:00" instead of signaling an error.
 
 +++
 ** 'format-seconds' now allows suppressing zero-value trailing elements.
@@ -4568,7 +4579,7 @@ elements that appear after "%x".
 
 +++
 ** New events for taking advantage of touchscreen devices.
-The events 'touchscreen-begin, 'touchscreen-update', and
+The events 'touchscreen-begin', 'touchscreen-update', and
 'touchscreen-end' have been added to take better advantage of
 touch-capable display panels.
 
@@ -4602,7 +4613,7 @@ Use 'indian-tml-itrans-digits-v5-hash' if you want digits
 translation.
 
 +++
-** 'shell-quote-argument' has a new optional parameter POSIX.
+** 'shell-quote-argument' has a new optional argument POSIX.
 This is useful when quoting shell arguments for a remote shell
 invocation.  Such shells are POSIX conformant by default.
 
@@ -4719,7 +4730,7 @@ has built-in support for displaying BMP images.
 ---
 *** GUI Yes/No dialogs now include a "Cancel" button.
 The "Cancel" button is in addition to "Yes" and "No", and is intended
-to allow users to quit the dialog, as an equivalent of C-g when Emacs
+to allow users to quit the dialog, as an equivalent of 'C-g' when Emacs
 asks a yes/no question via the echo area.  This is controlled by the
 new variable 'w32-yes-no-dialog-show-cancel', by default t.  Set it to
 nil to get back the old behavior of showing a modal dialog with only
diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in
index b246d832943..3f144401d65 100644
--- a/lib-src/Makefile.in
+++ b/lib-src/Makefile.in
@@ -199,7 +199,7 @@ LIB_GETRANDOM = @LIB_GETRANDOM@
 ## Whatever libraries are needed for euidaccess
 LIB_EACCESS=@LIB_EACCESS@
 ## Libraries needed for file_has_acl
-LIB_HAS_ACL=@LIB_HAS_ACL@
+FILE_HAS_ACL_LIB=@FILE_HAS_ACL_LIB@
 ## empty or -lwsock2 for MinGW
 LIB_WSOCK32=@LIB_WSOCK32@
 
@@ -426,7 +426,8 @@ pop.o: ${srcdir}/pop.c ${srcdir}/pop.h 
${srcdir}/../lib/min-max.h $(config_h)
 emacsclient${EXEEXT}: ${srcdir}/emacsclient.c $(NTLIB) $(config_h)
        $(AM_V_CCLD)$(CC) ${ALL_CFLAGS} $< \
           $(NTLIB) $(LOADLIBES) \
-          $(LIB_WSOCK32) $(LIB_EACCESS) $(LIB_HAS_ACL) $(LIBS_ECLIENT) -o $@
+          $(LIB_WSOCK32) $(LIB_EACCESS) $(FILE_HAS_ACL_LIB) $(LIBS_ECLIENT) \
+          -o $@
 
 emacsclientw${EXEEXT}: ${srcdir}/emacsclient.c $(NTLIB) $(CLIENTRES) 
$(config_h)
        $(AM_V_CCLD)$(CC) ${ALL_CFLAGS} $(CLIENTRES) -mwindows $< \
diff --git a/lib/alloca.in.h b/lib/alloca.in.h
index b9ce9ef5603..a1bb3d758dc 100644
--- a/lib/alloca.in.h
+++ b/lib/alloca.in.h
@@ -1,7 +1,7 @@
 /* Memory allocation on the stack.
 
-   Copyright (C) 1995, 1999, 2001-2004, 2006-2023 Free Software
-   Foundation, Inc.
+   Copyright (C) 1995, 1999, 2001-2004, 2006-2023 Free Software Foundation,
+   Inc.
 
    This file is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as
diff --git a/lib/attribute.h b/lib/attribute.h
index 36b2978bb2c..130644d8798 100644
--- a/lib/attribute.h
+++ b/lib/attribute.h
@@ -32,7 +32,7 @@
 
 
 /* This file defines two types of attributes:
-   * C2x standard attributes.  These have macro names that do not begin with
+   * C23 standard attributes.  These have macro names that do not begin with
      'ATTRIBUTE_'.
    * Selected GCC attributes; see:
      https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html
diff --git a/lib/binary-io.h b/lib/binary-io.h
index dd9829aa88d..6f4db253354 100644
--- a/lib/binary-io.h
+++ b/lib/binary-io.h
@@ -1,6 +1,5 @@
 /* Binary mode I/O.
-   Copyright (C) 2001, 2003, 2005, 2008-2023 Free Software Foundation,
-   Inc.
+   Copyright (C) 2001, 2003, 2005, 2008-2023 Free Software Foundation, Inc.
 
    This file is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as
diff --git a/lib/c-ctype.h b/lib/c-ctype.h
index 9d093f7f722..35ca83d7d43 100644
--- a/lib/c-ctype.h
+++ b/lib/c-ctype.h
@@ -5,8 +5,7 @@
    <ctype.h> functions' behaviour depends on the current locale set via
    setlocale.
 
-   Copyright (C) 2000-2003, 2006, 2008-2023 Free Software Foundation,
-   Inc.
+   Copyright (C) 2000-2003, 2006, 2008-2023 Free Software Foundation, Inc.
 
    This file is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as
diff --git a/lib/c-strcasecmp.c b/lib/c-strcasecmp.c
index c90c6d6a09c..8a958dc4fd9 100644
--- a/lib/c-strcasecmp.c
+++ b/lib/c-strcasecmp.c
@@ -1,6 +1,5 @@
 /* c-strcasecmp.c -- case insensitive string comparator in C locale
-   Copyright (C) 1998-1999, 2005-2006, 2009-2023 Free Software
-   Foundation, Inc.
+   Copyright (C) 1998-1999, 2005-2006, 2009-2023 Free Software Foundation, Inc.
 
    This file is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as
diff --git a/lib/c-strncasecmp.c b/lib/c-strncasecmp.c
index bc30ce0ffc4..4ca8c5f4001 100644
--- a/lib/c-strncasecmp.c
+++ b/lib/c-strncasecmp.c
@@ -1,6 +1,5 @@
 /* c-strncasecmp.c -- case insensitive string comparator in C locale
-   Copyright (C) 1998-1999, 2005-2006, 2009-2023 Free Software
-   Foundation, Inc.
+   Copyright (C) 1998-1999, 2005-2006, 2009-2023 Free Software Foundation, Inc.
 
    This file is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as
diff --git a/lib/careadlinkat.c b/lib/careadlinkat.c
index 1d7db893731..359d497396c 100644
--- a/lib/careadlinkat.c
+++ b/lib/careadlinkat.c
@@ -1,7 +1,7 @@
 /* Read symbolic links into a buffer without size limitation, relative to fd.
 
-   Copyright (C) 2001, 2003-2004, 2007, 2009-2023 Free Software
-   Foundation, Inc.
+   Copyright (C) 2001, 2003-2004, 2007, 2009-2023 Free Software Foundation,
+   Inc.
 
    This file is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as
diff --git a/lib/cloexec.c b/lib/cloexec.c
index ba53d0020b1..e4cecbd2e8a 100644
--- a/lib/cloexec.c
+++ b/lib/cloexec.c
@@ -1,7 +1,6 @@
 /* cloexec.c - set or clear the close-on-exec descriptor flag
 
-   Copyright (C) 1991, 2004-2006, 2009-2023 Free Software Foundation,
-   Inc.
+   Copyright (C) 1991, 2004-2006, 2009-2023 Free Software Foundation, Inc.
 
    This file is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as
diff --git a/lib/close-stream.c b/lib/close-stream.c
index b68b30e6ff0..ab686bac2ae 100644
--- a/lib/close-stream.c
+++ b/lib/close-stream.c
@@ -1,7 +1,6 @@
 /* Close a stream, with nicer error checking than fclose's.
 
-   Copyright (C) 1998-2002, 2004, 2006-2023 Free Software Foundation,
-   Inc.
+   Copyright (C) 1998-2002, 2004, 2006-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/lib/diffseq.h b/lib/diffseq.h
index ad3f258ab6b..dfaf4f295e8 100644
--- a/lib/diffseq.h
+++ b/lib/diffseq.h
@@ -1,7 +1,7 @@
 /* Analyze differences between two vectors.
 
-   Copyright (C) 1988-1989, 1992-1995, 2001-2004, 2006-2023 Free
-   Software Foundation, Inc.
+   Copyright (C) 1988-1989, 1992-1995, 2001-2004, 2006-2023 Free Software
+   Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/lib/dup2.c b/lib/dup2.c
index 1597d9d1e6e..7d197ca3123 100644
--- a/lib/dup2.c
+++ b/lib/dup2.c
@@ -1,7 +1,6 @@
 /* Duplicate an open file descriptor to a specified file descriptor.
 
-   Copyright (C) 1999, 2004-2007, 2009-2023 Free Software Foundation,
-   Inc.
+   Copyright (C) 1999, 2004-2007, 2009-2023 Free Software Foundation, Inc.
 
    This file is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as
diff --git a/lib/file-has-acl.c b/lib/file-has-acl.c
index d0e11e631ca..b31a2ea2523 100644
--- a/lib/file-has-acl.c
+++ b/lib/file-has-acl.c
@@ -81,9 +81,10 @@ acl_nfs4_nontrivial (uint32_t *xattr, ssize_t nbytes)
       uint32_t flag = ntohl (xattr[1]);
       uint32_t wholen = ntohl (xattr[3]);
       xattr += 4;
-      int64_t wholen4 = wholen;
-      wholen4 = ((wholen4 + (BYTES_PER_NETWORK_UINT))
-                 & ~ (BYTES_PER_NETWORK_UINT - 1));
+      int whowords = (wholen / BYTES_PER_NETWORK_UINT
+                      + (wholen % BYTES_PER_NETWORK_UINT != 0));
+      int64_t wholen4 = whowords;
+      wholen4 *= BYTES_PER_NETWORK_UINT;
 
       /* Trivial ACLs have only ACE4_ACCESS_ALLOWED_ACE_TYPE or
          ACE4_ACCESS_DENIED_ACE_TYPE.  */
@@ -115,7 +116,7 @@ acl_nfs4_nontrivial (uint32_t *xattr, ssize_t nbytes)
         return 1;
       ace_found |= ace_found_bit;
 
-      xattr = (uint32_t *) ((char *) xattr + wholen4);
+      xattr += whowords;
     }
 
   return 0;
diff --git a/lib/filemode.h b/lib/filemode.h
index d456cc585b3..15a8dcc3760 100644
--- a/lib/filemode.h
+++ b/lib/filemode.h
@@ -1,7 +1,7 @@
 /* Make a string describing file modes.
 
-   Copyright (C) 1998-1999, 2003, 2006, 2009-2023 Free Software
-   Foundation, Inc.
+   Copyright (C) 1998-1999, 2003, 2006, 2009-2023 Free Software Foundation,
+   Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/lib/filename.h b/lib/filename.h
index a2400a9dfe3..ab77ca2df91 100644
--- a/lib/filename.h
+++ b/lib/filename.h
@@ -1,5 +1,5 @@
 /* Basic filename support macros.
-   Copyright (C) 2001-2023 Free Software Foundation, Inc.
+   Copyright (C) 2001-2022 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/fpending.c b/lib/fpending.c
index df3cd85f3a6..afa840b8512 100644
--- a/lib/fpending.c
+++ b/lib/fpending.c
@@ -1,6 +1,6 @@
 /* fpending.c -- return the number of pending output bytes on a stream
-   Copyright (C) 2000, 2004, 2006-2007, 2009-2023 Free Software
-   Foundation, Inc.
+   Copyright (C) 2000, 2004, 2006-2007, 2009-2023 Free Software Foundation,
+   Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/lib/fpending.h b/lib/fpending.h
index fe310384f7e..5e860db6810 100644
--- a/lib/fpending.h
+++ b/lib/fpending.h
@@ -1,7 +1,7 @@
 /* Declare __fpending.
 
-   Copyright (C) 2000, 2003, 2005-2006, 2009-2023 Free Software
-   Foundation, Inc.
+   Copyright (C) 2000, 2003, 2005-2006, 2009-2023 Free Software Foundation,
+   Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/lib/fsusage.c b/lib/fsusage.c
index 2be120a06de..f6f4b1c35fd 100644
--- a/lib/fsusage.c
+++ b/lib/fsusage.c
@@ -1,7 +1,7 @@
 /* fsusage.c -- return space usage of mounted file systems
 
-   Copyright (C) 1991-1992, 1996, 1998-1999, 2002-2006, 2009-2023 Free
-   Software Foundation, Inc.
+   Copyright (C) 1991-1992, 1996, 1998-1999, 2002-2006, 2009-2023 Free Software
+   Foundation, Inc.
 
    This file is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as
diff --git a/lib/getgroups.c b/lib/getgroups.c
index 6a2bda8d71e..93829d3b15e 100644
--- a/lib/getgroups.c
+++ b/lib/getgroups.c
@@ -1,7 +1,6 @@
 /* provide consistent interface to getgroups for systems that don't allow N==0
 
-   Copyright (C) 1996, 1999, 2003, 2006-2023 Free Software Foundation,
-   Inc.
+   Copyright (C) 1996, 1999, 2003, 2006-2023 Free Software Foundation, Inc.
 
    This file is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as
diff --git a/lib/getloadavg.c b/lib/getloadavg.c
index 37fcea0a76b..59b53e79980 100644
--- a/lib/getloadavg.c
+++ b/lib/getloadavg.c
@@ -1,7 +1,7 @@
 /* Get the system load averages.
 
-   Copyright (C) 1985-1989, 1991-1995, 1997, 1999-2000, 2003-2023 Free
-   Software Foundation, Inc.
+   Copyright (C) 1985-1989, 1991-1995, 1997, 1999-2000, 2003-2023 Free Software
+   Foundation, Inc.
 
    NOTE: The canonical source of this file is maintained with gnulib.
    Bugs can be reported to bug-gnulib@gnu.org.
diff --git a/lib/gettext.h b/lib/gettext.h
index 582886f9f51..d0462c47e17 100644
--- a/lib/gettext.h
+++ b/lib/gettext.h
@@ -1,6 +1,6 @@
 /* Convenience header for conditional use of GNU <libintl.h>.
-   Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2023 Free
-   Software Foundation, Inc.
+   Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2023 Free Software
+   Foundation, Inc.
 
    This file is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as
diff --git a/lib/gettime.c b/lib/gettime.c
index cfba830478e..f86cc4efbff 100644
--- a/lib/gettime.c
+++ b/lib/gettime.c
@@ -1,7 +1,6 @@
 /* gettime -- get the system clock
 
-   Copyright (C) 2002, 2004-2007, 2009-2023 Free Software Foundation,
-   Inc.
+   Copyright (C) 2002, 2004-2007, 2009-2023 Free Software Foundation, Inc.
 
    This file is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as
diff --git a/lib/gettimeofday.c b/lib/gettimeofday.c
index 7207c851272..d896ec132b9 100644
--- a/lib/gettimeofday.c
+++ b/lib/gettimeofday.c
@@ -1,7 +1,6 @@
 /* Provide gettimeofday for systems that don't have it or for which it's 
broken.
 
-   Copyright (C) 2001-2003, 2005-2007, 2009-2023 Free Software
-   Foundation, Inc.
+   Copyright (C) 2001-2003, 2005-2007, 2009-2023 Free Software Foundation, Inc.
 
    This file is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as
diff --git a/lib/gnulib.mk.in b/lib/gnulib.mk.in
index 9e2eaf51381..0b4e0458a3c 100644
--- a/lib/gnulib.mk.in
+++ b/lib/gnulib.mk.in
@@ -240,6 +240,7 @@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
 ERRNO_H = @ERRNO_H@
 EXECINFO_H = @EXECINFO_H@
 EXEEXT = @EXEEXT@
+FILE_HAS_ACL_LIB = @FILE_HAS_ACL_LIB@
 FIND_DELETE = @FIND_DELETE@
 FIRSTFILE_OBJ = @FIRSTFILE_OBJ@
 FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
@@ -675,6 +676,7 @@ HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@
 HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
 HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
 HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
+HAVE_DECL_GETW = @HAVE_DECL_GETW@
 HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@
 HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@
 HAVE_DECL_INITSTATE = @HAVE_DECL_INITSTATE@
@@ -683,6 +685,7 @@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
 HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
 HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@
 HAVE_DECL_POSIX_SPAWN_SETSID = @HAVE_DECL_POSIX_SPAWN_SETSID@
+HAVE_DECL_PUTW = @HAVE_DECL_PUTW@
 HAVE_DECL_SETENV = @HAVE_DECL_SETENV@
 HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@
 HAVE_DECL_SETSTATE = @HAVE_DECL_SETSTATE@
@@ -3104,7 +3107,9 @@ stdio.h: stdio.in.h $(top_builddir)/config.status 
$(CXXDEFS_H) $(ARG_NONNULL_H)
              -e 's|@''HAVE_DECL_FTELLO''@|$(HAVE_DECL_FTELLO)|g' \
              -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \
              -e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \
+             -e 's|@''HAVE_DECL_GETW''@|$(HAVE_DECL_GETW)|g' \
              -e 
's|@''HAVE_DECL_OBSTACK_PRINTF''@|$(HAVE_DECL_OBSTACK_PRINTF)|g' \
+             -e 's|@''HAVE_DECL_PUTW''@|$(HAVE_DECL_PUTW)|g' \
              -e 's|@''HAVE_DECL_SNPRINTF''@|$(HAVE_DECL_SNPRINTF)|g' \
              -e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \
              -e 's|@''HAVE_DPRINTF''@|$(HAVE_DPRINTF)|g' \
diff --git a/lib/group-member.c b/lib/group-member.c
index 6e3f640dcf0..96a09f94a8f 100644
--- a/lib/group-member.c
+++ b/lib/group-member.c
@@ -1,7 +1,7 @@
 /* group-member.c -- determine whether group id is in calling user's group list
 
-   Copyright (C) 1994, 1997-1998, 2003, 2005-2006, 2009-2023 Free
-   Software Foundation, Inc.
+   Copyright (C) 1994, 1997-1998, 2003, 2005-2006, 2009-2023 Free Software
+   Foundation, Inc.
 
    This file is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as
diff --git a/lib/limits.in.h b/lib/limits.in.h
index ae46a5aa25f..eaeac472299 100644
--- a/lib/limits.in.h
+++ b/lib/limits.in.h
@@ -99,7 +99,7 @@
 # endif
 #endif
 
-/* Macros specified by C2x and by ISO/IEC TS 18661-1:2014.  */
+/* Macros specified by C23 and by ISO/IEC TS 18661-1:2014.  */
 
 #if (! defined ULLONG_WIDTH                                             \
      && (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__ \
@@ -117,7 +117,7 @@
 # define ULLONG_WIDTH _GL_INTEGER_WIDTH (0, ULLONG_MAX)
 #endif
 
-/* Macros specified by C2x.  */
+/* Macros specified by C23.  */
 
 #if (! defined BOOL_WIDTH \
      && (defined _GNU_SOURCE \
diff --git a/lib/malloc.c b/lib/malloc.c
index 92f8c841cd7..3ade35cb63f 100644
--- a/lib/malloc.c
+++ b/lib/malloc.c
@@ -1,7 +1,6 @@
 /* malloc() function that is glibc compatible.
 
-   Copyright (C) 1997-1998, 2006-2007, 2009-2023 Free Software
-   Foundation, Inc.
+   Copyright (C) 1997-1998, 2006-2007, 2009-2023 Free Software Foundation, Inc.
 
    This file is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as
diff --git a/lib/malloc/scratch_buffer.h b/lib/malloc/scratch_buffer.h
index 33fd2b29cd5..a9bdcadec21 100644
--- a/lib/malloc/scratch_buffer.h
+++ b/lib/malloc/scratch_buffer.h
@@ -1,5 +1,5 @@
 /* Variable-sized buffer with on-stack default allocation.
-   Copyright (C) 2015-2023 Free Software Foundation, Inc.
+   Copyright (C) 2015-2022 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/malloc/scratch_buffer_grow.c b/lib/malloc/scratch_buffer_grow.c
index a5e8f2f7230..9a5e4dbb1eb 100644
--- a/lib/malloc/scratch_buffer_grow.c
+++ b/lib/malloc/scratch_buffer_grow.c
@@ -1,5 +1,5 @@
 /* Variable-sized buffer with on-stack default allocation.
-   Copyright (C) 2015-2023 Free Software Foundation, Inc.
+   Copyright (C) 2015-2022 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/malloc/scratch_buffer_grow_preserve.c 
b/lib/malloc/scratch_buffer_grow_preserve.c
index c0b5d87b7e4..3fe5a0720ec 100644
--- a/lib/malloc/scratch_buffer_grow_preserve.c
+++ b/lib/malloc/scratch_buffer_grow_preserve.c
@@ -1,5 +1,5 @@
 /* Variable-sized buffer with on-stack default allocation.
-   Copyright (C) 2015-2023 Free Software Foundation, Inc.
+   Copyright (C) 2015-2022 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/malloc/scratch_buffer_set_array_size.c 
b/lib/malloc/scratch_buffer_set_array_size.c
index 24c39350ade..89c37a950e9 100644
--- a/lib/malloc/scratch_buffer_set_array_size.c
+++ b/lib/malloc/scratch_buffer_set_array_size.c
@@ -1,5 +1,5 @@
 /* Variable-sized buffer with on-stack default allocation.
-   Copyright (C) 2015-2023 Free Software Foundation, Inc.
+   Copyright (C) 2015-2022 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/md5-stream.c b/lib/md5-stream.c
index ab48fe3261a..ba76792cbbe 100644
--- a/lib/md5-stream.c
+++ b/lib/md5-stream.c
@@ -1,7 +1,7 @@
 /* Functions to compute MD5 message digest of files or memory blocks.
    according to the definition of MD5 in RFC 1321 from April 1992.
-   Copyright (C) 1995-1997, 1999-2001, 2005-2006, 2008-2023 Free
-   Software Foundation, Inc.
+   Copyright (C) 1995-1997, 1999-2001, 2005-2006, 2008-2023 Free Software
+   Foundation, Inc.
    This file is part of the GNU C Library.
 
    This file is free software: you can redistribute it and/or modify
diff --git a/lib/md5.c b/lib/md5.c
index b1e139339f4..4a6accf28ff 100644
--- a/lib/md5.c
+++ b/lib/md5.c
@@ -1,7 +1,7 @@
 /* Functions to compute MD5 message digest of files or memory blocks.
    according to the definition of MD5 in RFC 1321 from April 1992.
-   Copyright (C) 1995-1997, 1999-2001, 2005-2006, 2008-2023 Free
-   Software Foundation, Inc.
+   Copyright (C) 1995-1997, 1999-2001, 2005-2006, 2008-2023 Free Software
+   Foundation, Inc.
    This file is part of the GNU C Library.
 
    This file is free software: you can redistribute it and/or modify
diff --git a/lib/md5.h b/lib/md5.h
index 3b0b4ff730f..f34e7cb8dfa 100644
--- a/lib/md5.h
+++ b/lib/md5.h
@@ -1,7 +1,7 @@
 /* Declaration of functions and data types used for MD5 sum computing
    library functions.
-   Copyright (C) 1995-1997, 1999-2001, 2004-2006, 2008-2023 Free
-   Software Foundation, Inc.
+   Copyright (C) 1995-1997, 1999-2001, 2004-2006, 2008-2023 Free Software
+   Foundation, Inc.
    This file is part of the GNU C Library.
 
    This file is free software: you can redistribute it and/or modify
diff --git a/lib/memmem.c b/lib/memmem.c
index 665815efb1a..c0b48c1b25d 100644
--- a/lib/memmem.c
+++ b/lib/memmem.c
@@ -1,5 +1,5 @@
-/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2023 Free
-   Software Foundation, Inc.
+/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2023 Free Software
+   Foundation, Inc.
    This file is part of the GNU C Library.
 
    This file is free software: you can redistribute it and/or modify
diff --git a/lib/memrchr.c b/lib/memrchr.c
index a34fc71f7da..c5b1fe8b2e3 100644
--- a/lib/memrchr.c
+++ b/lib/memrchr.c
@@ -1,7 +1,7 @@
 /* memrchr -- find the last occurrence of a byte in a memory block
 
-   Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2023 Free
-   Software Foundation, Inc.
+   Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2023 Free Software
+   Foundation, Inc.
 
    Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
    with help from Dan Sahlin (dan@sics.se) and
diff --git a/lib/memset_explicit.c b/lib/memset_explicit.c
index eabeb3ec2b8..6d21a5e8797 100644
--- a/lib/memset_explicit.c
+++ b/lib/memset_explicit.c
@@ -1,5 +1,5 @@
 /* Erase sensitive data from memory.
-   Copyright 2022 Free Software Foundation, Inc.
+   Copyright 2022-2023 Free Software Foundation, Inc.
 
    This file is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as
diff --git a/lib/mktime-internal.h b/lib/mktime-internal.h
index 709c36bdf56..170764eabc8 100644
--- a/lib/mktime-internal.h
+++ b/lib/mktime-internal.h
@@ -1,5 +1,5 @@
 /* Internals of mktime and related functions
-   Copyright 2016-2023 Free Software Foundation, Inc.
+   Copyright 2016-2022 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Paul Eggert <eggert@cs.ucla.edu>.
 
diff --git a/lib/mktime.c b/lib/mktime.c
index 94a4320e6ca..7dc9d67ef9d 100644
--- a/lib/mktime.c
+++ b/lib/mktime.c
@@ -1,5 +1,5 @@
 /* Convert a 'struct tm' to a time_t value.
-   Copyright (C) 1993-2023 Free Software Foundation, Inc.
+   Copyright (C) 1993-2022 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Paul Eggert <eggert@twinsun.com>.
 
diff --git a/lib/nanosleep.c b/lib/nanosleep.c
index 6383115c0f1..3f295f49b5d 100644
--- a/lib/nanosleep.c
+++ b/lib/nanosleep.c
@@ -1,7 +1,6 @@
 /* Provide a replacement for the POSIX nanosleep function.
 
-   Copyright (C) 1999-2000, 2002, 2004-2023 Free Software Foundation,
-   Inc.
+   Copyright (C) 1999-2000, 2002, 2004-2023 Free Software Foundation, Inc.
 
    This file is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as
diff --git a/lib/regex.c b/lib/regex.c
index 3beb0deb987..ff1176782e4 100644
--- a/lib/regex.c
+++ b/lib/regex.c
@@ -1,5 +1,5 @@
 /* Extended regular expression matching and search library.
-   Copyright (C) 2002-2023 Free Software Foundation, Inc.
+   Copyright (C) 2002-2022 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
 
diff --git a/lib/regex.h b/lib/regex.h
index 9ef0252ffff..a7e0bd02757 100644
--- a/lib/regex.h
+++ b/lib/regex.h
@@ -1,6 +1,6 @@
 /* Definitions for data structures and routines for the regular
    expression library.
-   Copyright (C) 1985, 1989-2023 Free Software Foundation, Inc.
+   Copyright (C) 1985, 1989-2022 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/save-cwd.h b/lib/save-cwd.h
index f26319389c2..d089b0e2145 100644
--- a/lib/save-cwd.h
+++ b/lib/save-cwd.h
@@ -1,7 +1,7 @@
 /* Save and restore current working directory.
 
-   Copyright (C) 1995, 1997-1998, 2003, 2009-2023 Free Software
-   Foundation, Inc.
+   Copyright (C) 1995, 1997-1998, 2003, 2009-2023 Free Software Foundation,
+   Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/lib/sha1.c b/lib/sha1.c
index 3f6d86a285c..80f0b7a3314 100644
--- a/lib/sha1.c
+++ b/lib/sha1.c
@@ -1,8 +1,7 @@
 /* sha1.c - Functions to compute SHA1 message digest of files or
    memory blocks according to the NIST specification FIPS-180-1.
 
-   Copyright (C) 2000-2001, 2003-2006, 2008-2023 Free Software
-   Foundation, Inc.
+   Copyright (C) 2000-2001, 2003-2006, 2008-2023 Free Software Foundation, Inc.
 
    This file is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as
diff --git a/lib/sig2str.c b/lib/sig2str.c
index 4f68cb7ca8a..c5219caaaed 100644
--- a/lib/sig2str.c
+++ b/lib/sig2str.c
@@ -1,7 +1,6 @@
 /* sig2str.c -- convert between signal names and numbers
 
-   Copyright (C) 2002, 2004, 2006, 2009-2023 Free Software Foundation,
-   Inc.
+   Copyright (C) 2002, 2004, 2006, 2009-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/lib/stdio.in.h b/lib/stdio.in.h
index 59cbea3d47d..8b5ef4bd2dd 100644
--- a/lib/stdio.in.h
+++ b/lib/stdio.in.h
@@ -951,9 +951,13 @@ _GL_WARN_ON_USE (gets, "gets is a security hole - use 
fgets instead");
 #  endif
 _GL_CXXALIAS_MDA (getw, int, (FILE *restrict stream));
 # else
+#  if @HAVE_DECL_GETW@
 _GL_CXXALIAS_SYS (getw, int, (FILE *restrict stream));
+#  endif
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (getw);
+# endif
 #endif
 
 #if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@
@@ -1190,9 +1194,13 @@ _GL_CXXALIASWARN (puts);
 #  endif
 _GL_CXXALIAS_MDA (putw, int, (int w, FILE *restrict stream));
 # else
+#  if @HAVE_DECL_PUTW@
 _GL_CXXALIAS_SYS (putw, int, (int w, FILE *restrict stream));
+#  endif
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (putw);
+# endif
 #endif
 
 #if @GNULIB_REMOVE@
diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h
index 4c8aad76124..b79e5f70965 100644
--- a/lib/stdlib.in.h
+++ b/lib/stdlib.in.h
@@ -1,7 +1,6 @@
 /* A GNU-like <stdlib.h>.
 
-   Copyright (C) 1995, 2001-2004, 2006-2023 Free Software Foundation,
-   Inc.
+   Copyright (C) 1995, 2001-2004, 2006-2023 Free Software Foundation, Inc.
 
    This file is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as
diff --git a/lib/string.in.h b/lib/string.in.h
index 1e27deed982..b227a178873 100644
--- a/lib/string.in.h
+++ b/lib/string.in.h
@@ -59,10 +59,11 @@
 # include <unistd.h>
 #endif
 
-/* AIX 7.2 declares ffsl and ffsll in <strings.h>, not in <string.h>.  */
+/* AIX 7.2 and Android 13 declare ffsl and ffsll in <strings.h>, not in
+   <string.h>.  */
 /* But in any case avoid namespace pollution on glibc systems.  */
 #if ((@GNULIB_FFSL@ || @GNULIB_FFSLL@ || defined GNULIB_POSIXCHECK) \
-     && defined _AIX) \
+     && (defined _AIX || defined __ANDROID__)) \
     && ! defined __GLIBC__
 # include <strings.h>
 #endif
@@ -82,7 +83,14 @@
    can be freed via 'free'; it can be used only after declaring 'free'.  */
 /* Applies to: functions.  Cannot be used on inline functions.  */
 #ifndef _GL_ATTRIBUTE_DEALLOC_FREE
-# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (free, 1)
+# if defined __cplusplus && defined __GNUC__ && !defined __clang__
+/* Work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108231> */
+#  define _GL_ATTRIBUTE_DEALLOC_FREE \
+     _GL_ATTRIBUTE_DEALLOC ((void (*) (void *)) free, 1)
+# else
+#  define _GL_ATTRIBUTE_DEALLOC_FREE \
+     _GL_ATTRIBUTE_DEALLOC (free, 1)
+# endif
 #endif
 
 /* _GL_ATTRIBUTE_MALLOC declares that the function returns a pointer to freshly
@@ -336,7 +344,7 @@ _GL_CXXALIAS_SYS_CAST2 (memrchr,
          || defined __clang__)
 _GL_CXXALIASWARN1 (memrchr, void *, (void *, int, size_t) throw ());
 _GL_CXXALIASWARN1 (memrchr, void const *, (void const *, int, size_t) throw 
());
-# else
+# elif __GLIBC__ >= 2
 _GL_CXXALIASWARN (memrchr);
 # endif
 #elif defined GNULIB_POSIXCHECK
@@ -491,7 +499,7 @@ _GL_CXXALIAS_SYS_CAST2 (strchrnul,
 _GL_CXXALIASWARN1 (strchrnul, char *, (char *__s, int __c_in) throw ());
 _GL_CXXALIASWARN1 (strchrnul, char const *,
                    (char const *__s, int __c_in) throw ());
-# else
+# elif __GLIBC__ >= 2
 _GL_CXXALIASWARN (strchrnul);
 # endif
 #elif defined GNULIB_POSIXCHECK
@@ -856,7 +864,7 @@ _GL_CXXALIASWARN1 (strcasestr, char *,
                    (char *haystack, const char *needle) throw ());
 _GL_CXXALIASWARN1 (strcasestr, const char *,
                    (const char *haystack, const char *needle) throw ());
-# else
+# elif __GLIBC__ >= 2
 _GL_CXXALIASWARN (strcasestr);
 # endif
 #elif defined GNULIB_POSIXCHECK
diff --git a/lib/strtoimax.c b/lib/strtoimax.c
index d8d74e8c699..f7977e28e64 100644
--- a/lib/strtoimax.c
+++ b/lib/strtoimax.c
@@ -1,7 +1,7 @@
 /* Convert string representation of a number into an intmax_t value.
 
-   Copyright (C) 1999, 2001-2004, 2006, 2009-2023 Free Software
-   Foundation, Inc.
+   Copyright (C) 1999, 2001-2004, 2006, 2009-2023 Free Software Foundation,
+   Inc.
 
    This file is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as
diff --git a/lib/strtol.c b/lib/strtol.c
index 6bc1f061877..d11269b2622 100644
--- a/lib/strtol.c
+++ b/lib/strtol.c
@@ -1,7 +1,7 @@
 /* Convert string representation of a number into an integer value.
 
-   Copyright (C) 1991-1992, 1994-1999, 2003, 2005-2007, 2009-2023 Free
-   Software Foundation, Inc.
+   Copyright (C) 1991-1992, 1994-1999, 2003, 2005-2007, 2009-2023 Free Software
+   Foundation, Inc.
 
    NOTE: The canonical source of this file is maintained with the GNU C
    Library.  Bugs can be reported to bug-glibc@gnu.org.
diff --git a/lib/strtoll.c b/lib/strtoll.c
index 919b453984c..9fdfa19b220 100644
--- a/lib/strtoll.c
+++ b/lib/strtoll.c
@@ -1,6 +1,6 @@
 /* Function to parse a 'long long int' from text.
-   Copyright (C) 1995-1997, 1999, 2001, 2009-2023 Free Software
-   Foundation, Inc.
+   Copyright (C) 1995-1997, 1999, 2001, 2009-2023 Free Software Foundation,
+   Inc.
    This file is part of the GNU C Library.
 
    This file is free software: you can redistribute it and/or modify
diff --git a/lib/time_r.c b/lib/time_r.c
index c8143a6900a..97be4fd0544 100644
--- a/lib/time_r.c
+++ b/lib/time_r.c
@@ -1,7 +1,6 @@
 /* Reentrant time functions like localtime_r.
 
-   Copyright (C) 2003, 2006-2007, 2010-2023 Free Software Foundation,
-   Inc.
+   Copyright (C) 2003, 2006-2007, 2010-2023 Free Software Foundation, Inc.
 
    This file is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as
diff --git a/lib/timegm.c b/lib/timegm.c
index b47025a0545..a1b19efc392 100644
--- a/lib/timegm.c
+++ b/lib/timegm.c
@@ -1,6 +1,6 @@
 /* Convert UTC calendar time to simple time.  Like mktime but assumes UTC.
 
-   Copyright (C) 1994-2023 Free Software Foundation, Inc.
+   Copyright (C) 1994-2022 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/verify.h b/lib/verify.h
index ff8438c9269..17d6e78c816 100644
--- a/lib/verify.h
+++ b/lib/verify.h
@@ -223,8 +223,15 @@ template <int w>
 /* _GL_STATIC_ASSERT_H is defined if this code is copied into assert.h.  */
 #ifdef _GL_STATIC_ASSERT_H
 # if !defined _GL_HAVE__STATIC_ASSERT1 && !defined _Static_assert
-#  define _Static_assert(R, ...) \
-     _GL_VERIFY ((R), "static assertion failed", -)
+#  if !defined _MSC_VER || defined __clang__
+#   define _Static_assert(...) \
+      _GL_VERIFY (__VA_ARGS__, "static assertion failed", -)
+#  else
+    /* Work around MSVC preprocessor incompatibility with ISO C; see
+       <https://stackoverflow.com/questions/5134523/>.  */
+#   define _Static_assert(R, ...) \
+      _GL_VERIFY ((R), "static assertion failed", -)
+#  endif
 # endif
 # if (!defined static_assert \
       && __STDC_VERSION__ < 202311 \
@@ -235,9 +242,8 @@ template <int w>
 /* MSVC 14 in C++ mode supports the two-arguments static_assert but not
    the one-argument static_assert, and it does not support _Static_assert.
    We have to play preprocessor tricks to distinguish the two cases.
-   Since the MSVC preprocessor is not ISO C compliant (cf.
-   <https://stackoverflow.com/questions/5134523/>), the solution is specific
-   to MSVC.  */
+   Since the MSVC preprocessor is not ISO C compliant (see above),.
+   the solution is specific to MSVC.  */
 #   define _GL_EXPAND(x) x
 #   define _GL_SA1(a1) static_assert ((a1), "static assertion failed")
 #   define _GL_SA2 static_assert
diff --git a/lib/xalloc-oversized.h b/lib/xalloc-oversized.h
index 05ef7028137..5dbdfb5506a 100644
--- a/lib/xalloc-oversized.h
+++ b/lib/xalloc-oversized.h
@@ -1,7 +1,6 @@
 /* xalloc-oversized.h -- memory allocation size checking
 
-   Copyright (C) 1990-2000, 2003-2004, 2006-2023 Free Software
-   Foundation, Inc.
+   Copyright (C) 1990-2000, 2003-2004, 2006-2023 Free Software Foundation, Inc.
 
    This file is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as
diff --git a/lisp/cedet/semantic/symref/grep.el 
b/lisp/cedet/semantic/symref/grep.el
index c698c2ef5a2..cebeac3adca 100644
--- a/lisp/cedet/semantic/symref/grep.el
+++ b/lisp/cedet/semantic/symref/grep.el
@@ -44,7 +44,9 @@ those hits returned.")
 
 (defvar semantic-symref-filepattern-alist
   '((c-mode "*.[ch]")
+    (c-ts-mode "*.[ch]")
     (c++-mode "*.[chCH]" "*.[ch]pp" "*.cc" "*.hh")
+    (c++-ts-mode "*.[chCH]" "*.[ch]pp" "*.cc" "*.hh")
     (html-mode "*.html" "*.shtml" "*.php")
     (mhtml-mode "*.html" "*.shtml" "*.php") ; FIXME: remove
                                             ; duplication of
@@ -53,7 +55,10 @@ those hits returned.")
                                             ; major mode definition?
     (ruby-mode "*.r[bu]" "*.rake" "*.gemspec" "*.erb" "*.haml"
                "Rakefile" "Thorfile" "Capfile" "Guardfile" "Vagrantfile")
+    (ruby-ts-mode "*.r[bu]" "*.rake" "*.gemspec" "*.erb" "*.haml"
+                  "Rakefile" "Thorfile" "Capfile" "Guardfile" "Vagrantfile")
     (python-mode "*.py" "*.pyi" "*.pyw")
+    (python-ts-mode "*.py" "*.pyi" "*.pyw")
     (perl-mode "*.pl" "*.PL")
     (cperl-mode "*.pl" "*.PL")
     (lisp-interaction-mode "*.el" "*.ede" ".emacs" "_emacs")
diff --git a/lisp/dired-x.el b/lisp/dired-x.el
index 560eefae024..5780f1353ad 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -816,7 +816,7 @@ otherwise."
 (defun dired-x--string-to-number (str)
   "Like `string-to-number' but recognize a trailing unit prefix.
 For example, 2K is expanded to 2048.0.  The caller should make
-sure that a trailing letter in STR is one of BKkMGTPEZY."
+sure that a trailing letter in STR is one of BKkMGTPEZYRQ."
   (let* ((val (string-to-number str))
          (u (unless (zerop val)
               (aref str (1- (length str))))))
@@ -831,7 +831,7 @@ sure that a trailing letter in STR is one of BKkMGTPEZY."
       (when (and u (> u ?9))
         (when (= u ?k)
           (setq u ?K))
-        (let ((units '(?B ?K ?M ?G ?T ?P ?E ?Z ?Y)))
+        (let ((units '(?B ?K ?M ?G ?T ?P ?E ?Z ?Y ?R ?Q)))
           (while (and units (/= (pop units) u))
             (setq val (* 1024.0 val)))))
       val)))
@@ -904,7 +904,7 @@ only in the active region if `dired-mark-region' is 
non-nil."
              ;; GNU ls -hs suffixes the block count with a unit and
              ;; prints it as a float, FreeBSD does neither.
              (dired-re-inode-size "\\=\\s *\\([0-9]+\\s +\\)?\
-\\(?:\\([0-9]+\\(?:\\.[0-9]*\\)?[BkKMGTPEZY]?\\)? ?\\)"))
+\\(?:\\([0-9]+\\(?:\\.[0-9]*\\)?[BkKMGTPEZYRQ]?\\)? ?\\)"))
          (beginning-of-line)
          (forward-char 2)
          (search-forward-regexp dired-re-inode-size nil t)
diff --git a/lisp/dired.el b/lisp/dired.el
index 42d15f27a54..1f7dca802fd 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -530,7 +530,7 @@ The directory name must be absolute, but need not be fully 
expanded.")
 
 (put 'dired-actual-switches 'safe-local-variable 'dired-safe-switches-p)
 
-(defvar dired-re-inode-size "[0-9 \t]*[.,0-9]*[BkKMGTPEZY]?[ \t]*"
+(defvar dired-re-inode-size "[0-9 \t]*[.,0-9]*[BkKMGTPEZYRQ]?[ \t]*"
   "Regexp for optional initial inode and file size as made by `ls -i -s'.")
 
 ;; These regexps must be tested at beginning-of-line, but are also
diff --git a/lisp/files.el b/lisp/files.el
index 53a8a15a494..e1b7a990b15 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -7414,9 +7414,9 @@ files, you could say something like:
 
   (\"src/emacs/[^/]+/\\\\(.*\\\\)\\\\\\='\" \"src/emacs/.*/\\\\1\\\\\\='\")
 
-In this example, if you're in src/emacs/emacs-27/lisp/abbrev.el,
-and you an src/emacs/emacs-28/lisp/abbrev.el file exists, it's
-now defined as a sibling."
+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
   :version "29.1")
 
@@ -7645,7 +7645,7 @@ If DIR's free space cannot be obtained, this function 
returns nil."
         ;; This avoids recognizing `1 may 1997' as a date in the line:
         ;; -r--r--r--   1 may      1997        1168 Oct 19 16:49 README
 
-        ;; The "[BkKMGTPEZY]?" below supports "ls -alh" output.
+        ;; The "[BkKMGTPEZYRQ]?" below supports "ls -alh" output.
 
         ;; For non-iso date formats, we add the ".*" in order to find
         ;; the last possible match.  This avoids recognizing
@@ -7657,8 +7657,8 @@ If DIR's free space cannot be obtained, this function 
returns nil."
          ;; parentheses:
          ;; -rw-r--r-- (modified) 2005-10-22 21:25 files.el
          ;; This is not supported yet.
-    (purecopy (concat "\\([0-9][BkKMGTPEZY]? " iso
-                     "\\|.*[0-9][BkKMGTPEZY]? "
+    (purecopy (concat "\\([0-9][BkKMGTPEZYRQ]? " iso
+                     "\\|.*[0-9][BkKMGTPEZYRQ]? "
                      "\\(" western "\\|" western-comma
                       "\\|" DD-MMM-YYYY "\\|" east-asian "\\)"
                      "\\) +")))
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index 74881a14ccf..99df8fb9e06 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -2073,6 +2073,12 @@ as the constructs of Haddock, Javadoc and similar 
systems."
   "Font Lock mode face used to highlight preprocessor directives."
   :group 'font-lock-faces)
 
+(defface font-lock-regexp-face
+  '((t :inherit font-lock-string-face))
+  "Font Lock mode face used to highlight regexp literals."
+  :group 'font-lock-faces
+  :version "29.1")
+
 (defface font-lock-regexp-grouping-backslash
   '((t :inherit bold))
   "Font Lock mode face for backslashes in Lisp regexp grouping constructs."
diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el
index bfa84007ac5..619d29bb4d6 100644
--- a/lisp/net/tramp-adb.el
+++ b/lisp/net/tramp-adb.el
@@ -71,14 +71,14 @@ It is used for TCP/IP devices."
   "Regexp for date time format in ls output."))
 
 (defconst tramp-adb-ls-date-regexp
-  (tramp-compat-rx
+  (rx
    blank (regexp tramp-adb-ls-date-year-regexp)
    blank (regexp tramp-adb-ls-date-time-regexp)
    blank)
   "Regexp for date format in ls output.")
 
 (defconst tramp-adb-ls-toolbox-regexp
-  (tramp-compat-rx
+  (rx
    bol (* blank) (group (+ (any ".-" alpha)))                  ; \1 permissions
    (? (+ blank) (+ digit))                           ; links (Android 7/toybox)
    (* blank) (group (+ (not blank)))                           ; \2 username
@@ -327,8 +327,7 @@ arguments to pass to the OPERATION."
                     (tramp-shell-quote-argument
                      (tramp-compat-file-name-concat localname ".."))))
          (tramp-compat-replace-regexp-in-region
-          (tramp-compat-rx (literal (tramp-compat-file-name-unquote
-                                     (file-name-as-directory localname))))
+          (rx (literal (file-name-unquote (file-name-as-directory localname))))
           "" (point-min))
          (widen)))
       (tramp-adb-sh-fix-ls-output)
@@ -366,14 +365,12 @@ Emacs dired can't find files."
     (goto-char (point-min))
     (while
        (search-forward-regexp
-        (tramp-compat-rx
-         blank (group blank (regexp tramp-adb-ls-date-year-regexp) blank))
+        (rx blank (group blank (regexp tramp-adb-ls-date-year-regexp) blank))
         nil t)
       (replace-match "0\\1" "\\1" nil)
       ;; Insert missing "/".
       (when (looking-at-p
-            (tramp-compat-rx
-             (regexp tramp-adb-ls-date-time-regexp) (+ blank) eol))
+            (rx (regexp tramp-adb-ls-date-time-regexp) (+ blank) eol))
        (end-of-line)
        (insert "/")))
     ;; Sort entries.
@@ -393,12 +390,10 @@ Emacs dired can't find files."
 (defun tramp-adb-ls-output-time-less-p (a b)
   "Sort \"ls\" output by time, descending."
   (let (time-a time-b)
-    ;; Once we can assume Emacs 27 or later, the two calls
-    ;; (apply #'encode-time X) can be replaced by (encode-time X).
     (string-match tramp-adb-ls-date-regexp a)
-    (setq time-a (apply #'encode-time (parse-time-string (match-string 0 a))))
+    (setq time-a (encode-time (parse-time-string (match-string 0 a))))
     (string-match tramp-adb-ls-date-regexp b)
-    (setq time-b (apply #'encode-time (parse-time-string (match-string 0 b))))
+    (setq time-b (encode-time (parse-time-string (match-string 0 b))))
     (time-less-p time-b time-a)))
 
 (defun tramp-adb-ls-output-name-less-p (a b)
@@ -474,7 +469,7 @@ Emacs dired can't find files."
       ;; "adb pull ..." does not always return an error code.
       (unless
          (and (tramp-adb-execute-adb-command
-               v "pull" (tramp-compat-file-name-unquote localname) tmpfile)
+               v "pull" (file-name-unquote localname) tmpfile)
               (file-exists-p tmpfile))
        (ignore-errors (delete-file tmpfile))
        (tramp-error
@@ -554,8 +549,7 @@ Emacs dired can't find files."
                 "Moving tmp file `%s' to `%s'" tmpfile filename)
          (unwind-protect
              (unless (tramp-adb-execute-adb-command
-                      v "push" tmpfile
-                      (tramp-compat-file-name-unquote localname))
+                      v "push" tmpfile (file-name-unquote localname))
                (tramp-error v 'file-error "Cannot write: `%s'" filename))
            (delete-file tmpfile)))))))
 
@@ -570,11 +564,7 @@ Emacs dired can't find files."
 (defun tramp-adb-handle-set-file-times (filename &optional time flag)
   "Like `set-file-times' for Tramp files."
   (tramp-skeleton-set-file-modes-times-uid-gid filename
-    (let ((time (if (or (null time)
-                       (tramp-compat-time-equal-p time tramp-time-doesnt-exist)
-                       (tramp-compat-time-equal-p time tramp-time-dont-know))
-                   (current-time)
-                 time))
+    (let ((time (tramp-defined-time time))
          (nofollow (if (eq flag 'nofollow) "-h" ""))
          (quoted-name (tramp-shell-quote-argument localname)))
       ;; Older versions of toybox 'touch' mishandle nanoseconds and/or
@@ -660,8 +650,8 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are 
completely ignored."
                  (tramp-flush-file-properties v localname)
                  (unless (tramp-adb-execute-adb-command
                           v "push"
-                          (tramp-compat-file-name-unquote filename)
-                          (tramp-compat-file-name-unquote localname))
+                          (file-name-unquote filename)
+                          (file-name-unquote localname))
                    (tramp-error
                     v 'file-error
                     "Cannot copy `%s' `%s'" filename newname)))))))))
@@ -727,11 +717,6 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are 
completely ignored."
   "Strings to return by `process-file' in case of signals."
   (with-tramp-connection-property vec "signal-strings"
     (let ((default-directory (tramp-make-tramp-file-name vec 'noloc))
-         ;; `shell-file-name' and `shell-command-switch' are needed
-         ;; for Emacs < 27.1, which doesn't support connection-local
-         ;; variables in `shell-command'.
-         (shell-file-name "/system/bin/sh")
-         (shell-command-switch "-c")
          process-file-return-signal-string signals result)
       (dotimes (i 128) (push (format "Signal %d" i) result))
       (setq result (reverse result)
@@ -764,7 +749,7 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are 
completely ignored."
       ;; Determine input.
       (if (null infile)
          (setq input (tramp-get-remote-null-device v))
-       (setq infile (tramp-compat-file-name-unquote (expand-file-name infile)))
+       (setq infile (file-name-unquote (expand-file-name infile)))
        (if (tramp-equal-remote default-directory infile)
            ;; INFILE is on the same remote host.
            (setq input (tramp-unquote-file-local-name infile))
@@ -940,7 +925,7 @@ implementation will be used."
                 (i 0)
                 p)
 
-           (when (string-match-p (tramp-compat-rx multibyte) command)
+           (when (string-match-p (rx multibyte) command)
              (tramp-error
               v 'file-error "Cannot apply multi-byte command `%s'" command))
 
@@ -1132,7 +1117,7 @@ error and non-nil on success."
 
 (defun tramp-adb-send-command (vec command &optional neveropen nooutput)
   "Send the COMMAND to connection VEC."
-  (if (string-match-p (tramp-compat-rx multibyte) command)
+  (if (string-match-p (rx multibyte) command)
       ;; Multibyte codepoints with four bytes are not supported at
       ;; least by toybox.
 
@@ -1156,7 +1141,7 @@ error and non-nil on success."
          ;; We can't use stty to disable echo of command.  stty is said
          ;; to be added to toybox 0.7.6.  busybox shall have it, but this
          ;; isn't used any longer for Android.
-         (delete-matching-lines (tramp-compat-rx bol (literal command) eol))
+         (delete-matching-lines (rx bol (literal command) eol))
          ;; When the local machine is W32, there are still trailing ^M.
          ;; There must be a better solution by setting the correct coding
          ;; system, but this requires changes in core Tramp.
@@ -1279,7 +1264,7 @@ connection if a previous connection has died for some 
reason."
 
            ;; Change prompt.
            (tramp-set-connection-property
-            p "prompt" (tramp-compat-rx "///" (literal prompt) "#$"))
+            p "prompt" (rx "///" (literal prompt) "#$"))
            (tramp-adb-send-command
             vec (format "PS1=\"///\"\"%s\"\"#$\"" prompt))
 
diff --git a/lisp/net/tramp-archive.el b/lisp/net/tramp-archive.el
index 36992014e13..a2add1ed73a 100644
--- a/lisp/net/tramp-archive.el
+++ b/lisp/net/tramp-archive.el
@@ -110,12 +110,7 @@
 ;;; Code:
 
 (eval-when-compile (require 'cl-lib))
-;; Sometimes, compilation fails with "Variable binding depth exceeds
-;; max-specpdl-size".  Shall be fixed in Emacs 27.
-(with-no-warnings ;; max-specpdl-size
-  (eval-and-compile
-    (let ((max-specpdl-size (* 2 max-specpdl-size)))
-      (require 'tramp-gvfs))))
+(require 'tramp-gvfs)
 
 (autoload 'dired-uncache "dired")
 (autoload 'url-tramp-convert-url-to-tramp "url-tramp")
@@ -183,20 +178,9 @@ It must be supported by libarchive(3).")
 ;; The definition of `tramp-archive-file-name-regexp' contains calls
 ;; to `regexp-opt', which cannot be autoloaded while loading
 ;; loaddefs.el.  So we use a macro, which is evaluated only when needed.
-;; Emacs 26 and earlier cannot use the autoload form
-;; `tramp-compat-rx'.  So we refrain from using `rx'.
 ;;;###autoload
 (progn (defmacro tramp-archive-autoload-file-name-regexp ()
   "Regular expression matching archive file names."
-  (if (<= emacs-major-version 26)
-  '(concat
-    "\\`" "\\(" ".+" "\\."
-      ;; Default suffixes ...
-      (regexp-opt tramp-archive-suffixes)
-      ;; ... with compression.
-      "\\(?:" "\\." (regexp-opt tramp-archive-compression-suffixes) "\\)*"
-    "\\)" ;; \1
-    "\\(" "/" ".*" "\\)" "\\'") ;; \2
   `(rx
     bos
     ;; This group is used in `tramp-archive-file-name-archive'.
@@ -208,13 +192,10 @@ It must be supported by libarchive(3).")
      (? "." (| ,@tramp-archive-compression-suffixes)))
     ;; This group is used in `tramp-archive-file-name-localname'.
     (group "/" (* nonl))
-    eos))))
+    eos)))
 
 (put #'tramp-archive-autoload-file-name-regexp 'tramp-autoload t)
 
-;; In older Emacs (prior 27.1), `tramp-archive-autoload-file-name-regexp'
-;; is not autoloaded.  So we cannot expect it to be known in
-;; tramp-loaddefs.el.  But it exists, when tramp-archive.el is loaded.
 ;; We must wrap it into `eval-when-compile'.  Otherwise, there could
 ;; be an "Eager macro-expansion failure" when unloading/reloading Tramp.
 ;;;###tramp-autoload
@@ -222,11 +203,6 @@ It must be supported by libarchive(3).")
   (eval-when-compile (ignore-errors (tramp-archive-autoload-file-name-regexp)))
   "Regular expression matching archive file names.")
 
-;; The value above is nil for Emacs 26.  Set it now.
-(if (<= emacs-major-version 26)
-    (setq tramp-archive-file-name-regexp
-         (ignore-errors (tramp-archive-autoload-file-name-regexp))))
-
 ;;;###tramp-autoload
 (defconst tramp-archive-method "archive"
   "Method name for archives in GVFS.")
@@ -299,7 +275,7 @@ It must be supported by libarchive(3).")
     (lock-file . ignore)
     (make-auto-save-file-name . ignore)
     (make-directory . tramp-archive-handle-not-implemented)
-    (make-directory-internal . tramp-archive-handle-not-implemented)
+    (make-directory-internal . ignore)
     (make-lock-file-name . ignore)
     (make-nearby-temp-file . tramp-handle-make-nearby-temp-file)
     (make-process . ignore)
@@ -360,13 +336,9 @@ arguments to pass to the OPERATION."
           (tramp-register-file-name-handlers)
           (tramp-archive-run-real-handler operation args))
 
-      (with-no-warnings ;; max-specpdl-size
       (let* ((filename (apply #'tramp-archive-file-name-for-operation
                              operation args))
-            (archive (tramp-archive-file-name-archive filename))
-            ;; Sometimes, it fails with "Variable binding depth exceeds
-            ;; max-specpdl-size".  Shall be fixed in Emacs 27.
-            (max-specpdl-size (* 2 max-specpdl-size)))
+            (archive (tramp-archive-file-name-archive filename)))
 
         ;; `filename' could be a quoted file name.  Or the file
         ;; archive could be a directory, see Bug#30293.
@@ -394,7 +366,7 @@ arguments to pass to the OPERATION."
              (setq args (cons operation args)))
            (if fn
                (save-match-data (apply (cdr fn) args))
-             (tramp-archive-run-real-handler operation args))))))))
+             (tramp-archive-run-real-handler operation args)))))))
 
 ;;;###autoload
 (progn (defun tramp-archive-autoload-file-name-handler (operation &rest args)
@@ -432,10 +404,6 @@ arguments to pass to the OPERATION."
      (remove-hook
       'after-init-hook #'tramp-register-archive-autoload-file-name-handler))))
 
-;; In older Emacsen (prior 27.1), the autoload above does not exist.
-;; So we call it again; it doesn't hurt.
-(tramp-register-archive-autoload-file-name-handler)
-
 ;; Mark `operations' the handler is responsible for.
 (put #'tramp-archive-file-name-handler 'operations
      (mapcar #'car tramp-archive-file-name-handler-alist))
@@ -458,7 +426,7 @@ arguments to pass to the OPERATION."
   "Return t if NAME is a string with archive file name syntax."
   (and (stringp name)
        ;; `tramp-archive-file-name-regexp' does not suppress quoted file names.
-       (not (tramp-compat-file-name-quoted-p name t))
+       (not (file-name-quoted-p name t))
        ;; We cannot use `string-match-p', the matches are used.
        (string-match tramp-archive-file-name-regexp name)
        t))
@@ -511,7 +479,6 @@ name is kept in slot `hop'"
 
        ;; http://...
        ((and url-handler-mode
-            tramp-compat-use-url-tramp-p
              (string-match-p url-handler-regexp archive)
             (string-match-p
              "https?" (url-type (url-generic-parse-url archive))))
diff --git a/lisp/net/tramp-cache.el b/lisp/net/tramp-cache.el
index 09e43a99039..c5864e7fa5e 100644
--- a/lisp/net/tramp-cache.el
+++ b/lisp/net/tramp-cache.el
@@ -267,8 +267,7 @@ Return VALUE."
 (defun tramp-flush-directory-properties (key directory)
   "Remove all properties of DIRECTORY in the cache context of KEY.
 Remove also properties of all files in subdirectories."
-  (let* ((directory
-         (directory-file-name (tramp-compat-file-name-unquote directory)))
+  (let* ((directory (directory-file-name (file-name-unquote directory)))
         (truename (tramp-get-file-property key directory "file-truename")))
     (tramp-message key 8 "%s" directory)
     (dolist (key (hash-table-keys tramp-cache-data))
@@ -677,4 +676,8 @@ for all methods.  Resulting data are derived from 
connection history."
 
 (provide 'tramp-cache)
 
+;;; TODO:
+;;
+;; * Use multisession.el, starting with Emacs 29.1.
+
 ;;; tramp-cache.el ends here
diff --git a/lisp/net/tramp-cmds.el b/lisp/net/tramp-cmds.el
index bf7d45d2a5a..dc967dccf68 100644
--- a/lisp/net/tramp-cmds.el
+++ b/lisp/net/tramp-cmds.el
@@ -359,7 +359,7 @@ The remote connection identified by SOURCE is flushed by
                      (dir (tramp-rename-read-file-name-dir default))
                      (init (tramp-rename-read-file-name-init default))
                      (tramp-ignored-file-name-regexp
-                      (tramp-compat-rx (literal (file-remote-p source)))))
+                      (rx (literal (file-remote-p source)))))
                 (read-file-name-default
                  "Enter new Tramp connection: "
                  dir default 'confirm init #'file-directory-p)))))
@@ -470,7 +470,7 @@ For details, see `tramp-rename-files'."
                      (dir (tramp-rename-read-file-name-dir default))
                      (init (tramp-rename-read-file-name-init default))
                      (tramp-ignored-file-name-regexp
-                      (tramp-compat-rx (literal (file-remote-p source)))))
+                      (rx (literal (file-remote-p source)))))
                 (read-file-name-default
                  (format "Change Tramp connection `%s': " source)
                  dir default 'confirm init #'file-directory-p)))))
@@ -625,7 +625,7 @@ buffer in your bug report.
     (unless (hash-table-p val)
       ;; Remove string quotation.
       (when (looking-at
-            (tramp-compat-rx
+            (rx
              bol (group (* anychar)) "\""          ;; \1 "
              (group "(base64-decode-string ") "\\" ;; \2 \
              (group "\"" (* anychar)) "\\"         ;; \3 \
diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el
index f176476a73a..6a2654ee474 100644
--- a/lisp/net/tramp-compat.el
+++ b/lisp/net/tramp-compat.el
@@ -23,9 +23,9 @@
 
 ;;; Commentary:
 
-;; Tramp's main Emacs version for development is Emacs 29.  This
-;; package provides compatibility functions for Emacs 26, Emacs 27 and
-;; Emacs 28.
+;; Tramp's main Emacs version for development is Emacs 30.  This
+;; package provides compatibility functions for Emacs 27, Emacs 28 and
+;; Emacs 29.
 
 ;;; Code:
 
@@ -36,7 +36,6 @@
 (require 'shell)
 (require 'subr-x)
 
-(declare-function tramp-compat-rx "tramp")
 (declare-function tramp-error "tramp")
 (declare-function tramp-file-name-handler "tramp")
 (declare-function tramp-tramp-file-p "tramp")
@@ -85,153 +84,6 @@ Add the extension of F, if existing."
     tramp-temp-name-prefix tramp-compat-temporary-file-directory)
    dir-flag (file-name-extension f t)))
 
-;; `file-name-quoted-p', `file-name-quote' and `file-name-unquote' got
-;; a second argument in Emacs 27.1.
-;;;###tramp-autoload
-(defalias 'tramp-compat-file-name-quoted-p
-  (if (equal (func-arity #'file-name-quoted-p) '(1 . 2))
-      #'file-name-quoted-p
-    (lambda (name &optional top)
-      "Whether NAME is quoted with prefix \"/:\".
-If NAME is a remote file name and TOP is nil, check the local part of NAME."
-      (let ((file-name-handler-alist (unless top file-name-handler-alist)))
-       (string-prefix-p "/:" (file-local-name name))))))
-
-(defalias 'tramp-compat-file-name-quote
-  (if (equal (func-arity #'file-name-quote) '(1 . 2))
-      #'file-name-quote
-    (lambda (name &optional top)
-      "Add the quotation prefix \"/:\" to file NAME.
-If NAME is a remote file name and TOP is nil, the local part of NAME is 
quoted."
-      (let ((file-name-handler-alist (unless top file-name-handler-alist)))
-       (if (tramp-compat-file-name-quoted-p name top)
-            name
-         (concat (file-remote-p name) "/:" (file-local-name name)))))))
-
-(defalias 'tramp-compat-file-name-unquote
-  (if (equal (func-arity #'file-name-unquote) '(1 . 2))
-      #'file-name-unquote
-    (lambda (name &optional top)
-      "Remove quotation prefix \"/:\" from file NAME.
-If NAME is a remote file name and TOP is nil, the local part of
-NAME is unquoted."
-      (let* ((file-name-handler-alist (unless top file-name-handler-alist))
-             (localname (file-local-name name)))
-       (when (tramp-compat-file-name-quoted-p localname top)
-         (setq
-          localname (if (= (length localname) 2) "/" (substring localname 2))))
-       (concat (file-remote-p name) localname)))))
-
-;; `tramp-syntax' has changed its meaning in Emacs 26.1.  We still
-;; support old settings.
-(defsubst tramp-compat-tramp-syntax ()
-  "Return proper value of `tramp-syntax'."
-  (defvar tramp-syntax)
-  (cond ((eq tramp-syntax 'ftp) 'default)
-       ((eq tramp-syntax 'sep) 'separate)
-       (t tramp-syntax)))
-
-;; The signature of `tramp-make-tramp-file-name' has been changed.
-;; Therefore, we cannot use `url-tramp-convert-url-to-tramp' prior
-;; Emacs 26.1.  We use `temporary-file-directory' as indicator.
-(defconst tramp-compat-use-url-tramp-p (fboundp 'temporary-file-directory)
-  "Whether to use url-tramp.el.")
-
-;; `exec-path' is new in Emacs 27.1.
-(defalias 'tramp-compat-exec-path
-  (if (fboundp 'exec-path)
-      #'exec-path
-    (lambda ()
-      "List of directories to search programs to run in remote subprocesses."
-      (if (tramp-tramp-file-p default-directory)
-         (tramp-file-name-handler 'exec-path)
-       exec-path))))
-
-;; `time-equal-p' has appeared in Emacs 27.1.
-(defalias 'tramp-compat-time-equal-p
-  (if (fboundp 'time-equal-p)
-      #'time-equal-p
-    (lambda (t1 t2)
-      "Return non-nil if time value T1 is equal to time value T2.
-A nil value for either argument stands for the current time."
-      (equal (or t1 (current-time)) (or t2 (current-time))))))
-
-;; `flatten-tree' has appeared in Emacs 27.1.
-(defalias 'tramp-compat-flatten-tree
-  (if (fboundp 'flatten-tree)
-      #'flatten-tree
-    (lambda (tree)
-      "Take TREE and \"flatten\" it."
-      (let (elems)
-       (setq tree (list tree))
-       (while (let ((elem (pop tree)))
-                (cond ((consp elem)
-                       (setq tree (cons (car elem) (cons (cdr elem) tree))))
-                       (elem
-                       (push elem elems)))
-                tree))
-       (nreverse elems)))))
-
-;; `progress-reporter-update' got argument SUFFIX in Emacs 27.1.
-(defalias 'tramp-compat-progress-reporter-update
-  (if (equal (func-arity #'progress-reporter-update) '(1 . 3))
-      #'progress-reporter-update
-    (lambda (reporter &optional value _suffix)
-      (progress-reporter-update reporter value))))
-
-;; `ignore-error' is new in Emacs 27.1.
-(defmacro tramp-compat-ignore-error (condition &rest body)
-  "Execute BODY; if the error CONDITION occurs, return nil.
-Otherwise, return result of last form in BODY.
-
-CONDITION can also be a list of error conditions."
-  (declare (debug t) (indent 1))
-  `(condition-case nil (progn ,@body) (,condition nil)))
-
-;; `rx' in Emacs 26 doesn't know the `literal', `anychar' and
-;; `multibyte' constructs.  The `not' construct requires an `any'
-;; construct as argument.  The `regexp' construct requires a literal
-;; string.
-(defvar tramp-compat-rx--runtime-params)
-
-(defun tramp-compat-rx--transform-items (items)
-  (mapcar #'tramp-compat-rx--transform-item items))
-
-;; There is an error in Emacs 26.  `(rx "a" (? ""))' => "a?".
-;; We must protect the string in regexp and literal, therefore.
-(defun tramp-compat-rx--transform-item (item)
-  (pcase item
-    ('anychar 'anything)
-    ('multibyte 'nonascii)
-    (`(not ,expr)
-     (if (consp expr) item (list 'not (list 'any expr))))
-    (`(regexp ,expr)
-     (setq tramp-compat-rx--runtime-params t)
-     `(regexp ,(list '\, `(concat "\\(?:" ,expr "\\)"))))
-    (`(literal ,expr)
-     (setq tramp-compat-rx--runtime-params t)
-     `(regexp ,(list '\, `(concat "\\(?:" (regexp-quote ,expr) "\\)"))))
-    (`(eval . ,_) item)
-    (`(,head . ,rest) (cons head (tramp-compat-rx--transform-items rest)))
-    (_ item)))
-
-(defun tramp-compat-rx--transform (items)
-  (let* ((tramp-compat-rx--runtime-params nil)
-         (new-rx (cons ': (tramp-compat-rx--transform-items items))))
-    (if tramp-compat-rx--runtime-params
-        `(rx-to-string ,(list '\` new-rx) t)
-      (rx-to-string new-rx t))))
-
-(if (ignore-errors (rx-to-string '(literal "a"))) ;; Emacs 27+.
-    (defalias 'tramp-compat-rx #'rx)
-  (defmacro tramp-compat-rx (&rest items)
-    (tramp-compat-rx--transform items)))
-
-;; This is needed for compilation in the Emacs source tree.
-;;;###autoload (defalias 'tramp-compat-rx #'rx)
-
-(put #'tramp-compat-rx 'tramp-autoload t)
-
 ;; `file-modes', `set-file-modes' and `set-file-times' got argument
 ;; FLAG in Emacs 28.1.
 (defalias 'tramp-compat-file-modes
@@ -419,8 +271,5 @@ CONDITION can also be a list of error conditions."
 ;;
 ;; * Starting with Emacs 27.1, there's no need to escape open
 ;;   parentheses with a backslash in docstrings anymore.
-;;
-;; * Starting with Emacs 27.1, there's `make-empty-file'.  Could be
-;;   used instead of `(write-region "" ...)'.
 
 ;;; tramp-compat.el ends here
diff --git a/lisp/net/tramp-container.el b/lisp/net/tramp-container.el
index 6cdd6c654ea..1dd29190f10 100644
--- a/lisp/net/tramp-container.el
+++ b/lisp/net/tramp-container.el
@@ -41,6 +41,7 @@
 ;;     CONTAINER     is the container to connect to
 ;;
 ;;
+;;
 ;; Open file in a Kubernetes container:
 ;;
 ;;     C-x C-f /kubernetes:POD:/path/to/file
@@ -54,6 +55,18 @@
 ;; namespace, use this command to change it:
 ;;
 ;; "kubectl config set-context --current --namespace=<name>"
+;;
+;;
+;;
+;; Open a file on an existing toolbox container via Toolbox:
+;;
+;;     C-x C-f /toolbox:CONTAINER:/path/to/file
+;;
+;; Where:
+;;     CONTAINER     is the container to connect to (optional)
+;;
+;; If the container is not running, it is started.  If no container is
+;; specified, the default Toolbox container is used.
 
 ;;; Code:
 
@@ -83,6 +96,14 @@
   :type '(choice (const "kubectl")
                  (string)))
 
+;;;###tramp-autoload
+(defcustom tramp-toolbox-program "toolbox"
+  "Name of the Toolbox client program."
+  :group 'tramp
+  :version "30.1"
+  :type '(choice (const "toolbox")
+                 (string)))
+
 ;;;###tramp-autoload
 (defconst tramp-docker-method "docker"
   "Tramp method name to use to connect to Docker containers.")
@@ -95,6 +116,10 @@
 (defconst tramp-kubernetes-method "kubernetes"
   "Tramp method name to use to connect to Kubernetes containers.")
 
+;;;###tramp-autoload
+(defconst tramp-toolbox-method "toolbox"
+  "Tramp method name to use to connect to Toolbox containers.")
+
 ;;;###tramp-autoload
 (defun tramp-docker--completion-function (&rest _args)
   "List Docker-like containers available for connection.
@@ -150,6 +175,27 @@ see its function help for a description of the format."
                 "jsonpath='{.contexts[?(@.name == \"%s\")]}'" 
current-context)))
          (buffer-string))))))
 
+;;;###tramp-autoload
+(defun tramp-toolbox--completion-function (&rest _args)
+  "List Toolbox containers available for connection.
+
+This function is used by `tramp-set-completion-function', please
+see its function help for a description of the format."
+  (when-let ((default-directory tramp-compat-temporary-file-directory)
+            (raw-list (shell-command-to-string
+                       (concat tramp-toolbox-program " list -c")))
+            ;; Ignore header line.
+             (lines (cdr (split-string raw-list "\n" 'omit)))
+             (names (mapcar
+                    (lambda (line)
+                       (when (string-match
+                             (rx bol (1+ (not space))
+                                 (1+ space) (group (1+ (not space))) space)
+                             line)
+                        (match-string 1 line)))
+                     lines)))
+    (mapcar (lambda (m) (list nil m)) (delq nil names))))
+
 ;;;###tramp-autoload
 (defvar tramp-default-remote-shell) ;; Silence byte compiler.
 
@@ -167,6 +213,7 @@ see its function help for a description of the format."
                 (tramp-remote-shell ,tramp-default-remote-shell)
                 (tramp-remote-shell-login ("-l"))
                 (tramp-remote-shell-args ("-i" "-c"))))
+
  (add-to-list 'tramp-methods
               `(,tramp-podman-method
                 (tramp-login-program ,tramp-podman-program)
@@ -179,6 +226,7 @@ see its function help for a description of the format."
                 (tramp-remote-shell ,tramp-default-remote-shell)
                 (tramp-remote-shell-login ("-l"))
                 (tramp-remote-shell-args ("-i" "-c"))))
+
  (add-to-list 'tramp-methods
               `(,tramp-kubernetes-method
                 (tramp-login-program ,tramp-kubernetes-program)
@@ -193,6 +241,19 @@ see its function help for a description of the format."
                 (tramp-remote-shell-login ("-l"))
                 (tramp-remote-shell-args ("-i" "-c"))))
 
+ (add-to-list 'tramp-methods
+             `(,tramp-toolbox-method
+               (tramp-login-program ,tramp-toolbox-program)
+               (tramp-login-args (("run")
+                                  ("-c" "%h")
+                                  ("%l")))
+               (tramp-direct-async (,tramp-default-remote-shell "-c"))
+               (tramp-remote-shell ,tramp-default-remote-shell)
+               (tramp-remote-shell-login ("-l"))
+               (tramp-remote-shell-args ("-c"))))
+
+ (add-to-list 'tramp-default-host-alist `(,tramp-toolbox-method nil ""))
+
  (tramp-set-completion-function
   tramp-docker-method
   '((tramp-docker--completion-function "")))
@@ -203,7 +264,11 @@ see its function help for a description of the format."
 
  (tramp-set-completion-function
   tramp-kubernetes-method
-  '((tramp-kubernetes--completion-function ""))))
+  '((tramp-kubernetes--completion-function "")))
+
+ (tramp-set-completion-function
+  tramp-toolbox-method
+  '((tramp-toolbox--completion-function ""))))
 
 (add-hook 'tramp-unload-hook
          (lambda ()
diff --git a/lisp/net/tramp-crypt.el b/lisp/net/tramp-crypt.el
index 0e033451af5..61d1c529619 100644
--- a/lisp/net/tramp-crypt.el
+++ b/lisp/net/tramp-crypt.el
@@ -146,7 +146,7 @@ They are completed by \"M-x TAB\" only when encryption 
support is enabled."
 If NAME doesn't belong to an encrypted remote directory, return nil."
   (catch 'crypt-file-name-p
     (and tramp-crypt-enabled (stringp name)
-        (not (tramp-compat-file-name-quoted-p name))
+        (not (file-name-quoted-p name))
         (not (string-suffix-p tramp-crypt-encfs-config name))
         (dolist (dir tramp-crypt-directories)
           (and (string-prefix-p
@@ -497,7 +497,7 @@ directory.  File names will be also encrypted."
     (tramp-user-error nil "Feature is not enabled."))
   (unless (and (tramp-tramp-file-p name) (file-directory-p name))
     (tramp-user-error nil "%s must be an existing remote directory." name))
-  (when (tramp-compat-file-name-quoted-p name)
+  (when (file-name-quoted-p name)
     (tramp-user-error nil "%s must not be quoted." name))
   (setq name (file-name-as-directory (expand-file-name name)))
   (unless (member name tramp-crypt-directories)
@@ -556,7 +556,7 @@ localname."
 (defun tramp-crypt-handle-access-file (filename string)
   "Like `access-file' for Tramp files."
   (let* ((encrypt-filename (tramp-crypt-encrypt-file-name filename))
-        (encrypt-regexp (tramp-compat-rx (literal encrypt-filename) eos))
+        (encrypt-regexp (rx (literal encrypt-filename) eos))
         tramp-crypt-enabled)
     (condition-case err
        (access-file encrypt-filename string)
@@ -709,8 +709,7 @@ absolute file names."
       (mapcar
        (lambda (x)
         (replace-regexp-in-string
-         (tramp-compat-rx bos (literal directory)) ""
-         (tramp-crypt-decrypt-file-name x)))
+         (rx bos (literal directory)) "" (tramp-crypt-decrypt-file-name x)))
        (directory-files (tramp-crypt-encrypt-file-name directory) 'full)))))
 
 (defun tramp-crypt-handle-file-attributes (filename &optional id-format)
@@ -756,9 +755,7 @@ absolute file names."
 (defun tramp-crypt-handle-file-system-info (filename)
   "Like `file-system-info' for Tramp files."
   (let (tramp-crypt-enabled)
-    ;; `file-system-info' exists since Emacs 27.1.
-    (tramp-compat-funcall
-     'file-system-info (tramp-crypt-encrypt-file-name filename))))
+    (file-system-info (tramp-crypt-encrypt-file-name filename))))
 
 (defun tramp-crypt-handle-file-writable-p (filename)
   "Like `file-writable-p' for Tramp files."
@@ -769,27 +766,26 @@ absolute file names."
   (filename switches &optional wildcard full-directory-p)
   "Like `insert-directory' for Tramp files.
 WILDCARD is not supported."
-  ;; This package has been added to Emacs 27.1.
-  (when (load "text-property-search" 'noerror 'nomessage)
-    (let (tramp-crypt-enabled)
-      (tramp-handle-insert-directory
-       (tramp-crypt-encrypt-file-name filename)
-       switches wildcard full-directory-p)
-      (let* ((filename (file-name-as-directory filename))
-            (enc (tramp-crypt-encrypt-file-name filename))
-            match string)
-       (goto-char (point-min))
-       (while (setq match (text-property-search-forward 'dired-filename t t))
-         (setq string
-               (buffer-substring
-                (prop-match-beginning match) (prop-match-end match))
-               string (if (file-name-absolute-p string)
-                          (tramp-crypt-decrypt-file-name string)
-                        (substring
-                         (tramp-crypt-decrypt-file-name (concat enc string))
-                         (length filename))))
-         (delete-region (prop-match-beginning match) (prop-match-end match))
-         (insert (propertize string 'dired-filename t)))))))
+  (require 'text-property-search)
+  (let (tramp-crypt-enabled)
+    (tramp-handle-insert-directory
+     (tramp-crypt-encrypt-file-name filename)
+     switches wildcard full-directory-p)
+    (let* ((filename (file-name-as-directory filename))
+          (enc (tramp-crypt-encrypt-file-name filename))
+          match string)
+      (goto-char (point-min))
+      (while (setq match (text-property-search-forward 'dired-filename t t))
+       (setq string
+             (buffer-substring
+              (prop-match-beginning match) (prop-match-end match))
+             string (if (file-name-absolute-p string)
+                        (tramp-crypt-decrypt-file-name string)
+                      (substring
+                       (tramp-crypt-decrypt-file-name (concat enc string))
+                       (length filename))))
+       (delete-region (prop-match-beginning match) (prop-match-end match))
+       (insert (propertize string 'dired-filename t))))))
 
 (defun tramp-crypt-handle-lock-file (filename)
   "Like `lock-file' for Tramp files."
diff --git a/lisp/net/tramp-fuse.el b/lisp/net/tramp-fuse.el
index b73ec22f0c4..c8754e2b03d 100644
--- a/lisp/net/tramp-fuse.el
+++ b/lisp/net/tramp-fuse.el
@@ -69,15 +69,15 @@
               (tramp-fuse-local-file-name directory))))))))
     (if full
        ;; Massage the result.
-       (let ((local (tramp-compat-rx
+       (let ((local (rx
                      bol
                      (literal
                       (tramp-fuse-mount-point
                        (tramp-dissect-file-name directory)))))
              (remote (directory-file-name
                       (funcall
-                       (if (tramp-compat-file-name-quoted-p directory)
-                           #'tramp-compat-file-name-quote #'identity)
+                       (if (file-name-quoted-p directory)
+                           #'file-name-quote #'identity)
                        (file-remote-p directory)))))
          (mapcar
           (lambda (x) (replace-regexp-in-string local remote x))
@@ -174,8 +174,7 @@ It has the same meaning as 
`remote-file-name-inhibit-cache'.")
           (tramp-set-file-property
           vec "/" "mounted"
            (when (string-match
-                 (tramp-compat-rx
-                  bol (group (literal (tramp-fuse-mount-spec vec))) blank)
+                 (rx bol (group (literal (tramp-fuse-mount-spec vec))) blank)
                  mount)
              (match-string 1 mount)))))))
 
@@ -205,7 +204,7 @@ It has the same meaning as 
`remote-file-name-inhibit-cache'.")
 
 (defun tramp-fuse-local-file-name (filename)
   "Return local mount name of FILENAME."
-  (setq filename (tramp-compat-file-name-unquote (expand-file-name filename)))
+  (setq filename (file-name-unquote (expand-file-name filename)))
   (with-parsed-tramp-file-name filename nil
     ;; As long as we call `tramp-*-maybe-open-connection' here,
     ;; we cache the result.
@@ -214,10 +213,10 @@ It has the same meaning as 
`remote-file-name-inhibit-cache'.")
        (intern
        (format "tramp-%s-maybe-open-connection" (tramp-file-name-method v)))
        v)
-      (let ((quoted (tramp-compat-file-name-quoted-p localname))
-           (localname (tramp-compat-file-name-unquote localname)))
+      (let ((quoted (file-name-quoted-p localname))
+           (localname (file-name-unquote localname)))
        (funcall
-        (if quoted #'tramp-compat-file-name-quote #'identity)
+        (if quoted #'file-name-quote #'identity)
         (expand-file-name
          (if (file-name-absolute-p localname)
              (substring localname 1) localname)
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el
index 1a5303b4d5d..bb81b3eb66c 100644
--- a/lisp/net/tramp-gvfs.el
+++ b/lisp/net/tramp-gvfs.el
@@ -414,7 +414,7 @@ It has been changed in GVFS 1.14.")
 ;; </interface>
 
 (defconst tramp-goa-identity-regexp
-  (tramp-compat-rx
+  (rx
    bol (? (group (regexp tramp-user-regexp)))
    "@" (? (group (regexp tramp-host-regexp)))
    (? ":" (group (regexp tramp-port-regexp))))
@@ -716,13 +716,13 @@ It has been changed in GVFS 1.14.")
     "GVFS file attributes."))
 
 (defconst tramp-gvfs-file-attributes-with-gvfs-ls-regexp
-  (tramp-compat-rx
+  (rx
    blank (group (regexp (regexp-opt tramp-gvfs-file-attributes)))
    "=" (group (+? nonl)))
   "Regexp to parse GVFS file attributes with `gvfs-ls'.")
 
 (defconst tramp-gvfs-file-attributes-with-gvfs-info-regexp
-  (tramp-compat-rx
+  (rx
    bol (* blank) (group (regexp (regexp-opt tramp-gvfs-file-attributes)))
    ":" (+ blank) (group (* nonl)) eol)
   "Regexp to parse GVFS file attributes with `gvfs-info'.")
@@ -734,7 +734,7 @@ It has been changed in GVFS 1.14.")
   "GVFS file system attributes.")
 
 (defconst tramp-gvfs-file-system-attributes-regexp
-  (tramp-compat-rx
+  (rx
    bol (* blank)
    (group (regexp (regexp-opt tramp-gvfs-file-system-attributes)))
    ":" (+ blank) (group (* nonl)) eol)
@@ -744,7 +744,7 @@ It has been changed in GVFS 1.14.")
   "Default prefix for owncloud / nextcloud methods.")
 
 (defconst tramp-gvfs-nextcloud-default-prefix-regexp
-  (tramp-compat-rx (literal tramp-gvfs-nextcloud-default-prefix) eol)
+  (rx (literal tramp-gvfs-nextcloud-default-prefix) eol)
   "Regexp of default prefix for owncloud / nextcloud methods.")
 
 
@@ -1168,8 +1168,7 @@ file names."
     (with-parsed-tramp-file-name name nil
       ;; If there is a default location, expand tilde.
       (when (string-match
-            (tramp-compat-rx bos "~" (group (* (not "/"))) (group (* nonl)) 
eos)
-             localname)
+            (rx bos "~" (group (* (not "/"))) (group (* nonl)) eos) localname)
        (let ((uname (match-string 1 localname))
              (fname (match-string 2 localname))
              hname)
@@ -1186,8 +1185,7 @@ file names."
       ;; We do not pass "/..".
       (if (string-match-p (rx bos (| "afp" (: "dav" (? "s")) "smb") eos) 
method)
          (when (string-match
-                (tramp-compat-rx bos "/" (+ (not "/")) (group "/.." (? "/")))
-                localname)
+                (rx bos "/" (+ (not "/")) (group "/.." (? "/"))) localname)
            (setq localname (replace-match "/" t t localname 1)))
        (when (string-match (rx bol "/.." (? "/")) localname)
          (setq localname (replace-match "/" t t localname))))
@@ -1222,7 +1220,7 @@ file names."
        (with-current-buffer (tramp-get-connection-buffer v)
          (goto-char (point-min))
          (while (looking-at
-                 (tramp-compat-rx
+                 (rx
                   bol (group (+ nonl)) blank
                   (group (+ digit)) blank
                   "(" (group (+? nonl)) ")"
@@ -1232,7 +1230,7 @@ file names."
                              (cons "name" (match-string 1)))))
              (goto-char (1+ (match-end 3)))
              (while (looking-at
-                     (tramp-compat-rx
+                     (rx
                       (regexp tramp-gvfs-file-attributes-with-gvfs-ls-regexp)
                       (group
                        (| (regexp
@@ -1281,11 +1279,10 @@ If FILE-SYSTEM is non-nil, return file system 
attributes."
   "Return GVFS attributes association list of FILENAME."
   (setq filename (directory-file-name (expand-file-name filename)))
   (with-parsed-tramp-file-name filename nil
-    (setq localname (tramp-compat-file-name-unquote localname))
+    (setq localname (file-name-unquote localname))
     (if (or (and (string-match-p
                  (rx bol (| "afp" (: "dav" (? "s")) "smb") eol) method)
-                (string-match-p
-                 (tramp-compat-rx bol (? "/") (+ (not "/")) eol) localname))
+                (string-match-p (rx bol (? "/") (+ (not "/")) eol) localname))
            (string-equal localname "/"))
        (tramp-gvfs-get-root-attributes filename)
       (assoc
@@ -1485,7 +1482,7 @@ If FILE-SYSTEM is non-nil, return file system attributes."
   (let* ((events (process-get proc 'events))
         (rest-string (process-get proc 'rest-string))
         (dd (tramp-get-default-directory (process-buffer proc)))
-        (ddu (tramp-compat-rx (literal (tramp-gvfs-url-file-name dd)))))
+        (ddu (rx (literal (tramp-gvfs-url-file-name dd)))))
     (when rest-string
       (tramp-message proc 10 "Previous string:\n%s" rest-string))
     (tramp-message proc 6 "%S\n%s" proc string)
@@ -1504,7 +1501,7 @@ If FILE-SYSTEM is non-nil, return file system attributes."
       (delete-process proc))
 
     (while (string-match
-           (tramp-compat-rx
+           (rx
             bol (+ nonl) ":"
             blank (group (+ nonl)) ":"
             blank (group (regexp (regexp-opt tramp-gio-events)))
@@ -1607,12 +1604,7 @@ If FILE-SYSTEM is non-nil, return file system 
attributes."
     (tramp-gvfs-set-attribute
      v (if (eq flag 'nofollow) "-nt" "-t") "uint64"
      (tramp-gvfs-url-file-name filename) "time::modified"
-     (format-time-string
-      "%s" (if (or (null time)
-                  (tramp-compat-time-equal-p time tramp-time-doesnt-exist)
-                  (tramp-compat-time-equal-p time tramp-time-dont-know))
-              nil
-            time)))))
+     (format-time-string "%s" (tramp-defined-time time)))))
 
 (defun tramp-gvfs-handle-get-home-directory (vec &optional _user)
   "The remote home directory for connection VEC as local file name.
@@ -1705,7 +1697,7 @@ ID-FORMAT valid values are `string' and `integer'."
 
 (defun tramp-gvfs-url-file-name (filename)
   "Return FILENAME in URL syntax."
-  (setq filename (tramp-compat-file-name-unquote filename))
+  (setq filename (file-name-unquote filename))
   (let* (;; "/" must NOT be hexified.
         (url-unreserved-chars (cons ?/ url-unreserved-chars))
         (result
@@ -1725,8 +1717,7 @@ ID-FORMAT valid values are `string' and `integer'."
   "Retrieve file name from D-Bus OBJECT-PATH."
   (dbus-unescape-from-identifier
    (replace-regexp-in-string
-    (tramp-compat-rx bol (* nonl) "/" (group (+ (not "/"))) eol) "\\1"
-    object-path)))
+    (rx bol (* nonl) "/" (group (+ (not "/"))) eol) "\\1" object-path)))
 
 (defun tramp-gvfs-url-host (url)
   "Return the host name part of URL, a string.
@@ -2002,7 +1993,7 @@ Their full names are \"org.gtk.vfs.MountTracker.mounted\" 
and
                (string-equal host (tramp-file-name-host vec))
                (string-equal port (tramp-file-name-port vec))
                (string-match-p
-                (tramp-compat-rx bol "/" (literal (or share "")))
+                (rx bol "/" (literal (or share "")))
                 (tramp-file-name-unquote-localname vec)))
           ;; Set mountpoint and location.
           (tramp-set-file-property vec "/" "fuse-mountpoint" fuse-mountpoint)
@@ -2047,8 +2038,7 @@ It was \"a(say)\", but has changed to \"a{sv})\"."
                   (tramp-media-device-port media) (tramp-file-name-port vec)))
         (localname (tramp-file-name-unquote-localname vec))
         (share (when (string-match
-                      (tramp-compat-rx bol (? "/") (group (+ (not "/"))))
-                      localname)
+                      (rx bol (? "/") (group (+ (not "/")))) localname)
                  (match-string 1 localname)))
         (ssl (if (string-match-p (rx bol (| "davs" "nextcloud")) method)
                  "true" "false"))
@@ -2091,8 +2081,7 @@ It was \"a(say)\", but has changed to \"a{sv})\"."
                 (list (tramp-gvfs-mount-spec-entry "port" port)))))
         (mount-pref
           (if (and (string-match-p (rx bol "dav") method)
-                   (string-match
-                   (tramp-compat-rx bol (? "/") (+ (not "/"))) localname))
+                   (string-match (rx bol (? "/") (+ (not "/"))) localname))
               (match-string 0 localname)
            (tramp-gvfs-get-remote-prefix vec))))
 
@@ -2492,12 +2481,8 @@ This uses \"avahi-browse\" in case D-Bus is not enabled 
in Avahi."
       result))))
 
 (when tramp-gvfs-enabled
-  (with-no-warnings ;; max-specpdl-size
   ;; Suppress D-Bus error messages and Tramp traces.
-  (let (;; Sometimes, it fails with "Variable binding depth exceeds
-       ;; max-specpdl-size".  Shall be fixed in Emacs 27.
-       (max-specpdl-size (* 2 max-specpdl-size))
-       (tramp-verbose 0)
+  (let ((tramp-verbose 0)
        tramp-gvfs-dbus-event-vector fun)
     ;; Add completion functions for services announced by DNS-SD.
     ;; See <http://www.dns-sd.org/ServiceTypes.html> for valid service types.
@@ -2550,7 +2535,7 @@ This uses \"avahi-browse\" in case D-Bus is not enabled 
in Avahi."
      "mtp"
      (mapcar
       (lambda (method) `(tramp-parse-media-names ,(format "_%s._tcp" method)))
-      tramp-media-methods)))))
+      tramp-media-methods))))
 
 (add-hook 'tramp-unload-hook
          (lambda ()
diff --git a/lisp/net/tramp-integration.el b/lisp/net/tramp-integration.el
index cff0877555e..c7877c9824d 100644
--- a/lisp/net/tramp-integration.el
+++ b/lisp/net/tramp-integration.el
@@ -133,8 +133,7 @@ been set up by `rfn-eshadow-setup-minibuffer'."
   ;; Use `path-separator' as it does eshell.
   (setq eshell-path-env
         (if (file-remote-p default-directory)
-            (mapconcat
-            #'identity (butlast (tramp-compat-exec-path)) path-separator)
+            (mapconcat #'identity (butlast (exec-path)) path-separator)
           (getenv "PATH"))))
 
 (with-eval-after-load 'esh-util
diff --git a/lisp/net/tramp-rclone.el b/lisp/net/tramp-rclone.el
index 2360abfb1dd..4018fa3aa29 100644
--- a/lisp/net/tramp-rclone.el
+++ b/lisp/net/tramp-rclone.el
@@ -337,7 +337,7 @@ file names."
 
 (defun tramp-rclone-remote-file-name (filename)
   "Return FILENAME as used in the `rclone' command."
-  (setq filename (tramp-compat-file-name-unquote (expand-file-name filename)))
+  (setq filename (file-name-unquote (expand-file-name filename)))
   (if (tramp-rclone-file-name-p filename)
       (with-parsed-tramp-file-name filename nil
        ;; As long as we call `tramp-rclone-maybe-open-connection' here,
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 1ba2a92e21c..fbdd40dd1d2 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -411,7 +411,7 @@ The string is used in `tramp-methods'.")
 
  (add-to-list 'tramp-default-method-alist
              `(,tramp-local-host-regexp
-               ,(tramp-compat-rx bos (literal tramp-root-id-string) eos) "su"))
+               ,(rx bos (literal tramp-root-id-string) eos) "su"))
 
  (add-to-list 'tramp-default-user-alist
              `(,(rx bos (| "su" "sudo" "doas" "ksu") eos)
@@ -1149,8 +1149,7 @@ component is used as the target of the symlink."
     ;; If TARGET is still remote, quote it.
     (if (tramp-tramp-file-p target)
        (make-symbolic-link
-        (tramp-compat-file-name-quote target 'top)
-        linkname ok-if-already-exists)
+        (file-name-quote target 'top) linkname ok-if-already-exists)
 
       (let ((ln (tramp-get-remote-ln v))
            (cwd (tramp-run-real-handler
@@ -1200,10 +1199,9 @@ component is used as the target of the symlink."
    (if (directory-name-p filename) #'file-name-as-directory #'identity)
    ;; Quote properly.
    (funcall
-    (if (tramp-compat-file-name-quoted-p filename)
-       #'tramp-compat-file-name-quote #'identity)
+    (if (file-name-quoted-p filename) #'file-name-quote #'identity)
     (with-parsed-tramp-file-name
-       (tramp-compat-file-name-unquote (expand-file-name filename)) nil
+       (file-name-unquote (expand-file-name filename)) nil
       (tramp-make-tramp-file-name
        v
        (with-tramp-file-property v localname "file-truename"
@@ -1243,7 +1241,7 @@ component is used as the target of the symlink."
           ;; If the resulting localname looks remote, we must quote it
           ;; for security reasons.
           (when (file-remote-p result)
-            (setq result (tramp-compat-file-name-quote result 'top)))
+            (setq result (file-name-quote result 'top)))
           (tramp-message v 4 "True name of `%s' is `%s'" localname result)
           result)))))))
 
@@ -1438,7 +1436,7 @@ component is used as the target of the symlink."
               (modtime (or (file-attribute-modification-time attr)
                            tramp-time-doesnt-exist)))
          (setq coding-system-used last-coding-system-used)
-         (if (not (tramp-compat-time-equal-p modtime tramp-time-dont-know))
+         (if (not (time-equal-p modtime tramp-time-dont-know))
              (tramp-run-real-handler #'set-visited-file-modtime (list modtime))
            (progn
              (tramp-send-command
@@ -1478,9 +1476,7 @@ of."
 
            (cond
             ;; File exists, and has a known modtime.
-            ((and attr
-                  (not
-                   (tramp-compat-time-equal-p modtime tramp-time-dont-know)))
+            ((and attr (not (time-equal-p modtime tramp-time-dont-know)))
              (< (abs (tramp-time-diff modtime mt)) 2))
             ;; Modtime has the don't know value.
             (attr
@@ -1497,7 +1493,7 @@ of."
                v localname "visited-file-modtime-ild" "")))
             ;; If file does not exist, say it is not modified if and
             ;; only if that agrees with the buffer's record.
-            (t (tramp-compat-time-equal-p mt tramp-time-doesnt-exist)))))))))
+            (t (time-equal-p mt tramp-time-doesnt-exist)))))))))
 
 (defun tramp-sh-handle-set-file-modes (filename mode &optional flag)
   "Like `set-file-modes' for Tramp files."
@@ -1519,21 +1515,17 @@ of."
   "Like `set-file-times' for Tramp files."
   (tramp-skeleton-set-file-modes-times-uid-gid filename
     (when (tramp-get-remote-touch v)
-      (let ((time
-            (if (or (null time)
-                    (tramp-compat-time-equal-p time tramp-time-doesnt-exist)
-                    (tramp-compat-time-equal-p time tramp-time-dont-know))
-                nil
-              time)))
-       (tramp-send-command-and-check
-        v (format
-           "env TZ=UTC0 %s %s %s %s"
-           (tramp-get-remote-touch v)
-           (if (tramp-get-connection-property v "touch-t")
-               (format "-t %s" (format-time-string "%Y%m%d%H%M.%S" time t))
-             "")
-           (if (eq flag 'nofollow) "-h" "")
-           (tramp-shell-quote-argument localname)))))))
+      (tramp-send-command-and-check
+       v (format
+         "env TZ=UTC0 %s %s %s %s"
+         (tramp-get-remote-touch v)
+         (if (tramp-get-connection-property v "touch-t")
+             (format
+              "-t %s"
+              (format-time-string "%Y%m%d%H%M.%S" (tramp-defined-time time) t))
+           "")
+         (if (eq flag 'nofollow) "-h" "")
+         (tramp-shell-quote-argument localname))))))
 
 (defun tramp-sh-handle-get-home-directory (vec &optional user)
   "The remote home directory for connection VEC as local file name.
@@ -1631,7 +1623,7 @@ ID-FORMAT valid values are `string' and `integer'."
   (with-parsed-tramp-file-name (expand-file-name filename) nil
     (with-tramp-file-property v localname "file-selinux-context"
       (let ((context '(nil nil nil nil))
-           (regexp (tramp-compat-rx
+           (regexp (rx
                     (group (+ (any "_" alnum))) ":"
                     (group (+ (any "_" alnum))) ":"
                     (group (+ (any "_" alnum))) ":"
@@ -2389,10 +2381,10 @@ The method used must be an out-of-band method."
                      #'identity)
                    (if v1
                        (tramp-make-copy-program-file-name v1)
-                     (tramp-compat-file-name-unquote filename)))
+                     (file-name-unquote filename)))
            target (if v2
                       (tramp-make-copy-program-file-name v2)
-                    (tramp-compat-file-name-unquote newname)))
+                    (file-name-unquote newname)))
 
       ;; Check for listener port.
       (when (tramp-get-method-parameter v 'tramp-remote-copy-args)
@@ -2436,7 +2428,7 @@ The method used must be an out-of-band method."
            ;; `tramp-ssh-controlmaster-options' is a string instead
            ;; of a list.  Unflatten it.
            copy-args
-           (tramp-compat-flatten-tree
+           (flatten-tree
             (mapcar
              (lambda (x) (if (tramp-compat-string-search " " x)
                               (split-string x) x))
@@ -2821,8 +2813,7 @@ the result will be a local, non-Tramp, file name."
   ;; there could be the false positive "/:".
   (if (or (and (eq system-type 'windows-nt)
               (string-match-p
-               (tramp-compat-rx bol (| (: alpha ":") (: (literal null-device) 
eol)))
-               name))
+               (rx bol (| (: alpha ":") (: (literal null-device) eol))) name))
          (and (not (tramp-tramp-file-p name))
               (not (tramp-tramp-file-p dir))))
       (tramp-run-real-handler #'expand-file-name (list name dir))
@@ -2841,9 +2832,7 @@ the result will be a local, non-Tramp, file name."
        ;; supposed to find such a shell on the remote host.  Please
        ;; tell me about it when this doesn't work on your system.
        (when (string-match
-              (tramp-compat-rx
-               bos "~" (group (* (not "/"))) (group (* nonl)) eos)
-              localname)
+              (rx bos "~" (group (* (not "/"))) (group (* nonl)) eos) 
localname)
          (let ((uname (match-string 1 localname))
                (fname (match-string 2 localname))
                hname)
@@ -3235,7 +3224,7 @@ implementation will be used."
       ;; Determine input.
       (if (null infile)
          (setq input (tramp-get-remote-null-device v))
-       (setq infile (tramp-compat-file-name-unquote (expand-file-name infile)))
+       (setq infile (file-name-unquote (expand-file-name infile)))
        (if (tramp-equal-remote default-directory infile)
            ;; INFILE is on the same remote host.
            (setq input (tramp-unquote-file-local-name infile))
@@ -3916,7 +3905,7 @@ Fall back to normal file name handler if no Tramp handler 
exists."
       (setq string (tramp-compat-string-replace "\n\n" "\n" string))
 
       (while (string-match
-             (tramp-compat-rx
+             (rx
               bol (+ (not ":")) ":" blank
               (group (+ (not ":"))) ":" blank
               (group (regexp (regexp-opt tramp-gio-events)))
@@ -4019,66 +4008,55 @@ commands.  \"%n\" is replaced by \"2>/dev/null\", and 
\"%t\" is
 replaced by a temporary file name.  If VEC is nil, the respective
 local commands are used.  If there is a format specifier which
 cannot be expanded, this function returns nil."
-  (if (not (string-match-p
-           (tramp-compat-rx (| bol (not "%")) "%" (any "ahlnoprsty")) script))
+  (if (not (string-match-p (rx (| bol (not "%")) "%" (any "ahlnoprsty")) 
script))
       script
     (catch 'wont-work
-      (let ((awk (when (string-match-p
-                       (tramp-compat-rx (| bol (not "%")) "%a") script)
+      (let ((awk (when (string-match-p (rx (| bol (not "%")) "%a") script)
                   (or
                    (if vec (tramp-get-remote-awk vec) (executable-find "awk"))
                    (throw 'wont-work nil))))
-           (hdmp (when (string-match-p
-                        (tramp-compat-rx (| bol (not "%")) "%h") script)
+           (hdmp (when (string-match-p (rx (| bol (not "%")) "%h") script)
                    (or
                     (if vec (tramp-get-remote-hexdump vec)
                       (executable-find "hexdump"))
                     (throw 'wont-work nil))))
-           (dev (when (string-match-p
-                       (tramp-compat-rx (| bol (not "%")) "%n") script)
+           (dev (when (string-match-p (rx (| bol (not "%")) "%n") script)
                   (or
                    (if vec (concat "2>" (tramp-get-remote-null-device vec))
                      (if (eq system-type 'windows-nt) ""
                        (concat "2>" null-device)))
                    (throw 'wont-work nil))))
-           (ls (when (string-match-p
-                      (tramp-compat-rx (| bol (not "%")) "%l") script)
+           (ls (when (string-match-p (rx (| bol (not "%")) "%l") script)
                  (format "%s %s"
                          (or (tramp-get-ls-command vec)
                              (throw 'wont-work nil))
                          (tramp-sh--quoting-style-options vec))))
-           (od (when (string-match-p
-                      (tramp-compat-rx (| bol (not "%")) "%o") script)
+           (od (when (string-match-p (rx (| bol (not "%")) "%o") script)
                  (or (if vec (tramp-get-remote-od vec) (executable-find "od"))
                      (throw 'wont-work nil))))
-           (perl (when (string-match-p
-                        (tramp-compat-rx (| bol (not "%")) "%p") script)
+           (perl (when (string-match-p (rx (| bol (not "%")) "%p") script)
                    (or
                     (if vec
                         (tramp-get-remote-perl vec) (executable-find "perl"))
                     (throw 'wont-work nil))))
-           (python (when (string-match-p
-                          (tramp-compat-rx (| bol (not "%")) "%y") script)
-                   (or
-                    (if vec
-                        (tramp-get-remote-python vec)
-                      (executable-find "python"))
-                    (throw 'wont-work nil))))
-           (readlink (when (string-match-p
-                            (tramp-compat-rx (| bol (not "%")) "%r") script)
+           (python (when (string-match-p (rx (| bol (not "%")) "%y") script)
+                     (or
+                      (if vec
+                          (tramp-get-remote-python vec)
+                        (executable-find "python"))
+                      (throw 'wont-work nil))))
+           (readlink (when (string-match-p (rx (| bol (not "%")) "%r") script)
                        (or
                         (if vec
-                        (tramp-get-remote-readlink vec)
-                      (executable-find "readlink"))
-                    (throw 'wont-work nil))))
-           (stat (when (string-match-p
-                        (tramp-compat-rx (| bol (not "%")) "%s") script)
+                            (tramp-get-remote-readlink vec)
+                          (executable-find "readlink"))
+                        (throw 'wont-work nil))))
+           (stat (when (string-match-p (rx (| bol (not "%")) "%s") script)
                    (or
                     (if vec
                         (tramp-get-remote-stat vec) (executable-find "stat"))
                     (throw 'wont-work nil))))
-           (tmp (when (string-match-p
-                       (tramp-compat-rx (| bol (not "%")) "%t") script)
+           (tmp (when (string-match-p (rx (| bol (not "%")) "%t") script)
                   (or
                    (if vec
                        (tramp-file-local-name (tramp-make-tramp-temp-name vec))
@@ -4339,8 +4317,7 @@ file exists and nonzero exit status otherwise."
      "Couldn't find remote shell prompt for %s" shell)
     (unless
        (tramp-check-for-regexp
-        (tramp-get-connection-process vec)
-        (tramp-compat-rx (literal tramp-end-of-output)))
+        (tramp-get-connection-process vec) (rx (literal tramp-end-of-output)))
       (tramp-wait-for-output (tramp-get-connection-process vec))
       (tramp-message vec 5 "Setting shell prompt")
       (tramp-send-command
@@ -4381,8 +4358,7 @@ file exists and nonzero exit status otherwise."
                (tramp-send-command
                 vec (format "echo ~%s" tramp-root-id-string) t)
                (if (or (string-match-p
-                        (tramp-compat-rx
-                         bol "~" (literal tramp-root-id-string) eol)
+                        (rx bol "~" (literal tramp-root-id-string) eol)
                         (buffer-string))
                        ;; The default shell (ksh93) of OpenSolaris
                        ;; and Solaris is buggy.  We've got reports
@@ -4421,7 +4397,7 @@ seconds.  If not, it produces an error message with the 
given ERROR-ARGS."
     (condition-case nil
        (tramp-wait-for-regexp
         proc timeout
-        (tramp-compat-rx
+        (rx
          (| (regexp shell-prompt-pattern) (regexp tramp-shell-prompt-pattern))
          eos))
       (error
@@ -4808,7 +4784,7 @@ Goes through the list `tramp-local-coding-commands' and
 
                  (with-current-buffer (tramp-get-connection-buffer vec)
                    (goto-char (point-min))
-                   (unless (looking-at-p (tramp-compat-rx (literal magic)))
+                   (unless (looking-at-p (rx (literal magic)))
                      (throw 'wont-work-remote nil)))
 
                  ;; `rem-enc' and `rem-dec' could be a string meanwhile.
@@ -4894,7 +4870,7 @@ Goes through the list `tramp-inline-compress-commands'."
                      nil t))
               (throw 'next nil))
            (goto-char (point-min))
-           (unless (looking-at-p (tramp-compat-rx (literal magic)))
+           (unless (looking-at-p (rx (literal magic)))
              (throw 'next nil)))
           (tramp-message
           vec 5
@@ -4905,7 +4881,7 @@ Goes through the list `tramp-inline-compress-commands'."
            (throw 'next nil))
          (with-current-buffer (tramp-get-buffer vec)
            (goto-char (point-min))
-           (unless (looking-at-p (tramp-compat-rx (literal magic)))
+           (unless (looking-at-p (rx (literal magic)))
              (throw 'next nil)))
          (setq found t)))
 
@@ -5250,7 +5226,7 @@ connection if a previous connection has died for some 
reason."
                          (tramp-get-method-parameter hop 'tramp-remote-shell))
                         (extra-args (tramp-get-sh-extra-args remote-shell))
                         (async-args
-                         (tramp-compat-flatten-tree
+                         (flatten-tree
                           (tramp-get-method-parameter hop 'tramp-async-args)))
                         (connection-timeout
                          (tramp-get-method-parameter
@@ -5394,7 +5370,7 @@ function waits for output unless NOOUTPUT is set."
           ;; Busyboxes built with the EDITING_ASK_TERMINAL config
           ;; option send also escape sequences, which must be
           ;; ignored.
-          (regexp (tramp-compat-rx
+          (regexp (rx
                    (* (not (any "#$\n")))
                    (literal tramp-end-of-output)
                    (? (regexp tramp-device-escape-sequence-regexp))
@@ -5402,7 +5378,7 @@ function waits for output unless NOOUTPUT is set."
           ;; Sometimes, the commands do not return a newline but a
           ;; null byte before the shell prompt, for example "git
           ;; ls-files -c -z ...".
-          (regexp1 (tramp-compat-rx (| bol "\000") (regexp regexp)))
+          (regexp1 (rx (| bol "\000") (regexp regexp)))
           (found (tramp-wait-for-regexp proc timeout regexp1)))
       (if found
          (let ((inhibit-read-only t))
@@ -5442,8 +5418,7 @@ the exit status."
   (let (cmd data)
     (if (and (stringp command)
             (string-match
-             (tramp-compat-rx
-              (* nonl) "<<'" (literal tramp-end-of-heredoc) "'" (* nonl))
+             (rx (* nonl) "<<'" (literal tramp-end-of-heredoc) "'" (* nonl))
              command))
        (setq cmd (match-string 0 command)
              data (substring command (match-end 0)))
@@ -5613,7 +5588,7 @@ Nonexistent directories are removed from spec."
                    (tramp-get-method-parameter vec 'tramp-remote-shell-args)
                    " ")
                   (tramp-shell-quote-argument tramp-end-of-heredoc))
-                 'noerror (tramp-compat-rx (literal tramp-end-of-heredoc)))
+                 'noerror (rx (literal tramp-end-of-heredoc)))
                 (progn
                   (tramp-message
                    vec 2 "Could not retrieve `tramp-own-remote-path'")
@@ -5663,8 +5638,7 @@ Nonexistent directories are removed from spec."
        (while candidates
          (goto-char (point-min))
          (if (string-match-p
-              (tramp-compat-rx bol (literal (car candidates)) (? "\r") eol)
-              (buffer-string))
+              (rx bol (literal (car candidates)) (? "\r") eol) (buffer-string))
              (setq locale (car candidates)
                    candidates nil)
            (setq candidates (cdr candidates)))))
@@ -5742,7 +5716,7 @@ Nonexistent directories are removed from spec."
        vec (format "( %s / -nt / )" (tramp-get-test-command vec)))
        (with-current-buffer (tramp-get-buffer vec)
         (goto-char (point-min))
-        (when (looking-at-p (tramp-compat-rx (literal tramp-end-of-output)))
+        (when (looking-at-p (rx (literal tramp-end-of-output)))
           (format "%s %%s -nt %%s" (tramp-get-test-command vec)))))
      (progn
        (tramp-send-command
@@ -5825,14 +5799,6 @@ Nonexistent directories are removed from spec."
                  vec (format "%s --canonicalize-missing /" result)))
        result))))
 
-(defun tramp-get-remote-trash (vec)
-  "Determine remote `trash' command.
-This command is returned only if `delete-by-moving-to-trash' is non-nil."
-  (and delete-by-moving-to-trash
-       (with-tramp-connection-property vec "trash"
-        (tramp-message vec 5 "Finding a suitable `trash' command")
-        (tramp-find-executable vec "trash" (tramp-get-remote-path vec)))))
-
 (defun tramp-get-remote-touch (vec)
   "Determine remote `touch' command."
   (with-tramp-connection-property vec "touch"
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el
index dc374fd01b5..f31865d498d 100644
--- a/lisp/net/tramp-smb.el
+++ b/lisp/net/tramp-smb.el
@@ -53,7 +53,7 @@
 ;;;###tramp-autoload
 (tramp--with-startup
  (add-to-list 'tramp-default-user-alist
-             `(,(tramp-compat-rx bos (literal tramp-smb-method) eos) nil nil))
+             `(,(rx bos (literal tramp-smb-method) eos) nil nil))
 
  ;; Add completion function for SMB method.
  (tramp-set-completion-function
@@ -92,9 +92,9 @@ this variable \"client min protocol=NT1\"."
   "Version string of the SMB client.")
 
 (defconst tramp-smb-server-version
-  (tramp-compat-rx "Domain=[" (* (not "]")) "] "
-                  "OS=[" (* (not "]")) "] "
-                  "Server=[" (* (not "]")) "]")
+  (rx "Domain=[" (* (not "]")) "] "
+      "OS=[" (* (not "]")) "] "
+      "Server=[" (* (not "]")) "]")
   "Regexp of SMB server identification.")
 
 (defconst tramp-smb-prompt
@@ -730,8 +730,7 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are 
completely ignored."
     (with-parsed-tramp-file-name name nil
       ;; Tilde expansion if necessary.
       (when (string-match
-            (tramp-compat-rx bos "~" (group (* (not "/"))) (group (* nonl)) 
eos)
-            localname)
+            (rx bos "~" (group (* (not "/"))) (group (* nonl)) eos) localname)
        (let ((uname (match-string 1 localname))
              (fname (match-string 2 localname))
              hname)
@@ -1083,8 +1082,7 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are 
completely ignored."
                     ;; Check for matching entries.
                     (mapcar
                      (lambda (x)
-                       (when (string-match-p
-                              (tramp-compat-rx bol (literal base)) (nth 0 x))
+                       (when (string-match-p (rx bol (literal base)) (nth 0 x))
                          x))
                      entries)
                   ;; We just need the only and only entry FILENAME.
@@ -1181,26 +1179,6 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are 
completely ignored."
     (unless (file-directory-p dir)
       (tramp-error v 'file-error "Couldn't make directory %s" dir))))
 
-;; This is not used anymore.
-(defun tramp-smb-handle-make-directory-internal (directory)
-  "Like `make-directory-internal' for Tramp files."
-  (declare (obsolete nil "29.1"))
-  (setq directory (directory-file-name (expand-file-name directory)))
-  (unless (file-name-absolute-p directory)
-    (setq directory (expand-file-name directory default-directory)))
-  (with-parsed-tramp-file-name directory nil
-    (when (file-directory-p (file-name-directory directory))
-      (tramp-smb-send-command
-       v (if (tramp-smb-get-cifs-capabilities v)
-            (format "posix_mkdir %s %o"
-                    (tramp-smb-shell-quote-localname v) (default-file-modes))
-          (format "mkdir %s" (tramp-smb-shell-quote-localname v))))
-      ;; We must also flush the cache of the directory, because
-      ;; `file-attributes' reads the values from there.
-      (tramp-flush-file-properties v localname))
-    (unless (file-directory-p directory)
-      (tramp-error v 'file-error "Couldn't make directory %s" directory))))
-
 (defun tramp-smb-handle-make-symbolic-link
   (target linkname &optional ok-if-already-exists)
   "Like `make-symbolic-link' for Tramp files.
@@ -1218,8 +1196,7 @@ component is used as the target of the symlink."
     ;; If TARGET is still remote, quote it.
     (if (tramp-tramp-file-p target)
        (make-symbolic-link
-        (tramp-compat-file-name-quote target 'top)
-        linkname ok-if-already-exists)
+        (file-name-quote target 'top) linkname ok-if-already-exists)
 
       ;; Do the 'confirm if exists' thing.
       (when (file-exists-p linkname)
@@ -1264,7 +1241,7 @@ component is used as the target of the symlink."
 
       ;; Determine input.
       (when infile
-       (setq infile (tramp-compat-file-name-unquote (expand-file-name infile)))
+       (setq infile (file-name-unquote (expand-file-name infile)))
        (if (tramp-equal-remote default-directory infile)
            ;; INFILE is on the same remote host.
            (setq input (tramp-unquote-file-local-name infile))
@@ -1572,7 +1549,7 @@ component is used as the target of the symlink."
 \"//\" substitutes only in the local filename part.  Catches
 errors for shares like \"C$/\", which are common in Microsoft Windows."
   ;; Check, whether the local part is a quoted file name.
-  (if (tramp-compat-file-name-quoted-p filename)
+  (if (file-name-quoted-p filename)
       filename
     (with-parsed-tramp-file-name filename nil
       ;; Ignore in LOCALNAME everything before "//".
@@ -1623,8 +1600,7 @@ VEC or USER, or if there is no home directory, return 
nil."
   "Return the share name of LOCALNAME."
   (save-match-data
     (let ((localname (tramp-file-name-unquote-localname vec)))
-      (when (string-match
-            (tramp-compat-rx bol (? "/") (group (+ (not "/"))) "/") localname)
+      (when (string-match (rx bol (? "/") (group (+ (not "/"))) "/") localname)
        (match-string 1 localname)))))
 
 (defun tramp-smb-get-localname (vec)
@@ -1635,8 +1611,7 @@ If VEC has no cifs capabilities, exchange \"/\" by 
\"\\\\\"."
       (setq
        localname
        (if (string-match
-           (tramp-compat-rx bol (? "/") (+ (not "/")) (group "/" (* nonl)))
-           localname)
+           (rx bol (? "/") (+ (not "/")) (group "/" (* nonl))) localname)
           ;; There is a share, separated by "/".
           (if (not (tramp-smb-get-cifs-capabilities vec))
               (mapconcat
@@ -1644,8 +1619,7 @@ If VEC has no cifs capabilities, exchange \"/\" by 
\"\\\\\"."
                (match-string 1 localname) "")
             (match-string 1 localname))
         ;; There is just a share.
-        (if (string-match
-             (tramp-compat-rx bol (? "/") (group (+ (not "/"))) eol) localname)
+        (if (string-match (rx bol (? "/") (group (+ (not "/"))) eol) localname)
             (match-string 1 localname)
           "")))
 
@@ -1773,8 +1747,7 @@ are listed.  Result is the list (LOCALNAME MODE SIZE 
MTIME)."
     (if (not share)
 
        ;; Read share entries.
-       (when (string-match
-              (tramp-compat-rx bol "Disk|" (group (+ (not "|"))) "|") line)
+       (when (string-match (rx bol "Disk|" (group (+ (not "|"))) "|") line)
          (setq localname (match-string 1 line)
                mode "dr-xr-xr-x"
                size 0))
diff --git a/lisp/net/tramp-sshfs.el b/lisp/net/tramp-sshfs.el
index 2d3c436632f..27b2854e451 100644
--- a/lisp/net/tramp-sshfs.el
+++ b/lisp/net/tramp-sshfs.el
@@ -228,8 +228,7 @@ arguments to pass to the OPERATION."
 
 (defun tramp-sshfs-handle-file-system-info (filename)
   "Like `file-system-info' for Tramp files."
-  ;;`file-system-info' exists since Emacs 27.1.
-  (tramp-compat-funcall 'file-system-info (tramp-fuse-local-file-name 
filename)))
+  (file-system-info (tramp-fuse-local-file-name filename)))
 
 (defun tramp-sshfs-handle-file-writable-p (filename)
   "Like `file-writable-p' for Tramp files."
@@ -266,7 +265,7 @@ arguments to pass to the OPERATION."
       ;; Determine input.
       (if (null infile)
          (setq input (tramp-get-remote-null-device v))
-       (setq infile (tramp-compat-file-name-unquote (expand-file-name infile)))
+       (setq infile (file-name-unquote (expand-file-name infile)))
        (if (tramp-equal-remote default-directory infile)
            ;; INFILE is on the same remote host.
            (setq input (tramp-unquote-file-local-name infile))
diff --git a/lisp/net/tramp-sudoedit.el b/lisp/net/tramp-sudoedit.el
index 63946c2da30..c4e1d32f525 100644
--- a/lisp/net/tramp-sudoedit.el
+++ b/lisp/net/tramp-sudoedit.el
@@ -49,7 +49,7 @@
                (tramp-password-previous-hop t)))
 
  (add-to-list 'tramp-default-user-alist
-             `(,(tramp-compat-rx bos (literal tramp-sudoedit-method) eos)
+             `(,(rx bos (literal tramp-sudoedit-method) eos)
                nil ,tramp-root-id-string))
 
  (tramp-set-completion-function
@@ -212,8 +212,8 @@ arguments to pass to the OPERATION."
        (unless
            (tramp-sudoedit-send-command
             v1 "ln"
-            (tramp-compat-file-name-unquote v1-localname)
-            (tramp-compat-file-name-unquote v2-localname))
+            (file-name-unquote v1-localname)
+            (file-name-unquote v2-localname))
          (tramp-error
           v1 'file-error
           "error with add-name-to-file, see buffer `%s' for details"
@@ -342,7 +342,7 @@ absolute file names."
   (tramp-skeleton-delete-directory directory recursive trash
     (unless (tramp-sudoedit-send-command
             v (if recursive '("rm" "-rf") "rmdir")
-            (tramp-compat-file-name-unquote localname))
+            (file-name-unquote localname))
       (tramp-error v 'file-error "Couldn't delete %s" directory))))
 
 (defun tramp-sudoedit-handle-delete-file (filename &optional trash)
@@ -352,7 +352,7 @@ absolute file names."
     (if (and delete-by-moving-to-trash trash)
        (move-file-to-trash filename)
       (unless (tramp-sudoedit-send-command
-              v "rm" "-f" (tramp-compat-file-name-unquote localname))
+              v "rm" "-f" (file-name-unquote localname))
        ;; Propagate the error.
        (with-current-buffer (tramp-get-connection-buffer v)
          (goto-char (point-min))
@@ -382,8 +382,7 @@ the result will be a local, non-Tramp, file name."
       (unless (file-name-absolute-p localname)
        (setq localname (format "~%s/%s" user localname)))
       (when (string-match
-            (tramp-compat-rx bos "~" (group (* (not "/"))) (group (* nonl)) 
eos)
-            localname)
+            (rx bos "~" (group (* (not "/"))) (group (* nonl)) eos) localname)
        (let ((uname (match-string 1 localname))
              (fname (match-string 2 localname))
              hname)
@@ -413,7 +412,7 @@ the result will be a local, non-Tramp, file name."
       (let ((result (and (tramp-sudoedit-remote-acl-p v)
                         (tramp-sudoedit-send-command-string
                          v "getfacl" "-acp"
-                         (tramp-compat-file-name-unquote localname)))))
+                         (file-name-unquote localname)))))
        ;; The acl string must have a trailing \n, which is not
        ;; provided by `tramp-sudoedit-send-command-string'.  Add it.
        (and (stringp result) (concat result "\n"))))))
@@ -440,8 +439,7 @@ the result will be a local, non-Tramp, file name."
     (tramp-convert-file-attributes v localname id-format
       (tramp-sudoedit-send-command-and-read
        v "env" "QUOTING_STYLE=locale" "stat" "-c"
-       tramp-sudoedit-file-attributes
-       (tramp-compat-file-name-unquote localname)))))
+       tramp-sudoedit-file-attributes (file-name-unquote localname)))))
 
 (defun tramp-sudoedit-handle-file-executable-p (filename)
   "Like `file-executable-p' for Tramp files."
@@ -453,7 +451,7 @@ the result will be a local, non-Tramp, file name."
          (or (tramp-check-cached-permissions v ?x)
              (tramp-check-cached-permissions v ?s))
        (tramp-sudoedit-send-command
-        v "test" "-x" (tramp-compat-file-name-unquote localname))))))
+        v "test" "-x" (file-name-unquote localname))))))
 
 (defun tramp-sudoedit-handle-file-exists-p (filename)
   "Like `file-exists-p' for Tramp files."
@@ -466,7 +464,7 @@ the result will be a local, non-Tramp, file name."
        (if (tramp-file-property-p v localname "file-attributes")
            (not (null (tramp-get-file-property v localname "file-attributes")))
          (tramp-sudoedit-send-command
-          v "test" "-e" (tramp-compat-file-name-unquote localname)))))))
+          v "test" "-e" (file-name-unquote localname)))))))
 
 (defun tramp-sudoedit-handle-file-name-all-completions (filename directory)
   "Like `file-name-all-completions' for Tramp files."
@@ -477,7 +475,7 @@ the result will be a local, non-Tramp, file name."
        (tramp-sudoedit-send-command
        v "ls" "-a1" "--quoting-style=literal" "--show-control-chars"
        (if (zerop (length localname))
-           "" (tramp-compat-file-name-unquote localname)))
+           "" (file-name-unquote localname)))
        (mapcar
        (lambda (f)
          (if (file-directory-p (expand-file-name f directory))
@@ -500,7 +498,7 @@ the result will be a local, non-Tramp, file name."
       (if (tramp-file-property-p v localname "file-attributes")
          (tramp-handle-file-readable-p filename)
        (tramp-sudoedit-send-command
-        v "test" "-r" (tramp-compat-file-name-unquote localname))))))
+        v "test" "-r" (file-name-unquote localname))))))
 
 (defun tramp-sudoedit-handle-set-file-modes (filename mode &optional flag)
   "Like `set-file-modes' for Tramp files."
@@ -508,8 +506,7 @@ the result will be a local, non-Tramp, file name."
   (unless (and (eq flag 'nofollow) (file-symlink-p filename))
     (tramp-skeleton-set-file-modes-times-uid-gid filename
       (unless (tramp-sudoedit-send-command
-              v "chmod" (format "%o" mode)
-              (tramp-compat-file-name-unquote localname))
+              v "chmod" (format "%o" mode) (file-name-unquote localname))
        (tramp-error
         v 'file-error "Error while changing file's mode %s" filename)))))
 
@@ -523,15 +520,14 @@ the result will be a local, non-Tramp, file name."
   (with-parsed-tramp-file-name (expand-file-name filename) nil
     (with-tramp-file-property v localname "file-selinux-context"
       (let ((context '(nil nil nil nil))
-           (regexp (tramp-compat-rx
+           (regexp (rx
                     (group (+ (any "_" alnum))) ":"
                     (group (+ (any "_" alnum))) ":"
                     (group (+ (any "_" alnum))) ":"
                     (group (+ (any "_" alnum))))))
        (when (and (tramp-sudoedit-remote-selinux-p v)
                   (tramp-sudoedit-send-command
-                   v "ls" "-d" "-Z"
-                   (tramp-compat-file-name-unquote localname)))
+                   v "ls" "-d" "-Z" (file-name-unquote localname)))
          (with-current-buffer (tramp-get-connection-buffer v)
            (goto-char (point-min))
            (when (re-search-forward regexp (line-end-position) t)
@@ -547,7 +543,7 @@ the result will be a local, non-Tramp, file name."
       (tramp-message v 5 "file system info: %s" localname)
       (when (tramp-sudoedit-send-command
             v "df" "--block-size=1" "--output=size,used,avail"
-            (tramp-compat-file-name-unquote localname))
+            (file-name-unquote localname))
        (with-current-buffer (tramp-get-connection-buffer v)
          (goto-char (point-min))
          (forward-line)
@@ -565,17 +561,11 @@ the result will be a local, non-Tramp, file name."
 (defun tramp-sudoedit-handle-set-file-times (filename &optional time flag)
   "Like `set-file-times' for Tramp files."
   (tramp-skeleton-set-file-modes-times-uid-gid filename
-    (let ((time
-          (if (or (null time)
-                  (tramp-compat-time-equal-p time tramp-time-doesnt-exist)
-                  (tramp-compat-time-equal-p time tramp-time-dont-know))
-              nil
-            time)))
-      (tramp-sudoedit-send-command
-       v "env" "TZ=UTC0" "touch" "-t"
-       (format-time-string "%Y%m%d%H%M.%S" time t)
-       (if (eq flag 'nofollow) "-h" "")
-       (tramp-compat-file-name-unquote localname)))))
+    (tramp-sudoedit-send-command
+     v "env" "TZ=UTC0" "touch" "-t"
+     (format-time-string "%Y%m%d%H%M.%S" (tramp-defined-time time) t)
+     (if (eq flag 'nofollow) "-h" "")
+     (file-name-unquote localname))))
 
 (defun tramp-sudoedit-handle-file-truename (filename)
   "Like `file-truename' for Tramp files."
@@ -584,10 +574,9 @@ the result will be a local, non-Tramp, file name."
    (if (directory-name-p filename) #'file-name-as-directory #'identity)
    ;; Quote properly.
    (funcall
-    (if (tramp-compat-file-name-quoted-p filename)
-       #'tramp-compat-file-name-quote #'identity)
+    (if (file-name-quoted-p filename) #'file-name-quote #'identity)
     (with-parsed-tramp-file-name
-       (tramp-compat-file-name-unquote (expand-file-name filename)) nil
+       (file-name-unquote (expand-file-name filename)) nil
       (tramp-make-tramp-file-name
        v
        (with-tramp-file-property v localname "file-truename"
@@ -604,7 +593,7 @@ the result will be a local, non-Tramp, file name."
           ;; If the resulting localname looks remote, we must quote it
           ;; for security reasons.
           (when (file-remote-p result)
-            (setq result (tramp-compat-file-name-quote result 'top)))
+            (setq result (file-name-quote result 'top)))
           (tramp-message v 4 "True name of `%s' is `%s'" localname result)
           result)))))))
 
@@ -618,7 +607,7 @@ the result will be a local, non-Tramp, file name."
              ;; be satisfied without remote operation.
              (tramp-check-cached-permissions v ?w)
            (tramp-sudoedit-send-command
-            v "test" "-w" (tramp-compat-file-name-unquote localname)))
+            v "test" "-w" (file-name-unquote localname)))
        ;; If file doesn't exist, check if directory is writable.
        (and
         (file-directory-p (file-name-directory filename))
@@ -629,7 +618,7 @@ the result will be a local, non-Tramp, file name."
   (tramp-skeleton-make-directory dir parents
     (unless (tramp-sudoedit-send-command
             v "mkdir" "-m" (format "%#o" (default-file-modes))
-            (tramp-compat-file-name-unquote localname))
+            (file-name-unquote localname))
       (tramp-error v 'file-error "Couldn't make directory %s" dir))))
 
 (defun tramp-sudoedit-handle-make-symbolic-link
@@ -649,8 +638,7 @@ component is used as the target of the symlink."
     ;; If TARGET is still remote, quote it.
     (if (tramp-tramp-file-p target)
        (make-symbolic-link
-        (tramp-compat-file-name-quote target 'top)
-        linkname ok-if-already-exists)
+        (file-name-quote target 'top) linkname ok-if-already-exists)
 
       ;; Do the 'confirm if exists' thing.
       (when (file-exists-p linkname)
@@ -668,8 +656,8 @@ component is used as the target of the symlink."
       (tramp-flush-file-properties v localname)
       (tramp-sudoedit-send-command
        v "ln" "-sf"
-       (tramp-compat-file-name-unquote target)
-       (tramp-compat-file-name-unquote localname)))))
+       (file-name-unquote target)
+       (file-name-unquote localname)))))
 
 (defun tramp-sudoedit-handle-rename-file
   (filename newname &optional ok-if-already-exists)
@@ -693,8 +681,7 @@ component is used as the target of the symlink."
       (setq acl-string (string-join (split-string acl-string "\n" 'omit) ","))
       (prog1
          (tramp-sudoedit-send-command
-          v "setfacl" "-m"
-          acl-string (tramp-compat-file-name-unquote localname))
+          v "setfacl" "-m" acl-string (file-name-unquote localname))
        (tramp-flush-file-property v localname "file-acl")))))
 
 (defun tramp-sudoedit-handle-set-file-selinux-context (filename context)
@@ -712,7 +699,7 @@ component is used as the target of the symlink."
               (when role (format "--role=%s" role))
               (when type (format "--type=%s" type))
               (when range (format "--range=%s" range))
-              (tramp-compat-file-name-unquote localname))
+              (file-name-unquote localname))
          (if (and user role type range)
              (tramp-set-file-property
               v localname "file-selinux-context" context)
@@ -820,7 +807,7 @@ in case of error, t otherwise."
                       vec 'tramp-sudo-login
                       ?h (or (tramp-file-name-host vec) "")
                       ?u (or (tramp-file-name-user vec) ""))
-                     (tramp-compat-flatten-tree args))))
+                     (flatten-tree args))))
           ;; We suppress the messages `Waiting for prompts from remote shell'.
           (tramp-verbose (if (= tramp-verbose 3) 2 tramp-verbose))
           ;; The password shall be cached also in case of "emacs -Q".
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index e08d98b2b36..4bf0fdefc0b 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -443,9 +443,7 @@ See `tramp-methods' for a list of possibilities for METHOD."
 (defcustom tramp-default-user nil
   "Default user to use for transferring files.
 It is nil by default; otherwise settings in configuration files like
-\"~/.ssh/config\" would be overwritten.  Also see `tramp-default-user-alist'.
-
-This variable is regarded as obsolete, and will be removed soon."
+\"~/.ssh/config\" would be overwritten.  Also see `tramp-default-user-alist'."
   :type '(choice (const nil) string))
 
 ;;;###tramp-autoload
@@ -525,7 +523,7 @@ interpreted as a regular expression which always matches."
 (defcustom tramp-restricted-shell-hosts-alist
   (when (and (eq system-type 'windows-nt)
              (not (string-match-p (rx "sh" eol) tramp-encoding-shell)))
-    (list (tramp-compat-rx
+    (list (rx
           bos (| (literal (downcase tramp-system-name))
                  (literal (upcase tramp-system-name)))
           eos)))
@@ -539,7 +537,7 @@ host runs a restricted shell, it shall be added to this 
list, too."
 
 ;;;###tramp-autoload
 (defcustom tramp-local-host-regexp
-  (tramp-compat-rx
+  (rx
    bos
    (| (literal tramp-system-name)
       (| "localhost" "localhost4" "localhost6" "127.0.0.1" "::1"))
@@ -640,7 +638,7 @@ This regexp must match both `tramp-initial-end-of-output' 
and
   :type 'regexp)
 
 (defcustom tramp-password-prompt-regexp
-  (tramp-compat-rx
+  (rx
    bol (* nonl)
    (group (regexp (regexp-opt password-word-equivalents)))
    (* nonl) ":" (? "\^@") (* blank))
@@ -899,18 +897,17 @@ Used in `tramp-make-tramp-file-name'.")
 
 (defun tramp-build-prefix-regexp ()
   "Return `tramp-prefix-regexp'."
-  (tramp-compat-rx bol (literal (tramp-build-prefix-format))))
+  (rx bol (literal (tramp-build-prefix-format))))
 
 (defvar tramp-prefix-regexp nil ; Initialized when defining `tramp-syntax'!
   "Regexp matching the very beginning of Tramp file names.
 Should always start with \"^\".  Derived from `tramp-prefix-format'.")
 
 (defconst tramp-method-regexp-alist
-  `((default . ,(tramp-compat-rx
-                (| (literal tramp-default-method-marker) (>= 2 alnum))))
+  `((default . ,(rx (| (literal tramp-default-method-marker) (>= 2 alnum))))
     (simplified . "")
-    (separate . ,(tramp-compat-rx
-                 (? (| (literal tramp-default-method-marker) (>= 2 alnum))))))
+    (separate
+     . ,(rx (? (| (literal tramp-default-method-marker) (>= 2 alnum))))))
   "Alist mapping Tramp syntax to regexps matching methods identifiers.")
 
 (defun tramp-build-method-regexp ()
@@ -938,7 +935,7 @@ Used in `tramp-make-tramp-file-name'.")
 
 (defun tramp-build-postfix-method-regexp ()
   "Return `tramp-postfix-method-regexp'."
-  (tramp-compat-rx (literal (tramp-build-postfix-method-format))))
+  (rx (literal (tramp-build-postfix-method-format))))
 
 (defvar tramp-postfix-method-regexp nil ; Init'd when defining `tramp-syntax'!
   "Regexp matching delimiter between method and user or host names.
@@ -950,8 +947,7 @@ Derived from `tramp-postfix-method-format'.")
 (defconst tramp-prefix-domain-format "%"
   "String matching delimiter between user and domain names.")
 
-(defconst tramp-prefix-domain-regexp
-  (tramp-compat-rx (literal tramp-prefix-domain-format))
+(defconst tramp-prefix-domain-regexp (rx (literal tramp-prefix-domain-format))
   "Regexp matching delimiter between user and domain names.
 Derived from `tramp-prefix-domain-format'.")
 
@@ -959,7 +955,7 @@ Derived from `tramp-prefix-domain-format'.")
   "Regexp matching domain names.")
 
 (defconst tramp-user-with-domain-regexp
-  (tramp-compat-rx
+  (rx
    (group (regexp tramp-user-regexp))
    (regexp tramp-prefix-domain-regexp)
    (group (regexp tramp-domain-regexp)))
@@ -969,8 +965,7 @@ Derived from `tramp-prefix-domain-format'.")
   "String matching delimiter between user and host names.
 Used in `tramp-make-tramp-file-name'.")
 
-(defconst tramp-postfix-user-regexp
-  (tramp-compat-rx (literal tramp-postfix-user-format))
+(defconst tramp-postfix-user-regexp (rx (literal tramp-postfix-user-format))
   "Regexp matching delimiter between user and host names.
 Derived from `tramp-postfix-user-format'.")
 
@@ -993,7 +988,7 @@ Used in `tramp-make-tramp-file-name'.")
 
 (defun tramp-build-prefix-ipv6-regexp ()
   "Return `tramp-prefix-ipv6-regexp'."
-  (tramp-compat-rx (literal tramp-prefix-ipv6-format)))
+  (rx (literal tramp-prefix-ipv6-format)))
 
 (defvar tramp-prefix-ipv6-regexp nil ; Initialized when defining 
`tramp-syntax'!
   "Regexp matching left hand side of IPv6 addresses.
@@ -1021,7 +1016,7 @@ Used in `tramp-make-tramp-file-name'.")
 
 (defun tramp-build-postfix-ipv6-regexp ()
   "Return `tramp-postfix-ipv6-regexp'."
-  (tramp-compat-rx (literal tramp-postfix-ipv6-format)))
+  (rx (literal tramp-postfix-ipv6-format)))
 
 (defvar tramp-postfix-ipv6-regexp nil ; Initialized when defining 
`tramp-syntax'!
   "Regexp matching right hand side of IPv6 addresses.
@@ -1030,8 +1025,7 @@ Derived from `tramp-postfix-ipv6-format'.")
 (defconst tramp-prefix-port-format "#"
   "String matching delimiter between host names and port numbers.")
 
-(defconst tramp-prefix-port-regexp
-  (tramp-compat-rx (literal tramp-prefix-port-format))
+(defconst tramp-prefix-port-regexp (rx (literal tramp-prefix-port-format))
   "Regexp matching delimiter between host names and port numbers.
 Derived from `tramp-prefix-port-format'.")
 
@@ -1039,7 +1033,7 @@ Derived from `tramp-prefix-port-format'.")
   "Regexp matching port numbers.")
 
 (defconst tramp-host-with-port-regexp
-  (tramp-compat-rx
+  (rx
    (group (regexp tramp-host-regexp))
    (regexp tramp-prefix-port-regexp)
    (group (regexp tramp-port-regexp)))
@@ -1048,8 +1042,7 @@ Derived from `tramp-prefix-port-format'.")
 (defconst tramp-postfix-hop-format "|"
   "String matching delimiter after ad-hoc hop definitions.")
 
-(defconst tramp-postfix-hop-regexp
-  (tramp-compat-rx (literal tramp-postfix-hop-format))
+(defconst tramp-postfix-hop-regexp (rx (literal tramp-postfix-hop-format))
   "Regexp matching delimiter after ad-hoc hop definitions.
 Derived from `tramp-postfix-hop-format'.")
 
@@ -1069,7 +1062,7 @@ Used in `tramp-make-tramp-file-name'.")
 
 (defun tramp-build-postfix-host-regexp ()
   "Return `tramp-postfix-host-regexp'."
-  (tramp-compat-rx (literal tramp-postfix-host-format)))
+  (rx (literal tramp-postfix-host-format)))
 
 (defvar tramp-postfix-host-regexp nil ; Initialized when defining 
`tramp-syntax'!
   "Regexp matching delimiter between host names and localnames.
@@ -1096,7 +1089,7 @@ Derived from `tramp-postfix-host-format'.")
 (defun tramp-build-remote-file-name-spec-regexp ()
   "Construct a regexp matching a Tramp file name for a Tramp syntax.
 It is expected, that `tramp-syntax' has the proper value."
-  (tramp-compat-rx
+  (rx
    ;; Method.
    (group (regexp tramp-method-regexp)) (regexp tramp-postfix-method-regexp)
    ;; Optional user.  This includes domain.
@@ -1118,7 +1111,7 @@ It is expected, that `tramp-syntax' has the proper value."
 It is expected, that `tramp-syntax' has the proper value.
 See `tramp-file-name-structure'."
   (list
-   (tramp-compat-rx
+   (rx
     (regexp tramp-prefix-regexp)
     (? (group (+ (regexp tramp-remote-file-name-spec-regexp)
                 (regexp tramp-postfix-hop-regexp))))
@@ -1178,11 +1171,9 @@ initial value is overwritten by the car of 
`tramp-file-name-structure'.")
 ;; `tramp-method-regexp' needs at least two characters, in order to
 ;; distinguish from volume letter.  This is in the way when completing.
 (defconst tramp-completion-method-regexp-alist
-  `((default    . ,(tramp-compat-rx
-                   (| (literal tramp-default-method-marker) (+ alnum))))
+  `((default . ,(rx (| (literal tramp-default-method-marker) (+ alnum))))
     (simplified . "")
-    (separate   . ,(tramp-compat-rx
-                   (| (literal tramp-default-method-marker) (* alnum)))))
+    (separate . ,(rx (| (literal tramp-default-method-marker) (* alnum)))))
   "Alist mapping Tramp syntax to regexps matching completion methods.")
 
 (defun tramp-build-completion-method-regexp ()
@@ -1198,8 +1189,8 @@ The `ftp' syntax does not support methods.")
   "Return `tramp-completion-file-name-regexp' according to `tramp-syntax'."
   (if (eq tramp-syntax 'separate)
       ;; FIXME: This shouldn't be necessary.
-      (tramp-compat-rx bos "/" (? "[" (* (not "]"))) eos)
-    (tramp-compat-rx
+      (rx bos "/" (? "[" (* (not "]"))) eos)
+    (rx
      bos
      ;; `file-name-completion' uses absolute paths for matching.
      ;; This means that on W32 systems, something like
@@ -1402,20 +1393,6 @@ based on the Tramp and Emacs versions, and should not be 
set here."
   :version "26.1"
   :type '(repeat string))
 
-(defcustom tramp-completion-reread-directory-timeout 10
-  "Defines seconds since last remote command before rereading a directory.
-A remote directory might have changed its contents.  In order to
-make it visible during file name completion in the minibuffer,
-Tramp flushes its cache and rereads the directory contents when
-more than `tramp-completion-reread-directory-timeout' seconds
-have been gone since last remote command execution.  A value of t
-would require an immediate reread during filename completion, nil
-means to use always cached values for the directory contents."
-  :type '(choice (const nil) (const t) integer))
-(make-obsolete-variable
- 'tramp-completion-reread-directory-timeout
- 'remote-file-name-inhibit-cache "27.2")
-
 ;;; Internal Variables:
 
 (defvar tramp-current-connection nil
@@ -1525,8 +1502,7 @@ same connection.  Make a copy in order to avoid side 
effects."
       (setq vec (copy-tramp-file-name vec))
       (setf (tramp-file-name-localname vec)
            (and (stringp localname)
-                (tramp-compat-file-name-unquote
-                 (directory-file-name localname)))
+                (file-name-unquote (directory-file-name localname)))
            (tramp-file-name-hop vec) nil))
     vec))
 
@@ -1559,7 +1535,7 @@ entry does not exist, return nil."
 ;; The localname can be quoted with "/:".  Extract this.
 (defun tramp-file-name-unquote-localname (vec)
   "Return unquoted localname component of VEC."
-  (tramp-compat-file-name-unquote (tramp-file-name-localname vec)))
+  (file-name-unquote (tramp-file-name-localname vec)))
 
 ;;;###tramp-autoload
 (defun tramp-tramp-file-p (name)
@@ -1597,7 +1573,7 @@ of `process-file', `start-file-process', or 
`shell-command'."
 ;; The localname can be quoted with "/:".  Extract this.
 (defun tramp-unquote-file-local-name (name)
   "Return unquoted localname of NAME."
-  (tramp-compat-file-name-unquote (tramp-file-local-name name)))
+  (file-name-unquote (tramp-file-local-name name)))
 
 (defun tramp-find-method (method user host)
   "Return the right method string to use depending on USER and HOST.
@@ -1759,7 +1735,7 @@ See `tramp-dissect-file-name' for details."
   (let ((v (tramp-dissect-file-name
            (concat tramp-prefix-format
                    (replace-regexp-in-string
-                    (tramp-compat-rx (regexp tramp-postfix-hop-regexp) eos)
+                    (rx (regexp tramp-postfix-hop-regexp) eos)
                     tramp-postfix-host-format name))
            nodefault)))
     ;; Only some methods from tramp-sh.el do support multi-hops.
@@ -1855,8 +1831,7 @@ the form (METHOD USER DOMAIN HOST PORT LOCALNAME 
&optional HOP)."
    (replace-regexp-in-string
     tramp-prefix-regexp ""
     (replace-regexp-in-string
-     (tramp-compat-rx
-      (regexp tramp-postfix-host-regexp) eos)
+     (rx (regexp tramp-postfix-host-regexp) eos)
      tramp-postfix-hop-format
      (tramp-make-tramp-file-name vec 'noloc)))))
 
@@ -1986,7 +1961,7 @@ of `current-buffer'."
   ;; Also, in `font-lock-defaults' you can specify a function name for
   ;; the "KEYWORDS" part, so font-lock calls it to get the actual keywords!
   '(list
-    (tramp-compat-rx bol (regexp tramp-debug-outline-regexp) (+ nonl))
+    (rx bol (regexp tramp-debug-outline-regexp) (+ nonl))
     '(1 font-lock-warning-face t t)
     '(0 (outline-font-lock-face) keep t))
   "Used for highlighting Tramp debug buffers in `outline-mode'.")
@@ -2400,7 +2375,7 @@ If VAR is nil, then we bind `v' to the structure and 
`method', `user',
   (let* ((parameters (cdr reporter))
         (message (aref parameters 3)))
     (when (tramp-compat-string-search message (or (current-message) ""))
-      (tramp-compat-progress-reporter-update reporter value suffix))))
+      (progress-reporter-update reporter value suffix))))
 
 (defmacro with-tramp-progress-reporter (vec level message &rest body)
   "Execute BODY, spinning a progress reporter with MESSAGE in interactive mode.
@@ -2438,13 +2413,12 @@ locally on a remote file name.  When the local system 
is a W32 system
 but the remote system is Unix, this introduces a superfluous drive
 letter into the file name.  This function removes it."
   (save-match-data
-    (let ((quoted (tramp-compat-file-name-quoted-p name 'top))
-         (result (tramp-compat-file-name-unquote name 'top)))
+    (let ((quoted (file-name-quoted-p name 'top))
+         (result (file-name-unquote name 'top)))
       (setq result
            (replace-regexp-in-string
-            (tramp-compat-rx (regexp tramp-volume-letter-regexp) "/")
-            "/" result))
-      (if quoted (tramp-compat-file-name-quote result 'top) result))))
+            (rx (regexp tramp-volume-letter-regexp) "/") "/" result))
+      (if quoted (file-name-quote result 'top) result))))
 
 ;;; Config Manipulation Functions:
 
@@ -2552,7 +2526,7 @@ coding system might not be determined.  This function 
repairs it."
        ;; We found a matching entry in `file-coding-system-alist'.
        ;; So we add a similar entry, but with the temporary file name
        ;; as regexp.
-       (push (cons (tramp-compat-rx (literal tmpname)) (cdr elt)) result)))))
+       (push (cons (rx (literal tmpname)) (cdr elt)) result)))))
 
 (defun tramp-run-real-handler (operation args)
   "Invoke normal file name handler for OPERATION.
@@ -2602,15 +2576,13 @@ Must be handled by the callers."
              file-name-nondirectory file-name-sans-versions
              file-notify-add-watch file-ownership-preserved-p
              file-readable-p file-regular-p file-remote-p
-             file-selinux-context file-symlink-p file-truename
-             file-writable-p find-backup-file-name get-file-buffer
-             insert-directory insert-file-contents load
-             make-directory set-file-acl set-file-modes
+             file-selinux-context file-symlink-p file-system-info
+             file-truename file-writable-p find-backup-file-name
+             get-file-buffer insert-directory insert-file-contents
+             load make-directory set-file-acl set-file-modes
              set-file-selinux-context set-file-times
              substitute-in-file-name unhandled-file-name-directory
              vc-registered
-             ;; Emacs 27+ only.
-             file-system-info
              ;; Emacs 28- only.
              make-directory-internal
              ;; Emacs 28+ only.
@@ -2653,10 +2625,8 @@ Must be handled by the callers."
      (if (bufferp (nth 0 args)) (nth 0 args) (current-buffer))))
    ;; COMMAND.
    ((member operation
-           '(make-nearby-temp-file process-file shell-command
-             start-file-process temporary-file-directory
-             ;; Emacs 27+ only.
-             exec-path make-process
+           '(exec-path make-nearby-temp-file make-process process-file
+             shell-command start-file-process temporary-file-directory
              ;; Emacs 29+ only.
               list-system-processes memory-info process-attributes))
     default-directory)
@@ -2837,7 +2807,7 @@ remote file names."
                  #'file-name-sans-extension
                  (directory-files
                   dir nil (rx bos "tramp" (+ nonl) ".el" (? "c") eos)))))
-        (files-regexp (tramp-compat-rx bol (regexp (regexp-opt files)) eol)))
+        (files-regexp (rx bol (regexp (regexp-opt files)) eol)))
     (mapatoms
      (lambda (atom)
        (when (and (functionp atom)
@@ -2874,7 +2844,7 @@ remote file names."
   (put #'tramp-completion-file-name-handler 'operations
        (mapcar #'car tramp-completion-file-name-handler-alist))
 
-  ;; Integrated in Emacs 27.
+  ;; After unloading, `tramp-archive-enabled' might not be defined.
   (when (bound-and-true-p tramp-archive-enabled)
     (add-to-list 'file-name-handler-alist
                 (cons tramp-archive-file-name-regexp
@@ -2983,7 +2953,7 @@ not in completion mode."
 
     ;; Suppress hop from completion.
     (when (string-match
-          (tramp-compat-rx
+          (rx
            (regexp tramp-prefix-regexp)
            (group (+ (regexp tramp-remote-file-name-spec-regexp)
                      (regexp tramp-postfix-hop-regexp))))
@@ -3076,14 +3046,14 @@ They are collected by 
`tramp-completion-dissect-file-name1'."
   (let (;; "/method" "/[method"
        (tramp-completion-file-name-structure1
         (list
-         (tramp-compat-rx
+         (rx
           (regexp tramp-prefix-regexp)
           (group (? (regexp tramp-completion-method-regexp))) eol)
          1 nil nil nil))
        ;; "/method:user" "/[method/user"
        (tramp-completion-file-name-structure2
         (list
-         (tramp-compat-rx
+         (rx
           (regexp tramp-prefix-regexp)
           (group (regexp tramp-method-regexp))
           (regexp tramp-postfix-method-regexp)
@@ -3092,7 +3062,7 @@ They are collected by 
`tramp-completion-dissect-file-name1'."
        ;; "/method:host" "/[method/host"
        (tramp-completion-file-name-structure3
         (list
-         (tramp-compat-rx
+         (rx
           (regexp tramp-prefix-regexp)
           (group (regexp tramp-method-regexp))
           (regexp tramp-postfix-method-regexp)
@@ -3101,7 +3071,7 @@ They are collected by 
`tramp-completion-dissect-file-name1'."
        ;; "/method:[ipv6" "/[method/ipv6"
        (tramp-completion-file-name-structure4
         (list
-         (tramp-compat-rx
+         (rx
           (regexp tramp-prefix-regexp)
           (group (regexp tramp-method-regexp))
           (regexp tramp-postfix-method-regexp)
@@ -3111,7 +3081,7 @@ They are collected by 
`tramp-completion-dissect-file-name1'."
        ;; "/method:user@host" "/[method/user@host"
        (tramp-completion-file-name-structure5
         (list
-         (tramp-compat-rx
+         (rx
           (regexp tramp-prefix-regexp)
           (group (regexp tramp-method-regexp))
           (regexp tramp-postfix-method-regexp)
@@ -3122,7 +3092,7 @@ They are collected by 
`tramp-completion-dissect-file-name1'."
        ;; "/method:user@[ipv6" "/[method/user@ipv6"
        (tramp-completion-file-name-structure6
         (list
-         (tramp-compat-rx
+         (rx
           (regexp tramp-prefix-regexp)
           (group (regexp tramp-method-regexp))
           (regexp tramp-postfix-method-regexp)
@@ -3255,7 +3225,7 @@ Either user or host may be nil."
 Either user or host may be nil."
    (let (result
         (regexp
-         (tramp-compat-rx
+         (rx
           bol (group (regexp tramp-host-regexp))
           (? (+ blank) (group (regexp tramp-user-regexp))))))
      (when (re-search-forward regexp (line-end-position) t)
@@ -3271,8 +3241,7 @@ User is always nil."
 (defun tramp-parse-shosts-group ()
    "Return a (user host) tuple allowed to access.
 User is always nil."
-   (tramp-parse-group
-    (tramp-compat-rx bol (group (regexp tramp-host-regexp))) 1 ","))
+   (tramp-parse-group (rx bol (group (regexp tramp-host-regexp))) 1 ","))
 
 (defun tramp-parse-sconfig (filename)
   "Return a list of (user host) tuples allowed to access.
@@ -3283,7 +3252,7 @@ User is always nil."
    "Return a (user host) tuple allowed to access.
 User is always nil."
    (tramp-parse-group
-    (tramp-compat-rx
+    (rx
      (| (: bol (* blank) "Host")
        (: bol (+ nonl)) ;; ???
        (group (regexp tramp-host-regexp))))
@@ -3308,15 +3277,14 @@ User is always nil."
 User is always nil."
   (tramp-parse-shostkeys-sknownhosts
    dirname
-   (tramp-compat-rx
-    bol "key_" (+ digit) "_" (group (regexp tramp-host-regexp)) ".pub" eol)))
+   (rx bol "key_" (+ digit) "_" (group (regexp tramp-host-regexp)) ".pub" 
eol)))
 
 (defun tramp-parse-sknownhosts (dirname)
   "Return a list of (user host) tuples allowed to access.
 User is always nil."
   (tramp-parse-shostkeys-sknownhosts
    dirname
-   (tramp-compat-rx
+   (rx
     bol (group (regexp tramp-host-regexp)) ".ssh-" (| "dss" "rsa") ".pub" 
eol)))
 
 (defun tramp-parse-hosts (filename)
@@ -3328,8 +3296,7 @@ User is always nil."
    "Return a (user host) tuple allowed to access.
 User is always nil."
    (tramp-parse-group
-    (tramp-compat-rx
-     bol (group (| (regexp tramp-ipv6-regexp) (regexp tramp-host-regexp))))
+    (rx bol (group (| (regexp tramp-ipv6-regexp) (regexp tramp-host-regexp))))
     1 (rx blank)))
 
 (defun tramp-parse-passwd (filename)
@@ -3348,7 +3315,7 @@ Host is always \"localhost\"."
    "Return a (user host) tuple allowed to access.
 Host is always \"localhost\"."
    (let (result
-        (regexp (tramp-compat-rx bol (group (regexp tramp-user-regexp)) ":")))
+        (regexp (rx bol (group (regexp tramp-user-regexp)) ":")))
      (when (re-search-forward regexp (line-end-position) t)
        (setq result (list (match-string 1) "localhost")))
      (forward-line 1)
@@ -3399,14 +3366,13 @@ User is always nil."
                     (tramp-parse-putty-group registry-or-dirname)))))
     ;; UNIX case.
     (tramp-parse-shostkeys-sknownhosts
-     registry-or-dirname
-     (tramp-compat-rx bol (group (regexp tramp-host-regexp)) eol))))
+     registry-or-dirname (rx bol (group (regexp tramp-host-regexp)) eol))))
 
 (defun tramp-parse-putty-group (registry)
   "Return a (user host) tuple allowed to access.
 User is always nil."
   (let (result
-       (regexp (tramp-compat-rx (literal registry) "\\" (group (+ nonl)))))
+       (regexp (rx (literal registry) "\\" (group (+ nonl)))))
     (when (re-search-forward regexp (line-end-position) t)
       (setq result (list nil (match-string 1))))
     (forward-line 1)
@@ -3828,8 +3794,7 @@ Let-bind it when necessary.")
       ;; not support tilde expansion.  But users could declare a
       ;; respective connection property.  (Bug#53847)
       (when (string-match
-            (tramp-compat-rx bos "~" (group (* (not "/"))) (group (* nonl)) 
eos)
-            localname)
+            (rx bos "~" (group (* (not "/"))) (group (* nonl)) eos) localname)
        (let ((uname (match-string 1 localname))
              (fname (match-string 2 localname))
              hname)
@@ -3990,9 +3955,7 @@ Let-bind it when necessary.")
           (and
            completion-ignored-extensions
            (string-match-p
-            (tramp-compat-rx
-             (regexp (regexp-opt completion-ignored-extensions)) eos)
-            x)
+            (rx (regexp (regexp-opt completion-ignored-extensions)) eos) x)
            ;; We remember the hit.
            (push x hits-ignored-extensions))))))
      ;; No match.  So we try again for ignored files.
@@ -4023,18 +3986,11 @@ Let-bind it when necessary.")
    ((not (file-exists-p file2)) t)
    ;; Tramp reads and writes timestamps on second level.  So we round
    ;; the timestamps to seconds without fractions.
-   ;; `time-convert' has been introduced with Emacs 27.1.
-   ((fboundp 'time-convert)
-    (time-less-p
-     (tramp-compat-funcall
-      'time-convert
-      (file-attribute-modification-time (file-attributes file2)) 'integer)
-     (tramp-compat-funcall
-      'time-convert
-      (file-attribute-modification-time (file-attributes file1)) 'integer)))
    (t (time-less-p
-       (file-attribute-modification-time (file-attributes file2))
-       (file-attribute-modification-time (file-attributes file1))))))
+       (time-convert
+       (file-attribute-modification-time (file-attributes file2)) 'integer)
+       (time-convert
+       (file-attribute-modification-time (file-attributes file1)) 'integer)))))
 
 (defun tramp-handle-file-readable-p (filename)
   "Like `file-readable-p' for Tramp files."
@@ -4097,9 +4053,8 @@ Let-bind it when necessary.")
    (if (directory-name-p filename) #'file-name-as-directory #'identity)
    ;; Quote properly.
    (funcall
-    (if (tramp-compat-file-name-quoted-p filename)
-       #'tramp-compat-file-name-quote #'identity)
-    (let ((result (tramp-compat-file-name-unquote (expand-file-name filename)))
+    (if (file-name-quoted-p filename) #'file-name-quote #'identity)
+    (let ((result (file-name-unquote (expand-file-name filename)))
          (numchase 0)
          ;; Don't make the following value larger than necessary.
          ;; People expect an error message in a timely fashion when
@@ -4123,7 +4078,7 @@ Let-bind it when necessary.")
                      v2
                      (if (stringp symlink-target)
                          (if (file-remote-p symlink-target)
-                             (tramp-compat-file-name-quote symlink-target 'top)
+                             (file-name-quote symlink-target 'top)
                            (tramp-drop-volume-letter
                             (expand-file-name
                              symlink-target
@@ -4433,53 +4388,49 @@ Parsing the remote \"ps\" output is controlled by
 It is not guaranteed, that all process attributes as described in
 `process-attributes' are returned.  The additional attribute
 `pid' shall be returned always."
-  ;; Since Emacs 27.1.
-  (when (fboundp 'connection-local-criteria-for-default-directory)
-    (with-tramp-file-property vec "/" "process-attributes"
-      (ignore-errors
-        (with-temp-buffer
-          (hack-connection-local-variables-apply
-           (connection-local-criteria-for-default-directory))
-          ;; (pop-to-buffer (current-buffer))
-          (when (zerop
-                 (apply
-                  #'process-file
-                  "ps" nil t nil tramp-process-attributes-ps-args))
-            (let (result res)
-              (goto-char (point-min))
-              (while (not (eobp))
-                ;; (tramp-test-message
-                ;;  "%s" (buffer-substring (point) (line-end-position)))
-                (when (save-excursion
-                        (search-forward-regexp
-                        (rx digit) (line-end-position) 'noerror))
-                  (setq res nil)
-                  (dolist (elt tramp-process-attributes-ps-format)
-                    (push
-                     (cons
-                      (car elt)
-                      (cond
-                       ((eq (cdr elt) 'number) (read (current-buffer)))
-                       ((eq (cdr elt) 'string)
-                        (search-forward-regexp (rx (+ (not blank))))
-                        (match-string 0))
-                       ((numberp (cdr elt))
-                        (search-forward-regexp (rx (+ blank)))
-                        (search-forward-regexp
-                        (rx (+ nonl)) (+ (point) (cdr elt)))
-                        (string-trim (match-string 0)))
-                       ((fboundp (cdr elt))
-                        (funcall (cdr elt)))
-                       ((null (cdr elt))
-                        (search-forward-regexp (rx (+ blank)))
-                        (buffer-substring (point) (line-end-position)))))
-                     res))
-                  ;; `nice' could be `-'.
-                  (setq res (rassq-delete-all '- res))
-                  (push (append res) result))
-                (forward-line))
-              ;; Return result.
-              result)))))))
+  (with-tramp-file-property vec "/" "process-attributes"
+    (ignore-errors
+      (with-temp-buffer
+        (hack-connection-local-variables-apply
+         (connection-local-criteria-for-default-directory))
+        ;; (pop-to-buffer (current-buffer))
+        (when (zerop
+               (apply
+                #'process-file "ps" nil t nil 
tramp-process-attributes-ps-args))
+          (let (result res)
+            (goto-char (point-min))
+            (while (not (eobp))
+              ;; (tramp-test-message
+              ;;  "%s" (buffer-substring (point) (line-end-position)))
+              (when (save-excursion
+                      (search-forward-regexp
+                      (rx digit) (line-end-position) 'noerror))
+                (setq res nil)
+                (dolist (elt tramp-process-attributes-ps-format)
+                  (push
+                   (cons
+                    (car elt)
+                    (cond
+                     ((eq (cdr elt) 'number) (read (current-buffer)))
+                     ((eq (cdr elt) 'string)
+                      (search-forward-regexp (rx (+ (not blank))))
+                      (match-string 0))
+                     ((numberp (cdr elt))
+                      (search-forward-regexp (rx (+ blank)))
+                      (search-forward-regexp (rx (+ nonl)) (+ (point) (cdr 
elt)))
+                      (string-trim (match-string 0)))
+                     ((fboundp (cdr elt))
+                      (funcall (cdr elt)))
+                     ((null (cdr elt))
+                      (search-forward-regexp (rx (+ blank)))
+                      (buffer-substring (point) (line-end-position)))))
+                   res))
+                ;; `nice' could be `-'.
+                (setq res (rassq-delete-all '- res))
+                (push (append res) result))
+              (forward-line))
+            ;; Return result.
+            result))))))
 
 (defun tramp-handle-list-system-processes ()
   "Like `list-system-processes' for Tramp files."
@@ -4640,9 +4591,9 @@ Do not set it manually, it is used buffer-local in 
`tramp-get-lock-pid'.")
                     tramp-prefix-format proxy tramp-postfix-host-format))
             (entry
              (list (and (stringp host-port)
-                        (tramp-compat-rx bol (literal host-port) eol))
+                        (rx bol (literal host-port) eol))
                    (and (stringp user-domain)
-                        (tramp-compat-rx bol (literal user-domain) eol))
+                        (rx bol (literal user-domain) eol))
                    (propertize proxy 'tramp-ad-hoc t))))
        (tramp-message vec 5 "Add %S to `tramp-default-proxies-alist'" entry)
        ;; Add the hop.
@@ -4715,13 +4666,14 @@ Do not set it manually, it is used buffer-local in 
`tramp-get-lock-pid'.")
              (or
               ;; The host name is used for the remote shell command.
               (member
-               '("%h") (tramp-get-method-parameter item 'tramp-login-args))
+               "%h" (flatten-tree
+                     (tramp-get-method-parameter item 'tramp-login-args)))
               ;; The host name must match previous hop.
               (string-match-p previous-host host))
            (setq tramp-default-proxies-alist saved-tdpa)
            (tramp-user-error
             vec "Host name `%s' does not match `%s'" host previous-host))
-         (setq previous-host (tramp-compat-rx bol (literal host) eol)))))
+         (setq previous-host (rx bol (literal host) eol)))))
 
     ;; Result.
     target-alist))
@@ -4735,7 +4687,7 @@ substitution.  SPEC-LIST is a list of char/value pairs 
used for
   (let ((args (tramp-get-method-parameter vec parameter))
        (spec (apply 'format-spec-make spec-list)))
     ;; Expand format spec.
-    (tramp-compat-flatten-tree
+    (flatten-tree
      (mapcar
       (lambda (x)
        (setq x (mapcar (lambda (y) (format-spec y spec)) x))
@@ -4872,9 +4824,8 @@ substitution.  SPEC-LIST is a list of char/value pairs 
used for
            (setq
             login-args
             (append
-             (tramp-compat-flatten-tree
-              (tramp-get-method-parameter v 'tramp-async-args))
-             (tramp-compat-flatten-tree
+             (flatten-tree (tramp-get-method-parameter v 'tramp-async-args))
+             (flatten-tree
               (mapcar
                (lambda (x) (split-string x " "))
                (tramp-expand-args
@@ -5076,19 +5027,11 @@ support symbolic links."
       (when current-buffer-p
        (barf-if-buffer-read-only)
        (push-mark nil t))
-      ;; `shell-command-save-pos-or-erase' has been introduced with
-      ;; Emacs 27.1.
-      (if (fboundp 'shell-command-save-pos-or-erase)
-         (tramp-compat-funcall
-          'shell-command-save-pos-or-erase current-buffer-p)
-       (setq buffer-read-only nil)
-       (erase-buffer)))
+      (shell-command-save-pos-or-erase current-buffer-p))
 
     (if (integerp asynchronous)
        (let ((tramp-remote-process-environment
-              ;; `async-shell-command-width' has been introduced with
-              ;; Emacs 27.1.
-              (if (natnump (bound-and-true-p async-shell-command-width))
+              (if (natnump async-shell-command-width)
                   (cons (format "COLUMNS=%d"
                                 (bound-and-true-p async-shell-command-width))
                         tramp-remote-process-environment)
@@ -5139,11 +5082,7 @@ support symbolic links."
              (goto-char (prog1 (mark t)
                           (set-marker (mark-marker) (point)
                                       (current-buffer))))
-              ;; `shell-command-set-point-after-cmd' has been
-             ;; introduced with Emacs 27.1.
-             (if (fboundp 'shell-command-set-point-after-cmd)
-                 (tramp-compat-funcall
-                  'shell-command-set-point-after-cmd)))
+             (shell-command-set-point-after-cmd))
          ;; There's some output, display it.
          (when (with-current-buffer output-buffer (> (point-max) (point-min)))
            (display-message-or-buffer output-buffer)))))))
@@ -5151,10 +5090,7 @@ support symbolic links."
 (defun tramp-handle-start-file-process (name buffer program &rest args)
   "Like `start-file-process' for Tramp files.
 BUFFER might be a list, in this case STDERR is separated."
-  ;; `make-process' knows the `:file-handler' argument since Emacs
-  ;; 27.1 only.  Therefore, we invoke it via `tramp-file-name-handler'.
-  (tramp-file-name-handler
-   'make-process
+  (make-process
    :name name
    :buffer (if (consp buffer) (car buffer) buffer)
    :command (and program (cons program args))
@@ -5167,7 +5103,7 @@ BUFFER might be a list, in this case STDERR is separated."
   "Like `substitute-in-file-name' for Tramp files.
 \"//\" and \"/~\" substitute only in the local filename part."
   ;; Check, whether the local part is a quoted file name.
-  (if (tramp-compat-file-name-quoted-p filename)
+  (if (file-name-quoted-p filename)
       filename
     ;; First, we must replace environment variables.
     (setq filename (tramp-replace-environment-variables filename))
@@ -5198,6 +5134,12 @@ BUFFER might be a list, in this case STDERR is 
separated."
 (defconst tramp-time-doesnt-exist '(-1 65535)
   "An invalid time value, used as \"Doesn't exist\" value.")
 
+(defsubst tramp-defined-time (time)
+  "Return TIME or nil (when TIME is not a time spec)."
+  (unless (or (time-equal-p time tramp-time-doesnt-exist)
+             (time-equal-p time tramp-time-dont-know))
+    time))
+
 (defun tramp-handle-set-visited-file-modtime (&optional time-list)
   "Like `set-visited-file-modtime' for Tramp files."
   (unless (buffer-file-name)
@@ -5209,7 +5151,7 @@ BUFFER might be a list, in this case STDERR is separated."
            (or (file-attribute-modification-time
                 (file-attributes (buffer-file-name)))
                tramp-time-doesnt-exist))))
-  (unless (tramp-compat-time-equal-p time-list tramp-time-dont-know)
+  (unless (time-equal-p time-list tramp-time-dont-know)
     (tramp-run-real-handler #'set-visited-file-modtime (list time-list))))
 
 (defun tramp-handle-verify-visited-file-modtime (&optional buf)
@@ -5235,14 +5177,13 @@ of."
 
          (cond
           ;; File exists, and has a known modtime.
-          ((and attr
-                (not (tramp-compat-time-equal-p modtime tramp-time-dont-know)))
+          ((and attr (not (time-equal-p modtime tramp-time-dont-know)))
            (< (abs (tramp-time-diff modtime mt)) 2))
           ;; Modtime has the don't know value.
           (attr t)
           ;; If file does not exist, say it is not modified if and
           ;; only if that agrees with the buffer's record.
-          (t (tramp-compat-time-equal-p mt tramp-time-doesnt-exist))))))))
+          (t (time-equal-p mt tramp-time-doesnt-exist))))))))
 
 (defun tramp-handle-write-region
   (start end filename &optional append visit lockname mustbenew)
@@ -5439,7 +5380,7 @@ Wait, until the connection buffer changes."
        ;; Hide message in buffer.
        (narrow-to-region (point-max) (point-max))
        ;; Wait for new output.
-       (while (not (tramp-compat-ignore-error file-error
+       (while (not (ignore-error file-error
                      (tramp-wait-for-regexp
                       proc 0.1 tramp-security-key-confirmed-regexp)))
          (when (tramp-check-for-regexp proc tramp-security-key-timeout-regexp)
@@ -5771,8 +5712,7 @@ the remote host use line-endings as defined in the 
variable
         (tramp-flush-directory-properties vec "/"))
       (when (buffer-live-p buf)
        (with-current-buffer buf
-          (when (and prompt
-                    (tramp-search-regexp (tramp-compat-rx (literal prompt))))
+          (when (and prompt (tramp-search-regexp (rx (literal prompt))))
            (delete-region (point) (point-max))))))))
 
 (defun tramp-get-inode (vec)
@@ -5957,9 +5897,7 @@ ID-FORMAT valid values are `string' and `integer'."
   (with-tramp-connection-property nil (format "gid-%s" id-format)
     (cond
      ((equal id-format 'integer) (group-gid))
-     ;; `group-name' has been introduced with Emacs 27.1.
-     ((and (fboundp 'group-name) (equal id-format 'string))
-      (tramp-compat-funcall 'group-name (group-gid)))
+     ((equal id-format 'string) (group-name (group-gid)))
      ((file-attribute-group-id (file-attributes "~/" id-format))))))
 
 (defun tramp-get-local-locale (&optional vec)
@@ -5976,7 +5914,7 @@ VEC is used for tracing."
          (while candidates
            (goto-char (point-min))
            (if (string-match-p
-                (tramp-compat-rx bol (literal (car candidates)) (? "\r") eol)
+                (rx bol (literal (car candidates)) (? "\r") eol)
                 (buffer-string))
                (setq locale (car candidates)
                      candidates nil)
@@ -6307,7 +6245,7 @@ this file, if that variable is non-nil."
                 ("|" . "__")
                 ("[" . "_l")
                 ("]" . "_r"))
-              (tramp-compat-file-name-unquote (buffer-file-name)))
+              (file-name-unquote (buffer-file-name)))
              tramp-auto-save-directory)))
          result)
       (prog1 ;; Run plain `make-auto-save-file-name'.
@@ -6336,7 +6274,7 @@ ALIST is of the form ((FROM . TO) ...)."
       (let* ((pr (car alist))
              (from (car pr))
              (to (cdr pr)))
-        (while (string-match (tramp-compat-rx (literal from)) string)
+        (while (string-match (rx (literal from)) string)
           (setq string (replace-match to t t string)))
         (setq alist (cdr alist))))
     string))
@@ -6571,7 +6509,7 @@ T1 and T2 are time values (as returned by `current-time' 
for example)."
 Suppress `shell-file-name'.  This is needed on w32 systems, which
 would use a wrong quoting for local file names.  See `w32-shell-name'."
   (let (shell-file-name)
-    (shell-quote-argument (tramp-compat-file-name-unquote s))))
+    (shell-quote-argument (file-name-unquote s))))
 
 ;; Currently (as of Emacs 20.5), the function `shell-quote-argument'
 ;; does not deal well with newline characters.  Newline is replaced by
@@ -6604,7 +6542,7 @@ Only works for Bourne-like shells."
                   (string= (substring result 0 2) "\\~"))
          (setq result (substring result 1)))
        (replace-regexp-in-string
-        (tramp-compat-rx "\\" (literal tramp-rsh-end-of-line))
+        (rx "\\" (literal tramp-rsh-end-of-line))
         (format "'%s'" tramp-rsh-end-of-line) result)))))
 
 ;;; Signal handling.  This works for remote processes, which have set
diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el
index 7532c64f853..9b271a7cfbd 100644
--- a/lisp/net/trampver.el
+++ b/lisp/net/trampver.el
@@ -7,8 +7,8 @@
 ;; Maintainer: Michael Albinus <michael.albinus@gmx.de>
 ;; Keywords: comm, processes
 ;; Package: tramp
-;; Version: 2.6.0-pre
-;; Package-Requires: ((emacs "26.1"))
+;; Version: 2.7.0-pre
+;; Package-Requires: ((emacs "27.1"))
 ;; Package-Type: multi
 ;; URL: https://www.gnu.org/software/tramp/
 
@@ -40,7 +40,7 @@
 ;; ./configure" to change them.
 
 ;;;###tramp-autoload
-(defconst tramp-version "2.6.0-pre"
+(defconst tramp-version "2.7.0-pre"
   "This version of Tramp.")
 
 ;;;###tramp-autoload
@@ -55,11 +55,9 @@
          (dir (or (locate-dominating-file (locate-library "tramp") ".git")
                   source-directory))
          debug-on-error)
-      ;; `emacs-repository-get-branch' has been introduced with Emacs 27.1.
-      (with-no-warnings
-       (and (stringp dir) (file-directory-p dir)
-            (executable-find "git")
-            (emacs-repository-get-branch dir)))))
+      (and (stringp dir) (file-directory-p dir)
+          (executable-find "git")
+          (emacs-repository-get-branch dir))))
   "The repository branch of the Tramp sources.")
 
 (defconst tramp-repository-version
@@ -76,9 +74,9 @@
   "The repository revision of the Tramp sources.")
 
 ;; Check for Emacs version.
-(let ((x   (if (not (string-version-lessp emacs-version "26.1"))
+(let ((x   (if (not (string-version-lessp emacs-version "27.1"))
       "ok"
-    (format "Tramp 2.6.0-pre is not fit for %s"
+    (format "Tramp 2.7.0-pre is not fit for %s"
             (replace-regexp-in-string "\n" "" (emacs-version))))))
   (unless (string-equal "ok" x) (error "%s" x)))
 
@@ -104,7 +102,8 @@
          ("2.3.3" . "26.1") ("2.3.3.26.1" . "26.1") ("2.3.5.26.2" . "26.2")
          ("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.2.28.1" . "28.1") ("2.5.3.28.2" . "28.2")
+         ("2.6.0.29.1" . "29.1")))
 
 (add-hook 'tramp-unload-hook
          (lambda ()
diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el
index 8d1c1103abb..e76966e7660 100644
--- a/lisp/progmodes/c-ts-mode.el
+++ b/lisp/progmodes/c-ts-mode.el
@@ -358,7 +358,7 @@ MODE is either `c' or `cpp'."
    :language mode
    :feature 'assignment
    ;; TODO: Recursively highlight identifiers in parenthesized
-   ;; expressions, see `c-ts-mode--fontify-struct-declarator' for
+   ;; expressions, see `c-ts-mode--fontify-declarator' for
    ;; inspiration.
    '((assignment_expression
       left: (identifier) @font-lock-variable-name-face)
@@ -430,6 +430,9 @@ MODE is either `c' or `cpp'."
     ((or "function_declarator" "array_declarator" "init_declarator")
      (c-ts-mode--declarator-identifier
       (treesit-node-child-by-field-name node "declarator")))
+    ("qualified_identifier"
+     (c-ts-mode--declarator-identifier
+      (treesit-node-child-by-field-name node "name")))
     ;; Terminal case.
     ((or "identifier" "field_identifier")
      node)))
@@ -439,7 +442,14 @@ MODE is either `c' or `cpp'."
 For NODE, OVERRIDE, START, END, and ARGS, see
 `treesit-font-lock-rules'."
   (let* ((identifier (c-ts-mode--declarator-identifier node))
-         (face (pcase (treesit-node-type (treesit-node-parent identifier))
+         (qualified-root
+          (treesit-parent-while (treesit-node-parent identifier)
+                                (lambda (node)
+                                  (equal (treesit-node-type node)
+                                         "qualified_identifier"))))
+         (face (pcase (treesit-node-type (treesit-node-parent
+                                          (or qualified-root
+                                              identifier)))
                  ("function_declarator" 'font-lock-function-name-face)
                  (_ 'font-lock-variable-name-face))))
     (treesit-fontify-with-override
diff --git a/lisp/progmodes/csharp-mode.el b/lisp/progmodes/csharp-mode.el
index eb1d578daae..32ec7721697 100644
--- a/lisp/progmodes/csharp-mode.el
+++ b/lisp/progmodes/csharp-mode.el
@@ -773,9 +773,12 @@ compilation and evaluation time conflicts."
      (array_type
       (identifier) @font-lock-type-face)
      (cast_expression (identifier) @font-lock-type-face)
+     (cast_expression (generic_name (identifier) @font-lock-type-face))
      ["operator"] @font-lock-type-face
      (type_parameter_constraints_clause
       target: (identifier) @font-lock-type-face)
+     (type_constraint type: (identifier) @font-lock-type-face)
+     (type_constraint type: (generic_name (identifier) @font-lock-type-face))
      (type_of_expression (identifier) @font-lock-type-face)
      (object_creation_expression
       type: (identifier) @font-lock-type-face)
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el
index 8a2a5f886ec..881f4a83b17 100644
--- a/lisp/progmodes/js.el
+++ b/lisp/progmodes/js.el
@@ -3498,14 +3498,14 @@ This function is intended for use in 
`after-change-functions'."
 
    :language 'javascript
    :feature 'string
-   '((regex pattern: (regex_pattern)) @font-lock-string-face
+   '((regex pattern: (regex_pattern)) @font-lock-regexp-face
      (string) @font-lock-string-face)
 
    :language 'javascript
    :feature 'string-interpolation
    :override t
    '((template_string) @js--fontify-template-string
-     (template_substitution ["${" "}"] @font-lock-delimiter-face))
+     (template_substitution ["${" "}"] @font-lock-misc-punctuation-face))
 
    :language 'javascript
    :feature 'definition
diff --git a/lisp/progmodes/ruby-ts-mode.el b/lisp/progmodes/ruby-ts-mode.el
index 5c173ad24c7..5f5de500435 100644
--- a/lisp/progmodes/ruby-ts-mode.el
+++ b/lisp/progmodes/ruby-ts-mode.el
@@ -52,9 +52,10 @@
 ;; following levels:
 ;;   1: comment method-definition
 ;;   2: keyword regexp string type
-;;   3: builtin constant delimiter escape-sequence
+;;   3: builtin-variable builtin-constant constant
+;;      delimiter escape-sequence
 ;;      global instance
-;;      interpolation literal symbol variable
+;;      interpolation literal symbol assignment
 ;;   4: bracket error function operator punctuation
 
 ;; Thus if treesit-font-lock-level is set to level 3 which is its
@@ -87,11 +88,6 @@
   :prefix "ruby-ts-"
   :group 'languages)
 
-(defcustom ruby-ts-highlight-predefined-constants t
-  "When non-nil, the pre-defined constants are highlighted.
-They will be highlighted the same way as the pre-defined variables."
-  :type 'boolean)
-
 (defvar ruby-ts--operators
   '("+" "-" "*" "/" "%" "**"
     "==" "!=" ">" "<" ">=" "<=" "<=>" "==="
@@ -113,8 +109,7 @@ They will be highlighted the same way as the pre-defined 
variables."
           "RUBY_PATCHLEVEL" "RUBY_PLATFORM" "RUBY_RELEASE_DATE"
           "RUBY_REVISION" "RUBY_VERSION" "STDERR" "STDIN" "STDOUT"
           "TOPLEVEL_BINDING"))
-  "Ruby predefined global constants.
-These are currently unused")
+  "Ruby predefined global constants.")
 
 (defvar ruby-ts--predefined-variables
   (rx (or "$!" "$@" "$~" "$&" "$‘" "$‘" "$+" "$=" "$/" "$\\" "$," "$;"
@@ -122,7 +117,7 @@ These are currently unused")
           "$LOADED_FEATURES" "$DEBUG" "$FILENAME" "$stderr" "$stdin"
           "$stdout" "$VERBOSE" "$-a" "$-i" "$-l" "$-p"
           (seq "$" (+ digit))))
-  "Ruby global variables (but not global constants.")
+  "Ruby predefined global variables.")
 
 (defconst ruby-ts--class-or-module-regex
   (rx string-start
@@ -201,29 +196,24 @@ values of OVERRIDE"
    '((comment) @ruby-ts--comment-font-lock)
 
    :language language
-   :feature 'builtin
-   `(((global_variable) @var (:match ,ruby-ts--predefined-variables @var)) 
@font-lock-builtin-face
-     ,@(when ruby-ts-highlight-predefined-constants
-         `(((constant) @var (:match ,ruby-ts--predefined-constants @var)) 
@font-lock-builtin-face)))
+   :feature 'builtin-variable
+   `(((global_variable) @var (:match ,ruby-ts--predefined-variables @var)) 
@font-lock-builtin-face)
+
+   :language language
+   :feature 'builtin-constant
+   `(((constant) @var (:match ,ruby-ts--predefined-constants @var)) 
@font-lock-builtin-face)
 
    :language language
    :feature 'keyword
-   `([,@ruby-ts--keywords] @font-lock-keyword-face)
+   `([,@ruby-ts--keywords] @font-lock-keyword-face
+     (self) @font-lock-keyword-face
+     (super) @font-lock-keyword-face)
 
    :language language
    :feature 'constant
    '((true) @font-lock-doc-markup-face
      (false) @font-lock-doc-markup-face
-     (nil) @font-lock-doc-markup-face
-     (self) @font-lock-doc-markup-face
-     (super) @font-lock-doc-markup-face)
-
-   :language language
-   :feature 'symbol
-   '((bare_symbol) @font-lock-constant-face
-     (delimited_symbol (string_content) @font-lock-constant-face)
-     (hash_key_symbol) @font-lock-constant-face
-     (simple_symbol) @font-lock-constant-face)
+     (nil) @font-lock-doc-markup-face)
 
    ;; Before 'operator so (unary) works.
    :language language
@@ -237,10 +227,8 @@ values of OVERRIDE"
    ;; Also before 'operator because % and / are operators
    :language language
    :feature 'regexp
-   ;; TODO: We probably need a separate face for regexps everywhere.
-   ;; Maybe another one for regexp delimiters as well.
-   '((regex "/" @font-lock-string-face)
-     (regex _ (string_content) @font-lock-string-face))
+   '((regex "/" @font-lock-regexp-face)
+     (regex _ (string_content) @font-lock-regexp-face))
 
    :language language
    :feature 'operator
@@ -269,8 +257,8 @@ values of OVERRIDE"
 
    :language language
    :feature 'interpolation
-   '((interpolation "#{" @font-lock-delimiter-face)
-     (interpolation "}" @font-lock-delimiter-face))
+   '((interpolation "#{" @font-lock-misc-punctuation-face)
+     (interpolation "}" @font-lock-misc-punctuation-face))
 
    :language language
    :feature 'type
@@ -293,6 +281,33 @@ values of OVERRIDE"
      (method
       name: (setter) @font-lock-function-name-face))
 
+   :language language
+   :feature 'parameter-definition
+   '((method_parameters
+      (identifier) @font-lock-variable-name-face)
+     (block_parameters
+      (identifier) @font-lock-variable-name-face)
+     (optional_parameter
+      name: (identifier) @font-lock-variable-name-face)
+     (splat_parameter
+      name: (identifier) @font-lock-variable-name-face)
+     (hash_splat_parameter
+      name: (identifier) @font-lock-variable-name-face)
+     (block_parameter
+      name: (identifier) @font-lock-variable-name-face)
+     (destructured_parameter
+      (identifier) @font-lock-variable-name-face)
+     (lambda_parameters
+      (identifier) @font-lock-variable-name-face)
+     (exception_variable
+      (identifier) @font-lock-variable-name-face)
+     (array_pattern
+      (identifier) @font-lock-variable-name-face)
+     (keyword_pattern
+      key: (hash_key_symbol) @font-lock-variable-name-face)
+     (in_clause
+      pattern: (identifier) @font-lock-variable-name-face))
+
    ;; Yuan recommends also putting method definitions into the
    ;; 'function' category (thus keeping it in both).  I've opted to
    ;; just use separate categories for them -- dgutov.
@@ -301,6 +316,22 @@ values of OVERRIDE"
    '((call
       method: (identifier) @font-lock-function-name-face))
 
+   :language language
+   :feature 'assignment
+   '((assignment
+      left: (identifier) @font-lock-variable-name-face)
+     (assignment
+      left: (left_assignment_list (identifier) @font-lock-variable-name-face))
+     (operator_assignment
+      left: (identifier) @font-lock-variable-name-face))
+
+   :language language
+   :feature 'symbol
+   '((bare_symbol) @font-lock-constant-face
+     (delimited_symbol (string_content) @font-lock-constant-face)
+     (hash_key_symbol) @font-lock-constant-face
+     (simple_symbol) @font-lock-constant-face)
+
    :language language
    :feature 'error
    '((ERROR) @font-lock-warning-face)
@@ -930,12 +961,12 @@ leading double colon is not added."
   (setq-local treesit-font-lock-settings (ruby-ts--font-lock-settings 'ruby))
   ;; Level 3 is the default.
   (setq-local treesit-font-lock-feature-list
-              '(( comment method-definition )
+              '(( comment method-definition parameter-definition)
                 ( keyword regexp string type)
-                ( builtin constant
-                  delimiter escape-sequence global
-                  instance
-                  interpolation literal symbol variable)
+                ( builtin-variable builtin-constant constant
+                  delimiter escape-sequence
+                  global instance
+                  interpolation literal symbol assignment)
                 ( bracket error function operator punctuation)))
 
   (treesit-major-mode-setup))
diff --git a/lisp/progmodes/typescript-ts-mode.el 
b/lisp/progmodes/typescript-ts-mode.el
index f2e27395a55..0a79ae01248 100644
--- a/lisp/progmodes/typescript-ts-mode.el
+++ b/lisp/progmodes/typescript-ts-mode.el
@@ -151,10 +151,10 @@ Argument LANGUAGE is either `typescript' or `tsx'."
    :language language
    :override t
    :feature 'string
-   `((regex pattern: (regex_pattern)) @font-lock-string-face
+   `((regex pattern: (regex_pattern)) @font-lock-regexp-face
      (string) @font-lock-string-face
      (template_string) @js--fontify-template-string
-     (template_substitution ["${" "}"] @font-lock-builtin-face))
+     (template_substitution ["${" "}"] @font-lock-misc-punctuation-face))
 
    :language language
    :override t
diff --git a/lisp/simple.el b/lisp/simple.el
index 7910454e2f6..690968ca938 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -3795,16 +3795,14 @@ whether (MARKER . ADJUSTMENT) undo elements are in the 
region,
 because markers can be arbitrarily relocated.  Instead, pass the
 marker adjustment's corresponding (TEXT . POS) element."
   (cond ((integerp undo-elt)
-        (and (>= undo-elt start)
-             (<= undo-elt end)))
+         (<= start undo-elt end))
        ((eq undo-elt nil)
         t)
        ((atom undo-elt)
         nil)
        ((stringp (car undo-elt))
         ;; (TEXT . POSITION)
-        (and (>= (abs (cdr undo-elt)) start)
-             (<= (abs (cdr undo-elt)) end)))
+        (<= start (abs (cdr undo-elt)) end))
        ((and (consp undo-elt) (markerp (car undo-elt)))
         ;; (MARKER . ADJUSTMENT)
          (<= start (car undo-elt) end))
@@ -6419,7 +6417,7 @@ If the Unicode tables are not yet available, e.g. during 
bootstrap,
 then gives correct answers only for ASCII characters."
   (cond ((unicode-property-table-internal 'lowercase)
          (characterp (get-char-code-property char 'lowercase)))
-        ((and (>= char ?A) (<= char ?Z)))))
+        ((<= ?A char ?Z))))
 
 (defun zap-to-char (arg char &optional interactive)
   "Kill up to and including ARGth occurrence of CHAR.
@@ -10049,8 +10047,7 @@ PREFIX is the string that represents this modifier in 
an event type symbol."
            ((eq symbol 'shift)
              ;; FIXME: Should we also apply this "upcase" behavior of shift
              ;; to non-ascii letters?
-            (if (and (<= (downcase event) ?z)
-                     (>= (downcase event) ?a))
+            (if (<= ?a (downcase event) ?z)
                 (upcase event)
               (logior (ash 1 lshiftby) event)))
            (t
diff --git a/lisp/subr.el b/lisp/subr.el
index 2adf1033911..d1d3c76caf8 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -3557,8 +3557,7 @@ character.  This is not possible when using `read-key', 
but using
 Return t if answer is \"y\" and nil if it is \"n\".
 
 PROMPT is the string to display to ask the question; `y-or-n-p'
-adds \" (y or n) \" to it.  It does not need to end in space, but
-if it does up to one space will be removed.
+adds \"(y or n) \" to it.
 
 If you bind the variable `help-form' to a non-nil value
 while calling this function, then pressing `help-char'
diff --git a/lisp/textmodes/toml-ts-mode.el b/lisp/textmodes/toml-ts-mode.el
index 1b68632f58c..2430c5f3e76 100644
--- a/lisp/textmodes/toml-ts-mode.el
+++ b/lisp/textmodes/toml-ts-mode.el
@@ -117,7 +117,6 @@ Return nil if there is no name or if NODE is not a defun 
node."
      (or (treesit-node-text (treesit-node-child node 1) t)
          "Root table"))))
 
-;;;###autoload
 (add-to-list 'auto-mode-alist '("\\.toml\\'" . toml-ts-mode))
 
 ;;;###autoload
diff --git a/lisp/treesit.el b/lisp/treesit.el
index e141f872c73..a7f453a8899 100644
--- a/lisp/treesit.el
+++ b/lisp/treesit.el
@@ -302,9 +302,15 @@ properties."
 (defun treesit-parent-until (node pred &optional include-node)
   "Return the closest parent of NODE that satisfies PRED.
 
-Return nil if none was found.  PRED should be a function that
-takes one argument, the parent node, and return non-nil/nil for
-match/no match.
+This function successively examines the parent of NODE, then
+the parent of the parent, etc., until it finds the first
+ancestor node which satisfies the predicate PRED; then it
+returns that ancestor node.  It returns nil if no ancestor
+node was found that satisfies PRED.
+
+PRED should be a function that takes one argument, the node to
+examine, and returns a boolean value indicating whether that
+node is a match.
 
 If INCLUDE-NODE is non-nil, return NODE if it satisfies PRED."
   (let ((node (if include-node node
@@ -315,8 +321,16 @@ If INCLUDE-NODE is non-nil, return NODE if it satisfies 
PRED."
 
 (defun treesit-parent-while (node pred)
   "Return the furthest parent of NODE that satisfies PRED.
-Return nil if none was found.  PRED should be a function that
-takes one argument, the parent node."
+
+This function successively examines the parent of NODE, then
+the parent of the parent, etc., until it finds an ancestor node
+which no longer satisfies the predicate PRED; it returns the last
+examined ancestor that satisfies PRED.  It returns nil if no
+ancestor node was found that satisfies PRED.
+
+PRED should be a function that takes one argument, the node to
+examine, and returns a boolean value indicating whether that
+node is a match."
   (let ((last nil))
     (while (and node (funcall pred node))
       (setq last node
@@ -1165,16 +1179,17 @@ See `treesit-simple-indent-presets'.")
         ;; TODO: Document.
         (cons 'and (lambda (&rest fns)
                      (lambda (node parent bol &rest _)
-                       (cl-reduce (lambda (a b) (and a b))
-                                  (mapcar (lambda (fn)
-                                            (funcall fn node parent bol))
-                                          fns)))))
+                       (let (res)
+                         (catch 'break
+                           (dolist (fn fns)
+                             (setq res (funcall fn node parent bol))
+                             (unless res (throw 'break t))))
+                         res))))
         (cons 'or (lambda (&rest fns)
                     (lambda (node parent bol &rest _)
-                      (cl-reduce (lambda (a b) (or a b))
-                                 (mapcar (lambda (fn)
-                                           (funcall fn node parent bol))
-                                         fns)))))
+                      (seq-find
+                       (lambda (fn) (funcall fn node parent bol))
+                       fns))))
         (cons 'not (lambda (fn)
                      (lambda (node parent bol &rest _)
                        (not (funcall fn node parent bol)))))
@@ -1288,8 +1303,7 @@ the function."
                         (cdr exp))))
         ;; Presets override functions, so this condition comes before
         ;; `functionp'.
-        ((alist-get exp treesit-simple-indent-presets)
-         (alist-get exp treesit-simple-indent-presets))
+        ((alist-get exp treesit-simple-indent-presets))
         ((functionp exp) exp)
         ((symbolp exp)
          (if (null exp)
@@ -1534,6 +1548,10 @@ RULES."
                   (pcase func
                     (`(query ,qry)
                      (list 'query (treesit-query-compile lang qry)))
+                    (`(and . ,fns)
+                     (cons 'and (mapcar #'optimize-func fns)))
+                    (`(or . ,fns)
+                     (cons 'or (mapcar #'optimize-func fns)))
                     (_ func)))
                 ;; Optimize a rule (MATCHER ANCHOR OFFSET).
                 (optimize-rule (rule)
@@ -2952,8 +2970,8 @@ function signals an error."
    :eg-result-string "#<treesit-node (init_declarator) in 5-10>")
 
 
-  (treesit-first-child-for-pos
-   :no-eval (treesit-first-child-for-pos node 1)
+  (treesit-node-first-child-for-pos
+   :no-eval (treesit-node-first-child-for-pos node 1)
    :eg-result-string "#<treesit-node (primitive_type) in 1-4>")
   (treesit-node-descendant-for-range
    :no-eval (treesit-node-descendant-for-range node 2 3)
@@ -3027,11 +3045,11 @@ function signals an error."
    :eg-result t)
 
 
-  (treesit-field-name-for-child
-   :no-eval (treesit-field-name-for-child node)
+  (treesit-node-field-name-for-child
+   :no-eval (treesit-node-field-name-for-child node)
    :eg-result "body")
-  (treesit-child-count
-   :no-eval (treesit-child-count node)
+  (treesit-node-child-count
+   :no-eval (treesit-node-child-count node)
    :eg-result 3)
 
 
diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el
index 798db9f9dd2..60bd2baa6fb 100644
--- a/lisp/wid-edit.el
+++ b/lisp/wid-edit.el
@@ -2220,7 +2220,9 @@ But if NO-TRUNCATE is non-nil, include them."
             (if (widget-get current :inline)
                 (setq val value
                       fun :match-inline)
-              (setq val (car value)
+              (setq val (if (consp value)
+                            (car value)
+                          value)
                     fun :match))
           (setq val value
                 fun :match))
diff --git a/m4/acl.m4 b/m4/acl.m4
index 98362858ce5..6c2db7d3203 100644
--- a/m4/acl.m4
+++ b/m4/acl.m4
@@ -1,5 +1,5 @@
 # acl.m4 - check for access control list (ACL) primitives
-# serial 24
+# serial 25
 
 # Copyright (C) 2002, 2004-2023 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
@@ -139,7 +139,10 @@ int type = ACL_TYPE_EXTENDED;]])],
       AC_MSG_WARN([AC_PACKAGE_NAME will be built without ACL support.])
     fi
   fi
-  test -n "$gl_need_lib_has_acl" && LIB_HAS_ACL=$LIB_ACL
+  if test -n "$gl_need_lib_has_acl"; then
+    FILE_HAS_ACL_LIB=$LIB_ACL
+    LIB_HAS_ACL="$FILE_HAS_ACL_LIB"
+  fi
   AC_SUBST([LIB_ACL])
   AC_DEFINE_UNQUOTED([USE_ACL], [$use_acl],
     [Define to nonzero if you want access control list support.])
@@ -197,15 +200,18 @@ AC_DEFUN([gl_FILE_HAS_ACL],
          [gl_cv_getxattr_with_posix_acls=yes])])
   fi
   if test "$gl_cv_getxattr_with_posix_acls" = yes; then
-    LIB_HAS_ACL=
+    FILE_HAS_ACL_LIB=
     AC_DEFINE([GETXATTR_WITH_POSIX_ACLS], 1,
       [Define to 1 if getxattr works with XATTR_NAME_POSIX_ACL_ACCESS
        and XATTR_NAME_POSIX_ACL_DEFAULT.])
   else
     dnl Set gl_need_lib_has_acl to a nonempty value, so that any
-    dnl later gl_FUNC_ACL call will set LIB_HAS_ACL=$LIB_ACL.
+    dnl later gl_FUNC_ACL call will set FILE_HAS_ACL_LIB=$LIB_ACL.
     gl_need_lib_has_acl=1
-    LIB_HAS_ACL=$LIB_ACL
+    FILE_HAS_ACL_LIB=$LIB_ACL
   fi
+  AC_SUBST([FILE_HAS_ACL_LIB])
+  dnl For backward compatibility (e.g. coreutils still uses LIB_HAS_ACL).
+  LIB_HAS_ACL="$FILE_HAS_ACL_LIB"
   AC_SUBST([LIB_HAS_ACL])
 ])
diff --git a/m4/alloca.m4 b/m4/alloca.m4
index 75851875910..c685fac918a 100644
--- a/m4/alloca.m4
+++ b/m4/alloca.m4
@@ -1,6 +1,6 @@
 # alloca.m4 serial 21
-dnl Copyright (C) 2002-2004, 2006-2007, 2009-2023 Free Software
-dnl Foundation, Inc.
+dnl Copyright (C) 2002-2004, 2006-2007, 2009-2023 Free Software Foundation,
+dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/d-type.m4 b/m4/d-type.m4
index 05eb8ac0cfa..3f63bbe78ee 100644
--- a/m4/d-type.m4
+++ b/m4/d-type.m4
@@ -5,8 +5,7 @@ dnl
 dnl Check whether struct dirent has a member named d_type.
 dnl
 
-# Copyright (C) 1997, 1999-2004, 2006, 2009-2023 Free Software
-# Foundation, Inc.
+# Copyright (C) 1997, 1999-2004, 2006, 2009-2023 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
diff --git a/m4/dup2.m4 b/m4/dup2.m4
index 8a040d4c369..e1cc73e18db 100644
--- a/m4/dup2.m4
+++ b/m4/dup2.m4
@@ -1,6 +1,5 @@
 #serial 27
-dnl Copyright (C) 2002, 2005, 2007, 2009-2023 Free Software Foundation,
-dnl Inc.
+dnl Copyright (C) 2002, 2005, 2007, 2009-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/extensions.m4 b/m4/extensions.m4
index 6596e7efc06..5336b8daf7e 100644
--- a/m4/extensions.m4
+++ b/m4/extensions.m4
@@ -1,4 +1,4 @@
-# serial 22  -*- Autoconf -*-
+# serial 23  -*- Autoconf -*-
 # Enable extensions on systems that normally disable them.
 
 # Copyright (C) 2003, 2006-2023 Free Software Foundation, Inc.
@@ -31,7 +31,7 @@ m4_ifndef([AC_CHECK_INCLUDES_DEFAULT],
 #      its dependencies. This will ensure that the gl_USE_SYSTEM_EXTENSIONS
 #      invocation occurs in gl_EARLY, not in gl_INIT.
 
-m4_version_prereq([2.70.1], [], [
+m4_version_prereq([2.72], [], [
 
 # AC_USE_SYSTEM_EXTENSIONS
 # ------------------------
@@ -113,11 +113,15 @@ AH_VERBATIM([USE_SYSTEM_EXTENSIONS],
 #ifndef __STDC_WANT_IEC_60559_DFP_EXT__
 # undef __STDC_WANT_IEC_60559_DFP_EXT__
 #endif
+/* Enable extensions specified by C23 Annex F.  */
+#ifndef __STDC_WANT_IEC_60559_EXT__
+# undef __STDC_WANT_IEC_60559_EXT__
+#endif
 /* Enable extensions specified by ISO/IEC TS 18661-4:2015.  */
 #ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
 # undef __STDC_WANT_IEC_60559_FUNCS_EXT__
 #endif
-/* Enable extensions specified by ISO/IEC TS 18661-3:2015.  */
+/* Enable extensions specified by C23 Annex H and ISO/IEC TS 18661-3:2015.  */
 #ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
 # undef __STDC_WANT_IEC_60559_TYPES_EXT__
 #endif
@@ -187,6 +191,7 @@ dnl it should only be defined when necessary.
   AC_DEFINE([__STDC_WANT_IEC_60559_ATTRIBS_EXT__])
   AC_DEFINE([__STDC_WANT_IEC_60559_BFP_EXT__])
   AC_DEFINE([__STDC_WANT_IEC_60559_DFP_EXT__])
+  AC_DEFINE([__STDC_WANT_IEC_60559_EXT__])
   AC_DEFINE([__STDC_WANT_IEC_60559_FUNCS_EXT__])
   AC_DEFINE([__STDC_WANT_IEC_60559_TYPES_EXT__])
   AC_DEFINE([__STDC_WANT_LIB_EXT2__])
diff --git a/m4/filemode.m4 b/m4/filemode.m4
index 2fcc69d119b..3cafc5cd1e1 100644
--- a/m4/filemode.m4
+++ b/m4/filemode.m4
@@ -1,6 +1,5 @@
 # filemode.m4 serial 9
-dnl Copyright (C) 2002, 2005-2006, 2009-2023 Free Software Foundation,
-dnl Inc.
+dnl Copyright (C) 2002, 2005-2006, 2009-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/fsusage.m4 b/m4/fsusage.m4
index aeb3467a272..88f3ca817cb 100644
--- a/m4/fsusage.m4
+++ b/m4/fsusage.m4
@@ -1,8 +1,7 @@
 # serial 35
 # Obtaining file system usage information.
 
-# Copyright (C) 1997-1998, 2000-2001, 2003-2023 Free Software
-# Foundation, Inc.
+# Copyright (C) 1997-1998, 2000-2001, 2003-2023 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
diff --git a/m4/getgroups.m4 b/m4/getgroups.m4
index d5a18ea88b0..241fec88e3c 100644
--- a/m4/getgroups.m4
+++ b/m4/getgroups.m4
@@ -3,8 +3,7 @@
 dnl From Jim Meyering.
 dnl A wrapper around AC_FUNC_GETGROUPS.
 
-# Copyright (C) 1996-1997, 1999-2004, 2008-2023 Free Software
-# Foundation, Inc.
+# Copyright (C) 1996-1997, 1999-2004, 2008-2023 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
diff --git a/m4/getloadavg.m4 b/m4/getloadavg.m4
index 7097e5dd512..79e420baae8 100644
--- a/m4/getloadavg.m4
+++ b/m4/getloadavg.m4
@@ -1,7 +1,7 @@
 # Check for getloadavg.
 
-# Copyright (C) 1992-1996, 1999-2000, 2002-2003, 2006, 2008-2023 Free
-# Software Foundation, Inc.
+# Copyright (C) 1992-1996, 1999-2000, 2002-2003, 2006, 2008-2023 Free Software
+# Foundation, Inc.
 
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
diff --git a/m4/getrandom.m4 b/m4/getrandom.m4
index 95111567d79..f2010c0213f 100644
--- a/m4/getrandom.m4
+++ b/m4/getrandom.m4
@@ -1,4 +1,4 @@
-# getrandom.m4 serial 8
+# getrandom.m4 serial 9
 dnl Copyright 2020-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,7 +9,13 @@ dnl Written by Paul Eggert.
 AC_DEFUN([gl_FUNC_GETRANDOM],
 [
   AC_REQUIRE([gl_SYS_RANDOM_H_DEFAULTS])
-  AC_CHECK_FUNCS_ONCE([getrandom])
+  gl_CHECK_FUNCS_ANDROID([getrandom],
+    [[/* Additional includes are needed before <sys/random.h> on uClibc
+         and Mac OS X.  */
+      #include <sys/types.h>
+      #include <stdlib.h>
+      #include <sys/random.h>
+    ]])
   if test "$ac_cv_func_getrandom" != yes; then
     HAVE_GETRANDOM=0
   else
diff --git a/m4/gettime.m4 b/m4/gettime.m4
index 39067be6fa8..06f32fe26c2 100644
--- a/m4/gettime.m4
+++ b/m4/gettime.m4
@@ -1,6 +1,5 @@
 # gettime.m4 serial 12
-dnl Copyright (C) 2002, 2004-2006, 2009-2023 Free Software Foundation,
-dnl Inc.
+dnl Copyright (C) 2002, 2004-2006, 2009-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/gettimeofday.m4 b/m4/gettimeofday.m4
index 66231e0174f..5051d61cc87 100644
--- a/m4/gettimeofday.m4
+++ b/m4/gettimeofday.m4
@@ -1,7 +1,6 @@
 # serial 29
 
-# Copyright (C) 2001-2003, 2005, 2007, 2009-2023 Free Software
-# Foundation, Inc.
+# Copyright (C) 2001-2003, 2005, 2007, 2009-2023 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4
index 138f498451d..26239caa2b1 100644
--- a/m4/gnulib-common.m4
+++ b/m4/gnulib-common.m4
@@ -1,4 +1,4 @@
-# gnulib-common.m4 serial 74
+# gnulib-common.m4 serial 76
 dnl Copyright (C) 2007-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -187,7 +187,14 @@ AC_DEFUN([gl_COMMON_BODY], [
    to use this earlier definition, since <stdlib.h> may not have been included
    yet.  */
 #ifndef _GL_ATTRIBUTE_DEALLOC_FREE
-# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (free, 1)
+# if defined __cplusplus && defined __GNUC__ && !defined __clang__
+/* Work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108231> */
+#  define _GL_ATTRIBUTE_DEALLOC_FREE \
+     _GL_ATTRIBUTE_DEALLOC ((void (*) (void *)) free, 1)
+# else
+#  define _GL_ATTRIBUTE_DEALLOC_FREE \
+     _GL_ATTRIBUTE_DEALLOC (free, 1)
+# endif
 #endif
 
 /* _GL_ATTRIBUTE_DEPRECATED: Declares that an entity is deprecated.
@@ -309,7 +316,7 @@ AC_DEFUN([gl_COMMON_BODY], [
      - enumeration, enumeration item,
      - typedef,
    in C++ also: class.  */
-/* In C++ and C2x, this is spelled [[__maybe_unused__]].
+/* In C++ and C23, this is spelled [[__maybe_unused__]].
    GCC's syntax is __attribute__ ((__unused__)).
    clang supports both syntaxes.  */
 #ifdef __has_c_attribute
@@ -1016,6 +1023,30 @@ AC_DEFUN([gl_CONDITIONAL_HEADER],
   m4_popdef([gl_header_name])
 ])
 
+dnl gl_CHECK_FUNCS_ANDROID([func], [[#include <foo.h>]])
+dnl is like AC_CHECK_FUNCS([func]), taking into account a portability problem
+dnl on Android.
+dnl Namely, if func was added to Android API level, say, 28, then the libc.so
+dnl has the symbol func always, whereas the header file <foo.h> declares func
+dnl conditionally:
+dnl   #if __ANDROID_API__ >= 28
+dnl   ... func (...) __INTRODUCED_IN(28);
+dnl   #endif
+dnl Thus, when compiling with "clang -target armv7a-unknown-linux-android28",
+dnl the function func is declared and exists in libc.
+dnl Whereas when compiling with "clang -target armv7a-unknown-linux-android27",
+dnl the function func is not declared but exists in libc. We need to treat this
+dnl case like the case where func does not exist.
+AC_DEFUN([gl_CHECK_FUNCS_ANDROID],
+[
+  AC_CHECK_DECL([$1], , , [$2])
+  if test $ac_cv_have_decl_[$1] = yes; then
+    AC_CHECK_FUNCS([$1])
+  else
+    ac_cv_func_[$1]=no
+  fi
+])
+
 dnl Expands to some code for use in .c programs that, on native Windows, 
defines
 dnl the Microsoft deprecated alias function names to the underscore-prefixed
 dnl actual function names. With this macro, these function names are available
diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4
index 6435bcd149c..ae5001c44b5 100644
--- a/m4/gnulib-comp.m4
+++ b/m4/gnulib-comp.m4
@@ -123,7 +123,6 @@ AC_DEFUN([gl_EARLY],
   # Code from module intprops:
   # Code from module inttypes-incomplete:
   # Code from module largefile:
-  AC_REQUIRE([gl_YEAR2038_EARLY])
   AC_REQUIRE([AC_SYS_LARGEFILE])
   # Code from module lchmod:
   # Code from module libc-config:
@@ -1544,6 +1543,5 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/warnings.m4
   m4/wchar_t.m4
   m4/wint_t.m4
-  m4/year2038.m4
   m4/zzgnulib.m4
 ])
diff --git a/m4/group-member.m4 b/m4/group-member.m4
index 6e860c6189d..7c56ee3de7d 100644
--- a/m4/group-member.m4
+++ b/m4/group-member.m4
@@ -1,7 +1,6 @@
 # serial 14
 
-# Copyright (C) 1999-2001, 2003-2007, 2009-2023 Free Software
-# Foundation, Inc.
+# Copyright (C) 1999-2001, 2003-2007, 2009-2023 Free Software Foundation, Inc.
 
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
diff --git a/m4/largefile.m4 b/m4/largefile.m4
index bc8a2b93534..7fb81b864af 100644
--- a/m4/largefile.m4
+++ b/m4/largefile.m4
@@ -12,8 +12,7 @@
 # and ftello in C++ mode as well.
 # Fixed in Autoconf 2.72, which has AC_SYS_YEAR2038.
 AC_DEFUN([gl_SET_LARGEFILE_SOURCE],
-[
- m4_ifndef([AC_SYS_YEAR2038], [
+ m4_ifndef([AC_SYS_YEAR2038], [[
   AC_REQUIRE([AC_CANONICAL_HOST])
   AC_FUNC_FSEEKO
   case "$host_os" in
@@ -22,11 +21,10 @@ AC_DEFUN([gl_SET_LARGEFILE_SOURCE],
         [Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2).])
       ;;
   esac
- ])
-])
+ ]])
+)
 
-# Work around a problem in Autoconf through 2.71 on glibc 2.34+
-# with _TIME_BITS.  Also, work around a problem in autoconf <= 2.69:
+# Work around a problem in autoconf <= 2.69:
 # AC_SYS_LARGEFILE does not configure for large inodes on Mac OS X 10.5,
 # or configures them incorrectly in some cases.
 m4_version_prereq([2.70], [], [
@@ -46,34 +44,258 @@ m4_define([_AC_SYS_LARGEFILE_TEST_INCLUDES],
 ])
 ])# m4_version_prereq 2.70
 
+# Support AC_SYS_YEAR2038, even if Autoconf 2.71 or earlier.
+# This code is taken from Autoconf master.
 m4_ifndef([AC_SYS_YEAR2038], [
 
-# _AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, VALUE,
-#                               CACHE-VAR,
-#                               DESCRIPTION,
-#                               PROLOGUE, [FUNCTION-BODY])
-# --------------------------------------------------------
-m4_define([_AC_SYS_LARGEFILE_MACRO_VALUE],
-[AC_CACHE_CHECK([for $1 value needed for large files], [$3],
-[while :; do
-  m4_ifval([$6], [AC_LINK_IFELSE], [AC_COMPILE_IFELSE])(
-    [AC_LANG_PROGRAM([$5], [$6])],
-    [$3=no; break])
-  m4_ifval([$6], [AC_LINK_IFELSE], [AC_COMPILE_IFELSE])(
-    [AC_LANG_PROGRAM([#undef $1
-#define $1 $2
-$5], [$6])],
-    [$3=$2; break])
-  $3=unknown
-  break
-done])
-case $$3 in #(
-  no | unknown) ;;
-  *) AC_DEFINE_UNQUOTED([$1], [$$3], [$4]);;
-esac
-rm -rf conftest*[]dnl
-])# _AC_SYS_LARGEFILE_MACRO_VALUE
+# _AC_SYS_YEAR2038_TEST_CODE
+# --------------------------
+# C code used to probe for time_t that can represent time points more
+# than 2**31 - 1 seconds after the epoch.  With the usual Unix epoch,
+# these correspond to dates after 2038-01-18 22:14:07 +0000 (Gregorian),
+# hence the name.
+AC_DEFUN([_AC_SYS_YEAR2038_TEST_CODE],
+[[
+  #include <time.h>
+  /* Check that time_t can represent 2**32 - 1 correctly.  */
+  #define LARGE_TIME_T \\
+    ((time_t) (((time_t) 1 << 30) - 1 + 3 * ((time_t) 1 << 30)))
+  int verify_time_t_range[(LARGE_TIME_T / 65537 == 65535
+                           && LARGE_TIME_T % 65537 == 0)
+                          ? 1 : -1];
+]])
+
+# _AC_SYS_YEAR2038_OPTIONS
+# ------------------------
+# List of known ways to enable support for large time_t.  If you change
+# this list you probably also need to change the AS_CASE at the end of
+# _AC_SYS_YEAR2038_PROBE.
+m4_define([_AC_SYS_YEAR2038_OPTIONS], m4_normalize(
+    ["none needed"]                   dnl 64-bit and newer 32-bit Unix
+    ["-D_TIME_BITS=64"]               dnl glibc 2.34 with some 32-bit ABIs
+    ["-D__MINGW_USE_VC2005_COMPAT"]   dnl 32-bit MinGW
+    ["-U_USE_32_BIT_TIME_T -D__MINGW_USE_VC2005_COMPAT"]
+                                      dnl 32-bit MinGW (misconfiguration)
+))
+
+# _AC_SYS_YEAR2038_PROBE([IF-NOT-DETECTED])
+# -----------------------------------------
+# Subroutine of AC_SYS_YEAR2038.  Probe for time_t that can represent
+# time points more than 2**31 - 1 seconds after the epoch (dates after
+# 2038-01-18, see above) and set the cache variable ac_cv_sys_year2038_opts
+# to one of the values in the _AC_SYS_YEAR2038_OPTIONS list, or to
+# "support not detected" if none of them worked.  Then, set compilation
+# options and #defines as necessary to enable large time_t support.
+#
+# Note that we do not test whether mktime, localtime, etc. handle
+# large values of time_t correctly, as that would require use of
+# AC_TRY_RUN.  Note also that some systems only support large time_t
+# together with large off_t.
+#
+# If support is not detected, the behavior depends on which of the
+# top-level AC_SYS_YEAR2038 macros was used (see below).
+#
+# If you change this macro you may also need to change
+# _AC_SYS_YEAR2038_OPTIONS.
+AC_DEFUN([_AC_SYS_YEAR2038_PROBE],
+[AC_CACHE_CHECK([for $CC option to enable timestamps after Jan 2038],
+  [ac_cv_sys_year2038_opts],
+  [ac_save_CPPFLAGS="$CPPFLAGS"
+  ac_opt_found=no
+  for ac_opt in _AC_SYS_YEAR2038_OPTIONS; do
+    AS_IF([test x"$ac_opt" != x"none needed"],
+      [CPPFLAGS="$ac_save_CPPFLAGS $ac_opt"])
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([_AC_SYS_YEAR2038_TEST_CODE])],
+      [ac_cv_sys_year2038_opts="$ac_opt"
+      ac_opt_found=yes])
+    test $ac_opt_found = no || break
+  done
+  CPPFLAGS="$ac_save_CPPFLAGS"
+  test $ac_opt_found = yes || ac_cv_sys_year2038_opts="support not detected"])
+
+ac_have_year2038=yes
+AS_CASE([$ac_cv_sys_year2038_opts],
+  ["none needed"], [],
+  ["support not detected"],
+    [ac_have_year2038=no
+     AS_CASE([$enable_year2038],
+      [yes],
+        [# If we're not cross compiling and 'touch' works with a large
+        # timestamp, then we can presume the system supports wider time_t
+        # *somehow* and we just weren't able to detect it.  One common
+        # case that we deliberately *don't* probe for is a system that
+        # supports both 32- and 64-bit ABIs but only the 64-bit ABI offers
+        # wide time_t.  (It would be inappropriate for us to override an
+        # intentional use of -m32.)  Error out, demanding use of
+        # --disable-year2038 if this is intentional.
+        AS_IF([test $cross_compiling = no],
+          [AS_IF([TZ=UTC0 touch -t 210602070628.15 conftest.time 2>/dev/null],
+            [AS_CASE([`TZ=UTC0 LC_ALL=C ls -l conftest.time 2>/dev/null`],
+              [*'Feb  7  2106'* | *'Feb  7 17:10'*],
+              [AC_MSG_FAILURE(m4_text_wrap(
+      [this system appears to support timestamps after January 2038,
+       but no mechanism for enabling wide 'time_t' was detected.
+       Did you mean to build a 64-bit binary? (e.g. 'CC="${CC} -m64"'.)
+       To proceed with 32-bit time_t, configure with '--disable-year2038'.],
+      [], [], [55]))])])])])],
+
+  ["-D_TIME_BITS=64"],
+    [AC_DEFINE([_TIME_BITS], [64],
+      [Number of bits in time_t, on hosts where this is settable.])],
+
+  ["-D__MINGW_USE_VC2005_COMPAT=1"],
+    [AC_DEFINE([__MINGW_USE_VC2005_COMPAT], [1],
+      [Define to 1 on platforms where this makes time_t a 64-bit type.])],
+
+  ["-U_USE_32_BIT_TIME_T"*],
+    [AC_MSG_FAILURE(m4_text_wrap(
+      [the 'time_t' type is currently forced to be 32-bit.
+       It will stop working after January 2038.
+       Remove _USE_32BIT_TIME_T from the compiler flags.],
+      [], [], [55]))],
+
+  [AC_MSG_ERROR(
+    [internal error: bad value for \$ac_cv_sys_year2038_opts])])
+])
+
+# _AC_SYS_YEAR2038_ENABLE
+# -----------------------
+# Subroutine of AC_SYS_YEAR2038 and _AC_SYS_YEAR2038_OPT_IN.
+# Depending on which of the YEAR2038 macros was used, add either an
+# --enable-year2038, or a --disable-year2038, or no option at all to
+# the configure script.  Note that this is expanded very late and
+# therefore there cannot be any code in the AC_ARG_ENABLE.  The
+# default value for enable_year2038 is emitted unconditionally
+# because the generated code always looks at this variable.
+m4_define([_AC_SYS_YEAR2038_ENABLE],
+[m4_divert_text([DEFAULTS],
+  m4_provide_if([AC_SYS_YEAR2038],
+    [enable_year2038=yes],
+    [enable_year2038=no]))]dnl
+[AC_ARG_ENABLE([year2038],
+  m4_provide_if([AC_SYS_YEAR2038],
+    [AS_HELP_STRING([--disable-year2038],
+      [do not support timestamps after 2038])],
+    [AS_HELP_STRING([--enable-year2038],
+      [support timestamps after 2038])]))])
+
+# _AC_SYS_YEAR2038_OPT_IN
+# -----------------------
+# If the --enable-year2038 option is given to configure, attempt to
+# detect and activate support for large time_t on 32-bit systems.
+# This macro is automatically invoked by AC_SYS_LARGEFILE when large
+# *file* support is detected.  It does not AC_REQUIRE AC_SYS_LARGEFILE
+# to avoid a dependency loop, and is therefore unsafe to expose as a
+# documented macro.
+AC_DEFUN([_AC_SYS_YEAR2038_OPT_IN],
+[m4_provide_if([_AC_SYS_YEAR2038_PROBE], [], [dnl
+  AS_IF([test "$enable_year2038" != no], [_AC_SYS_YEAR2038_PROBE])
+  AC_CONFIG_COMMANDS_PRE([_AC_SYS_YEAR2038_ENABLE])
+])])
+
+# AC_SYS_YEAR2038
+# ---------------
+# Attempt to detect and activate support for large time_t.
+# On systems where time_t is not always 64 bits, this probe can be
+# skipped by passing the --disable-year2038 option to configure.
+AC_DEFUN([AC_SYS_YEAR2038],
+[AC_REQUIRE([AC_SYS_LARGEFILE])]dnl
+[m4_provide_if([_AC_SYS_YEAR2038_PROBE], [], [dnl
+  AS_IF([test "$enable_year2038" != no], [_AC_SYS_YEAR2038_PROBE])
+  AC_CONFIG_COMMANDS_PRE([_AC_SYS_YEAR2038_ENABLE])
+])])
+
+# _AC_SYS_LARGEFILE_TEST_CODE
+# ---------------------------
+# C code used to probe for large file support.
+m4_define([_AC_SYS_LARGEFILE_TEST_CODE],
+[@%:@include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+    We can't simply define LARGE_OFF_T to be 9223372036854775807,
+    since some C++ compilers masquerading as C compilers
+    incorrectly reject 9223372036854775807.  */
+@%:@define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
+  int off_t_is_large[[(LARGE_OFF_T % 2147483629 == 721
+                      && LARGE_OFF_T % 2147483647 == 1)
+                     ? 1 : -1]];[]dnl
+])
+
+# _AC_SYS_LARGEFILE_OPTIONS
+# -------------------------
+# List of known ways to enable support for large files.  If you change
+# this list you probably also need to change the AS_CASE at the end of
+# _AC_SYS_LARGEFILE_PROBE.
+m4_define([_AC_SYS_LARGEFILE_OPTIONS], m4_normalize(
+    ["none needed"]                   dnl Most current systems
+    ["-D_FILE_OFFSET_BITS=64"]        dnl X/Open LFS spec
+    ["-D_LARGE_FILES=1"]              dnl AIX (which versions?)
+    ["-n32"]                          dnl Irix 6.2 w/ SGI compiler
+))
+
+# _AC_SYS_LARGEFILE_PROBE
+# -----------------------
+# Subroutine of AC_SYS_LARGEFILE. Probe for large file support and set
+# the cache variable ac_cv_sys_largefile_opts to one of the values in
+# the _AC_SYS_LARGEFILE_OPTIONS list, or to "support not detected" if
+# none of the options in that list worked.  Then, set compilation
+# options and #defines as necessary to enable large file support.
+#
+# If large file support is not detected, the behavior depends on which of
+# the top-level AC_SYS_LARGEFILE macros was used (see below).
+#
+# If you change this macro you may also need to change
+# _AC_SYS_LARGEFILE_OPTIONS.
+AC_DEFUN([_AC_SYS_LARGEFILE_PROBE],
+[AC_CACHE_CHECK([for $CC option to enable large file support],
+  [ac_cv_sys_largefile_opts],
+  [ac_save_CC="$CC"
+  ac_opt_found=no
+  for ac_opt in _AC_SYS_LARGEFILE_OPTIONS; do
+    AS_IF([test x"$ac_opt" != x"none needed"],
+      [CC="$ac_save_CC $ac_opt"])
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([_AC_SYS_LARGEFILE_TEST_CODE])],
+      [ac_cv_sys_largefile_opts="$ac_opt"
+      ac_opt_found=yes])
+    test $ac_opt_found = no || break
+  done
+  CC="$ac_save_CC"
+  test $ac_opt_found = yes || ac_cv_sys_largefile_opts="support not detected"])
+
+ac_have_largefile=yes
+AS_CASE([$ac_cv_sys_largefile_opts],
+  ["none needed"], [],
+  ["support not detected"],
+    [ac_have_largefile=no],
+
+  ["-D_FILE_OFFSET_BITS=64"],
+    [AC_DEFINE([_FILE_OFFSET_BITS], [64],
+      [Number of bits in a file offset, on hosts where this is settable.])],
+
+  ["-D_LARGE_FILES=1"],
+    [AC_DEFINE([_LARGE_FILES], [1],
+      [Define to 1 on platforms where this makes off_t a 64-bit type.])],
+
+  ["-n32"],
+    [CC="$CC -n32"],
+
+  [AC_MSG_ERROR(
+    [internal error: bad value for \$ac_cv_sys_largefile_opts])])
+
+_AC_SYS_YEAR2038_OPT_IN
+])
 
+# _AC_SYS_LARGEFILE_ENABLE
+# ------------------------
+# Subroutine of AC_SYS_LARGEFILE.  Note that this
+# is expanded very late and therefore there cannot be any code in the
+# AC_ARG_ENABLE.  The default value for enable_largefile is emitted
+# unconditionally because the generated shell code always looks at
+# this variable.
+m4_define([_AC_SYS_LARGEFILE_ENABLE],
+[m4_divert_text([DEFAULTS],
+  enable_largefile=yes)]dnl
+[AC_ARG_ENABLE([largefile],
+  [AS_HELP_STRING([--disable-largefile], [omit support for large files])])])
 
 # AC_SYS_LARGEFILE
 # ----------------
@@ -84,44 +306,13 @@ rm -rf conftest*[]dnl
 # Additionally, on Linux file systems with 64-bit inodes a file that happens
 # to have a 64-bit inode number cannot be accessed by 32-bit applications on
 # Linux x86/x86_64.  This can occur with file systems such as XFS and NFS.
+# This macro allows configuration to continue if the system doesn't support
+# large files.
 AC_DEFUN([AC_SYS_LARGEFILE],
-[AC_ARG_ENABLE(largefile,
-               [  --disable-largefile     omit support for large files])
-AS_IF([test "$enable_largefile" != no],
- [AC_CACHE_CHECK([for special C compiler options needed for large files],
-    ac_cv_sys_largefile_CC,
-    [ac_cv_sys_largefile_CC=no
-     if test "$GCC" != yes; then
-       ac_save_CC=$CC
-       while :; do
-         # IRIX 6.2 and later do not support large files by default,
-         # so use the C compiler's -n32 option if that helps.
-         AC_LANG_CONFTEST([AC_LANG_PROGRAM([_AC_SYS_LARGEFILE_TEST_INCLUDES])])
-         AC_COMPILE_IFELSE([], [break])
-         CC="$CC -n32"
-         AC_COMPILE_IFELSE([], [ac_cv_sys_largefile_CC=' -n32'; break])
-         break
-       done
-       CC=$ac_save_CC
-       rm -f conftest.$ac_ext
-    fi])
-  if test "$ac_cv_sys_largefile_CC" != no; then
-    CC=$CC$ac_cv_sys_largefile_CC
-  fi
-
-  _AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS, 64,
-    ac_cv_sys_file_offset_bits,
-    [Number of bits in a file offset, on hosts where this is settable.],
-    [_AC_SYS_LARGEFILE_TEST_INCLUDES])
-  AS_CASE([$ac_cv_sys_file_offset_bits],
-    [unknown],
-      [_AC_SYS_LARGEFILE_MACRO_VALUE([_LARGE_FILES], [1],
-         [ac_cv_sys_large_files],
-         [Define for large files, on AIX-style hosts.],
-         [_AC_SYS_LARGEFILE_TEST_INCLUDES])],
-    [64],
-      [gl_YEAR2038_BODY([])])])
-])# AC_SYS_LARGEFILE
+[m4_provide_if([_AC_SYS_LARGEFILE_PROBE], [], [dnl
+  AS_IF([test "$enable_largefile" != no], [_AC_SYS_LARGEFILE_PROBE])
+  AC_CONFIG_COMMANDS_PRE([_AC_SYS_LARGEFILE_ENABLE])
+])])
 ])# m4_ifndef AC_SYS_YEAR2038
 
 # Enable large files on systems where this is implemented by Gnulib, not by the
diff --git a/m4/mempcpy.m4 b/m4/mempcpy.m4
index 3ac8a305bde..55bee2ab7a2 100644
--- a/m4/mempcpy.m4
+++ b/m4/mempcpy.m4
@@ -1,6 +1,6 @@
 # mempcpy.m4 serial 12
-dnl Copyright (C) 2003-2004, 2006-2007, 2009-2023 Free Software
-dnl Foundation, Inc.
+dnl Copyright (C) 2003-2004, 2006-2007, 2009-2023 Free Software Foundation,
+dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/memrchr.m4 b/m4/memrchr.m4
index ed750b7bdf1..7611ac7e3ac 100644
--- a/m4/memrchr.m4
+++ b/m4/memrchr.m4
@@ -1,6 +1,6 @@
 # memrchr.m4 serial 11
-dnl Copyright (C) 2002-2003, 2005-2007, 2009-2023 Free Software
-dnl Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2005-2007, 2009-2023 Free Software Foundation,
+dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/memset_explicit.m4 b/m4/memset_explicit.m4
index 3d4dcb30955..9dcd89a758a 100644
--- a/m4/memset_explicit.m4
+++ b/m4/memset_explicit.m4
@@ -1,4 +1,4 @@
-dnl Copyright 2022 Free Software Foundation, Inc.
+dnl Copyright 2022-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/mktime.m4 b/m4/mktime.m4
index 604dd766f5d..e9d31f35a46 100644
--- a/m4/mktime.m4
+++ b/m4/mktime.m4
@@ -1,6 +1,6 @@
 # serial 37
-dnl Copyright (C) 2002-2003, 2005-2007, 2009-2023 Free Software
-dnl Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2005-2007, 2009-2023 Free Software Foundation,
+dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/nstrftime.m4 b/m4/nstrftime.m4
index 45b89f752a5..04c0b63fbd0 100644
--- a/m4/nstrftime.m4
+++ b/m4/nstrftime.m4
@@ -1,7 +1,6 @@
 # serial 37
 
-# Copyright (C) 1996-1997, 1999-2007, 2009-2023 Free Software
-# Foundation, Inc.
+# Copyright (C) 1996-1997, 1999-2007, 2009-2023 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
diff --git a/m4/pathmax.m4 b/m4/pathmax.m4
index 5b7fa4242bc..6d47d2c026e 100644
--- a/m4/pathmax.m4
+++ b/m4/pathmax.m4
@@ -1,6 +1,6 @@
 # pathmax.m4 serial 11
-dnl Copyright (C) 2002-2003, 2005-2006, 2009-2023 Free Software
-dnl Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2023 Free Software Foundation,
+dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/sig2str.m4 b/m4/sig2str.m4
index 7aad94a9616..aee18efeefd 100644
--- a/m4/sig2str.m4
+++ b/m4/sig2str.m4
@@ -1,6 +1,5 @@
 # serial 7
-dnl Copyright (C) 2002, 2005-2006, 2009-2023 Free Software Foundation,
-dnl Inc.
+dnl Copyright (C) 2002, 2005-2006, 2009-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/ssize_t.m4 b/m4/ssize_t.m4
index 1b45e9557cc..1c12c33ea09 100644
--- a/m4/ssize_t.m4
+++ b/m4/ssize_t.m4
@@ -1,6 +1,5 @@
 # ssize_t.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2001-2003, 2006, 2010-2023 Free Software Foundation,
-dnl Inc.
+dnl Copyright (C) 2001-2003, 2006, 2010-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/stat-time.m4 b/m4/stat-time.m4
index 5b6b8101098..40993d5731c 100644
--- a/m4/stat-time.m4
+++ b/m4/stat-time.m4
@@ -1,7 +1,7 @@
 # Checks for stat-related time functions.
 
-# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2023 Free
-# Software Foundation, Inc.
+# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2023 Free Software
+# Foundation, Inc.
 
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
diff --git a/m4/stdio_h.m4 b/m4/stdio_h.m4
index 94271e11e78..07569961f8b 100644
--- a/m4/stdio_h.m4
+++ b/m4/stdio_h.m4
@@ -1,4 +1,4 @@
-# stdio_h.m4 serial 59
+# stdio_h.m4 serial 61
 dnl Copyright (C) 2007-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -82,6 +82,16 @@ AC_DEFUN_ONCE([gl_STDIO_H],
   if test $ac_cv_have_decl_fcloseall = no; then
     HAVE_DECL_FCLOSEALL=0
   fi
+
+  AC_CHECK_DECLS_ONCE([getw])
+  if test $ac_cv_have_decl_getw = no; then
+    HAVE_DECL_GETW=0
+  fi
+
+  AC_CHECK_DECLS_ONCE([putw])
+  if test $ac_cv_have_decl_putw = no; then
+    HAVE_DECL_PUTW=0
+  fi
 ])
 
 # gl_STDIO_MODULE_INDICATOR([modulename])
@@ -178,7 +188,9 @@ AC_DEFUN([gl_STDIO_H_DEFAULTS],
   HAVE_DECL_FTELLO=1;            AC_SUBST([HAVE_DECL_FTELLO])
   HAVE_DECL_GETDELIM=1;          AC_SUBST([HAVE_DECL_GETDELIM])
   HAVE_DECL_GETLINE=1;           AC_SUBST([HAVE_DECL_GETLINE])
+  HAVE_DECL_GETW=1;              AC_SUBST([HAVE_DECL_GETW])
   HAVE_DECL_OBSTACK_PRINTF=1;    AC_SUBST([HAVE_DECL_OBSTACK_PRINTF])
+  HAVE_DECL_PUTW=1;              AC_SUBST([HAVE_DECL_PUTW])
   HAVE_DECL_SNPRINTF=1;          AC_SUBST([HAVE_DECL_SNPRINTF])
   HAVE_DECL_VSNPRINTF=1;         AC_SUBST([HAVE_DECL_VSNPRINTF])
   HAVE_DPRINTF=1;                AC_SUBST([HAVE_DPRINTF])
diff --git a/m4/strnlen.m4 b/m4/strnlen.m4
index 60e8d81bf3b..d2cac59b6f2 100644
--- a/m4/strnlen.m4
+++ b/m4/strnlen.m4
@@ -1,6 +1,6 @@
 # strnlen.m4 serial 14
-dnl Copyright (C) 2002-2003, 2005-2007, 2009-2023 Free Software
-dnl Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2005-2007, 2009-2023 Free Software Foundation,
+dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/strtoimax.m4 b/m4/strtoimax.m4
index 1c6ddd386a5..db5cfb7aa9d 100644
--- a/m4/strtoimax.m4
+++ b/m4/strtoimax.m4
@@ -1,6 +1,5 @@
 # strtoimax.m4 serial 16
-dnl Copyright (C) 2002-2004, 2006, 2009-2023 Free Software Foundation,
-dnl Inc.
+dnl Copyright (C) 2002-2004, 2006, 2009-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/strtoll.m4 b/m4/strtoll.m4
index 1e042175b18..ede630c6061 100644
--- a/m4/strtoll.m4
+++ b/m4/strtoll.m4
@@ -1,6 +1,5 @@
 # strtoll.m4 serial 9
-dnl Copyright (C) 2002, 2004, 2006, 2008-2023 Free Software Foundation,
-dnl Inc.
+dnl Copyright (C) 2002, 2004, 2006, 2008-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/time_h.m4 b/m4/time_h.m4
index fd4a469d192..f6bf3a4f30e 100644
--- a/m4/time_h.m4
+++ b/m4/time_h.m4
@@ -1,7 +1,6 @@
 # Configure a more-standard replacement for <time.h>.
 
-# Copyright (C) 2000-2001, 2003-2007, 2009-2023 Free Software
-# Foundation, Inc.
+# Copyright (C) 2000-2001, 2003-2007, 2009-2023 Free Software Foundation, Inc.
 
 # serial 20
 
diff --git a/m4/timespec.m4 b/m4/timespec.m4
index 354530319fe..95f475f2cc5 100644
--- a/m4/timespec.m4
+++ b/m4/timespec.m4
@@ -1,7 +1,6 @@
 #serial 15
 
-# Copyright (C) 2000-2001, 2003-2007, 2009-2023 Free Software
-# Foundation, Inc.
+# Copyright (C) 2000-2001, 2003-2007, 2009-2023 Free Software Foundation, Inc.
 
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
diff --git a/src/fns.c b/src/fns.c
index 0dc31aec373..bbc9a7f9621 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -3173,8 +3173,7 @@ DEFUN ("yes-or-no-p", Fyes_or_no_p, Syes_or_no_p, 1, 1, 0,
 Return t if answer is yes, and nil if the answer is no.
 
 PROMPT is the string to display to ask the question; `yes-or-no-p'
-adds \"(yes or no) \" to it.  It does not need to end in space, but if
-it does up to one space will be removed.
+adds \"(yes or no) \" to it.
 
 The user must confirm the answer with RET, and can edit it until it
 has been confirmed.
diff --git a/src/gnutls.c b/src/gnutls.c
index 8320c928a4e..e8528381efd 100644
--- a/src/gnutls.c
+++ b/src/gnutls.c
@@ -1072,7 +1072,7 @@ usage: (gnutls-error-string ERROR)  */)
 
 DEFUN ("gnutls-deinit", Fgnutls_deinit, Sgnutls_deinit, 1, 1, 0,
        doc: /* Deallocate GnuTLS resources associated with process PROC.
-See also `gnutls-init'.  */)
+See also `gnutls-boot'.  */)
   (Lisp_Object proc)
 {
   return emacs_gnutls_deinit (proc);
diff --git a/src/xdisp.c b/src/xdisp.c
index 9b137d2d9b6..aeeca2674ea 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -23322,8 +23322,9 @@ extend_face_to_end_of_line (struct it *it)
          it->avoid_cursor_p = true;
          it->object = Qnil;
 
-         const int stretch_ascent = (((it->ascent + it->descent)
-                                      * FONT_BASE (font)) / FONT_HEIGHT 
(font));
+         const int stretch_height = it->ascent + it->descent;
+         const int stretch_ascent =
+           (stretch_height * FONT_BASE (font)) / FONT_HEIGHT (font);
 
          if (indicator_column >= 0
              && indicator_column > it->current_x
@@ -23343,8 +23344,7 @@ extend_face_to_end_of_line (struct it *it)
              if (stretch_width > 0)
                {
                  append_stretch_glyph (it, Qnil, stretch_width,
-                                       it->ascent + it->descent,
-                                       stretch_ascent);
+                                       stretch_height, stretch_ascent);
                }
 
              /* Generate the glyph indicator only if
@@ -23352,6 +23352,8 @@ extend_face_to_end_of_line (struct it *it)
              if (it->current_x < indicator_column)
                {
                  const int save_face_id = it->face_id;
+                 const int save_ascent = it->ascent;
+                 const int save_descent = it->descent;
                  it->char_to_display
                    = XFIXNAT (Vdisplay_fill_column_indicator_character);
                  it->face_id
@@ -23359,6 +23361,8 @@ extend_face_to_end_of_line (struct it *it)
                                   0, extend_face_id);
                  PRODUCE_GLYPHS (it);
                  it->face_id = save_face_id;
+                 it->ascent = save_ascent;
+                 it->descent = save_descent;
                }
            }
 
@@ -23372,8 +23376,7 @@ extend_face_to_end_of_line (struct it *it)
                {
                  clear_position (it);
                  append_stretch_glyph (it, Qnil, stretch_width,
-                                       it->ascent + it->descent,
-                                       stretch_ascent);
+                                       stretch_height, stretch_ascent);
                }
            }
 
@@ -27618,7 +27621,9 @@ static const char power_letter[] =
     'P', /* peta */
     'E', /* exa */
     'Z', /* zetta */
-    'Y'         /* yotta */
+    'Y', /* yotta */
+    'R', /* ronna */
+    'Q'  /* quetta */
   };
 
 static void
diff --git a/test/lisp/net/tramp-archive-tests.el 
b/test/lisp/net/tramp-archive-tests.el
index 96c1e78e37a..85766f95cda 100644
--- a/test/lisp/net/tramp-archive-tests.el
+++ b/test/lisp/net/tramp-archive-tests.el
@@ -121,12 +121,6 @@ the origin of the temporary TMPFILE, have no write 
permissions."
      (directory-files tmpfile 'full directory-files-no-dot-files-regexp))
     (delete-directory tmpfile)))
 
-(defun tramp-archive--test-emacs27-p ()
-  "Check for Emacs version >= 27.1.
-Some semantics has been changed for there, without new functions or
-variables, so we check the Emacs version directly."
-  (>= emacs-major-version 27))
-
 (ert-deftest tramp-archive-test00-availability ()
   "Test availability of archive file name functions."
   :expected-result (if tramp-archive-enabled :passed :failed)
@@ -615,16 +609,13 @@ This checks also `file-name-as-directory', 
`file-name-directory',
          (with-temp-buffer
            (insert-directory tramp-archive-test-archive nil)
            (goto-char (point-min))
-           (should
-            (looking-at-p
-             (tramp-compat-rx (literal tramp-archive-test-archive)))))
+           (should (looking-at-p (rx (literal tramp-archive-test-archive)))))
          (with-temp-buffer
            (insert-directory tramp-archive-test-archive "-al")
            (goto-char (point-min))
            (should
             (looking-at-p
-             (tramp-compat-rx
-              bol (+ nonl) blank (literal tramp-archive-test-archive) eol))))
+             (rx bol (+ nonl) blank (literal tramp-archive-test-archive) 
eol))))
          (with-temp-buffer
            (insert-directory
             (file-name-as-directory tramp-archive-test-archive)
@@ -877,12 +868,8 @@ This tests also `file-executable-p', `file-writable-p' and 
`set-file-modes'."
 (ert-deftest tramp-archive-test43-file-system-info ()
   "Check that `file-system-info' returns proper values."
   (skip-unless tramp-archive-enabled)
-  ;; Since Emacs 27.1.
-  (skip-unless (fboundp 'file-system-info))
 
-  ;; `file-system-info' exists since Emacs 27.  We don't want to see
-  ;; compiler warnings for older Emacsen.
-  (let ((fsi (with-no-warnings (file-system-info tramp-archive-test-archive))))
+  (let ((fsi (file-system-info tramp-archive-test-archive)))
     (skip-unless fsi)
     (should (and (consp fsi)
                 (= (length fsi) 3)
@@ -895,8 +882,6 @@ This tests also `file-executable-p', `file-writable-p' and 
`set-file-modes'."
   "Check that `tramp-archive' autoloads properly."
   :tags '(:expensive-test)
   (skip-unless tramp-archive-enabled)
-  ;; Autoloading tramp-archive works since Emacs 27.1.
-  (skip-unless (tramp-archive--test-emacs27-p))
 
   ;; tramp-archive is neither loaded at Emacs startup, nor when
   ;; loading a file like "/mock::foo" (which loads Tramp).
@@ -919,7 +904,7 @@ This tests also `file-executable-p', `file-writable-p' and 
`set-file-modes'."
        (dolist (file `("/mock::foo" ,(concat tramp-archive-test-archive 
"foo")))
           (should
            (string-match
-           (tramp-compat-rx
+           (rx
             "tramp-archive loaded: "
             (literal (symbol-name
                       (tramp-archive-file-name-p default-directory)))
@@ -942,8 +927,6 @@ This tests also `file-executable-p', `file-writable-p' and 
`set-file-modes'."
   "Check that `tramp-archive' is loaded lazily, only when needed."
   :tags '(:expensive-test)
   (skip-unless tramp-archive-enabled)
-  ;; Autoloading tramp-archive works since Emacs 27.1.
-  (skip-unless (tramp-archive--test-emacs27-p))
 
   ;; tramp-archive is neither loaded at Emacs startup, nor when
   ;; loading a file like "/foo.tar".  It is loaded only when
@@ -964,7 +947,7 @@ This tests also `file-executable-p', `file-writable-p' and 
`set-file-modes'."
     (dolist (tae '(t nil))
       (should
        (string-match
-       (tramp-compat-rx
+       (rx
         "tramp-archive loaded: nil" (+ ascii)
         "tramp-archive loaded: nil" (+ ascii)
         "tramp-archive loaded: " (literal (symbol-name tae)))
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index 6fb9fa1fae9..90f6fcd6b15 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -74,14 +74,10 @@
 (defvar tramp-remote-path)
 (defvar tramp-remote-process-environment)
 
-;; Needed for Emacs 26.
-(declare-function with-connection-local-variables "files-x")
 ;; Needed for Emacs 27.
 (defvar lock-file-name-transforms)
 (defvar process-file-return-signal-string)
 (defvar remote-file-name-inhibit-locks)
-(defvar shell-command-dont-erase-buffer)
-;; Needed for Emacs 28.
 (defvar dired-copy-dereference)
 
 ;; `ert-resource-file' was introduced in Emacs 28.1.
@@ -224,7 +220,7 @@ If LOCAL is non-nil, a local file name is returned.
 If QUOTED is non-nil, the local part of the file name is quoted.
 The temporary file is not created."
   (funcall
-   (if quoted #'tramp-compat-file-name-quote #'identity)
+   (if quoted #'file-name-quote #'identity)
    (expand-file-name
     (make-temp-name "tramp-test")
     (if local temporary-file-directory ert-remote-temporary-file-directory))))
@@ -2296,10 +2292,9 @@ This checks also `file-name-as-directory', 
`file-name-directory',
 
     ;; Check `directory-abbrev-alist' abbreviation.
     (let ((directory-abbrev-alist
-           `((,(tramp-compat-rx bos (literal home-dir) "/foo")
-              . ,(concat home-dir "/f"))
-             (,(tramp-compat-rx bos (literal remote-host) "/nowhere")
-              . ,(concat remote-host "/nw")))))
+           `((,(rx bos (literal home-dir) "/foo") . ,(concat home-dir "/f"))
+             (,(rx bos (literal remote-host) "/nowhere")
+             . ,(concat remote-host "/nw")))))
       (should (equal (abbreviate-file-name (concat home-dir "/foo/bar"))
                      (concat remote-host-nohop "~/f/bar")))
       (should (equal (abbreviate-file-name
@@ -2479,17 +2474,14 @@ This checks also `file-name-as-directory', 
`file-name-directory',
              (should (string-equal (buffer-string) "foo")))
 
            ;; Write empty string.  Used for creation of temporary files.
-           ;; Since Emacs 27.1.
-           (when (fboundp 'make-empty-file)
-             (with-no-warnings
-               (should-error
-                (make-empty-file tmp-name)
-                :type 'file-already-exists)
-               (delete-file tmp-name)
-               (make-empty-file tmp-name)
-               (with-temp-buffer
-                 (insert-file-contents tmp-name)
-                 (should (string-equal (buffer-string) "")))))
+           (should-error
+            (make-empty-file tmp-name)
+            :type 'file-already-exists)
+           (delete-file tmp-name)
+           (make-empty-file tmp-name)
+           (with-temp-buffer
+             (insert-file-contents tmp-name)
+             (should (string-equal (buffer-string) "")))
 
            ;; Write partly.
            (with-temp-buffer
@@ -2511,8 +2503,7 @@ This checks also `file-name-as-directory', 
`file-name-directory',
                     (string-match-p
                      (if (and (null noninteractive)
                               (or (eq visit t) (null visit) (stringp visit)))
-                         (tramp-compat-rx
-                          bol "Wrote " (literal tmp-name) "\n" eos)
+                         (rx bol "Wrote " (literal tmp-name) "\n" eos)
                        (rx bos))
                      tramp--test-messages))))))
 
@@ -2542,8 +2533,6 @@ This checks also `file-name-as-directory', 
`file-name-directory',
   "Check that `file-precious-flag' is respected with Tramp in use."
   (skip-unless (tramp--test-enabled))
   (skip-unless (tramp--test-sh-p))
-  ;; The bug is fixed in Emacs 27.1.
-  (skip-unless (tramp--test-emacs27-p))
 
   (let* ((tmp-name (tramp--test-make-temp-name))
          (inhibit-message t)
@@ -2626,10 +2615,7 @@ This checks also `file-name-as-directory', 
`file-name-directory',
   "Check `copy-file'."
   (skip-unless (tramp--test-enabled))
 
-  ;; `filename-non-special' has been fixed in Emacs 27.1, see Bug#29579.
-  (dolist (quoted
-          (if (and (tramp--test-expensive-test-p) (tramp--test-emacs27-p))
-              '(nil t) '(nil)))
+  (dolist (quoted (if (tramp--test-expensive-test-p) '(nil t) '(nil)))
     (let ((tmp-name1 (tramp--test-make-temp-name nil quoted))
          (tmp-name2 (tramp--test-make-temp-name nil quoted))
          (tmp-name3 (tramp--test-make-temp-name 'local quoted)))
@@ -2738,10 +2724,7 @@ This checks also `file-name-as-directory', 
`file-name-directory',
   "Check `rename-file'."
   (skip-unless (tramp--test-enabled))
 
-  ;; `filename-non-special' has been fixed in Emacs 27.1, see Bug#29579.
-  (dolist (quoted
-          (if (and (tramp--test-expensive-test-p) (tramp--test-emacs27-p))
-              '(nil t) '(nil)))
+  (dolist (quoted  (if (tramp--test-expensive-test-p) '(nil t) '(nil)))
     (let ((tmp-name1 (tramp--test-make-temp-name nil quoted))
          (tmp-name2 (tramp--test-make-temp-name nil quoted))
          (tmp-name3 (tramp--test-make-temp-name 'local quoted)))
@@ -2925,13 +2908,11 @@ This tests also `file-directory-p' and 
`file-accessible-directory-p'."
       (delete-directory tmp-name1 'recursive)
       (should-not (file-directory-p tmp-name1))
 
-      ;; Trashing directories works only since Emacs 27.1.  It doesn't
-      ;; work when `system-move-file-to-trash' is defined (on MS
-      ;; Windows and macOS), for encrypted remote directories and for
-      ;; ange-ftp.
+      ;; Trashing directories doesn't work when
+      ;; `system-move-file-to-trash' is defined (on MS Windows and
+      ;; macOS), for encrypted remote directories and for ange-ftp.
       (when (and (not (fboundp 'system-move-file-to-trash))
-                (not (tramp--test-crypt-p)) (not (tramp--test-ftp-p))
-                (tramp--test-emacs27-p))
+                (not (tramp--test-crypt-p)) (not (tramp--test-ftp-p)))
        (let ((trash-directory (tramp--test-make-temp-name 'local quoted))
              (delete-by-moving-to-trash t))
          (make-directory trash-directory)
@@ -3200,9 +3181,6 @@ This tests also `file-directory-p' and 
`file-accessible-directory-p'."
   ;; (this is performed by `dired').  If FULL is nil, it shows just
   ;; one file.  So we refrain from testing.
   (skip-unless (not (tramp--test-ange-ftp-p)))
-  ;; `insert-directory' of encrypted remote directories works only
-  ;; since Emacs 27.1.
-  (skip-unless (or (not (tramp--test-crypt-p)) (tramp--test-emacs27-p)))
 
   (dolist (quoted (if (tramp--test-expensive-test-p) '(nil t) '(nil)))
     (let* ((tmp-name1
@@ -3220,26 +3198,23 @@ This tests also `file-directory-p' and 
`file-accessible-directory-p'."
            (with-temp-buffer
              (insert-directory tmp-name1 nil)
              (goto-char (point-min))
-             (should (looking-at-p (tramp-compat-rx (literal tmp-name1)))))
+             (should (looking-at-p (rx (literal tmp-name1)))))
            (with-temp-buffer
              (insert-directory (file-name-as-directory tmp-name1) nil)
              (goto-char (point-min))
              (should
-               (looking-at-p
-                (tramp-compat-rx (literal (file-name-as-directory 
tmp-name1))))))
+               (looking-at-p (rx (literal (file-name-as-directory 
tmp-name1))))))
            (with-temp-buffer
              (insert-directory tmp-name1 "-al")
              (goto-char (point-min))
              (should
-              (looking-at-p
-               (tramp-compat-rx bol (+ nonl) blank (literal tmp-name1) eol))))
+              (looking-at-p (rx bol (+ nonl) blank (literal tmp-name1) eol))))
            (with-temp-buffer
              (insert-directory (file-name-as-directory tmp-name1) "-al")
              (goto-char (point-min))
              (should
               (looking-at-p
-               (tramp-compat-rx
-                bol (+ nonl) blank (literal tmp-name1) "/" eol))))
+               (rx bol (+ nonl) blank (literal tmp-name1) "/" eol))))
            (with-temp-buffer
              (insert-directory
               (file-name-as-directory tmp-name1) "-al" nil 'full-directory-p)
@@ -3300,7 +3275,7 @@ This tests also `file-directory-p' and 
`file-accessible-directory-p'."
           (tmp-name4 (expand-file-name "bar" tmp-name2))
           (ert-remote-temporary-file-directory
            (funcall
-            (if quoted #'tramp-compat-file-name-quote #'identity)
+            (if quoted #'file-name-quote #'identity)
             ert-remote-temporary-file-directory))
           buffer)
       (unwind-protect
@@ -3323,14 +3298,14 @@ This tests also `file-directory-p' and 
`file-accessible-directory-p'."
              (goto-char (point-min))
              (should
               (re-search-forward
-               (tramp-compat-rx
+               (rx
                 (literal
                  (file-relative-name
                   tmp-name1 ert-remote-temporary-file-directory)))))
              (goto-char (point-min))
              (should
               (re-search-forward
-               (tramp-compat-rx
+               (rx
                 (literal
                  (file-relative-name
                   tmp-name2 ert-remote-temporary-file-directory))))))
@@ -3345,14 +3320,14 @@ This tests also `file-directory-p' and 
`file-accessible-directory-p'."
              (goto-char (point-min))
              (should
               (re-search-forward
-               (tramp-compat-rx
+               (rx
                 (literal
                  (file-relative-name
                   tmp-name3 ert-remote-temporary-file-directory)))))
              (goto-char (point-min))
              (should
               (re-search-forward
-               (tramp-compat-rx
+               (rx
                 (literal
                  (file-relative-name
                   tmp-name4
@@ -3375,14 +3350,14 @@ This tests also `file-directory-p' and 
`file-accessible-directory-p'."
              (goto-char (point-min))
              (should
               (re-search-forward
-               (tramp-compat-rx
+               (rx
                 (literal
                  (file-relative-name
                   tmp-name3 ert-remote-temporary-file-directory)))))
              (goto-char (point-min))
              (should
               (re-search-forward
-               (tramp-compat-rx
+               (rx
                 (literal
                  (file-relative-name
                   tmp-name4
@@ -3552,7 +3527,7 @@ This tests also `access-file', `file-readable-p',
              (should
               (string-equal
                (funcall
-                (if quoted #'tramp-compat-file-name-quote #'identity)
+                (if quoted #'file-name-quote #'identity)
                 (file-attribute-type attr))
                (file-remote-p (file-truename tmp-name1) 'localname)))
              (delete-file tmp-name2))
@@ -3616,9 +3591,6 @@ This tests also `access-file', `file-readable-p',
               (cons '(nil "perl" nil)
                     tramp-connection-properties)))
         (progn
-          ;; `ert-test-result-duration' exists since Emacs 27.  It
-          ;; doesn't hurt to call it unconditionally, because
-          ;; `skip-unless' hides the error.
           (skip-unless (< (ert-test-result-duration result) 300))
           (funcall (ert-test-body ert-test)))
        (ert-skip (format "Test `%s' must run before" ',test)))))
@@ -3647,9 +3619,6 @@ This tests also `access-file', `file-readable-p',
                  (nil "id" nil))
                tramp-connection-properties)))
         (progn
-          ;; `ert-test-result-duration' exists since Emacs 27.  It
-          ;; doesn't hurt to call it unconditionally, because
-          ;; `skip-unless' hides the error.
           (skip-unless (< (ert-test-result-duration result) 300))
           (funcall (ert-test-body ert-test)))
        (ert-skip (format "Test `%s' must run before" ',test)))))
@@ -3676,9 +3645,6 @@ This tests also `access-file', `file-readable-p',
                  (nil "readlink" nil))
                tramp-connection-properties)))
         (progn
-          ;; `ert-test-result-duration' exists since Emacs 27.  It
-          ;; doesn't hurt to call it unconditionally, because
-          ;; `skip-unless' hides the error.
           (skip-unless (< (ert-test-result-duration result) 300))
           (funcall (ert-test-body ert-test)))
        (ert-skip (format "Test `%s' must run before" ',test)))))
@@ -3714,9 +3680,9 @@ They might differ only in time attributes or directory 
size."
     ;; few seconds).  We use a test start time minus 10 seconds, in
     ;; order to compensate a possible timestamp resolution higher than
     ;; a second on the remote machine.
-    (when (or (tramp-compat-time-equal-p
+    (when (or (time-equal-p
               (file-attribute-modification-time attr1) tramp-time-dont-know)
-             (tramp-compat-time-equal-p
+             (time-equal-p
               (file-attribute-modification-time attr2) tramp-time-dont-know))
       (setcar (nthcdr 5 attr1) tramp-time-dont-know)
       (setcar (nthcdr 5 attr2) tramp-time-dont-know))
@@ -3727,9 +3693,9 @@ They might differ only in time attributes or directory 
size."
             (float-time (file-attribute-modification-time attr2)))
       (setcar (nthcdr 5 attr2) tramp-time-dont-know))
     ;; Status change time.  Ditto.
-    (when (or (tramp-compat-time-equal-p
+    (when (or (time-equal-p
               (file-attribute-status-change-time attr1) tramp-time-dont-know)
-             (tramp-compat-time-equal-p
+             (time-equal-p
               (file-attribute-status-change-time attr2) tramp-time-dont-know))
       (setcar (nthcdr 6 attr1) tramp-time-dont-know)
       (setcar (nthcdr 6 attr2) tramp-time-dont-know))
@@ -3868,7 +3834,7 @@ This tests also `file-executable-p', `file-writable-p' 
and `set-file-modes'."
              (should
               (string-equal
                (funcall
-                (if quoted #'tramp-compat-file-name-unquote #'identity)
+                (if quoted #'file-name-unquote #'identity)
                 (file-remote-p tmp-name1 'localname))
                (file-symlink-p tmp-name2)))
              ;; Both report the modes of `tmp-name1'.
@@ -3938,7 +3904,7 @@ This tests also `make-symbolic-link', `file-truename' and 
`add-name-to-file'."
            (should
             (string-equal
              (funcall
-              (if quoted #'tramp-compat-file-name-unquote #'identity)
+              (if quoted #'file-name-unquote #'identity)
               (file-remote-p tmp-name1 'localname))
              (file-symlink-p tmp-name2)))
            (when (tramp--test-expensive-test-p)
@@ -3956,14 +3922,14 @@ This tests also `make-symbolic-link', `file-truename' 
and `add-name-to-file'."
              (should
               (string-equal
                (funcall
-                (if quoted #'tramp-compat-file-name-unquote #'identity)
+                (if quoted #'file-name-unquote #'identity)
                 (file-remote-p tmp-name1 'localname))
                (file-symlink-p tmp-name2))))
            (make-symbolic-link tmp-name1 tmp-name2 'ok-if-already-exists)
            (should
             (string-equal
              (funcall
-              (if quoted #'tramp-compat-file-name-unquote #'identity)
+              (if quoted #'file-name-unquote #'identity)
               (file-remote-p tmp-name1 'localname))
              (file-symlink-p tmp-name2)))
            ;; If we use the local part of `tmp-name1', it shall still work.
@@ -3973,7 +3939,7 @@ This tests also `make-symbolic-link', `file-truename' and 
`add-name-to-file'."
            (should
             (string-equal
              (funcall
-              (if quoted #'tramp-compat-file-name-unquote #'identity)
+              (if quoted #'file-name-unquote #'identity)
               (file-remote-p tmp-name1 'localname))
              (file-symlink-p tmp-name2)))
            ;; `tmp-name3' is a local file name.  Therefore, the link
@@ -3993,7 +3959,7 @@ This tests also `make-symbolic-link', `file-truename' and 
`add-name-to-file'."
            (should
             (string-equal
              (funcall
-              (if quoted #'tramp-compat-file-name-unquote #'identity)
+              (if quoted #'file-name-unquote #'identity)
               (file-remote-p tmp-name1 'localname))
              (file-symlink-p tmp-name5)))
            ;; Check, that files in symlinked directories still work.
@@ -4082,15 +4048,13 @@ This tests also `make-symbolic-link', `file-truename' 
and `add-name-to-file'."
                       "/[penguin/motd]" "/penguin:motd:")))
              (delete-file tmp-name2)
              (make-symbolic-link
-              (funcall
-               (if quoted #'tramp-compat-file-name-unquote #'identity) penguin)
+              (funcall (if quoted #'file-name-unquote #'identity) penguin)
               tmp-name2)
              (should (file-symlink-p tmp-name2))
              (should
               (string-equal
                (file-truename tmp-name2)
-               (tramp-compat-file-name-quote
-                (concat (file-remote-p tmp-name2) penguin)))))
+               (file-name-quote (concat (file-remote-p tmp-name2) penguin)))))
            ;; `tmp-name3' is a local file name.
            ;; `make-symbolic-link' might not be permitted on w32 systems.
            (unless (tramp--test-windows-nt-p)
@@ -4102,7 +4066,7 @@ This tests also `make-symbolic-link', `file-truename' and 
`add-name-to-file'."
              (should
               (string-equal
                (file-truename tmp-name1)
-               (tramp-compat-file-name-unquote (file-truename tmp-name3))))))
+               (file-name-unquote (file-truename tmp-name3))))))
 
        ;; Cleanup.
        (ignore-errors
@@ -4175,7 +4139,7 @@ This tests also `make-symbolic-link', `file-truename' and 
`add-name-to-file'."
       (let* ((dir1
              (directory-file-name
               (funcall
-               (if quoted #'tramp-compat-file-name-quote #'identity)
+               (if quoted #'file-name-quote #'identity)
                ert-remote-temporary-file-directory)))
             (dir2 (file-name-as-directory dir1)))
        (should (string-equal (file-truename dir1) (expand-file-name dir1)))
@@ -4204,12 +4168,12 @@ This tests also `make-symbolic-link', `file-truename' 
and `add-name-to-file'."
            (skip-unless (set-file-times tmp-name1 (seconds-to-time 60)))
            ;; Dumb remote shells without perl(1) or stat(1) are not
            ;; able to return the date correctly.  They say "don't know".
-           (unless (tramp-compat-time-equal-p
+           (unless (time-equal-p
                     (file-attribute-modification-time
                      (file-attributes tmp-name1))
                     tramp-time-dont-know)
              (should
-              (tramp-compat-time-equal-p
+              (time-equal-p
                 (file-attribute-modification-time (file-attributes tmp-name1))
                (seconds-to-time 60)))
              ;; Setting the time for not existing files shall fail.
@@ -4228,7 +4192,7 @@ This tests also `make-symbolic-link', `file-truename' and 
`add-name-to-file'."
                (with-no-warnings
                  (set-file-times tmp-name1 (seconds-to-time 60) 'nofollow)
                  (should
-                  (tramp-compat-time-equal-p
+                  (time-equal-p
                     (file-attribute-modification-time
                     (file-attributes tmp-name1))
                    (seconds-to-time 60)))))))
@@ -4274,10 +4238,7 @@ This tests also `make-symbolic-link', `file-truename' 
and `add-name-to-file'."
   (skip-unless (file-acl ert-remote-temporary-file-directory))
   (skip-unless (not (tramp--test-crypt-p)))
 
-  ;; `filename-non-special' has been fixed in Emacs 27.1, see Bug#29579.
-  (dolist (quoted
-          (if (and (tramp--test-expensive-test-p) (tramp--test-emacs27-p))
-              '(nil t) '(nil)))
+  (dolist (quoted (if (tramp--test-expensive-test-p) '(nil t) '(nil)))
     (let ((tmp-name1 (tramp--test-make-temp-name nil quoted))
          (tmp-name2 (tramp--test-make-temp-name nil quoted))
          (tmp-name3 (tramp--test-make-temp-name 'local quoted)))
@@ -4354,10 +4315,7 @@ This tests also `make-symbolic-link', `file-truename' 
and `add-name-to-file'."
               '(nil nil nil nil))))
   (skip-unless (not (tramp--test-crypt-p)))
 
-  ;; `filename-non-special' has been fixed in Emacs 27.1, see Bug#29579.
-  (dolist (quoted
-          (if (and (tramp--test-expensive-test-p) (tramp--test-emacs27-p))
-              '(nil t) '(nil)))
+  (dolist (quoted (if (tramp--test-expensive-test-p) '(nil t) '(nil)))
     (let ((tmp-name1 (tramp--test-make-temp-name nil quoted))
          (tmp-name2 (tramp--test-make-temp-name nil quoted))
          (tmp-name3 (tramp--test-make-temp-name 'local quoted)))
@@ -4862,9 +4820,10 @@ This tests also `make-symbolic-link', `file-truename' 
and `add-name-to-file'."
       (unless (tramp--test-sshfs-p)
        (unwind-protect
            (with-temp-buffer
-           (setq command '("cat")
-                 proc
-                 (apply #'start-file-process "test4" (current-buffer) command))
+             (setq command '("cat")
+                   proc
+                   (apply
+                    #'start-file-process "test4" (current-buffer) command))
              (should (processp proc))
              (should (equal (process-status proc) 'run))
              (should (equal (process-get proc 'remote-command) command))
@@ -4884,12 +4843,7 @@ This tests also `make-symbolic-link', `file-truename' 
and `add-name-to-file'."
       ;; Process connection type.
       (when (and (tramp--test-sh-p)
                 (not (tramp-direct-async-process-p))
-                ;; `executable-find' has changed the number of
-                ;; parameters in Emacs 27.1, so we use `apply' for
-                ;; older Emacsen.
-                (ignore-errors
-                  (with-no-warnings
-                    (apply #'executable-find '("hexdump" remote)))))
+                (executable-find "hexdump" 'remote))
        (dolist (process-connection-type '(nil pipe t pty))
          (unwind-protect
              (with-temp-buffer
@@ -4946,33 +4900,29 @@ This tests also `make-symbolic-link', `file-truename' 
and `add-name-to-file'."
   "Define ert test `TEST-direct-async' for direct async processes.
 If UNSTABLE is non-nil, the test is tagged as `:unstable'."
   (declare (indent 1))
-  ;; `make-process' supports file name handlers since Emacs 27.  We
-  ;; cannot use `tramp--test-always' during compilation of the macro.
-  (when (let ((file-name-handler-alist '(("" . (lambda (&rest _) t)))))
-         (ignore-errors (make-process :file-handler t)))
-    `(ert-deftest ,(intern (concat (symbol-name test) "-direct-async")) ()
-       ;; This is the docstring.  However, it must be expanded to a
-       ;; string inside the macro.  No idea.
-       ;; (concat (ert-test-documentation (get ',test 'ert--test))
-       ;;         "\nUse direct async process.")
-       :tags (append '(:expensive-test :tramp-asynchronous-processes)
-                    (and ,unstable '(:unstable)))
-       (skip-unless (tramp--test-enabled))
-       (let ((default-directory ert-remote-temporary-file-directory)
-            (ert-test (ert-get-test ',test))
-            (tramp-connection-properties
-             (cons '(nil "direct-async-process" t)
-                   tramp-connection-properties)))
-        (skip-unless (tramp-direct-async-process-p))
-        ;; We do expect an established connection already,
-        ;; `file-truename' does it by side-effect.  Suppress
-        ;; `tramp--test-enabled', in order to keep the connection.
-        ;; Suppress "Process ... finished" messages.
-        (cl-letf (((symbol-function #'tramp--test-enabled) 
#'tramp--test-always)
-                  ((symbol-function #'internal-default-process-sentinel)
-                   #'ignore))
-          (file-truename ert-remote-temporary-file-directory)
-          (funcall (ert-test-body ert-test)))))))
+  `(ert-deftest ,(intern (concat (symbol-name test) "-direct-async")) ()
+     ;; This is the docstring.  However, it must be expanded to a
+     ;; string inside the macro.  No idea.
+     ;; (concat (ert-test-documentation (get ',test 'ert--test))
+     ;;         "\nUse direct async process.")
+     :tags (append '(:expensive-test :tramp-asynchronous-processes)
+                  (and ,unstable '(:unstable)))
+     (skip-unless (tramp--test-enabled))
+     (let ((default-directory ert-remote-temporary-file-directory)
+          (ert-test (ert-get-test ',test))
+          (tramp-connection-properties
+           (cons '(nil "direct-async-process" t)
+                 tramp-connection-properties)))
+       (skip-unless (tramp-direct-async-process-p))
+       ;; We do expect an established connection already,
+       ;; `file-truename' does it by side-effect.  Suppress
+       ;; `tramp--test-enabled', in order to keep the connection.
+       ;; Suppress "Process ... finished" messages.
+       (cl-letf (((symbol-function #'tramp--test-enabled) #'tramp--test-always)
+                ((symbol-function #'internal-default-process-sentinel)
+                 #'ignore))
+        (file-truename ert-remote-temporary-file-directory)
+        (funcall (ert-test-body ert-test))))))
 
 (tramp--test-deftest-direct-async-process tramp-test29-start-file-process)
 
@@ -4983,24 +4933,21 @@ If UNSTABLE is non-nil, the test is tagged as 
`:unstable'."
                      '(:unstable)))
   (skip-unless (tramp--test-enabled))
   (skip-unless (tramp--test-supports-processes-p))
-  ;; `make-process' supports file name handlers since Emacs 27.
-  (skip-unless (tramp--test-emacs27-p))
 
   (dolist (quoted (if (tramp--test-expensive-test-p) '(nil t) '(nil)))
     (let ((default-directory ert-remote-temporary-file-directory)
          (tmp-name (tramp--test-make-temp-name nil quoted))
          kill-buffer-query-functions command proc)
-      (with-no-warnings (should-not (make-process)))
+      (should-not (make-process))
 
       ;; Simple process.
       (unwind-protect
          (with-temp-buffer
            (setq command '("cat")
                  proc
-                 (with-no-warnings
-                   (make-process
-                    :name "test1" :buffer (current-buffer) :command command
-                    :file-handler t)))
+                 (make-process
+                  :name "test1" :buffer (current-buffer) :command command
+                  :file-handler t))
            (should (processp proc))
            (should (equal (process-status proc) 'run))
            (should (equal (process-get proc 'remote-command) command))
@@ -5022,10 +4969,9 @@ If UNSTABLE is non-nil, the test is tagged as 
`:unstable'."
            (should (file-exists-p tmp-name))
            (setq command `("cat" ,(file-name-nondirectory tmp-name))
                  proc
-                 (with-no-warnings
-                   (make-process
-                    :name "test2" :buffer (current-buffer) :command command
-                    :file-handler t)))
+                 (make-process
+                  :name "test2" :buffer (current-buffer) :command command
+                  :file-handler t))
            (should (processp proc))
            (should (equal (process-get proc 'remote-command) command))
            ;; Read output.
@@ -5044,13 +4990,12 @@ If UNSTABLE is non-nil, the test is tagged as 
`:unstable'."
          (with-temp-buffer
            (setq command '("cat")
                  proc
-                 (with-no-warnings
-                   (make-process
-                    :name "test3" :buffer (current-buffer) :command command
-                    :filter
-                    (lambda (p s)
-                      (with-current-buffer (process-buffer p) (insert s)))
-                    :file-handler t)))
+                 (make-process
+                  :name "test3" :buffer (current-buffer) :command command
+                  :filter
+                  (lambda (p s)
+                    (with-current-buffer (process-buffer p) (insert s)))
+                  :file-handler t))
            (should (processp proc))
            (should (equal (process-status proc) 'run))
            (should (equal (process-get proc 'remote-command) command))
@@ -5071,11 +5016,9 @@ If UNSTABLE is non-nil, the test is tagged as 
`:unstable'."
            (with-temp-buffer
              (setq command '("cat")
                    proc
-                   (with-no-warnings
-                     (make-process
-                      :name "test4" :buffer (current-buffer) :command command
-                      :filter t
-                      :file-handler t)))
+                   (make-process
+                    :name "test4" :buffer (current-buffer) :command command
+                    :filter t :file-handler t))
              (should (processp proc))
              (should (equal (process-status proc) 'run))
              (should (equal (process-get proc 'remote-command) command))
@@ -5096,13 +5039,12 @@ If UNSTABLE is non-nil, the test is tagged as 
`:unstable'."
          (with-temp-buffer
            (setq command '("cat")
                  proc
-                 (with-no-warnings
-                   (make-process
-                    :name "test5" :buffer (current-buffer) :command command
-                    :sentinel
-                    (lambda (p s)
-                      (with-current-buffer (process-buffer p) (insert s)))
-                    :file-handler t)))
+                 (make-process
+                  :name "test5" :buffer (current-buffer) :command command
+                  :sentinel
+                  (lambda (p s)
+                    (with-current-buffer (process-buffer p) (insert s)))
+                  :file-handler t))
            (should (processp proc))
            (should (equal (process-status proc) 'run))
            (should (equal (process-get proc 'remote-command) command))
@@ -5128,11 +5070,9 @@ If UNSTABLE is non-nil, the test is tagged as 
`:unstable'."
              (with-temp-buffer
                (setq command '("cat" "/does-not-exist")
                      proc
-                     (with-no-warnings
-                       (make-process
-                        :name "test6" :buffer (current-buffer) :command  
command
-                        :stderr stderr
-                        :file-handler t)))
+                     (make-process
+                      :name "test6" :buffer (current-buffer) :command  command
+                      :stderr stderr :file-handler t))
                (should (processp proc))
                (should (equal (process-get proc 'remote-command) command))
                ;; Read output.
@@ -5161,11 +5101,9 @@ If UNSTABLE is non-nil, the test is tagged as 
`:unstable'."
            (with-temp-buffer
              (setq command '("cat" "/does-not-exist")
                    proc
-                   (with-no-warnings
-                     (make-process
-                      :name "test7" :buffer (current-buffer) :command command
-                      :stderr tmp-name
-                      :file-handler t)))
+                   (make-process
+                    :name "test7" :buffer (current-buffer) :command command
+                    :stderr tmp-name :file-handler t))
              (should (processp proc))
              (should (equal (process-get proc 'remote-command) command))
              ;; Read stderr.
@@ -5186,12 +5124,7 @@ If UNSTABLE is non-nil, the test is tagged as 
`:unstable'."
       ;; Process connection type.
       (when (and (tramp--test-sh-p)
                 (not (tramp-direct-async-process-p))
-                ;; `executable-find' has changed the number of
-                ;; parameters in Emacs 27.1, so we use `apply' for
-                ;; older Emacsen.
-                (ignore-errors
-                  (with-no-warnings
-                    (apply #'executable-find '("hexdump" remote)))))
+                (executable-find "hexdump" 'remote))
        (dolist (connection-type '(nil pipe t pty))
          ;; `process-connection-type' is taken when
          ;; `:connection-type' is nil.
@@ -5201,15 +5134,14 @@ If UNSTABLE is non-nil, the test is tagged as 
`:unstable'."
                (with-temp-buffer
                  (setq command '("hexdump" "-v" "-e" "/1 \"%02X\n\"")
                        proc
-                       (with-no-warnings
-                         (make-process
-                          :name
-                          (format "test8-%s-%s"
-                                  connection-type process-connection-type)
-                          :buffer (current-buffer)
-                          :connection-type connection-type
-                          :command command
-                          :file-handler t)))
+                       (make-process
+                        :name
+                        (format "test8-%s-%s"
+                                connection-type process-connection-type)
+                        :buffer (current-buffer)
+                        :connection-type connection-type
+                        :command command
+                        :file-handler t))
                  (should (processp proc))
                  (should (equal (process-status proc) 'run))
                  (should (equal (process-get proc 'remote-command) command))
@@ -5245,8 +5177,6 @@ If UNSTABLE is non-nil, the test is tagged as 
`:unstable'."
   (skip-unless (tramp--test-sh-p))
   (skip-unless (not (tramp--test-windows-nt-p)))
   (skip-unless (not (tramp--test-crypt-p)))
-  ;; Since Emacs 27.1.
-  (skip-unless (macrop 'with-connection-local-variables))
 
   ;; We must use `file-truename' for the temporary directory, in
   ;; order to establish the connection prior running an asynchronous
@@ -5288,8 +5218,6 @@ If UNSTABLE is non-nil, the test is tagged as 
`:unstable'."
   (skip-unless (tramp--test-sh-p))
   (skip-unless (not (tramp--test-windows-nt-p)))
   (skip-unless (not (tramp--test-crypt-p)))
-  ;; Since Emacs 27.1.
-  (skip-unless (macrop 'with-connection-local-variables))
   ;; Since Emacs 29.1.
   (skip-unless (boundp 'signal-process-functions))
 
@@ -5416,11 +5344,9 @@ If UNSTABLE is non-nil, the test is tagged as 
`:unstable'."
 INPUT, if non-nil, is a string sent to the process."
   (let ((proc (async-shell-command command output-buffer error-buffer))
        (delete-exited-processes t))
-    ;; Since Emacs 27.1.
-    (when (macrop 'with-connection-local-variables)
-      (should (equal (process-get proc 'remote-command)
-                    (with-connection-local-variables
-                     `(,shell-file-name ,shell-command-switch ,command)))))
+    (should (equal (process-get proc 'remote-command)
+                  (with-connection-local-variables
+                   `(,shell-file-name ,shell-command-switch ,command))))
     (cl-letf (((symbol-function #'shell-command-sentinel) #'ignore))
       (when (stringp input)
        (process-send-string proc input))
@@ -5441,10 +5367,6 @@ INPUT, if non-nil, is a string sent to the process."
   :tags '(:expensive-test)
   (skip-unless (tramp--test-enabled))
   (skip-unless (tramp--test-supports-processes-p))
-  ;; Prior Emacs 27, `shell-file-name' was hard coded as "/bin/sh" for
-  ;; remote processes in Emacs.  That doesn't work for tramp-adb.el.
-  (when (tramp--test-adb-p)
-    (skip-unless (tramp--test-emacs27-p)))
 
   (dolist (quoted (if (tramp--test-expensive-test-p) '(nil t) '(nil)))
     (let ((tmp-name (tramp--test-make-temp-name nil quoted))
@@ -5512,7 +5434,7 @@ INPUT, if non-nil, is a string sent to the process."
              (should
               (string-match-p
                ;; Some shells echo, for example the "adb" or "docker" methods.
-               (tramp-compat-rx
+               (rx
                 bos (** 1 2 (literal (file-name-nondirectory tmp-name)) "\n")
                 eos)
                (buffer-string))))
@@ -5520,10 +5442,8 @@ INPUT, if non-nil, is a string sent to the process."
          ;; Cleanup.
          (ignore-errors (delete-file tmp-name))))))
 
-  ;; Test `async-shell-command-width'.  It exists since Emacs 26.1,
-  ;; but seems to work since Emacs 27.1 only.
-  (when (and (tramp--test-asynchronous-processes-p)
-            (tramp--test-sh-p) (tramp--test-emacs27-p))
+  ;; Test `async-shell-command-width'.
+  (when (and (tramp--test-asynchronous-processes-p) (tramp--test-sh-p))
     (let* ((async-shell-command-width 1024)
           (default-directory ert-remote-temporary-file-directory)
           (cols (ignore-errors
@@ -5543,8 +5463,6 @@ INPUT, if non-nil, is a string sent to the process."
   (skip-unless (tramp--test-enabled))
   (skip-unless nil)
   (skip-unless (tramp--test-supports-processes-p))
-  ;; Prior Emacs 27, `shell-command-dont-erase-buffer' wasn't working properly.
-  (skip-unless (tramp--test-emacs27-p))
 
   ;; (message "   s-c-d-e-b current-buffer buffer-string point")
   ;; (message "===============================================")
@@ -5719,8 +5637,7 @@ INPUT, if non-nil, is a string sent to the process."
        ;; Variable is set.
        (should
         (string-match-p
-         (tramp-compat-rx (literal envvar))
-         (funcall this-shell-command-to-string "set"))))
+         (rx (literal envvar)) (funcall this-shell-command-to-string "set"))))
 
       (unless (tramp-direct-async-process-p)
        ;; We force a reconnect, in order to have a clean environment.
@@ -5746,7 +5663,7 @@ INPUT, if non-nil, is a string sent to the process."
            ;; Variable is unset.
            (should-not
             (string-match-p
-             (tramp-compat-rx (literal envvar))
+             (rx (literal envvar))
              ;; We must remove PS1, the output is truncated otherwise.
              ;; We must suppress "_=VAR...".
              (funcall
@@ -5791,13 +5708,10 @@ INPUT, if non-nil, is a string sent to the process."
     (dolist (dir '("/mock:localhost#11111:" "/mock:localhost#22222:"))
       (tramp-cleanup-connection (tramp-dissect-file-name dir)))))
 
-;; Connection-local variables are enabled per default since Emacs 27.1.
 (ert-deftest tramp-test34-connection-local-variables ()
   "Check that connection-local variables are enabled."
   :tags '(:expensive-test)
   (skip-unless (tramp--test-enabled))
-  ;; Since Emacs 27.1.
-  (skip-unless (macrop 'with-connection-local-variables))
 
   (let* ((default-directory ert-remote-temporary-file-directory)
         (tmp-name1 (tramp--test-make-temp-name))
@@ -5861,19 +5775,12 @@ INPUT, if non-nil, is a string sent to the process."
   :tags '(:expensive-test :tramp-asynchronous-processes)
   (skip-unless (tramp--test-enabled))
   (skip-unless (tramp--test-supports-processes-p))
-  ;; Prior Emacs 27, `shell-file-name' was hard coded as "/bin/sh" for
-  ;; remote processes in Emacs.  That doesn't work for tramp-adb.el.
-  (when (tramp--test-adb-p)
-    (skip-unless (tramp--test-emacs27-p)))
 
   (let ((default-directory ert-remote-temporary-file-directory)
        explicit-shell-file-name kill-buffer-query-functions
        connection-local-profile-alist connection-local-criteria-alist)
     (unwind-protect
        (progn
-         ;; `shell-mode' would ruin our test, because it deletes all
-         ;; buffer local variables.  Not needed in Emacs 27.1.
-         (put 'explicit-shell-file-name 'permanent-local t)
          (connection-local-set-profile-variables
           'remote-sh
           `((explicit-shell-file-name . ,(tramp--test-shell-file-name))
@@ -5904,29 +5811,24 @@ INPUT, if non-nil, is a string sent to the process."
       (put 'explicit-shell-file-name 'permanent-local nil)
       (kill-buffer "*shell*"))))
 
-;; `exec-path' was introduced in Emacs 27.1.  `executable-find' has
-;; changed the number of parameters, so we use `apply' for older
-;; Emacsen.
 (ert-deftest tramp-test35-exec-path ()
   "Check `exec-path' and `executable-find'."
   (skip-unless (tramp--test-enabled))
   (skip-unless (tramp--test-supports-processes-p))
   (skip-unless (tramp--test-supports-set-file-modes-p))
-  ;; Since Emacs 27.1.
-  (skip-unless (fboundp 'exec-path))
 
   (let ((tmp-name (tramp--test-make-temp-name))
        (default-directory ert-remote-temporary-file-directory))
     (unwind-protect
        (progn
-         (should (consp (with-no-warnings (exec-path))))
+         (should (consp (exec-path)))
          ;; Last element is the `exec-directory'.
          (should
           (string-equal
-           (car (last (with-no-warnings (exec-path))))
+           (car (last (exec-path)))
            (file-remote-p default-directory 'localname)))
          ;; The shell "sh" shall always exist.
-         (should (apply #'executable-find '("sh" remote)))
+         (should (executable-find "sh" 'remote))
          ;; Since the last element in `exec-path' is the current
          ;; directory, an executable file in that directory will be
          ;; found.
@@ -5937,32 +5839,25 @@ INPUT, if non-nil, is a string sent to the process."
          (should (file-executable-p tmp-name))
          (should
           (string-equal
-           (apply
-            #'executable-find `(,(file-name-nondirectory tmp-name) remote))
+           (executable-find (file-name-nondirectory tmp-name) 'remote)
            (file-remote-p tmp-name 'localname)))
          (should-not
-          (apply
-           #'executable-find
-           `(,(concat (file-name-nondirectory tmp-name) "foo") remote))))
+          (executable-find
+           (concat (file-name-nondirectory tmp-name) "foo") 'remote)))
 
       ;; Cleanup.
       (ignore-errors (delete-file tmp-name)))))
 
 ;; This test is inspired by Bug#33781.
-;; `exec-path' was introduced in Emacs 27.1.  `executable-find' has
-;; changed the number of parameters, so we use `apply' for older
-;; Emacsen.
 (ert-deftest tramp-test35-remote-path ()
   "Check loooong `tramp-remote-path'."
   (skip-unless (tramp--test-enabled))
   (skip-unless (tramp--test-sh-p))
   (skip-unless (not (tramp--test-crypt-p)))
-  ;; Since Emacs 27.1.
-  (skip-unless (fboundp 'exec-path))
 
   (let* ((tmp-name (tramp--test-make-temp-name))
         (default-directory ert-remote-temporary-file-directory)
-         (orig-exec-path (with-no-warnings (exec-path)))
+         (orig-exec-path (exec-path))
          (tramp-remote-path tramp-remote-path)
         (orig-tramp-remote-path tramp-remote-path)
         path)
@@ -5972,14 +5867,13 @@ INPUT, if non-nil, is a string sent to the process."
           (setq tramp-remote-path
                 (cons (file-remote-p tmp-name 'localname) tramp-remote-path))
           (tramp-cleanup-connection tramp-test-vec 'keep-debug 'keep-password)
-          (should (equal (with-no-warnings (exec-path)) orig-exec-path))
+          (should (equal (exec-path) orig-exec-path))
           (setq tramp-remote-path orig-tramp-remote-path)
 
           ;; Double entries are removed.
           (setq tramp-remote-path (append '("/" "/") tramp-remote-path))
           (tramp-cleanup-connection tramp-test-vec 'keep-debug 'keep-password)
-          (should
-          (equal (with-no-warnings (exec-path)) (cons "/" orig-exec-path)))
+          (should (equal (exec-path) (cons "/" orig-exec-path)))
           (setq tramp-remote-path orig-tramp-remote-path)
 
           ;; We make a super long `tramp-remote-path'.
@@ -5997,7 +5891,7 @@ INPUT, if non-nil, is a string sent to the process."
                     `(,(file-remote-p dir 'localname))
                     (last orig-exec-path)))))
           (tramp-cleanup-connection tramp-test-vec 'keep-debug 'keep-password)
-          (should (equal (with-no-warnings (exec-path)) orig-exec-path))
+          (should (equal (exec-path) orig-exec-path))
           ;; Ignore trailing newline.
          (setq path (substring (shell-command-to-string "echo $PATH") nil -1))
          ;; The shell doesn't handle such long strings.
@@ -6009,7 +5903,7 @@ INPUT, if non-nil, is a string sent to the process."
             (string-equal
              path (mapconcat #'identity (butlast orig-exec-path) ":"))))
          ;; The shell "sh" shall always exist.
-         (should (apply #'executable-find '("sh" remote))))
+         (should (executable-find "sh" 'remote)))
 
       ;; Cleanup.
       (tramp-cleanup-connection tramp-test-vec 'keep-debug 'keep-password)
@@ -6129,7 +6023,7 @@ INPUT, if non-nil, is a string sent to the process."
                 (string-equal
                  (make-auto-save-file-name)
                  (funcall
-                  (if quoted #'tramp-compat-file-name-quote #'identity)
+                  (if quoted #'file-name-quote #'identity)
                   (expand-file-name
                    (format "#%s#" (file-name-nondirectory tmp-name1))
                    ert-remote-temporary-file-directory))))))
@@ -6154,7 +6048,7 @@ INPUT, if non-nil, is a string sent to the process."
                         ("|" . "__")
                         ("[" . "_l")
                         ("]" . "_r"))
-                      (tramp-compat-file-name-unquote tmp-name1)))
+                      (file-name-unquote tmp-name1)))
                     tmp-name2)))
                  (should (file-directory-p tmp-name2)))))
 
@@ -6178,7 +6072,7 @@ INPUT, if non-nil, is a string sent to the process."
                         ("|" . "__")
                         ("[" . "_l")
                         ("]" . "_r"))
-                      (tramp-compat-file-name-unquote tmp-name1)))
+                      (file-name-unquote tmp-name1)))
                     tmp-name2)))
                  (should (file-directory-p tmp-name2)))))
 
@@ -6234,7 +6128,7 @@ INPUT, if non-nil, is a string sent to the process."
              (find-backup-file-name tmp-name1)
              (list
               (funcall
-               (if quoted #'tramp-compat-file-name-quote #'identity)
+               (if quoted #'file-name-quote #'identity)
                (expand-file-name
                 (format "%s~" (file-name-nondirectory tmp-name1))
                 ert-remote-temporary-file-directory)))))))
@@ -6248,7 +6142,7 @@ INPUT, if non-nil, is a string sent to the process."
              (find-backup-file-name tmp-name1)
              (list
               (funcall
-               (if quoted #'tramp-compat-file-name-quote #'identity)
+               (if quoted #'file-name-quote #'identity)
                (expand-file-name
                 (format
                  "%s~"
@@ -6277,7 +6171,7 @@ INPUT, if non-nil, is a string sent to the process."
                (find-backup-file-name tmp-name1)
                (list
                 (funcall
-                 (if quoted #'tramp-compat-file-name-quote #'identity)
+                 (if quoted #'file-name-quote #'identity)
                  (expand-file-name
                   (format
                    "%s~"
@@ -6308,7 +6202,7 @@ INPUT, if non-nil, is a string sent to the process."
                (find-backup-file-name tmp-name1)
                (list
                 (funcall
-                 (if quoted #'tramp-compat-file-name-quote #'identity)
+                 (if quoted #'file-name-quote #'identity)
                  (expand-file-name
                   (format
                    "%s~"
@@ -6566,7 +6460,6 @@ INPUT, if non-nil, is a string sent to the process."
            (tramp-cleanup-connection
             tramp-test-vec 'keep-debug 'keep-password)))))))
 
-;; The functions were introduced in Emacs 26.1.
 (ert-deftest tramp-test40-make-nearby-temp-file ()
   "Check `make-nearby-temp-file' and `temporary-file-directory'."
   (skip-unless (tramp--test-enabled))
@@ -6598,12 +6491,6 @@ INPUT, if non-nil, is a string sent to the process."
     (delete-directory tmp-file)
     (should-not (file-exists-p tmp-file))))
 
-(defun tramp--test-emacs27-p ()
-  "Check for Emacs version >= 27.1.
-Some semantics has been changed for there, without new functions
-or variables, so we check the Emacs version directly."
-  (>= emacs-major-version 27))
-
 (defun tramp--test-emacs28-p ()
   "Check for Emacs version >= 28.1.
 Some semantics has been changed for there, without new functions
@@ -6638,7 +6525,7 @@ This is used in tests which we don't want to tag
                          :body nil :tags '(:tramp-asynchronous-processes))))
    ;; tramp-adb.el cannot apply multi-byte commands.
    (not (and (tramp--test-adb-p)
-            (string-match-p (tramp-compat-rx multibyte) default-directory)))))
+            (string-match-p (rx multibyte) default-directory)))))
 
 (defun tramp--test-crypt-p ()
   "Check, whether the remote directory is encrypted."
@@ -6802,10 +6689,7 @@ This requires restrictions of file name syntax."
 
 (defun tramp--test-check-files (&rest files)
   "Run a simple but comprehensive test over every file in FILES."
-  ;; `filename-non-special' has been fixed in Emacs 27.1, see Bug#29579.
-  (dolist (quoted
-          (if (and (tramp--test-expensive-test-p) (tramp--test-emacs27-p))
-              '(nil t) '(nil)))
+  (dolist (quoted (if (tramp--test-expensive-test-p) '(nil t) '(nil)))
     ;; We must use `file-truename' for the temporary directory,
     ;; because it could be located on a symlinked directory.  This
     ;; would let the test fail.
@@ -6855,7 +6739,7 @@ This requires restrictions of file name syntax."
                  (should
                   (string-equal
                    (funcall
-                    (if quoted #'tramp-compat-file-name-quote #'identity)
+                    (if quoted #'file-name-quote #'identity)
                     (file-attribute-type (file-attributes file3)))
                    (file-remote-p (file-truename file1) 'localname)))
                  ;; Check file contents.
@@ -6946,14 +6830,14 @@ This requires restrictions of file name syntax."
                    (should
                     (string-equal
                      (caar (directory-files-and-attributes
-                            file1 nil (tramp-compat-rx (literal elt1))))
+                            file1 nil (rx (literal elt1))))
                      elt1))
                    (should
                     (string-equal
                      (funcall
-                      (if quoted #'tramp-compat-file-name-quote #'identity)
+                      (if quoted #'file-name-quote #'identity)
                       (cadr (car (directory-files-and-attributes
-                                  file1 nil (tramp-compat-rx (literal 
elt1))))))
+                                  file1 nil (rx (literal elt1))))))
                      (file-remote-p (file-truename file2) 'localname)))
                    (delete-file file3)
                    (should-not (file-exists-p file3))))
@@ -6962,15 +6846,7 @@ This requires restrictions of file name syntax."
                ;; `default-directory' with special characters.  See
                ;; Bug#53846.
                (when (and (tramp--test-expensive-test-p)
-                          (tramp--test-supports-processes-p)
-                          ;; Prior Emacs 27, `shell-file-name' was
-                          ;; hard coded as "/bin/sh" for remote
-                          ;; processes in Emacs.  That doesn't work
-                          ;; for tramp-adb.el.  tramp-sshfs.el times
-                          ;; out for older Emacsen, reason unknown.
-                          (or (and (not (tramp--test-adb-p))
-                                   (not (tramp--test-sshfs-p)))
-                              (tramp--test-emacs27-p)))
+                          (tramp--test-supports-processes-p))
                  (let ((default-directory file1))
                    (dolist (this-shell-command
                             (append
@@ -7008,7 +6884,7 @@ This requires restrictions of file name syntax."
                    (goto-char (point-min))
                    (should
                     (re-search-forward
-                     (tramp-compat-rx
+                     (rx
                       bol (literal envvar)
                       "=" (literal (getenv envvar)) eol))))))))
 
@@ -7154,13 +7030,8 @@ This requires restrictions of file name syntax."
 (ert-deftest tramp-test43-file-system-info ()
   "Check that `file-system-info' returns proper values."
   (skip-unless (tramp--test-enabled))
-  ;; Since Emacs 27.1.
-  (skip-unless (fboundp 'file-system-info))
 
-  ;; `file-system-info' exists since Emacs 27.1.  We don't want to see
-  ;; compiler warnings for older Emacsen.
-  (when-let ((fsi (with-no-warnings
-                   (file-system-info ert-remote-temporary-file-directory))))
+  (when-let ((fsi (file-system-info ert-remote-temporary-file-directory)))
     (should (consp fsi))
     (should (= (length fsi) 3))
     (dotimes (i (length fsi))
@@ -7216,10 +7087,6 @@ process sentinels.  They shall not disturb each other."
                      '(:unstable)))
   (skip-unless (tramp--test-enabled))
   (skip-unless (tramp--test-supports-processes-p))
-  ;; Prior Emacs 27, `shell-file-name' was hard coded as "/bin/sh" for
-  ;; remote processes in Emacs.  That doesn't work for tramp-adb.el.
-  (when (tramp--test-adb-p)
-    (skip-unless (tramp--test-emacs27-p)))
   (skip-unless (not (tramp--test-docker-p)))
   (skip-unless (not (tramp--test-telnet-p)))
   (skip-unless (not (tramp--test-sshfs-p)))
@@ -7552,7 +7419,7 @@ process sentinels.  They shall not disturb each other."
     (dolist (tm '(t nil))
       (should
        (string-match-p
-       (tramp-compat-rx
+       (rx
         "Tramp loaded: nil" (+ (any "\n\r"))
         "Tramp loaded: nil" (+ (any "\n\r"))
         "Tramp loaded: " (literal (symbol-name tm)) (+ (any "\n\r")))
@@ -7600,7 +7467,7 @@ process sentinels.  They shall not disturb each other."
            (tramp-cleanup-all-connections))"))
     (should
      (string-match-p
-      (tramp-compat-rx
+      (rx
        "Loading "
        (literal
         (expand-file-name
diff --git a/test/lisp/wid-edit-tests.el b/test/lisp/wid-edit-tests.el
index 3f5fcea0c33..b379c7c91a8 100644
--- a/test/lisp/wid-edit-tests.el
+++ b/test/lisp/wid-edit-tests.el
@@ -267,6 +267,22 @@ return nil, even with a non-nil bubblep argument."
       (should child)
       (should (equal (widget-value widget) '(1 "One"))))))
 
+;; Bug#60501
+(ert-deftest widget-test-handle-spurious-inline ()
+  "Test the we can create a menu widget with an unnecessary :inline"
+  (with-temp-buffer
+    (widget-insert "Testing.\n\n")
+    (let* ((widget (widget-create 'menu-choice
+                                  :inline t
+                                  :value "*scratch*"
+                                  '(choice-item "*scratch*")))
+           (child (car (widget-get widget :children))))
+      (widget-insert "\n")
+      (use-local-map widget-keymap)
+      (widget-setup)
+      (should child)
+      (should (string-equal (widget-value widget) "*scratch*")))))
+
 (ert-deftest widget-test-option-can-handle-choice ()
   "Test that we can create a option widget with a choice correctly."
   (with-temp-buffer



reply via email to

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