emacs-diffs
[Top][All Lists]
Advanced

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

feature/android 8732a5bd78f 2/2: Merge remote-tracking branch 'origin/ma


From: Po Lu
Subject: feature/android 8732a5bd78f 2/2: Merge remote-tracking branch 'origin/master' into feature/android
Date: Sat, 28 Jan 2023 01:30:47 -0500 (EST)

branch: feature/android
commit 8732a5bd78fb4fb83612d8492eabf1b52200fb53
Merge: e3b50ec8ec1 cd42244fca8
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Merge remote-tracking branch 'origin/master' into feature/android
---
 admin/notes/tree-sitter/build-module/build.sh      |  17 ++-
 doc/emacs/misc.texi                                |   6 +
 doc/emacs/text.texi                                |  24 ++--
 doc/misc/erc.texi                                  |  47 ++++---
 doc/misc/eshell.texi                               |  28 +++--
 doc/misc/gnus.texi                                 |  11 --
 etc/NEWS                                           |   7 ++
 etc/NEWS.29                                        |  90 ++++++++------
 lisp/dired.el                                      |   2 +-
 lisp/emacs-lisp/byte-opt.el                        |  10 +-
 lisp/emacs-lisp/comp.el                            |  32 ++---
 lisp/eshell/esh-proc.el                            |   9 +-
 lisp/eshell/esh-util.el                            |  23 ++--
 lisp/eshell/esh-var.el                             | 136 ++++++++++++++-------
 lisp/find-dired.el                                 |   4 +-
 lisp/net/rcirc.el                                  |   3 +-
 lisp/net/tramp.el                                  |   4 +-
 lisp/org/ChangeLog.1                               |   2 +-
 lisp/outline.el                                    |  33 ++---
 lisp/progmodes/c-ts-mode.el                        |  34 +++++-
 lisp/progmodes/cc-engine.el                        |   6 +-
 lisp/progmodes/cc-vars.el                          |   3 +-
 lisp/progmodes/eglot.el                            |   4 +-
 lisp/progmodes/go-ts-mode.el                       |   4 +-
 lisp/progmodes/hideif.el                           |   8 +-
 lisp/progmodes/java-ts-mode.el                     |   2 +
 lisp/progmodes/js.el                               |  13 +-
 lisp/progmodes/project.el                          |   7 +-
 lisp/progmodes/ruby-ts-mode.el                     |   6 +
 lisp/progmodes/typescript-ts-mode.el               |  32 ++---
 lisp/simple.el                                     |   6 +
 lisp/startup.el                                    |   2 +-
 lisp/treesit.el                                    |  16 ++-
 lisp/vc/vc-bzr.el                                  |   4 +-
 lisp/vc/vc-dispatcher.el                           |  10 +-
 lisp/vc/vc-git.el                                  |   1 +
 lisp/vc/vc.el                                      |   3 +-
 lisp/window.el                                     |  16 ++-
 lisp/xt-mouse.el                                   |  22 ++--
 src/insdel.c                                       |  17 ++-
 src/xfaces.c                                       |   2 +-
 .../erc-scenarios-base-compat-rename-bouncer.el    |   4 +-
 test/lisp/erc/erc-scenarios-base-local-modules.el  |  15 +--
 test/lisp/erc/erc-scenarios-base-netid-samenet.el  |   4 +-
 .../erc/erc-scenarios-base-upstream-recon-soju.el  |   7 +-
 .../erc/erc-scenarios-base-upstream-recon-znc.el   |   7 +-
 test/lisp/eshell/esh-proc-tests.el                 |  13 ++
 test/lisp/eshell/esh-util-tests.el                 |  65 ++++++++++
 test/lisp/eshell/esh-var-tests.el                  | 102 ++++++++++++----
 .../lisp/progmodes/c-ts-mode-resources/indent.erts |  52 ++++++++
 test/lisp/progmodes/project-tests.el               |  10 ++
 51 files changed, 692 insertions(+), 293 deletions(-)

diff --git a/admin/notes/tree-sitter/build-module/build.sh 
b/admin/notes/tree-sitter/build-module/build.sh
index f0962940287..9dc674237ca 100755
--- a/admin/notes/tree-sitter/build-module/build.sh
+++ b/admin/notes/tree-sitter/build-module/build.sh
@@ -3,12 +3,17 @@
 lang=$1
 topdir="$PWD"
 
-if [ $(uname) == "Darwin" ]
-then
-    soext="dylib"
-else
-    soext="so"
-fi
+case $(uname) in
+    "Darwin")
+        soext="dylib"
+        ;;
+    *"MINGW"*)
+        soext="dll"
+        ;;
+    *)
+        soext="so"
+        ;;
+esac
 
 echo "Building ${lang}"
 
diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi
index 88d4188d144..3ee8ee5ee39 100644
--- a/doc/emacs/misc.texi
+++ b/doc/emacs/misc.texi
@@ -751,6 +751,8 @@ Command Output*"} (@code{shell-command-buffer-name}) buffer 
(if the
 output is long).  The variables @code{resize-mini-windows} and
 @code{max-mini-window-height} (@pxref{Minibuffer Edit}) control when
 Emacs should consider the output to be too long for the echo area.
+Note that customizing @code{shell-command-dont-erase-buffer},
+described below, can affect what is displayed in the echo area.
 
   For instance, one way to decompress a file named @file{foo.gz} is to
 type @kbd{M-! gunzip foo.gz @key{RET}}.  That shell command normally
@@ -867,6 +869,10 @@ Restores the position of point as it was before inserting 
the
 shell-command output.
 @end table
 
+Note that if this option is non-@code{nil}, the output shown in the
+echo area could be from more than just the last command, since the
+echo area just displays a portion of the output buffer.
+
 In case the output buffer is not the current buffer, shell command
 output is appended at the end of this buffer.
 
diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi
index 6e16e743a52..78e89d8031a 100644
--- a/doc/emacs/text.texi
+++ b/doc/emacs/text.texi
@@ -962,8 +962,6 @@ hooks.
 @cindex invisible lines
 
 @findex outline-mode
-@findex outline-minor-mode
-@vindex outline-minor-mode-prefix
 @vindex outline-mode-hook
   Outline mode is a major mode derived from Text mode, which is
 specialized for editing outlines.  It provides commands to navigate
@@ -986,6 +984,19 @@ previous visible line.  Killing the ellipsis at the end of 
a visible
 line really kills all the following invisible text associated with the
 ellipsis.
 
+@menu
+* Outline Minor Mode::  Outline mode to use with other major modes.
+* Outline Format::      What the text of an outline looks like.
+* Outline Motion::      Special commands for moving through outlines.
+* Outline Visibility::  Commands to control what is visible.
+* Outline Views::       Outlines and multiple views.
+* Foldout::             Folding means zooming in on outlines.
+@end menu
+
+@node Outline Minor Mode
+@subsection Outline Minor Mode
+
+@findex outline-minor-mode
   Outline minor mode is a buffer-local minor mode which provides the
 same commands as the major mode, Outline mode, but can be used in
 conjunction with other major modes.  You can type @kbd{M-x
@@ -994,6 +1005,7 @@ buffer, or use a file-local variable setting to enable it 
in a
 specific file (@pxref{File Variables}).
 
 @kindex C-c @@ @r{(Outline minor mode)}
+@vindex outline-minor-mode-prefix
   The major mode, Outline mode, provides special key bindings on the
 @kbd{C-c} prefix.  Outline minor mode provides similar bindings with
 @kbd{C-c @@} as the prefix; this is to reduce the conflicts with the
@@ -1018,14 +1030,6 @@ outline heading lines.  @kbd{TAB} cycles hiding, showing 
the
 sub-heading, and showing all for the current section.  @kbd{S-@key{TAB}}
 does the same for the entire buffer.
 
-@menu
-* Outline Format::      What the text of an outline looks like.
-* Outline Motion::      Special commands for moving through outlines.
-* Outline Visibility::  Commands to control what is visible.
-* Outline Views::       Outlines and multiple views.
-* Foldout::             Folding means zooming in on outlines.
-@end menu
-
 @node Outline Format
 @subsection Format of Outlines
 
diff --git a/doc/misc/erc.texi b/doc/misc/erc.texi
index 23cdcbff575..8030dfa4bb7 100644
--- a/doc/misc/erc.texi
+++ b/doc/misc/erc.texi
@@ -539,36 +539,55 @@ so demands special precautions to avoid degrading the 
user experience.
 At present, the only such module is @code{networks}, whose library ERC
 always loads anyway.
 
+@anchor{Local Modules}
 @subheading Local Modules
 @cindex local modules
 
 All modules operate as minor modes under the hood, and some newer ones
 may be defined as buffer-local.  These so-called ``local modules'' are
 a work in progress and their behavior and interface are subject to
-change.  As of ERC 5.5, the only practical differences are
+change.  As of ERC 5.5, the only practical differences are as follows:
 
 @enumerate
 @item
-``Control variables,'' like @code{erc-sasl-mode}, are stateful across
-IRC sessions and override @code{erc-module} membership when influencing
-module activation in new sessions.
+``Control variables,'' like @code{erc-sasl-mode}, retain their values
+across IRC sessions and override @code{erc-module} membership when
+influencing module activation.
 @item
 Removing a local module from @code{erc-modules} via Customize not only
 disables its mode but also kills its control variable in all ERC
 buffers.
 @item
-``Mode toggles,'' like @code{erc-sasl-mode} and
-@code{erc-sasl-enable}, behave differently relative to each other and
-to their global counterparts.  (More on this just below.)
+``Mode toggles,'' like @code{erc-sasl-mode} and the complementary
+@code{erc-sasl-enable}/@code{erc-sasl-disable} pairing, behave
+differently than their global counterparts.
 @end enumerate
 
-By default, all local-mode toggles, like @code{erc-sasl-mode}, only
-affect the current buffer, but their ``non-mode'' variants, such as
-@code{erc-sasl-enable}, operate on all buffers belonging to a
-connection when called interactively.  Keep in mind that whether
-enabled or not, a module may effectively be ``inert'' in certain types
-of buffers, such as queries and channels.  Whatever the case, a local
-toggle never mutates @code{erc-modules}.
+In target buffers, a local module's activation state survives
+``reassociation'' by default, but modules themselves always have the
+final say.  For example, a module may reset all instances of itself in
+its network context upon reconnecting.  Moreover, the value of a mode
+variable may be meaningless in buffers that its module has no interest
+in.  For example, the value of @code{erc-sasl-mode} doesn't matter in
+target buffers and may even remain non-@code{nil} after SASL has been
+disabled for the current connection (and vice versa).
+
+When it comes to server buffers, a module's activation state only
+persists for sessions revived via the automatic reconnection mechanism
+or a manual @samp{/reconnect} issued at the prompt.  In other words,
+this doesn't apply to sessions revived by an entry-point command, such
+as @code{erc-tls}, because such commands always ensure a clean slate
+by looking only to @code{erc-modules}.  Although a session revived in
+this manner may indeed harvest other information from a previous
+server buffer, it simply doesn't care which modules might have been
+active during that connection.
+
+Lastly, a local mode's toggle command, like @code{erc-sasl-mode}, only
+affects the current buffer, but its ``non-mode'' cousins, like
+@code{erc-sasl-enable} and @code{erc-sasl-disable}, operate on all
+buffers belonging to their connection (when called interactively).
+And unlike global toggles, none of these ever mutates
+@code{erc-modules}.
 
 
 @c PRE5_4: Document every option of every module in its own subnode
diff --git a/doc/misc/eshell.texi b/doc/misc/eshell.texi
index 57a2020fdca..e51e2cf799b 100644
--- a/doc/misc/eshell.texi
+++ b/doc/misc/eshell.texi
@@ -1059,7 +1059,9 @@ remote connection.
 This refers to the last argument of the last command.  With a
 subscript, you can access any argument of the last command.  For
 example, @samp{$_[1]} refers to the second argument of the last
-command (excluding the command name itself).
+command (excluding the command name itself).  To get all arguments of
+the last command, you can use an index range like @samp{$_[..]}
+(@pxref{Dollars Expansion}).
 
 @vindex $$
 @item $$
@@ -1370,11 +1372,24 @@ index.  The exact behavior depends on the type of 
@var{expr}'s value:
 @item a sequence
 Expands to the element at the (zero-based) index @var{i} of the
 sequence (@pxref{Sequences Arrays Vectors, Sequences, , elisp, The
-Emacs Lisp Reference Manual}).
+Emacs Lisp Reference Manual}).  If @var{i} is negative, @var{i} counts
+from the end, so -1 refers to the last element of the sequence.
+
+If @var{i} is a range like @code{@var{start}..@var{end}}, this expands
+to a subsequence from the indices @var{start} to @var{end}, where
+@var{end} is excluded@footnote{This behavior is different from ranges
+in Bash (where both the start and end are included in the range), but
+matches the behavior of similar Emacs Lisp functions, like
+@code{substring} (@pxref{Creating Strings, , , elisp, The Emacs Lisp
+Reference Manual}).}.  @var{start} and/or @var{end} can also be
+omitted, which is equivalent to the start and/or end of the entire
+list.  For example, @samp{$@var{expr}[-2..]} expands to the last two
+values of @var{expr}.
 
 @item a string
 Split the string at whitespace, and then expand to the @var{i}th
