emacs-diffs
[Top][All Lists]
Advanced

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

master 419ca81809: Merge from origin/emacs-29


From: Stefan Kangas
Subject: master 419ca81809: Merge from origin/emacs-29
Date: Mon, 26 Dec 2022 00:45:47 -0500 (EST)

branch: master
commit 419ca81809c2eda9c9f102b7da820a6eb9685cc8
Merge: 48db8b68a8 6c00d126e7
Author: Stefan Kangas <stefankangas@gmail.com>
Commit: Stefan Kangas <stefankangas@gmail.com>

    Merge from origin/emacs-29
    
    6c00d126e7f Remove remaining mentions of 'eval-current-buffer'
    1073e96170b ; * doc/lispref/text.texi (Database): Fix a typo.  (Bug#6...
    b1e68a33d89 Update to Org 9.6-61-g63e073f
    dad73e4de19 ; Review and fix NEWS and related documentation
    72786ae237e ; Restore ARGS argument in c-ts-mode--fontify-declarator
    940ab2423ca ; Always consider :lisp-dir when locating main file of VC...
    9ab98cd42aa Add heuristic to locate lisp code in source packages
    dda011c78d1 ; * doc/lispref/parsing.texi (Tree-sitter major modes): F...
    d62b634d8fc ; * src/process.c (Fprocess_running_child_p): Doc fix.
    f6c5b3d635e ; * doc/lispref/parsing.texi: Add a reminder.
    e6c49c0454e ; Fix byte-copmiler warning in c-ts-mode--fontify-declarator
    4234033a47a ; * lisp/treesit.el: Add some comments.
    79584a206b9 Further generalize treesit-defun functions
    a819ca5a93c Generalize treesit-defun functions to "things"
    e8b34109eeb Reorder optional arguments to 'package-vc-install'
    b38e56d8a98 Handle missing dependencies for source packages
    7bc7b6b4dd9 ; Partial revert of f3e7820b
    2cec78254ea ; * nt/INSTALL.W64: Fix wording.
    ecee3bd4209 ; Fix recent changes in treesit documentation
    
    # Conflicts:
    #       etc/NEWS
---
 doc/lispref/display.texi      |  14 ++
 doc/lispref/edebug.texi       |  23 +-
 doc/lispref/eval.texi         |   3 -
 doc/lispref/parsing.texi      |  35 ++-
 doc/lispref/text.texi         |   2 +-
 etc/NEWS.29                   | 559 ++++++++++++++++++++++++------------------
 lisp/emacs-lisp/edebug.el     |   6 +-
 lisp/emacs-lisp/package-vc.el | 263 +++++++++++++-------
 lisp/emacs-lisp/package.el    |   2 +-
 lisp/emacs-lisp/subr-x.el     |   5 +-
 lisp/org/ob-core.el           |  10 +-
 lisp/org/ob-tangle.el         |   3 +-
 lisp/org/oc-basic.el          |  18 +-
 lisp/org/org-element.el       |  16 +-
 lisp/org/org-persist.el       |  46 +++-
 lisp/org/org-version.el       |   2 +-
 lisp/org/org.el               |   5 +-
 lisp/org/ox-html.el           |   2 +-
 lisp/progmodes/c-ts-mode.el   |   2 +-
 lisp/treesit.el               | 180 ++++++++++----
 nt/INSTALL.W64                |  37 +--
 src/process.c                 |  11 +-
 22 files changed, 774 insertions(+), 470 deletions(-)

diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 2332bf3ecf..3743499454 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -346,6 +346,20 @@ The default value is the function that clears the message 
displayed in
 an active minibuffer.
 @end defvar
 
+@defopt set-message-functions
+The value of this user option is a list of functions to be called for
+handling display of echo-area messages.  Each function is called with
+one argument, the text of the message to display.  If the function
+returns a string, that string replaces the original message, and the
+next function in the list is called with the new message text.  If the
+function returns @code{nil}, the next function in the list is called
+with the same text; if the last function in the list returns
+@code{nil}, the message text is displayed in the echo area.  If the
+function returns a non-@code{nil} value that is not a string, the
+message is considered to be handled, and no further functions in the
+list are called.
+@end defopt
+
 @defvar inhibit-message
 When this variable is non-@code{nil}, @code{message} and related functions
 will not use the Echo Area to display messages.
diff --git a/doc/lispref/edebug.texi b/doc/lispref/edebug.texi
index 1562a37842..93bafce1f3 100644
--- a/doc/lispref/edebug.texi
+++ b/doc/lispref/edebug.texi
@@ -171,14 +171,13 @@ of the variable @code{edebug-all-defs}.
 
 @findex eval-region @r{(Edebug)}
 @findex eval-buffer @r{(Edebug)}
-@findex eval-current-buffer @r{(Edebug)}
   If @code{edebug-all-defs} is non-@code{nil}, then the commands
-@code{eval-region}, @code{eval-current-buffer}, and @code{eval-buffer}
-also instrument any definitions they evaluate.  Similarly,
-@code{edebug-all-forms} controls whether @code{eval-region} should
-instrument @emph{any} form, even non-defining forms.  This doesn't apply
-to loading or evaluations in the minibuffer.  The command @kbd{M-x
-edebug-all-forms} toggles this option.
+@code{eval-region}, and @code{eval-buffer} also instrument any
+definitions they evaluate.  Similarly, @code{edebug-all-forms}
+controls whether @code{eval-region} should instrument @emph{any} form,
+even non-defining forms.  This doesn't apply to loading or evaluations
+in the minibuffer.  The command @kbd{M-x edebug-all-forms} toggles
+this option.
 
 @findex edebug-eval-top-level-form
 @findex edebug-defun
@@ -1635,8 +1634,8 @@ but only when you also use Edebug.
 @defopt edebug-all-defs
 If this is non-@code{nil}, normal evaluation of defining forms such as
 @code{defun} and @code{defmacro} instruments them for Edebug.  This
-applies to @code{eval-defun}, @code{eval-region}, @code{eval-buffer},
-and @code{eval-current-buffer}.
+applies to @code{eval-defun}, @code{eval-region} and
+@code{eval-buffer}.
 
 Use the command @kbd{M-x edebug-all-defs} to toggle the value of this
 option.  @xref{Instrumenting}.
@@ -1644,9 +1643,9 @@ option.  @xref{Instrumenting}.
 
 @defopt edebug-all-forms
 If this is non-@code{nil}, the commands @code{eval-defun},
-@code{eval-region}, @code{eval-buffer}, and @code{eval-current-buffer}
-instrument all forms, even those that don't define anything.
-This doesn't apply to loading or evaluations in the minibuffer.
+@code{eval-region} and @code{eval-buffer} instrument all forms, even
+those that don't define anything.  This doesn't apply to loading or
+evaluations in the minibuffer.
 
 Use the command @kbd{M-x edebug-all-forms} to toggle the value of this
 option.  @xref{Instrumenting}.
diff --git a/doc/lispref/eval.texi b/doc/lispref/eval.texi
index 11c321b32e..159e440a98 100644
--- a/doc/lispref/eval.texi
+++ b/doc/lispref/eval.texi
@@ -819,9 +819,6 @@ output of the output functions is printed in the echo area.
 (@pxref{Unloading}), and defaults to @code{buffer-file-name}
 (@pxref{Buffer File Name}).  If @var{unibyte} is non-@code{nil},
 @code{read} converts strings to unibyte whenever possible.
-
-@findex eval-current-buffer
-@code{eval-current-buffer} is an alias for this command.
 @end deffn
 
 @defopt max-lisp-eval-depth
diff --git a/doc/lispref/parsing.texi b/doc/lispref/parsing.texi
index 918e197676..6baa253cfd 100644
--- a/doc/lispref/parsing.texi
+++ b/doc/lispref/parsing.texi
@@ -580,8 +580,8 @@ If @var{parser-or-lang} is a parser object, this function 
uses that
 parser; if @var{parser-or-lang} is a language, this function uses the
 first parser for that language in the current buffer, or creates one
 if none exists; if @var{parser-or-lang} is @code{nil}, this function
-tries to guess the language at @var{pos} by
-@code{treesit-language-at}.
+tries to guess the language at @var{pos} by calling
+@code{treesit-language-at} (@pxref{Multiple Languages}).
 
 If this function cannot find a suitable node to return, it returns
 @code{nil}.
@@ -616,7 +616,7 @@ If @var{parser-or-lang} is a parser object, this function 
uses that
 parser; if @var{parser-or-lang} is a language, this function uses the
 first parser for that language in the current buffer, or creates one
 if none exists; if @var{parser-or-lang} is @code{nil}, this function
-tries to guess the language at @var{beg} by
+tries to guess the language at @var{beg} by calling
 @code{treesit-language-at}.
 
 If @var{named} is non-@code{nil}, this function looks for a named node
@@ -1717,16 +1717,22 @@ This function activates some tree-sitter features for a 
major mode.
 
 Currently, it sets up the following features:
 @itemize
+@vindex treesit-font-lock-settings
 @item
 If @code{treesit-font-lock-settings} is non-@code{nil}, it sets up
 fontification.
+
+@vindex treesit-simple-indent-rules
 @item
 If @code{treesit-simple-indent-rules} is non-@code{nil}, it sets up
 indentation.
+
+@vindex treesit-defun-type-regexp
 @item
 If @code{treesit-defun-type-regexp} is non-@code{nil}, it sets up
 navigation functions for @code{beginning-of-defun} and
 @code{end-of-defun}.
+
 @item
 If @code{treesit-defun-name-function} is non-@code{nil}, it sets up
 add-log functions used by @code{add-log-current-defun}.
@@ -1745,11 +1751,13 @@ provides some additional functions for working with 
defuns:
 @code{treesit-defun-at-point} returns the defun node at point, and
 @code{treesit-defun-name} returns the name of a defun node.
 
+@c FIXME: Cross-reference to treesit-defun-tactic once we have it in
+@c the user manual.
 @defun treesit-defun-at-point
 This function returns the defun node at point, or @code{nil} if none
-is found.  It respects @code{treesit-defun-tactic}: it returns the
-top-level defun if the value is @code{top-level}, and returns the
-immediate enclosing defun if the value is @code{nested}.
+is found.  It respects @code{treesit-defun-tactic}: if its value is
+@code{top-level}, this function returns the top-level defun, and if
+its value is @code{nested}, it returns the immediate enclosing defun.
 
 This function requires @code{treesit-defun-type-regexp} to work.  If
 it is @code{nil}, this function simply returns @code{nil}.
@@ -1760,19 +1768,20 @@ This function returns the defun name of @var{node}.  It 
returns
 @code{nil} if there is no defun name for @var{node}, or if @var{node}
 is not a defun node, or if @var{node} is @code{nil}.
 
-The defun name is names like function name, class name, struct name,
-etc.
+Depending on the language and major mode, the defun names are names
+like function name, class name, struct name, etc.
 
 If @code{treesit-defun-name-function} is @code{nil}, this function
 always returns @code{nil}.
 @end defun
 
 @defvar treesit-defun-name-function
-If non-@code{nil}, this variable should store a function that is
-called with a node and returns the defun name of it.  The function
-should have the same semantic as @code{treesit-defun-name}: if the
-node is not a defun node, or the node is a defun node but doesn't have
-a name, or the node is @code{nil}, return @code{nil}.
+If non-@code{nil}, this variable's value should be a function that is
+called with a node as its argument, and returns the defun name of the
+node.  The function should have the same semantic as
+@code{treesit-defun-name}: if the node is not a defun node, or the
+node is a defun node but doesn't have a name, or the node is
+@code{nil}, it should return @code{nil}.
 @end defvar
 
 @node Tree-sitter C API
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi
index ef938e88ec..9834909993 100644
--- a/doc/lispref/text.texi
+++ b/doc/lispref/text.texi
@@ -5351,7 +5351,7 @@ called @var{gif}, you have to mark it specially to let
 
 @end defun
 
-@defun sqlite-select db query &optional values result-type
+@defun sqlite-select db query &optional values return-type
 Select some data from @var{db} and return them.  For instance:
 
 @lisp
diff --git a/etc/NEWS.29 b/etc/NEWS.29
index 6f2f74fab4..5b804b82b7 100644
--- a/etc/NEWS.29
+++ b/etc/NEWS.29
@@ -106,7 +106,7 @@ If a constant file name is required, the file can be 
renamed to
 "emacs.pdmp", and Emacs will find it during startup anyway.
 
 ---
-** Emacs now uses XInput 2 for input events.
+** Emacs on X now uses XInput 2 for input events.
 If your X server has support and you have the XInput 2 development
 headers installed, Emacs will use the X Input Extension for handling
 input.  If this causes problems, you can configure Emacs with the
@@ -115,6 +115,19 @@ option '--without-xinput2' to disable this support.
 '(featurep 'xinput2)' can be used to test for the presence of XInput 2
 support from Lisp programs.
 
++++
+** Emacs now supports being built with pure GTK.
+To use this option, make sure the GTK 3 (version 3.22.23 or later) and
+Cairo development files are installed, and configure Emacs with the
+option '--with-pgtk'.  Unlike the default X and GTK build, the
+resulting Emacs binary will work on any underlying window system
+supported by GDK, such as Wayland and Broadway.  We recommend that you
+use this configuration only if you are running a window system other
+than X that's supported by GDK.  Running this configuration on X is
+known to have problems, such as undesirable frame positioning and
+various issues with keyboard input of sequences such as 'C-;' and
+'C-S-u'.
+
 ---
 ** Emacs no longer reduces the size of the Japanese dictionary.
 Building Emacs includes generation of a Japanese dictionary, which is
