diff --git a/CONTRIBUTE b/CONTRIBUTE
index aaf26ece5a7..eda300f01bc 100644
--- a/CONTRIBUTE
+++ b/CONTRIBUTE
@@ -241,6 +241,8 @@ formatting them:
there will be no individual ChangeLog entries beyond the one in the
summary line.
+- If the commit message is a single-line, it should end with a period.
+
- If the commit has more than one author, the commit message should
contain separate lines to mention the other authors, like the
following:
diff --git a/admin/MAINTAINERS b/admin/MAINTAINERS
index 207a6a920f9..d7416fa783f 100644
--- a/admin/MAINTAINERS
+++ b/admin/MAINTAINERS
@@ -245,9 +245,6 @@ Sean Whitton
==============================================================================
2. Areas that someone is willing to maintain, although he would not
necessarily mind if someone else was the official maintainer.
-This list also includes people who are in the process of handing over
-maintainership to someone listed above, but who want to continue to be
-CC'd as though they were still the primary maintainer, in the meantime.
==============================================================================
Eli Zaretskii
@@ -342,7 +339,6 @@ Tassilo Horn
Dmitry Gutov
lisp/whitespace.el
- lisp/vc/*
Vibhav Pant
lisp/net/browse-url.el
diff --git a/admin/gnulib-patches/lib/getloadavg.c.diff b/admin/gnulib-patches/lib/getloadavg.c.diff
new file mode 100644
index 00000000000..afa633703b7
--- /dev/null
+++ b/admin/gnulib-patches/lib/getloadavg.c.diff
@@ -0,0 +1,14 @@
+diff --git a/lib/getloadavg.c b/lib/getloadavg.c
+index 9da41c16c02..1cb1c01097d 100644
+--- a/lib/getloadavg.c
++++ b/lib/getloadavg.c
+@@ -499,7 +499,8 @@ getloadavg (double loadavg[], int nelem)
+ }
+ # endif
+
+-# if !defined (LDAV_DONE) && (defined __linux__ || defined __ANDROID__)
++# if !defined (LDAV_DONE) && (defined __linux__ || defined __ANDROID__) \
++ && (!defined __ANDROID__ || __ANDROID_API__ >= 13)
+ /* Linux without glibc, Android, Cygwin */
+ # define LDAV_DONE
+ # undef LOAD_AVE_TYPE
diff --git a/admin/merge-gnulib b/admin/merge-gnulib
index ae433961df3..88f74d6eb7f 100755
--- a/admin/merge-gnulib
+++ b/admin/merge-gnulib
@@ -58,7 +58,7 @@ GNULIB_MODULES='
AVOIDED_MODULES='
access btowc chmod close crypto/af_alg dup fchdir fstat gnulib-i18n
iswblank iswctype iswdigit iswxdigit langinfo-h libgmp-mpq
- localename-unsafe-limited lock
+ locale-h localename-unsafe-limited lock
mbrtowc mbsinit memchr mkdir msvc-inval msvc-nothrow nl_langinfo
openat-die opendir pthread-h raise
save-cwd select setenv sigprocmask stat stdarg-h
@@ -80,6 +80,10 @@ case $src in
*) src=$src/ ;;
esac
+GNULIB_TOOL_FLAGS="$GNULIB_TOOL_FLAGS
+ --local-dir="$src"admin/gnulib-patches
+"
+
# Gnulib's source directory.
gnulib_srcdir=${1-$src../gnulib}
diff --git a/admin/notes/emba b/admin/notes/emba
index 2d0aaa6e8f0..cf4184ccc92 100644
--- a/admin/notes/emba
+++ b/admin/notes/emba
@@ -91,7 +91,7 @@ emba.gnu.org:5050, is not accessible publicly. Instead, the container
images must be build locally. Change the current directory to a
recent Emacs branch (not a worktree), and apply the command
- docker build --target emacs-inotify --tag emacs-inotify \
+ docker buildx build --target emacs-inotify --tag emacs-inotify \
-f test/infra/Dockerfile.emba .
This creates the Debian-based image emacs-inotify, based on the
diff --git a/admin/notes/tree-sitter/build-module/build.sh b/admin/notes/tree-sitter/build-module/build.sh
index 4f3c6da3c5f..0cece86e5f7 100755
--- a/admin/notes/tree-sitter/build-module/build.sh
+++ b/admin/notes/tree-sitter/build-module/build.sh
@@ -59,8 +59,11 @@ case "${lang}" in
sourcedir="tree-sitter-typescript/tsx/src"
grammardir="tree-sitter-typescript/tsx"
;;
+ "toml")
+ org="tree-sitter-grammars"
+ ;;
"yaml")
- org="ikatyang"
+ org="tree-sitter-grammars"
;;
esac
diff --git a/admin/nt/dist-build/emacs.nsi b/admin/nt/dist-build/emacs.nsi
index 4a5de4f85f9..9239eb07ec7 100644
--- a/admin/nt/dist-build/emacs.nsi
+++ b/admin/nt/dist-build/emacs.nsi
@@ -72,6 +72,9 @@ Section
# add registry key to enable uninstall from control panel
WriteRegStr HKLM "${UNINST_KEY}" "DisplayName" "GNU Emacs ${VERSION_BRANCH}"
+ WriteRegStr HKLM "${UNINST_KEY}" "DisplayIcon" "$\"$UninstallerPath$\""
+ WriteRegStr HKLM "${UNINST_KEY}" "DisplayVersion" "${VERSION_BRANCH}"
+ WriteRegStr HKLM "${UNINST_KEY}" "Publisher" "Free Software Foundation, Inc."
WriteRegStr HKLM "${UNINST_KEY}" "UninstallString" "$\"$UninstallerPath$\""
;Create shortcuts
diff --git a/admin/tree-sitter/treesit-admin.el b/admin/tree-sitter/treesit-admin.el
index 86174ed2625..f41c4592039 100644
--- a/admin/tree-sitter/treesit-admin.el
+++ b/admin/tree-sitter/treesit-admin.el
@@ -72,31 +72,33 @@
;;; Query validation
(defvar treesit-admin--builtin-language-sources
- '((c "https://github.com/tree-sitter/tree-sitter-c")
- (cpp "https://github.com/tree-sitter/tree-sitter-cpp")
- (cmake "https://github.com/uyha/tree-sitter-cmake")
- (dockerfile "https://github.com/camdencheek/tree-sitter-dockerfile")
- (go "https://github.com/tree-sitter/tree-sitter-go")
- (ruby "https://github.com/tree-sitter/tree-sitter-ruby")
- (javascript "https://github.com/tree-sitter/tree-sitter-javascript")
+ '((c "https://github.com/tree-sitter/tree-sitter-c" "v0.23.4")
+ (cpp "https://github.com/tree-sitter/tree-sitter-cpp" "v0.23.4")
+ (cmake "https://github.com/uyha/tree-sitter-cmake" "v0.5.0")
+ (dockerfile "https://github.com/camdencheek/tree-sitter-dockerfile" "v0.2.0")
+ (go "https://github.com/tree-sitter/tree-sitter-go" "v0.23.4")
+ (ruby "https://github.com/tree-sitter/tree-sitter-ruby" "v0.23.1")
+ (javascript "https://github.com/tree-sitter/tree-sitter-javascript" "v0.23.1")
(typescript "https://github.com/tree-sitter/tree-sitter-typescript"
- nil "typescript/src")
+ "v0.23.2" "typescript/src")
(tsx "https://github.com/tree-sitter/tree-sitter-typescript"
- nil "tsx/src")
- (json "https://github.com/tree-sitter/tree-sitter-json")
- (rust "https://github.com/tree-sitter/tree-sitter-rust")
+ "v0.23.2" "tsx/src")
+ (json "https://github.com/tree-sitter/tree-sitter-json" "v0.24.8")
+ (rust "https://github.com/tree-sitter/tree-sitter-rust" "v0.23.2")
(php "https://github.com/tree-sitter/tree-sitter-php"
- nil "php/src")
- (css "https://github.com/tree-sitter/tree-sitter-css")
+ "v0.23.11" "php/src")
+ (css "https://github.com/tree-sitter/tree-sitter-css" "v0.23.1")
(phpdoc "https://github.com/claytonrcarter/tree-sitter-phpdoc")
- (doxygen "https://github.com/tree-sitter-grammars/tree-sitter-doxygen")
- (lua "https://github.com/tree-sitter-grammars/tree-sitter-lua")
- (python "https://github.com/tree-sitter/tree-sitter-python")
- (html "https://github.com/tree-sitter/tree-sitter-html")
- (elixir "https://github.com/elixir-lang/tree-sitter-elixir")
- (heex "https://github.com/phoenixframework/tree-sitter-heex")
- (java "https://github.com/tree-sitter/tree-sitter-java")
- (jsdoc "https://github.com/tree-sitter/tree-sitter-jsdoc"))
+ (doxygen "https://github.com/tree-sitter-grammars/tree-sitter-doxygen" "v1.1.0")
+ (lua "https://github.com/tree-sitter-grammars/tree-sitter-lua" "v0.3.0")
+ (python "https://github.com/tree-sitter/tree-sitter-python" "v0.23.6")
+ (html "https://github.com/tree-sitter/tree-sitter-html" "v0.23.2")
+ (elixir "https://github.com/elixir-lang/tree-sitter-elixir" "v0.3.3")
+ (heex "https://github.com/phoenixframework/tree-sitter-heex" "v0.7.0")
+ (java "https://github.com/tree-sitter/tree-sitter-java" "v0.23.5")
+ (jsdoc "https://github.com/tree-sitter/tree-sitter-jsdoc" "v0.23.2")
+ (toml "https://github.com/tree-sitter-grammars/tree-sitter-toml" "v0.7.0")
+ (yaml "https://github.com/tree-sitter-grammars/tree-sitter-yaml" "v0.7.0"))
"A list of sources for the builtin modes.
The source information are in the format of
`treesit-language-source-alist'. This is for development only.")
@@ -154,9 +156,7 @@ queries that has problems with latest grammar."
(unless (memq language (alist-get mode mode-language-alist))
(push language (alist-get mode mode-language-alist)))
;; Validate query.
- (when (not (ignore-errors
- (treesit-query-compile language query t)
- t))
+ (unless (treesit-query-valid-p language query)
(push (list mode language feature) invalid-feature-list)
(setq all-queries-valid nil))))
(when all-queries-valid
@@ -259,9 +259,7 @@ Return non-nil if all queries are valid, nil otherwise."
(language (treesit-query-language query)))
;; Validate query.
(when (and (eq lang language)
- (not (ignore-errors
- (treesit-query-compile language query t)
- t)))
+ (not (treesit-query-valid-p language query)))
(setq all-queries-valid nil))))
all-queries-valid))
diff --git a/configure.ac b/configure.ac
index fa582446bf7..85887580bb5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1866,6 +1866,7 @@ AS_IF([test $gl_gcc_warnings = no],
gl_WARN_ADD([$w])
done
gl_WARN_ADD([-Wredundant-decls]) # Prefer this, as we don't use Bison.
+ gl_WARN_ADD([-Wtrailing-whitespace]) # This project's coding style
gl_WARN_ADD([-Wno-missing-field-initializers]) # We need this one
gl_WARN_ADD([-Wno-override-init]) # More trouble than it is worth
gl_WARN_ADD([-Wno-sign-compare]) # Too many warnings for now
@@ -2239,7 +2240,7 @@ AC_CACHE_CHECK([for flags to work around GCC bug 58416],
[AC_LANG_DEFINES_PROVIDED
[/* Work around GCC bug with double in unions on x86,
where the generated insns copy non-floating-point data
- via fldl/fstpl instruction pairs. This can misbehave
+ via fldl/fstpl instruction pairs. This can misbehave if
the data's bit pattern looks like a NaN. See, e.g.:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58416#c10
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71460
diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi
index 02ca71f069b..39c5e79a870 100644
--- a/doc/emacs/building.texi
+++ b/doc/emacs/building.texi
@@ -674,6 +674,9 @@ Run the SDB debugger.
using the minibuffer. The minibuffer's initial contents contain the
standard executable name and options for the debugger, and sometimes
also a guess for the name of the executable file you want to debug.
+For @code{pdb}, @code{perldb}, and @code{guiler}, if the current buffer
+visits a file, pressing @kbd{M-n} (@code{next-history-element})
+in the prompt suggests a full command line including that file name.
Shell wildcards and variables are not allowed in this command line.
Emacs assumes that the first command argument which does not start
with a @samp{-} is the executable file name.
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi
index 770267bc78a..85b00567cf0 100644
--- a/doc/emacs/custom.texi
+++ b/doc/emacs/custom.texi
@@ -2165,6 +2165,10 @@ You can similarly enter the Shift, Control, and Meta modifiers by
using @kbd{C-x @@ S}, @kbd{C-x @@ c}, and @kbd{C-x @@ m}, respectively,
although this is rarely needed.
+ On graphical terminals, you can enable the Modifier Bar mode, which
+allows simulating the missing modifier keys by clicking a tool-bar
+button. @xref{Tool Bars}.
+
@node Function Keys
@subsection Rebinding Function Keys
@@ -2965,9 +2969,19 @@ Emacs will set @code{user-emacs-directory} to the directory it decides
to use. This directory is subsequently used to look for your other
user-specific Emacs files, such as @code{custom-file} (@pxref{Saving
Customizations}), the saved desktop (@pxref{Saving Emacs Sessions}) and
-others. The @code{--init-directory} command-line option (@pxref{Initial
-Options}) overrides the value of @code{user-emacs-directory} determined
-as side effect of the search for your user init file described above.
+others. It is also used to compute the value of the
+@code{native-comp-eln-load-path} (@pxref{Lisp Libraries}), which is
+where Emacs looks for natively-compiled Lisp code and where it deposits
+the newly-compiled Lisp code produced by asynchronous compilation of
+packages your init files and the subsequent Emacs session load. The
+@code{--init-directory} command-line option (@pxref{Initial Options})
+overrides the value of @code{user-emacs-directory} determined as side
+effect of the search for your user init file described above.
+
+Since @code{user-emacs-directory}, once determined by Emacs, is used by
+the rest of the startup code to locate other files and directories, we
+do not recommend changing its value in your init files, as that could
+disrupt or break the correct startup of your Emacs sessions.
Although this is backward-compatible with older Emacs versions, modern
POSIX platforms prefer putting your initialization files under
diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi
index 520d3289f2d..ad496b5b1cd 100644
--- a/doc/emacs/display.texi
+++ b/doc/emacs/display.texi
@@ -1811,6 +1811,21 @@ formats by setting each of the variables @code{eol-mnemonic-unix},
@code{eol-mnemonic-dos}, @code{eol-mnemonic-mac}, and
@code{eol-mnemonic-undecided} to the strings you prefer.
+@vindex mode-line-compact
+@vindex mode-line-collapse-minor-modes
+ Some modes put a lot of data in the mode line, pushing elements at the
+end of the mode line off to the right. Emacs can ``compress'' the mode
+line if the @code{mode-line-compact} variable is non-@code{nil} by
+turning stretches of spaces into a single space. If this variable is
+@code{long}, this is only done when the mode line is wider than the
+currently selected window. (This computation is approximate, based on
+the number of characters, and not their displayed width.) This variable
+can be buffer-local to only compress mode-lines in certain buffers. To
+further ``compress'' the mode line, you may customize the
+@code{mode-line-collapse-minor-modes} option to a non-@code{nil} value,
+and Emacs will hide some minor mode indicators on the mode line by
+collapsing them into a single clickable button.
+
@node Text Display
@section How Text Is Displayed
@cindex characters (in text)
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi
index 6128be8f128..de6a83b5205 100644
--- a/doc/emacs/files.texi
+++ b/doc/emacs/files.texi
@@ -1093,7 +1093,7 @@ type @kbd{M-x normal-mode} to re-read them.
Here is another example, with the time stamp inserted into
the last paragraph of an HTML document.
Since this template is at the end of the document, not in the first
-eight lines, @code{time-stamp-format} starts with @code{-10/} to tell
+eight lines, @code{time-stamp-pattern} starts with @code{-10/} to tell
@code{time-stamp} to look at the last 10 lines.
The @code{%%} asks for the default format
(specified by @code{time-stamp-format}).
@@ -2529,7 +2529,7 @@ select a group of images to copy somewhere else). The @kbd{m}
(@code{image-mode-mark-file}) command will mark the current file in
any Dired buffer(s) that display the current file's directory. If no
such buffer is open, the directory is opened in a new buffer. To
-unmark files, use the @kbd{u} (@code{image-mode-mark-file}) command.
+unmark files, use the @kbd{u} (@code{image-mode-unmark-file}) command.
Finally, if you just want to copy the current buffers file name to the
kill ring, you can use the @kbd{w}
(@code{image-mode-copy-file-name-as-kill}) command.
diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi
index 1fa6e0b5b33..c2451e87715 100644
--- a/doc/emacs/frames.texi
+++ b/doc/emacs/frames.texi
@@ -1346,15 +1346,18 @@ displayed by moving the mouse pointer to the top of the screen.
@cindex displaying modifier keys in the tool bar
@cindex mode, Modifier Bar
@cindex Modifier Bar
- Keyboards often lack one or more of the modifier keys that Emacs
-might want to use, making it difficult or impossible to input key
-sequences that contain them. Emacs can optionally display a list of
-buttons that act as substitutes for modifier keys within the tool bar;
-these buttons are also referred to as the ``modifier bar''. Clicking
-an icon within the modifier bar will cause a modifier key to be
-applied to the next keyboard event that is read. The modifier bar is
-displayed when the global minor mode @code{modifier-bar-mode} is
-enabled; to do so, type @kbd{M-x modifier-bar-mode}.
+ Keyboards often lack one or more of the modifier keys (@pxref{Modifier
+Keys}) that Emacs users might want to use, making it difficult or
+impossible to input key sequences with these modifiers. For example,
+many keyboards lack the Hyper and Super modifiers, and smartphones
+usually also lack Ctrl and Alt modifiers. Emacs can optionally display
+a tool bar of buttons that can substitute the modifier keys; this
+additional tool bar is known as the @dfn{modifier bar}. Clicking a
+button within the modifier bar will cause the modifier key shown on the
+button to be applied to the next keyboard event that Emacs reads. The
+modifier bar is displayed when the global minor mode
+@code{modifier-bar-mode} is enabled; to do so, type @kbd{M-x
+modifier-bar-mode}.
@node Tab Bars
@section Tab Bars
diff --git a/doc/emacs/kmacro.texi b/doc/emacs/kmacro.texi
index 62f275de259..09c6c5d4675 100644
--- a/doc/emacs/kmacro.texi
+++ b/doc/emacs/kmacro.texi
@@ -472,9 +472,9 @@ C-x C-k b 4
will bind the last keyboard macro to the key sequence @kbd{C-x C-k 4}.
@findex insert-kbd-macro
- Once a macro has a command name, you can save its definition in a file.
-Then it can be used in another editing session. First, visit the file
-you want to save the definition in. Then use this command:
+ You can save a macro's definition in a file. Then it can be used in
+another editing session. First, visit the file you want to save the
+definition in. Then use this command:
@example
M-x insert-kbd-macro @key{RET} @var{macroname} @key{RET}
@@ -494,6 +494,9 @@ additional Lisp code to record the keys (if any) that you have bound
to @var{macroname}, so that the macro will be reassigned the same keys
when you load the file.
+ If you do not give @code{insert-kbd-macro} a macro name, it will
+insert Lisp code to restore the @code{last-kdb-macro}.
+
@node Edit Keyboard Macro
@section Editing a Keyboard Macro
diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi
index 6e9653dcdc8..94f2c8331ca 100644
--- a/doc/emacs/maintaining.texi
+++ b/doc/emacs/maintaining.texi
@@ -190,8 +190,8 @@ which it refers to as @dfn{back ends}:
@item
Git is a decentralized version control system originally invented by
Linus Torvalds to support development of Linux (his kernel). VC
-supports many common Git operations, but others, such as repository
-syncing, must be done from the command line.
+supports all the common Git operations, but notably, Git rebases other
+than simply to edit a commit message must be done from the command line.
@cindex CVS
@item
@@ -235,8 +235,7 @@ everything you can do with RCS can be done through VC.
@cindex Mercurial
@item
Mercurial (hg) is a decentralized version control system broadly
-resembling Git. VC supports most Mercurial commands, with the
-exception of repository sync operations.
+resembling Git. VC supports most Mercurial commands.
@cindex bzr
@cindex Bazaar
@@ -1783,20 +1782,18 @@ more programs. Files that belong to a project are typically stored in
a hierarchy of directories; the top-level directory of the hierarchy
is known as the @dfn{project root}.
-@cindex project back-end
+@cindex project backend
Whether a given directory is a root of some project is determined by
-the project-specific infrastructure, known as @dfn{project back-end}.
-Emacs currently supports two such back-ends: VC-aware (@pxref{Version
+the project-specific infrastructure, known as @dfn{project backend}.
+Emacs currently supports two such backends: VC-aware (@pxref{Version
Control}), whereby a VCS repository is considered a project; and EDE
(@pxref{EDE}). This is expected to be extended in the future to
support additional types of projects.
Which files do or don't belong to a project is also determined by
-the project back-end. For example, the VC-aware back-end doesn't
+the project backend. For example, the VC-aware backend doesn't
consider ``ignored'' files (@pxref{VC Ignore}) to be part of the
-project. Also, the VC-aware Project back-end considers ``untracked''
-files by default. That behavior is controllable with the variable
-@code{project-vc-include-untracked}.
+project. See its entry below for description and related options.
@cindex current project name on mode line
@defopt project-mode-line
@@ -1811,6 +1808,7 @@ The default value is @code{nil}.
* Project Buffer Commands:: Commands for handling project buffers.
* Switching Projects:: Switching between projects.
* Managing Projects:: Managing the project list file.
+* VC-Aware Project Backend:: Default project backend.
@end menu
@node Project File Commands
@@ -2050,6 +2048,50 @@ matched against the project root, and the predicate should take the
project object as the only argument and return non-@code{nil} if the
project should @emph{not} be saved to @code{project-list-file}.
+@cindex VC-aware project backend
+@cindex project backend, VC-aware
+@node VC-Aware Project Backend
+This backend is part of Emacs and is enabled by default. (Other
+backends may need installation of add-on packages and their proper
+configuration.)
+
+It determines the contents of the project based on the VCS repository's
+configuration (if any), excluding the ``ignored'' files from the output.
+
+It has some performance optimizations for listing the files with some of
+the popular VCS systems (currently Git and Mercurial).
+
+@defopt project-vc-include-untracked
+By default, files which are neither registered with nor ignored by the
+VCS are considered part of the project. Customize this variable to nil
+to change that.
+@end defopt
+
+@defopt project-vc-ignores
+Using this variable you can add more ignore patterns to the project, to
+exclude more files from the project's file listing. The value is a list
+of glob strings. They can match both regular files and directories. To
+anchor an entry to the project root, start it with @code{./}. To match
+directories only, end it with @code{/}.
+@end defopt
+
+@defopt project-vc-name
+This variable allows you to change the automatically detected name of
+the project to a string of your choice. By default the name is the base
+name of its root directory.
+@end defopt
+
+@defopt project-vc-extra-root-markers
+This variable allows you to set up detection of non-VC projects in this
+backend, and also to have some subdirectories detected as separate
+projects. The value is a list.
+
+Each element is either a base file name or a glob pattern for such.
+
+Example values: @file{.dir-locals.el}, @file{package.json},
+@file{requirements.txt}, @file{*.gemspec}.
+@end defopt
+
@node Change Log
@section Change Logs
diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi
index 08a7f910c5c..d4f2de982d6 100644
--- a/doc/emacs/misc.texi
+++ b/doc/emacs/misc.texi
@@ -2924,11 +2924,15 @@ can use @kbd{M-x desktop-read} to restore a previously-saved desktop
if the current Emacs session didn't load any desktop yet.
@vindex desktop-restore-frames
- By default, the desktop tries to save and restore the frame and
-window configuration. To disable this, set
-@code{desktop-restore-frames} to @code{nil}. (See that variable's
-documentation for some related options that you can customize to
-fine-tune this behavior.)
+ By default, the desktop tries to save and restore the frame and window
+configuration.@footnote{
+Except on Android, where this option defaults to @code{nil} because the
+window manager (@pxref{Android Windowing}) is too prohibitive, and
+doesn't allow restoring frame configurations.}
+To disable or enable this, set @code{desktop-restore-frames} to
+@code{nil} or any non-@code{nil} value respectively. (See that
+variable's documentation for some related options that you can customize
+to fine-tune this behavior.)
@vindex frameset-filter-alist
When the desktop restores the frame and window configuration, it
@@ -2968,8 +2972,8 @@ invoking @kbd{M-x desktop-read} next. The @code{desktop-clear}
command kills all buffers except for internal ones, and clears the
global variables listed in @code{desktop-globals-to-clear}. If you
want it to preserve certain buffers, customize the variable
-@code{desktop-clear-preserve-buffers-regexp}, whose value is a regular
-expression matching the names of buffers not to kill.
+@code{desktop-clear-preserve-buffers}, whose value is a list of regular
+expressions matching the names of buffers not to kill.
@vindex desktop-globals-to-save
If you want to save minibuffer history from one session to
diff --git a/doc/emacs/package.texi b/doc/emacs/package.texi
index 857584b9933..182efff7afb 100644
--- a/doc/emacs/package.texi
+++ b/doc/emacs/package.texi
@@ -654,7 +654,13 @@ maintainer, you can use the command @code{package-report-bug} to
report a bug via Email. This report will include all the user options
that you have customized. If you have made a change you wish to share
with the maintainers, first commit your changes then use the command
-@code{package-vc-prepare-patch} to share it. @xref{Preparing Patches}.
+@code{package-vc-prepare-patch} to share it.
+@iftex
+@xref{Preparing Patches,,,emacs-xtra, Specialized Emacs Features}.
+@end iftex
+@ifnottex
+@xref{Preparing Patches}.
+@end ifnottex
@findex package-vc-install-from-checkout
@findex package-vc-rebuild
diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi
index c34aeac0d24..f3cdc1b8e6c 100644
--- a/doc/emacs/programs.texi
+++ b/doc/emacs/programs.texi
@@ -958,11 +958,11 @@ argument specifies the number of levels to go down.
@node Matching
@subsection Matching Parentheses
-@cindex matching parentheses
+@cindex matching, parentheses and other paired delimiters
@cindex parentheses, displaying matches
- Emacs has a number of @dfn{parenthesis matching} features, which
-make it easy to see how and whether parentheses (or other delimiters)
+ Emacs has a number of @dfn{parenthesis matching} features, which make
+it easy to see how and whether parentheses (or other paired delimiters)
match up.
Whenever you type a self-inserting character that is a closing
@@ -1063,16 +1063,17 @@ nonblank line.
@findex electric-pair-mode
Electric Pair mode, a global minor mode, provides a way to easily
insert matching delimiters: parentheses, braces, brackets, etc.
-Whenever you insert an opening delimiter, the matching closing
-delimiter is automatically inserted as well, leaving point between the
-two. Conversely, when you insert a closing delimiter over an existing
-one, no insertion takes places, and that position is simply skipped
-over. If the region is active (@pxref{Mark}), insertion of a
-delimiter operates on the region: the characters in the region are
-enclosed in a pair of matching delimiters, leaving point after the
-delimiter you typed. If you provide a prefix argument when inserting
-a delimiter, the numeric value of that prefix argument specifies the
-number of pairs to insert.
+Whenever you insert an opening delimiter, the matching closing delimiter
+is automatically inserted as well, leaving point between the two.
+However, if you insert a closing delimiter where one already exists
+(probably a mistake, since typing the opening delimiter inserted the
+closing one for you), Emacs simply moves point to after the closing
+delimiter, skipping the insertion. If the region is active
+(@pxref{Mark}), insertion of a delimiter operates on the region: the
+characters in the region are enclosed in a pair of matching delimiters,
+leaving point after the delimiter you typed. If you provide a prefix
+argument when inserting a delimiter, the numeric value of that prefix
+argument specifies the number of pairs to insert.
These variables control additional features of Electric Pair mode:
diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi
index c9b1bdfc8bd..788d91f78ba 100644
--- a/doc/emacs/search.texi
+++ b/doc/emacs/search.texi
@@ -341,7 +341,7 @@ down-casing.
@kindex M-s M-.
@findex isearch-forward-thing-at-point
To begin a new incremental search with the text near point yanked
-into the initial search string, type @kbd{M-s M-.} that runs the
+into the initial search string, type @kbd{M-s M-.}, which runs the
command @code{isearch-forward-thing-at-point}. If the region was
active, then it yanks the text from the region into the search string.
Otherwise, it tries to yank a URL, a symbol or an expression found
diff --git a/doc/emacs/vc1-xtra.texi b/doc/emacs/vc1-xtra.texi
index 45bc6d77728..5c448e741f2 100644
--- a/doc/emacs/vc1-xtra.texi
+++ b/doc/emacs/vc1-xtra.texi
@@ -312,7 +312,14 @@ If you expect to contribute patches on a regular basis, you can set
the user option @code{vc-default-patch-addressee} to the address(es)
you wish to use. This will be used as the default value when invoking
@code{vc-prepare-patch}. Project maintainers may consider setting
-this as a directory local variable (@pxref{Directory Variables}).
+this as a directory local variable
+@iftex
+(@pxref{Directory Variables,,Per-Directory Local Variables,
+emacs, the Emacs Manual}).
+@end iftex
+@ifnottex
+(@pxref{Directory Variables}).
+@end ifnottex
@node Customizing VC
@subsection Customizing VC
diff --git a/doc/lispintro/emacs-lisp-intro.texi b/doc/lispintro/emacs-lisp-intro.texi
index a3d08b17834..e334faae13c 100644
--- a/doc/lispintro/emacs-lisp-intro.texi
+++ b/doc/lispintro/emacs-lisp-intro.texi
@@ -940,21 +940,21 @@ same time, and then press and release @kbd{t}.)
Also, I often refer to one of Emacs's standard commands by listing the
keys which you press to invoke the command and then giving the name of
-the command in parentheses, like this: @kbd{M-C-\}
+the command in parentheses, like this: @kbd{C-M-\}
(@code{indent-region}). What this means is that the
@code{indent-region} command is customarily invoked by typing
-@kbd{M-C-\}. (You can, if you wish, change the keys that are typed to
+@kbd{C-M-\}. (You can, if you wish, change the keys that are typed to
invoke the command; this is called @dfn{rebinding}. @xref{Keymaps, ,
-Keymaps}.) The abbreviation @kbd{M-C-\} means that you type your
-@key{META} key, @key{CTRL} key and @kbd{\} key all at the same time.
+Keymaps}.) The abbreviation @kbd{C-M-\} means that you type your
+@key{CTRL} key, @key{META} key, and @kbd{\} key all at the same time.
(On many modern keyboards the @key{META} key is labeled
@key{ALT}.)
Sometimes a combination like this is called a keychord, since it is
similar to the way you play a chord on a piano. If your keyboard does
not have a @key{META} key, the @key{ESC} key prefix is used in place
-of it. In this case, @kbd{M-C-\} means that you press and release your
+of it. In this case, @kbd{C-M-\} means that you press and release your
@key{ESC} key and then type the @key{CTRL} key and the @kbd{\} key at
-the same time. But usually @kbd{M-C-\} means press the @key{CTRL} key
+the same time. But usually @kbd{C-M-\} means press the @key{CTRL} key
along with the key that is labeled @key{ALT} and, at the same time,
press the @kbd{\} key.
@@ -962,7 +962,7 @@ In addition to typing a lone keychord, you can prefix what you type
with @kbd{C-u}, which is called the @dfn{universal argument}. The
@kbd{C-u} keychord passes an argument to the subsequent command.
Thus, to indent a region of plain text by 6 spaces, mark the region,
-and then type @w{@kbd{C-u 6 M-C-\}}. (If you do not specify a number,
+and then type @w{@kbd{C-u 6 C-M-\}}. (If you do not specify a number,
Emacs either passes the number 4 to the command or otherwise runs the
command differently than it would otherwise.) @xref{Arguments, ,
Numeric Arguments, emacs, The GNU Emacs Manual}.
@@ -1258,7 +1258,7 @@ Interaction mode or Emacs Lisp mode, you have available to you several
commands to format the Lisp expression so it is easy to read. For
example, pressing the @key{TAB} key automatically indents the line the
cursor is on by the right amount. A command to properly indent the
-code in a region is customarily bound to @kbd{M-C-\}. Indentation is
+code in a region is customarily bound to @kbd{C-M-\}. Indentation is
designed so that you can see which elements of a list belong to which
list---elements of a sub-list are indented more than the elements of
the enclosing list.
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index de0639187ab..3b48cb93405 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -404,8 +404,10 @@ elapsed since the time the first message was emitted.
@defvar inhibit-message
When this variable is non-@code{nil}, @code{message} and related functions
-will not display any messages in the Echo Area. Echo-area messages
-are still logged in the @file{*Messages*} buffer, though.
+will not display any messages in the Echo Area, and will also not clear
+previous echo-area messages when @code{message} is called with a
+@code{nil} or an empty argument. Echo-area messages are still logged in
+the @file{*Messages*} buffer, though.
@end defvar
@defmac with-temp-message message &rest body
@@ -4122,6 +4124,14 @@ available, since it also checks whether the coding system for the text
terminal can encode the character (@pxref{Terminal I/O Encoding}).
@end defun
+@defun char-displayable-on-frame-p char frame
+This function behaves like @code{char-displayable-p} does (relative to
+@var{frame}), but in the graphical case, it does not perform the final
+check of whether the underlying text terminal can encode the character.
+It thus provides a displayability check for @var{char} more specific to
+@var{frame}.
+@end defun
+
@node Low-Level Font
@subsection Low-Level Font Representation
@cindex font property
@@ -5607,12 +5617,20 @@ instead of the text that has the display specification.
@item (slice @var{x} @var{y} @var{width} @var{height})
This specification together with @code{image} specifies a @dfn{slice}
-(a partial area) of the image to display. The elements @var{y} and
-@var{x} specify the top left corner of the slice, within the image;
-@var{width} and @var{height} specify the width and height of the
-slice. Integers are numbers of pixels. A floating-point number
-in the range 0.0--1.0 stands for that fraction of the width or height
-of the entire image.
+(a partial area) of the image to display. More precisely, the
+specification should have the following form:
+
+@lisp
+ ((slice @var{x} @var{y} @var{width} @var{height}) @var{image-desc})
+@end lisp
+
+@noindent
+where @var{image-desc} is an image descriptor described above. The
+elements @var{x} and @var{y} specify the top left corner of the slice,
+within the image; @var{width} and @var{height} specify the width and
+height of the slice. Integers are numbers of pixels. A floating-point
+number in the range 0.0--1.0 stands for that fraction of the width or
+height of the entire image.
@item ((margin nil) @var{string})
A display specification of this form means to display @var{string}
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi
index 197f4c17b46..73e6b6268d4 100644
--- a/doc/lispref/frames.texi
+++ b/doc/lispref/frames.texi
@@ -2839,8 +2839,11 @@ than deleted.
@end deffn
The following function checks whether a frame can be safely deleted. It
-is useful to avoid that a subsequent call of @code{delete-frame} throws
-an error.
+is useful for avoiding the situation whereby a subsequent call of
+@code{delete-frame} fails to delete its argument @var{frame} and/or
+signals an error. To that end, your Lisp program should call
+@code{delete-frame} only if the following function returns
+non-@code{nil}.
@defun frame-deletable-p &optional frame
This function returns non-@code{nil} if the frame specified by
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index 788d98fdf20..649b6206b7b 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -1510,9 +1510,6 @@ You can thus get the full benefit of adaptive filling
(see the variable `adaptive-fill-mode').
\\@{text-mode-map@}
Turning on Text mode runs the normal hook `text-mode-hook'."
-@end group
-@group
- (setq-local text-mode-variant t)
(setq-local require-final-newline mode-require-final-newline))
@end group
@end smallexample
@@ -2152,17 +2149,6 @@ windows, you can say something like:
@end lisp
@end defun
-@vindex mode-line-compact
- Some modes put a lot of data in the mode line, pushing elements at
-the end of the mode line off to the right. Emacs can ``compress'' the
-mode line if the @code{mode-line-compact} variable is non-@code{nil}
-by turning stretches of spaces into a single space. If this variable
-is @code{long}, this is only done when the mode line is wider than the
-currently selected window. (This computation is approximate, based on
-the number of characters, and not their displayed width.) This
-variable can be buffer-local to only compress mode-lines in certain
-buffers.
-
@node Mode Line Data
@subsection The Data Structure of the Mode Line
@cindex mode line construct
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi
index 3da4d78f8b3..8eeddf20b12 100644
--- a/doc/lispref/os.texi
+++ b/doc/lispref/os.texi
@@ -1953,14 +1953,18 @@ This is a synonym for @samp{%H:%M:%S}.
This stands for the numeric day of week (1--7). Monday is day 1.
@item %U
This stands for the week of the year (01--52), assuming that weeks
-start on Sunday.
+start on Sunday. If January 1 is not a Sunday, the first partial week
+is week zero.
@item %V
-This stands for the week of the year according to ISO 8601.
+This stands for the week of the year according to ISO 8601. Note that,
+unlike @samp{%U} and @samp{%W}, the week according to ISO 8601 does
+@emph{not} roll over to 1 on January 1, but keeps its last number.
@item %w
This stands for the numeric day of week (0--6). Sunday is day 0.
@item %W
-This stands for the week of the year (01--52), assuming that weeks
-start on Monday.
+This stands for the week of the year (01--52), assuming that weeks start
+on Monday. If January 1 is not a Monday, the first partial week is week
+zero.
@item %x
This has a locale-specific meaning. In the default locale (named
@samp{C}), it is equivalent to @samp{%D}.
diff --git a/doc/lispref/parsing.texi b/doc/lispref/parsing.texi
index 3e8e0851f2c..f7be47dc044 100644
--- a/doc/lispref/parsing.texi
+++ b/doc/lispref/parsing.texi
@@ -1814,12 +1814,12 @@ ranges for each parser are correct before using parsers in a buffer, and
call @code{treesit-language-at} to figure out the language responsible
for the text at some position. These two functions don't work by
themselves; they need major modes to set @code{treesit-range-settings}
-and @code{treesit-language-at-point-function}, which do the actual work.
+and optionally @code{treesit-language-at-point-function}, which do the actual work.
These functions and variables are explained in more detail towards the
end of the section.
In short, multi-language major modes should set
-@code{treesit-primary-parser}, @code{treesit-range-settings}, and
+@code{treesit-primary-parser}, @code{treesit-range-settings}, and optionally
@code{treesit-language-at-point-function} before calling
@code{treesit-major-mode-setup}.
@@ -1921,9 +1921,9 @@ This function returns the language of the text at buffer position
@var{pos}. Under the hood it calls
@code{treesit-language-at-point-function} and returns its return
value. If @code{treesit-language-at-point-function} is @code{nil},
-this function returns the language of the first parser in the returned
-value of @code{treesit-parser-list}. If there is no parser in the
-buffer, it returns @code{nil}.
+this function returns the language of the deepest parser by embed level
+among parsers returned by @code{treesit-parsers-at}. If there is no
+parser at that buffer position, it returns @code{nil}.
@end defun
@heading Supporting multiple languages in major modes
@@ -2011,7 +2011,7 @@ directly translate into operations shown above.
@end group
@group
-;; Major modes with multiple languages should always set
+;; Major modes with multiple languages can optionally set
;; `treesit-language-at-point-function' (which see).
(setq treesit-language-at-point-function
(lambda (pos)
@@ -2094,17 +2094,45 @@ language of the buffer text at @var{pos}. This variable is used by
@code{treesit-language-at}.
@end defvar
-@defun treesit-local-parsers-at &optional pos language
+@defun treesit-parsers-at &optional pos language with-host only
+This function returns all parsers at @var{pos} in the current buffer.
+@var{pos} defaults to point. The returned parsers are sorted by the
+decreasing embed level.
+
+If @var{language} is non-@code{nil}, return parsers only for that
+language.
+
+If @var{with-host} is non-@code{nil}, return a list of
+@w{@code{(@var{parser} . @var{host-parser})}} where @var{host-parser}
+is the host parser which created the @var{parser}.
+
+If @var{only} is non-@code{nil}, return all parsers including the
+primary parser.
+
+The argument @var{only} can be a list of symbols that specify what
+parsers to include in the return value.
+
+If @var{only} contains the symbol @code{local}, include local parsers.
+Local parsers are those which only parse a limited region marked by an
+overlay with a non-@code{nil} @code{treesit-parser-local-p} property.
+
+If @var{only} contains the symbol @code{global}, include non-local parsers
+excluding the primary parser.
+
+If @var{only} contains the symbol `primary', include the primary parser.
+@end defun
+
+@defun treesit-local-parsers-at &optional pos language with-host
This function returns all the local parsers at @var{pos} in the
current buffer. @var{pos} defaults to point.
Local parsers are those which only parse a limited region marked by an
-overlay with a non-@code{nil} @code{treesit-parser} property. If
-@var{language} is non-@code{nil}, only return parsers for that
+overlay with a non-@code{nil} @code{treesit-parser-local-p} property.
+If @var{language} is non-@code{nil}, only return parsers for that
language.
@end defun
-@defun treesit-local-parsers-on &optional beg end language
+@defun treesit-local-parsers-on &optional beg end language with-host
This function is the same as @code{treesit-local-parsers-at}, but it
returns the local parsers in the range between @var{beg} and @var{end}
instead of at point.
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi
index 954979a00e6..75b2b1c3d60 100644
--- a/doc/lispref/text.texi
+++ b/doc/lispref/text.texi
@@ -1932,7 +1932,7 @@ they default to the whole buffer.
This function adjusts the indentation at the beginning of the current
line to the value specified by the variable @code{left-margin}. (That
may involve either inserting or deleting whitespace.) This function
-is value of @code{indent-line-function} in Paragraph-Indent Text mode.
+is the value of @code{indent-line-function} in Paragraph-Indent Text mode.
@end defun
@defopt left-margin
@@ -5366,11 +5366,17 @@ available in this Emacs session.
When SQLite support is available, the following functions can be used.
@cindex database object
-@defun sqlite-open &optional file
+@defun sqlite-open &optional file readonly disable-uri
This function opens @var{file} as an SQLite database file. If
@var{file} doesn't exist, a new database will be created and stored in
that file. If @var{file} is omitted or @code{nil}, a new in-memory
-database is created instead.
+database is created instead. Second optional argument @var{readonly},
+if non-@code{nil}, means open the database only for reading; the
+database must already exist in that case. By default, @var{file} can be
+a @file{file://} URI as well as a file name; in the unusual case that
+you have a local file whose name begins with @file{file:}, specify a
+non-@code{nil} value for the third optional argument @var{disable-uri}
+to disable the automatic recognition and processing of URIs.
The return value is a @dfn{database object} that can be used as the
argument to most of the subsequent functions described below.
diff --git a/doc/lispref/tips.texi b/doc/lispref/tips.texi
index 31716ffa9e1..6515e8d0b9b 100644
--- a/doc/lispref/tips.texi
+++ b/doc/lispref/tips.texi
@@ -73,18 +73,13 @@ not meant to be used by other packages.
Occasionally, for a command name intended for users to use, it is more
convenient if some words come before the package's name prefix. For
example, it is our convention to have commands that list objects named
-as @samp{list-@var{something}}, e.g., a package called @samp{frob}
-could have a command @samp{list-frobs}, when its other global symbols
-begin with @samp{frob-}. Also, constructs that define functions,
-variables, etc., work better if they start with @samp{define-}, so put
-the name prefix later on in the name.
-
-This recommendation applies even to names for traditional Lisp
-primitives that are not primitives in Emacs Lisp---such as
-@code{copy-list}. Believe it or not, there is more than one plausible
-way to define @code{copy-list}. Play it safe; append your name prefix
-to produce a name like @code{foo-copy-list} or @code{mylib-copy-list}
-instead.
+as @samp{list-@var{something}}, e.g., a package called @samp{frob} could
+have a command @samp{list-frobs}, when its other global symbols begin
+with @samp{frob-}. Also, constructs that define functions, variables,
+etc., may work better if they start with @samp{define-}, so it's okay to
+put the name prefix later on in the name. Outside of these
+well-established cases, however, err on the side of prepending your name
+prefix.
If you write a function that you think ought to be added to Emacs under
a certain name, such as @code{twiddle-files}, don't call it by that name
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index 417c323be6b..3a8dffd1af1 100644
--- a/doc/lispref/windows.texi
+++ b/doc/lispref/windows.texi
@@ -2256,7 +2256,7 @@ unless stated otherwise.
counterclockwise.
@cindex rotate window layout
-@deffn Command rotate-window-layout-clockwise &optional window
+@deffn Command window-layout-rotate-clockwise &optional window
This command rotates the window layout clockwise by 90 degrees. Imagine
a layout with three live windows @var{A}, @var{B} and @var{C} as
depicted on the left below. Then this command will produce the layout
@@ -2276,8 +2276,8 @@ on the right.
@end smallexample
@end deffn
-@deffn Command rotate-window-layout-counterclockwise &optional window
-This is like @code{rotate-window-layout-clockwise} but rotates the
+@deffn Command window-layout-rotate-anticlockwise &optional window
+This is like @code{window-layout-rotate-clockwise} but rotates the
layout in the opposite direction as demonstrated in the example below.
@smallexample
@@ -2298,7 +2298,7 @@ The next two commands @sc{flip} the window layout---rotate it around an
imaginary horizontal or vertical axis.
@cindex flip window layout
-@deffn Command flip-window-layout-vertically &optional window
+@deffn Command window-layout-flip-topdown &optional window
This command flips windows such that windows on the bottom become
windows on the top and vice-versa as in the example below.
@@ -2316,7 +2316,7 @@ windows on the top and vice-versa as in the example below.
@end smallexample
@end deffn
-@deffn Command flip-window-layout-horizontally &optional window
+@deffn Command window-layout-flip-leftright &optional window
This command rearranges window in a way that the windows on the right
become the window on the left, and vice-versa.
@@ -2338,7 +2338,7 @@ The next command can be used for @sc{transposing} windows---changing
horizontal splits to vertical ones and vice-versa.
@cindex transposing windows
-@deffn Command transpose-window-layout &optional window
+@deffn Command window-layout-transpose &optional window
This command reorganizes windows such that every horizontal split
becomes a vertical split and vice versa.
diff --git a/doc/misc/efaq-w32.texi b/doc/misc/efaq-w32.texi
index 4e409261cd9..e50716ff654 100644
--- a/doc/misc/efaq-w32.texi
+++ b/doc/misc/efaq-w32.texi
@@ -353,6 +353,7 @@ not bundled with Emacs. @xref{Other useful ports}.
@section What is my init file?
@cindex .emacs
@cindex init file
+@cindex early init file
When Emacs starts up, it attempts to load and execute the contents of
a file commonly called @file{.emacs} (though it may have other names,
@@ -362,22 +363,31 @@ code to your .emacs, or you can use the Customization interface
accessible from the @emph{Options} menu. If the file does not exist,
Emacs will start with the default settings.
+In addition, Emacs 27 and later attempts to load and execute the
+contents of the @file{early-init.el} file. As its name suggests, this
+file, if it exists, is loaded and executed early on during the Emacs
+startup sequence, before @code{.emacs}, and is intended to contain the
+few initializations which must be performed before @file{.emacs} is
+looked up and loaded.
+
@node Location of init file
@section Where do I put my init file?
@cindex HOME directory
@cindex .emacs.d
@cindex _emacs
@cindex init.el
+@cindex early-init.el
@cindex registry, setting the HOME directory in
-On Windows, the @file{.emacs} file may be called @file{_emacs} for
+On Windows, the @file{.emacs} init file may be called @file{_emacs} for
backward compatibility with DOS and FAT filesystems where filenames
could not start with a dot. Some users prefer to continue using such
a name due to historical problems various Windows tools had in the
past with file names that begin with a dot. The init file may also be
-called @file{.emacs.d/init.el}. Many of the other files that are
-created by Lisp packages are stored in the @file{.emacs.d} directory
-too, which keeps all your Emacs related files in one place.
+called @file{.emacs.d/init.el}. The @file{early-init.el} file and many
+of the other files that are created by Lisp packages are stored in the
+@file{.emacs.d} directory too, which keeps all your Emacs related files
+in one place.
All the files mentioned above should go in your @env{HOME} directory.
The @env{HOME} directory is determined by following the steps below:
@@ -2157,7 +2167,7 @@ MSYS2 is an independent rewrite of MSYS, based on modern Cygwin and
MinGW-w64 with the aim of better interoperability with native Windows
software. It plays the same role MSYS does in MinGW. Being a
distribution, MSYS2 provides tools to build software as well as more
-than 2.600 precompiled packages ready for use.
+than 2600 precompiled packages ready for use.
@node EZWinPorts
@section EZWinPorts
diff --git a/doc/misc/ert.texi b/doc/misc/ert.texi
index 0e3aecdf313..38411ddee3d 100644
--- a/doc/misc/ert.texi
+++ b/doc/misc/ert.texi
@@ -134,11 +134,11 @@ package @file{pp.el}):
;; (pp-to-string '('a 'b)) ; same as above
@end lisp
-The code contained in these comments can be evaluated from time to
-time to compare the output with the expected output. ERT formalizes
-this and introduces a common convention, which simplifies Emacs
-development, since programmers no longer have to manually find and
-evaluate such comments.
+The Lisp forms contained in these comments can be evaluated from time to
+time, e.g. with @kbd{C-x C-e}, to compare the output with the expected
+output. ERT formalizes this and introduces a common convention, which
+simplifies Emacs development, since programmers no longer have to
+manually find and evaluate such comments.
An ERT test definition equivalent to the above comments is this:
diff --git a/doc/misc/flymake.texi b/doc/misc/flymake.texi
index 54835767928..d6c8778d785 100644
--- a/doc/misc/flymake.texi
+++ b/doc/misc/flymake.texi
@@ -62,7 +62,7 @@ To learn about using Flymake, @pxref{Using Flymake}.
When the Emacs LSP support mode Eglot is enabled, Flymake will use that
as an additional back-end. @xref{Eglot Features,,, eglot, Eglot: The
Emacs LSP Client}. Flymake is also designed to be easily extended to
-support new backends via an Elisp interface. @xref{Extending Flymake}.
+support new backends via an Elisp interface. @xref{Flymake API}.
@ifnottex
@insertcopying
@@ -70,7 +70,7 @@ support new backends via an Elisp interface. @xref{Extending Flymake}.
@menu
* Using Flymake::
-* Extending Flymake::
+* Flymake API::
* The legacy Proc backend::
* GNU Free Documentation License::
* Index::
@@ -178,6 +178,10 @@ listing includes the type of the diagnostic, its line and column in
the file, as well as the diagnostic message. You may sort the listing
by each of these columns.
+When invoked on a diagnostic (either via the keyboard or a mouse click)
+the command @code{flymake-show-buffer-diagnostics} attempts to reveal
+said diagnostic in the listing.
+
@node Mode line status
@section Mode line status
@cindex flymake mode line
@@ -210,7 +214,7 @@ investigate and remedy the situation (@pxref{Troubleshooting}).
@item @code{?}
@tab There are no applicable Flymake backends for this buffer, thus Flymake
cannot annotate it. To fix this, a user may look to extending Flymake
-and add a new backend (@pxref{Extending Flymake}).
+and add a new backend (@pxref{Flymake API}).
@end multitable
@@ -313,6 +317,9 @@ The indicator type which Flymake should use to indicate lines with
errors or warnings.
Depending on your preference, this can either use @code{fringes} or
@code{margins} for indicating errors.
+If set to @code{fringes} (the default), it will automatically fall back
+to using margins in windows or frames without fringes, such as text
+terminals.
@item flymake-error-bitmap
A bitmap used in the fringe to mark lines for which an error has
@@ -344,9 +351,14 @@ If non-@code{nil}, moving to errors with @code{flymake-goto-next-error} and
@item flymake-show-diagnostics-at-end-of-line
If non-@code{nil}, show summarized descriptions of diagnostics at the
end of the line. Depending on your preference, this can either be
-distracting and easily confused with actual code, or a significant
-early aid that relieves you from moving around or reaching for the
-mouse to consult an error message.
+distracting and easily confused with actual code, or a significant early
+aid that relieves you from moving around or reaching for the mouse to
+consult an error message. This value may also be set to @code{fancy},
+which will attempt to layout diagnostics below the affected line using
+unicode graphics to point to diagnostic locus.
+
+@item flymake-diagnostic-format-alist
+Control which parts of a diagnostic to show in various situations.
@item flymake-error-eol
A custom face for summarizing diagnostic error messages.
@@ -358,19 +370,23 @@ A custom face for summarizing diagnostic warning messages.
A custom face for summarizing diagnostic notes.
@end vtable
-@node Extending Flymake
-@chapter Extending Flymake
+@node Flymake API, The legacy Proc backend, Using Flymake, Top
+@chapter Flymake API
@cindex extending flymake
-Flymake can primarily be extended in one of two ways:
+Flymake's API supports the following use cases:
@enumerate
@item
-By changing the look and feel of the annotations produced by the
+Changing the look and feel of the annotations produced by the
different backends. @xref{Flymake error types}.
@item
-By adding a new buffer-checking backend. @xref{Backend functions}.
+Adding a new buffer-checking backend. @xref{Backend functions}.
+
+@item
+Writing extension to and process Flymake's output. @xref{Inspecting
+diagnostics}.
@end enumerate
The following sections discuss each approach in detail.
@@ -378,6 +394,7 @@ The following sections discuss each approach in detail.
@menu
* Flymake error types::
* Backend functions::
+* Inspecting diagnostics::
@end menu
@node Flymake error types
@@ -670,37 +687,19 @@ reports targeting other parts of the buffer remain valid.
Before delivering them to Flymake, backends create diagnostic objects
by calling the function @code{flymake-make-diagnostic}.
-@deffn Function flymake-make-diagnostic locus beg end type text &optional data
+@deffn Function flymake-make-diagnostic locus beg end type info &optional data
Make a Flymake diagnostic for the region of text in @var{locus}'s
-delimited by @var{beg} and @var{end}. @var{type} is a diagnostic
-symbol (@pxref{Flymake error types}), and @var{text} is a description
-of the problem detected in this region. Most commonly @var{locus} is
-the buffer object designating for the current buffer being
-syntax-checked. However, it may be a string naming a file relative
-to the current working directory. @xref{Foreign and list-only
-diagnostics}, for when this may be useful. Depending on the type of
-@var{locus}, @var{beg} and @var{end} are both either buffer positions
-or conses (@var{line} . @var{col}) which specify the line and column
-of the diagnostic's start and end positions, respectively.
-@end deffn
-
-@cindex access diagnostic object
-These objects' properties can be accessed with the functions
-@code{flymake-diagnostic-backend}, @code{flymake-diagnostic-buffer},
-@code{flymake-diagnostic-text}, @code{flymake-diagnostic-beg},
-@code{flymake-diagnostic-end}, @code{flymake-diagnostic-type} and
-@code{flymake-diagnostic-data}.
-
-Additionally, the function @code{flymake-diagnostics} will collect
-such objects in the region you specify.
-
-@cindex collect diagnostic objects
-@deffn Function flymake-diagnostics beg end
-Get a list of Flymake diagnostics in the region determined by
-@var{beg} and @var{end}. If neither @var{beg} or @var{end} is
-supplied, use the whole buffer, otherwise if @var{beg} is
-non-@code{nil} and @var{end} is @code{nil}, consider only diagnostics
-at @var{beg}.
+delimited by @var{beg} and @var{end}. @var{type} is a diagnostic symbol
+(@pxref{Flymake error types}). @var{text} can be a string or a list
+(@var{origin} @var{code} @var{message}) appropriately categorizing and
+describing the diagnostic. Most commonly, @var{locus} is the buffer
+object designating for the current buffer being syntax-checked.
+However, it may be a string naming a file relative to the current
+working directory. @xref{Foreign and list-only diagnostics}, for when
+this may be useful. Depending on the type of @var{locus}, @var{beg} and
+@var{end} are both either buffer positions or conses (@var{line}
+. @var{col}) which specify the line and column of the diagnostic's start
+and end positions, respectively.
@end deffn
@cindex buffer position from line and column number
@@ -859,7 +858,7 @@ Binding,,, elisp, The Emacs Lisp Reference Manual}) to be active.
;;
(cl-loop
while (search-forward-regexp
- "^\\(?:.*.rb\\|-\\):\\([0-9]+\\): \\(.*\\)$"
+ "^\\(?:.*\\.rb\\|-\\):\\([0-9]+\\): \\(.*\\)$"
nil t)
for msg = (match-string 2)
for (beg . end) = (flymake-diag-region
@@ -897,6 +896,32 @@ Binding,,, elisp, The Emacs Lisp Reference Manual}) to be active.
@end group
@end example
+@node Inspecting diagnostics
+@section Inspecting diagnostics
+
+When Flymake has called on the backend and collected its diagnostics, it
+will annotate the buffer with it. After this happens, Elisp programs
+may call @code{flymake-diagnostics} to collect such objects in a
+specified region.
+
+@cindex collect diagnostic objects
+@deffn Function flymake-diagnostics beg end
+Get a list of Flymake diagnostics in the region determined by
+@var{beg} and @var{end}. If neither @var{beg} or @var{end} is
+supplied, use the whole buffer, otherwise if @var{beg} is
+non-@code{nil} and @var{end} is @code{nil}, consider only diagnostics
+at @var{beg}.
+@end deffn
+
+@cindex access diagnostic object
+A diagnostic object's properties can be accessed with the functions
+@code{flymake-diagnostic-backend}, @code{flymake-diagnostic-buffer},
+@code{flymake-diagnostic-origin}, @code{flymake-diagnostic-code}
+@code{flymake-diagnostic-message}, @code{flymake-diagnostic-beg},
+@code{flymake-diagnostic-end}, @code{flymake-diagnostic-type} and
+@code{flymake-diagnostic-data}. @code{flymake-diagnostic-text} will
+compose the diagnostic's origin, code and message in a single string.
+
@node The legacy Proc backend
@chapter The legacy ``Proc'' backend
@cindex legacy proc backend
diff --git a/doc/misc/modus-themes.org b/doc/misc/modus-themes.org
index 4c8a1c82749..8b5940f83a4 100644
--- a/doc/misc/modus-themes.org
+++ b/doc/misc/modus-themes.org
@@ -4,9 +4,9 @@
#+language: en
#+options: ':t toc:nil author:t email:t num:t
#+startup: content
-#+macro: stable-version 4.6.0
-#+macro: release-date 2024-10-27
-#+macro: development-version 4.7.0-dev
+#+macro: stable-version 4.7.0
+#+macro: release-date 2025-04-17
+#+macro: development-version 4.8.0-dev
#+macro: file @@texinfo:@file{@@$1@@texinfo:}@@
#+macro: space @@texinfo:@: @@
#+macro: kbd @@texinfo:@kbd{@@$1@@texinfo:}@@
@@ -88,7 +88,7 @@ The Modus themes consist of eight themes, divided into four subgroups.
are variants of the two main themes. They slightly tone down the
intensity of the background and provide a bit more color variety.
~modus-operandi-tinted~ has a set of base tones that are shades of
- light ocher (earthly colors), while ~modus-vivendi-tinted~ gives a
+ light ochre (earthly colors), while ~modus-vivendi-tinted~ gives a
night sky impression.
- Deuteranopia themes :: ~modus-operandi-deuteranopia~ and its
@@ -1309,37 +1309,32 @@ Examples demonstrating how to use the aforementioned:
#+findex: modus-themes-list-colors
The command ~modus-themes-list-colors~ uses minibuffer completion to
select an item from the Modus themes and then produces a buffer with
-previews of its color palette entries. The buffer has a naming scheme
-that reflects the given choice, like =modus-operandi-list-colors= for
-the ~modus-operandi~ theme.
+previews of all of its color palette entries.
#+findex: modus-themes-list-colors-current
The command ~modus-themes-list-colors-current~ skips the minibuffer
-selection process and just produces a preview for the current Modus
-theme.
+selection process to produce a preview for the current Modus theme.
When called with a prefix argument (=C-u= with the default key
bindings), these commands will show a preview of the palette's
-semantic color mappings instead of the named colors. In this context,
-"named colors" are entries that associate a symbol to a string color
-value, such as =(blue-warmer "#354fcf")=. Whereas "semantic color
-mappings" associate a named color to a symbol, like =(string
-blue-warmer)=, thus making the theme render all string constructs in
-the =blue-warmer= color value ([[#h:34c7a691-19bb-4037-8d2f-67a07edab150][Option for palette overrides]]).
+semantic color mappings instead of the full palette ([[#h:34c7a691-19bb-4037-8d2f-67a07edab150][Option for palette overrides]]).
#+findex: modus-themes-preview-colors
#+findex: modus-themes-preview-colors-current
-Aliases for those commands are ~modus-themes-preview-colors~ and
+Aliases for these commands are ~modus-themes-preview-colors~ and
~modus-themes-preview-colors-current~.
-Each row shows a foreground and background coloration using the
-underlying value it references. For example a line with =#a60000= (a
-shade of red) will show red text followed by a stripe with that same
-color as a backdrop.
+Each row includes a foreground and background rendition of the given
+color value. For example a line with =#a60000= (a shade of red) will
+show a column with a red background combined with a suitable
+foreground followed by another column with a red foreground against
+the current theme's background. The intent is to illustrate which
+values are suitable as a background or foreground.
The name of the buffer describes the given Modus theme and what the
-contents are, such as =*modus-operandi-list-colors*= for named colors
-and ==*modus-operandi-list-mappings*= for the semantic color mappings.
+contents are, such as =*modus-operandi-list-all*= for the entirety of
+the palette (named colors as well as semantic color mappings) and
+==*modus-operandi-list-mappings*= for the mappings only.
* Use colors from the Modus themes palette
:PROPERTIES:
@@ -1361,7 +1356,7 @@ value in some other application.
:END:
#+findex: modus-themes-get-color-value
-The function ~modus-themes-get-color-value~ can be called from Lisp to
+The fuction ~modus-themes-get-color-value~ can be called from Lisp to
return the value of a color from the active Modus theme palette. It
takea a =COLOR= argument and an optional =OVERRIDES=. It also accepts
a third =THEME= argument, to get the color from the given theme.
@@ -2367,7 +2362,7 @@ until version 4.3.0.
;; was the default in versions of the Modus themes before 4.4.0
(setq modus-themes-common-palette-overrides
'((bg-prose-block-contents unspecified)
- (bg-prose-block-delimiter unspecified)
+ (bg-prose-block-delimiter unspeficied)
(fg-prose-block-delimiter fg-dim)))
#+end_src
@@ -2941,7 +2936,7 @@ Reload the theme for changes to take effect.
:CUSTOM_ID: h:a5140c9c-18b2-45db-8021-38d0b5074116
:END:
-By default, the background of the ~region~ face extends from the
+By the default, the background of the ~region~ face extends from the
end of the line to the edge of the window. To limit it to the end of
the line, we need to override the face's =:extend= attribute. Adding
this to the Emacs configuration file will suffice:
@@ -3365,7 +3360,7 @@ specification of that variable looks like this:
With the exception of ~org-verbatim~ and ~org-code~ faces, everything else
uses the corresponding type of emphasis: a bold typographic weight, or
-italicized, underlined, and struck through text.
+italicised, underlined, and struck through text.
The best way for users to add some extra attributes, such as a
foreground color, is to define their own faces and assign them to the
@@ -3985,13 +3980,13 @@ styles to use. The following is but a basic attempt to get started.
(modus-themes-with-colors
(custom-set-faces
;; FIXME: What is a "region cursor" and should it differ from the position highlights below?
- `(meow-region-cursor-1 ((,c :inherit (bold modus-themes-reset-soft) :background ,bg-char-0)))
- `(meow-region-cursor-2 ((,c :inherit (bold modus-themes-reset-soft) :background ,bg-char-1)))
- `(meow-region-cursor-3 ((,c :inherit (bold modus-themes-reset-soft) :background ,bg-char-2)))
+ `(meow-region-cursor-1 ((,c :inherit (bold modus-themes-search-current modus-themes-reset-soft))))
+ `(meow-region-cursor-2 ((,c :inherit (bold modus-themes-search-current modus-themes-reset-soft))))
+ `(meow-region-cursor-3 ((,c :inherit (bold modus-themes-search-current modus-themes-reset-soft))))
- `(meow-position-highlight-number-1 ((,c :inherit (bold modus-themes-reset-soft) :background ,bg-char-0)))
- `(meow-position-highlight-number-2 ((,c :inherit (bold modus-themes-reset-soft) :background ,bg-char-1)))
- `(meow-position-highlight-number-3 ((,c :inherit (bold modus-themes-reset-soft) :background ,bg-char-2))))))
+ `(meow-position-highlight-number-1 ((,c :inherit (bold modus-themes-search-current modus-themes-reset-soft))))
+ `(meow-position-highlight-number-2 ((,c :inherit (bold modus-themes-search-current modus-themes-reset-soft))))
+ `(meow-position-highlight-number-3 ((,c :inherit (bold modus-themes-search-current modus-themes-reset-soft)))))))
(add-hook 'enable-theme-functions #'my-modus-themes-custom-faces)
#+end_src
@@ -4049,45 +4044,6 @@ the theme level. Users can try this instead:
[[#h:d87673fe-2ce1-4c80-a4b8-be36ca9f2d24][Using a hook at the post-load-theme phase]].
-** DIY Add support for howm
-:PROPERTIES:
-:CUSTOM_ID: h:7ea8fa66-1cd8-47b0-92b4-9998a3068f85
-:END:
-
-The ~howm~ package is a note-taking solution for Emacs. Users can add
-support for its faces with something like the following.
-
-#+begin_src emacs-lisp
-(defun my-modus-themes-custom-faces (&rest _)
- (modus-themes-with-colors
- (custom-set-faces
- `(action-lock-face ((,c :inherit button)))
- `(howm-mode-keyword-face (( )))
- `(howm-mode-ref-face ((,c :inherit link)))
- `(howm-mode-title-face ((,c :inherit modus-themes-heading-0)))
- `(howm-mode-wiki-face ((,c :inherit link)))
- `(howm-reminder-deadline-face ((,c :foreground ,date-deadline)))
- `(howm-reminder-late-deadline-face ((,c :inherit bold :foreground ,date-deadline)))
- `(howm-reminder-defer-face ((,c :foreground ,date-scheduled)))
- `(howm-reminder-scheduled-face ((,c :foreground ,date-scheduled)))
- `(howm-reminder-done-face ((,c :foreground ,prose-done)))
- `(howm-reminder-todo-face ((,c :foreground ,prose-todo)))
- `(howm-reminder-normal-face ((,c :foreground ,date-common)))
- `(howm-reminder-today-face ((,c :inherit bold :foreground ,date-common)))
- `(howm-reminder-tomorrow-face ((,c :inherit bold :foreground ,date-scheduled)))
- `(howm-simulate-todo-mode-line-face ((,c :inherit bold)))
- `(howm-view-empty-face (( )))
- `(howm-view-hilit-face ((,c :inherit match)))
- `(howm-view-name-face ((,c :inherit bold)))
- `(iigrep-counts-face1 ((,c :foreground ,rainbow-1)))
- `(iigrep-counts-face2 ((,c :foreground ,rainbow-2)))
- `(iigrep-counts-face3 ((,c :foreground ,rainbow-3)))
- `(iigrep-counts-face4 ((,c :foreground ,rainbow-4)))
- `(iigrep-counts-face5 ((,c :foreground ,rainbow-5))))))
-
-(add-hook 'enable-theme-functions #'my-modus-themes-custom-faces)
-#+end_src
-
** DIY Use a hook at the post-load-theme phase
:PROPERTIES:
:CUSTOM_ID: h:d87673fe-2ce1-4c80-a4b8-be36ca9f2d24
@@ -4207,6 +4163,7 @@ project. The idea is to offer an overview of the known status of all
affected face groups. The items with an appended asterisk =*= tend to
have lots of extensions, so the "full support" may not be 100% true…
++ abbrev
+ ace-window
+ agda2-mode
+ all-the-icons
@@ -4314,6 +4271,7 @@ have lots of extensions, so the "full support" may not be 100% true…
+ hl-fill-column
+ hl-line-mode
+ hl-todo
++ howm
+ hydra
+ ibuffer
+ icomplete
@@ -4420,6 +4378,7 @@ have lots of extensions, so the "full support" may not be 100% true…
+ sly
+ smart-mode-line
+ smerge
++ spacious-padding
+ speedbar
+ spell-fu
+ stripes
@@ -4435,8 +4394,10 @@ have lots of extensions, so the "full support" may not be 100% true…
+ terraform-mode
+ term
+ textsec
++ tldr
+ transient (pop-up windows such as Magit's)
+ trashed
++ treemacs
+ tree-sitter
+ tty-menu
+ tuareg
@@ -5407,7 +5368,7 @@ more effective than trying to do the same with either red or blue (the
latter is the least effective in that regard).
When we need to work with several colors, it is always better to have
-sufficient maneuvering space, especially since we cannot pick arbitrary
+sufficient manoeuvring space, especially since we cannot pick arbitrary
colors but only those that satisfy the accessibility objectives of the
themes.
@@ -5513,7 +5474,7 @@ it is already understood that one must follow the indicator or headline
to view its contents and (ii) underlining everything would make the
interface virtually unusable.
-Again, one must exercise judgment in order to avoid discrimination,
+Again, one must exercise judgement in order to avoid discrimination,
where "discrimination" refers to:
+ The treatment of substantially different magnitudes as if they were of
@@ -5587,7 +5548,7 @@ the themes, which is partially fleshed out in this manual.
With regard to the artistic aspect (where "art" qua skill may amount to
an imprecise science), there is no hard-and-fast rule in effect as it
-requires one to exercise discretion and make decisions based on
+requires one to exercize discretion and make decisions based on
context-dependent information or constraints. As is true with most
things in life, when in doubt, do not cling on to the letter of the law
but try to understand its spirit.
@@ -5736,14 +5697,14 @@ The Modus themes are a collective effort. Every bit of work matters.
Contovounesios, Björn Lindström, Carlo Zancanaro, Christian Tietze,
Daniel Mendler, David Edmondson, Eli Zaretskii, Fritz Grabo, Gautier
Ponsinet, Illia Ostapyshyn, Jared Finder, Kévin Le Gouguec, Koen van
- Greevenbroek, Kostadin Ninev, Madhavan Krishnan, Manuel Giraud,
- Markus Beppler, Matthew Stevenson, Mauro Aranda, Nacho Barrientos,
- Niall Dooley, Nicolas De Jaeghere, Paul David, Pavel Novichkov,
- Philip Kaludercic, Pierre Téchoueyres, Rudolf Adamkovič, Sergey
- Nichiporchik, Shreyas Ragavan, Stefan Kangas, Stephen Berman,
- Stephen Gildea, Steve Downey, Thanos Apollo, Tomasz Hołubowicz,
- Utkarsh Singh, Vincent Murphy, Xinglu Chen, Yuanchen Xie, fluentpwn,
- okamsn.
+ Greevenbroek, Kostadin Ninev, Leilei332, Madhavan Krishnan, Manuel
+ Giraud, Markus Beppler, Matthew Stevenson, Mauro Aranda, Nacho
+ Barrientos, Niall Dooley, Nicolas De Jaeghere, Paul David, Pavel
+ Novichkov, Philip Kaludercic, Pierre Téchoueyres, Rahul M.
+ {{{space()}}} Juliato, Rudolf Adamkovič, Sergey Nichiporchik,
+ Shreyas Ragavan, Stefan Kangas, Stephen Berman, Stephen Gildea,
+ Steve Downey, Thanos Apollo, Tomasz Hołubowicz, Utkarsh Singh,
+ Vincent Murphy, Xinglu Chen, Yuanchen Xie, fluentpwn, okamsn.
+ Ideas and user feedback :: Aaron Jensen, Adam Porter, Adam Spiers,
Adrian Manea, Aleksei Pirogov, Alex Griffin, Alex Koen, Alex
@@ -5779,7 +5740,8 @@ The Modus themes are a collective effort. Every bit of work matters.
Eugene, Fourchaux, Fredrik, Moesasji, Nick, Summer Emacs, TheBlob42,
TitusMu, Trey, ZharMeny, bepolymathe, bit9tream, bangedorrunt,
derek-upham, doolio, fleimgruber, gitrj95, iSeeU, jixiuf, ltmsyvag,
- okamsn, pRot0ta1p, shipmints, soaringbird, tumashu, wakamenod.
+ okamsn, pedro-nonfree, pRot0ta1p, shipmints, soaringbird, tumashu,
+ wakamenod.
+ Packaging :: Basil L.{{{space()}}} Contovounesios, Eli Zaretskii,
Glenn Morris, Mauro Aranda, Richard Stallman, Stefan Kangas (core
@@ -5812,7 +5774,7 @@ All errors are my own.
Version 1.3, 3 November 2008
- Copyright (C) 2000-2002, 2007-2008, 2025 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex
index faad184e345..3ebea93cb1d 100644
--- a/doc/misc/texinfo.tex
+++ b/doc/misc/texinfo.tex
@@ -3,7 +3,7 @@
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
-\def\texinfoversion{2025-01-31.21}
+\def\texinfoversion{2025-03-22.08}
%
% Copyright 1985, 1986, 1988, 1990-2025 Free Software Foundation, Inc.
%
@@ -287,7 +287,6 @@
% Avoid "undefined control sequence" errors.
\def\currentchapterdefs{}
\def\currentsectiondefs{}
-\def\currentsection{}
\def\prevchapterdefs{}
\def\prevsectiondefs{}
\def\currentcolordefs{}
@@ -980,18 +979,51 @@ where each line of input produces a line of output.}
\newif\ifpdf
\newif\ifpdfmakepagedest
+% when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1
+% can be set). So we test for \relax and 0 as well as being undefined.
+\ifx\pdfoutput\thisisundefined
+\else
+ \ifx\pdfoutput\relax
+ \else
+ \ifcase\pdfoutput
+ \else
+ \pdftrue
+ \fi
+ \fi
+\fi
+
+\newif\ifxetex
+\ifx\XeTeXrevision\thisisundefined\else
+ \xetextrue
+\fi
+
\newif\ifluatex
\ifx\luatexversion\thisisundefined\else
\luatextrue
+ \ifnum\luatexversion>84
+ \pdftrue
+ \fi
\fi
+\newif\ifpdforxetex
+\ifpdf
+ \pdforxetextrue
+\fi
+\ifxetex
+ \pdforxetextrue
+\fi
+
+
+
+% Whether to use non-ASCII bytes in internal link targets. Presently this
+% is almost always on.
+\newif\iftxiuseunicodedestname
+\txiuseunicodedestnametrue
+
%
% For LuaTeX
%
-\newif\iftxiuseunicodedestname
-\txiuseunicodedestnamefalse % For pdfTeX etc.
-
\ifluatex
% Use Unicode destination names
\txiuseunicodedestnametrue
@@ -1045,7 +1077,7 @@ where each line of input produces a line of output.}
%
\endgroup
\def\pdfescapestring#1{\directlua{PDFescstr('\luaescapestring{#1}')}}
- \ifnum\luatexversion>84
+ \ifpdf
% For LuaTeX >= 0.85
\def\pdfdest{\pdfextension dest}
\let\pdfoutput\outputmode
@@ -1068,33 +1100,6 @@ where each line of input produces a line of output.}
\fi
\fi
-% when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1
-% can be set). So we test for \relax and 0 as well as being undefined.
-\ifx\pdfoutput\thisisundefined
-\else
- \ifx\pdfoutput\relax
- \else
- \ifcase\pdfoutput
- \else
- \pdftrue
- \fi
- \fi
-\fi
-
-\newif\ifxetex
-\ifx\XeTeXrevision\thisisundefined\else
- \xetextrue
-\fi
-
-\newif\ifpdforxetex
-\pdforxetexfalse
-\ifpdf
- \pdforxetextrue
-\fi
-\ifxetex
- \pdforxetextrue
-\fi
-
% Output page labels information.
% See PDF reference v.1.7 p.594, section 8.3.1.
@@ -1388,9 +1393,6 @@ output) for that.)}
\safewhatsit{\pdfdest name{\pdfdestname} xyz}%
}
%
- % used to mark target names; must be expandable.
- \def\pdfmkpgn#1{#1}
- %
% Adding outlines to PDF; macros for calculating structure of outlines
% come from Petr Olsak
\def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0%
@@ -1416,7 +1418,7 @@ output) for that.)}
\def\pdfdestname{#4}%
\fi
%
- \pdfoutline goto name{\pdfmkpgn{\pdfdestname}}#2{\pdfoutlinetext}%
+ \pdfoutline goto name{\pdfdestname}#2{\pdfoutlinetext}%
}
%
\def\pdfmakeoutlines{%
@@ -1427,15 +1429,18 @@ output) for that.)}
\def\thischapnum{##2}%
\def\thissecnum{0}%
\def\thissubsecnum{0}%
+ \def\indexlastsec{chap\thischapnum}%
}%
\def\numsecentry##1##2##3##4{%
\advancenumber{chap\thischapnum}%
\def\thissecnum{##2}%
\def\thissubsecnum{0}%
+ \def\indexlastsec{sec\thissecnum}%
}%
\def\numsubsecentry##1##2##3##4{%
\advancenumber{sec\thissecnum}%
\def\thissubsecnum{##2}%
+ \def\indexlastsec{subsec\thissecnum}%
}%
\def\numsubsubsecentry##1##2##3##4{%
\advancenumber{subsec\thissubsecnum}%
@@ -1443,7 +1448,13 @@ output) for that.)}
\def\thischapnum{0}%
\def\thissecnum{0}%
\def\thissubsecnum{0}%
+ \let\indexlastsec\empty
%
+ % Index initials are subsidiary to whatever sectioning command just
+ % occurred, usually @appendix or @chapter but occasionally a lower level.
+ \def\idxinitialentry##1##2##3##4{%
+ \expandafter\advancenumber\expandafter{\indexlastsec}%
+ }%
% use \def rather than \let here because we redefine \chapentry et
% al. a second time, below.
\def\appentry{\numchapentry}%
@@ -1455,9 +1466,6 @@ output) for that.)}
\def\unnsubsecentry{\numsubsecentry}%
\def\unnsubsubsecentry{\numsubsubsecentry}%
%
- % Treat index initials like @section. Note that this is the wrong
- % level if the index is not at the level of @appendix or @chapter.
- \def\idxinitialentry{\numsecentry}%
\readdatafile{toc}%
%
% Read toc second time, this time actually producing the outlines.
@@ -1482,18 +1490,6 @@ output) for that.)}
\def\idxinitialentry##1##2##3##4{%
\dopdfoutline{##1}{}{idx.##1.##2}{##4}}%
%
- % PDF outlines are displayed using system fonts, instead of
- % document fonts. Therefore we cannot use special characters,
- % since the encoding is unknown. For example, the eogonek from
- % Latin 2 (0xea) gets translated to a | character. Info from
- % Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100.
- %
- % TODO this right, we have to translate 8-bit characters to
- % their "best" equivalent, based on the @documentencoding. Too
- % much work for too little return. Just use the ASCII equivalents
- % we use for the index sort strings.
- %
- \indexnofonts
\ifnodeseen\else \dopdfoutlinecontents \fi % for @contents at beginning
\setupdatafile
% We can have normal brace characters in the PDF outlines, unlike
@@ -1501,9 +1497,9 @@ output) for that.)}
\def\{{\lbracecharliteral}%
\def\}{\rbracecharliteral}%
\catcode`\\=\active \otherbackslash
- \input \tocreadfilename
+ \input \tocreadfilename\relax
+ \ifnodeseen \dopdfoutlinecontents \fi % for @contents at end
\endgroup
- \ifnodeseen \dopdfoutlinecontents \fi % for @contents at end
}
\def\dopdfoutlinecontents{%
\expandafter\dopdfoutline\expandafter{\putwordTOC}{}{txi.CONTENTS}{}%
@@ -1541,7 +1537,7 @@ output) for that.)}
%
\def\pdflink#1{\pdflinkpage{#1}{#1}}%
\def\pdflinkpage#1#2{%
- \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}}
+ \startlink attr{/Border [0 0 0]} goto name{#1}
\setcolor{\linkcolor}#2\endlink}
\else
% non-pdf mode
@@ -1644,18 +1640,20 @@ output) for that.)}
% horizontal space being required in the PDF viewer.
\def\partentry##1##2##3##4{}% ignore parts in the outlines
\def\numchapentry##1##2##3##4{%
- \dopdfoutline{##2 ##1}{1}{##3}{##4}}%
+ \dopdfoutline{##2 ##1}{1}{##3}{##4}%
+ \def\indexseclevel{2}}%
\def\numsecentry##1##2##3##4{%
- \dopdfoutline{##1}{2}{##3}{##4}}%
+ \dopdfoutline{##1}{2}{##3}{##4}%
+ \def\indexseclevel{3}}%
\def\numsubsecentry##1##2##3##4{%
- \dopdfoutline{##1}{3}{##3}{##4}}%
+ \dopdfoutline{##1}{3}{##3}{##4}%
+ \def\indexseclevel{4}}%
\def\numsubsubsecentry##1##2##3##4{%
- \dopdfoutline{##1}{4}{##3}{##4}}%
+ \dopdfoutline{##1}{4}{##3}{##4}%
+ \def\indexseclevel{5}}%
%
- % Note this is at the wrong level unless the index is in an @appendix
- % or @chapter.
\def\idxinitialentry##1##2##3##4{%
- \dopdfoutline{##1}{2}{idx.##1.##2}{##4}}%
+ \dopdfoutline{##1}{\indexseclevel}{idx.##1.##2}{##4}}%
%
\let\appentry\numchapentry%
\let\appsecentry\numsecentry%
@@ -1680,7 +1678,9 @@ output) for that.)}
\def\{{\lbracecharliteral}%
\def\}{\rbracecharliteral}%
\catcode`\\=\active \otherbackslash
+ \xetexpreauxfile
\input \tocreadfilename\relax
+ \xetexpostauxfile
\ifnodeseen \dopdfoutlinecontents \fi % for @contents at end
\endgroup
}
@@ -5177,8 +5177,8 @@ $$%
%
\uccode`\1=`\{ \uppercase{\def\{{1}}%
\uccode`\1=`\} \uppercase{\def\}{1}}%
- \let\lbracechar\{%
- \let\rbracechar\}%
+ \def\lbracechar##1{\{}%
+ \def\rbracechar##1{\}}%
%
%
% We need to get rid of all macros, leaving only the arguments (if present).
@@ -5523,6 +5523,8 @@ $$%
\tolerance = 9500
\plainfrenchspacing
\everypar = {}% don't want the \kern\-parindent from indentation suppression.
+ \let\entry\indexentry
+ \ifxetex\xetexpreauxfile\fi
%
% See comment in \requireopenindexfile.
\def\indexname{#1}\ifx\indexname\indexisfl\def\indexname{f1}\fi
@@ -5548,6 +5550,7 @@ $$%
\fi
\fi
\closein 1
+ \ifxetex\xetexpostauxfile\fi
\endgroup}
% Checked in @bye
@@ -5583,7 +5586,9 @@ might help (with 'rm \jobname.?? \jobname.??s')%
}%
\else
\begindoublecolumns
+ \ifxetex\xetexpreauxfile\fi
\input \jobname.\indexname s
+ \ifxetex\xetexpostauxfile\fi
\enddoublecolumns
\fi
}{%
@@ -5594,11 +5599,39 @@ might help (with 'rm \jobname.?? \jobname.??s')%
% should work because we (hopefully) don't otherwise use @ in index files.
%\catcode`\@=12\relax
\catcode`\@=0\relax
+ \ifxetex\xetexpreauxfile\fi
\input \jobname.\indexname s
+ \ifxetex\xetexpostauxfile\fi
\enddoublecolumns
}%
}
+\def\indexentry#1#2{%
+ \let\entrypagetarget\empty
+ \ifpdforxetex
+ % only link the index text to the page if no comma appears in the
+ % list of pages, i.e. there is only one page
+ \checkpagelistcomma{#2}\pagelistcomma
+ \expandafter\ifcase\pagelistcomma
+ \def\entrypagetarget{#2}%
+ \fi
+ \fi%
+ \entryinternal{#1}{#2}%
+}
+
+\def\checkpagelistcomma#1#2{%
+ \checkpagelistcommaxx#2#1,\finish
+}
+\def\checkpagelistcommaxx#1#2,#3\finish{%
+ \def\tmp{#3}%
+ \ifx\tmp\empty
+ \def#1{0\relax}
+ \else
+ \def#1{1\relax}
+ \fi
+}
+
+
% These macros are used by the sorted index file itself.
% Change them to control the appearance of the index.
@@ -5673,18 +5706,14 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\def\doindexinitialentry#1{%
\ifpdforxetex
\global\advance\idxinitialno by 1
- \def\indexlbrace{\{}
- \def\indexrbrace{\}}
- \def\indexbackslash{\realbackslash}
- \def\indexatchar{\@}
+ \def\indexlbrace{\{}%
+ \def\indexrbrace{\}}%
+ \def\indexbackslash{\realbackslash}%
+ \def\indexatchar{\@}%
\writetocentry{idxinitial}{\asis #1}{IDX\the\idxinitialno}%
% The @asis removes a pair of braces around e.g. {@indexatchar} that
% are output by texindex.
%
- \vbox to 0pt{}%
- % This vbox fixes the \pdfdest location for double column formatting.
- % Without it, the \pdfdest is output above topskip glue at the top
- % of a column as this glue is not added until the first box.
\pdfmkdest{idx.\asis #1.IDX\the\idxinitialno}%
\fi
}
@@ -5704,16 +5733,18 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\newdimen\entrycontskip
\entrycontskip=1em
-% for PDF output, whether to make the text of the entry a link to the page
-% number. set for @contents and @shortcontents where there is only one
-% page number.
+% for PDF output, whether to make the text of the entry a link to the section.
+% set for @contents and @shortcontents.
\newif\iflinkentrytext
-% \entry typesets a paragraph consisting of the text (#1), dot leaders, and
-% then page number (#2) flushed to the right margin. It is used for index
-% and table of contents entries. The paragraph is indented by \leftskip.
-% If \tocnodetarget is set, link text to the referenced node.
-\def\entry{%
+% \entryinternal typesets a paragraph consisting of the text (#1), dot
+% leaders, and then page number (#2) flushed to the right margin. It is
+% used for index and table of contents entries. The paragraph is indented
+% by \leftskip.
+% For PDF output, if \linkentrytexttrue and \tocnodetarget is set, link text
+% to the referenced node. Else if \entrypagetarget is set, link text to the
+% page.
+\def\entryinternal{%
\begingroup
%
% Start a new paragraph if necessary, so our assignments below can't
@@ -5761,7 +5792,11 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\endlink
\fi
\else
- \unhbox\boxA
+ \ifx\entrypagetarget\empty
+ \unhbox\boxA
+ \else
+ \pdflinkpage{\entrypagetarget}{\unhbox\boxA}%
+ \fi
\fi
\else
\unhbox\boxA
@@ -6433,6 +6468,10 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\parseargdef\subsubheading{\sectionheading{#1}{subsubsec}{Yomitfromtoc}{}
\suppressfirstparagraphindent}
+% @xrefname - give text with printed name for linking to node and allow
+% referencing node, but do not print any heading.
+\parseargdef\xrefname{\donoderef{Yomitfromtoc}{#1}}%
+
% These macros generate a chapter, section, etc. heading only
% (including whitespace, linebreaking, etc. around it),
% given all the information in convenient, parsed form.
@@ -6554,11 +6593,6 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\chapfonts \rm
\let\footnote=\errfootnoteheading % give better error message
%
- % Have to define \currentsection before calling \donoderef, because the
- % xref code eventually uses it. On the other hand, it has to be called
- % after \pchapsepmacro, or the headline will change too soon.
- \gdef\currentsection{#1}%
- %
% Only insert the separating space if we have a chapter/appendix
% number, and don't print the unnumbered ``number''.
\ifx\temptype\Ynothingkeyword
@@ -6585,7 +6619,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
% been typeset. If the destination for the pdf outline is after the
% text, then jumping from the outline may wind up with the text not
% being visible, for instance under high magnification.
- \donoderef{#2}%
+ \donoderef{#2}{#1}%
%
% Typeset the actual heading.
\nobreak % Avoid page breaks at the interline glue.
@@ -6701,21 +6735,17 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\ifx\temptype\Ynothingkeyword
\setbox0 = \hbox{}%
\def\toctype{unn}%
- \gdef\currentsection{#1}%
\else\ifx\temptype\Yomitfromtockeyword
- % for @headings -- no section number, don't include in toc,
- % and don't redefine \currentsection.
+ % for @headings -- no section number, don't include in toc.
\setbox0 = \hbox{}%
\def\toctype{omit}%
\let\sectionlevel=\empty
\else\ifx\temptype\Yappendixkeyword
\setbox0 = \hbox{#4\enspace}%
\def\toctype{app}%
- \gdef\currentsection{#1}%
\else
\setbox0 = \hbox{#4\enspace}%
\def\toctype{num}%
- \gdef\currentsection{#1}%
\fi\fi\fi
%
% Write the toc entry (before \donoderef). See comments in \chapmacro.
@@ -6723,7 +6753,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
%
% Write the node reference (= pdf destination for pdftex).
% Again, see comments in \chapmacro.
- \donoderef{#3}%
+ \donoderef{#3}{#1}%
%
% Interline glue will be inserted when the vbox is completed.
% That glue will be a valid breakpoint for the page, since it'll be
@@ -6955,6 +6985,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
%
\def\contents{%
\startcontents{\putwordTOC}{\contentsmkdest}%
+ \ifxetex\xetexpreauxfile\fi
\openin 1 \tocreadfilename\space
\ifeof 1 \else
\findsecnowidths
@@ -6966,6 +6997,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\pdfmakeoutlines
\fi
\closein 1
+ \ifxetex\xetexpostauxfile\fi
\endgroup
\contentsendroman
}
@@ -6999,11 +7031,13 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\let\numsubsubsecentry = \numsecentry
\let\appsubsubsecentry = \numsecentry
\let\unnsubsubsecentry = \numsecentry
+ \ifxetex\xetexpreauxfile\fi
\openin 1 \tocreadfilename\space
\ifeof 1 \else
\readtocfile
\fi
\closein 1
+ \ifxetex\xetexpostauxfile\fi
\vfill \eject
\contentsalignmacro % in case @setchapternewpage odd is in effect
\endgroup
@@ -7167,6 +7201,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\extrasecnoskip=0pt
\let\tocnodetarget\empty
+\let\entrypagetarget\empty
% \tocentry{TITLE}{SEC NO}{NODE}{PAGE}
%
@@ -7174,7 +7209,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\def\tocnodetarget{#3}%
\def\secno{#2}%
\ifx\empty\secno
- \entry{#1}{#4}%
+ \entryinternal{#1}{#4}%
\else
\ifdim 0pt=\secnowidth
\setbox0=\hbox{#2\hskip\labelspace\hskip\extrasecnoskip}%
@@ -7185,7 +7220,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
#2\hskip\labelspace\hskip\extrasecnoskip\hfill}%
\fi
\entrycontskip=\wd0
- \entry{\box0 #1}{#4}%
+ \entryinternal{\box0 #1}{#4}%
\fi
}
\newdimen\labelspace
@@ -8170,18 +8205,11 @@ might help (with 'rm \jobname.?? \jobname.??s')%
}
\fi
-\let\E=\expandafter
-
% Used at the time of macro expansion.
% Argument is macro body with arguments substituted
\def\scanmacro#1{%
\newlinechar`\^^M
- % expand the expansion of \eatleadingcr twice to maybe remove a leading
- % newline (and \else and \fi tokens), then call \eatspaces on the result.
- \def\xeatspaces##1{%
- \E\E\E\E\E\E\E\eatspaces\E\E\E\E\E\E\E{\eatleadingcr##1%
- }}%
- \def\xempty##1{}%
+ \def\xeatspaces##1{\eatleadingcrthen\eatspaces{##1}}%
%
% Process the macro body under the current catcode regime.
\scantokens{#1@comment}%
@@ -8234,10 +8262,12 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\unbrace{\gdef\trim@@@ #1 } #2@{#1}
}
-{\catcode`\^^M=\other%
-\gdef\eatleadingcr#1{\if\noexpand#1\noexpand^^M\else\E#1\fi}}%
-% Warning: this won't work for a delimited argument
-% or for an empty argument
+% Trim a single leading ^^M off a string, then call #1
+{\catcode`\^^M=\active \catcode`\Q=3%
+\gdef\eatleadingcrthen #1#2{\eatlcra #1Q#2Q^^MQ}%
+\gdef\eatlcra #1#2Q^^M{\eatlcrb #1#2Q}%
+\gdef\eatlcrb #1Q#2Q#3Q{#1{#2}}%
+}
% Trim a single trailing ^^M off a string.
{\catcode`\^^M=\other \catcode`\Q=3%
@@ -8373,6 +8403,10 @@ might help (with 'rm \jobname.?? \jobname.??s')%
% is #, then the preceding argument is delimited by
% an opening brace, and that opening brace is not consumed.
+% Make @ a letter, so that we can make private-to-Texinfo macro names.
+\edef\texiatcatcode{\the\catcode`\@}
+\catcode `@=11\relax
+
% Parse the optional {params} list to @macro or @rmacro.
% Set \paramno to the number of arguments,
% and \paramlist to a parameter text for the macro (e.g. #1,#2,#3 for a
@@ -8385,14 +8419,13 @@ might help (with 'rm \jobname.?? \jobname.??s')%
% That gets used by \mbodybackslash (above).
%
% If there are 10 or more arguments, a different technique is used: see
-% \parsemmanyargdef.
+% \parsemmanyargdef@@.
%
\def\parsemargdef#1;{%
\paramno=0\def\paramlist{}%
\let\hash\relax
% \hash is redefined to `#' later to get it into definitions
\let\xeatspaces\relax
- \let\xempty\relax
\parsemargdefxxx#1,;,%
\ifnum\paramno<10\relax\else
\paramno0\relax
@@ -8404,11 +8437,9 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\else \let\next=\parsemargdefxxx
\advance\paramno by 1
\expandafter\edef\csname macarg.\eatspaces{#1}\endcsname
- {\xeatspaces{\hash\the\paramno\noexpand\xempty{}}}%
+ {\xeatspaces{\hash\the\paramno}}%
\edef\paramlist{\paramlist\hash\the\paramno,}%
\fi\next}
-% the \xempty{} is to give \eatleadingcr an argument in the case of an
-% empty macro argument.
% \parsemacbody, \parsermacbody
%
@@ -8419,14 +8450,12 @@ might help (with 'rm \jobname.?? \jobname.??s')%
% body to be transformed.
% Set \macrobody to the body of the macro, and call \macrodef.
%
+\catcode `\@\texiatcatcode
{\catcode`\ =\other\long\gdef\parsemacbody#1@end macro{%
\xdef\macrobody{\eatcr{#1}}\endgroup\macrodef}}%
{\catcode`\ =\other\long\gdef\parsermacbody#1@end rmacro{%
\xdef\macrobody{\eatcr{#1}}\endgroup\macrodef}}%
-
-% Make @ a letter, so that we can make private-to-Texinfo macro names.
-\edef\texiatcatcode{\the\catcode`\@}
-\catcode `@=11\relax
+\catcode `\@=11\relax
%%%%%%%%%%%%%% Code for > 10 arguments only %%%%%%%%%%%%%%%%%%
@@ -8687,15 +8716,13 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\noexpand\expandafter
\expandafter\noexpand\csname\the\macname @@\endcsname}%
\expandafter\xdef\csname\the\macname @@\endcsname##1{%
- \noexpand\passargtomacro
- \expandafter\noexpand\csname\the\macname @@@\endcsname{##1,}}%
+ \noexpand\passargtomacro
+ \expandafter\noexpand\csname\the\macname @@@\endcsname{##1,}}%
\expandafter\xdef\csname\the\macname @@@\endcsname##1{%
- \expandafter\noexpand\csname\the\macname @@@@\endcsname ##1}%
- \expandafter\expandafter
- \expandafter\xdef
- \expandafter\expandafter
- \csname\the\macname @@@@\endcsname\paramlist{%
- \endgroup\noexpand\scanmacro{\macrobody}}%
+ \expandafter\noexpand\csname\the\macname @@@@\endcsname ##1}%
+ \expandaftergroup{\expandafter\xdef\csname\the\macname @@@@\endcsname}%
+ \paramlist{%
+ \endgroup\noexpand\scanmacro{\macrobody}}%
\else % 10 or more:
\expandafter\xdef\csname\the\macname\endcsname{%
\noexpand\getargvals@{\the\macname}{\argl}%
@@ -8707,6 +8734,16 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\catcode `\@\texiatcatcode\relax % end private-to-Texinfo catcodes
+% utility definition to avoid excessive use of \expandafter. call
+% as \expandaftergroup{CONTENT}\WORD to expand \WORD exactly once and remove
+% braces around CONTENT.
+\def\expandaftergroup#1#2{%
+ \expandafter\expandaftergroupx\expandafter{#2}{#1}%
+}
+\def\expandaftergroupx#1#2{%
+ #2#1%
+}
+
\def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}}
@@ -8876,9 +8913,8 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\expandafter\noexpand
\csname\the\macname @@@\endcsname##1\noexpand\endlinemacro
}
- \expandafter\expandafter
- \expandafter\xdef
- \expandafter\expandafter\csname\the\macname @@@\endcsname\paramlist{%
+ \expandaftergroup{\expandafter\xdef\csname\the\macname @@@\endcsname}%
+ \paramlist{%
\newlinechar=13 % split \macrobody into lines
\noexpand\scantokens{\macrobody}%
}
@@ -8953,11 +8989,11 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\let\lastnode=\empty
% Write a cross-reference definition for the current node. #1 is the
-% type (Ynumbered, Yappendix, Ynothing).
+% type (Ynumbered, Yappendix, Ynothing). #2 is the section title.
%
-\def\donoderef#1{%
+\def\donoderef#1#2{%
\ifx\lastnode\empty\else
- \setref{\lastnode}{#1}%
+ \setref{\lastnode}{#1}{#2}%
\global\let\lastnode=\empty
\setnodeseenonce
\fi
@@ -8978,21 +9014,28 @@ might help (with 'rm \jobname.?? \jobname.??s')%
%
\def\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi}
\def\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi}
-\def\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces}
+\def\anchor#1{%
+ \savesf \setref{#1}{Yanchor}{#1}\restoresf \ignorespaces
+}
-% \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an
-% anchor), which consists of three parts:
-% 1) NAME-title - the current sectioning name taken from \currentsection,
-% or the anchor name.
-% 2) NAME-snt - section number and type, passed as the SNT arg, or
-% empty for anchors.
+% @namedanchor{NAME, XREFNAME} -- define xref target at arbitrary point
+% with label text for cross-references to it.
+\def\namedanchor#1{\donamedanchor#1\finish}%
+\def\donamedanchor#1,#2\finish{%
+ \savesf \setref{#1}{Yanchor}{\ignorespaces #2\unskip}\restoresf \ignorespaces
+}
+
+% \setref{NAME}{SNT}{TITLE} defines a cross-reference point NAME (a node
+% or an anchor), which consists of three parts:
+% 1) NAME-title - the current sectioning name
+% 2) NAME-snt - section number and type, passed as the SNT arg.
% 3) NAME-pg - the page number.
%
% This is called from \donoderef, \anchor, and \dofloat. In the case of
% floats, there is an additional part, which is not written here:
% 4) NAME-lof - the text as it should appear in a @listoffloats.
%
-\def\setref#1#2{%
+\def\setref#1#2#3{%
\pdfmkdest{#1}%
\iflinks
{%
@@ -9004,7 +9047,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef
##1}{##2}}% these are parameters of \writexrdef
}%
- \toks0 = \expandafter{\currentsection}%
+ \toks0 = {#3}%
\immediate \writexrdef{title}{\the\toks0 }%
\immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc.
\safewhatsit{\writexrdef{pg}{\folio}}% will be written later, at \shipout
@@ -9058,15 +9101,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\setbox\infofilenamebox = \hbox{\infofilename\unskip}%
%
\startxreflink{#1}{#4}%
- {%
- % Have to otherify everything special to allow the \csname to
- % include an _ in the xref name, etc.
- \indexnofonts
- \turnoffactive
- \def\value##1{##1}%
- \expandafter\global\expandafter\let\expandafter\Xthisreftitle
- \csname XR#1-title\endcsname
- }%
+ \getrefx{#1-title}\Xthisreftitle
%
% Float references are printed completely differently: "Figure 1.2"
% instead of "[somenode], p.3". \iffloat distinguishes them by
@@ -9099,21 +9134,23 @@ might help (with 'rm \jobname.?? \jobname.??s')%
% Cross-manual reference with a printed manual name.
%
\crossmanualxref{\cite{\printedmanual\unskip}}%
- %
\else\ifdim \wd\infofilenamebox > 0pt
% Cross-manual reference with only an info filename (arg 4), no
% printed manual name (arg 5). This is essentially the same as
% the case above; we output the filename, since we have nothing else.
%
\crossmanualxref{\code{\infofilename\unskip}}%
- %
\else
% Reference within this manual.
%
- % Only output a following space if the -snt ref is nonempty, as the ref
- % will be empty for @unnumbered and @anchor.
- \setbox2 = \hbox{\ignorespaces \refx{#1-snt}}%
- \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi
+ % Only output a following space if the -snt ref is nonempty, as is
+ % the case for @unnumbered and @anchor.
+ \getrefx{#1-snt}\tmp
+ \ifx\tmp\empty\else
+ \ifx\tmp\Yanchor\else
+ \tmp\space
+ \fi
+ \fi
%
% output the `[mynode]' via the macro below so it can be overridden.
\xrefprintnodename\printedrefname
@@ -9169,7 +9206,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\else
% Otherwise just copy the Info node name.
\def\printedrefname{\ignorespaces #1}%
- \fi%
+ \fi
\fi
\fi
\fi
@@ -9201,7 +9238,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\ifnum\filenamelength>0
goto file{\the\filename.pdf} name{\pdfdestname}%
\else
- goto name{\pdfmkpgn{\pdfdestname}}%
+ goto name{\pdfdestname}%
\fi
\else % XeTeX
\ifnum\filenamelength>0
@@ -9281,6 +9318,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
%
\def\Ynothing{}
\def\Yomitfromtoc{}
+\def\Yanchor{\isanchor} \let\isanchor\relax
\def\Ynumbered{%
\ifnum\secno=0
\putwordChapter@tie \the\chapno
@@ -9307,14 +9345,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
% \refx{NAME} - reference a cross-reference string named NAME.
\def\refx#1{%
- \requireauxfile
- {%
- \indexnofonts
- \turnoffactive
- \def\value##1{##1}%
- \expandafter\global\expandafter\let\expandafter\thisrefX
- \csname XR#1\endcsname
- }%
+ \getrefx{#1}\thisrefX
\ifx\thisrefX\relax
% If not defined, say something at least.
\angleleft un\-de\-fined\angleright
@@ -9335,6 +9366,17 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\fi
}
+% Set #2 to xref string #1
+\def\getrefx#1#2{%
+ \requireauxfile
+ {%
+ \indexnofonts
+ \turnoffactive
+ \def\value##1{##1}%
+ \expandafter\global\expandafter\let\expandafter#2\csname XR#1\endcsname
+ }%
+}
+
% This is the macro invoked by entries in the aux file. Define a control
% sequence for a cross-reference target (we prepend XR to the control sequence
% name to avoid collisions). The value is the page number. If this is a float
@@ -9399,12 +9441,14 @@ might help (with 'rm \jobname.?? \jobname.??s')%
% Read the last existing aux file, if any. No error if none exists.
%
\def\tryauxfile{%
+ \ifxetex\xetexpreauxfile\fi
\openin 1 \jobname.aux
\ifeof 1 \else
\readdatafile{aux}%
\global\havexrefstrue
\fi
\closein 1
+ \ifxetex\xetexpostauxfile\fi
}
\def\setupdatafile{%
@@ -9790,14 +9834,15 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\global\advance\floatno by 1
%
{%
- % This magic value for \currentsection is output by \setref as the
- % XREFLABEL-title value. \xrefX uses it to distinguish float
+ % This magic value for the third argument of \setref is output as
+ % the XREFLABEL-title value. \xrefX uses it to distinguish float
% labels (which have a completely different output format) from
% node and anchor labels. And \xrdef uses it to construct the
% lists of floats.
%
- \edef\currentsection{\floatmagic=\safefloattype}%
- \setref{\floatlabel}{Yfloat}%
+ \edef\tmp{\noexpand\setref{\floatlabel}{Yfloat}%
+ {\floatmagic=\safefloattype}}%
+ \tmp
}%
\fi
%
@@ -9919,7 +9964,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
% #1 is the control sequence we are passed; we expand into a conditional
% which is true if #1 represents a float ref. That is, the magic
-% \currentsection value which we \setref above.
+% value which we passed to \setref above.
%
\def\iffloat#1{\expandafter\doiffloat#1==\finish}
%
@@ -9976,6 +10021,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\toksA = \expandafter{\csname XR#1-lof\endcsname}%
%
% use the same \entry macro we use to generate the TOC and index.
+ \let\entry\entryinternal
\edef\writeentry{\noexpand\entry{\the\toksA}{\csname XR#1-pg\endcsname}}%
\writeentry
}}
@@ -10071,17 +10117,24 @@ directory should work if nowhere else does.}
\fi
\fi
+\let\xetexpreauxfile\relax
+\let\xetexpostauxfile\relax
+
% Set I/O by bytes instead of UTF-8 sequence for XeTeX and LuaTex
% for non-UTF-8 (byte-wise) encodings.
%
\def\setbytewiseio{%
\ifxetex
- \XeTeXdefaultencoding "bytes" % For subsequent files to be read
- \XeTeXinputencoding "bytes" % For document root file
- % Unfortunately, there seems to be no corresponding XeTeX command for
- % output encoding. This is a problem for auxiliary index and TOC files.
- % The only solution would be perhaps to write out @U{...} sequences in
- % place of non-ASCII characters.
+ % For document root file
+ \XeTeXinputencoding "bytes"
+ %
+ % Setting for subsequent files to be read with @include.
+ \XeTeXdefaultencoding "bytes"
+ %
+ % Use UTF-8 for reading auxiliary index and TOC files, which are
+ % always output in UTF-8 with XeTeX.
+ \def\xetexpreauxfile{\XeTeXdefaultencoding "UTF-8"}%
+ \def\xetexpostauxfile{\XeTeXdefaultencoding "bytes"}%
\fi
\ifluatex
@@ -10713,12 +10766,12 @@ directory should work if nowhere else does.}
% Suppress ligature creation from adjacent characters.
\ifluatex
- \def\nolig{{}}
-\else
% Braces do not suppress ligature creation in LuaTeX, e.g. in of{}fice
% to suppress the "ff" ligature. Using a kern appears to be the only
% workaround.
\def\nolig{\kern0pt{}}
+\else
+ \def\nolig{{}}
\fi
% https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_M
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi
index a22e514f055..c3af74ea1df 100644
--- a/doc/misc/tramp.texi
+++ b/doc/misc/tramp.texi
@@ -6769,6 +6769,15 @@ the following settings are required:
@end group
@end lisp
+@vindex warning-suppress-types
+@value{tramp} warnings are displayed in the @file{*Warnings*} buffer,
+which pops up. If you don't want to see this buffer for every
+@value{tramp} warning, set @code{warning-suppress-types}:
+
+@lisp
+(setq warning-suppress-types '((tramp)))
+@end lisp
+
If @code{tramp-verbose} is greater than or equal to 10, Lisp
backtraces are also added to the @value{tramp} debug buffer in case of
errors.
diff --git a/doc/misc/use-package.texi b/doc/misc/use-package.texi
index c8630cee1c9..2f980df9f45 100644
--- a/doc/misc/use-package.texi
+++ b/doc/misc/use-package.texi
@@ -1471,7 +1471,7 @@ faces. Example:
(use-package example
:custom-face
(example-1-face ((t (:foreground "LightPink"))))
- (example-2-face ((t (:foreground "LightGreen"))) face-defspec-spec))
+ (example-2-face ((t (:foreground "LightGreen")))))
@end group
@group
@@ -1486,6 +1486,11 @@ faces. Example:
@end group
@end lisp
+Similarly to @code{:custom} (@pxref{User options}), this allows
+configuring customizable faces outside of Customize (@pxref{Saving
+Customizations,,, emacs, GNU Emacs Manual}). Using both systems to
+configure the same face can lead to confusing results.
+
@node Hiding minor modes
@section Hiding minor modes with diminish and delight
@cindex hiding minor modes
diff --git a/etc/DEBUG b/etc/DEBUG
index 546ff362b0a..ce9fe6f921c 100644
--- a/etc/DEBUG
+++ b/etc/DEBUG
@@ -19,11 +19,11 @@ such as --prefix):
./configure --enable-checking='yes,glyphs' --enable-check-lisp-object-type \
CFLAGS='-O0 -g3'
-The -O0 flag is important, as debugging optimized code can be hard.
-If the problem happens only with optimized code, you may need to
-enable optimizations. If that happens, try using -Og first instead of
--O2, as -Og disables some optimizations that make debugging some code
-exceptionally hard.
+The -O0 flag is important, as debugging optimized code can be hard, even
+in the case that the -Og compiler option is used.[1] If the problem
+happens only with optimized code, you may need to enable optimizations.
+If that happens, try using -Og first instead of -O2, as -Og disables
+some optimizations that make debugging some code exceptionally hard.
Older versions of GCC may need more than just the -g3 flag. For more,
search for "analyze failed assertions" below.
@@ -38,6 +38,9 @@ this below under "Debugging Emacs redisplay problems".
Emacs needs not be installed to be debugged, you can debug the binary
created in the 'src' directory.
+[1] gcc's -Og has some known problems and limitations, documented here:
+ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78685
+
*** Configuring GDB
To start GDB to debug Emacs, you can simply type "gdb ./emacs RET" at
diff --git a/etc/EGLOT-NEWS b/etc/EGLOT-NEWS
index 7b53d5943ba..6505a6d8567 100644
--- a/etc/EGLOT-NEWS
+++ b/etc/EGLOT-NEWS
@@ -47,6 +47,13 @@ The composition of Eglot's mode line can be fully customized by adding
or removing symbols and strings from the customizable variable
'eglot-mode-line-format'
+** Improved diagnostic-reporting performance and bugfixes (bug#77588)
+
+Eglot remembers the LSP document version to which diagonstics reported
+by the LSP server pertain. This helps in skipping useless or harmful
+updates, avoiding flakiness with code actions and flickering overlays
+when the buffer is changed.
+
* Changes in Eglot 1.18 (20/1/2025)
diff --git a/etc/NEWS b/etc/NEWS
index dc77aff7ef2..e080d8ed3a2 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -30,9 +30,9 @@ The traditional unexec dumper, deprecated since Emacs 27, has been
removed.
---
-** Emacs's old ctags program is no longer built or installed.
+** Emacs's old 'ctags' program is no longer built or installed.
You are encouraged to use Universal Ctags instead.
-For now, to get the old ctags behavior you can can run 'etags --ctags'
+For now, to get the old 'ctags' behavior you can can run 'etags --ctags'
or use a shell script named 'ctags' that runs 'etags --ctags "$@"'.
---
@@ -64,6 +64,9 @@ init file.
* Changes in Emacs 31.1
+** 'prettify-symbols-mode' attempts to ignore undisplayable characters.
+Previously, such characters would be rendered as, e.g., white boxes.
+
+++
** 'standard-display-table' now has more extra slots.
'standard-display-table' has been extended to allow specifying glyphs
@@ -216,22 +219,25 @@ popup interface, such as the interfaces that the GNU ELPA packages Corfu
and Company provide, you can set this option to the same sort function
that your popup interface uses for a more integrated experience.
-Note: 'completion-preview-sort-function' was present also in Emacs 30.1,
-albeit as a variable, not a user option.
+('completion-preview-sort-function' was already present in Emacs 30.1,
+but as a plain Lisp variable, not a user option.)
** Windows
+++
-*** New functions to modify window layout.
-Several functions to modify the window layout have been added:
-'rotate-window-layout-clockwise', 'rotate-window-layout-anticlockwise',
-'flip-window-layout-vertically', 'flip-window-layout-horizontally',
-'transpose-window-layout', 'rotate-windows', and 'rotate-windows-back'.
+*** New commands to modify window layouts.
+
+- 'C-x w t' and 'C-x w r /' rotate the window layout.
+- 'C-x w o /' rotate the windows within the current layout.
+- 'C-x w f ///' flip window layouts.
+
+By default, these commands operate on the selected frame's root window.
+With a prefix argument, they operate on the selected window's parent.
+++
*** Windmove commands now move to skipped windows if invoked twice in a row.
The new user option 'windmove-allow-repeated-command-override' controls
-this behavior: if it's non-nil, invoking the same windmove command twice
+this behavior: if it is non-nil, invoking the same windmove command twice
overrides the 'no-other-window' property, allowing navigation to windows
that would normally be skipped. The default is t; customize it to nil
if you want the old behavior.
@@ -304,14 +310,16 @@ window whose buffer shares text with the buffer to display.
*** New variable 'window-state-normalize-buffer-name'.
When bound to non-nil, 'window-state-get' will normalize 'uniquify'
managed buffer names by removing 'uniquify' prefixes and suffixes. This
-helps restore window buffers across Emacs sessions.
+helps to restore window buffers across Emacs sessions.
** Frames
+++
*** New function 'frame-deletable-p'.
-Calling this function before 'delete-frame' is useful to avoid that the
-latter throws an error when the argument FRAME cannot be deleted.
+If this function returns nil, the following call to 'delete-frame' might
+fail to delete its argument FRAME or might signal an error. It is
+therefore advisable to use this function as part of a condition that
+determines whether to call 'delete-frame'.
+++
*** New value 'force' for user option 'frame-inhibit-implied-resize'.
@@ -319,6 +327,20 @@ This will inhibit implied resizing while a new frame is made and can be
useful on tiling window managers where the initial frame size should be
specified by external means.
+** Mode Line
+
++++
+*** New user option 'mode-line-collapse-minor-modes'.
+If non-nil, minor mode lighters on the mode line are collapsed into a
+single button. The value could also be a list to specify minor mode
+lighters to hide or show. The default value is nil, which retains the
+previous behavior of showing all minor mode lighters.
+
+*** New user option 'mode-line-modes-delimiters'.
+This option allows changing or removing the delimiters shown around
+the major mode and list of minor modes in the mode line. The default
+retains the existing behavior of inserting parentheses.
+
** Tab Bars and Tab Lines
---
@@ -360,12 +382,12 @@ docstring for arguments passed to a help-text function.
---
*** New command 'project-root-find-file'.
-It is equivalent to running ‘project-any-command’ with ‘find-file’.
+It is equivalent to running 'project-any-command' with 'find-file'.
---
*** New command 'project-customize-dirlocals'.
-It is equivalent to running ‘project-any-command’ with
-‘customize-dirlocals’.
+It is equivalent to running 'project-any-command' with
+'customize-dirlocals'.
---
*** Improved prompt for 'project-switch-project'.
@@ -435,8 +457,8 @@ doesn't already mention 'setopt', the 'describe-variable' command will
now add a note about this automatically.
+++
-** New user option 'eldoc-help-at-pt' to show help at point via Eldoc.
-When enabled, display the 'help-at-pt-kbd-string' via Eldoc. This
+** New user option 'eldoc-help-at-pt' to show help at point via ElDoc.
+When enabled, display the 'help-at-pt-kbd-string' via ElDoc. This
setting is an alternative to 'help-at-pt-display-when-idle'.
@@ -474,10 +496,14 @@ Additionally, there is a general-purpose 'haudenosaunee-postfix' input
method to facilitate writing in the orthographies of the five languages
simultaneously.
+---
+*** New input methods for languages based on Burmese.
+These include: Burmese, Burmese (visual order), Shan, and Mon.
+
---
** 'visual-wrap-prefix-mode' now supports variable-pitch fonts.
When using 'visual-wrap-prefix-mode' in buffers with variable-pitch
-fonts, the wrapped text will now be lined up correctly so that it's
+fonts, the wrapped text will now be lined up correctly so that it is
exactly below the text after the prefix on the first line.
---
@@ -520,7 +546,7 @@ based on the state of the buffer, such as for the different states of
modal editing packages.
** New user variable 'exchange-point-and-mark-highlight-region'.
-When set to nil, this modifies `exchange-point-and-mark' so that it doesn't
+When set to nil, this modifies 'exchange-point-and-mark' so that it doesn't
activate the mark if it is not already active.
The default value is t, which retains the old behavior.
This variable has no effect when Transient Mark mode is off.
@@ -528,9 +554,215 @@ This variable has no effect when Transient Mark mode is off.
* Changes in Specialized Modes and Packages in Emacs 31.1
+** Tree-sitter
+
+*** New user option 'treesit-auto-install-grammar'.
+It controls the automatic installation of tree-sitter grammar libraries
+needed for tree-sitter based modes, if these grammar libraries are not
+available when such modes are turned on.
+
+*** The file treesit-x.el defines a number of simple tree-sitter modes.
+Using the new macro 'define-treesit-generic-mode', generic modes are
+defined including, but not limited to, 'gitattributes-generic-ts-mode'.
+Visiting a file in such mode asks for confirmation before installing
+its tree-sitter grammar. Then it highlights the visited file
+according to the syntax defined by the grammar.
+
+*** New command 'treesit-cycle-sexp-type'.
+It cycles the type of navigation for commands that move across sexp's
+and lists, such as 'treesit-forward-sexp', 'treesit-forward-list',
+'treesit-down-list', and 'treesit-up-list'. The type can be either
+'list', the default, or 'sexp'.
+With the default 'list' type these commands move using syntax tables for
+symbols and using the thing 'list' for lists.
+With the 'sexp' type these commands move across nodes defined by
+the tree-sitter thing 'sexp' in 'treesit-thing-settings'.
+
++++
+*** Indirect buffers can have their own parser list.
+Before, indirect buffers share their base buffer’s parser list and
+parsers. Now they can have their own parser list.
+
++++
+*** New variable 'treesit-language-remap-alist'.
+This variable allows a user to remap one language into another, such
+that creating a parser for language A actually creates a parser for
+language B. By extension, any font-lock rules or indentation rules for
+language A will be applied to language B instead.
+
+This is useful for reusing font-lock rules and indentation rules of
+language A for language B, when language B is a strict superset of
+language A.
+
++++
+*** New accessor functions for each setting in 'treesit-font-lock-settings'.
+Now users can access a setting's query, feature, enable flag, and
+override flag by 'treesit-font-lock-setting-query',
+'treesit-font-lock-setting-feature', 'treesit-font-lock-setting-enable',
+and 'treesit-font-lock-setting-override'.
+
+*** New tree-sitter thing 'list'.
+Unlike the existing thing 'sexp' that defines both lists and atoms,
+'list' defines only lists to be navigated by 'forward-sexp'.
+The new function 'treesit-forward-sexp-list' uses 'list'
+to move across lists. But to move across atoms inside the list
+it uses 'forward-sexp-default-function'.
+
+*** New tree-sitter based functions for moving by lists.
+If a major mode defines 'list' in 'treesit-thing-settings',
+tree-sitter setup for these modes sets 'forward-list-function' to
+'treesit-forward-list', 'up-list-function' to 'treesit-up-list', and
+'down-list-function' to 'treesit-down-list'. This enables the
+'forward-list', 'up-list', and 'down-list' motion commands for those
+modes.
+
+*** Tree-sitter enabled modes now properly support 'show-paren-mode'.
+They do that by letting 'show-paren-mode' use the results of parsing by
+the tree-sitter library. The new function 'treesit-show-paren-data' is
+used to communicate the tree-sitter parsing results to 'show-paren-mode'.
+
+*** Tree-sitter enabled modes now properly support 'hs-minor-mode'.
+All commands from hideshow.el can selectively display blocks
+defined by the new tree-sitter thing 'list'.
+
+*** New tree-sitter thing 'comment'.
+The new variable 'forward-comment-function' is set to the new function
+'treesit-forward-comment' if a major mode defines the thing 'comment'.
+
++++
+*** New function 'treesit-language-display-name'.
+This new function returns the display name of a language given the
+language symbol. For example, 'cpp' is translated to "C++". A new
+variable 'treesit-language-display-name-alist' holds the translations of
+language symbols where that translation is not trivial.
+
+*** New function 'treesit-merge-font-lock-feature-list'.
+This function merges two tree-sitter font-lock feature lists. It
+returns a new font-lock feature list with no duplicates in the same
+level. It can be used to merge font-lock feature lists in a
+multi-language major mode.
+
+*** New function 'treesit-replace-font-lock-feature-settings'.
+Given two tree-sitter font-lock settings, it replaces the feature in the
+second font-lock settings with the same feature in the first font-lock
+settings. In a multi-language major mode it is sometimes necessary to
+replace features from one of the major modes with others, that are
+better suited to the new multilingual context.
+
+*** New function 'treesit-simple-indent-modify-rules'.
+Given two tree-sitter indent rules, it replaces, adds, or prepends rules
+in the old rules with new ones, then returns the modified rules. In a
+multi-language major mode it is sometimes necessary to modify rules from
+one of the major modes to better suit the new multilingual context.
+
++++
+*** New variable 'treesit-aggregated-simple-imenu-settings'.
+This variable allows major modes to setup Imenu for multiple languages.
+
++++
+*** New variable 'treesit-aggregated-outline-predicate'.
+This variable allows major modes to setup 'outline-minor-mode'
+for multiple languages.
+
+*** New function 'treesit-simple-indent-add-rules'.
+This new function makes it easier to customize indent rules for
+tree-sitter modes.
+
+*** New variable 'treesit-simple-indent-override-rules'.
+Users can customize this variable to add simple custom indentation rules
+for tree-sitter major modes.
+
++++
+*** 'treesit-language-at-point-function' is now optional.
+Multi-language major modes can rely on the default return value from
+'treesit-language-at' that uses the new function 'treesit-parsers-at'.
+
++++
+*** New command 'treesit-explore'.
+This command replaces 'treesit-explore-mode'. It turns on
+'treesit-explore-mode' if it is not on, and pops up the explorer buffer
+if it is already on.
+
++++
+*** 'treesit-explore-mode' now supports local parsers.
+Now 'treesit-explore-mode' (or 'treesit-explore') prompts for a parser
+rather than a language, and it is now possible to select a local parser
+at point to explore.
+
+** C-ts mode
+
++++
+*** New user option 'c-ts-mode-enable-doxygen'.
+By default, this is nil, and the Doxygen comment blocks in C/C++ sources
+are highlighted like other comments. When non-nil, Doxygen comment
+blocks are syntax-highlighted if the Doxygen grammar library is
+available.
+
+** Go-ts mode
+
++++
+*** New unit test commands.
+Three new commands are now available to run unit tests.
+
+The 'go-ts-mode-test-function-at-point' command runs the unit test at
+point. If a region is active, it runs all the unit tests under the
+region. It is bound to 'C-c C-t t' in 'go-ts-mode'.
+
+The 'go-ts-mode-test-this-file' command runs all unit tests in the current
+file. It is bound to 'C-c C-t f' in 'go-ts-mode'.
+
+The 'go-ts-mode-test-this-package' command runs all unit tests under the
+package of the current buffer. It is bound to 'C-c C-t p' in 'go-ts-mode'.
+
+The 'go-ts-mode-build-tags' user option is available to set a list of
+build tags for the test commands.
+
+The 'go-ts-mode-test-flags' user option is available to set a list of
+additional flags to pass to the go test command line.
+
+** Java-ts mode
+
++++
+*** New user option 'java-ts-mode-enable-doxygen'.
+By default, this is nil, and the Doxygen comment blocks in Java sources
+are highlighted like other comments. When non-nil, Doxygen comment
+blocks are syntax-highlighted if the Doxygen grammar library is
+available.
+
---
+*** New user option 'java-ts-mode-method-chaining-indent-offset'.
+Now method chaining is indented by 8 spaces rather than 4, and this
+option controls how much is indented for method chaining.
+
+** PHP-ts mode
+
+---
+*** 'php-ts-mode-run-php-webserver' can now accept a custom "php.ini" file.
+You can use the new optional argument CONFIG when calling
+'php-ts-mode-run-php-webserver' to pass an alternative "php.ini" file to
+the built-in Web server. Interactively, when invoked with a prefix
+argument, 'php-ts-mode-run-php-webserver' prompts for the config file as
+well as for other connection parameters.
+
+** Rust-ts mode
+
+---
+*** New user option 'rust-ts-mode-fontify-number-suffix-as-type'.
+Rust number literals may have an optional type suffix. When this option
+is non-nil, this suffix is fontified using 'font-lock-type-face'.
+
+** EIEIO
+
+---
+*** New value 'warn' for 'eieio-backward-compatibility'.
+This is the new default value and causes warnings to be emitted
+at run-time for the use of the associated deprecated features.
+'(setq eieio-backward-compatibility t)' can be used to recover
+the previous silence.
+
** Text mode
+---
*** New commands to convert between ASCII and full-width characters.
New commands 'fullwidth-region' and 'fullwidth-word' convert ASCII
characters in region or in the word at point to the corresponding
@@ -539,23 +771,25 @@ characters in CJK texts. For example, 'A' is converted to 'A', '1' is
converted to '1', etc. Companion commands 'halfwidth-region' and
'halfwidth-word' perform the opposite conversion.
----
** ASM mode
-*** 'asm-mode-set-comment-hook' is obsolete.
-You can now set `asm-comment-char' from 'asm-mode-hook' instead.
-
---
+*** 'asm-mode-set-comment-hook' is obsolete.
+You can now set 'asm-comment-char' from 'asm-mode-hook' instead.
+
** Ibuffer
+---
*** New column 'recency' in Ibuffer display.
The user option 'ibuffer-formats' configures the Ibuffer formats. Add
'recency' to the format to display the column.
+---
*** New value 'title' for the user option 'ibuffer-use-header-line'.
Display column titles in the header line if 'ibuffer-use-header-line' is
set to 'title'.
+---
*** New user option 'ibuffer-human-readable-size'.
When non-nil, buffer sizes are shown in human readable format.
@@ -565,9 +799,31 @@ The prompts 'opstring' and 'active-opstring' can now either be strings
or functions. This is useful when your prompts can benefit from dynamic
content.
+** ElDoc
+
---
+*** New ElDoc function 'elisp-eldoc-funcall-with-docstring'.
+This function includes the current function's docstring in the ElDoc
+echo area and can be used as a more detailed alternative to
+'elisp-eldoc-funcall'.
+
+---
+*** New user option 'elisp-eldoc-funcall-with-docstring-length'.
+This user option specifies how long function docstrings must be
+displayed in 'elisp-eldoc-funcall-with-docstring'. If set to 'short'
+(the default), only display the first sentence of the docstring.
+Otherwise, if set to 'full', display the full docstring.
+
+---
+*** New user option 'elisp-eldoc-docstring-length-limit'.
+This user option controls the maximum length of docstrings in character
+units that 'elisp-eldoc-funcall-with-docstring' and
+'elisp-eldoc-var-docstring-with-value' will show. By default, it is set
+to 1000 characters.
+
** Buffer Menu
+---
*** New user option 'Buffer-menu-human-readable-sizes'.
When non-nil, buffer sizes are shown in human readable format. The
default is nil, which retains the old format.
@@ -664,6 +920,14 @@ It is an alias for the 'progn' special-form.
+++
*** 'cl-gensym' is now obsolete; use 'gensym' instead.
++++
+*** New macro 'cl-with-accessors'.
+This macro is similar to 'with-slots', but uses accessor functions
+instead of slot names. It is useful when slots' accessor functions are
+used repeatedly, such as reading from a slot and then writing to that
+slot. Symbol macros are created for the accessor functions using
+'cl-symbol-macrolet', so that they can be used with 'setq' and 'setf'.
+
** Whitespace
---
@@ -713,6 +977,12 @@ Emacs exit.
** Savehist
+---
+*** The history file can be modified by external tools.
+Emacs can now handle this case gracefully by merging the external
+and internal history information.
+This feature is activated only when 'savehist-additional-variables' is nil.
+
---
*** Savehist no longer saves additional variables more than once.
If you configured 'savehist-additional-variables' with variables that
@@ -881,30 +1151,31 @@ only search in input history. If you customize it to the symbol 'dwim',
those commands search in input history only when the point is after the
last prompt.
-+++
** Mail Utils
++++
*** New user option 'mail-re-regexps'.
This contains the list of regular expressions used to match "Re:" and
international variants of it when modifying the Subject field in
replies.
-+++
** Rmail
++++
*** 'rmail-re-abbrevs' default value is now derived from 'mail-re-regexps'.
'mail-re-regexps' is a new user option that is easier to customize than
'rmail-re-abbrevs'. 'rmail-re-abbrevs' is still honored if it was
already set.
-+++
** Message
++++
*** 'message-subject-re-regexp' default value is now derived from 'mail-re-regexps'.
'mail-re-regexps' is a new user option that is easier to customize than
'message-subject-re-regexp'. 'message-subject-re-regexp' is still
honored if it was already set.
++++
*** 'message-strip-subject-re' now matches case-insensitively.
** SHR
@@ -971,51 +1242,6 @@ To get the old behavior back, add an element '(enum-open
'c-offsets-alist' likewise in any of the other ways detailed in the
"(ccmode) Config Basics" node of the CC mode manual.
-** Go-ts mode
-
-+++
-*** New unit test commands.
-Three new commands are now available to run unit tests.
-
-The 'go-ts-mode-test-function-at-point' command runs the unit test at
-point. If a region is active, it runs all the unit tests under the
-region. It is bound to 'C-c C-t t' in 'go-ts-mode'.
-
-The 'go-ts-mode-test-this-file' command runs all unit tests in the current
-file. It is bound to 'C-c C-t f' in 'go-ts-mode'.
-
-The 'go-ts-mode-test-this-package' command runs all unit tests under the
-package of the current buffer. It is bound to 'C-c C-t p' in 'go-ts-mode'.
-
-The 'go-ts-mode-build-tags' user option is available to set a list of
-build tags for the test commands.
-
-The 'go-ts-mode-test-flags' user option is available to set a list of
-additional flags to pass to the go test command line.
-
-** C-ts mode
-
-+++
-*** New user option 'c-ts-mode-enable-doxygen'.
-By default, this is nil, and the Doxygen comment blocks in C/C++ source
-are highlighted like other comments. When non-nil, Doxygen comment
-blocks are syntax-highlighted if the Doxygen grammar library is
-available.
-
-** Java-ts mode
-
-+++
-*** New user option 'java-ts-mode-enable-doxygen'.
-By default, this is nil, and the Doxygen comment blocks in Java source
-are highlighted like other comments. When non-nil, Doxygen comment
-blocks are syntax-highlighted if the Doxygen grammar library is
-available.
-
----
-*** New user option 'java-ts-mode-method-chaining-indent-offset'.
-Now method chaining is indented by 8 spaces rather than 4, and this
-variable controls how much is indented for method chaining.
-
** Emacs Lisp mode
---
@@ -1193,23 +1419,6 @@ They suggest the previous revision as the default for REV1, not the last
one as before. This makes them different from 'vc-diff' and
'vc-root-diff' when those are called without a prefix argument.
-** PHP-ts mode
-
----
-*** 'php-ts-mode-run-php-webserver' can now accept a custom "php.ini" file.
-You can use the new optional argument CONFIG when calling
-'php-ts-mode-run-php-webserver' to pass an alternative "php.ini" file to
-the built-in Web server. Interactively, when invoked with a prefix
-argument, 'php-ts-mode-run-php-webserver' prompts for the config file as
-well as for other connection parameters.
-
-** Rust-ts mode
-
----
-*** New user option 'rust-ts-mode-fontify-number-suffix-as-type'.
-Rust number literals may have an optional type suffix. When this option
-is non-nil, this suffix is fontified using 'font-lock-type-face'.
-
** Ediff
+++
@@ -1229,15 +1438,29 @@ changes when supplied with a universal prefix argument via 'C-u':
- 'C-u c b' copies all changes from buffer C to buffer B.
+++
-*** Ediff now supports more flexible custom window layouts
+*** Ediff now supports more flexible custom window layouts.
Custom implementations of 'ediff-window-setup-function' no
-longer need to display *all* ediff windows. Any of the A, B, C,
+longer need to display *all* Ediff windows. Any of the A, B, C,
and control windows can be left undisplayed and the corresponding
variable set to nil. This change enables custom layouts without
a control panel window.
** Dired
+---
+*** New user option 'dired-create-empty-file-in-current-directory'.
+When non-nil, 'dired-create-empty-file' creates a new empty file and
+adds an entry for it (or its topmost new parent directory if created)
+under the current subdirectory in the Dired buffer by default
+(otherwise, it adds the new file (and new subdirectories if provided) to
+whichever directory the user enters at the prompt). When nil,
+'dired-create-empty-file' acts on the default directory by default.
+
+Note that setting this user option to non-nil makes invoking
+'dired-create-empty-file' outside of a Dired buffer raise an error (like
+other Dired commands that always prompt with the current subdirectory,
+such as 'dired-create-directory').
+
+++
*** New user option 'dired-check-symlinks' allows disabling validity checks.
Dired uses 'file-truename' to check symbolic link validity when
@@ -1347,7 +1570,7 @@ mode. Now, one needs to say '(midnight-mode +1)' instead.
** Python mode
-*** New repeat-map for Python indentation commands.
+*** New 'repeat-map' for Python indentation commands.
The commands 'python-indent-shift-left' and 'python-indent-shift-right'
can now be repeated using 'repeat-mode'. With 'repeat-mode' enabled,
after invoking one of these commands via 'C-c <' or 'C-c >', you can
@@ -1457,10 +1680,10 @@ command line.
---
*** New user options 'vc-resolve-conflicts' and 'vc-*-resolve-conflicts'.
-Control whether to mark a conflicted file as resolved when saving.
-You can now control it globally, with 'vc-resolve-conflicts' or for
+They control whether to mark a conflicted file as resolved when saving.
+You can now control it globally, with 'vc-resolve-conflicts', or for
specific backends with 'vc-bzr-resolve-conflicts',
-'vc-hg-resolve-conflicts' and 'vc-svn-resolve-conflicts'.
+'vc-hg-resolve-conflicts', and 'vc-svn-resolve-conflicts'.
---
*** New value for 'vc-git-resolve-conflicts'.
@@ -1469,6 +1692,52 @@ its default value. Effectively, the default value hasn't changed,
since 'vc-resolve-conflicts' defaults to t, the previous default value
for 'vc-git-resolve-conflicts'.
+---
+*** VC Directory can now automatically add and remove marks on other lines.
+When you try to use a mark or unmark command where doing so would only
+be permitted if other lines were marked or unmarked first, Emacs
+will now ask you if you'd like to change the marks on those other lines.
+For example, if you try to mark a file contained within a directory that
+is already marked, Emacs will offer to unmark the directory, first.
+Previously, Emacs would simply refuse to make any changes.
+You can customize 'vc-dir-allow-mass-mark-changes' to restore the old
+behavior or dispense with the prompting.
+
+---
+*** New VC Directory bindings 'z d' and 'D' to delete Git stashes.
+These correspond to the existing 'z p' to pop a stash and 'P' to pop the
+stash at point (deleting the stash at point is also bound to 'C-k').
+
+---
+*** VC Directory now offers to register files when checking in mixed filesets.
+Previously, if some files to be checked in were unregistered but others
+were added, removed or edited, Emacs would refuse to proceed.
+Now Emacs prompts to first register the unregistered files, so that all
+files in the fileset are in a compatible state for a checkin.
+
+---
+*** New 'log-edit-hook' option to display diff of changes to commit.
+You can customize 'log-edit-hook' to include its new
+'log-edit-maybe-show-diff' option to enable displaying a diff of the
+changes to be committed in a window. This is like the 'C-c C-d' command
+in Log Edit mode buffers, except that it does not select the *vc-diff*
+buffer's window, and so works well when added to 'log-edit-hook'.
+
+---
+*** New buffer-local variable 'vc-buffer-overriding-fileset'.
+Primarily intended for buffers not visiting files, this specifies the
+VC backend and VCS-managed file name or file names to which the buffer's
+contents corresponds. It overrides the behavior of 'vc-deduce-fileset'.
+This replaces and generalizes the old 'vc-annotate-parent-file'.
+
+---
+*** New buffer-local variable 'vc-buffer-revision'.
+This specifies the revision to which the buffer's contents corresponds.
+This replaces and generalizes the old 'vc-annotate-parent-rev'.
+
+---
+*** vc-dav.el is now obsolete.
+
** Diff mode
+++
@@ -1508,6 +1777,11 @@ interactively.
*** 'package-upgrade' no longer accepts a string argument.
When called from Lisp, it now only accepts a symbol.
+---
+*** 'package-install-from-buffer' respects files marked by Dired.
+When invoking the command in a Dired buffer with marked files,
+the command will only copy those files.
+
+++
*** package-x.el is now obsolete.
@@ -1577,27 +1851,22 @@ Meant to be given a global binding convenient to the user. Example:
** Speedbar
+++
-*** The new command 'speedbar-window-mode' opens Speedbar in a window
-instead of a frame.
+*** New commands for Speedbar.
+
+- 'speedbar-window-mode' opens Speedbar in a window instead of a frame.
+- 'speedbar-window' is an alias for 'speedbar-window-mode'.
+++
-*** New command 'speedbar-window' is an alias for 'speedbar-window-mode'.
+*** New user options for Speedbar.
-+++
-*** The new user option 'speedbar-prefer-window', tells 'speedbar' to
-open a side window instead of a frame.
-
-+++
-*** The new user option ‘speedbar-dedicated-window’ defines whether the
-‘speedbar’ is displayed in a dedicated window.
-
-+++
-*** The new user option 'speedbar-window-default-width' defines the
-initial width of the 'speedbar-window'
-
-+++
-*** The new user option 'speedbar-window-max-width' defines the maximum
-width of the 'speedbar-window' when it is closed and then restored.
+- 'speedbar-prefer-window' tells 'speedbar' to open a side window
+ instead of a frame.
+- 'speedbar-dedicated-window' defines whether the 'speedbar' is
+ displayed in a dedicated window.
+- 'speedbar-window-default-width' defines the initial width of the
+ 'speedbar-window'.
+- 'speedbar-window-max-width' defines the maximum width of the
+ 'speedbar-window' when it is closed and then restored.
---
*** 'speedbar-easymenu-definition-trailer' is now a function.
@@ -1606,6 +1875,7 @@ width of the 'speedbar-window' when it is closed and then restored.
*** New user options for 'icomplete-vertical-mode'.
New user options have been added to enhance 'icomplete-vertical-mode':
+
- 'icomplete-vertical-in-buffer-adjust-list' aligns in-buffer
completion to the original cursor column.
- 'icomplete-vertical-render-prefix-indicator' adds a prefix indicator
@@ -1617,20 +1887,18 @@ New user options have been added to enhance 'icomplete-vertical-mode':
*** New faces for 'icomplete-vertical-mode'.
New faces have been added to 'icomplete-vertical-mode':
+
- 'icomplete-vertical-selected-prefix-indicator-face' controls the
appearance of the selected candidate prefix.
- 'icomplete-vertical-unselected-prefix-indicator-face' controls the
appearance of unselected candidate prefixes.
-** CL-Lib
+** Customize
-+++
-*** New macro 'cl-with-accessors'.
-This macro is similar to 'with-slots', but uses accessor functions
-instead of slot names. It is useful when slots' accessor functions are
-used repeatedly, such as reading from a slot and then writing to that
-slot. Symbol macros are created for the accessor functions using
-'cl-symbol-macrolet', so that they can be used with 'setq' and 'setf'.
+---
+*** New major mode 'Customize-dirlocals-mode'.
+This is intended for customizing directory-local variables in the
+current directory's ".dir-locals.el" file.
** Miscellaneous
@@ -1678,7 +1946,63 @@ modes.
Customize it to a non-nil value to have the fill-column indicators
change their face if the current line exceeds the 'fill-column'. The
new face 'display-fill-column-indicator-warning-face' is used to
-highlight the fill-column indicators. By default this is disabled.
+highlight the fill-column indicators. By default, this is disabled.
+
+---
+** Flymake
+
+*** Windows without fringes now automatically use margin indicators.
+When 'flymake-indicator-type' is set to 'fringes', as is now the default,
+flymake will automatically fall back to using margin indicators in
+windows without fringes, including any window on a text terminal.
+
+*** Enhanced 'flymake-show-diagnostics-at-end-of-line'
+The new value 'fancy' allowed for this user option will attempt to
+layout diagnostics below the affected line using unicode graphics to
+point to diagnostic locus.
+
+*** Enhanced 'flymake-show-buffer-diagnostics'.
+The command 'flymake-show-buffer-diagnostics' is now capable of
+highlighting a nearby diagnostic in the resulting listing. Additionally,
+it is bound to mouse clicks on fringe and margin indicators, operating
+on the diagnostics of the corresponding line. The user may bind it in
+other situations such as the diagnostic overlay map.
+
+*** More powerful 'flymake-make-diagnostic' API.
+Flymake backends can now specify origin and code attributes, allowing
+Flymake and other extensions to segregate diagnostics based on this
+extended information.
+
+*** New user option 'flymake-diagnostic-format-alist'.
+This provides fine-grained control over diagnostic formatting across
+different contexts, allowing you to specify which components (origin,
+code, message or one-liner message) appear in each output destination.
+
+*** Dynamic column sizing in diagnostic listings.
+The tabulated listings produced by 'flymake-show-buffer-diagnostics' and
+'flymake-show-project-diagnostics' now automatically adjust their column
+widths based on content, optimizing display space and readability.
+
+** SQLite
+
++++
+*** SQLite databases can now be opened in read-only mode.
+The new optional argument READONLY to 'sqlite-open' function allows to
+open an existing database only for reading.
+
+*** 'sqlite-open' now recognizes 'file://' URIs as well as file names.
+The 'file://' URIs are supported by default. In the unusual case that a
+normal file name starts with "file:", you can disable the URI
+recognition by invoking 'sqlite-open' with the new optional argument
+DISABLE-URI non-nil.
+
+** GUD
+
+---
+*** pdb, perldb, and guiler suggest debugging the current file via 'M-n'.
+When starting these debuggers (e.g., 'M-x pdb') while visiting a file,
+pressing 'M-n' in the command prompt suggests a command line including
+the file name, using the minibuffer's "future history".
* New Modes and Packages in Emacs 31.1
@@ -1702,21 +2026,6 @@ A major mode based on the tree-sitter library for editing "go.work"
files. If tree-sitter is properly set-up by the user, it can be
enabled for files named "go.work".
-** The file treesit-x.el defines a number of simple treesit modes.
-Using the new macro 'define-treesit-generic-mode' generic modes are
-defined including, but not limited to, 'gitattributes-generic-ts-mode'.
-Visiting a file in such mode ask for confirmation before installing
-its tree-sitter grammar. Then it highlights the visited file
-according to syntax defined by the grammar.
-
-** New minor mode 'electric-block-comment-mode'.
-This mode automatically close block comment, typing
-`block-comment-start' closes it inserting their corresponding
-`block-comment-end'. Thus, allows closing block comments for major
-modes that support it, such as: c-mode, c++-mode, java-mode, js-mode,
-css-mode, and derived: html-mode, mhtml-mode, xml-mode and nxml-mode,
-pascal-mode, lua-ts-mode, lisp-mode and common-lisp-mode
-
* Incompatible Lisp Changes in Emacs 31.1
@@ -1770,6 +2079,12 @@ restore the old behavior, you can set 'eshell-pwd-convert-function' to
** The rx 'eval' form now uses the current Elisp dialect for evaluation.
Previously, its argument was always evaluated using dynamic binding.
+---
+** Unused block comment variables have been removed.
+The unused variables 'block-comment-start' and 'block-comment-end',
+which never actually had any effect when set by major modes, have been
+removed.
+
* Lisp Changes in Emacs 31.1
@@ -1779,20 +2094,32 @@ It has been promoted from 'subr-x' to the C code.
You can now directly pass it a string or a buffer rather than a function.
Actually passing it a function is now deprecated.
++++
+** New function 'char-displayable-on-frame-p'.
+'char-displayable-on-frame-p' returns non-nil if Emacs ought to be able
+to display its char argument on a given frame. This new function,
+unlike 'char-displayable-p', does not check whether the character can be
+encoded by the underlying terminal.
+
+++
** New macros 'static-when' and 'static-unless'.
Like 'static-if', these macros evaluate their condition at
macro-expansion time and are useful for writing code that can work
across different Emacs versions.
+** Lexical binding
+
---
-** You can change the default value of 'lexical-binding'.
+*** You can change the default value of 'lexical-binding'.
While the default is still the use of dynamic binding dialect of Elisp
in those places that don't explicitly set 'lexical-binding' you can
change it globally with:
(set-default-toplevel-value 'lexical-binding t)
+---
+*** Loading a file displays a warning if there is no 'lexical-binding' cookie.
+
+++
** New macros 'incf' and 'decf'.
They increment or decrement the value stored in a variable (a symbol),
@@ -1819,9 +2146,9 @@ This means that you can now call it with just one argument, like
The following macros, previously only available in the experimental
'ert-x' module, are now considered stable and have been moved to 'ert':
-- ert-with-test-buffer
-- ert-with-buffer-selected
-- ert-with-buffer-renamed
+- 'ert-with-test-buffer'
+- 'ert-with-buffer-selected'
+- 'ert-with-buffer-renamed'
See "(ert) Helper Functions" node in the ERT manual for more information.
@@ -1867,114 +2194,6 @@ authorize the invoked D-Bus method (for example via polkit).
** The customization group 'wp' has been removed.
It has been obsolete since Emacs 26.1. Use the group 'text' instead.
-** Changes in tree-sitter modes
-
-+++
-*** Indirect buffers can have their own parser list.
-Before, indirect buffers share their base buffer’s parser list and
-parsers. Now they can have their own parser list.
-
-+++
-*** New variable 'treesit-language-remap-alist'.
-This variable allows a user to remap one language into another, such
-that creating a parser for language A actually creates a parser for
-language B. By extension, any font-lock rules or indentation rules for
-language A will be applied to language B instead.
-
-This is useful for reusing font-lock rules and indentation rules of
-language A for language B, when language B is a strict superset of
-language A.
-
-+++
-*** New accessor functions for each setting in 'treesit-font-lock-settings'.
-Now users can access a setting's query, feature, enable flag, and
-override flag by 'treesit-font-lock-setting-query',
-'treesit-font-lock-setting-feature', 'treesit-font-lock-setting-enable',
-and 'treesit-font-lock-setting-override'.
-
-*** New tree-sitter thing 'list'.
-Unlike the existing thing 'sexp' that defines both lists and atoms,
-'list' defines only lists to be navigated by 'forward-sexp'.
-The new function 'treesit-forward-sexp-list' uses 'list'
-to move across lists. But to move across atoms inside the list
-it uses 'forward-sexp-default-function'.
-
-*** New tree-sitter based functions for moving by lists.
-If a major mode defines 'list' in 'treesit-thing-settings',
-tree-sitter setup for these modes sets 'forward-list-function' to
-'treesit-forward-list', 'up-list-function' to 'treesit-up-list', and
-'down-list-function' to 'treesit-down-list'. This enables the
-'forward-list', 'up-list', and 'down-list' motion commands for those
-modes.
-
-*** Tree-sitter enabled modes now properly support 'show-paren-mode'.
-They do that by letting 'show-paren-mode' use the results of parsing by
-the tree-sitter library. The new function 'treesit-show-paren-data' is
-used to communicate the tree-sitter parsing results to
-'show-paren-mode'.
-
-*** Tree-sitter enabled modes now properly support 'hs-minor-mode'.
-All commands from hideshow.el can selectively display blocks
-defined by the new tree-sitter thing 'list'.
-
-*** New tree-sitter thing 'comment'.
-The new variable 'forward-comment-function' is set to the new function
-'treesit-forward-comment' if a major mode defines the thing 'comment'.
-
-+++
-*** New function 'treesit-language-display-name'.
-This new function returns the display name of a language given the
-language symbol. For example, 'cpp' is translated to "C++". A new
-variable 'treesit-language-display-name-alist' holds the translations of
-language symbols where that translation is not trivial.
-
-*** New function 'treesit-merge-font-lock-feature-list'.
-This function merges two tree-sitter font-lock feature lists. Returns a
-new font-lock feature list with no duplicates in the same level. It can
-be used to merge font-lock feature lists in a multi-language major mode.
-
-*** New function 'treesit-replace-font-lock-feature-settings'.
-Given two tree-sitter font-lock settings, it replaces the feature in the
-second font-lock settings with the same feature in the first font-lock
-settings. In a multi-language major mode it is sometimes necessary to
-replace features from one of the major modes, with others that are
-better suited to the new multilingual context.
-
-*** New function 'treesit-simple-indent-modify-rules'.
-Given two tree-sitter indent rules, it replaces, adds, or prepends rules
-in the old rules with new ones, then returns the modified rules. In a
-multi-language major mode it is sometimes necessary to modify rules from
-one of the major modes to better suit the new multilingual context.
-
-+++
-*** New command 'treesit-explore'.
-This command replaces 'treesit-explore-mode'. It turns on
-'treesit-explore-mode' if it’s not on, and pops up the explorer buffer
-if it’s already on.
-
-+++
-*** 'treesit-explore-mode' now supports local parsers.
-Now 'treesit-explore-mode' (or 'treesit-explore') prompts for a parser
-rather than a language, and it’s now possible to select a local parser
-at point to explore.
-
-+++
-*** New variable 'treesit-aggregated-simple-imenu-settings'.
-This variable allows major modes to setup Imenu for multiple languages.
-
-+++
-*** New variable 'treesit-aggregated-outline-predicate'.
-This variable allows major modes to setup 'outline-minor-mode'
-for multiple languages.
-
-*** New function 'treesit-simple-indent-add-rules'.
-This new function makes it easier to customize indent rules for
-tree-sitter modes.
-
-*** New variable 'treesit-simple-indent-override-rules'.
-Users can customize this variable to add simple custom indentation rules
-for tree-sitter major modes.
-
+++
** New optional BUFFER argument for 'string-pixel-width'.
If supplied, 'string-pixel-width' will use any face remappings from
@@ -2055,6 +2274,12 @@ provide instructions for finding the definition.
New convenience function 'find-function-update-type-alist' offers a
concise way to update a symbol's 'find-function-type-alist' property.
++++
+** 'inhibit-message' can now inhibit clearing of the echo area.
+Binding 'inhibit-message' to a non-nil value will now suppress both
+the display of messages and the clearing of the echo area, such as
+caused by calling 'message' with a nil argument.
+
** Special Events
+++
@@ -2085,6 +2310,19 @@ Put differently, this enables input events to be read and recursive
editing sessions to be started from non-main threads. The only platform
where this remains unsupported is Nextstep (GNUstep or Mac OS).
+---
+** 'desktop-restore-frames' has been disabled by default on Android systems.
+Restrictions imposed on clients by the window manager on these systems
+are too prohibitive and don't allow restoring frame configurations.
+(For the same reason many window management facilities are also not
+implemented by Emacs.)
+
+---
+** Emacs responds to runtime display configuration changes on Android.
+The upshot of this is that Emacs will adapt to display resolution /
+layout changes applied while an Emacs session is active, which is
+possible on some recently released devices.
+
---
** 'NSSpeechRecognitionUsageDescription' now included in "Info.plist" (macOS).
Should Emacs (or any built-in shell) invoke a process using macOS speech
@@ -2092,7 +2330,7 @@ recognition APIs, the relevant permission dialog is now displayed, thus
allowing Emacs users access to speech recognition utilities.
Note: Accepting this permission allows the use of system APIs, which may
-send user data to Apple’s speech recognition servers.
+send user data to Apple's speech recognition servers.
+++
** On Mac OS X, stipples now render with color.
diff --git a/etc/emacs.metainfo.xml b/etc/emacs.metainfo.xml
index b063b918a2d..8414e9ac6ba 100644
--- a/etc/emacs.metainfo.xml
+++ b/etc/emacs.metainfo.xml
@@ -37,15 +37,50 @@
https://www.gnu.org/software/emacs/manual/html_node/emacs/Contributing.htmlemacs.desktopemacs.service
+
+ keyboard
+
+
+ 480
+ 312
+
+
+ console
+ pointing
+ touch
+
+ GNUGPL-3.0+ and GFDL-1.3+Free Software Foundation
- https://www.gnu.org/software/emacs/images/appdata-26.png
-
Editing a Lisp program whilst viewing the Emacs manual.