-element of the resulting sequence.
+element of the resulting sequence.  As above, @var{i} can be a range
+like @code{@var{start}..@var{end}}.
 
 @item an alist
 If @var{i} is a non-numeric value, expand to the value associated with
@@ -2442,13 +2457,6 @@ current being used.
 
 This way, the user could change it to use rc syntax: @samp{>[2=1]}.
 
-@item Allow @samp{$_[-1]}, which would indicate the last element of the array
-
-@item Make @samp{$x[*]} equal to listing out the full contents of @samp{x}
-
-Return them as a list, so that @samp{$_[*]} is all the arguments of the
-last command.
-
 @item Copy ANSI code handling from @file{term.el} into @file{em-term.el}
 
 Make it possible for the user to send char-by-char to the underlying
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi
index 3289d66f017..1769b70c9bc 100644
--- a/doc/misc/gnus.texi
+++ b/doc/misc/gnus.texi
@@ -12106,17 +12106,6 @@ if they were public groups, you can add the name of 
that group to the
 
 Also @pxref{Misc Article} for @code{gnus-inhibit-images}.
 
-@item gnus-html-cache-directory
-@vindex gnus-html-cache-directory
-Gnus will download and cache images according to how
-@code{gnus-blocked-images} is set.  These images will be stored in
-this directory.
-
-@item gnus-html-cache-size
-@vindex gnus-html-cache-size
-When @code{gnus-html-cache-size} bytes have been used in that
-directory, the oldest files will be deleted.  The default is 500MB.
-
 @item gnus-html-frame-width
 @vindex gnus-html-frame-width
 The width to use when rendering HTML@.  The default is 70.
diff --git a/etc/NEWS b/etc/NEWS
index 40f4364d8f6..a266ffe75e6 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -161,6 +161,13 @@ of arguments into a command, such as when defining 
aliases.  For more
 information, see the "(eshell) Dollars Expansion" node in the Eshell
 manual.
 
++++
+*** Eshell now supports negative numbers and ranges for indices.
+Now, you can retrieve the last element of a list with '$my-list[-1]'
+or get a sublist of elements 2 through 4 with '$my-list[2..5]'.  For
+more information, see the "(eshell) Dollars Expansion" node in the
+Eshell manual.
+
 ---
 *** Eshell now uses 'field' properties in its output.
 In particular, this means that pressing the '<home>' key moves the
diff --git a/etc/NEWS.29 b/etc/NEWS.29
index 64c26f93c50..4d199676848 100644
--- a/etc/NEWS.29
+++ b/etc/NEWS.29
@@ -1126,6 +1126,12 @@ buffer, and you can use 'RET' to cycle outline 
visibility.  When
 the value is 'in-margins', Outline Minor Mode uses the window margins
 for buttons that hide/show outlines.
 
++++
+*** Buttons and headings now have their own keymaps.
+'outline-button-icon-map', 'outline-overlay-button-map', and
+'outline-inserted-button-map' are now available as defined keymaps
+instead of being anonymous keymaps.
+
 ** Windows
 
 +++
@@ -1680,6 +1686,14 @@ command is installed.
 ---
 *** C++ Mode now supports most of the new features in the C++20 Standard.
 
+---
+*** In Objective-C Mode, no extra types are recognized by default.
+The default value of 'objc-font-lock-extra-types' has been changed to
+nil, since too many identifiers were getting misfontified as types.
+This may cause some actual types not to get fontified.  To get the old
+behavior back, customize the user option to the value suggested in its
+doc string.
+
 ** Cperl Mode
 
 ---
@@ -2072,7 +2086,7 @@ This is in addition to the old keybindings 'C-c C-n' and 
'C-c C-p'.
 ---
 *** New command 'vc-pull-and-push'.
 This commands first does a "pull" command, and if that is successful,
-does a "push" command afterwards.
+does a "push" command afterwards.  Currently supported in Git and Bzr.
 
 +++
 *** 'C-x v b' prefix key is used now for branch commands.
@@ -2716,6 +2730,13 @@ some commands and user options are no longer needed and 
are now obsolete:
 'image-dired-display-window-width-correction',
 'image-dired-temp-image-file'.
 
+** Exif
+
+---
+*** New function 'exif-field'.
+This is a convenience function to extract the field data from
+'exif-parse-file' and 'exif-parse-buffer'.
+
 ** Bookmarks
 
 ---
@@ -2737,13 +2758,6 @@ It is bound to the new command 
'bookmark-edit-annotation-cancel'.
 This option controls the bitmap used to indicate bookmarks in the
 fringe (or nil to disable showing this marker).
 
-** Exif
-
----
-*** New function 'exif-field'.
-This is a convenience function to extract the field data from
-'exif-parse-file' and 'exif-parse-buffer'.
-
 ** Xwidget
 
 ---
@@ -4261,6 +4275,24 @@ vectors and strings.
 The new 'key' type can be used for options that should be a valid key
 according to 'key-valid-p'.  The type 'key-sequence' is now obsolete.
 