@@ -130,23 +143,10 @@ by saying
 
 after deleting "lisp/leim/ja-dic/ja-dic.el".
 
-+++
-** Emacs now supports being built with pure GTK.
-To use this option, make sure the GTK 3 (version 3.22.23 or later) and
-Cairo development files are installed, and configure Emacs with the
-option '--with-pgtk'.  Unlike the default X and GTK build, the
-resulting Emacs binary will work on any underlying window system
-supported by GDK, such as Wayland and Broadway.  We do not recommend
-that you use this configuration, unless you are running a window
-system that's supported by GDK other than X.  Running this
-configuration on X is known to have problems, such as undesirable
-frame positioning and various issues with keyboard input of sequences
-such as 'C-;' and 'C-S-u'.
-
 ---
 ** The docstrings of preloaded files are not in "etc/DOC" any more.
-Instead, they're fetched as needed from the corresponding ".elc" file,
-as was already the case for all the non-preloaded files.
+Instead, they're fetched as needed from the corresponding ".elc"
+files, as was already the case for all the non-preloaded files.
 
 
 * Startup Changes in Emacs 29.1
@@ -172,16 +172,18 @@ the value of the final form.
 
 +++
 ** Emacs now supports setting 'user-emacs-directory' via '--init-directory'.
+Use the '--init-directory' command-line option to set
+'user-emacs-directory'.
 
 +++
 ** Emacs now has a '--fingerprint' option.
-This will output a string identifying the current Emacs build.
+This will output a string identifying the current Emacs build, and exit.
 
 +++
 ** New hook 'after-pdump-load-hook'.
 This is run at the end of the Emacs startup process, and is meant to
-be used to reinitialize structures that would normally be done at load
-time.
+be used to reinitialize data structures that would normally be done at
+load time.
 
 ** Native Compilation
 
@@ -189,13 +191,15 @@ time.
 *** New variable 'inhibit-automatic-native-compilation'.
 If set, Emacs will inhibit native compilation (and won't write
 anything to the eln cache automatically).  The variable is initialized
-from the 'EMACS_INHIBIT_AUTOMATIC_NATIVE_COMPILATION' environment
-variable on Emacs startup.
+during Emacs startup from the environment variable
+'EMACS_INHIBIT_AUTOMATIC_NATIVE_COMPILATION'.
 
 ---
 *** New command 'native-compile-prune-cache'.
-This command deletes older eln cache entries (but not the ones for
-the current Emacs version).
+This command deletes old subdirectories of the eln cache (but not the
+ones for the current Emacs version).  Note that subdirectories of the
+system directory where the "*.eln" files are installed (usually, the
+last entry in 'native-comp-eln-load-path') are not deleted.
 
 ---
 *** New function 'startup-redirect-eln-cache'.
@@ -219,12 +223,12 @@ moved to the 'i' keymap, so '+' is now 'i +', '-' is now 
'i -', and
 you can rotate an image twice by saying 'i r r', for instance.
 
 +++
-** Emacs now picks the correct coding system for X input methods.
-Previously, Emacs would use the locale coding system for input
+** Emacs now picks the correct coding-system for X input methods.
+Previously, Emacs would use 'locale-coding-system' for input
 methods, which could in some circumstances be incorrect, especially
 when the input method chose to fall back to some other coding system.
 
-Now, Emacs automatically detects the coding system used by input
+Emacs now automatically detects the coding-system used by input
 methods, and uses that to decode input in preference to the value of
 'locale-coding-system'.  This unfortunately means that users who have
 changed the coding system used to decode X keyboard input must adjust
@@ -244,7 +248,7 @@ names to be excluded from adding such excerpts.
 In Emacs versions previous to Emacs 28.1, 'show-paren-mode' defaulted
 off.  In Emacs 28.1, the mode was switched on in all buffers.  In
 Emacs 29.1, this was changed to be switched on in all editing-related
-buffers, but not in buffers that inherit from 'special-mode'.  To get
+buffers, but not in buffers that inherit from 'special-mode'.  To go
 back to how things worked in Emacs 28.1, put the following in your
 init file:
 
@@ -291,7 +295,7 @@ mouse (in 'transient-mark-mode') and then hitting 'd' would 
skip dot
 files.  These now work equivalently.
 
 +++
-** Warning about "eager macro-expansion failure" is changed into an error.
+** Warning about "eager macro-expansion failure" is now an error.
 
 ---
 ** Previously, the X "reverseVideo" value at startup was heeded for all frames.
@@ -324,9 +328,9 @@ 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
 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 changing the contents
-of the buffer.
+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
+contents of the buffer.
 
 ---
 ** 'string-lines' handles trailing newlines differently.
@@ -355,7 +359,7 @@ your Init file:
 
 ---
 ** New user option 'term-clear-full-screen-programs'.
-By default, term will now work like most terminals when displaying
+By default, term.el will now work like most terminals when displaying
 full-screen programs: When they exit, the output is cleared, leaving
 what was displayed in the window before the programs started.  Set
 this user option to nil to revert back to the old behavior.
@@ -452,8 +456,8 @@ Names of thumbnail files generated when 
'image-dired-thumbnail-storage'
 is 'image-dired' now always end in ".jpg".  This fixes various issues
 on different platforms, but means that thumbnails generated in Emacs 28
 will not be used in Emacs 29, and vice-versa.  If disk space is an
-issue, consider deleting the 'image-dired-dir' directory after
-upgrading (usually "~/.emacs.d/image-dired/").
+issue, consider deleting the 'image-dired-dir' directory (usually
+"~/.emacs.d/image-dired/") after upgrading to Emacs 29.
 
 ---
 ** The 'rlogin' method in the URL library is now obsolete.
@@ -506,7 +510,7 @@ We recommend using 'M-x image-dired' instead.
 ** The autoarg.el library is now marked obsolete.
 This library provides the 'autoarg-mode' and 'autoarg-kp-mode' minor
 modes to emulate the behavior of the historical editor Twenex Emacs.
-It is believed to no longer be useful.
+We believe it is no longer useful.
 
 ---
 ** The quickurl.el library is now obsolete.
@@ -521,7 +525,7 @@ Use something like 'M-x shell RET ssh <host> RET' instead.
 
 ---
 ** The autoload.el library is now obsolete.
-It is superseded by the loaddefs-gen.el library.
+It is superseded by the new loaddefs-gen.el library.
 
 ---
 ** The netrc.el library is now obsolete.
@@ -566,7 +570,8 @@ optimizations are in effect.
 
 A companion variable 'large-hscroll-threshold' controls when another
 set of display optimizations are in effect, which are aimed
-specifically at speeding up display of long lines that are truncated.
+specifically at speeding up display of long lines that are truncated
+on display.
 
 If you still experience slowdowns while editing files with long lines,
 this may be due to line truncation, or to one of the enabled minor
@@ -594,14 +599,15 @@ increase and decrease the font size globally.  
Additionally, the
 user option 'global-text-scale-adjust-resizes-frames' controls whether
 the frames are resized when the font size is changed.
 
+---
 ** New config variable 'syntax-wholeline-max' to reduce the cost of long lines.
 This variable is used by some operations (mostly syntax-propertization
 and font-locking) to treat lines longer than this variable as if they
 were made up of various smaller lines.  This can help reduce the
 slowdowns seen in buffers made of a single long line, but can also
-cause misbehavior in the presence of such long lines (tho most of that
-misbehavior should usually be limited to mis-highlighting).  You can
-recover the previous behavior with:
+cause misbehavior in the presence of such long lines (though most of
+that misbehavior should usually be limited to mis-highlighting).  You
+can recover the previous behavior with:
 
     (setq syntax-wholeline-max most-positive-fixnum)
 
@@ -616,7 +622,7 @@ and 'C-x 5 L' is now bound to 'find-library-other-frame'.
 Emacs allows different completion predicates to be used with 'M-x'
 (i.e., 'execute-extended-command') via the
 'read-extended-command-predicate' user option.  Emacs also has the
-'M-X' (note upper case) command, which only displays commands
+'M-X' (note upper case X) command, which only displays commands
 especially relevant to the current buffer.  Emacs now allows toggling
 between these modes while the user is inputting a command by hitting
 'M-X' while in the minibuffer.
@@ -662,7 +668,8 @@ match those regexps will be ignored by 
'switch-to-prev-buffer' and
 +++
 ** New command 'rename-visited-file'.
 This command renames the file visited by the current buffer by moving
-it to a new location, and also makes the buffer visit this new file.
+it to a new name or location, and also makes the buffer visit this new
+file.
 
 ** Menus
 
@@ -687,19 +694,21 @@ the current Emacs process at the end, it starts a new 
Emacs process
 optional parameters to restart instead of just killing the current
 process.
 
+** Drag and Drop
+
 +++
-** New user option 'mouse-drag-mode-line-buffer'.
+*** New user option 'mouse-drag-mode-line-buffer'.
 If non-nil, dragging on the buffer name part of the mode-line will
 drag the buffer's associated file to other programs.  This option is
 currently only available on X, Haiku and Nextstep (GNUstep or macOS).
 
 +++
-** New user option 'mouse-drag-and-drop-region-cross-program'.
+*** New user option 'mouse-drag-and-drop-region-cross-program'.
 If non-nil, this option allows dragging text in the region from Emacs
 to another program.
 
 ---
-** New user option 'mouse-drag-and-drop-region-scroll-margin'.
+*** New user option 'mouse-drag-and-drop-region-scroll-margin'.
 If non-nil, this option allows scrolling a window while dragging text
 around without a scroll wheel.
 
@@ -709,12 +718,12 @@ This prevents mouse drag gestures from putting empty 
strings onto the
 kill ring.
 
 +++
-** New user options 'dnd-indicate-insertion-point' and 'dnd-scroll-margin'.
+*** New user options 'dnd-indicate-insertion-point' and 'dnd-scroll-margin'.
 These options allow adjusting point and scrolling a window when
 dragging items from another program.
 
 +++
-** The X Direct Save (XDS) protocol is now supported.
+*** The X Direct Save (XDS) protocol is now supported.
 This means dropping an image or file link from programs such as
 Firefox will no longer create a temporary file in a random directory,
 instead asking you where to save the file first.
@@ -746,6 +755,7 @@ part of the buffer.
 +++
 ** 'count-words' will now report sentence count when used interactively.
 
++++
 ** New user option 'set-message-functions'.
 It allows selecting more functions for 'set-message-function'
 in addition to the default function that handles messages
@@ -884,6 +894,7 @@ This is in addition to previously-supported ways of 
discovering 24-bit
 color support: either via the "RGB" or "setf24" capabilities, or if
 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
 saved to the X primary selection, following the
@@ -895,7 +906,8 @@ saved to the X primary selection, following the
 The new command 'standard-display-by-replacement-char' produces Lisp
 code that sets up the 'standard-display-table' to use a replacement
 character for display of characters that the text-mode terminal
-doesn't support.  It is most useful with the Linux console and similar
+doesn't support.  This code is intended to be used in your init files.
+This feature is most useful with the Linux console and similar
 terminals, where Emacs has a reliable way of determining which
 characters have glyphs in the font loaded into the terminal's memory.
 
@@ -936,7 +948,7 @@ This affects the 'ert-select-tests' function and its 
callers.
 ** Emoji
 
 +++
-*** Emacs now has several new methods for inserting Emojis.
+*** Emacs now has several new methods for inserting Emoji.
 The Emoji commands are under the new 'C-x 8 e' prefix.
 
 +++
@@ -946,42 +958,42 @@ combinations in a graphical menu system.
 
 +++
 *** New command 'emoji-search' (bound to 'C-x 8 e s').
-This command lets you search for Emojis based on names.
+This command lets you search for Emoji based on names.
 
 +++
 *** New command 'emoji-list' (bound to 'C-x 8 e l').
-This command lists all Emojis (categorized by themes) in a special
+This command lists all Emoji (categorized by themes) in a special
 buffer and lets you choose one of them.
 
 ---
 *** New command 'emoji-recent' (bound to 'C-x 8 e r').
-This command lets you choose among the Emojis you have recently
+This command lets you choose among the Emoji you have recently
 inserted.
 
 +++
 *** New command 'emoji-describe' (bound to 'C-x 8 e d').
-This command will tell you the name of the Emoji at point.  (This
-command also works for non-Emoji characters.)
+This command will tell you the name of the Emoji at point.  (It also
+works for non-Emoji characters.)
 
 ---
 *** New commands 'emoji-zoom-increase' and 'emoji-zoom-decrease'.
 These are bound to 'C-x 8 e +' and 'C-x 8 e -', respectively.  They
-can be used on any character, but are mainly useful for emoji.
+can be used on any character, but are mainly useful for Emoji.
 
 ---
 *** New input method 'emoji'.
-This allows you to enter emoji using short strings, eg ':face_palm:'
+This allows you to enter Emoji using short strings, eg ':face_palm:'
 or ':scream:'.
 
 ** Help
 
 ---
-*** Variable values displayed by 'C-h v' in "*Help*" are now font-locked.
+*** Variable values displayed by 'C-h v' in "*Help*" are now fontified.
 
 +++
 *** New user option 'help-clean-buttons'.
-If non-nil, link buttons in "*Help*" will have any surrounding quotes
-removed.
+If non-nil, link buttons in "*Help*" buffers will have any surrounding
+quotes removed.
 
 ---
 *** 'M-x apropos-variable' output now includes values of variables.
@@ -992,13 +1004,13 @@ When displaying docstrings in "*Help*" buffers, strings 
that are
 "`like-this'" are made into links (if they point to a bound
 function/variable).  This can lead to false positives when talking
 about values that are symbols that happen to have the same names as
-functions/variables.  To inhibit this buttonification, the new
-"\\+`like-this'" syntax can be used.
+functions/variables.  To inhibit this buttonification, use the new
+"\\+`like-this'" syntax.
 
 +++
 *** New user option 'help-window-keep-selected'.
 If non-nil, commands to show the info manual and the source will reuse
-the same window the "*Help*" buffer is shown in.
+the same window in which the "*Help*" buffer is shown.
 
 ---
 *** Commands like 'C-h f' have changed how they describe menu bindings.
@@ -1027,19 +1039,19 @@ it's easy to make an edit that yields an invalid result.
 
 ---
 *** 'C-h b' uses outlining by default.
-Set 'describe-bindings-outline' to nil to get the old behavior.
+Set 'describe-bindings-outline' to nil to get back the old behavior.
 
 ---
 *** Jumping to function/variable source now saves mark before moving point.
-Jumping to source from "*Help*" buffer moves the point when the source
-buffer is already open.  Now, the old point is pushed to mark ring.
+Jumping to source from a "*Help*" buffer moves point when the source
+buffer is already open.  Now, the old point is pushed onto mark ring.
 
 +++
 *** New key bindings in "*Help*" buffers: 'n' and 'p'.
 These will take you (respectively) to the next and previous "page".
 
 ---
-*** 'describe-char' now also outputs the name of emoji combinations.
+*** 'describe-char' now also outputs the name of Emoji sequences.
 
 +++
 *** New key binding in "*Help*" buffer: 'I'.
@@ -1067,7 +1079,7 @@ The command pops up a buffer at the bottom of the screen 
with a few
 helpful commands for various tasks.  You can toggle the display using
 'C-h q'.
 
-** Emacs 29.1 comes with Org v9.6.
+** Emacs now comes with Org v9.6.
 See the file ORG-NEWS for user-visible changes in Org.
 
 ** Outline Mode
@@ -1075,12 +1087,12 @@ See the file ORG-NEWS for user-visible changes in Org.
 +++
 *** Support for customizing the default visibility state of headings.
 Customize the user option 'outline-default-state' to define what
-headings will be visible after Outline mode is turned on.  When equal
-to a number, the user option 'outline-default-rules' determines the
-visibility of the subtree starting at the corresponding level.  Values
-are provided to control showing a heading subtree depending on whether
-the heading matches a regexp, or on whether its subtree has long lines
-or is itself too long.
+headings will be visible initially, after Outline mode is turned on.
+When the value is a number, the user option 'outline-default-rules'
+determines the visibility of the subtree starting at the corresponding
+level.  Values are provided to control showing a heading subtree
+depending on whether the heading matches a regexp, or on whether its
+subtree has long lines or is itself too long.
 
 ** Outline Minor Mode
 
@@ -1088,10 +1100,10 @@ or is itself too long.
 *** New user option 'outline-minor-mode-use-buttons'.
 If non-nil, Outline Minor Mode will use buttons to hide/show outlines
 in addition to the ellipsis.  The default is nil, but in 'help-mode'
-it has the value 'insert' that inserts the buttons directly to the
-buffer where you can use 'RET' to cycle outline visibility.  When
+it has the value 'insert' that inserts the buttons directly into the
+buffer, and you can use 'RET' to cycle outline visibility.  When
 the value is 'in-margins', Outline Minor Mode uses the window margins
-to hide/show outlines.
+to hide/show buttons.
 
 ** Windows
 
@@ -1099,17 +1111,19 @@ to hide/show outlines.
 *** New commands 'split-root-window-below' and 'split-root-window-right'.
 These commands split the root window in two, and are bound to 'C-x w 2'
 and 'C-x w 3', respectively.  A number of other useful window-related
-commands are now available on the 'C-x w' prefix.
+commands are now available with key sequences that start with the
+'C-x w' prefix.
 
 +++
 *** New user option 'display-buffer-avoid-small-windows'.
-If non-nil, this should be a window height, a number.  Windows smaller
-than this will be avoided by 'display-buffer', if possible.
+If non-nil, this should be a window height in lines, a number.
+Windows smaller than this will be avoided by 'display-buffer', if
+possible.
 
 +++
 *** New display action 'display-buffer-full-frame'.
-This action removes other windows on the frame when displaying a
-buffer.
+This action removes other windows from the frame when displaying a
+buffer on that frame.
 
 +++
 *** 'display-buffer' now can set up the body size of the chosen window.
@@ -1118,10 +1132,10 @@ For example, a 'display-buffer-alist' entry of
     '(window-width . (body-columns . 40))'
 
 will make the body of the chosen window 40 columns wide.  For the
-height use 'window-height' in combination with 'body-lines'.
+height use 'window-height' and 'body-lines', respectively.
 
 ---
-*** You can customize which window 'scroll-other-window' operates on.
+*** You can customize on which window 'scroll-other-window' operates.
 This is controlled by the new 'other-window-scroll-default' user option.
 
 ** Frames
@@ -1145,6 +1159,8 @@ before its name on display is truncated.
 
 ---
 *** 'C-x t RET' creates a new tab when the provided tab name doesn't exist.
+It prompts for the name of a tab and switches to it, creating a new
+tab if no tab exists by that name.
 
 ---
 *** New keymap 'tab-bar-history-mode-map'.
@@ -1211,7 +1227,7 @@ Most IRC clients (including rcirc) support basic 
formatting using
 control codes.  Under the 'C-c C-f' prefix a few commands have been
 added to insert these automatically.  For example, if a region is
 active and 'C-c C-f C-b' is invoked, markup is inserted for the region
-to be highlighted bold.
+to be highlighted in bold.
 
 ** Imenu
 
@@ -1223,13 +1239,16 @@ to be highlighted bold.
 Use it if you want Imenu to forget the buffer's index alist and
 recreate it anew next time 'imenu' is invoked.
 
-+++
+---
 ** Emacs is now capable of abandoning a window's redisplay that takes too long.
 This is controlled by the new variable 'max-redisplay-ticks'.  If that
 variable is set to a non-zero value, display of a window will be
 aborted after that many low-level redisplay operations, thus
 preventing Emacs from becoming wedged when visiting files with very
-long lines.
+long lines.  The default is zero, which disables the feature: Emacs
+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
 
@@ -1242,15 +1261,15 @@ option 'cycle-spacing-actions'.
 ---
 ** 'zap-to-char' and 'zap-up-to-char' are case-sensitive for upper-case chars.
 These commands now behave as case-sensitive for interactive calls when
-they are invoked with an uppercase character, regardless of the
-'case-fold-search' value.
+they are invoked with an uppercase character, regardless of the value
+of 'case-fold-search'.
 
 ---
 ** 'scroll-other-window' and 'scroll-other-window-down' now respect remapping.
 These commands (bound to 'C-M-v' and 'C-M-V') used to scroll the other
-windows without looking a customizations in that other window.  These
-functions now check whether they have been rebound in the buffer in
-that other window, and then call the remapped function instead.  In
+windows without looking at customizations in that other window.  These
+functions now check whether they have been rebound in the buffer shown
+in that other window, and then call the remapped function instead.  In
 addition, these commands now also respect the
 'scroll-error-top-bottom' user option.
 
@@ -1267,8 +1286,8 @@ This change also affects 'cl-macrolet', 'cl-flet*' and
 
 +++
 ** New user option 'translate-upper-case-key-bindings'.
-Set this option to nil to inhibit translating upper case keys to lower
-case keys.
+Set this option to nil to inhibit the default translation of upper
+case keys to their lower case variants.
 
 +++
 ** New command 'ensure-empty-lines'.
@@ -1279,8 +1298,8 @@ point.
 ** Improved mouse behavior with auto-scrolling modes.
 When clicking inside the 'scroll-margin' or 'hscroll-margin' region,
 point is now moved only when releasing the mouse button.  This no
-longer results in a bogus selection, unless the mouse has been
-effectively dragged.
+longer results in a bogus selection, unless the mouse has also been
+dragged.
 
 +++
 ** 'kill-ring-max' now defaults to 120.
@@ -1301,10 +1320,11 @@ When non-nil, if the point is in a closing delimiter 
and the opening
 delimiter is offscreen, shows some context around the opening
 delimiter in the echo area.  The default is nil.
 
-May also be set to the symbols 'overlay' or 'child-frame', in which
-case the context is shown in an overlay or child-frame at the top-left
-of the current window.  The latter option requires a graphical frame.
-On non-graphical frames, the context is shown in the echo area.
+This option can also be set to the symbols 'overlay' or 'child-frame',
+in which case the context is shown in an overlay or child-frame at the
+top-left of the current window.  The latter option requires a
+graphical frame.  On non-graphical frames, the context is shown in the
+echo area.
 
 ** Comint
 
@@ -1318,7 +1338,7 @@ change the terminal used on a remote host.
 *** New user option 'comint-delete-old-input'.
 When nil, this prevents comint from deleting the current input when
 inserting previous input using '<mouse-2>'.  The default is t, to
-preserve past behavior.
+preserve previous behavior.
 
 ---
 *** New minor mode 'comint-fontify-input-mode'.
@@ -1339,55 +1359,88 @@ support systems where two kinds of wheel events can be 
received.
 
 ** Internationalization changes
 
+---
 *** The <Delete> function key now allows deleting the entire composed sequence.
 For the details, see the item about the 'delete-forward-char' command
 above.
 
+---
 *** New user option 'composition-break-at-point'.
 Setting it to a non-nil value temporarily disables automatic
 composition of character sequences at point, and thus makes it easier
-to edit such sequences by allowing point to "enter" the sequence.
+to edit such sequences by allowing point to "enter" the composed
+sequence.
 
 ---
 *** Support for many old scripts and writing systems.
-Emacs now supports and has language-environments and input methods for
-several dozens of old scripts that were used in the past for various
-languages.  For each such script Emacs now has font-selection and
-character composition rules, a language environment, and an input
+Emacs now supports, and has language-environments and input methods,
+for several dozens of old scripts that were used in the past for
+various languages.  For each such script Emacs now has font-selection
+and character composition rules, a language environment, and an input
 method.  The newly-added scripts and the corresponding language
 environments are:
 
-Tai Tham script and the Northern Thai language environment
-Brahmi script and language environment
-Kaithi script and language environment
-Tirhuta script and language environment
-Sharada script and language environment
-Siddham script and language environment
-Syloti Nagri script and language environment
-Modi script and language environment
-Baybayin script and Tagalog language environment
-Hanunoo script and language environment
-Buhid script and language environment
-Tagbanwa script and language environment
-Limbu script and language environment
-Balinese script and language environment
-Javanese script and language environment
-Sundanese script and language environment
-Batak script and language environment
-Rejang script and language environment
-Makasar script and language environment
-Lontara script and language environment
-Hanifi Rohingya script and language environment
-Grantha script and language environment
-Kharoshthi script and language environment
-Lepcha script and language environment
-Meetei Mayek script and language environment
-Adlam script and language environment
-Mende Kikakui script and language environment
-Wancho script and language environment
-Toto script and language environment
-Gothic script and language environment
-Coptic script and language environment
+ Tai Tham script and the Northern Thai language environment
+
+ Brahmi script and language environment
+
+ Kaithi script and language environment
+
+ Tirhuta script and language environment
+
+ Sharada script and language environment
+
+ Siddham script and language environment
+
+ Syloti Nagri script and language environment
+
+ Modi script and language environment
+
+ Baybayin script and Tagalog language environment
+
+ Hanunoo script and language environment
+
+ Buhid script and language environment
+
+ Tagbanwa script and language environment
+
+ Limbu script and language environment
+
+ Balinese script and language environment
+
+ Javanese script and language environment
+
+ Sundanese script and language environment
+
+ Batak script and language environment
+
+ Rejang script and language environment
+
+ Makasar script and language environment
+
+ Lontara script and language environment
+
+ Hanifi Rohingya script and language environment
+
+ Grantha script and language environment
+
+ Kharoshthi script and language environment
+
+ Lepcha script and language environment
+
+ Meetei Mayek script and language environment
+
+ Adlam script and language environment
+
+ Mende Kikakui script and language environment
+
+ Wancho script and language environment
+
+ Toto script and language environment
+
+ Gothic script and language environment
+
+ Coptic script and language environment
 
 ---
 *** The "Oriya" language environment was renamed to "Odia".
@@ -1423,8 +1476,9 @@ the QWERTY Slovak keyboards.
 
 ---
 *** New input method 'cyrillic-chuvash'.
-This input method is based on the russian-computer, and is intended
-for the Chuvash language written in the Cyrillic script.
+This input method is based on the russian-computer input method, and
+is intended for typing in the Chuvash language written in the Cyrillic
+script.
 
 
 * Changes in Specialized Modes and Packages in Emacs 29.1
@@ -1506,6 +1560,40 @@ the following to your Init file:
 *** New command 'dired-do-eww'.
 This command visits the file on the current line with EWW.
 
+---
+*** New user option 'dired-omit-lines'.
+This is used by 'dired-omit-mode', and now allows you to hide based on
+other things than just the file names.
+
++++
+*** New user option 'dired-mouse-drag-files'.
+If non-nil, dragging file names with the mouse in a Dired buffer will
+initiate a drag-and-drop session allowing them to be opened in other
+programs.
+
++++
+*** New user option 'dired-free-space'.
+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)
+
+---
+*** New user option 'dired-make-directory-clickable'.
+If non-nil (which is the default), hitting 'RET' or 'mouse-1' on
+the directory components at the directory displayed at the start of
+the buffer will take you to that directory.
+
+---
+*** Search and replace in Dired/Wdired supports more regexps.
+For example, the regexp ".*" will match only characters that are part
+of the file name.  Also "^.*$" can be used to match at the beginning
+of the file name and at the end of the file name.  This is used only
+when searching on file names.  In Wdired this can be used when the new
+user option 'wdired-search-replace-filenames' is non-nil (which is the
+default).
+
 ** Elisp
 
 ---