++++
+** New function 'define-keymap'.
+This function allows defining a number of keystrokes with one form.
+
++++
+** New macro 'defvar-keymap'.
+This macro allows defining keymap variables more conveniently.
+
+** 'defvar-keymap' can specify 'repeat-mode' behavior for the keymap.
+Use ':repeat t' to have all bindings be repeatable or for more
+advanced usage:
+
+    :repeat (:enter (commands ...) :exit (commands ...))
+
+---
+** 'kbd' can now be used in built-in, preloaded libraries.
+It no longer depends on edmacro.el and cl-lib.el.
+
 +++
 ** New substitution in docstrings and 'substitute-command-keys'.
 Use \\`KEYSEQ' to insert a literal key sequence "KEYSEQ" (for example
@@ -4270,6 +4302,18 @@ be used only when a key sequence has no corresponding 
command, for
 example when it is read directly with 'read-key-sequence'.  It must be
 a valid key sequence according to 'key-valid-p'.
 
+---
+** 'lookup-key' is more permissive when searching for extended menu items.
+In Emacs 28.1, the behavior of 'lookup-key' was changed: when looking
+for a menu item '[menu-bar Foo-Bar]', first try to find an exact
+match, then look for the lowercased '[menu-bar foo-bar]'.
+
+This has been extended, so that when looking for a menu item with a
+symbol containing spaces, as in '[menu-bar Foo\ Bar]', first look for
+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'.
+
 +++
 ** New function 'file-name-split'.
 This returns a list of all the components of a file name.
@@ -4469,24 +4513,6 @@ permanent local variables.
 ** Third 'mapconcat' argument SEPARATOR is now optional.
 An explicit nil always meant the empty string, now it can be left out.
 
-+++
-** New function 'define-keymap'.
-This function allows defining a number of keystrokes with one form.
-
-+++
-** New macro 'defvar-keymap'.
-This macro allows defining keymap variables more conveniently.
-
-** 'defvar-keymap' can specify 'repeat-mode' behavior for the keymap.
-Use ':repeat t' to have all bindings be repeatable or for more
-advanced usage:
-
-    :repeat (:enter (commands ...) :exit (commands ...))
-
----
-** 'kbd' can now be used in built-in, preloaded libraries.
-It no longer depends on edmacro.el and cl-lib.el.
-
 +++
 ** New function 'image-at-point-p'.
 This function returns t if point is on a valid image, and nil
@@ -4510,18 +4536,6 @@ separate glyphs.  This takes into account combining 
characters and
 grapheme clusters, by treating each sequence of characters composed on
 display as a single unit.
 
----
-** 'lookup-key' is more permissive when searching for extended menu items.
-In Emacs 28.1, the behavior of 'lookup-key' was changed: when looking
-for a menu item '[menu-bar Foo-Bar]', first try to find an exact
-match, then look for the lowercased '[menu-bar foo-bar]'.
-
-This has been extended, so that when looking for a menu item with a
-symbol containing spaces, as in '[menu-bar Foo\ Bar]', first look for
-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'.
-
 ** Xwidget
 
 +++
diff --git a/lisp/dired.el b/lisp/dired.el
index 1f7dca802fd..76499d0f520 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -789,7 +789,7 @@ Subexpression 2 must end right before the \\n.")
                '(dired-move-to-filename)
                nil
                '(1 dired-symlink-face)
-               '(2 '(face dired-directory-face dired-symlink-filename t))))
+               '(2 `(face ,dired-directory-face dired-symlink-filename t))))
    ;;
    ;; Symbolic link to a non-directory.
    (list dired-re-sym
diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el
index 039cebedb44..b1a46d520e6 100644
--- a/lisp/emacs-lisp/byte-opt.el
+++ b/lisp/emacs-lisp/byte-opt.el
@@ -2227,18 +2227,12 @@ If FOR-EFFECT is non-nil, the return value is assumed 
to be of no importance."
         ;;
         ;; goto   ... --> goto   <delete until TAG or end>
         ;; return ... --> return <delete until TAG or end>
-        ;; (unless a jump-table is being used, where deleting may affect
-         ;; other valid case bodies)
          ;;
         ((and (memq (car lap0) '(byte-goto byte-return))
-              (not (memq (car lap1) '(TAG nil)))
-               ;; FIXME: Instead of deferring simply when jump-tables are
-               ;; being used, keep a list of tags used for switch tags and
-               ;; use them instead (see `byte-compile-inline-lapcode').
-               (not byte-compile-jump-tables))
+              (not (memq (car lap1) '(TAG nil))))
          (setq tmp rest)
          (let ((i 0)
-               (opt-p (memq byte-optimize-log '(t lap)))
+               (opt-p (memq byte-optimize-log '(t byte)))
                str deleted)
            (while (and (setq tmp (cdr tmp))
                        (not (eq 'TAG (car (car tmp)))))
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index acabc31fc33..4c423be06c4 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -3805,22 +3805,22 @@ Return the trampoline if found or nil otherwise."
      form nil
      ;; If we've disabled nativecomp, don't write the trampolines to
      ;; the eln cache (but create them).
-     (and (not inhibit-automatic-native-compilation)
-          (cl-loop
-           for dir in (if native-compile-target-directory
-                          (list (expand-file-name comp-native-version-dir
-                                                  
native-compile-target-directory))
-                        (comp-eln-load-path-eff))
-           for f = (expand-file-name
-                    (comp-trampoline-filename subr-name)
-                    dir)
-           unless (file-exists-p dir)
-           do (ignore-errors
-                (make-directory dir t)
-                (cl-return f))
-           when (file-writable-p f)
-           do (cl-return f)
-           finally (error "Cannot find suitable directory for output in \
+     (unless inhibit-automatic-native-compilation
+       (cl-loop
+        for dir in (if native-compile-target-directory
+                       (list (expand-file-name comp-native-version-dir
+                                               
native-compile-target-directory))
+                     (comp-eln-load-path-eff))
+        for f = (expand-file-name
+                 (comp-trampoline-filename subr-name)
+                 dir)
+        unless (file-exists-p dir)
+          do (ignore-errors
+               (make-directory dir t)
+               (cl-return f))
+        when (file-writable-p f)
+          do (cl-return f)
+        finally (error "Cannot find suitable directory for output in \
 `native-comp-eln-load-path'"))))))
 
 
diff --git a/lisp/eshell/esh-proc.el b/lisp/eshell/esh-proc.el
index 9bae812c922..27cd521e82e 100644
--- a/lisp/eshell/esh-proc.el
+++ b/lisp/eshell/esh-proc.el
@@ -296,8 +296,13 @@ Used only on systems which do not support async 
subprocesses.")
                                                      'unix))))
     (cond
      ((fboundp 'make-process)
-      (unless (equal (car (aref eshell-current-handles eshell-output-handle))
-                     (car (aref eshell-current-handles eshell-error-handle)))
+      (unless (or ;; FIXME: It's not currently possible to use a
+                  ;; stderr process for remote files.
+                  (file-remote-p default-directory)
+                  (equal (car (aref eshell-current-handles
+                                    eshell-output-handle))
+                         (car (aref eshell-current-handles
+                                    eshell-error-handle))))
         (eshell-protect-handles eshell-current-handles)
         (setq stderr-proc
               (make-pipe-process
diff --git a/lisp/eshell/esh-util.el b/lisp/eshell/esh-util.el
index 544a8a74039..9549e7f1a10 100644
--- a/lisp/eshell/esh-util.el
+++ b/lisp/eshell/esh-util.el
@@ -94,13 +94,6 @@ a non-nil value, will be passed strings, not numbers, even 
when an
 argument matches `eshell-number-regexp'."
   :type 'boolean)
 
-(defcustom eshell-number-regexp "-?\\([0-9]*\\.\\)?[0-9]+\\(e[-0-9.]+\\)?"
-  "Regular expression used to match numeric arguments.
-If `eshell-convert-numeric-arguments' is non-nil, and an argument
-matches this regexp, it will be converted to a Lisp number, using the
-function `string-to-number'."
-  :type 'regexp)
-
 (defcustom eshell-ange-ls-uids nil
   "List of user/host/id strings, used to determine remote ownership."
   :type '(repeat (cons :tag "Host for User/UID map"
@@ -111,6 +104,22 @@ function `string-to-number'."
 
 ;;; Internal Variables:
 
+(defvar eshell-number-regexp
+  (rx (? "-")
+      (or (seq (+ digit) (? "." (* digit)))
+          (seq (* digit) "." (+ digit)))
+      ;; Optional exponent
+      (? (or "e" "E")
+         (or "+INF" "+NaN"
+             (seq (? (or "+" "-")) (+ digit)))))
+  "Regular expression used to match numeric arguments.
+If `eshell-convert-numeric-arguments' is non-nil, and an argument
+matches this regexp, it will be converted to a Lisp number, using the
+function `string-to-number'.")
+
+(defvar eshell-integer-regexp (rx (? "-") (+ digit))
+  "Regular expression used to match integer arguments.")
+
 (defvar eshell-group-names nil
   "A cache to hold the names of groups.")
 
diff --git a/lisp/eshell/esh-var.el b/lisp/eshell/esh-var.el
index 83dd5cb50f5..60aab92b33e 100644
--- a/lisp/eshell/esh-var.el
+++ b/lisp/eshell/esh-var.el
@@ -587,6 +587,9 @@ Possible variable references are:
 
 (defun eshell-parse-indices ()
   "Parse and return a list of index-lists.
+This produces a series of Lisp forms to be processed by
+`eshell-prepare-indices' and ultimately evaluated by
+`eshell-do-eval'.
 
 For example, \"[0 1][2]\" becomes:
   ((\"0\" \"1\") (\"2\"))."
@@ -605,6 +608,36 @@ For example, \"[0 1][2]\" becomes:
          (goto-char (1+ end)))))
     (nreverse indices)))
 
+(defun eshell-parse-index (index)
+  "Parse a single INDEX in string form.
+If INDEX looks like a number, return that number.
+
+If INDEX looks like \"[BEGIN]..[END]\", where BEGIN and END look
+like integers, return a cons cell of BEGIN and END as numbers;
+BEGIN and/or END can be omitted here, in which case their value
+in the cons is nil.
+
+Otherwise (including if INDEX is not a string), return
+the original value of INDEX."
+  (save-match-data
+    (cond
+     ((and (stringp index) (get-text-property 0 'number index))
+      (string-to-number index))
+     ((and (stringp index)
+           (not (text-property-any 0 (length index) 'escaped t index))
+           (string-match (rx string-start
+                             (group-n 1 (? (regexp eshell-integer-regexp)))
+                             ".."
+                             (group-n 2 (? (regexp eshell-integer-regexp)))
+                             string-end)
+                         index))
+      (let ((begin (match-string 1 index))
+            (end (match-string 2 index)))
+        (cons (unless (string-empty-p begin) (string-to-number begin))
+              (unless (string-empty-p end) (string-to-number end)))))
+     (t
+      index))))
+
 (defun eshell-eval-indices (indices)
   "Evaluate INDICES, a list of index-lists generated by 
`eshell-parse-indices'."
   (declare (obsolete eshell-prepare-indices "30.1"))
@@ -716,56 +749,65 @@ For example, to retrieve the second element of a user's 
record in
 '/etc/passwd', the variable reference would look like:
 
   ${grep johnw /etc/passwd}[: 2]"
-  (while indices
-    (let ((refs (car indices)))
-      (when (stringp value)
-       (let (separator (index (caar indices)))
-          (when (and (stringp index)
-                     (not (get-text-property 0 'number index)))
-            (setq separator index
-                  refs (cdr refs)))
-         (setq value (split-string value separator))
-          (unless quoted
-            (setq value (mapcar #'eshell-convert-to-number value)))))
-      (cond
-       ((< (length refs) 0)
-       (error "Invalid array variable index: %s"
-              (eshell-stringify refs)))
-       ((= (length refs) 1)
-       (setq value (eshell-index-value value (car refs))))
-       (t
-       (let ((new-value (list t)))
-         (while refs
-           (nconc new-value
-                  (list (eshell-index-value value
-                                            (car refs))))
-           (setq refs (cdr refs)))
-         (setq value (cdr new-value))))))
-    (setq indices (cdr indices)))
-  value)
+  (dolist (refs indices value)
+    ;; For string values, check if the first index looks like a
+    ;; regexp, and if so, use that to split the string.
+    (when (stringp value)
+      (let (separator (first (car refs)))
+        (when (stringp (eshell-parse-index first))
+          (setq separator first
+                refs (cdr refs)))
+        (setq value (split-string value separator))
+        (unless quoted
+          (setq value (mapcar #'eshell-convert-to-number value)))))
+    (cond
+     ((< (length refs) 0)
+      (error "Invalid array variable index: %s"
+             (eshell-stringify refs)))
+     ((= (length refs) 1)
+      (setq value (eshell-index-value value (car refs))))
+     (t
+      (let (new-value)
+        (dolist (ref refs)
+          (push (eshell-index-value value ref) new-value))
+        (setq value (nreverse new-value)))))))
+
+(pcase-defmacro eshell-index-range (start end)
+  "A pattern that matches an Eshell index range.
+EXPVAL should be a cons cell, with each slot containing either an
+integer or nil.  If this matches, bind the values of the sltos to
+START and END."
+  (list '\` (cons (list '\, `(and (or (pred integerp) (pred null)) ,start))
+                  (list '\, `(and (or (pred integerp) (pred null)) ,end)))))
 
 (defun eshell-index-value (value index)
   "Reference VALUE using the given INDEX."
-  (when (and (stringp index) (get-text-property 0 'number index))
-    (setq index (string-to-number index)))
-  (if (integerp index)
-      (cond
-       ((ring-p value)
-        (if (> index (ring-length value))
-            (error "Index exceeds length of ring")
-          (ring-ref value index)))
-       ((listp value)
-        (if (> index (length value))
-            (error "Index exceeds length of list")
-          (nth index value)))
-       ((vectorp value)
-        (if (> index (length value))
-            (error "Index exceeds length of vector")
-          (aref value index)))
-       (t
-        (error "Invalid data type for indexing")))
-    ;; INDEX is some non-integer value, so treat VALUE as an alist.
-    (cdr (assoc index value))))
+  (let ((parsed-index (eshell-parse-index index)))
+    (if (ring-p value)
+        (pcase parsed-index
+          ((pred integerp)
+           (ring-ref value parsed-index))
+          ((eshell-index-range start end)
+           (let* ((len (ring-length value))
+                  (real-start (mod (or start 0) len))
+                  (real-end (mod (or end len) len)))
+             (when (and (eq real-end 0)
+                        (not (eq end 0)))
+               (setq real-end len))
+             (ring-convert-sequence-to-ring
+              (seq-subseq (ring-elements value) real-start real-end))))
+          (_
+           (error "Invalid index for ring: %s" index)))
+      (pcase parsed-index
+        ((pred integerp)
+         (when (< parsed-index 0)
+           (setq parsed-index (+ parsed-index (length value))))
+         (seq-elt value parsed-index))
+        ((eshell-index-range start end)
+         (seq-subseq value (or start 0) end))
+        (_
+         ;; INDEX is some non-integer value, so treat VALUE as an alist.
+         (cdr (assoc parsed-index value)))))))
 
 ;;;_* Variable name completion
 
diff --git a/lisp/find-dired.el b/lisp/find-dired.el
index 9fa139a8025..33376ee4ed9 100644
--- a/lisp/find-dired.el
+++ b/lisp/find-dired.el
@@ -177,7 +177,9 @@ using GNU findutils (on macOS and *BSD systems), see 
instead the
 man page for \"find\"."
   (interactive (list (read-directory-name "Run find in directory: " nil "" t)
                     (read-string "Run find (with args): " find-args
-                                 '(find-args-history . 1))))
+                                 (if find-args
+                                      '(find-args-history . 1)
+                                    'find-args-history))))
   (setq find-args args                ; save for next interactive call
        args (concat find-program " . "
                     (if (string= args "")
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index da7c20b5e0a..5e4aa5e1198 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -2062,12 +2062,11 @@ connection."
                 (next-single-property-change (point) 'hard)
                 (forward-char 1)
                 (throw 'exit nil))))
+          (goto-char (line-beginning-position))
           (set-marker-insertion-type rcirc-prompt-start-marker t)
           (set-marker-insertion-type rcirc-prompt-end-marker t)
 
           ;; run markup functions
-          (unless (bolp)
-            (newline))
           (save-excursion
             (save-restriction
               (narrow-to-region (point) (point))
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index dcc6f05979f..f38e570700e 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -657,7 +657,7 @@ The `sudo' program appears to insert a `^@' character into 
the prompt."
 (defcustom tramp-wrong-passwd-regexp
   (rx bol (* nonl)
       (| "Permission denied"
-        "Login [Ii]ncorrect"
+        (: "Login " (| "Incorrect" "incorrect"))
         "Connection refused"
         "Connection closed"
         "Timeout, server not responding."
@@ -4938,7 +4938,7 @@ substitution.  SPEC-LIST is a list of char/value pairs 
used for
                :command (append `(,login-program) login-args command)
                :coding coding :noquery noquery :connection-type connection-type
                :sentinel sentinel :stderr stderr))
-           ;; Set filter.  Prior Emacs 29.1, it doesn't work reliable
+           ;; Set filter.  Prior Emacs 29.1, it doesn't work reliably
            ;; to provide it as `make-process' argument when filter is
            ;; t.  See Bug#51177.
            (when filter
diff --git a/lisp/org/ChangeLog.1 b/lisp/org/ChangeLog.1
index eb126df6334..a4eae350d98 100644
--- a/lisp/org/ChangeLog.1
+++ b/lisp/org/ChangeLog.1
@@ -30500,7 +30500,7 @@
 
        * org.el (org-make-tags-matcher): Never use IDO for completing the
        tags matcher match string.
-       (org-completing-read): Also remove the special biding for "?".
+       (org-completing-read): Also remove the special binding for "?".
 
        * org-attach.el (org-attach-allow-inheritance): New option.
        (org-attach-inherited): New variable.
diff --git a/lisp/outline.el b/lisp/outline.el
index 0bfda8388ed..a89985d1990 100644
--- a/lisp/outline.el
+++ b/lisp/outline.el
@@ -1776,6 +1776,20 @@ With a prefix argument, show headings up to that LEVEL."
 
 ;;; Button/margin indicators
 
+(defvar-keymap outline-button-icon-map
+  "<mouse-2>" #'outline-cycle
+  ;; Need to override the global binding
+  ;; `mouse-appearance-menu' with <down->:
+  "S-<down-mouse-1>" #'ignore
+  "S-<mouse-1>" #'outline-cycle-buffer)
+
+(defvar-keymap outline-overlay-button-map
+  "RET" #'outline-cycle)
+
+(defvar-keymap outline-inserted-button-map
+  :parent (make-composed-keymap outline-button-icon-map
+                                outline-overlay-button-map))
+
 (defun outline--create-button-icons ()
   (pcase outline-minor-mode-use-buttons
     ('in-margins
@@ -1808,12 +1822,7 @@ With a prefix argument, show headings up to that LEVEL."
         (propertize (icon-string icon-name)
                     'mouse-face 'default
                     'follow-link 'mouse-face
-                    'keymap (define-keymap
-                              "<mouse-2>" #'outline-cycle
-                              ;; Need to override the global binding
-                              ;; `mouse-appearance-menu' with <down->:
-                              "S-<down-mouse-1>" #'ignore
-                              "S-<mouse-1>" #'outline-cycle-buffer)))
+                    'keymap outline-button-icon-map))
       (list 'outline-open
             (if outline--use-rtl 'outline-close-rtl 'outline-close))))))
 
@@ -1839,19 +1848,13 @@ With a prefix argument, show headings up to that LEVEL."
            (overlay-put o 'face (plist-get icon 'face))
            (overlay-put o 'follow-link 'mouse-face)
            (overlay-put o 'mouse-face 'highlight)
-           (overlay-put o 'keymap (define-keymap
-                                    "RET" #'outline-cycle
-                                    "<mouse-2>" #'outline-cycle
-                                    ;; Need to override the global binding
-                                    ;; `mouse-appearance-menu' with <down->:
-                                    "S-<down-mouse-1>" #'ignore
-                                    "S-<mouse-1>" #'outline-cycle-buffer)))
+           (overlay-put o 'keymap outline-inserted-button-map))
           ('in-margins
            (overlay-put o 'before-string icon)
-           (overlay-put o 'keymap (define-keymap "RET" #'outline-cycle)))
+           (overlay-put o 'keymap outline-overlay-button-map))
           (_
            (overlay-put o 'before-string icon)
-           (overlay-put o 'keymap (define-keymap "RET" #'outline-cycle))))))))
+           (overlay-put o 'keymap outline-overlay-button-map)))))))
 
 (defun outline--fix-up-all-buttons (&optional from to)
   (when outline-minor-mode-use-buttons
diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el
index 58f0ac6c069..76ac92ed82d 100644
--- a/lisp/progmodes/c-ts-mode.el
+++ b/lisp/progmodes/c-ts-mode.el
@@ -279,6 +279,19 @@ NODE should be a labeled_statement."
           "enumerator_list"))
   "Regexp matching types of block nodes (i.e., {} blocks).")
 
+(defvar c-ts-mode--statement-offset-post-processr nil
+  "A functions that makes adjustments to `c-ts-mode--statement-offset'.
+
+This is a function that takes two arguments, the current indent
+level and the current node, and returns a new level.
+
+When `c-ts-mode--statement-offset' runs and go up the parse tree,
+it increments the indent level when some condition are met in
+each level.  At each level, after (possibly) incrementing the
+offset, it calls this function, passing it the current indent
+level and the current node, and use the return value as the new
+indent level.")
+
 (defun c-ts-mode--statement-offset (node parent &rest _)
   "This anchor is used for children of a statement inside a block.
 
@@ -306,7 +319,7 @@ PARENT is NODE's parent."
         (save-excursion
           (goto-char (treesit-node-start node))
           ;; Add an extra level if the opening bracket is on its own
-          ;; line, except (1) it's at top-level, or (2) it's immedate
+          ;; line, except (1) it's at top-level, or (2) it's immediate
           ;; parent is another block.
           (cond ((bolp) nil) ; Case (1).
                 ((let ((parent-type (treesit-node-type
@@ -319,9 +332,24 @@ PARENT is NODE's parent."
                 ;; Add a level.
                 ((looking-back (rx bol (* whitespace))
                                (line-beginning-position))
-                 (cl-incf level))))))
+                 (cl-incf level)))))
+      (when c-ts-mode--statement-offset-post-processr
+        (setq level (funcall c-ts-mode--statement-offset-post-processr
+                             level node))))
     (* level c-ts-mode-indent-offset)))
 
+(defun c-ts-mode--fix-bracketless-indent (level node)
+  "Takes LEVEL and NODE and returns adjusted LEVEL.
+This fixes indentation for cases shown in bug#61026.  Basically
+in C/C++, constructs like if, for, while sometimes don't have
+bracket."
+  (if (and (not (equal (treesit-node-type node) "compound_statement"))
+           (member (treesit-node-type (treesit-node-parent node))
+                   '("if_statement" "while_statement" "do_statement"
+                     "for_statement")))
+      (1+ level)
+    level))
+
 (defun c-ts-mode--close-bracket-offset (node parent &rest _)
   "Offset for the closing bracket, NODE.
 It's basically one level less that the statements in the block.
@@ -789,6 +817,8 @@ the semicolon.  This function skips the semicolon."
   ;; Indent.
   (when (eq c-ts-mode-indent-style 'linux)
     (setq-local indent-tabs-mode t))
+  (setq-local c-ts-mode--statement-offset-post-processr
+              #'c-ts-mode--fix-bracketless-indent)
 
   ;; Comment
   (c-ts-common-comment-setup)
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index 2ec83240360..f1e93c1c23c 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -7357,7 +7357,7 @@ multi-line strings (but not C++, for example)."
             (cons (match-beginning 1)
                   (cons (match-end 1) (match-beginning 2))))
       (goto-char here))))
-       
+
 (defun c-ml-string-opener-intersects-region (&optional start finish)
   ;; If any part of the region [START FINISH] is inside an ml-string opener,
   ;; return a dotted list of the start, end and double-quote position of that
@@ -9232,7 +9232,7 @@ multi-line strings (but not C++, for example)."
       ;; known type match only is a prefix of another name.
 
       (setq id-end (match-end 1))
-      
+
       (when (and c-record-type-identifiers
                 (or c-promote-possible-types (eq res t)))
        (c-record-type-id (cons (match-beginning 1) (match-end 1))))
@@ -9375,7 +9375,7 @@ multi-line strings (but not C++, for example)."
                     (c-forward-syntactic-ws)
                     (setq subres (c-forward-type nil t))
                     (setq pos (point))))
-             
+
              (progn
                ;; If either operand certainly is a type then both are, but we
                ;; don't let the existence of the operator itself promote two
diff --git a/lisp/progmodes/cc-vars.el b/lisp/progmodes/cc-vars.el
index 2206e0fcab6..60ed3521b8a 100644
--- a/lisp/progmodes/cc-vars.el
+++ b/lisp/progmodes/cc-vars.el
@@ -1609,8 +1609,7 @@ as a type name.")
   :type 'c-extra-types-widget
   :group 'c)
 
-(defcustom objc-font-lock-extra-types
-  (list (concat "[" c-upper "]\\sw*[" c-lower "]\\sw*"))
+(defcustom objc-font-lock-extra-types nil
   (c-make-font-lock-extra-types-blurb "ObjC" "objc-mode" (concat
 "For example, a value of (\"[" c-upper "]\\\\sw*[" c-lower "]\\\\sw*\") means
 capitalized words are treated as type names (the requirement for a
diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index 8ce1a8b7baf..4fa886bc788 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -2,12 +2,12 @@
 
 ;; Copyright (C) 2018-2023 Free Software Foundation, Inc.
 
-;; Version: 1.10
+;; Version: 1.11
 ;; Author: João Távora <joaotavora@gmail.com>
 ;; Maintainer: João Távora <joaotavora@gmail.com>
 ;; URL: https://github.com/joaotavora/eglot
 ;; Keywords: convenience, languages
-;; Package-Requires: ((emacs "26.3") (jsonrpc "1.0.16") (flymake "1.2.1") 
(project "0.9.3") (xref "1.0.1") (eldoc "1.11.0") (seq "2.23") 
(external-completion "0.1"))
+;; Package-Requires: ((emacs "26.3") (jsonrpc "1.0.16") (flymake "1.2.1") 
(project "0.9.3") (xref "1.4.0") (eldoc "1.11.0") (seq "2.23") 
(external-completion "0.1"))
 
 ;; This is a GNU ELPA :core package.  Avoid adding functionality
 ;; that is not available in the version of Emacs recorded above or any
diff --git a/lisp/progmodes/go-ts-mode.el b/lisp/progmodes/go-ts-mode.el
index 44f141217bc..93a3bcc594b 100644
--- a/lisp/progmodes/go-ts-mode.el
+++ b/lisp/progmodes/go-ts-mode.el
@@ -38,7 +38,7 @@
 (declare-function treesit-node-type "treesit.c")
 (declare-function treesit-search-subtree "treesit.c")
 
-(defcustom go-ts-mode-indent-offset 4
+(defcustom go-ts-mode-indent-offset 8
   "Number of spaces for each indentation step in `go-ts-mode'."
   :version "29.1"
   :type 'integer
@@ -78,8 +78,10 @@
      ((parent-is "expression_switch_statement") parent-bol 0)
      ((parent-is "field_declaration_list") parent-bol go-ts-mode-indent-offset)
      ((parent-is "import_spec_list") parent-bol go-ts-mode-indent-offset)
+     ((parent-is "interface_type") parent-bol go-ts-mode-indent-offset)
      ((parent-is "labeled_statement") parent-bol go-ts-mode-indent-offset)
      ((parent-is "literal_value") parent-bol go-ts-mode-indent-offset)
+     ((parent-is "parameter_list") parent-bol go-ts-mode-indent-offset)
      ((parent-is "type_spec") parent-bol go-ts-mode-indent-offset)
      ((parent-is "var_declaration") parent-bol go-ts-mode-indent-offset)
      (no-node parent-bol 0)))
diff --git a/lisp/progmodes/hideif.el b/lisp/progmodes/hideif.el
index 4405ce0fe04..836db83c2f3 100644
--- a/lisp/progmodes/hideif.el
+++ b/lisp/progmodes/hideif.el
@@ -555,8 +555,8 @@ that form should be displayed.")
 (defconst hif-line-concat     "\\\\[ \t]*[\n\r]")
 ;; If `hif-white-regexp' is modified, `hif-tokenize' might need to be modified
 ;; accordingly.
-(defconst hif-white-regexp    (concat "\\(?:\\(?:[ \t]\\|/\\*.*\\*/\\)*"
-                                      "\\(?:" hif-line-concat "\\)?\\)*"))
+(defconst hif-white-regexp    (concat "\\(?:[ \t]\\|/\\*.*?\\*/"
+                                      "\\|\\(?:" hif-line-concat "\\)\\)*"))
 (defconst hif-define-regexp   (concat hif-cpp-prefix "\\(define\\|undef\\)"))
 (defconst hif-id-regexp       (concat "[[:alpha:]_][[:alnum:]_]*"))
 (defconst hif-etc-regexp      "\\.\\.\\.")
@@ -946,8 +946,8 @@ Assuming we've just performed a `hif-token-regexp' lookup."
   (let ((token-list nil)
         ;; Similar to `hif-white-regexp' but keep the spaces if there are
         (white-regexp (concat "\\(?:"
-                              "\\(?:\\([ \t]+\\)\\|\\(?:/\\*.*\\*/\\)?\\)*"
-                              "\\(?:" hif-line-concat "\\)?"
+                              "\\([ \t]+\\)\\|/\\*.*?\\*/"
+                              "\\|\\(?:" hif-line-concat "\\)"
                               "\\)*"))
         token)
     (setq hif-simple-token-only t)
diff --git a/lisp/progmodes/java-ts-mode.el b/lisp/progmodes/java-ts-mode.el
index 08929c0aead..dbd63698770 100644
--- a/lisp/progmodes/java-ts-mode.el
+++ b/lisp/progmodes/java-ts-mode.el
@@ -81,6 +81,7 @@
      ((parent-is "annotation_type_body") parent-bol java-ts-mode-indent-offset)
      ((parent-is "interface_body") parent-bol java-ts-mode-indent-offset)
      ((parent-is "constructor_body") parent-bol java-ts-mode-indent-offset)
+     ((parent-is "enum_body_declarations") parent-bol 0)
      ((parent-is "enum_body") parent-bol java-ts-mode-indent-offset)
      ((parent-is "switch_block") parent-bol java-ts-mode-indent-offset)
      ((parent-is "record_declaration_body") parent-bol 
java-ts-mode-indent-offset)
@@ -93,6 +94,7 @@
      ((parent-is "variable_declarator") parent-bol java-ts-mode-indent-offset)
      ((parent-is "method_invocation") parent-bol java-ts-mode-indent-offset)
      ((parent-is "switch_rule") parent-bol java-ts-mode-indent-offset)
+     ((parent-is "switch_label") parent-bol java-ts-mode-indent-offset)
      ((parent-is "ternary_expression") parent-bol java-ts-mode-indent-offset)
      ((parent-is "lambda_expression") parent-bol java-ts-mode-indent-offset)
      ((parent-is "element_value_array_initializer") parent-bol 
java-ts-mode-indent-offset)
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el
index dca93c856fc..6ae325c0657 100644
--- a/lisp/progmodes/js.el
+++ b/lisp/progmodes/js.el
@@ -3546,9 +3546,18 @@ This function is intended for use in 
`after-change-functions'."
              (identifier)
              @font-lock-function-name-face)
       value: (array (number) (function)))
+     ;; full module imports
      (import_clause (identifier) @font-lock-variable-name-face)
-     (import_clause (named_imports (import_specifier (identifier))
-                                   @font-lock-variable-name-face)))
+     ;; named imports with aliasing
+     (import_clause (named_imports (import_specifier
+                                    alias: (identifier) 
@font-lock-variable-name-face)))
+     ;; named imports without aliasing
+     (import_clause (named_imports (import_specifier
+                                    !alias
+                                    name: (identifier) 
@font-lock-variable-name-face)))
+
+     ;; full namespace import (* as alias)
+     (import_clause (namespace_import (identifier) 
@font-lock-variable-name-face)))
 
    :language 'javascript
    :feature 'property
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index 59270070484..2343adf4698 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -1,7 +1,7 @@
 ;;; project.el --- Operations on the current project  -*- lexical-binding: t; 
-*-
 
 ;; Copyright (C) 2015-2023 Free Software Foundation, Inc.
-;; Version: 0.9.5
+;; Version: 0.9.6
 ;; Package-Requires: ((emacs "26.1") (xref "1.4.0"))
 
 ;; This is a GNU ELPA :core package.  Avoid using functionality that
@@ -530,7 +530,10 @@ project backend implementation of 
`project-external-roots'.")
                dir
                (lambda (d)
                  ;; Maybe limit count to 100 when we can drop Emacs < 28.
-                 (setq last-matches (directory-files d nil marker-re t)))))
+                 (setq last-matches
+                       (condition-case nil
+                           (directory-files d nil marker-re t)
+                         (file-missing nil))))))
              (backend
               (cl-find-if
                (lambda (b)
diff --git a/lisp/progmodes/ruby-ts-mode.el b/lisp/progmodes/ruby-ts-mode.el
index a81b5f10549..1144caf79b6 100644
--- a/lisp/progmodes/ruby-ts-mode.el
+++ b/lisp/progmodes/ruby-ts-mode.el
@@ -566,6 +566,12 @@ a statement container is a node that matches
            ((n-p-gp nil nil "regex") no-indent 0)
            ((parent-is "regex") no-indent 0)
 
+           ;; Incomplete buffer state, better not reindent (bug#61017).
+           ((and (parent-is "ERROR")
+                 (or (node-is ,ruby-ts--class-or-module-regex)
+                     (node-is "\\`def\\'")))
+            no-indent 0)
+
            ;; if then else elseif notes:
            ;;
            ;;   1. The "then" starts at the end of the line that ends
diff --git a/lisp/progmodes/typescript-ts-mode.el 
b/lisp/progmodes/typescript-ts-mode.el
index 48f9ac806c1..3437ea43505 100644
--- a/lisp/progmodes/typescript-ts-mode.el
+++ b/lisp/progmodes/typescript-ts-mode.el
@@ -132,26 +132,21 @@ Argument LANGUAGE is either `typescript' or `tsx'."
 Argument LANGUAGE is either `typescript' or `tsx'."
   (treesit-font-lock-rules
    :language language
-   :override t
    :feature 'comment
    `((comment) @font-lock-comment-face)
 
    :language language
-   :override t
    :feature 'constant
    `(((identifier) @font-lock-constant-face
       (:match "^[A-Z_][A-Z_\\d]*$" @font-lock-constant-face))
-
      [(true) (false) (null)] @font-lock-constant-face)
 
    :language language
-   :override t
    :feature 'keyword
    `([,@typescript-ts-mode--keywords] @font-lock-keyword-face
      [(this) (super)] @font-lock-keyword-face)
 
    :language language
-   :override t
    :feature 'string
    `((regex pattern: (regex_pattern)) @font-lock-regexp-face
      (string) @font-lock-string-face
@@ -159,7 +154,7 @@ Argument LANGUAGE is either `typescript' or `tsx'."
      (template_substitution ["${" "}"] @font-lock-misc-punctuation-face))
 
    :language language
-   :override t
+   :override t ;; for functions assigned to variables
    :feature 'declaration
    `((function
       name: (identifier) @font-lock-function-name-face)
@@ -174,6 +169,10 @@ Argument LANGUAGE is either `typescript' or `tsx'."
      (required_parameter (identifier) @font-lock-variable-name-face)
      (optional_parameter (identifier) @font-lock-variable-name-face)
 
+     (variable_declarator
+      name: (identifier) @font-lock-function-name-face
+      value: [(function) (arrow_function)])
+
      (variable_declarator
       name: (identifier) @font-lock-variable-name-face)
 
@@ -188,10 +187,6 @@ Argument LANGUAGE is either `typescript' or `tsx'."
      (arrow_function
       parameter: (identifier) @font-lock-variable-name-face)
 
-     (variable_declarator
-      name: (identifier) @font-lock-function-name-face
-      value: [(function) (arrow_function)])
-
      (variable_declarator
       name: (array_pattern
              (identifier)
@@ -201,11 +196,20 @@ Argument LANGUAGE is either `typescript' or `tsx'."
      (catch_clause
       parameter: (identifier) @font-lock-variable-name-face)
 
+     ;; full module imports
      (import_clause (identifier) @font-lock-variable-name-face)
-     (import_clause (named_imports (import_specifier (identifier)) 
@font-lock-variable-name-face)))
+     ;; named imports with aliasing
+     (import_clause (named_imports (import_specifier
+                                    alias: (identifier) 
@font-lock-variable-name-face)))
+     ;; named imports without aliasing
+     (import_clause (named_imports (import_specifier
+                                    !alias
+                                    name: (identifier) 
@font-lock-variable-name-face)))
+
+     ;; full namespace import (* as alias)
+     (import_clause (namespace_import (identifier) 
@font-lock-variable-name-face)))
 
    :language language
-   :override t
    :feature 'identifier
    `((nested_type_identifier
       module: (identifier) @font-lock-type-face)
@@ -234,7 +238,6 @@ Argument LANGUAGE is either `typescript' or `tsx'."
        (_ (_ (_ (identifier) @font-lock-variable-name-face)))]))
 
    :language language
-   :override t
    :feature 'property
    `((property_signature
       name: (property_identifier) @font-lock-property-face)
@@ -249,7 +252,6 @@ Argument LANGUAGE is either `typescript' or `tsx'."
       @font-lock-property-face))
 
    :language language
-   :override t
    :feature 'expression
    '((assignment_expression
       left: [(identifier) @font-lock-function-name-face
@@ -266,7 +268,6 @@ Argument LANGUAGE is either `typescript' or `tsx'."
         property: (property_identifier) @font-lock-function-name-face)]))
 
    :language language
-   :override t
    :feature 'pattern
    `((pair_pattern
       key: (property_identifier) @font-lock-property-face)
@@ -274,7 +275,6 @@ Argument LANGUAGE is either `typescript' or `tsx'."
      (array_pattern (identifier) @font-lock-variable-name-face))
 
    :language language
-   :override t
    :feature 'jsx
    `((jsx_opening_element
       [(nested_identifier (identifier)) (identifier)]
diff --git a/lisp/simple.el b/lisp/simple.el
index 561c7b568ab..7bda368d85d 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -4554,6 +4554,9 @@ If the output is short enough to display in the echo area
 \(determined by the variable `max-mini-window-height' if
 `resize-mini-windows' is non-nil), it is shown there.
 Otherwise, the buffer containing the output is displayed.
+Note that if `shell-command-dont-erase-buffer' is non-nil,
+the echo area could display more than just the output of the
+last command.
 
 If there is output and an error, and you did not specify \"insert it
 in the current buffer\", a message about the error goes at the end
@@ -4848,6 +4851,9 @@ If the output is short enough to display in the echo area
 `resize-mini-windows' is non-nil), it is shown there.
 Otherwise it is displayed in the buffer named by `shell-command-buffer-name'.
 The output is available in that buffer in both cases.
+Note that if `shell-command-dont-erase-buffer' is non-nil,
+the echo area could display more than just the output of the
+last command.
 
 If there is output and an error, a message about the error
 appears at the end of the output.
diff --git a/lisp/startup.el b/lisp/startup.el
index 5eb53ecc6d1..57a2aa3dd1d 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -1617,7 +1617,7 @@ please check its value")
           (display-warning 'initialization
                            (format-message "\
 Your `load-path' seems to contain\n\
-your `.emacs.d' directory: %s\n\
+your `user-emacs-directory': %s\n\
 This is likely to cause problems...\n\
 Consider using a subdirectory instead, e.g.: %s"
                                     dir (expand-file-name
diff --git a/lisp/treesit.el b/lisp/treesit.el
index 5fad6b21fae..29b29d2665a 100644
--- a/lisp/treesit.el
+++ b/lisp/treesit.el
@@ -2789,8 +2789,10 @@ See `treesit-language-source-alist' for details."
                   (if (equal string "") nil string)))
       (list
        lang
-       (read-string
-        "Enter the URL of the Git repository of the language grammar: ")
+       (let ((repo-default (format 
"https://github.com/tree-sitter/tree-sitter-%s"; lang)))
+         (read-string
+          "Enter the URL of the Git repository of the language grammar: "
+          (and (treesit--check-repo-url repo-default) repo-default)))
        (empty-string-to-nil
         (read-string
          "Enter the tag or branch (default: default branch): "))
@@ -2804,6 +2806,16 @@ See `treesit-language-source-alist' for details."
         (read-string
          "Enter the C++ compiler to use (default: auto-detect): "))))))
 
+(defun treesit--check-repo-url (url)
+  (defvar url-request-method)
+  (let ((url-request-method "HEAD"))
+    (let ((buffer (condition-case nil (url-retrieve-synchronously url t t)
+                    (file-error nil))))
+      (and buffer
+           (eql
+            (buffer-local-value 'url-http-response-status buffer)
+            200)))))
+
 ;;;###autoload
 (defun treesit-install-language-grammar (lang)
   "Build and install the tree-sitter language grammar library for LANG.
diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el
index 6443f6d57aa..f66e37fffa4 100644
--- a/lisp/vc/vc-bzr.el
+++ b/lisp/vc/vc-bzr.el
@@ -381,7 +381,9 @@ If PROMPT is non-nil, prompt for the Bzr command to run."
           (setq-local compile-command
                       (concat vc-bzr-program " " command " "
                               (if args (mapconcat #'identity args " ") "")))))
-      (vc-set-async-update buf))))
+      (vc-set-async-update buf)
+      ;; Return the process for `vc-pull-and-push'
+      (get-buffer-process buf))))
 
 (defun vc-bzr-pull (prompt)
   "Pull changes into the current Bzr branch.
diff --git a/lisp/vc/vc-dispatcher.el b/lisp/vc/vc-dispatcher.el
index e1a3eff448d..fd5f655a0f6 100644
--- a/lisp/vc/vc-dispatcher.el
+++ b/lisp/vc/vc-dispatcher.el
@@ -608,7 +608,10 @@ reverting.  NOQUERY should be t *only* if it is known the 
only
 difference between the buffer and the file is due to
 modifications by the dispatcher client code, rather than user
 editing!"
-  (and (string= buffer-file-name file)
+  (and (string= buffer-file-name
+                (if (file-name-absolute-p file)
+                    file
+                  (expand-file-name file (vc-root-dir))))
        (if keep
           (when (file-exists-p file)
             (when reset-vc-info
@@ -643,7 +646,10 @@ editing!"
 
 (defun vc-resynch-buffer (file &optional keep noquery reset-vc-info)
   "If FILE is currently visited, resynch its buffer."
-  (if (string= buffer-file-name file)
+  (if (string= buffer-file-name
+               (if (file-name-absolute-p file)
+                   file
+                 (expand-file-name file (vc-root-dir))))
       (vc-resynch-window file keep noquery reset-vc-info)
     (if (file-directory-p file)
        (vc-resynch-buffers-in-directory file keep noquery reset-vc-info)
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index d5e42f49825..a3469b71386 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -1289,6 +1289,7 @@ If PROMPT is non-nil, prompt for the Git command to run."
                           (lambda (_name-of-mode) buffer)
                           nil))))
     (vc-set-async-update buffer)
+    ;; Return the process for `vc-pull-and-push'
     proc))
 
 (defun vc-git-pull (prompt)
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 0890b63d417..72160c35f57 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -3064,7 +3064,8 @@ On a distributed version control system, this runs a 
\"pull\"
 operation on the current branch, prompting for the precise
 command if required.  Optional prefix ARG non-nil forces a prompt
 for the VCS command to run.  If this is successful, a \"push\"
-operation will then be done.
+operation will then be done.  This is supported only in backends
+where the pull operation returns a process.
 
 On a non-distributed version control system, this signals an error.
 It also signals an error in a Bazaar bound branch."
diff --git a/lisp/window.el b/lisp/window.el
index 84f5c5c3f5a..0cd30822ff6 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -5670,9 +5670,11 @@ the original point in both windows."
 
 (defun split-window-below (&optional size window-to-split)
   "Split WINDOW-TO-SPLIT into two windows, one above the other.
-WINDOW-TO-SPLIT defaults to the selected window and and will be above
-the other window after splitting.  The newly split-off window is
-below and displays the same buffer.  Return the new window.
+WINDOW-TO-SPLIT defaults to the selected window if omitted or nil.
+The newly created window will be below WINDOW-TO-SPLIT and will show
+the same buffer as WINDOW-TO-SPLIT, if it is a live window, else the
+buffer shown in the WINDOW-TO-SPLIT's frame's selected window.
+Return the new window.
 
 If optional argument SIZE is omitted or nil, both windows get the
 same height, or close to it.  If SIZE is positive, the upper
@@ -5735,9 +5737,11 @@ handled as in `split-window-below'."
 
 (defun split-window-right (&optional size window-to-split)
   "Split WINDOW-TO-SPLIT into two side-by-side windows.
-WINDOW-TO-SPLIT defaults to the selected window and and will be on the
-left after splitting.  The newly split-off window is on the right and
-displays the same buffer.  Return the new window.
+WINDOW-TO-SPLIT defaults to the selected window if omitted or nil.
+The newly created window will be to the right of WINDOW-TO-SPLIT and
+will show the same buffer as WINDOW-TO-SPLIT, if it is a live window,
+else the buffer shown in the WINDOW-TO-SPLIT's frame's selected window.
+Return the new window.
 
 If optional argument SIZE is omitted or nil, both windows get the
 same width, or close to it.  If SIZE is positive, the left-hand
diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el
index adfa480bc0f..4ccd35d5277 100644
--- a/lisp/xt-mouse.el
+++ b/lisp/xt-mouse.el
@@ -151,16 +151,22 @@ If `xterm-mouse-utf-8' was non-nil when
 `turn-on-xterm-mouse-tracking-on-terminal' was called, reads the
 coordinate as an UTF-8 code unit sequence; otherwise, reads a
 single byte."
-  (let ((previous-keyboard-coding-system (keyboard-coding-system)))
+  (let ((previous-keyboard-coding-system (keyboard-coding-system))
+        (utf-8-p (terminal-parameter nil 'xterm-mouse-utf-8))
+        ;; Prevent conversions inside 'read-char' due to input method,
+        ;; when we call 'read-char' below with 2nd argument non-nil.
+        (input-method-function nil))
     (unwind-protect
         (progn
-          (set-keyboard-coding-system
-           (if (terminal-parameter nil 'xterm-mouse-utf-8)
-               'utf-8-unix
-             'no-conversion))
-          ;; Wait only a little; we assume that the entire escape sequence
-          ;; has already been sent when this function is called.
-          (read-char nil nil 0.1))
+          (set-keyboard-coding-system (if utf-8-p 'utf-8-unix 'no-conversion))
+          (read-char nil
+                     ;; Force 'read-char' to decode UTF-8 sequences if
+                     ;; 'xterm-mouse-utf-8' is non-nil.
+                     utf-8-p
+                     ;; Wait only a little; we assume that the entire
+                     ;; escape sequence has already been sent when
+                     ;; this function is called.
+                     0.1))
       (set-keyboard-coding-system previous-keyboard-coding-system))))
 
 ;; In default mode, each numeric parameter of XTerm's mouse report is
diff --git a/src/insdel.c b/src/insdel.c
index b51767bf527..0e1e98664b3 100644
--- a/src/insdel.c
+++ b/src/insdel.c
@@ -1175,9 +1175,20 @@ insert_from_buffer (struct buffer *buf,
 {
   ptrdiff_t opoint = PT;
 
+#ifdef HAVE_TREE_SITTER
+  ptrdiff_t obyte = PT_BYTE;
+#endif
+
   insert_from_buffer_1 (buf, charpos, nchars, inherit);
   signal_after_change (opoint, 0, PT - opoint);
   update_compositions (opoint, PT, CHECK_BORDER);
+
+#ifdef HAVE_TREE_SITTER
+  eassert (PT_BYTE >= BEG_BYTE);
+  eassert (obyte >= BEG_BYTE);
+  eassert (PT_BYTE >= obyte);
+  treesit_record_change (obyte, obyte, PT_BYTE);
+#endif
 }
 
 static void
@@ -1305,12 +1316,6 @@ insert_from_buffer_1 (struct buffer *buf,
   /* Insert those intervals.  */
   graft_intervals_into_buffer (intervals, PT, nchars, current_buffer, inherit);
 
-#ifdef HAVE_TREE_SITTER
-  eassert (outgoing_nbytes >= 0);
-  eassert (PT_BYTE >= 0);
-  treesit_record_change (PT_BYTE, PT_BYTE, PT_BYTE + outgoing_nbytes);
-#endif
-
   adjust_point (nchars, outgoing_nbytes);
 }
 
diff --git a/src/xfaces.c b/src/xfaces.c
index 3e408537990..d6ffc92d20d 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -6049,7 +6049,6 @@ realize_non_ascii_face (struct frame *f, Lisp_Object 
font_object,
 
   return face;
 }
-#endif /* HAVE_WINDOW_SYSTEM */
 
 /* Remove the attribute at INDEX from the font object if SYMBOL
    appears in `font-fallback-ignored-attributes'.  */
@@ -6068,6 +6067,7 @@ font_maybe_unset_attribute (Lisp_Object font_object,
        ASET (font_object, index, Qnil);
     }
 }
+#endif /* HAVE_WINDOW_SYSTEM */
 
 /* Realize the fully-specified face with attributes ATTRS in face
    cache CACHE for ASCII characters.  Do it for GUI frame CACHE->f.
diff --git a/test/lisp/erc/erc-scenarios-base-compat-rename-bouncer.el 
b/test/lisp/erc/erc-scenarios-base-compat-rename-bouncer.el
index 74d4444ccd2..9275aba2875 100644
--- a/test/lisp/erc/erc-scenarios-base-compat-rename-bouncer.el
+++ b/test/lisp/erc/erc-scenarios-base-compat-rename-bouncer.el
@@ -1,4 +1,4 @@
-;;; erc-scenarios-compat-rename-bouncer.el --- compat-rename scenarios -*- 
lexical-binding: t -*-
+;;; erc-scenarios-base-compat-rename-bouncer.el --- Compat-rename scenarios 
-*- lexical-binding: t -*-
 
 ;; Copyright (C) 2022-2023 Free Software Foundation, Inc.
 
@@ -169,4 +169,4 @@
         (erc-scenarios-common--base-compat-no-rename-bouncer dialogs
                                                              'auto after)))))
 
-;;; erc-scenarios-compat-rename-bouncer.el ends here
+;;; erc-scenarios-base-compat-rename-bouncer.el ends here
diff --git a/test/lisp/erc/erc-scenarios-base-local-modules.el 
b/test/lisp/erc/erc-scenarios-base-local-modules.el
index 916d105779a..1318207a3bf 100644
--- a/test/lisp/erc/erc-scenarios-base-local-modules.el
+++ b/test/lisp/erc/erc-scenarios-base-local-modules.el
@@ -1,4 +1,4 @@
-;;; erc-scenarios-local-modules.el --- Local modules tests for ERC -*- 
lexical-binding: t -*-
+;;; erc-scenarios-base-local-modules.el --- Local-module tests for ERC -*- 
lexical-binding: t -*-
 
 ;; Copyright (C) 2022-2023 Free Software Foundation, Inc.
 
@@ -22,14 +22,15 @@
 ;; A local module doubles as a minor mode whose mode variable and
 ;; associated local data can withstand service disruptions.
 ;; Unfortunately, the current implementation is too unwieldy to be
-;; made public because it doesn't perform any of the boiler plate
-;; needed to save and restore buffer-local and "network-local" copies
-;; of user options.  Ultimately, a user-friendly framework must fill
-;; this void if third-party local modules are ever to become
+;; promoted publicly because it doesn't perform any of the boiler
+;; plate needed to save and restore buffer-local and "network-local"
+;; copies of user options.  Ultimately, a user-friendly framework must
+;; fill this void if third-party local modules are ever to become
 ;; practical.
 ;;
 ;; The following tests all use `sasl' because, as of ERC 5.5, it's the
-;; only local module.
+;; only connection-oriented local module.  A fictitious
+;; target-oriented module is defined below for testing purposes.
 
 ;;; Code:
 
@@ -325,4 +326,4 @@
         (funcall expect 10 "User modes for tester")
         (should (eql erc-scenarios-base-local-modules--local-var 1))))))
 
-;;; erc-scenarios-local-modules.el ends here
+;;; erc-scenarios-base-local-modules.el ends here
diff --git a/test/lisp/erc/erc-scenarios-base-netid-samenet.el 
b/test/lisp/erc/erc-scenarios-base-netid-samenet.el
index 7304dead44c..997dab93735 100644
--- a/test/lisp/erc/erc-scenarios-base-netid-samenet.el
+++ b/test/lisp/erc/erc-scenarios-base-netid-samenet.el
@@ -1,4 +1,4 @@
-;;; erc-scenarios-base-network-id-samenet.el --- netid-id samenet scenarios 
-*- lexical-binding: t -*-
+;;; erc-scenarios-base-netid-samenet.el --- One-network net-ID scenarios -*- 
lexical-binding: t -*-
 
 ;; Copyright (C) 2022-2023 Free Software Foundation, Inc.
 
@@ -148,4 +148,4 @@
          :server "foonet/chester"
          :chan "#chan@foonet/chester")))
 
-;;; erc-scenarios-base-network-id-samenet.el ends here
+;;; erc-scenarios-base-netid-samenet.el ends here
diff --git a/test/lisp/erc/erc-scenarios-base-upstream-recon-soju.el 
b/test/lisp/erc/erc-scenarios-base-upstream-recon-soju.el
index 28b0db77be6..fc8be982f65 100644
--- a/test/lisp/erc/erc-scenarios-base-upstream-recon-soju.el
+++ b/test/lisp/erc/erc-scenarios-base-upstream-recon-soju.el
@@ -1,4 +1,4 @@
-;;; erc-scenarios-upstream-recon-soju.el --- Upstream soju -*- 
lexical-binding: t -*-
+;;; erc-scenarios-base-upstream-recon-soju.el --- Bouncer recon scenario -*- 
lexical-binding: t -*-
 
 ;; Copyright (C) 2022-2023 Free Software Foundation, Inc.
 
@@ -19,7 +19,8 @@
 
 ;; Commentary:
 
-;; These concern the loss and recovery of a proxy's IRC-side connection.
+;; These concern the loss and recovery of a proxy's IRC-side
+;; connection (hence "upstream").
 
 ;;; Code:
 
@@ -41,4 +42,4 @@
    'soju-foonet
    'soju-barnet))
 
-;;; erc-scenarios-upstream-recon-soju.el ends here
+;;; erc-scenarios-base-upstream-recon-soju.el ends here
diff --git a/test/lisp/erc/erc-scenarios-base-upstream-recon-znc.el 
b/test/lisp/erc/erc-scenarios-base-upstream-recon-znc.el
index 79e1349bd95..461dac27b21 100644
--- a/test/lisp/erc/erc-scenarios-base-upstream-recon-znc.el
+++ b/test/lisp/erc/erc-scenarios-base-upstream-recon-znc.el
@@ -1,4 +1,4 @@
-;;; erc-scenarios-upstream-recon-znc.el --- Upstream znc -*- lexical-binding: 
t -*-
+;;; erc-scenarios-base-upstream-recon-znc.el --- Bouncer recon scenario -*- 
lexical-binding: t -*-
 
 ;; Copyright (C) 2022-2023 Free Software Foundation, Inc.
 
@@ -19,7 +19,8 @@
 
 ;; Commentary:
 
-;; These concern the loss and recovery of a proxy's IRC-side connection.
+;; These concern the loss and recovery of a proxy's IRC-side
+;; connection (hence "upstream").
 
 ;;; Code:
 
@@ -41,4 +42,4 @@
    'znc-foonet
    'znc-barnet))
 
-;;; erc-scenarios-upstream-recon-znc.el ends here
+;;; erc-scenarios-base-upstream-recon-znc.el ends here
diff --git a/test/lisp/eshell/esh-proc-tests.el 
b/test/lisp/eshell/esh-proc-tests.el
index ae7b1dddd69..8e02fbb5497 100644
--- a/test/lisp/eshell/esh-proc-tests.el
+++ b/test/lisp/eshell/esh-proc-tests.el
@@ -19,6 +19,7 @@
 
 ;;; Code:
 
+(require 'tramp)
 (require 'ert)
 (require 'esh-mode)
 (require 'eshell)
@@ -85,6 +86,18 @@
       "\\`\\'"))
     (should (equal (buffer-string) "stdout\nstderr\n"))))
 
+(ert-deftest esh-var-test/output/remote-redirect ()
+  "Check that redirecting stdout for a remote process works."
+  (skip-unless (and (eshell-tests-remote-accessible-p)
+                    (executable-find "echo")))
+  (let ((default-directory ert-remote-temporary-file-directory))
+    (eshell-with-temp-buffer bufname "old"
+      (with-temp-eshell
+       (eshell-match-command-output
+        (format "*echo hello > #<%s>" bufname)
+        "\\`\\'"))
+      (should (equal (buffer-string) "hello\n")))))
+
 
 ;; Exit status
 
diff --git a/test/lisp/eshell/esh-util-tests.el 
b/test/lisp/eshell/esh-util-tests.el
index afaf1b77f2b..ed841e96c7e 100644
--- a/test/lisp/eshell/esh-util-tests.el
+++ b/test/lisp/eshell/esh-util-tests.el
@@ -54,4 +54,69 @@
   "Test that `eshell-stringify' correctly stringifies complex objects."
   (should (equal (eshell-stringify (list 'quote 'hello)) "'hello")))
 
+(ert-deftest esh-util-test/eshell-convert-to-number/integer ()
+  "Test that `eshell-convert-to-number' correctly converts integers."
+  (should (equal (eshell-convert-to-number "123") 123))
+  (should (equal (eshell-convert-to-number "-123") -123))
+  ;; These are technially integers, since Emacs Lisp requires at least
+  ;; one digit after the "." to be a float:
+  (should (equal (eshell-convert-to-number "123.") 123))
+  (should (equal (eshell-convert-to-number "-123.") -123)))
+
+(ert-deftest esh-util-test/eshell-convert-to-number/floating-point ()
+  "Test that `eshell-convert-to-number' correctly converts floats."
+  (should (equal (eshell-convert-to-number "1.23") 1.23))
+  (should (equal (eshell-convert-to-number "-1.23") -1.23))
+  (should (equal (eshell-convert-to-number ".1") 0.1))
+  (should (equal (eshell-convert-to-number "-.1") -0.1)))
+
+(ert-deftest esh-util-test/eshell-convert-to-number/floating-point-exponent ()
+  "Test that `eshell-convert-to-number' correctly converts exponent notation."
+  ;; Positive exponent:
+  (dolist (exp '("e2" "e+2" "E2" "E+2"))
+    (should (equal (eshell-convert-to-number (concat "123" exp)) 12300.0))
+    (should (equal (eshell-convert-to-number (concat "-123" exp)) -12300.0))
+    (should (equal (eshell-convert-to-number (concat "1.23" exp)) 123.0))
+    (should (equal (eshell-convert-to-number (concat "-1.23" exp)) -123.0))
+    (should (equal (eshell-convert-to-number (concat "1." exp)) 100.0))
+    (should (equal (eshell-convert-to-number (concat "-1." exp)) -100.0))
+    (should (equal (eshell-convert-to-number (concat ".1" exp)) 10.0))
+    (should (equal (eshell-convert-to-number (concat "-.1" exp)) -10.0)))
+  ;; Negative exponent:
+  (dolist (exp '("e-2" "E-2"))
+    (should (equal (eshell-convert-to-number (concat "123" exp)) 1.23))
+    (should (equal (eshell-convert-to-number (concat "-123" exp)) -1.23))
+    (should (equal (eshell-convert-to-number (concat "1.23" exp)) 0.0123))
+    (should (equal (eshell-convert-to-number (concat "-1.23" exp)) -0.0123))
+    (should (equal (eshell-convert-to-number (concat "1." exp)) 0.01))
+    (should (equal (eshell-convert-to-number (concat "-1." exp)) -0.01))
+    (should (equal (eshell-convert-to-number (concat ".1" exp)) 0.001))
+    (should (equal (eshell-convert-to-number (concat "-.1" exp)) -0.001))))
+
+(ert-deftest esh-util-test/eshell-convert-to-number/floating-point/infinite ()
+  "Test that `eshell-convert-to-number' correctly converts infinite floats."
+  (should (equal (eshell-convert-to-number "1.0e+INF") 1.0e+INF))
+  (should (equal (eshell-convert-to-number "2.e+INF") 1.0e+INF))
+  (should (equal (eshell-convert-to-number "-1.0e+INF") -1.0e+INF))
+  (should (equal (eshell-convert-to-number "-2.e+INF") -1.0e+INF)))
+
+(ert-deftest esh-util-test/eshell-convert-to-number/floating-point/nan ()
+  "Test that `eshell-convert-to-number' correctly converts NaNs."
+  (should (equal (eshell-convert-to-number "1.0e+NaN") 1.0e+NaN))
+  (should (equal (eshell-convert-to-number "2.e+NaN") 2.0e+NaN))
+  (should (equal (eshell-convert-to-number "-1.0e+NaN") -1.0e+NaN))
+  (should (equal (eshell-convert-to-number "-2.e+NaN") -2.0e+NaN)))
+
+(ert-deftest esh-util-test/eshell-convert-to-number/non-numeric ()
+  "Test that `eshell-convert-to-number' does nothing to non-numeric values."
+  (should (equal (eshell-convert-to-number "foo") "foo"))
+  (should (equal (eshell-convert-to-number "") ""))
+  (should (equal (eshell-convert-to-number "123foo") "123foo")))
+
+(ert-deftest esh-util-test/eshell-convert-to-number/no-convert ()
+  "Test that `eshell-convert-to-number' does nothing when disabled."
+  (let ((eshell-convert-numeric-arguments nil))
+    (should (equal (eshell-convert-to-number "123") "123"))
+    (should (equal (eshell-convert-to-number "1.23") "1.23"))))
+
 ;;; esh-util-tests.el ends here
diff --git a/test/lisp/eshell/esh-var-tests.el 
b/test/lisp/eshell/esh-var-tests.el
index 12412d13640..6767d9289f9 100644
--- a/test/lisp/eshell/esh-var-tests.el
+++ b/test/lisp/eshell/esh-var-tests.el
@@ -72,52 +72,89 @@
     (eshell-command-result-equal "echo a$'eshell-test-value'z"
                                  '("a1" 2 "3z"))))
 
-(ert-deftest esh-var-test/interp-var-indices ()
-  "Interpolate list variable with indices"
-  (let ((eshell-test-value '("zero" "one" "two" "three" "four")))
+(defun esh-var-test/interp-var-indices (function &optional range-function)
+  "Test interpolation of an indexable value with indices.
+FUNCTION is a function that takes a list of elements and returns
+the object to test.
+
+RANGE-FUNCTION is a function that takes a list of elements and
+returns the expected result of an index range for the object; if
+nil, use FUNCTION instead."
+  (let ((eshell-test-value
+         (funcall function '("zero" "one" "two" "three" "four")))
+        (range-function (or range-function function)))
+    ;; Positive indices
     (eshell-command-result-equal "echo $eshell-test-value[0]"
                                  "zero")
     (eshell-command-result-equal "echo $eshell-test-value[0 2]"
                                  '("zero" "two"))
     (eshell-command-result-equal "echo $eshell-test-value[0 2 4]"
-                                 '("zero" "two" "four"))))
-
-(ert-deftest esh-var-test/interp-var-indices-subcommand ()
-  "Interpolate list variable with subcommand expansion for indices."
-  (skip-unless (executable-find "echo"))
-  (let ((eshell-test-value '("zero" "one" "two" "three" "four")))
+                                 '("zero" "two" "four"))
+    ;; Negative indices
+    (eshell-command-result-equal "echo $eshell-test-value[-1]"
+                                 "four")
+    (eshell-command-result-equal "echo $eshell-test-value[-1 -3]"
+                                 '("four" "two"))
+    ;; Index ranges
     (eshell-command-result-equal
-     "echo $eshell-test-value[${*echo 0}]"
-     "zero")
+     "echo $eshell-test-value[1..4]"
+     (funcall range-function '("one" "two" "three")))
     (eshell-command-result-equal
-     "echo $eshell-test-value[${*echo 0} ${*echo 2}]"
-     '("zero" "two"))))
+     "echo $eshell-test-value[..2]"
+     (funcall range-function '("zero" "one")))
+    (eshell-command-result-equal
+     "echo $eshell-test-value[-2..]"
+     (funcall range-function '("three" "four")))
+    (eshell-command-result-equal
+     "echo $eshell-test-value[..]"
+     (funcall range-function '("zero" "one" "two" "three" "four")))
+    (eshell-command-result-equal
+     "echo $eshell-test-value[1..4 -2..]"
+     (list (funcall range-function '("one" "two" "three"))
+           (funcall range-function '("three" "four"))))))
+
+(ert-deftest esh-var-test/interp-var-indices/list ()
+  "Interpolate list variable with indices."
+  (esh-var-test/interp-var-indices #'identity))
+
+(ert-deftest esh-var-test/interp-var-indices/vector ()
+  "Interpolate vector variable with indices."
+  (esh-var-test/interp-var-indices #'vconcat))
 
-(ert-deftest esh-var-test/interp-var-split-indices ()
+(ert-deftest esh-var-test/interp-var-indices/ring ()
+  "Interpolate ring variable with indices."
+  (esh-var-test/interp-var-indices #'ring-convert-sequence-to-ring))
+
+(ert-deftest esh-var-test/interp-var-indices/split ()
   "Interpolate string variable with indices."
-  (let ((eshell-test-value "zero one two three four"))
-    (eshell-command-result-equal "echo $eshell-test-value[0]"
-                                 "zero")
-    (eshell-command-result-equal "echo $eshell-test-value[0 2]"
-                                 '("zero" "two"))
-    (eshell-command-result-equal "echo $eshell-test-value[0 2 4]"
-                                 '("zero" "two" "four"))))
+  (esh-var-test/interp-var-indices
+   (lambda (values) (string-join values " "))
+   #'identity))
 
 (ert-deftest esh-var-test/interp-var-string-split-indices ()
   "Interpolate string variable with string splitter and indices."
+  ;; Test using punctuation as a delimiter.
   (let ((eshell-test-value "zero:one:two:three:four"))
     (eshell-command-result-equal "echo $eshell-test-value[: 0]"
                                  "zero")
     (eshell-command-result-equal "echo $eshell-test-value[: 0 2]"
                                  '("zero" "two")))
+  ;; Test using a letter as a delimiter.
   (let ((eshell-test-value "zeroXoneXtwoXthreeXfour"))
     (eshell-command-result-equal "echo $eshell-test-value[X 0]"
                                  "zero")
     (eshell-command-result-equal "echo $eshell-test-value[X 0 2]"
+                                 '("zero" "two")))
+  ;; Test using a number as a delimiter.
+  (let ((eshell-test-value "zero0one0two0three0four"))
+    (eshell-command-result-equal "echo $eshell-test-value[\"0\" 0]"
+                                 "zero")
+    (eshell-command-result-equal "echo $eshell-test-value[\"0\" 0 2]"
                                  '("zero" "two"))))
 
 (ert-deftest esh-var-test/interp-var-regexp-split-indices ()
   "Interpolate string variable with regexp splitter and indices."
+  ;; Test using a regexp as a delimiter.
   (let ((eshell-test-value "zero:one!two:three!four"))
     (eshell-command-result-equal "echo $eshell-test-value['[:!]' 0]"
                                  "zero")
@@ -126,15 +163,34 @@
     (eshell-command-result-equal "echo $eshell-test-value[\"[:!]\" 0]"
                                  "zero")
     (eshell-command-result-equal "echo $eshell-test-value[\"[:!]\" 0 2]"
+                                 '("zero" "two")))
+  ;; Test using a regexp that looks like range syntax as a delimiter.
+  (let ((eshell-test-value "zero0..0one0..0two0..0three0..0four"))
+    (eshell-command-result-equal "echo $eshell-test-value[\"0..0\" 0]"
+                                 "zero")
+    (eshell-command-result-equal "echo $eshell-test-value[\"0..0\" 0 2]"
                                  '("zero" "two"))))
 
 (ert-deftest esh-var-test/interp-var-assoc ()
   "Interpolate alist variable with index."
-  (let ((eshell-test-value '(("foo" . 1) (bar . 2))))
+  (let ((eshell-test-value '(("foo" . 1) (bar . 2) ("3" . "three"))))
     (eshell-command-result-equal "echo $eshell-test-value[foo]"
                                  1)
     (eshell-command-result-equal "echo $eshell-test-value[#'bar]"
-                                 2)))
+                                 2)
+    (eshell-command-result-equal "echo $eshell-test-value[\"3\"]"
+                                 "three")))
+
+(ert-deftest esh-var-test/interp-var-indices-subcommand ()
+  "Interpolate list variable with subcommand expansion for indices."
+  (skip-unless (executable-find "echo"))
+  (let ((eshell-test-value '("zero" "one" "two" "three" "four")))
+    (eshell-command-result-equal
+     "echo $eshell-test-value[${*echo 0}]"
+     "zero")
+    (eshell-command-result-equal
+     "echo $eshell-test-value[${*echo 0} ${*echo 2}]"
+     '("zero" "two"))))
 
 (ert-deftest esh-var-test/interp-var-length-list ()
   "Interpolate length of list variable."
diff --git a/test/lisp/progmodes/c-ts-mode-resources/indent.erts 
b/test/lisp/progmodes/c-ts-mode-resources/indent.erts
index b8524432d02..67654404a77 100644
--- a/test/lisp/progmodes/c-ts-mode-resources/indent.erts
+++ b/test/lisp/progmodes/c-ts-mode-resources/indent.erts
@@ -105,6 +105,58 @@ main (int   argc,
 }
 =-=-=
 
+Name: Bracket-less Block-Statement (GNU Style) (bug#61026)
+
+=-=
+int main() {
+  while (true)
+    if (true)
+      {
+        puts ("Hello");
+      }
+  for (int i=0; i<5; i++)
+    if (true)
+      {
+        puts ("Hello");
+      }
+  do
+    if (true)
+      {
+        puts ("Hello");
+      }
+  while (true);
+  if (true)
+    if (true)
+      {
+        puts ("Hello");
+      }
+}
+=-=-=
+
+Name: Bracket-less Block-Statement (Linux Style) (bug#61026)
+
+=-=-=
+int main() {
+  while (true)
+    if (true) {
+      puts ("Hello");
+    }
+  for (int i=0; i<5; i++)
+    if (true) {
+      puts ("Hello");
+    }
+  do
+    if (true) {
+      puts ("Hello");
+    }
+  while (true);
+  if (true)
+    if (true) {
+      puts ("Hello");
+    }
+}
+=-=-=
+
 Name: Multiline Parameter List (bug#60398)
 
 =-=
diff --git a/test/lisp/progmodes/project-tests.el 
b/test/lisp/progmodes/project-tests.el
index aea0666629d..5a206b67db1 100644
--- a/test/lisp/progmodes/project-tests.el
+++ b/test/lisp/progmodes/project-tests.el
@@ -152,4 +152,14 @@ When `project-ignores' includes a name matching project 
dir."
     (should (equal '(".dir-locals.el" "foo")
                    (mapcar #'file-name-nondirectory (project-files 
project))))))
 
+(ert-deftest project-vc-nonexistent-directory-no-error ()
+  "Check that is doesn't error out when the current dir does not exist."
+  (skip-unless (eq (vc-responsible-backend default-directory) 'Git))
+  (let* ((dir (expand-file-name "foo-456/bar/" (ert-resource-directory)))
+         (_ (vc-file-clearprops dir))
+         (project-vc-extra-root-markers '(".dir-locals.el"))
+         (project (project-current nil dir)))
+    (should-not (null project))
+    (should (string-match-p "/test/lisp/progmodes/project-resources/\\'" 
(project-root project)))))
+
 ;;; project-tests.el ends here



reply via email to

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