@@ -1522,7 +1610,7 @@ byte-compile the visited file and the current buffer, 
respectively.
 ---
 *** New user option 'tetris-allow-repetitions'.
 This controls how randomness is implemented (whether to use pure
-randomness as before or whether to use a bag).
+randomness as before, or to use a bag).
 
 ** Battery
 
@@ -1553,7 +1641,7 @@ command is installed.
 ** CC Mode
 
 ---
-*** C++ Mode now supports most of the new features in the C++20 standard.
+*** C++ Mode now supports most of the new features in the C++20 Standard.
 
 ** Cperl Mode
 
@@ -1566,8 +1654,8 @@ be used as a file-local variable.
 
 ---
 *** 'gud-go' is now bound to 'C-c C-v'.
-If given a prefix, it will query the user for an argument to use for
-the run/continue command.
+If given a prefix, it will prompt for an argument to use for the
+run/continue command.
 
 ---
 *** 'perldb' now recognizes '-E'.
@@ -1588,7 +1676,7 @@ contents.
 *** New user option 'diff-whitespace-style'.
 Sets the value of the buffer-local variable 'whitespace-style' in
 'diff-mode' buffers.  By default, this variable is '(face trailing)',
-which preserves behavior from previous Emacs versions.
+which preserves behavior of previous Emacs versions.
 
 +++
 *** New user option 'diff-add-log-use-relative-names'.
@@ -1636,8 +1724,8 @@ it isn't already, and remove it if it is installed.
 
 +++
 *** New command 'package-vc-install'.
-Packages can now be installed directly from source by cloning from a
-repository.
+Packages can now be installed directly from source by cloning from
+their repository.
 
 +++
 *** New command 'package-vc-install-from-checkout'.
@@ -1673,7 +1761,7 @@ The option 'desktop-load-locked-desktop' can now be set 
to the value
 file if the Emacs process which locked it is no longer running on the
 local machine.  This allows avoiding questions about locked desktop
 files when the Emacs session which locked it crashes, or was otherwise
-interrupted, and didn't exit gracefully.  See the "(emacs) Saving
+interrupted and didn't exit gracefully.  See the "(emacs) Saving
 Emacs Sessions" node in the Emacs manual for more details.
 
 ** Miscellaneous
@@ -1732,9 +1820,10 @@ only jump if the location of the first error is known), 
and
 
 +++
 *** New user option 'compilation-max-output-line-length'.
-Lines longer than this will have the ends hidden, with a button to
-reveal the hidden text.  This speeds up operations like grepping on
-files that have few newlines.
+Lines longer than the value of this variable 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.
 
 ** Flymake
 
@@ -1748,12 +1837,12 @@ characters instead of just 'SPC' and 'TAB'.
 
 ---
 ** New mode, 'emacs-news-mode', for editing the NEWS file.
-This mode adds some highlighting, fixes the 'M-q' command, and has
-commands for doing maintenance of the Emacs NEWS files.  In addition,
-this mode turns on 'outline-minor-mode', and thus displays
-customizable icons (see 'icon-preference') in the margins.  To
-disable these icons, set 'outline-minor-mode-use-buttons' to a
-nil value.
+This mode adds some highlighting, makes the 'M-q' command aware of the
+format of NEWS entries, and has special commands for doing maintenance
+of the Emacs NEWS files.  In addition, this mode turns on
+'outline-minor-mode', and thus displays customizable icons (see
+'icon-preference') in the margins.  To disable these icons, set
+'outline-minor-mode-use-buttons' to a nil value.
 
 ---
 ** Kmacro
@@ -1808,6 +1897,7 @@ to complete.  The value 'visual' is like 'always', but 
only updates
 the completions if they are already visible.  The default value t
 always hides the completion buffer after some completion is made.
 
+---
 *** New commands to complete the minibuffer history.
 'minibuffer-complete-history' ('C-x <up>') is like 'minibuffer-complete'
 but completes on the history items instead of the default completion
@@ -1830,16 +1920,17 @@ This option limits the height of the "*Completions*" 
buffer.
 
 +++
 *** New user option 'completions-header-format'.
-This is a string to control the heading line to show in the
+This is a string to control the header line to show in the
 "*Completions*" buffer before the list of completions.
 If it contains "%s", that is replaced with the number of completions.
-If nil, the heading line is not shown.
+If nil, the header line is not shown.
 
 +++
 *** New user option 'completions-highlight-face'.
 When this user option names a face, the current
 candidate in the "*Completions*" buffer is highlighted with that face.
-The nil value disables this highlighting.
+The nil value disables this highlighting.  The default is to highlight
+using the 'completions-highlight' face.
 
 +++
 *** Choosing a completion with a prefix argument doesn't exit the minibuffer.
@@ -1848,7 +1939,7 @@ This means that typing 'C-u RET' on a completion 
candidate in the
 but doesn't exit the minibuffer.
 
 +++
-*** You can now define abbrevs for the fundamental minibuffer modes.
+*** You can now define abbrevs for the minibuffer modes.
 'minibuffer-mode-abbrev-table' and
 'minibuffer-inactive-mode-abbrev-table' are now defined.
 
@@ -1944,7 +2035,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,
-do a "push" command afterwards.
+does a "push" command afterwards.
 
 +++
 *** 'C-x v b' prefix key is used now for branch commands.
@@ -1983,7 +2074,7 @@ in the Git repository in "~/foo/bar".  This makes this 
command
 consistent with 'vc-responsible-backend'.
 
 ---
-*** Log Edit now font locks long Git commit summary lines.
+*** Log Edit now fontifies long Git commit summary lines.
 Writing shorter summary lines avoids truncation in contexts in which
 Git commands display summary lines.  See the two new user options
 'vc-git-log-edit-summary-target-len' and 'vc-git-log-edit-summary-max-len'.
@@ -2192,13 +2283,13 @@ All other 'gnus-header-*' faces inherit from this face 
now.
 
 +++
 *** New user option 'gnus-treat-emojize-symbols'.
-If non-nil, symbols that have an emoji representation will be
+If non-nil, symbols that have an Emoji representation will be
 displayed as emojis.  The default is nil.
 
 +++
 *** New command 'gnus-article-emojize-symbols'.
-This is bound to 'W D e' and will display symbols that have emoji
-representation as emojis.
+This is bound to 'W D e' and will display symbols that have Emoji
+representation as Emoji.
 
 +++
 *** New mu backend for gnus-search.
@@ -2310,6 +2401,11 @@ or projects outside of VCS repositories.
 As a consequence, the 'VC project backend' is formally renamed to
 'VC-aware project backend'.
 
++++
+*** New user option 'project-vc-include-untracked'.
+If non-nil, files untracked by a VCS are considered to be part of
+the project by a VC project based on that VCS.
+
 ** Xref
 
 +++
@@ -2494,7 +2590,7 @@ PDF file in the thumbnail buffer to visit the 
corresponding PDF.
 ---
 *** Support GraphicsMagick command line tools.
 Support for the GraphicsMagick command line tool ("gm") has been
-added, and is used instead of ImageMagick when it is available.
+added, and is used when it is available instead of ImageMagick.
 
 ---
 *** Support Thumbnail Managing Standard v0.9.0 (Dec 2020).
@@ -2582,42 +2678,6 @@ some commands and user options are no longer needed and 
are now obsolete:
 'image-dired-display-window-width-correction',
 'image-dired-temp-image-file'.
 
-** Dired
-
----
-*** New user option 'dired-omit-lines'.
-This is used by 'dired-omit-mode', and now allows you to hide based on
-other things than just the file names.
-
-+++
-*** New user option 'dired-mouse-drag-files'.
-If non-nil, dragging file names with the mouse in a Dired buffer will
-initiate a drag-and-drop session allowing them to be opened in other
-programs.
-
-+++
-*** New user option 'dired-free-space'.
-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)
-
----
-*** New user option 'dired-make-directory-clickable'.
-If non-nil (which is the default), hitting 'RET' or 'mouse-1' on
-the directory components at the directory displayed at the start of
-the buffer will take you to that directory.
-
----
-*** Search and replace in Dired/Wdired supports more regexps.
-For example, the regexp ".*" will match only characters that are part
-of the file name.  Also "^.*$" can be used to match at the beginning
-of the file name and at the end of the file name.  This is used only
-when searching on file names.  In Wdired this can be used when the new
-user option 'wdired-search-replace-filenames' is non-nil (which is the
-default).
-
 ** Bookmarks
 
 ---
@@ -2830,7 +2890,7 @@ if only one line of output).  Previously, this only 
converted numbers
 when there was a single line of output.
 
 ---
-*** Built-in Eshell commands now follow POSIX/GNU argument syntax conventions.
+*** Built-in Eshell commands now follow Posix/GNU argument syntax conventions.
 Built-in commands in Eshell now accept command-line options with
 values passed as a single token, such as '-oVALUE' or
 '--option=VALUE'.  New commands can take advantage of this with the
@@ -2944,11 +3004,6 @@ filtered out.
 The list of handlers (already covering OSC 7 and 8) has been extended
 with a handler for OSC 2, the command to set a window title.
 
-+++
-*** New user option 'project-vc-include-untracked'.
-If non-nil, files untracked by a VCS are considered to be part of
-the project by a VC project based on that VCS.
-
 ---
 *** 'recentf-mode' now uses abbreviated file names by default.
 This means that e.g. "/home/foo/bar" is now displayed as "~/bar".
@@ -3012,7 +3067,7 @@ Protocol (LSP).
 
 +++
 *** use-package: Declarative package configuration.
-use-package is shipped with Emacs.  It provides the 'use-package'
+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.
 See the new Info manual "(use-package) Top" for more.
@@ -3037,8 +3092,8 @@ manually if needed, using the new user options 
'wallpaper-command' and
 
 +++
 ** New package 'oclosure'.
-Allows the creation of "functions with slots" or "function objects"
-via the macros 'oclosure-define' and 'oclosure-lambda'.
+This allows the creation of "functions with slots" or "function
+objects" via the macros 'oclosure-define' and 'oclosure-lambda'.
 
 +++
 *** New generic function 'oclosure-interactive-form'.
@@ -3061,10 +3116,12 @@ Emacs buffers, like indentation and the like.  The new 
ert function
 This is a lightweight variant of 'js-mode' that is used by default
 when visiting JSON files.
 
++++
 ** New major mode 'csharp-mode'.
 A major mode based on CC Mode for editing programs in the C# language.
 This mode is auto-enabled for files with the ".cs" extension.
 
++++
 ** New major modes based on the tree-sitter library.
 These new major modes are available if Emacs was built with the
 tree-sitter library.  They provide support for font-locking,
@@ -3095,77 +3152,94 @@ If a language grammar library required by a mode is not 
found in any
 of the above places, the mode will signal an error when you try to
 turn it on.
 
++++
 *** New major mode 'typescript-ts-mode'.
 A major mode based on the tree-sitter library for editing programs
 in the TypeScript language.  This mode is auto-enabled for files with
 the ".ts" extension.
 
++++
 *** New major mode 'tsx-ts-mode'.
 A major mode based on the tree-sitter library for editing programs
 in the TypeScript language, with support for TSX.  This mode is
 auto-enabled for files with the ".tsx" extension.
 
++++
 *** New major mode 'c-ts-mode'.
 An optional major mode based on the tree-sitter library for editing
 programs in the C language.
 
++++
 *** New major mode 'c++-ts-mode'.
 An optional major mode based on the tree-sitter library for editing
 programs in the C++ language.
 
++++
 *** New major mode 'java-ts-mode'.
 An optional major mode based on the tree-sitter library for editing
 programs in the Java language.
 
++++
 *** New major mode 'python-ts-mode'.
 An optional major mode based on the tree-sitter library for editing
 programs in the Python language.
 
++++
 *** New major mode 'css-ts-mode'.
 An optional major mode based on the tree-sitter library for editing
 CSS (Cascading Style Sheets).
 
++++
 *** New major mode 'json-ts-mode'.
 An optional major mode based on the tree-sitter library for editing
 programs in the JSON language.
 
++++
 *** New major mode 'csharp-ts-mode'.
 An optional major mode based on the tree-sitter library for editing
 programs in the C# language.
 
++++
 *** New major mode 'bash-ts-mode'.
 Am optional major mode based on the tree-sitter library for editing
 Bash shell scripts.
 
++++
 *** New major mode 'dockerfile-ts-mode'.
 A major mode based on the tree-sitter library for editing
 Dockerfiles.  This mode is auto-enabled for files which are named
 "Dockerfile", have the "Dockerfile." prefix, or have the ".dockerfile"
 extension.
 
++++
 *** New major mode 'cmake-ts-mode'.
 A major mode based on the tree-sitter library for editing CMake files.
 It is auto-enabled for files whose name is "CMakeLists.txt" or whose
 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.
 
++++
 *** New major mode 'go-ts-mode'.
 A major mode based on the tree-sitter library for editing programs in
 the Go language.  It is auto-enabled for files with the ".go" extension.
 
++++
 *** New major mode 'go-mod-ts-mode'.
 A major mode based on the tree-sitter library for editing "go.mod"
 files.  It is auto-enabled for files which are named "go.mod".
 
++++
 *** New major mode 'yaml-ts-mode'.
 A major mode based on the tree-sitter library for editing files
 written in YAML.  It is auto-enabled for files with the ".yaml" or
 ".yml" extensions.
 
++++
 *** New major mode 'rust-ts-mode'.
 A major mode based on the tree-sitter library for editing programs in
 the Rust language.  It is auto-enabled for files with the ".rs" extension.
@@ -3187,15 +3261,17 @@ or user level, with the exception of better performance 
and the order
 of overlays returned by functions that don't promise any particular
 order.
 
+---
 *** The function 'overlay-recenter' is now a no-op.
 This function does nothing, and in particular has no effect on the
 value returned by 'overlay-lists'.  The purpose of 'overlay-recenter'
-was to allow more efficient lookup of overlays around certain buffer
+was to allow more efficient lookup of overlays around a certain buffer
 position; however with the new implementation the lookup of overlays
 is efficient regardless of their position, and there's no longer any
-need to "optimize" the lookup, nor any notion of "center" of the
+need to "optimize" the lookup, nor any notion of a "center" of the
 overlays.
 
+---
 *** The function 'overlay-lists' returns one unified list of overlays.
 This function used to return a cons of two lists, one with overlays
 before the "center" position, the other after that "center".  It now
@@ -3219,7 +3295,7 @@ auto-scaling applied.  (This only makes a difference on 
HiDPI
 displays.)
 
 +++
-** Changes to "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
@@ -3244,7 +3320,7 @@ signal an error in any file.)
 In addition, files are scanned in a slightly different way.
 Previously, ';;;###' specs inside a top-level form (i.e., something
 like '(when ... ;;;### ...)' would be ignored.  They are now parsed as
-normal.
+usual.
 
 ---
 ** Themes have special autoload cookies.
@@ -3284,7 +3360,7 @@ they will still be escaped, so the '.foo' symbol is still 
printed as
 "\.foo" and the '?bar' symbol is still printed as "\?bar".
 
 +++
-** Remapping 'mode-line' no longer works as expected.
+** Remapping 'mode-line' face no longer works as expected.
 'mode-line' is now the parent face of the new 'mode-line-active' face,
 and remapping parent of basic faces does not work reliably.
 Instead of remapping 'mode-line', you have to remap 'mode-line-active'.
@@ -3307,10 +3383,10 @@ needed.
 *** Emacs now supports 'medium' fonts.
 Emacs previously didn't distinguish between the 'regular'/'normal'
 weight and the 'medium' weight, but it now also supports the (heavier)
-'medium' weight.  However, this means that if you previously specified
-a weight of 'normal' and the font doesn't have this weight, Emacs
-won't find the font spec.  In these cases, replacing ":weight 'normal"
-with ":weight 'medium" should fix the issue.
+'medium' weight.  However, this means that if you specify a weight of
+'normal' and the font doesn't have this weight, Emacs won't find the
+font spec.  In these cases, replacing ":weight 'normal" with ":weight
+'medium" should fix the issue.
 
 ---
 ** Keymap descriptions have changed.
@@ -3505,9 +3581,8 @@ but switching to 'ash' is generally much preferable.
 
 +++
 ** New generic function 'function-documentation'.
-Can dynamically generate a raw docstring depending on the type of
-a function.
-Used mainly for docstrings of OClosures.
+It can dynamically generate a raw docstring depending on the type of a
+function.  Used mainly for docstrings of OClosures.
 
 +++
 ** Base64 encoding no longer tolerates latin-1 input.
@@ -3515,7 +3590,7 @@ The functions 'base64-encode-string', 
'base64url-encode-string',
 'base64-encode-region' and 'base64url-encode-region' no longer accept
 characters in the range U+0080..U+00FF as substitutes for single bytes
 in the range 128..255, but signal an error for all multibyte characters.
-The input must be encoded text.
+The input must be unibyte encoded text.
 
 +++
 ** The 'clone-indirect-buffer-hook' is now run by 'make-indirect-buffer'.
@@ -3667,7 +3742,7 @@ These function now take an optional comparison predicate 
argument.
 
 +++
 ** 'completing-read' now allows a function as its REQUIRE-MATCH argument.
-This function is called to see whether what the user has typed in is a
+This function is called to see whether what the user has typed is a
 match.  This is also available from functions that call
 'completing-read', like 'read-file-name'.
 
@@ -3679,10 +3754,10 @@ Previously, it reported data only based on the frame.
 ** 'file-expand-wildcards' can now also take a regexp as PATTERN argument.
 
 ---
-** vc-mtn (the backend for Monotone) has been made obsolete.
+** vc-mtn (the VC backend for Monotone) has been made obsolete.
 
 +++
-** 'gui-set-selection' can now specify different values for different data 
types.
+** 'gui-set-selection' can specify different values for different data types.
 If DATA is a string, then its text properties are searched for values
 for each specific data type while the selection is being converted.
 
@@ -3702,6 +3777,7 @@ things to be saved.
 ** New function 'string-equal-ignore-case'.
 This compares strings ignoring case differences.
 
++++
 ** 'symbol-file' can now report natively-compiled ".eln" files.
 If Emacs was built with native-compilation enabled, Lisp programs can
 now call 'symbol-file' with the new optional 3rd argument non-nil to
@@ -3838,7 +3914,7 @@ available only when Emacs was built with glibc as the C 
library.
 
 ---
 ** 'x-show-tip' no longer hard-codes a timeout default.
-The new 'x-show-tooltip-timeout' variable allows the user to alter
+The new variable 'x-show-tooltip-timeout' allows the user to alter
 this for packages that don't use 'tooltip-show', but instead call the
 lower level function directly.
 
@@ -3850,8 +3926,8 @@ example for benchmarking purposes.
 ---
 ** New function 'string-edit'.
 This is meant to be used when the user has to edit a (potentially)
-long string.  It pops you to a new buffer where you can edit the
-string, and a callback is called when the user types 'C-c C-c'.
+long string.  It pops up a new buffer where you can edit the string,
+and a callback is called when the user types 'C-c C-c'.
 
 +++
 ** New function 'read-string-from-buffer'.
@@ -3870,8 +3946,8 @@ putting the modes on the first line of a file).
 
 +++
 ** New function 'flush-standard-output'.
-This enables you to display incomplete lines from batch-based Emacs
-scripts.
+This enables display of lines that don't end in a newline from
+batch-based Emacs scripts.
 
 +++
 ** New convenience function 'buttonize-region'.
@@ -3891,7 +3967,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 be a new value 'drag-source'.
+** '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.
@@ -3940,7 +4016,10 @@ frequently than once in a second.
 ---
 ** New function 'bidi-string-strip-control-characters'.
 This utility function is meant for displaying strings when it's
-essential that there's no bidirectional context.
+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
+in the value of 'bidi-control-characters'.
 
 ---
 ** The Gnus range functions have been moved to a new library, range.el.
@@ -4037,8 +4116,8 @@ to attackers trying to confuse the users will use the 
textsec library
 to mark suspicious text.  For instance shr/eww will mark suspicious
 URLs and links, Gnus will mark suspicious From addresses, and
 Message mode will query the user if the user is sending mail to a
-suspicious address.  If this variable is nil, these checks aren't
-performed.
+suspicious address.  If this variable is nil, these checks are
+disabled.
 
 +++
 *** New function 'textsec-suspicious-p'.
@@ -4357,7 +4436,8 @@ aren't integer multiples of the default font.
 ** New function 'string-glyph-split'.
 This function splits a string into a list of strings representing
 separate glyphs.  This takes into account combining characters and
-grapheme clusters.
+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.
@@ -4448,9 +4528,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 assumes earliest 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.
+** 'date-to-time' now accepts arguments that lacks 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.
 
 +++
 ** 'format-seconds' now allows suppressing zero-value trailing elements.
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index 67704bdb51..9e792889c8 100644
--- a/lisp/emacs-lisp/edebug.el
+++ b/lisp/emacs-lisp/edebug.el
@@ -92,9 +92,9 @@ using, but only when you also use Edebug."
 ;;;###autoload
 (defcustom edebug-all-defs nil
   "If non-nil, evaluating defining forms instruments for Edebug.
-This applies to `eval-defun', `eval-region', `eval-buffer', and
-`eval-current-buffer'.  `eval-region' is also called by
-`eval-last-sexp', and `eval-print-last-sexp'.
+This applies to `eval-defun', `eval-region' and `eval-buffer'.
+`eval-region' is also called by `eval-last-sexp', and
+`eval-print-last-sexp'.
 
 You can use the command `edebug-all-defs' to toggle the value of this
 variable.  You may wish to make it local to each buffer with
diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el
index 8f0eedd2f8..b01f87d049 100644
--- a/lisp/emacs-lisp/package-vc.el
+++ b/lisp/emacs-lisp/package-vc.el
@@ -131,7 +131,7 @@ the `clone' function."
          ((null spec)
           (package-vc-install name))
          ((stringp spec)
-          (package-vc-install name nil spec))
+          (package-vc-install name spec))
          ((listp spec)
           (package-vc--archives-initialize)
           (package-vc--unpack (cadr pkg-descs) spec)))))))
@@ -306,7 +306,9 @@ asynchronously."
          (directory (file-name-concat
                      (or (package-desc-dir pkg-desc)
                          (expand-file-name name package-user-dir))
-                     (plist-get pkg-spec :lisp-dir)))
+                     (plist-get pkg-spec :lisp-dir)
+                     (and-let* ((extras (package-desc-extras pkg-desc)))
+                       (alist-get :lisp-dir extras))))
          (file (or (plist-get pkg-spec :main-file)
                    (expand-file-name
                     (concat name ".el")
@@ -406,99 +408,156 @@ otherwise it's assumed to be an Info file."
     (when clean-up
       (delete-file file))))
 
+(defun package-vc-install-dependencies (requirements)
+  "Install missing dependencies, and return missing ones.
+The return value will be nil if everything was found, or a list
+of (NAME VERSION) pairs of all packages that couldn't be found.
+
+REQUIREMENTS should be a list of additional requirements; each
+element in this list should have the form (PACKAGE VERSION-LIST),
+where PACKAGE is a package name and VERSION-LIST is the required
+version of that package."
+  (let ((to-install '()) (missing '()))
+    (cl-labels ((search (pkg)
+                  "Attempt to find all dependencies for PKG."
+                  (cond
+                   ((assq (car pkg) to-install)) ;inhibit cycles
+                   ((package-installed-p (car pkg)))
+                   ((let* ((pac package-archive-contents)
+                           (desc (cadr (assoc (car pkg) pac))))
+                      (if desc
+                          (let ((reqs (package-desc-reqs pkg)))
+                            (push pkg to-install)
+                            (mapc #'search reqs))
+                        (push pkg missing))))))
+                (version-order (a b)
+                  "Predicate to sort packages in order."
+                  (version-list-< (cadr b) (cadr a)))
+                (duplicate-p (a b)
+                  "Are A and B the same package?"
+                  (eq (car a) (car b)))
+                (depends-on-p (target package)
+                  "Does PACKAGE depend on TARGET?"
+                  (or (eq target package)
+                      (let* ((pac package-archive-contents)
+                             (desc (cadr (assoc package pac))))
+                        (seq-some
+                         (apply-partially #'depends-on-p target)
+                         (package-desc-reqs desc)))))
+                (dependent-order (a b)
+                  (or (not (depends-on-p (car b) (car a)))
+                      (depends-on-p (car a) (car b)))))
+      (mapc #'search requirements)
+      (cl-callf sort to-install #'version-order)
+      (cl-callf seq-uniq to-install #'duplicate-p)
+      (cl-callf sort to-install #'dependent-order))
+    (mapc #'package-install-from-archive to-install)
+    missing))
+
 (defun package-vc--unpack-1 (pkg-desc pkg-dir)
   "Prepare PKG-DESC that is already checked-out in PKG-DIR.
 This includes downloading missing dependencies, generating
 autoloads, generating a package description file (used to
 identify a package as a VC package later on), building
 documentation and marking the package as installed."
-  ;; Remove any previous instance of PKG-DESC from `package-alist'
-  (let ((pkgs (assq (package-desc-name pkg-desc) package-alist)))
-    (when pkgs
-      (setf (cdr pkgs) (seq-remove #'package-vc-p (cdr pkgs)))))
-
-  ;; In case the package was installed directly from source, the
-  ;; dependency list wasn't know beforehand, and they might have
-  ;; to be installed explicitly.
-  (let ((deps '()))
-    (dolist (file (directory-files pkg-dir t "\\.el\\'" t))
-      (with-temp-buffer
-        (insert-file-contents file)
-        (when-let* ((require-lines (lm-header-multiline "package-requires")))
-          (thread-last
-            (mapconcat #'identity require-lines " ")
-            package-read-from-string
-            package--prepare-dependencies
-            (nconc deps)
-            (setq deps)))))
-    (dolist (dep deps)
-      (cl-callf version-to-list (cadr dep)))
-    (package-download-transaction
-     (package-compute-transaction nil (delete-dups deps))))
-
-  (let ((default-directory (file-name-as-directory pkg-dir))
-        (pkg-file (expand-file-name (package--description-file pkg-dir) 
pkg-dir)))
-    ;; Generate autoloads
-    (let* ((name (package-desc-name pkg-desc))
-           (auto-name (format "%s-autoloads.el" name))
-           (extras (package-desc-extras pkg-desc))
-           (lisp-dir (alist-get :lisp-dir extras)))
-      (package-generate-autoloads
-       name (file-name-concat pkg-dir lisp-dir))
-      (when lisp-dir
-        (write-region
-         (with-temp-buffer
-           (insert ";; Autoload indirection for package-vc\n\n")
-           (prin1 `(load (expand-file-name
-                          ,(file-name-concat lisp-dir auto-name)
-                          (or (and load-file-name
-                                   (file-name-directory load-file-name))
-                              (car load-path))))
-                  (current-buffer))
-           (buffer-string))
-         nil (expand-file-name auto-name pkg-dir))))
-
-    ;; Generate package file
-    (package-vc--generate-description-file pkg-desc pkg-file)
-
-    ;; Detect a manual
-    (when-let ((pkg-spec (package-vc--desc->spec pkg-desc))
-               ((executable-find "install-info")))
-      (dolist (doc-file (ensure-list (plist-get pkg-spec :doc)))
-        (package-vc--build-documentation pkg-desc doc-file))))
-
-  ;; Update package-alist.
-  (let ((new-desc (package-load-descriptor pkg-dir)))
-    ;; Activation has to be done before compilation, so that if we're
-    ;; upgrading and macros have changed we load the new definitions
-    ;; before compiling.
-    (when (package-activate-1 new-desc :reload :deps)
-      ;; FIXME: Compilation should be done as a separate, optional, step.
-      ;; E.g. for multi-package installs, we should first install all packages
-      ;; and then compile them.
-      (package--compile new-desc)
-      (when package-native-compile
-        (package--native-compile-async new-desc))
-      ;; After compilation, load again any files loaded by
-      ;; `activate-1', so that we use the byte-compiled definitions.
-      (package--reload-previously-loaded new-desc)))
-
-  ;; Mark package as selected
-  (package--save-selected-packages
-   (cons (package-desc-name pkg-desc)
-         package-selected-packages))
-  (package--quickstart-maybe-refresh)
-
-  ;; Confirm that the installation was successful
-  (let ((main-file (package-vc--main-file pkg-desc)))
-    (message "VC package `%s' installed (Version %s, Revision %S)."
-             (package-desc-name pkg-desc)
-             (lm-with-file main-file
-               (package-strip-rcs-id
-                (or (lm-header "package-version")
-                    (lm-header "version"))))
-             (vc-working-revision main-file)))
-  t)
+  (let (missing)
+    ;; Remove any previous instance of PKG-DESC from `package-alist'
+    (let ((pkgs (assq (package-desc-name pkg-desc) package-alist)))
+      (when pkgs
+        (setf (cdr pkgs) (seq-remove #'package-vc-p (cdr pkgs)))))
+
+    ;; In case the package was installed directly from source, the
+    ;; dependency list wasn't know beforehand, and they might have
+    ;; to be installed explicitly.
+    (let ((deps '()))
+      (dolist (file (directory-files pkg-dir t "\\.el\\'" t))
+        (with-temp-buffer
+          (insert-file-contents file)
+          (when-let* ((require-lines (lm-header-multiline "package-requires")))
+            (thread-last
+              (mapconcat #'identity require-lines " ")
+              package-read-from-string
+              package--prepare-dependencies
+              (nconc deps)
+              (setq deps)))))
+      (dolist (dep deps)
+        (cl-callf version-to-list (cadr dep)))
+      (setf missing (package-vc-install-dependencies (delete-dups deps)))
+      (setf missing (delq (assq (package-desc-name pkg-desc)
+                                missing)
+                          missing)))
+
+    (let ((default-directory (file-name-as-directory pkg-dir))
+          (pkg-file (expand-file-name (package--description-file pkg-dir) 
pkg-dir)))
+      ;; Generate autoloads
+      (let* ((name (package-desc-name pkg-desc))
+             (auto-name (format "%s-autoloads.el" name))
+             (extras (package-desc-extras pkg-desc))
+             (lisp-dir (alist-get :lisp-dir extras)))
+        (package-generate-autoloads
+         name (file-name-concat pkg-dir lisp-dir))
+        (when lisp-dir
+          (write-region
+           (with-temp-buffer
+             (insert ";; Autoload indirection for package-vc\n\n")
+             (prin1 `(load (expand-file-name
+                            ,(file-name-concat lisp-dir auto-name)
+                            (or (and load-file-name
+                                     (file-name-directory load-file-name))
+                                (car load-path))))
+                    (current-buffer))
+             (buffer-string))
+           nil (expand-file-name auto-name pkg-dir))))
+
+      ;; Generate package file
+      (package-vc--generate-description-file pkg-desc pkg-file)
+
+      ;; Detect a manual
+      (when-let ((pkg-spec (package-vc--desc->spec pkg-desc))
+                 ((executable-find "install-info")))
+        (dolist (doc-file (ensure-list (plist-get pkg-spec :doc)))
+          (package-vc--build-documentation pkg-desc doc-file))))
+
+    ;; Update package-alist.
+    (let ((new-desc (package-load-descriptor pkg-dir)))
+      ;; Activation has to be done before compilation, so that if we're
+      ;; upgrading and macros have changed we load the new definitions
+      ;; before compiling.
+      (when (package-activate-1 new-desc :reload :deps)
+        ;; FIXME: Compilation should be done as a separate, optional, step.
+        ;; E.g. for multi-package installs, we should first install all 
packages
+        ;; and then compile them.
+        (package--compile new-desc)
+        (when package-native-compile
+          (package--native-compile-async new-desc))
+        ;; After compilation, load again any files loaded by
+        ;; `activate-1', so that we use the byte-compiled definitions.
+        (package--reload-previously-loaded new-desc)))
+
+    ;; Mark package as selected
+    (package--save-selected-packages
+     (cons (package-desc-name pkg-desc)
+           package-selected-packages))
+    (package--quickstart-maybe-refresh)
+
+    ;; Confirm that the installation was successful
+    (let ((main-file (package-vc--main-file pkg-desc)))
+      (message "VC package `%s' installed (Version %s, Revision %S).%s"
+               (package-desc-name pkg-desc)
+               (lm-with-file main-file
+                 (package-strip-rcs-id
+                  (or (lm-header "package-version")
+                      (lm-header "version"))))
+               (vc-working-revision main-file)
+               (if missing
+                    (format
+                     " Failed to install the following dependencies: %s"
+                     (mapconcat
+                      (lambda (p)
+                        (format "%s (%s)" (car p) (cadr p)))
+                      missing ", "))
+                 "")))
+    t))
 
 (defun package-vc--guess-backend (url)
   "Guess the VC backend for URL.
@@ -552,6 +611,20 @@ checkout.  This overrides the `:branch' attribute in 
PKG-SPEC."
         (error "There already exists a checkout for %s" name)))
     (package-vc--clone pkg-desc pkg-spec pkg-dir rev)
 
+    ;; When nothing is specified about a `lisp-dir', then should
+    ;; heuristically check if there is a sub-directory with lisp
+    ;; files.  These are conventionally just called "lisp".  If this
+    ;; directory exists and contains non-zero number of lisp files, we
+    ;; will use that instead of `pkg-dir'.
+    (when-let* (((null lisp-dir))
+                (dir (expand-file-name "lisp" pkg-dir))
+                ((file-directory-p dir))
+                ((directory-files dir nil "\\`[^.].+\\.el\\'" t 1)))
+      ;; We won't use `dir', since dir is an absolute path and we
+      ;; don't want `lisp-dir' to depend on the current location of
+      ;; the package installation, ie. to break if moved around the
+      ;; file system or between installations.
+      (setq lisp-dir "lisp"))
     (when lisp-dir
       (push (cons :lisp-dir lisp-dir)
             (package-desc-extras pkg-desc)))
@@ -661,7 +734,7 @@ If no such revision can be found, return nil."
                              (line-number-at-pos nil t))))))))
 
 ;;;###autoload
-(defun package-vc-install (package &optional name rev backend)
+(defun package-vc-install (package &optional rev backend name)
   "Fetch a PACKAGE and set it up for using with Emacs.
 
 If PACKAGE is a string containing an URL, download the package
@@ -685,7 +758,9 @@ the package's repository; this is only possible if 
NAME-OR-URL is a URL,
 a string.  If BACKEND is omitted or nil, the function
 uses `package-vc-heuristic-alist' to guess the backend.
 Note that by default, a VC package will be prioritized over a
-regular package, but it will not remove a VC package."
+regular package, but it will not remove a VC package.
+
+\(fn PACKAGE &optional REV BACKEND)"
   (interactive
    (progn
      ;; Initialize the package system to get the list of package
@@ -694,8 +769,10 @@ regular package, but it will not remove a VC package."
      (let* ((name-or-url (package-vc--read-package-name
                           "Fetch and install package: " t))
             (name (file-name-base name-or-url)))
-       (list name-or-url (intern (string-remove-prefix "emacs-" name))
-             (and current-prefix-arg :last-release)))))
+       (list name-or-url
+             (and current-prefix-arg :last-release)
+             nil
+             (intern (string-remove-prefix "emacs-" name))))))
   (package-vc--archives-initialize)
   (cond
    ((null package)
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 1cc978923e..1ab70eb2fe 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -2094,7 +2094,7 @@ if all the in-between dependencies are also in 
PACKAGE-LIST."
 (defun package-install-from-archive (pkg-desc)
   "Download and install a package defined by PKG-DESC."
   ;; This won't happen, unless the archive is doing something wrong.
-  (when (package-vc-p pkg-desc)
+  (when (eq (package-desc-kind pkg-desc) 'dir)
     (error "Can't install directory package from archive"))
   (let* ((location (package-archive-base pkg-desc))
          (file (concat (package-desc-full-name pkg-desc)
diff --git a/lisp/emacs-lisp/subr-x.el b/lisp/emacs-lisp/subr-x.el
index 4896f4c293..415f8db52c 100644
--- a/lisp/emacs-lisp/subr-x.el
+++ b/lisp/emacs-lisp/subr-x.el
@@ -333,7 +333,10 @@ as the new values of the bound variables in the recursive 
invocation."
 ;;;###autoload
 (defun string-glyph-split (string)
   "Split STRING into a list of strings representing separate glyphs.
-This takes into account combining characters and grapheme clusters."
+This takes into account combining characters and grapheme clusters:
+if compositions are enbaled, each sequence of characters composed
+on display into a single grapheme cluster is treated as a single
+indivisible unit."
   (let ((result nil)
         (start 0)
         comp)
diff --git a/lisp/org/ob-core.el b/lisp/org/ob-core.el
index f69538f78c..c2a3673752 100644
--- a/lisp/org/ob-core.el
+++ b/lisp/org/ob-core.el
@@ -2464,7 +2464,11 @@ INFO may provide the values of these header arguments 
(in the
                       (cons 'unordered
                             (mapcar
                              (lambda (e)
-                               (list (if (stringp e) e (format "%S" e))))
+                                (cond
+                                 ((stringp e) (list e))
+                                 ((listp e)
+                                  (mapcar (lambda (x) (format "%S" x)) e))
+                                 (t (list (format "%S" e)))))
                              (if (listp result) result
                                (split-string result "\n" t))))
                       '(:splicep nil :istart "- " :iend "\n")))
@@ -3183,8 +3187,8 @@ situations in which is it not appropriate."
          (if (and (memq (string-to-char cell) '(?\( ?`))
                   (not (org-babel-confirm-evaluate
                       ;; See `org-babel-get-src-block-info'.
-                      (list "emacs-lisp" (format "%S" cell)
-                            '((:eval . yes)) nil (format "%S" cell)
+                      (list "emacs-lisp" cell
+                            '((:eval . yes)) nil (format "%s" cell)
                             nil nil))))
              ;; Not allowed.
              (user-error "Evaluation of elisp code %S aborted." cell)
diff --git a/lisp/org/ob-tangle.el b/lisp/org/ob-tangle.el
index bd17bda32b..fd6b6f3b94 100644
--- a/lisp/org/ob-tangle.el
+++ b/lisp/org/ob-tangle.el
@@ -500,7 +500,8 @@ The PARAMS are the 3rd element of the info for the same src 
block."
                  (cl-letf (((symbol-function 'org-store-link-functions)
                             (lambda () nil)))
                    (org-store-link nil))))
-             (bare (and (string-match org-link-bracket-re l)
+             (bare (and l
+                        (string-match org-link-bracket-re l)
                         (match-string 1 l))))
         (when bare
           (if (and org-babel-tangle-use-relative-file-links
diff --git a/lisp/org/oc-basic.el b/lisp/org/oc-basic.el
index 3ef7a37e3b..01e314bfdb 100644
--- a/lisp/org/oc-basic.el
+++ b/lisp/org/oc-basic.el
@@ -162,17 +162,17 @@ Return a hash table with citation references as keys and 
fields alist as values.
         (puthash (cdr (assq 'id item))
                  (mapcar (pcase-lambda (`(,field . ,value))
                            (pcase field
-                             ('author
-                              ;; Author is an array of objects, each
-                              ;; of them designing a person.  These
-                              ;; objects may contain multiple
-                              ;; properties, but for this basic
-                              ;; processor, we'll focus on `given' and
-                              ;; `family'.
+                             ((or 'author 'editors)
+                              ;; Author and editors are arrays of
+                              ;; objects, each of them designing a
+                              ;; person.  These objects may contain
+                              ;; multiple properties, but for this
+                              ;; basic processor, we'll focus on
+                              ;; `given' and `family'.
                               ;;
                               ;; For compatibility with BibTeX, add
-                              ;; "and" between authors.
-                              (cons 'author
+                              ;; "and" between authors and editors.
+                              (cons field
                                     (mapconcat
                                      (lambda (alist)
                                        (concat (alist-get 'family alist)
diff --git a/lisp/org/org-element.el b/lisp/org/org-element.el
index 230937c4e6..ace1cc1a98 100644
--- a/lisp/org/org-element.el
+++ b/lisp/org/org-element.el
@@ -1365,7 +1365,16 @@ Assume point is at beginning of the inline task."
           (priority (and (looking-at "\\[#.\\][ \t]*")
                          (progn (goto-char (match-end 0))
                                 (aref (match-string 0) 2))))
-          (title-start (point))
+           (commentedp
+           (and (let ((case-fold-search nil))
+                   (looking-at org-element-comment-string))
+                (goto-char (match-end 0))
+                 (when (looking-at-p "\\(?:[ \t]\\|$\\)")
+                   (point))))
+          (title-start (prog1 (point)
+                          (unless (or todo priority commentedp)
+                            ;; Headline like "* :tag:"
+                            (skip-chars-backward " \t"))))
           (tags (when (re-search-forward
                        "[ \t]+\\(:[[:alnum:]_@#%:]+:\\)[ \t]*$"
                        (line-end-position)
@@ -1375,6 +1384,7 @@ Assume point is at beginning of the inline task."
           (title-end (point))
           (raw-value (org-trim
                       (buffer-substring-no-properties title-start title-end)))
+           (archivedp (member org-element-archive-tag tags))
           (task-end (save-excursion
                       (end-of-line)
                       (and (re-search-forward org-element-headline-re limit t)
@@ -1410,7 +1420,9 @@ Assume point is at beginning of the inline task."
                         :todo-keyword todo
                         :todo-type todo-type
                         :post-blank (1- (count-lines (or task-end begin) end))
-                        :post-affiliated begin)
+                        :post-affiliated begin
+                         :archivedp archivedp
+                        :commentedp commentedp)
                   time-props
                   standard-props))))
       (org-element-put-property
diff --git a/lisp/org/org-persist.el b/lisp/org/org-persist.el
index 6ccf357784..60291e5187 100644
--- a/lisp/org/org-persist.el
+++ b/lisp/org/org-persist.el
@@ -874,15 +874,21 @@ When IGNORE-RETURN is non-nil, just return t on success 
without calling
 When ASSOCIATED is non-nil, only save the matching data."
   (unless org-persist--index (org-persist--load-index))
   (setq associated (org-persist--normalize-associated associated))
-  (unless
+  (if
       (and (equal 1 (length org-persist--index))
            ;; The single collection only contains a single container
            ;; in the container list.
            (equal 1 (length (plist-get (car org-persist--index) :container)))
            ;; The container is an `index' container.
            (eq 'index (caar (plist-get (car org-persist--index) :container)))
-           ;; No `org-persist-directory' exists yet.
-           (not (file-exists-p org-persist-directory)))
+           (or (not (file-exists-p org-persist-directory))
+               (org-directory-empty-p org-persist-directory)))
+      ;; Do not write anything, and clear up `org-persist-directory' to reduce
+      ;; clutter.
+      (when (and (file-exists-p org-persist-directory)
+                 (org-directory-empty-p org-persist-directory))
+        (delete-directory org-persist-directory))
+    ;; Write the data.
     (let (all-containers)
       (dolist (collection org-persist--index)
         (if associated
@@ -963,6 +969,30 @@ Also, remove containers associated with non-existing 
files."
             (push collection new-index)))))
     (setq org-persist--index (nreverse new-index))))
 
+(defun org-persist-clear-storage-maybe ()
+  "Clear `org-persist-directory' according to 
`org-persist--disable-when-emacs-Q'.
+
+When `org-persist--disable-when-emacs-Q' is non-nil and Emacs is called with -Q
+command line argument, `org-persist-directory' is created in potentially public
+system temporary directory.  Remove everything upon existing Emacs in
+such scenario."
+  (when (and org-persist--disable-when-emacs-Q
+             ;; FIXME: This is relying on undocumented fact that
+             ;; Emacs sets `user-init-file' to nil when loaded with
+             ;; "-Q" argument.
+             (not user-init-file)
+             (file-exists-p org-persist-directory))
+    (delete-directory org-persist-directory 'recursive)))
+
+;; Point to temp directory when `org-persist--disable-when-emacs-Q' is set.
+(when (and org-persist--disable-when-emacs-Q
+           ;; FIXME: This is relying on undocumented fact that
+           ;; Emacs sets `user-init-file' to nil when loaded with
+           ;; "-Q" argument.
+           (not user-init-file))
+  (setq org-persist-directory
+        (make-temp-file "org-persist-" 'dir)))
+
 ;; Automatically write the data, but only when we have write access.
 (let ((dir (directory-file-name
             (file-name-as-directory org-persist-directory))))
@@ -972,20 +1002,12 @@ Also, remove containers associated with non-existing 
files."
   (if (not (file-writable-p dir))
       (message "Missing write access rights to org-persist-directory: %S"
                org-persist-directory)
+    (add-hook 'kill-emacs-hook #'org-persist-clear-storage-maybe) ; Run last.
     (add-hook 'kill-emacs-hook #'org-persist-write-all)
     ;; `org-persist-gc' should run before `org-persist-write-all'.
     ;; So we are adding the hook after `org-persist-write-all'.
     (add-hook 'kill-emacs-hook #'org-persist-gc)))
 
-;; Point to temp directory when `org-persist--disable-when-emacs-Q' is set.
-(if (and org-persist--disable-when-emacs-Q
-         ;; FIXME: This is relying on undocumented fact that
-         ;; Emacs sets `user-init-file' to nil when loaded with
-         ;; "-Q" argument.
-         (not user-init-file))
-    (setq org-persist-directory
-          (make-temp-file "org-persist-" 'dir)))
-
 (add-hook 'after-init-hook #'org-persist-load-all)
 
 (provide 'org-persist)
diff --git a/lisp/org/org-version.el b/lisp/org/org-version.el
index 8de0d1a4a9..a0016265f0 100644
--- a/lisp/org/org-version.el
+++ b/lisp/org/org-version.el
@@ -11,7 +11,7 @@ Inserted by installing Org mode or when a release is made."
 (defun org-git-version ()
   "The Git version of Org mode.
 Inserted by installing Org or when a release is made."
-   (let ((org-git-version "release_9.6-49-g47d129"))
+   (let ((org-git-version "release_9.6-61-g63e073f"))
      org-git-version))
 
 (provide 'org-version)
diff --git a/lisp/org/org.el b/lisp/org/org.el
index 6aa2a16219..ab8b76b926 100644
--- a/lisp/org/org.el
+++ b/lisp/org/org.el
@@ -20213,7 +20213,10 @@ interactive command with similar behavior."
 (defun org-back-to-heading (&optional invisible-ok)
   "Go back to beginning of heading."
   (beginning-of-line)
-  (or (org-at-heading-p (not invisible-ok))
+  (or (and (org-at-heading-p (not invisible-ok))
+           (not (and (featurep 'org-inlinetask)
+                   (fboundp 'org-inlinetask-end-p)
+                   (org-inlinetask-end-p))))
       (if (org-element--cache-active-p)
           (let ((heading (org-element-lineage (org-element-at-point)
                                            '(headline inlinetask)
diff --git a/lisp/org/ox-html.el b/lisp/org/ox-html.el
index 86b10cbf78..19cdf4c5a2 100644
--- a/lisp/org/ox-html.el
+++ b/lisp/org/ox-html.el
@@ -3337,7 +3337,7 @@ INFO is a plist holding contextual information.  See
                      ((org-html-standalone-image-p destination info)
                       (org-export-get-ordinal
                        (org-element-map destination 'link #'identity info t)
-                       info 'link 'org-html-standalone-image-p))
+                       info '(link) 'org-html-standalone-image-p))
                      (t (org-export-get-ordinal
                          destination info nil counter-predicate))))
                     (desc
diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el
index edd81b8bf7..161e01d441 100644
--- a/lisp/progmodes/c-ts-mode.el
+++ b/lisp/progmodes/c-ts-mode.el
@@ -402,7 +402,7 @@ MODE is either `c' or `cpp'."
     ((or "identifier" "field_identifier")
      node)))
 
-(defun c-ts-mode--fontify-declarator (node override start end &rest args)
+(defun c-ts-mode--fontify-declarator (node override start end &rest _args)
   "Fontify a declarator (whatever under the \"declarator\" field).
 For NODE, OVERRIDE, START, END, and ARGS, see
 `treesit-font-lock-rules'."
diff --git a/lisp/treesit.el b/lisp/treesit.el
index 1de0da19c2..cefbed1a16 100644
--- a/lisp/treesit.el
+++ b/lisp/treesit.el
@@ -174,8 +174,7 @@ only look for named nodes.
 If PARSER-OR-LANG is a parser, use that parser; if PARSER-OR-LANG
 is a language, find the first parser for that language in the
 current buffer, or create one if none exists; If PARSER-OR-LANG
-is nil, try to guess the language at POS by
-`treesit-language-at'."
+is nil, try to guess the language at POS using `treesit-language-at'."
   (let* ((root (if (treesit-parser-p parser-or-lang)
                    (treesit-parser-root-node parser-or-lang)
                  (treesit-buffer-root-node
@@ -224,8 +223,7 @@ named node.
 If PARSER-OR-LANG is a parser, use that parser; if PARSER-OR-LANG
 is a language, find the first parser for that language in the
 current buffer, or create one if none exists; If PARSER-OR-LANG
-is nil, try to guess the language at BEG by
-`treesit-language-at'."
+is nil, try to guess the language at BEG using `treesit-language-at'."
   (let ((root (if (treesit-parser-p parser-or-lang)
                   (treesit-parser-root-node parser-or-lang)
                 (treesit-buffer-root-node
@@ -1584,7 +1582,35 @@ BACKWARD and ALL are the same as in 
`treesit-search-forward'."
       (goto-char current-pos)))
     node))
 
-;;; Navigation
+;;; Navigation, defun, things
+;;
+;; Emacs lets you define "things" by a regexp that matches the type of
+;; a node, and here are some functions that lets you find the "things"
+;; at/around point, navigate backward/forward a "thing", etc.
+;;
+;; The most obvious "thing" is a defun, and there are thin wrappers
+;; around thing functions for defun for convenience.
+;;
+;; We have more command-like functions like:
+;; - treesit-beginning-of-thing/defun
+;; - treesit-end-of-thing/defun
+;; - treesit-thing/defun-at-point
+;;
+;; And more generic functions like:
+;; - treesit--things-around
+;; - treesit--top-level-thing
+;; - treesit--navigate-thing
+;;
+;; There are also some defun-specific functions, like
+;; treesit-defun-name, treesit-add-log-current-defun.
+;;
+;; TODO: I'm not entirely sure how would this go, so I only documented
+;; the "defun" functions and didn't document any "thing" functions.
+;; We should also document `treesit-block-type-regexp' and support it
+;; in major modes if we can meaningfully intergrate hideshow: I tried
+;; and failed, we need SomeOne that understands hideshow to look at
+;; it.  (BTW, hideshow should use its own
+;; `treesit-hideshow-block-type-regexp'.)
 
 (defvar-local treesit-defun-type-regexp nil
   "A regexp that matches the node type of defun nodes.
@@ -1598,6 +1624,9 @@ for invalid node.
 
 This is used by `treesit-beginning-of-defun' and friends.")
 
+(defvar-local treesit-block-type-regexp nil
+  "Like `treesit-defun-type-regexp', but for blocks.")
+
 (defvar-local treesit-defun-tactic 'nested
   "Determines how does Emacs treat nested defuns.
 If the value is `top-level', Emacs only moves across top-level
@@ -1613,8 +1642,8 @@ newline after a defun, or the beginning of a defun.
 If the value is nil, no skipping is performed.")
 
 (defvar-local treesit-defun-name-function nil
-  "A function called with a node and returns the name of it.
-If the node is a defun node, return the defun name.  E.g., the
+  "A function that is called with a node and returns its defun name or nil.
+If the node is a defun node, return the defun name, e.g., the
 function name of a function.  If the node is not a defun node, or
 the defun node doesn't have a name, or the node is nil, return
 nil.")
@@ -1623,6 +1652,47 @@ nil.")
   "The delimiter used to connect several defun names.
 This is used in `treesit-add-log-current-defun'.")
 
+(defsubst treesit--thing-unpack-pattern (pattern)
+  "Unpack PATTERN in the shape of `treesit-defun-type-regexp'.
+
+Basically,
+
+    (unpack REGEXP) = (REGEXP . nil)
+    (unpack (REGEXP . PRED)) = (REGEXP . PRED)"
+  (if (consp pattern)
+      pattern
+    (cons pattern nil)))
+
+(defun treesit-beginning-of-thing (pattern &optional arg)
+  "Like `beginning-of-defun', but generalized into things.
+
+PATTERN is like `treesit-defun-type-regexp', ARG
+is the same as in `beginning-of-defun'.
+
+Return non-nil if successfully moved, nil otherwise."
+  (pcase-let* ((arg (or arg 1))
+               (`(,regexp . ,pred) (treesit--thing-unpack-pattern
+                                    pattern))
+               (dest (treesit--navigate-thing
+                      (point) (- arg) 'beg regexp pred)))
+    (when dest
+      (goto-char dest))))
+
+(defun treesit-end-of-thing (pattern &optional arg)
+  "Like `end-of-defun', but generalized into things.
+
+PATTERN is like `treesit-defun-type-regexp', ARG is the same as
+in `end-of-defun'.
+
+Return non-nil if successfully moved, nil otherwise."
+  (pcase-let* ((arg (or arg 1))
+               (`(,regexp . ,pred) (treesit--thing-unpack-pattern
+                                    pattern))
+               (dest (treesit--navigate-thing
+                      (point) arg 'end regexp pred)))
+    (when dest
+      (goto-char dest))))
+
 (defun treesit-beginning-of-defun (&optional arg)
   "Move backward to the beginning of a defun.
 
@@ -1635,9 +1705,7 @@ This is a tree-sitter equivalent of `beginning-of-defun'.
 Behavior of this function depends on `treesit-defun-type-regexp'
 and `treesit-defun-skipper'."
   (interactive "^p")
-  (when-let* ((arg (or arg 1))
-              (dest (treesit--navigate-defun (point) (- arg) 'beg)))
-    (goto-char dest)
+  (when (treesit-beginning-of-thing treesit-defun-type-regexp arg)
     (when treesit-defun-skipper
       (funcall treesit-defun-skipper))
     t))
@@ -1652,9 +1720,7 @@ This is a tree-sitter equivalent of `end-of-defun'.  
Behavior of
 this function depends on `treesit-defun-type-regexp' and
 `treesit-defun-skipper'."
   (interactive "^p\nd")
-  (when-let* ((arg (or arg 1))
-              (dest (treesit--navigate-defun (point) arg 'end)))
-    (goto-char dest)
+  (when (treesit-end-of-thing treesit-defun-type-regexp arg)
     (when treesit-defun-skipper
       (funcall treesit-defun-skipper))))
 
@@ -1691,17 +1757,15 @@ the current line if the beginning of the defun is 
indented."
 ;; parent:
 ;; 1. node covers pos
 ;; 2. smallest such node
-(defun treesit--defuns-around (pos regexp &optional pred)
-  "Return the previous, next, and parent defun around POS.
+(defun treesit--things-around (pos regexp &optional pred)
+  "Return the previous, next, and parent thing around POS.
 
 Return a list of (PREV NEXT PARENT), where PREV and NEXT are
-previous and next sibling defuns around POS, and PARENT is the
-parent defun surrounding POS.  All of three could be nil if no
-sound defun exists.
-
-REGEXP and PRED are the same as in `treesit-defun-type-regexp'.
+previous and next sibling things around POS, and PARENT is the
+parent thing surrounding POS.  All of three could be nil if no
+sound things exists.
 
-Assumes `treesit-defun-type-regexp' is set."
+REGEXP and PRED are the same as in `treesit-thing-at-point'."
   (let* ((node (treesit-node-at pos))
          ;; NODE-BEFORE/AFTER = NODE when POS is completely in NODE,
          ;; but if not, that means point could be in between two
@@ -1761,9 +1825,9 @@ Assumes `treesit-defun-type-regexp' is set."
                    return cursor))
     result))
 
-(defun treesit--top-level-defun (node regexp &optional pred)
-  "Return the top-level parent defun of NODE.
-REGEXP and PRED are the same as in `treesit-defun-type-regexp'."
+(defun treesit--top-level-thing (node regexp &optional pred)
+  "Return the top-level parent thing of NODE.
+REGEXP and PRED are the same as in `treesit-thing-at-point'."
   (let* ((pred (or pred (lambda (_) t))))
     ;; `treesit-search-forward-goto' will make sure the matched node
     ;; is before POS.
@@ -1803,25 +1867,23 @@ REGEXP and PRED are the same as in 
`treesit-defun-type-regexp'."
 ;;    -> Obviously we don't want to go to parent's end, instead, we
 ;;       want to go to parent's prev-sibling's end.  Again, we recurse
 ;;       in the function to do that.
-(defun treesit--navigate-defun (pos arg side &optional recursing)
-  "Navigate defun ARG steps from POS.
+(defun treesit--navigate-thing (pos arg side regexp &optional pred recursing)
+  "Navigate thing ARG steps from POS.
 
 If ARG is positive, move forward that many steps, if negative,
 move backward.  If SIDE is `beg', stop at the beginning of a
-defun, if SIDE is `end', stop at the end.
+thing, if SIDE is `end', stop at the end.
 
 This function doesn't actually move point, it just returns the
-position it would move to.  If there aren't enough defuns to move
+position it would move to.  If there aren't enough things to move
 across, return nil.
 
+REGEXP and PRED are the same as in `treesit-thing-at-point'.
+
 RECURSING is an internal parameter, if non-nil, it means this
 function is called recursively."
   (pcase-let*
       ((counter (abs arg))
-       (`(,regexp . ,pred)
-        (if (consp treesit-defun-type-regexp)
-            treesit-defun-type-regexp
-          (cons treesit-defun-type-regexp nil)))
        ;; Move POS to the beg/end of NODE.  If NODE is nil, terminate.
        ;; Return the position we moved to.
        (advance (lambda (node)
@@ -1835,13 +1897,13 @@ function is called recursively."
       (while (> counter 0)
         (pcase-let
             ((`(,prev ,next ,parent)
-              (treesit--defuns-around pos regexp pred)))
+              (treesit--things-around pos regexp pred)))
           ;; When PARENT is nil, nested and top-level are the same, if
           ;; there is a PARENT, make PARENT to be the top-level parent
           ;; and pretend there is no nested PREV and NEXT.
           (when (and (eq treesit-defun-tactic 'top-level)
                      parent)
-            (setq parent (treesit--top-level-defun
+            (setq parent (treesit--top-level-thing
                           parent regexp pred)
                   prev nil
                   next nil))
@@ -1862,9 +1924,9 @@ function is called recursively."
                   ;; (recursing) until we got out of the parents until
                   ;; (1) there is a next sibling defun, or (2) no more
                   ;; parents [2].
-                  (setq pos (or (treesit--navigate-defun
+                  (setq pos (or (treesit--navigate-thing
                                  (treesit-node-end (or next parent))
-                                 1 'beg t)
+                                 1 'beg regexp pred t)
                                 (throw 'term nil)))
                 ;; Normal case.
                 (setq pos (funcall advance (or next parent))))
@@ -1874,9 +1936,9 @@ function is called recursively."
                            (parent t)
                            (t nil)))
                 ;; Special case: go to prev end-of-defun.
-                (setq pos (or (treesit--navigate-defun
+                (setq pos (or (treesit--navigate-thing
                                (treesit-node-start (or prev parent))
-                               -1 'end t)
+                               -1 'end regexp pred t)
                               (throw 'term nil)))
               ;; Normal case.
               (setq pos (funcall advance (or prev parent)))))
@@ -1886,6 +1948,31 @@ function is called recursively."
     (if (eq counter 0) pos nil)))
 
 ;; TODO: In corporate into thing-at-point.
+(defun treesit-thing-at-point (pattern tactic)
+  "Return the thing node at point or nil if none is found.
+
+\"Thing\" is defined by PATTERN, which can be either a string
+REGEXP or a cons cell (REGEXP . PRED): if a node's type matches
+REGEXP, it is a thing.  The \"thing\" could be further restricted
+by PRED: if non-nil, PRED should be a function that takes a node
+and returns t if the node is a \"thing\", and nil if not.
+
+Return the top-level defun if TACTIC is `top-level', return the
+immediate parent thing if TACTIC is `nested'."
+  (pcase-let* ((`(,regexp . ,pred)
+                (treesit--thing-unpack-pattern pattern))
+               (`(,_ ,next ,parent)
+                (treesit--things-around (point) regexp pred))
+               ;; If point is at the beginning of a thing, we
+               ;; prioritize that thing over the parent in nested
+               ;; mode.
+               (node (or (and (eq (treesit-node-start next) (point))
+                              next)
+                         parent)))
+    (if (eq tactic 'top-level)
+        (treesit--top-level-thing node regexp pred)
+      node)))
+
 (defun treesit-defun-at-point ()
   "Return the defun node at point or nil if none is found.
 
@@ -1895,21 +1982,8 @@ is `top-level', return the immediate parent defun if it 
is
 
 Return nil if `treesit-defun-type-regexp' is not set."
   (when treesit-defun-type-regexp
-    (pcase-let* ((`(,regexp . ,pred)
-                  (if (consp treesit-defun-type-regexp)
-                      treesit-defun-type-regexp
-                    (cons treesit-defun-type-regexp nil)))
-                 (`(,_ ,next ,parent)
-                  (treesit--defuns-around (point) regexp pred))
-                 ;; If point is at the beginning of a defun, we
-                 ;; prioritize that defun over the parent in nested
-                 ;; mode.
-                 (node (or (and (eq (treesit-node-start next) (point))
-                                next)
-                           parent)))
-      (if (eq treesit-defun-tactic 'top-level)
-          (treesit--top-level-defun node regexp pred)
-        node))))
+    (treesit-thing-at-point
+     treesit-defun-type-regexp treesit-defun-tactic)))
 
 (defun treesit-defun-name (node)
   "Return the defun name of NODE.
diff --git a/nt/INSTALL.W64 b/nt/INSTALL.W64
index b1f5dabaaf..b543034e47 100644
--- a/nt/INSTALL.W64
+++ b/nt/INSTALL.W64
@@ -31,7 +31,7 @@ build tools for MinGW-w64 -- see https://msys2.org/.
 
 ** Download and install MinGW-w64 and MSYS2
 
-Go to https://msys2.org and follow the instructions. It is not
+Go to https://msys2.org and follow the instructions.  It is not
 necessary to install the packages suggested on those instructions.
 
 ** Download and install the necessary packages
@@ -70,9 +70,9 @@ You now have a complete build environment for Emacs.
 
 * Install Git (optional) and disable autocrlf
 
-If you're going to be building the development version of Emacs from the Git
-repository, and you don't already have Git on your system, you can install it
-in your MSYS2 environment with:
+If you're going to be building the development version of Emacs from
+the Git repository (see below), and you don't already have Git on your
+system, you can install it in your MSYS2 environment with:
 
   pacman -S git
 
@@ -95,19 +95,22 @@ Savannah Emacs site, 
https://savannah.gnu.org/projects/emacs.
 The Emacs ftp site is located at https://ftp.gnu.org/gnu/emacs/ - download the
 version you want to build and put the file into a location like C:\emacs\,
 then uncompress it with tar.  This will put the Emacs source into a folder like
-C:\emacs\emacs-24.5:
+C:\emacs\emacs-29.1:
 
   cd /c/emacs
-  tar xJf emacs-24.5.tar.xz
+  tar xJf emacs-29.1.tar.xz
 
 ** From the Git repository
 
-To download the Git repository, do something like the following -- this will
-put the Emacs source into C:\emacs\emacs-26:
+To clone the Git repository, do something like the following -- this will
+put the Emacs source into C:\emacs\emacs-master:
 
   mkdir /c/emacs
   cd /c/emacs
-  git clone git://git.sv.gnu.org/emacs.git emacs-26
+  git clone git://git.sv.gnu.org/emacs.git emacs-master
+
+This will produce the development sources, i.e. the master branch of
+the Emacs Git repository, in the directory C:\emacs\emacs-master.
 
 (We recommend using the command shown on Savannah Emacs project page.)
 
@@ -116,11 +119,12 @@ put the Emacs source into C:\emacs\emacs-26:
 Now you're ready to build and install Emacs with autogen, configure, make,
 and make install.
 
-  cd /c/emacs/emacs-26
+  cd /c/emacs/emacs-29.1                  (if building a source tarball)
+  cd /c/emacs/emacs-master                (if building from Git)
 
 ** Run autogen
 
-If you are building the development sources, run autogen to generate the
+If you are building from Git, run autogen to generate the
 configure script (note: this step is not necessary if you are using a
 release source tarball, as the configure file is included):
 
@@ -132,15 +136,16 @@ Now you can run configure, which will build the various 
Makefiles -- note
 that the example given here is just a simple one - for more information
 on the options available please see the INSTALL file in this directory.
 
-The '--prefix' option specifies a location for the resulting binary files,
-which 'make install' will use - in this example we set it to C:\emacs\emacs-26.
-If a prefix is not specified the files will be put in the standard Unix
-directories located in your C:\msys64 directory, but this is not recommended.
+The '--prefix' option specifies a location for the resulting binary
+files, which 'make install' will use - in this example we set it to
+C:\programs\emacs.  If a prefix is not specified the files will be put
+in the standard Unix directories located in your C:\msys64 directory,
+but this is not recommended.
 
 Note also that we need to disable D-Bus because Emacs does not yet
 support them on Windows.
 
-  ./configure --prefix=/c/emacs/emacs-26 --without-dbus
+  ./configure --prefix=/c/programs/emacs --without-dbus
 
 ** Run make
 
diff --git a/src/process.c b/src/process.c
index 5144c5d6c9..cab8a1d5cf 100644
--- a/src/process.c
+++ b/src/process.c
@@ -6795,10 +6795,13 @@ emacs_get_tty_pgrp (struct Lisp_Process *p)
 
 DEFUN ("process-running-child-p", Fprocess_running_child_p,
        Sprocess_running_child_p, 0, 1, 0,
-       doc: /* Return non-nil if PROCESS has given the terminal to a
-child.  If the operating system does not make it possible to find out,
-return t.  If we can find out, return the numeric ID of the foreground
-process group.  */)
+       doc: /* Return non-nil if PROCESS has given control of its terminal to 
a child.
+If the operating system does not make it possible to find out, return t.
+If it's possible to find out, return the numeric ID of the foreground
+process group if PROCESS did give control of its terminal to a
+child process, and return nil if it didn't.
+
+PROCESS must be a real subprocess, not a connection.  */)
   (Lisp_Object process)
 {
   /* Initialize in case ioctl doesn't exist or gives an error,



reply via email to

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