* doc/lispref/functions.texi (Declare Form): Document
'font-lock-keyword' meta property.
* etc/NEWS: Announce addition of 'font-lock-keyword' meta property.
* lisp/emacs-lisp/byte-run.el (byte-run--set-font-lock-keyword): New
function.
* (defun-declarations-alist): Add entry for 'font-lock-keyword', using
'byte-run--set-font-lock-keyword'.
* (with-no-warnings): Set 'font-lock-keyword' meta property.
* lisp/replace.el (replace-preview--input): New function.
(replace-preview-update): Add optional START and END, and
preview only the matches between them.
(replace-preview-setup): Accept a nil FROM, read from the
minibuffer along with the replacement, and add optional
BACKWARD. Limit the preview to the part of the buffer that the
replacement will cover.
(query-replace-read-to): Add optional BACKWARD and pass it on.
(query-replace-read-args): Preview the replacement while reading
FROM as well, and preview nothing when the caller asks for no
highlighting.
* lisp/isearch.el (isearch-query-replace): Pass BACKWARD to
`query-replace-read-to'.
* test/lisp/replace-tests.el (replace-tests--preview): Add START
and END.
(replace-tests-preview-bounds, replace-tests-preview-input): New
tests.
* doc/emacs/search.texi (Replace): Document the above.
* lisp/replace.el (query-replace-show-preview): Accept the
symbols `replacement-only' and `both'. Update the :type
accordingly, which also fixes the name of a function that does
not exist.
(query-replace-preview-match): Update the doc string.
(replace-preview-both, replace-preview-replacement-only): Say
which value of the option calls them.
(replace-preview--format): Dispatch on the new values, and still
call a function value.
(replace-preview-setup): Test the option for non-nil instead of
testing it with `functionp'.
* test/lisp/replace-tests.el (replace-tests--preview)
(replace-tests-preview-both, replace-tests-preview-cleanup)
(replace-tests-preview-disabled): Use the new values.
* doc/emacs/search.texi (Replace): Document the new values.
* lisp/emacs-lisp/lisp-mode.el (lisp-el-font-lock-keywords-1):
Highlight `define-button-type' the same as `define-widget'.
* (lisp-imenu-generic-expression): Treat `define-button-type'
the same as `define-widget'.
Add new `font-lock-keyword' symbol property, which does the opposite
of the existing `no-font-lock-keyword'; allowing to highlight certain
functions, like macros and special-forms, as opposed to allowing to
not highlight certain macros.
* lisp/emacs-lisp/lisp-mode.el (lisp--el-match-keyword): Use new
`font-lock-keyword'.
* lisp/vc/vc-dir.el (vc-dir-refresh): New OK-IF-ALREADY-RUNNING
argument.
(vc-dir): Use it so that we do not error if already refreshing
(bug#81798).
* lisp/vc/vc-dispatcher.el (vc-set-async-update): Use it such
that if VC-Dir is already refreshing, we restart the refresh.
* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-style-setter):
Add BUFFER-LOCAL argument. If setting globally, do not override
buffer locals.
(c-ts-mode--simple-indent-rules): Remove 'style' arg, use
`'-ts-mode-indent-style' instead. Handle the case where
this style is a function. Set 'treesit-simple-indent-rules'.
(c-ts-mode-set-style, c-ts-mode, c++-ts-mode): Adjust accordingly.
If you typed `n' before "./" had appeared, Emacs signalled a
wrong-type-argument error. Now it signals a better one.
* lisp/vc/vc-dir.el (vc-dir--before-dotname-p): Return nil if
the "./" entry hasn't appeared yet.
* test/lisp/vc/vc-tests/vc-test-misc.el
(vc-test-vc-dir-next/previous): Simulate the problem case.
* lisp/emacs-lisp/ewoc.el (ewoc-goto-next): Signal a user-error
instead of a plain error. This makes sense for all the current
call sites. (This is secondary to the bug fix above: this code
was never reached, previously.)
Recently, xref gained the xref-find-by-kind API, and Eglot gained
support for that. This commit restructures Eglot's side: any
non-definition LSP reference-like (generic references, declaration,
implementation, and typeDefinition) can now be requested for any
arbitrary symbol, even if point is not on that symbol (of course as long
as the server supports the 'workspace/symbol' method).
This historically hairy code is made somewhat simpler and should agree
with users' expectations of commands like C-u M-?.
However, there is still a wrinkle: some servers (clangd, ty, but not
rust-analyzer) need the document where the canonical definition site
lives to have been explicitly 'didOpen'ed by the client. And we need
the canonical definition site to request references for an arbitrary
symbol, because LSP itself barely knows about "symbols", i.e. they are
not first-class entities. LSP only knows document locations.
The previous approach by Dmitry Gutov's did the heroics: it visited the
URI transiently, just to place point on the definition and then request
the special kind of reference. This worked, but (1) is only needed if
the URI isn't already visited (2) is somewhat hacky and risks things
like surpsising confirmation prompts and user hooks.
Perhaps this wrinkle can be addressed later with a lighter weight
version of a 'didOpen'-sending helper. For now, we take the simpler
approach: craft the request directly from the information we got from
'workspace/symbol', even if that info points to unmanaged LSP documents.
If the server complains, so be it. Users should at least be able to
read the message and visit the file themselves.
For reference, Clangd's behavior is seen a server bug, according to
https://discourse.llvm.org/t/clangd-explicit-and-implicit-doc-open/205/2
and https://github.com/microsoft/language-server-protocol/issues/861.
* lisp/progmodes/eglot.el (eglot--lsp-xrefs-for-id): New function.
(eglot--lsp-xrefs-for-method, eglot--lsp-xref-helper): Delete,
folding into eglot--lsp-xrefs-for-id.
(eglot--lsp-xref-refs): Delete variable.
(xref-backend-identifier-at-point): Return symbol at point.
(xref-backend-definitions, xref-backend-references)
(xref-backend-xrefs-by-kind): Use new helper.
(xref-backend-xref-kinds): Rewrite.
(eglot--deffinder): New helper
(eglot-find-declaration, eglot-find-implementation)
(eglot-find-typeDefinition): Rewrite using eglot--deffinder.
Do not assume that diff has the -a option, as POSIX does not
require it. Problem found on Solaris 10 (bug#81480).
* test/lisp/vc/diff-mode-tests.el (diff-mode-test-font-lock)
(diff-mode-test-font-lock-syntax-one-line)
(diff-mode-test-git-patch)
(diff-mode-test-git-patch/before-first-hunk)
(diff-mode-test-git-patch/signature):
Skip unless "diff -a" works.
grep.el assumes support for grep -E, which is universal among
Emacs platforms except for Solaris /usr/bin/grep. So, on Solaris
substitute a grep that supports -E, if available in one of the
standard Solaris locations. In the usual case where one is
available, this fixes Bug#81483.
* lisp/progmodes/grep.el (grep-compute-defaults):
On Solaris, prefer /usr/sfw/bin/grep or /usr/xpg4/bin/grep to
plain grep if plain grep lacks support for -E.
* test/lisp/net/nsm-tests.el (nsm-check-local-subnet-ipv4):
Don’t test the nsm-trust-local-network case when
network-interface-list reports no network interfaces.
On Solaris 10, network-interface-list always returns nil because
Solaris 10 lacks getifaddrs, and it’s not worth our trouble to
port network-interface-list to the hacky way this obsolescent OS
reports network interfaces (bug#81473).
* test/lisp/tab-bar-tests.el (tab-bar-tests-quit-restore-window):
Test tty-type "linux" only on gnu/linux, as it may not exist
on other platforms, e.g., Solaris (bug#81477).
Problem reported by Paul Eggert (Bug#81484).
* test/lisp/cedet/semantic/bovine/gcc-tests.el (semantic-gcc-test):
Do not assume GCC is version 4 or later.
(semantic-gcc-test/1, semantic-gcc-test/6): Update GCC version number.
* test/src/regex-emacs-tests.el (regex-tests-generic-line):
Read the test file in utf-8-unix.
This indicates that the current completion field is complete when the
string is, e.g. "--option=". The option value is a subsequent field and
is handled by other parts of Pcomplete (bug#81792).
* lisp/pcomplete.el (pcomplete-long-option-completion-table): Set
boundary for completed options that take values.
* test/lisp/pcomplete-tests.el (pcomplete-shell-completion): Convert to
macro and accept BODY arguments.
(pcomplete-test-long-options/with-value/multiple)
(pcomplete-test-long-options/without-value/multiple): New tests.
These files are not included in Emacs distributions so this will
only affect those who, e.g., symlink these into ~/.emacs.d/user-lisp/.
* admin/admin.el:
* admin/authors.el: Autoload all commands.
* admin/gitmerge.el (gitmerge): Autoload.
* lisp/startup.el (prepare-user-lisp): Ignore dangling symlinks.
Restructure to reduce number of system calls made for everything
except dangling symlinks.
* lisp/international/latexenc.el
(latexenc-find-file-coding-system): Decode the main file's name,
since at this point the buffer is still unibyte and undecoded.
(Bug#81606)
* etc/themes/newcomers-presets-theme.el (newcomers-presets): Set
set-mark-command-repeat-pop, kill-do-not-save-duplicates,
help-window-select and window-combination-resize.
* lisp/minibuffer.el (minibuffer-completion-help): Remove the
completion base from the minibuffer contents before comparing to
a sole completion (bug#81641).
* lisp/subr.el (combine-change-calls-1): Use the new 'apply entry
variant for the buffer-undo-list.
(undo--wrap-and-run-primitive-undo): Adjust the undo entries if the
region has moved.
* test/src/undo-tests.el (undo-test-combine-change-calls-4): New test.
This patch adds a new variant of 'apply entries for the undo list of the
form: (apply DELTA (BEG . END) FUN-NAME . ARGS).
This similar to the existing (apply DELTA BEG END FUN-NAME . ARGS)
variant. The difference for the new variant is that FUN-NAME is applied
to the adjusted BEG and END arguments together with ARGS. This allows
functions to compute positions relative to the adjusted region.
The existing 'apply entry variants remain supported for backward
compatibilty.
* lisp/simple.el (primitive-undo): Call the function for the new 'apply
variant with START and END.
(undo-elt-in-region, undo-adjust-elt, undo-delta): Add support for the
new 'apply entries.
* test/src/undo-tests.el (undo-tests-selective-apply-1)
(undo-tests-selective-apply-2): New tests.
(undo-tests--mark-region, undo-tests--selective-apply)
(undo-tests--undo-delete, undo-tests--undo-insert)
(undo-tests--adjust-markers): New helpers.
* lisp/progmodes/flymake.el
(flymake-diagnostics-buffer-mode-map): Don't bind
'previous-error-this-buffer-no-select' if it's not defined, to
fix Emacs 30 compat (bug#81775). Bump version to 1.4.7.
6f230503c8 ; * admin/make-tarball.txt: Don't use a batch process for...
5fdb5e3485 Relax formatting requirements on NEWS when converting to ...
fe4b9df4f4 Adjust generating HTML for historic NEWS
30b2265a01 ; * admin/make-tarball.txt: Publish HTML formatted NEWS.
99f8ed8d46 make-news-html-file: Don’t assume NEWS has local variables
5c5362a3e8 Escape [[ in NEWS when generating HTML via Org
9794fa0d5d elisp-scope.el: Avoid excessive 'trusted-content-p' calls
956875f822 ; * test/lisp/emacs-lisp/crm-tests.el: Fix copyright years.
e8b46219ca Fix choose-completion in CRM with boundaries
e420d0d978 ; Further explain WHEN argument to marking functions obso...
c4d50ea097 Skip all package-vc tests if git is not installed
* admin/admin.el (make-news-html-file): If the major version
given has it's own NEWS file, use that. Understand
non-continuous copyright years.
Copyright-paperwork-exempt: yes
Suggested by Juri Linkov <juri@linkov.net>.
* lisp/replace.el (query-replace-show-preview): Drop the values
t and 'both' in favor of the two functions that implement them.
(query-replace-preview-match): Doc fix.
(replace-preview-propertize): Rename from
'replace-preview--propertize' and make it public, so that the
preview functions can be copied and adapted.
(replace-preview-only-replacement, replace-preview-both): New
functions.
(replace-preview--format): Call the value of
'query-replace-show-preview'.
(replace-preview-setup): Preview only if the value is a
function.
* etc/NEWS: Update the entry.
* doc/emacs/search.texi (Replace): Document the new values.
* test/lisp/replace-tests.el (replace-tests--preview)
(replace-tests-preview-cleanup, replace-tests-preview-disabled)
(replace-tests-preview-invisible-match): Use the new functions.
(replace-tests-preview-both, replace-tests-preview-function):
New tests.
Cache the return value of 'trusted-content-p' for the
duration of the analysis of a single form, instead of
calling 'trusted-content-p' repeatedly for (potentially)
every analyzed macro call (bug#81723).
* lisp/emacs-lisp/elisp-scope.el (elisp-scope--trust-cache):
New variable.
(elisp-scope-analyze-form): Let-bind it.
(elisp-scope--trusted-p): New helper function.
(elisp-scope-safe-macro-p): Use it.
* lisp/minibuffer.el (completion--attempt-state): Add.
(completion--in-region-1): Don't scroll if the minibuffer has
changed since the last TAB. (bug#81578)
* test/lisp/minibuffer-tests.el
(completion-tab-with-completions-visible-bug81578): New test.
* lisp/vc/log-edit.el (log-edit-font-lock-keywords):
Add 'front-sticky' and 'cursor-intangible' to the headers
separator rule (bug#81764).
(log-edit-mode): Enable cursor-intangible-mode and add
'cursor-intangible' to font-lock-extra-managed-props.
* lisp/emacs-lisp/crm.el (crm--choose-completion-string):
Delete.
(completing-read-multiple): Set buffer-local
completion-no-auto-exit instead of using
choose-completion-string-functions. Do not set
completion-list-insert-choice-function. (Bug#81411)
* test/lisp/emacs-lisp/crm-tests.el: New file.
When the new user option 'outline-use-comment-regexp' is non-nil,
enabling 'outline-minor-mode' configures 'outline-regexp',
'outline-level', and 'outline-search-function' to recognize outline
headings prefixed by a comment, such as ";;; *" and ";;; **". The
pattern comes from the buffer-local 'outline-comment-regexp' when set,
and otherwise from a default built from 'comment-start' and the new
option 'outline-comment-regexp-suffix'. The heading level is the
length of the regexp's group 1. The previous values are saved and
restored when the mode is disabled. All of the new code is kept in a
self-contained section at the end of outline.el.
* lisp/outline.el (outline-comment-regexp): New buffer-local variable.
(outline-comment-regexp-suffix, outline-use-comment-regexp): New user
options.
(outline--saved-outline-regexp, outline--saved-outline-level)
(outline--saved-outline-search-function, outline--comment-regexp): New
internal variables.
(outline--comment-level, outline--default-comment-regexp)
(outline--setup-from-comment-regexp, outline--restore-from-comment-regexp):
New functions.
(outline-minor-mode): Call 'outline--setup-from-comment-regexp' on
activation and 'outline--restore-from-comment-regexp' on deactivation.
* lisp/emacs-lisp/lisp-mode.el (lisp-mode-variables): Set
'outline-comment-regexp' to recognize ";;; *" headings.
* etc/NEWS: Announce the new options (bug#81054).
* lisp/calc/calc-forms.el (math-tzone-names): Use
make-obsolete-variable instead of merely saying in the doc string
that the variable is obsolete. Move the doc for this
obsolete variable here, from the manual.
* src/indent.c (scan_for_column): Assign parent_it of cmp_it.
* src/composite.c (composition_update_it): Use cmp_it->parent_it
to compute the frame's canonical column width, so as to compute
cmp_it->width in column units. (Bug#81759)
* lisp/international/mule.el (load-with-code-conversion):
* lisp/custom.el (load-theme): Set 'files--name-of-loading-file'
buffer-locally to record the name of the file being loaded.
* lisp/files.el (files--name-of-loading-file): New buffer-local
variable.
(internal--get-default-lexical-binding): Use it to show the name
of the file from which we load or evaluate Lisp code. (Bug#81686)
* lisp/progmodes/xref.el: Change the proposed bindings from M-' to M-g M-.
* lisp/menu-bar.el (menu-bar-goto-menu): Add menu item.
* doc/emacs/maintaining.texi: Update the binding.
* etc/NEWS: Document the commant.
* lisp/emacs-lisp/pcase.el (pcase-let*-strict): Fix the documentation to say
that 'pcase-let*-strict' always signals an error when a pattern does not
match. This is the intended difference between 'pcase-let*-strict' and
'pcase-let*'. The previous text, copied from 'pcase-let*', stated that
'pcase-let*-strict' "may" error, incorrectly suggesting that it also may not.
* lisp/emacs-lisp/package.el (describe-package-1):
Remove extraneous newlines around the separator.
* lisp/help.el (describe-key): Same.
* lisp/help-fns.el (describe-symbol): Same.
Also stop stripping space/tab/nl at the end of the inserted
doc. This way we keep the extra newline at the end of the
additionally-indented paragraph about "other relevant functions",
compiler macros, etc.
https://lists.gnu.org/archive/html/emacs-devel/2026-08/msg00866.html
lisp/progmodes/xref.el assumes xref -0 works, but this is not true
on some platforms like Solaris 10. xref -0 was not standardized
until POSIX.1-2024, and there is little point to failing the tests
on older platforms. (bug#81479)
* test/lisp/progmodes/xref-tests.el (xref-tests--xargs-0-works):
New constant.
(xref-tests--deftest): New macro. All tests changed to use this
macro rather than using plain ert-deftest.
* test/lisp/emacs-lisp/package-vc-tests.el
(package-vc-test-deftest): Inject a 'skip-unless' at the
beginning of the test definition to check if "git" is installed,
as we test package-vc using vc-git. (Bug#81470)
* lisp/custom.el (custom--theme-load-file): New variable.
(load-theme): Set it to the theme file being loaded.
* lisp/files.el (internal--get-default-lexical-binding): Use
'custom--theme-load-file', if non-nil, to show the file name of a
theme which caused the lexbind warning. Do not merge to master.
(Bug#81686)
The space is unhelpful, since the user likely wants to add a value for
that option immediately after the "=" (bug#81689).
* lisp/pcomplete.el (pcomplete-long-option-completion-table): New
function...
(pcomplete-here-using-help):
* lisp/pcmpl-gnu.el (pcomplete/tar):
* lisp/pcmpl-linux.el (pcomplete/systemctl): ... use it.
* test/lisp/pcomplete-tests.el (pcomplete-shell-completion)
(pcomplete/pcmpl-option-test): New functions.
(pcomplete-test-long-options/with-value)
(pcomplete-test-long-options/without-value): New tests.
Since we're in the pre-command-hook, there's no reason not to
(auto)load the function: it would be (auto)loaded right after
when passed to 'command-execute' anyway.
* lisp/delsel.el: Prefer #' to quote function names.
(delete-selection-pre-hook): Use 'function-get'.
c0b872dd67 ; * admin/notes/jargon: Add FUD.
e8936794ad Fix navigating *Completions* with TAB in vertical format
9c9a26e60b Merge branch 'emacs-31' of git.savannah.gnu.org:/srv/git/...
3d9f0fa865 ; * admin/make-tarball.txt: Note about publishing NEWS (b...
bcfc4e7e19 tab-bar-tests-quit-restore-window: Mark unstable
a001a45a50 Revert "Delete test that hangs"
6800426743 admin/make-manuals: Include type hierarchy auxiliary files
a013cdd3e8 ; * admin/make-tarball.txt: Various improvements.
The manuals in doc/emacs, doc/lispintro and doc/lispref have no
translations, so filtering the per-directory language list by DOCLANGS
left those directories with nothing to build when DOCLANGS does not
include 'default'. These three manuals must be built and installed
regardless of DOCLANGS: the Emacs and Emacs Lisp manuals are
referenced from doc strings, and the Introduction to Emacs Lisp
Programming is an important enough part of Emacs to be available
whatever the language preferences of the user who builds the manuals.
* Makefile.in (MANDATORY_DOC_DIRS): New variable.
(FILTER_DOCLANGS): Use it to always build the default language for
those directories.
(INFO_NONMISC, srcdir_doc_info_dir_inputs): Say why these are not
gated by DOCLANGS.
* doc/translations/README: Document that those three manuals are
always built in the default language.
Comments and docstrings only, no functional change.
* lisp/progmodes/cperl-mode.el: Push version for ELPA publishing.
Point URL header to https://elpa.gnu.org/packages/cperl-mode.html.
Add information about :core package status.
Start the commentary with the supported version of Perl syntax.
Move advertising 'cperl-hairy' from the commentary section to the
docstring for 'cperl-tips'.
Drop recommending 'cperl-speed', no longer relevant.
Drop incomplete (and inaccurate) list of faces.
* lisp/textmodes/markdown-ts-mode.el
(markdown-ts--fontify-bare-uri): Don't give bare URLs a mailto:
prefix (bug#81703).
Copyright-paperwork-exempt: yes
* lisp/simple.el (separator-line): Check for support for
strike-through and fall back to underlining.
(make-separator-line): Update test to accept terminals that
support underline.
This script no longer works as of mupdf version 1.27.2.
This new value works for mupdf version 1.28.0, 1.27.2, 1.26.8, and
1.25.2.
* lisp/doc-view.el (doc-view--mutool-pdf-outline-script): Modify
value to one that works.
* lisp/vc/vc-dir.el (vc-dir-headers): Remove the extra nelines
around the separator line.
* lisp/simple.el (separator-line): Use strike-through in terminal,
to better match the original intent.
(make-separator-line): Change the capability check here to
strike-through as well, it seems about as common as underline.
Problem reported by Ken Speegle (Bug#81716)
* lib-src/emacsclient.c (fail): Don’t get confused by trailing
whitepace in alternate_editor. Quietly ignore alternate_editor
if it has no tokens (this part was suggested by Eli Zaretskii).
* src/xdisp.c (window_text_pixel_size): Reset starting X
coordinate when pretending we begin after the newline, to be
consistent with the iterator's X coordinate. (Bug#81722)
The mock 'float-time' was defined to take no arguments, unlike the
real 'float-time', which manifested as a test failure in
'uuid-v7-generator-known-rnd-and-ts'.
* test/lisp/emacs-lisp/uuid-tests.el (uuid-v7-generator-known-rnd-and-ts):
Fix mock 'float-time' definition. (Bug#81701)
* lisp/progmodes/cc-mode.el (c-basic-common-init):
Set 'editorconfig-indent-size-vars'.
* lisp/editorconfig.el (editorconfig-indentation-alist):
Remove settings for CC-modes since they are now redundant.
* lisp/emacs-lisp/warnings.el (display-warning): Take into account
'warning-minimum-level' and 'warning-suppress-types' also in case of
displaying daemon startup warnings on the first client frame (bug#81694).
Matthew Persico reported on GitHub that cperl-mode.el gives
several warnings when checked with package-lint. This commit
fixes them. (https://github.com/HaraldJoerg/cperl-mode/pull/29)
* lisp/progmodes/cperl-mode.el: Add a "Version" header,
remove nonstandard "Perl" keyword. Add an URL header.
(cperl--field-declaration-rx):
(cperl-electric-rparen):
(cperl-find-sub-attrs):
(cperl-highlight-charclass):
(cperl-process-here-doc):
(cperl-init-faces):
Don't wrap closing parens onto new lines
* lisp/progmodes/c-ts-mode.el (c-ts-mode--simple-indent-rules):
Align strings that will concatenate. Patch by Tomas Nordin
<tomasn@posteo.net>. (Bug#81588)
* doc/misc/tramp.texi (Auto-save File Lock and Backup): Adapt example.
* doc/misc/trampver.texi:
* lisp/net/trampver.el: Change version to "2.8.3-pre".
* lisp/net/tramp-cmds.el (tramp-file-name-with-sudo): Expand the
result for consistency. (Bug#81622)
* lisp/net/tramp.el (with-tramp-progress-reporter):
Let-bind `inhibit-message'.
(tramp-file-name-for-operation): Fix the case, that the first
argument is a process name.
(tramp-handle-find-backup-file-name): Use connection-local value
of `make-backup-files'.
* test/lisp/net/tramp-tests.el (tramp-test38-find-backup-file-name):
Extend test.
* lisp/simple.el (next-line-completion): Make using TAB to
navigate in vertical format cycle through the minibuffer (bug#81631).
* test/lisp/minibuffer-tests.el (completion-auto-select-test-bug81635):
Run tests for all values of 'completions-format'.
There is no value in having an opinionated cperl customization for
PostScript printing (who does that anyway in 2026?) which clobbers
ps-print customization with 'eval-after-load'.
* lisp/progmodes/cperl-mode.el
(cperl-menu): Delete "CPerl pretty print (experimental)".
(cperl-ps-print-face-properties):
Obsolete this cperl-ism variable in favor of ps-print customizing.
(cperl-windowed-init): No longer used, deleted.
(cperl-init-faces): Remove call to 'cperl-ps-print-init'.
(cperl-ps-print-init): Obsolete this function, point to 'ps-print'
customization in the docstring.
(cperl-ps-print): Obsolete this functoin in favor of
`'s-print-buffer'. The function body uses that function.
Also correctly handle imenu in a buffer with no classes
declared.
* lisp/progmodes/cc-menus.el
(cc-imenu-objc-generic-expression): Recognize commas in the
part of the regexp dealing with methods.
(cc-imenu-objc-function): When no classes are declared in the
buffer, don't add the spurious element ((nil)) to TOPLIST, as
this causes an error to be thrown. Also, don't try to setcdr a
list onto TOPLIST when the latter is nil.
At buffer changes in objc-mode, context fontification was
undoing correct fontification due to not taking being inside a
method into account. Now fixed.
* lisp/progmodes/cc-engine.el
(c-beginning-of-objc-method-header): New function.
* lisp/progmodes/cc-mode.el (c-fl-decl-start): In objc-mode,
call the new function to test for being within a method.
* lisp/replace.el (query-replace-show-preview): Accept 'both'
and a function of two arguments as values. Doc fix.
(query-replace-preview-match): New face.
(replace-preview--propertize, replace-preview--format): New
functions.
(replace-preview-update): Use 'replace-preview--format'.
* etc/NEWS: Update the entry.
* src/pgtkterm.c (pgtk_make_frame_visible_wait_for_event_cb):
Rename from pgtk_make_frame_visible_wait_for_map_event_cb.
(pgtk_make_frame_visible_wait_for_event_timeout):
Rename from pgtk_make_frame_visible_wait_for_map_event_timeout.
(pgtk_wait_for_event): Rename from pgtk_wait_for_map_event.
It waits for not only one "map-event" but also one "unmap-event".
(pgtk_make_frame_visible): Call pgtk_wait_for_event instead
to wait for a "map-event".
(pgtk_make_frame_invisible): Call pgtk_wait_for_event instead
to wait for an "unmap-event".
6800426743 admin/make-manuals: Include type hierarchy auxiliary files
a013cdd3e8 ; * admin/make-tarball.txt: Various improvements.
82ba6298ae Merge branch 'emacs-31' of git.savannah.gnu.org:/srv/git/...
091398b045 ; * src/treesit.c: Fix wording and typos in commentary.
83ef59ef5e ; Update tree-sitter docstrings
c51104de28 ; * ChangeLog.5: Fix position of one entry.
249e293f7a em-script-tests: don't load the site file
442674babb emacsclient-tests: don't load the site file
b4612c6f29 Fix navigating vertical completions with annotations (bug...
f60d4243e6 Fix 'describe-package' for the Emacs pseudo package
d3229f9f37 Avoid errors in text-only client frames of PGTK build
* test/lisp/eshell/em-script-tests.el (em-script-test/batch-file)
(em-script-test/batch-file/shebang): Invoke Emacs with -Q to
suppress site file loading. (Bug#81679)
* test/lib-src/emacsclient-tests.el
(emacsclient-test-alternate-editor-allows-arguments)
(emacsclient-test-alternate-editor-allows-quotes): Invoke the
alternate editor with -Q to suppress site file loading. (Bug#81676)
* lisp/emacs-lisp/package.el (describe-package-1): Manually
construct a package-desc object if the package being described
in 'emacs', otherwise fall back to 'package-get-descriptor'.
This is necessary since 'package-get-descriptor' doesn't handle
pseudo packages. (Bug#81671)
* lisp/composite.el (compose-gstring-and-emoji): Adjust the widths
of glyphs.
* src/character.c (lisp_string_width): Handle automatic
compositions when HAVE_WINDOW_SYSTEM is not defined.
* src/term.c (append_composite_glyph): Add `padding' argument.
(produce_composite_glyph): Request one padding glyph if the
composite glyph has pixel_width >= 2 and the first character has
width >= 2, or it is considered an Emoji.
(encode_terminal_code): Skip padding glyphs for composite glyphs
as well.
(composite_glyph_is_emoji_sequence): New function.
(tty-display-emoji-force-wide)
(auto-composition-emoji-tty-eligible-codepoints)
(auto-composition-emoji-unqualified-tail-initials): New variables.
* admin/unidata/Makefile.in: Add emoji-variation-sequences.txt and
emoji-test.txt to zwj_sources.
* admin/unidata/emoji-zwj.awk: Scan emoji-variation-sequences.txt to
generate 'auto-composition-emoji-tty-eligible-codepoints'. Scan
emoji-test.txt to generate
'auto-composition-emoji-unqualified-tail-initials' and the composition
rules for unqualified and minimally-qualified RGI sequences. Update the
default composition function to 'compose-gstring-and-emoji'.
* lisp/composite.el (compose-gstring-and-emoji): Add.
(auto-compose-chars): Changed to consider 'compose-gstring-and-emoji'.
In accordance to UAX #11 ED7
(https://www.unicode.org/reports/tr11/tr11-44.html#ED7)
[...] because for all practical purposes they behave like Na, they are
treated as narrow characters (the same as Na) under the
recommendations below.
* lisp/international/characters.el: Do not mark U+2690--U+2692, U+1F1AD,
U+1FA00--U+1FA53, U+1FA60--U+1FA6D, and U+1FB00--U+1FB92 as
double-width, since they have East_Asian_Width=Neutral in Unicode 17.
Do not mark U+061B and U+06DE as zero-width, since their Unicode General
Category property is not one of Mn, Me, or Cf.
* lisp/minibuffer.el (completion--in-region-1): If completions
buffer ends in a newline (e.g. when `completions-format' is
'vertical), disregard that when checking `pos-visible-in-window-p'
to prevent unnecessary scrolling (bug#81630).
* lisp/emulation/viper-ex.el (ex-ambiguous-char-map): Add mapping
of ambiguous chars to their equivalents.
(ex-token-alist): Add list and number commands.
(ex-print, ex-print-display-lines): Add args to print line-numbers
or unambiguously.
* etc/NEWS: Document new ex commands. (Bug#81282)
* doc/misc/url.texi: Synchronize function signatures with code. Fix
formatting for variable. Remove superfluous space. Link directly to
referenced CL manual node. (Bug#81505)
* lisp/erc/erc-match.el (erc-match--opt-pat-make-addr-beg)
(erc-match--opt-pat-make-addr-any): Don't `regexp-quote' the regexp
returned by `erc-match--opt-pat-make'.
* lisp/minibuffer.el (completions--clear-selection): New
function.
(minibuffer-hide-completions): Call it.
* lisp/simple.el (next-column-completion): Call it (bug#81635).
* test/lisp/minibuffer-tests.el
(completion-auto-select-test-bug81635): New test.
completion-pcm-try-completion always moved point to the last
wildcard in the string which could still be expanded to match a
completion. However, if the desired completion has an empty
string at the site of that wildcard, there's nothing the user
could usefully type to continue completion there. So, it's
better to move point to last wildcard where all the possible
completions have non-empty text, if there is such a wildcard.
* lisp/minibuffer.el (completion-pcm--string->pattern): Don't
replace 'any-delim with 'prefix when
completion-pcm-leading-wildcard is non-nil: too aggressive.
(completion-pcm--merge-completions): Push 'nonempty' when all
completions are nonempty at this wildcard (bug#81629).
(completion-pcm--merge-try): Move point to the last 'nonempty'.
* test/lisp/minibuffer-tests.el (completion-pcm-test-anydelim)
(completion-substring-test-5): Update for new behavior.
* lisp/treesit.el (treesit-simple-indent-presets):
Replace (match-beginning 1) with (skip-syntax-forward "-"), both
returns the position of the beginning of the prefix, but
skip-syntax-forward always works regardless whether
adaptive-fill-regexp has a match group for the prefix.
* exec/configure.ac (exec_cv_ld_supports_rosegment): Detect
whether ld supports --rosegment.
If so, specify it in order that the executable header may not be
combined with .text so as to produce excessively large loader
executables. (bug#81211)
* lisp/progmodes/elisp-mode.el (xref-backend-xref-kinds):
Use 'defun' as the kind symbol for functions, so we're able to
distinguish nil values, making the "&optional kind" argument
possible.
(xref-backend-identifier-completion-predicate): Return either the
previous default predicate (extracted from the completion table)
or the predicate appropriate to KIND. Return functions symbols
where possible rather than a big lambda with cl-ecase inside.
Both changes in theory improve performance; not measured.
(xref-backend-identifier-completion-table): Just return obarray.
* lisp/progmodes/xref.el
(xref-backend-identifier-completion-predicate): Rename from
'xref-backend-identifier-kind-predicate' and make KIND optional.
(xref-read-identifier): Accept KIND instead of opaque PREDICATE,
call the new generic function.
(xref-find-by-kind): Move that call from here, remove outdated
commentary.
* lisp/eshell/esh-cmd.el (eshell-lexical-binding): New option.
(eshell--eval): New defsubst...
(eshell-do-eval, eshell-exec-lisp):
* lisp/eshell/esh-var.el (eshell-parse-variable-ref):
* lisp/eshell/em-banner.el (eshell-banner-initialize): ... use it.
* lisp/eshell/em-ls.el (eshell-ls-applicable): Evaluate form using
lexical binding.
* test/lisp/eshell/esh-cmd-tests.el (esh-cmd-test--binding-check): New
function.
(esh-cmd-test/lexical-binding, esh-cmd-test/dynamic-binding): New tests.
* etc/NEWS: Announce this change.
This is implemented with a slightly-different syntax via Lisp pipelines.
* doc/misc/eshell.texi (Bugs and ideas): Remove idea about "output
translators".
* lisp/files.el (make-empty-file): Remove superfluous existence
check; 'write-region' with 'excl' already checks for existence
without TOCTTOU. Don't check whether the parent directory exists;
'make-directory' already does the right thing.
Crucially, we need to pass 'excl' to 'write-region' so that the file is
opened in exclusive mode; this is the only way to avoid TOCTTOU errors.
Furthermore, the command errorneously created a parent directory even if
the PARENT argument is nil.
Add unit tests to cover these cases, including a TOCTTOU test.
* lisp/files.el (make-empty-file): Only create parent directories
when requested. Open output file in exclusive mode.
* test/lisp/files-tests.el (files-tests--make-empty-file--exists)
(files-tests--make-empty-file--parent-missing)
(files-tests--make-empty-file--tocttou): New unit tests.
;; * etc/ERC-NEWS: Revise wording from recent mechanical change.
* lisp/erc/erc-match.el (erc-match--opt-pat-cache, erc-pals, erc-fools):
Update doc.
(erc-dangerous-host-highlight-type): Remove nonsensical
`nick-or-mention' value introduced for ERC 5.7 and Emacs 32 via
bug#73798. It doesn't make sense to highlight mentions of a dangerous
host, only its associated nicknames, which ERC has no knowledge of.
(erc-match--opt-pat-get): Apply `sxhash-equal' to input in order to
protect keys from retroactive mutation. Otherwise, a user applying
`setcar' to a cached `erc-fools' value could corrupt the cache.
(erc-match-mention-beg-rx-sexp, erc-match-mention-any-rx-sexp): New
variables to expose how ERC looks for "addressees" in a message body.
(erc-match--opt-pat-make-addr-beg): Defer to
`erc-match-mention-beg-rx-sexp' variable for regexp.
(erc-match--opt-pat-make-addr-end, erc-match--opt-pat-make-addr-any):
Rename former to latter and use `erc-match-mention-any-rx-sexp' for
regexp.
(erc-match--user-nuh-or-mention-p): Use updated function name.
(erc-match-highlight-by-part): Use `match-data' to detect the "last
thing searched" by the predicate.
* test/lisp/erc/erc-match-tests.el
(erc-match-message/fool/nick-or-mention): Remove test associated with
nonexistent value `nick-or-mention' for option
`erc-dangerous-host-highlight-type'.
(erc-match--opt-pat-cache): Use updated function name, sort character
alternatives in bracket expression, update format of expected output to
include hashes.
;; (erc-match-tests--hl-type-nick)
;; (erc-match-message/fool/nick)
;; (erc-match-message/dangerous-host/nick/legacy)
;; (erc-match-tests--hl-type-message)
;; (erc-match-message/dangerous-host/message)
;; (erc-match-message/dangerous-host/message/legacy)
;; (erc-match-tests--hl-type-all)
;; (erc-match-message/fool/all)
;; (erc-match-message/dangerous-host/all/legacy)
;; (erc-match-tests--hl-type-nick-or-keyword)
;; (erc-match-tests--hl-type-keyword): Use realistic value for
;; option `erc-dangerous-hosts'.
* lisp/eshell/esh-worker.el (eshell-map-lines-worker)
(eshell-apply-lines-worker): New structs.
(eshell-map-lines-worker--apply): New generic function.
(eshell-output-object-to-target, eshell-close-target): New methods.
(eshell/map-lines, eshell/apply-lines): New functions.
* test/lisp/eshell/esh-worker-tests.el (eshell-test-line-number): New
defvar...
(eshell-test-number): ... use it in this new function.
(esh-worker-test/map-lines/eshell-one-line)
(esh-worker-test/map-lines/eshell-multiple-lines)
(esh-worker-test/map-lines/eshell-multiple-batches)
(esh-worker-test/map-lines/external-one-line)
(esh-worker-test/map-lines/external-multiple-lines)
(esh-worker-test/map-lines/numbers)
(esh-worker-test/map-lines/numeric-conversion)
(esh-worker-test/apply-lines/eshell-one-line)
(esh-worker-test/apply-lines/eshell-multiple-lines)
(esh-worker-test/apply-lines/external-one-line)
(esh-worker-test/apply-lines/external-multiple-lines)
(esh-worker-test/apply-lines/numbers)
(esh-worker-test/apply-lines/numeric-conversion): New tests.
* lisp/eshell/esh-worker.el:
* test/lisp/eshell/esh-worker-tests.el: New files.
* lisp/eshell/esh-cmd.el (eshell-lisp-command): Call 'eshell-get-pipe'
when the command is a pipe target.
* lisp/eshell/em-basic.el (eshell/echo): Mark as producing literal
results.
* lisp/eshell/esh-cmd.el (eshell-lisp-command): Don't try to call a
literal lambda.
* test/lisp/eshell/esh-cmd-tests.el (esh-cmd-test/literal-lambda): New
test.
When the backend allows, of course.
* lisp/progmodes/elisp-mode.el
(xref-backend-identifier-kind-predicate): One implementation.
(xref-backend-xrefs-by-kind): Make sure generic functions and
methods are recognized as "functions" too.
* lisp/progmodes/xref.el (xref-backend-identifier-kind-predicate):
New generic function.
(xref-find-by-kind): Use it here.
(xref-read-identifier): New argument PREDICATE.
Among other potential benefits, this makes e-p-m work correctly in all
comint-based modes.
* lisp/elec-pair.el (electric-pair-field-search-size): New variable.
(electric-pair-post-self-insert-function): Tweak, call
electric--pair-psif-1 (electric--pair-psif-1): New helper from old
electric-pair-post-self-insert-function.
* etc/NEWS: Call out change.
* lisp/comint.el (electric-pair-field-search-size): Forward declare.
(comint-mode): Set electric-pair-field-search-size to 1000.
* test/lisp/electric-tests.el (preserve-balance)
(preserve-balance-not-across-fields): New tests.
Co-authored-by: João Távora <joaotavora@gmail.com>
* lisp/window.el (quit-restore-window): Size back window only if
the combination type stored in the new fifth subslot of the
‘quit-restore-prev’ or 'quit-restore' parameter's first slot
matches the actual combination type of the window (Bug#81614).
(split-window): Don't bother about size values in the
'quit-restore' parameter - 'split-window-below' and
'split-window-right' don't copy them any more.
(split-window-below, split-window-right): Do not copy the
'quit-restore' parameter of the window to split to the new
window. It causes more harm than contribute anything useful
(Bug#78835).
(display-buffer-record-window): Store window combination type in
new fifth subslot of second slot of 'quit-restore-prev' or
'quit-restore' parameter.
(display-buffer-use-some-window)
(display-buffer-use-least-recent-window): Size back window only
if the combination type stored in the new fifth slot of the
‘quit-restore’ parameter's second slot matches the actual one.
* src/window.c (window_discard_buffer_from_window): Rename
"quad" to "quint" to follow addition of new fifth subslot of
second slot of 'quit-restore-prev' and 'quit-restore'
parameters.
* lisp/progmodes/eglot.el (xref-backend-xref-kinds):
Add :prompt-format to the entries.
* lisp/progmodes/xref.el (xref-backend-xref-kinds):
Allow also :prompt-format, optionally.
(xref-find-by-kind): Use it here.
* lisp/progmodes/xref.el (xref-find-by-kind):
Also add "by" to the first prompt.
* lisp/icomplete.el (icomplete-kill-candidate): New generic function.
(icomplete-fido-kill): Use it instead of hardcoding support for
files and buffers.
1) lines beginning with "*" are aligned to the first "*"
2) lines following the first or blank lines are indented three spaces
3) other lines are aligned to the previous line
* lisp/progmodes/c-ts-mode.el (c-ts-mode--simple-indent-rules): Improve
block comment indentation. (Bug#81533)
* test/lisp/progmodes/c-ts-mode-resources/indent.erts: Adjust test
data to new behavior.
* src/image.c (canvas_apply_data): Locate and open binary image
files with `image_find_image_fd' and do not close it after it is
read by slurp_file, which does so itself.
* src/w32fns.c (w32_wnd_proc): Set the font of the composition
window using 'w32_system_remap_font'.
* src/w32term.c (w32_draw_window_cursor): Update
'w32_system_remap_font' by using 'lookup_basic_face' to obtain the
face ID of a remapped face.
* src/w32term.h (w32_system_remap_font): Add declaration.
(Bug#68339)
Canvas images support efficient updating and refreshing. An image
specifier with ':type canvas' creates a canvas image. The canvas has an
associated writable pixel buffer. After changing the ':data' vector or
writing to the pixel buffer a call to 'canvas-refresh' redraws the
canvas image. See bug#80281.
Co-Authored-By: Divya Ranjan <divya@subvertising.org>
Co-Authored-By: Daniel Mendler <mail@daniel-mendler.de>
Canvas changes:
* doc/lispref/display.texi (Images): Add Canvas Images to menu.
(Canvas Images): New node documenting canvas image objects, the
`:data-width', `:data-height', `:data' and `:file' properties, and
`canvas-refresh'.
* doc/lispref/elisp.texi (Top): Reference new Canvas Images node.
* doc/lispref/internals.texi (Writing Dynamic Modules): Add Module
Canvas API to menu.
(Module Canvas API): New node documenting `canvas_data' module function.
* etc/NEWS: Announce the addition.
* lisp/image.el (create-image): Add `:id' to image specification of
canvas images.
* src/dispextern.h (struct image): Add `refresh', `original_width' and
`original_height' fields.
(redraw_image_glyphs, canvas_data): New prototypes.
* src/emacs-module.c (module_canvas_data): New function.
(initialize_environment): Register `canvas_data' module function.
* src/image.c (struct canvas): New struct for canvas.
(canvas_prepare_for_display, canvas_free_unused): New forward
declarations.
(prepare_image_for_display): Call `canvas_prepare_for_display' when the
canvas refresh counter has changed. Set image `original_width' and
`original_height'.
(filter_image_spec): Exclude `:data' from the image cache key for canvas
images, so mutating the data vector in place does not create a new cache
entry.
(Fclear_image_cache): Call `canvas_free_unused'.
(image_set_transform): Use CAIRO_FILTER_GOOD instead of
CAIRO_FILTER_BEST for canvas images, for performance. Do not set image
`original_width' and `original_height'.
(canvas_image_p, canvas_free_unused, canvas_apply_data, canvas_get)
(canvas_parse, canvas_load, canvas_prepare_for_display, canvas_data):
New functions implementing canvas creation, resizing, and reloading of
`:data' or `:file' content.
(Fcanvas_refresh): New defun `canvas-refresh', with an optional
RELOAD-DATA argument to reread `:data' or `:file'.
(initialize_image_type, syms_of_image): Register the `canvas' image type
and `canvas-refresh'.
* src/module-env-32.h (canvas_data): New prototype.
* src/nsimage.m (ns_image_reset): New function to recreate an NS pixmap
to update the canvas.
* src/nsterm.h: Add prototype for `ns_image_reset'.
* src/xdisp.c (redraw_image_glyphs_window)
(redraw_image_glyphs_window_tree, redraw_image_glyphs): New functions to
redraw only the glyphs referencing a given canvas image spec, falling
back to a full frame redraw if the frame is garbaged.
* test/src/emacs-module-resources/mod-test.c (mod-test-canvas-read)
(mod-test-canvas-write, mod-test-canvas-invalid): New helper functions.
* test/src/emacs-module-tests.el (test-canvas-gen-file)
(mod-test-canvas/valid, mod-test-canvas/invalid, mod-test-canvas/vector)
(mod-test-canvas/vector-reload, mod-test-canvas/unibyte)
(mod-test-canvas/file, mod-test-canvas/gc-stress): New tests.
* lisp/paren.el (show-paren--snap): New function.
(show-paren--default): Call 'show-paren--snap' to move out of
comments and strings before narrowing and matching. (Bug#81611)
Copyright-paperwork-exempt: yes
* lisp/progmodes/xref.el (xref-find-by-kind): Delete " of" from
the identifier prompt. I've gone back and forth on this - it
reads a bit better with Eglot (LSP kinds) but does not fit the
Elisp backend.
* lisp/progmodes/eglot.el (xref-backend-xref-kinds)
(xref-backend-xrefs-by-kind): Eglot implementations.
* lisp/progmodes/elisp-mode.el (xref-backend-xref-kinds)
(xref-backend-xrefs-by-kind): Elisp-mode implementations.
* lisp/progmodes/xref.el (xref-backend-xref-kinds)
(xref-backend-xrefs-by-kind): New generic functions.
(xref-prompt-for-identifier): Add 'xref-find-by-kind'.
(xref--find-xrefs, xref--find-definitions):
Change KIND to METHOD, and pass it on.
(xref--create-fetcher): Change KIND to METHOD and add SOURCE-NAME.
(xref--not-found-error): Change KIND to SOURCE-NAME.
(xref-find-by-kind): New command.
(xref--read-kind): New function, a helper for it.
And add new binding 'xref-find-by-kind' to esc-map.
6a6a578c38 ; * etc/PROBLEMS: Problems with resizing frames on Waylan...
165152e7cd Fix an infloop during cursor movement
e435a8e869 Merge branch 'emacs-31' of git.savannah.gnu.org:/srv/git/...
57e9e94be9 ; etc/NEWS: Minor reordering.
c5a9ed1499 vc-dir: Set major mode before popping to the buffer
aae4cb25da hs-hide-block-behavior: Fix some terminology
2b47d71922 Backport: Fix freeze in NS event handling (bug#81510)
65eff4fd4f ; Properly initialize 'package-load-list' for 'package-is...
effafd92e0 Load all dependencies when isolating a package
293eaf323a Have 'frame-deletable-p' check other frame's terminal (Bu...
The following commits were skipped:
ab5062855d ; * etc/NEWS: Move "Miscellaneous" to end of its section.
75b4b8932f ; * etc/NEWS: Copyedit.
f561bc6c37 ; * etc/NEWS: Use a non-commercial example.
The async native compilation queue can sometimes retain stale jobs
for files that no longer exist on disk (for example, when files are
removed during a package upgrade or deletion). Attempting to resolve
the target .eln filename for these missing files signals a
file-missing error.
* lisp/emacs-lisp/comp-run.el (comp--run-async-workers): Verify
source files exist before attempting to resolve their .eln paths in
the dispatch loop. In the process sentinel, wrap the compilation
block in a condition-case to catch file-missing errors and prevent
the async worker queue from stalling.
* src/w32font.c (font_supported_scripts): Fix 'tai-lue' bits.
Remove 'kanbun'. Fix 'cypriot-syllabary'. Fix 'symbol' bits.
(fill_in_logfont): Remove 'kanbun'. Don't ask for GB2312 fonts
when looking for fonts supporting Yi script on Windows 10 or
later, as that causes supporting fonts to be missed.
* lisp/international/fontset.el (script-representative-chars)
(setup-default-fontset): Add scripts which were mistakenly
omitted. Fix fontset setup for Syriac and N'ko scripts. Add
ol-onal. More symbols supported by Symbola.
* admin/unidata/blocks.awk: Special rules for U+FFFC and U+FFFD.
Map Kanbun to han. Map Vertical Forms to cjk-misc.
* lisp/progmodes/cperl-mode.el (cperl--signature-rx): Allow for a
colon before a variable name to declare a named parameter
(cperl--sloppy-signature-rx): dito
(cperl-init-faces): dito
(introduction): Delete an obsolete comment
* test/lisp/progmodes/cperl-mode-tests.el
(cperl-test-signature-rx): Add a test case for a signature with
named parameters
(cperl-test-fontify-attrs-and-signatures): Verify correct
fontification of a named parameter
* test/lisp/progmodes/cperl-mode-resources/proto-and-attrs.pl: Add
test code for named signatures
* etc/NEWS: Announce Perl 5.44 syntax support
A report touches the eol overlays whose style could be influenced by
current-ish position. Saving point and going back to it, isn't 100%
accurate (point may have moved between scheduling and multiple reports),
but it is probably more than decent. A marker would be better but
requires at least a buffer-local var for proper cleanup, which is
overkill IMO.
* lisp/progmodes/flymake.el (flymake-make-report-fn): Use
point-marker and save-excursion.
* lisp/dired-aux.el (dired-insert-subdir): Call
`dired--check-use-ls-dired' instead of inlining the body of the
removed function `dired--ls-accept-b-switch-p'.
* lisp/window.el (display-buffer-default-alist): Rewrite doc-string.
* doc/lispref/windows.texi (Choosing Window): Say how to use the
new 'display-buffer-default-alist' variable.
This fixes a bug reported on 2026-08-08 on bug-cc-mode.gnu.org.
* lisp/progmodes/cc-menus.el
(cc-imenu-objc-generic-expression): Reverse the order of the
tests in the regexp for a C function and for @implementation
(etc.), so that "@end // Classname (foo)" won't get recognised
as a C function.
(cc-imenu-objc-function): Test an ostensible "C function" for
having a ?@ at column 0. Further coding fixes to prevent ghost
entries getting appended to the function's result, and to
append all pertinent method entries.
Replace flymake-show-diagnostics-at-end-of-line with a simpler, more
powerful flymake-inline-diagnostics. The new variable has an easier name
offers the new possibilities inspired by other packages, of having only
the current diagnostic be affected by each setting..
* doc/misc/flymake.texi: Update.
* etc/NEWS: Update
* lisp/progmodes/flymake.el (flymake-annotation-style): New variable.
(flymake-inline-annotation-face)
(flymake-error-inline, flymake-warning-inline)
(flymake-note-inline): New faces.
(flymake--highlight-line)
(flymake--handle-report)
(flymake-after-change-function): Update to use new variable name.
(flymake--update-current-eol-overlay): New helper.
(flymake--eol-current-overlay): New variable.
(flymake--update-all-eol-overlays): Rename from flymake--update-eol-overlays.
(flymake-make-report-fn): Keep point stable.
(flymake--update-eol-overlays): Tweak.
(flymake--eol-overlay-summary): Rewrite.
(flymake-mode): Set post-command-hook
(flymake--update-eol-overlays): Rework.
(flymake--update-eol-overlays-1): New helper.
(flymake-diagnostic-format-alist): Enhance.
(flymake--format-diagnostic): Handle old :eol value.
(flymake-inline-annotation-face)
(flymake-error-inline)
(flymake-warning-inline)
(flymake-note-inline): New faces.
(flymake-show-diagnostics-at-end-of-line)
(flymake-end-of-line-diagnostics-face)
(flymake-error-echo-at-eol)
(flymake-warning-echo-at-eol)
(flymake-note-echo-at-eol): Deprecate
(flymake--eol-draw-fancy): Tweak geometry slightly
* lisp/replace.el (query-replace-show-preview): New user option.
(query-replace-preview): New face.
(query-replace-eval-replacement-regexp): New constant, extracted
from...
(query-replace-compile-replacement): ...here.
(replace-preview-overlays): New variable.
(replace-preview-cleanup, replace-preview-update)
(replace-preview-setup): New functions.
(query-replace-read-to): New optional argument DELIMITED-FLAG.
(query-replace-read-args): Pass the delimited flag to
'query-replace-read-to'.
* lisp/isearch.el (isearch-query-replace): Pass the delimited
flag to 'query-replace-read-to'.
* test/lisp/replace-tests.el (replace-tests--preview): New
helper.
(replace-tests-preview-update, replace-tests-preview-cleanup)
(replace-tests-preview-disabled): New tests.
* doc/emacs/search.texi (Replace): Document the preview.
* etc/NEWS: Announce it.
Outline provides two search strategies to locate headings. If
`outline-search-function' is defined, it is used to find the headings.
Otherwise, `outline-regexp' is used. Reimplement `outline-occur' as
`outline-xref' using Xref and accepting a search function. This
supports both search strategies and ensures that the headings detected
by `outline-xref' match the Outline ones.
* lisp/outline.el (outline-mode-prefix-map): Update binding.
(outline-mode-menu-bar-map): Update menu item.
(outline-occur-regexp): Remove variable.
(outline-occur): Remove function.
(outline-xref--fetch-headings, outline-xref--show-xrefs, outline-xref):
New functions (bug#81579).
* test/lisp/outline-tests.el (outline-tests--outline-occur)
(outline-tests--outline-occur-override)
(outline-tests--outline-occur-undefined-regexp): Remove tests.
(outline-tests--outline-xref-search-function)
(outline-tests--outline-xref-regexp)
(outline-tests--outline-xref-undefined): New tests.
Rename `custom-check-value` to `custom-check-values` and make it hold
a list of values whose type-check is pending. Check it in
`custom-declare-variable` rather than `custom-initialize-reset` to fix
bug#81372.
* lisp/custom.el (custom-initialize-reset): Don't type check previous
setopt values.
(custom-declare-variable): Do it here instead. Change warning message
to clarify that the erroneous value was provided in some earlier setopt call.
* lisp/cus-edit.el (setop--set): Push to the `custom-check-values` only if
we can't do the type check yet, to avoid duplicate warnings (and memory
leaks).
(setopt--set-local): Fix indentation and add FIXMEs.
* lisp/net/tramp-sh.el (tramp-remote-inotifywait-with-P): New defun.
(tramp-sh-handle-file-notify-add-watch): Use it.
* lisp/net/tramp.el (with-tramp-progress-reporter):
Let-bind `inhibit-message'.
* src/xdisp.c (move_it_in_display_line_to): Restore the
it->start_of_box_run_p flag upon exiting, to the value it had
before calling PRODUCE_GLYPHS for the last time, if the iterator
didn't move to the next display element. This prevents losing the
flag in further calls to move_it_* functions. (Bug#81570)
aec7a5c73f ; * lisp/window.el (quit-restore-window-no-switch): Fix c...
a15640e841 Warn about INFOPATH shadowing package manuals
ae9656b8b1 ; * etc/NEWS: Improve wording of a recently-added entry.
321f6a07e8 Handle transposing and rotating of dedicated windows (Bug...
7119808569 Remove overlays from package menu when performing transac...
254594306c ; Fix unbound variable warning
d5c3f053b0 ; In Elisp manual say that FRAME arg in 'frame-focus-stat...
29f292fa87 Avoid installing packages when using 'package-isolate'
# Conflicts:
# etc/NEWS
* test/lisp/image-tests.el (image--compute-map-and-original-map):
Specify the dimension of the test image in pixels which is a
DPI-independent unit, contrary to pt. (Bug#70093)
* lisp/custom.el (custom--sort-vars-1):
* lisp/language/indonesian.el:
Use ‘dependent’ rather than British spelling in internal names.
In indonesian.el, the ‘-ant’ spelling was incorrect even for UK
spelling as it was an adjective not a noun.
* lisp/emacs-lisp/package-vc.el (package-vc--clone):
Fix typo in spelling of README-elpa file name.
* lisp/vc/vc.el (vc-revert):
Use American instead of British spelling in diagnostics.
* m4/texinfo.m4 (gl_TEXINFO_INDEXING_IS_LOCALE_DEPENDENT):
Rename from gl_TEXINFO_INDEXING_IS_LOCALE_DEPENDANT. Use changed.
* lisp/net/tramp-sh.el (tramp-sh-handle-file-notify-add-watch):
Use -P and --format= arguments for inotifywait.
(tramp-sh-inotifywait-process-filter): Read cookie.
* lisp/speedbar.el (speedbar-directory-unshown-regexp)
(speedbar-file-unshown-regexp): New choice for nil to not hide
anything.
(speedbar-file-lists): Check that the user options
'speedbar-directory-unshown-regexp' and
'speedbar-file-unshown-regexp' are strings before using them.
Raise a user-error if their non-nil value is not a string.
* etc/NEWS: Announce the changes.
* lisp/window.el (display-buffer): In doc-string mention
new variable 'display-buffer-default-alist'.
* doc/lispref/windows.texi (Choosing Window)
(Buffer Display Action Alists): Mention new variable
'display-buffer-default-alist' in a few more places.
Problem reported by Jonathan Mitchell (bug#81554).
Also, clean up the const situation elsewhere, e.g.,
with Motif toolkit, and with no X toolkit.
* configure.ac (_CONST_X_STRING): New macro, when using X11.
This causes most X11 include files to use ‘const char *’ for
readonly strings, rather than the ‘char *’ that was needed for K&R C.
* lwlib/lwlib-Xaw.c (xaw_generic_callback):
* lwlib/lwlib.c (lw_get_widget_value_for_widget)
(lw_internal_update_other_instances):
* lwlib/xlwmenu.c (openXftFont):
* src/xdisp.c (update_redisplay_ticks):
Use char const *, not char *, for readonly strings.
* lwlib/lwlib-Xm.c (update_one_menu_entry):
A cast is needed now that XtName returns char const *,
in a context where Motif wants char *, not String.
* lwlib/xlwmenu.c (openXftFont): Put newly allocated string
into its own local variable, so that main local can be char const *.
* src/emacs.c (android_emacs_init):
* src/xterm.c (x_term_init):
Pacify both -Wuseless-cast and -Wdiscarded-qualifiers.
* src/widget.c (resources, emacsFrameClassRec):
* src/xdisp.c (update_redisplay_ticks):
* src/xfns.c (x_window):
* src/xmenu.c (create_and_show_popup_menu):
* src/xterm.c (emacs_options) [USE_X_TOOLKIT]:
Omit now-useless casts.
* src/xfns.c (Fx_file_dialog):
Use char *, not String, for a mutable string.
e54ba84245 ; * etc/PROBLEMS (Build-time problems): Discuss bug#81211.
cc210dbf14 Fix JSX tag angle-bracket pairing in tsx-ts-mode
8b521b98ed ; * etc/NEWS: Fix level of last change.
b1687dbe02 * admin/notes/jargon: Add FUD.
287187f202 pcm-try-completion: collapse ** into *
db6beef260 Distinguish UTC vs. UTC+0:00 times in iCalendar library
1b500ce5a5 Fix documentation of ':set' function in 'defcustom'
a93e0ff7b1 ; AGENTS.md, CLAUDE.md: New files.
# Conflicts:
# etc/NEWS
Add the `outline-occur' command that allows navigating the current
buffer's outline using Occur. Also add the
`display-buffer-default-alist' variable, which Lisp programs may
let-bind to specify conditional actions for nested `display-buffer'
calls.
* doc/lispref/windows.texi (Choosing Window)
(Precedence of Action Functions): Document
`display-buffer-default-alist' variable.
* etc/NEWS: Add `outline-occur' and `display-buffer-default-alist'
entries.
* lisp/outline.el (outline-mode-prefix-map): Bind `outline-occur'.
(outline-mode-menu-bar-map): Add `outline-occur' menu item.
(outline-occur-regexp): New buffer-local variable.
(outline-occur): New command.
* lisp/replace.el (occur-1): Call `display-buffer' with category.
* lisp/window.el (display-buffer-alist): Update docstring.
(display-buffer-default-alist): New variable.
(display-buffer): Handle `display-buffer-default-alist' variable.
* test/lisp/outline-resources/outline.txt: New test file.
* test/lisp/outline-tests.el: New test suite. (Bug#81512)
Co-authored-by: Martin Rudalics <rudalics@gmx.at>
Co-authored-by: Juri Linkov <juri@linkov.net>
* lisp/emacs-lisp/elisp-scope.el (elisp-scope--match-spec-to-arg):
Update to support lists of faces in :inherit. Update analyzers for
a few functions to use it.
* test/lisp/progmodes/elisp-mode-resources/semantic-highlighting.el:
Extra testing for lists of faces.
* lisp/minibuffer.el (completion--icomplete-in-buffer-p):
New function.
(completion--do-completion, completion--in-region-1):
Use it (bug#81537).
* etc/NEWS: Say that NEWS.30 advice-add isn't needed anymore.
* lisp/icomplete.el (icomplete-in-buffer): Remove advice-add
instructions.
afda8c2779 Fix vc-hg-diff arguments to diff vs empty tree
d828a19fdc Eglot: fix use of progress reporters again (bug#81514)
74ec15e768 ; Fix 'package--save-selected-packages' edge case (Bug#81...
983995b54c ; Delete obsolete comment.
d31d3245ba Fix display of ambiguous-width CJK characters in GUI sess...
cf98d9d725 Eglot: do more orthodox use of progress reporters (bug#81...
0b8d2acdd2 ; * lisp/dired-aux.el (dired-create-destination-dirs): Do...
660e2f9f6f ; * lisp/emacs-lisp/package.el (package-upgrade-all): Fix...
26e1c1792e Summarize changes when upgrading packages
ed4a3e251b Prevent 'package-menu--mark-upgrades-1' from blocking
a9fc13614e Export GIT_OPTIONAL_LOCKS=0 for "git status" invocations ...
8e70e6d687 * lisp/vc/vc.el (vc-delete-file): Don't backup backup files.
c6e2bd3e3b Restore current buffer after clone-indirect-buffer-hook e...
b21266e4cb Assign some calendar & icalendar files to packages
b6332ac21b Do not asynchronously prompt to save buffers after vc-che...
4f36e9e885 File name with newline: require 'ls' --dired switch
cba18a7f9c Fix starting local processes in the MS-Windows build
The following commits were skipped:
99a9307235 Avoid errors in 'dabbrev-expand'
7b0f33cb74 Backport: Use default exec-suffixes when needed (bug#8128...
ad60eb855d ; Improve documentation of "shadow cursor"
c6d6033360 Fix attendee lookup in gnus-icalendar
5b5cc17832 vc-working-revision: Don't bind default-directory to a re...
ab88a0be86 Fix Dired problem with nonexistent directory (bug#81509)
158a039135 ; * admin/MAINTAINERS: Mark F. Jason Park as co-maintaini...
1da79a162d ; * src/treesit.c (treesit_cursor_helper_1): Further expl...
037076824f ; * src/treesit.c (treesit_cursor_helper_1): Fix last cha...
5e3f68c669 Fix emacs-eglot test on emba
97e24e12d5 Fix C-x v w a/A on the repository root
b65f8ef93d (sh-font-lock-paren): Fix bug#81192
# Conflicts:
# etc/NEWS
* lisp/textmodes/markdown-ts-mode.el (markdown-ts--set-up): Mark
the html_tag markdown-inline embed as ':local t', matching the
sibling html_block embed. Avoids non-local range updates that
scale poorly on buffers with many inline blocks.
* src/treesit.c (treesit_lang_cache_get)
(treesit_lang_cache_put): New functions implementing a
per-session cache of resolved languages.
(treesit_load_language): Consult and populate the cache, to
avoid repeating the dlopen/dlsym and ABI-version check on every
parser creation.
* src/chartab.c (uniprop_table): Bind 'coding-system-for-read'
to 'utf-8-emacs-unix' for inserting the contents of the uni-*.el
files. This avoids crashes if the 'coding:' cookies in these
files are overridden by some means. (Bug#81445)
* lisp/vc/vc-dir.el (vc-dir--count-outgoing)
(vc-dir-async-header-values): Switch to using the overlay's main
text instead of an `after-string' so that it's clickable again.
* lisp/vc/log-edit.el (log-edit-insert-changelog-entry): Since
commit 0a714557eb 'vc-dir' does not always resolve the working
directory to its truename, but 'vc-dir-deduce-fileset' does expand
file names, so do that also when generating the list of changed
files according to the ChangeLog entry in order to prevent a
spurious failure on comparing the two lists of files.
This avoids stale temporary window titles when resizing is
initiated mechanically via Applescript or using a macOS window
manager like yabai.
* src/nsterm.m: ([EmacsView windowWillResize:toSize]): Draw
window title with new dimensions only when inLiveResize is true.
* lisp/dired.el (dired-internal-noselect): Add to the comment
about displaying a warning about literal newlines a reference to
needing the same test with subdirs.
(dired--filename-with-newline-p): If the Dired buffer has subdirs,
check these for file names with newlines.
* lisp/dired-aux.el (dired-insert-subdir): Test for file names
with literal newlines in subdirs and if there are display a
warning. Add a comment about buggy Dired display when using extra
'ls' switches on inserting a subdir, and display a temporary
warning about this (to be removed when the bug is fixed).
In commit aee0e67a we changed 'eww--alternate-urls' to
return a list of (propertized) strings rather than an alist,
but we didn't properly adapt the just-one-link branch of
'eww-read-alternate-url' accordingly.
* lisp/net/eww.el (eww-copy-alternate-url): Fix it.
Delete local variable block or prop line when it became empty
after deleting a variable. (Bug#81516)
* lisp/files-x.el (modify-file-local-variable)
(modify-file-local-variable-prop-line): Delete empty block or
prop-line.
* test/lisp/files-x-tests.el (files-x-test-add-file-local-variable)
(files-x-test-add-file-local-variable-prop-line)
(files-x-test-delete-file-local-variable)
(files-x-test-delete-file-local-variable-prop-line): New tests.
* lisp/files.el (set-auto-mode): Don't add an invalid "-mode" to
'modes', if the mode tag is empty.
(set-auto-mode-1): Make sure we return a position that is at or
after point. (Bug#81516)
* src/callint.c (Fcall_interactively): Don't use alloca'd vars after we
`unbind_to` and don't bind `current-minibuffer-command`.
* src/minibuf.c (read_minibuf): Bind `current-minibuffer-command` here.
* test/src/callint-tests.el (test-many-interactive-args):
New test (authored by Pip Cet <pipcet@protonmail.com>).
* lisp/custom.el (custom-initialize-reset): Simplify.
(custom-initialize-changed): Don't catch errors in `custom-set` (bug#81396).
(custom-initialize-delay, custom-initialize-after-file-load):
Adjust arg name to align with other `custom-initialize-*`.
* lisp/files.el (insert-directory): Reuse an existing "*ls error*"
buffer or, if there is none, generate a new one and make it
read-only (bug#80499, Message #305).
After using `edebug-remove-instrumentation' to remove Edebug
instrumentation from a command, calling that command interactively
produces a `void-function' error. This happens because Edebug does not
unwrap the command's interactive form.
* lisp/emacs-lisp/edebug.el (edebug-unwrap*): Unwrap the interactive
form of an `interpreted-function'. (Bug#81438)
The following commits were skipped:
30539fe149 Backport: ; Fix last change, again
7cc260dddd Backport: ; Fix last change
0448b4e09a Backport: Fix 'with-tramp-progress-reporter' (bug#81455)
1bdbdade6b Merge branch 'emacs-31' of git.savannah.gnu.org:/srv/git/...
f8d7f87e73 ; * ChangeLog.5: Remove an entry which shouldn't have bee...
1c042fa0b1 Fix discarding user edits after async commit completes (b...
The 'annotation-function' used by 'eww-read-alternate-url'
assumed, for alignment purposes, that completions are shown
in one column, one completion per line. But that doesn't
hold with the default value of 'completions-format'.
This commit fixes the issue by using ':width' space specs
for alignment instead of ':align-to'.
While we're at it, simplify a bit and switch to an
'affixation-function', so alignment adapts to the current
completions (those that match the current input string).
* lisp/net/eww.el: Move 'provide' form to bottom.
(eww--alternate-urls): Simplify using 'seq-keep'.
Return propertized strings instead of an alist.
(eww--alternate-urls-affixation): New function.
(eww-read-alternate-url): Use it.
* test/lisp/calendar/icalendar-recur-tests.el:
(ict:recur-tz-observance-on):
* test/lisp/gnus/gnus-icalendar-tests.el (gnus-icalendary-byday):
Skip these tests, which use timestamps before 1970, if the
platform does not support that, e.g., unsigned 32-bit time_t,
or signed 32-bit time_t for timestamps before 1901.
Change the default value from current-time-list from t to nil.
This continues the transition that was begun in Emacs 29, so
that functions like current-time generate timestamps in the
more-efficient and more-consistent (TICKS . HZ) form.
* src/timefns.c: Default to false.
This pacifies gcc 16.1.1 20260515 (Red Hat 16.1.1-2)
when Emacs is configured with --enable-gcc-warnings.
* src/comp.c (load_comp_unit): Change eassert to eassume.
Recent changes to the meaning of "Pacific Time" in western Canada, along
with possible broader changes to US timekeeping in the US Sunshine
Protection bill (H.R. 139), make it advisable to avoid using examples
like "PST" in Emacs documentation as these abbreviations are too likely
to be ambiguous. Use more-stable abbreviations like "IST" and "JST".
* src/itree.c (itree_contains): Don't use ITREE_FOREACH.
It has side-effects (makes some nodes clean) which is
undesirable for this function that is used only in assertions.
Suggested by Helmut Eller <eller.helmut@gmail.com>.
(itree_remove): Use `itree_validate`.
* src/keyboard.c (Fposn_point): Doc and commentary fixes.
* test/src/keyboard-tests.el (keyboard-tests-keymap-property): New
test, taken from reproduction recipe by Spencer Baugh
<sbaugh@janestreet.com>. (Bug#81386)
'current-active-maps' called POSN_BUFFER_POSN to get the buffer
location out of a position list. But POSN_BUFFER_POSN is not
correct: to get the buffer location you need the more
complicated logic in 'posn-point', you can't just take the 5th
element of POSN. Fix it by calling 'posn-point' instead, which
is now moved to C for this purpose.
* src/keyboard.c (Fposn_point): New function, moved from
subr.el.
(syms_of_keyboard): Defsubr it.
* lisp/subr.el (posn-point): Delete; moved to C.
* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): Add the
new C implementation of 'posn-point'.
* src/keymap.c (Fcurrent_active_maps): Call 'posn-point' instead
of 'POSN_BUFFER_POSN'. (Bug#81386)
* lisp/calendar/timeclock.el (timeclock-use-24hr-format): New defcustom.
(timeclock-time-format): New function.
(timeclock-status-string, timeclock-when-to-leave-string)
(timeclock-generate-report): Call timeclock-time-format to format
displayed times. (Bug#81440)
* etc/NEWS: Document the change.
* test/lisp/calendar/timeclock-tests.el: New file.
Make the d_reloc variable internal instead of external. For Lisp code
like
(defun foo () 'abc)
the generated code used to look like
// Pseudo code:
extern Lisp_Object d_reloc[NCONST];
Lisp_Object foo (void) { return d_reloc[OFFSET_OF_ABC]; }
// Assembler code:
0000000000001100 <F666f6f_foo_0>:
1100: mov 0x2ec1(%rip),%rax # 3fc8 <d_reloc-0x1b8>
1107: mov (%rax),%rax
110a: ret
the new version looks like:
// Pseudo code:
static Lisp_Object d_reloc[NCONST];
extern Lisp_Object *d_reloc_addr (void) { return d_reloc; }
Lisp_Object foo (void) { return d_reloc[OFFSET_OF_ABC]; }
// Assembler code:
0000000000001120 <F666f6f_foo_0>:
1120: mov 0x3059(%rip),%rax # 4180 <d_reloc>
1127: ret
where the function d_reloc_addr is used to initialize the d_reloc array
and comp_unit->data_relocs. Note that the assembler code has one load
less in the new version. (This is only true for ELF; PE and Mach-O
don't need the indirection in the old version.)
* src/comp.c (DATA_RELOC_ADDR_SYM, DATA_RELOC_EPHEMERAL_ADDR_SYM): New
symbols.
(declare_imported_data_relocs): Create the internal variable and the
external function.
(declare_imported_data): Supply the symbols for the functions.
(find_relocs): New function.
(check_comp_unit_relocs, load_comp_unit): Use it instead of a plain
dynlib_sym.
(ABI_VERSION): Bump version to 13.
* lisp/emacs-lisp/find-func.el (find-func--regexp-of-symbol-name):
New function.
(find-function-search-for-symbol): Use it to find shorthands.
* lisp/emacs-lisp/cl-generic.el (cl--generic-search-method):
Find method defined with shorthands (and funny chars).
* src/lread.c (Fintern, Fintern_soft, Funintern): Don't obey
`read-symbol-shorthands` any more.
* lisp/emacs-lisp/shorthands.el (shorthands-of-symbol): New function,
adapted from `elisp--read-symbols-shorthands`.
(shorthands-to-longhand, shorthands-intern, shorthands-intern-soft)
(shorthands-unintern): New functions.
(shorthands-font-lock-shorthands): Use `shorthands-intern-soft`.
* lisp/progmodes/elisp-mode.el (elisp-context-menu)
(elisp--company-doc-buffer, elisp--company-doc-string)
(elisp--company-location, elisp--company-kind)
(elisp--company-deprecated, xref-backend-definitions)
(elisp--xref-find-definitions, eval-sexp-add-defvars)
(elisp--current-symbol): Use `shorthands-intern(-soft)`.
(elisp--read-symbol-shorthands): Use `shorthands-of-symbol`.
(elisp-completion-at-point): Use the `elisp--longhand` to simplify.
Use `shorthands-intern(-soft)`.
* lisp/minibuffer.el (completion-shorthand-try-completion):
Simplify using `shorthands-to-longhand`.
* lisp/emacs-lisp/lisp-mode.el (lisp-indent-function):
* lisp/thingatpt.el (symbol-at-point): Use `shorthands-intern(-soft)`.
* test/src/lread-tests.el (lread-unintern):
Use `shorthands-(un)intern(-soft)`.
Preserve comments in hunk headers (usually a function name).
* lisp/vc/diff-mode.el (diff-unified->context): Parse the comment in the
hunk header and insert it in the corresponding hunk header in the
context diff.
(diff-context->unified): Change analogously.
* test/lisp/vc/diff-mode-tests.el (diff-mode-tests-undo-unified->context):
New test.
(diff-mode-tests--context-patch, diff-mode-tests--unified-patch): New
variables.
Discovered by choroba, reported via GitHub:
https://github.com/HaraldJoerg/cperl-mode/issues/28
* lisp/progmodes/cperl-mode.el
(cperl-electric-pod, cperl-linefeed, cperl-find-pods-heres):
Remove "=end" from regular expressions. "=end" is the end-of-POD
indicator in Raku (formerly called Perl6) but not in Perl.
With DOCLANGS='default fr', the top-level doc targets ran a sub-make
in every doc directory once per language. The Makefiles of the
directories without translations (emacs, lispintro, lispref) ignore
DOCLANG, so the non-default sub-make repeated the default-language
build, and under "make -j" two sub-makes produced the same outputs
concurrently, failing intermittently with:
cp: cannot create regular file '../../info/cons-2a.txt': File exists
* Makefile.in (FILTER_DOCLANGS): New function: languages from
DOCLANGS to build for a doc directory, the default language when
present in DOCLANGS plus every language that has translations for
this directory (doc/translations/<lang>/<dir>). Do not force the
default language when DOCLANGS omits it. Suggested by Vincent
Belaiche <vincentb1@users.sourceforge.net>.
(MAKE_DOC): Take the list of languages as a second argument and use
it instead of DOCLANGS.
The previous bug#81332 fix made info/dir depend on doc/misc/NAME.texi
names derived from INFO_COMMON. For the manuals whose source is .org
(modus-themes, org), these .texi files are generated and do not exist
in a fresh checkout, and there is no rule to build them at this level,
so building Emacs fails with:
make[1]: *** No rule to make target 'doc/misc/modus-themes.texi',
needed by 'info/dir'. Stop.
* Makefile.in (srcdir_doc_info_dir_inputs): For the default language,
depend on the actual sources reported by doc/misc echo-sources
(texi_misc_default), which lists .org sources for the org-based
manuals; make-info-dir extracts dir entries from both formats.
(GET_DOC_SRC): Only handle translated languages; drop the mapping of
default translation names to doc/misc .texi names.
Also amend the doc string of defun-prompt-regexp. This fixes
bug#81401.
* lisp/progmodes/sh-script.el (sh-base-mode): Amend the value
of 'defun-prompt-regexp' to use a "negative" rather than a
"positive" list of characters.
* lisp/emacs-lisp/lisp.el (defun-prompt-regexp). Amend the doc
string for clarity.
Gnulib added AT_EMPTY_PATH support to its 'fstatat', but
the MinGW build must use its own 'fstatat' implementation.
These changes avoid compiling Gnulib's fstatat.c, and add
support for AT_EMPTY_PATH to the MinGW implementation.
* src/w32.c (fstatat): Support AT_EMPTY_PATH.
* nt/inc/unistd.h (AT_EMPTY_PATH): Define.
* nt/mingw-cfg.site (gl_cv_func_fstatat_null_file): Set to 'yes'
to avoid compiling Gnulib's fstatat.
Gnulib deprecated the crypto/af_alg module,
following the deprecation of the AF_ALG API in Linux 7.2.
This means Emacs needs to do less work to avoid using it.
* admin/merge-gnulib (AVOIDED_MODULES):
Remove crypto/af_alg as we no longer need to avoid it.
* configure.ac (emacs_files): Omit lib/af_alg.h.
* lib/af_alg.h: Remove; no longer used.
* lib/gnulib.mk.in: Regenerate.
When end-of-defun is invoked with argument < -1 after the end of
defun, and there is some text between the end of defun and
point, the result is off by 1 (Bug#81305).
* lisp/emacs-lisp/lisp.el (end-of-defun): Always move point to
beg.
* test/lisp/emacs-lisp/lisp-tests.el (end-of-defun-twice): Add
test case.
Create a version of 'pcase-let*' that signals an error when a 'pcase'
pattern does not match its corresponding value.
* lisp/emacs-lisp/pcase.el (pcase--let*): Add the optional argument
'strict' to generate code for signaling an error when a 'pcase'
pattern does not match its corresponding value.
* lisp/emacs-lisp/pcase.el (pcase-let*-strict): Add the new macro.
* test/lisp/emacs-lisp/pcase-tests.el (pcase-tests-let*-strict):
Add new test.
* etc/NEWS (Pcase): Add heading for 'pcase'.
* etc/NEWS (Add 'pcase-let*-strict'): Add news entry for new macro.
This year British Columbia and Alberta moved one time zone east,
discarding daylight saving time, and it’s possible that more of North
America will follow suit. Adjust doc strings and manual to be
more robust in the presence of these changes.
* src/pdumper.c (DUMP_RELOCATION_ALIGNMENT): Now alignof
(Lisp_Object) on all platforms. This supports larger offsets on
many platforms, and does not shrink the maximum supported offset
on any known platform. See Bug#44531.
407de5142c Port pdumper to m68k
0818bb3eb3 ; * etc/NEWS: Presentational fixes and improvements.
f620924322 ; Improve doc-strings of window rotation commands
937de3fa92 ; Fix typos in preceding commit
48a481ac8d ; Improve documentation of window-rotation commands
afc5fc709b browse-url-with-browser-kind: Use strings for DEF
4be321d511 Fix issues related to window layout changes (Bug#81406)
86b65d82c7 Turn off combination resizing in 'window--transpose-1' (B...
7a9c004924 ; Clarify documentation of 'filter-buffer-substring'
b6412271e1 Fix copy-by-mouse in *Backtrace* buffers
eebc9c7fe7 ; * etc/DEBUG: Info about -g3 on OpenBSD (bug#81109).
2b8aa16b0b Support javascript "using" keyword (bug#81351)
# Conflicts:
# etc/NEWS
1e986295f4 ; * etc/PROBLEMS (Android): Document problems with Leim (...
af7f189e0a ; Clarify documentation of 'define-globalized-minor-mode'
9ebc5b9d93 Ensure the correct current buffer in completions--backgro...
d0bd9b39a3 ; completion-pcm-bug80914: Only look at the car of the list.
8e5c0386f1 Improve eldoc-help-at-pt docstrings
f9a8c61f50 Fix 'eldoc-show-help-at-pt'
7621ee1d01 Fix uninit read in Android TrueType font scan
95ab9ef627 Fix OOB read in Android TrueType font scan
4ccf2584e3 Have 'replace-buffer-in-windows' remove BUFFER-OR-NAME ev...
0b30e299f5 Fix test breakage in files-tests
549d2f8637 Check for a live buffer in 'quit-restore-window'
* doc/translations/default/misc/info_common.mk,
* doc/translations/fr/misc/info_common.mk: Moved to `misc'
subdirectory, in order to account that `INFO_COMMON' content
depends on the subdirectory.
* doc/misc/Makefile.in: `info_common.mk' is moved.
* Makefile.in (GET_DOC_SRC): `info_common.mk' is moved and
`srcdir_doc_info_dir_inputs' computation is fixed with correct
conversion of default translation path.
* lisp/mail/rmail.el (rmail): Bind 'auto-mode-alist' to nil
while visiting the Rmail file, so that filename-based major mode
selection does not invoke 'rmail' recursively. (Bug#81368)
* lisp/woman.el (woman-topic-history): Make it an obsolete
variable alias.
(woman-file-name): Use 'Man-topic-history' instead of
'woman-topic-history' (bug#81347).
* etc/NEWS: Announce the change.
* lisp/files.el (without-local-variable-queries): New macro.
* lisp/vc/diff-mode.el (diff-syntax-fontify-props):
* lisp/vc/vc-dir.el (vc-dir--count-outgoing):
* lisp/vc/vc.el (vc-find-revision-no-save): Use it.
* lisp/files.el (hack-local-variables-confirm): Warn when it
looks like the caller should have used it.
This overlapped with the existing support for a backend-specific
minor mode.
* lisp/vc/vc.el (dir-mode): Delete specification.
(vc-dir-mode): De-declare.
(vc-default-dir-mode): Delete.
* etc/NEWS: Update.
* lisp/vc/vc-dir.el (vc-dir--key-binding-hints): New variable.
(vc-dir-headers): Set it and use it. Insert a toggle button.
(vc-dir-toggle-hints): New command.
(vc-dir-mode-map): Bind it.
* lisp/vc/vc.el (dir-extra-hints, dir-mode): Specify new backend
methods.
(vc-dir-mode): Declare.
(vc-default-dir-mode, vc-default-dir-extra-hints): New
functions.
* lisp/vc/vc-dir.el (vc-dir-headers, vc-dir): Call the new
backend methods.
* lisp/cedet/ede.el (ede-turn-on-hook): Use derived-mode-p
instead of looking at major-mode directly.
* etc/NEWS: Document the new backend methods.
* lisp/mail/rmail.el (rmail-enable-multibyte): Remove it.
(rmail-mode): Do not bind 'rmail-enable-multibyte'. Do not make
the collection buffer multibyte. (Bug#81274)
(rmail-revert): Default 'coding-system-for-read' to
'no-conversion, as in 'rmail'; remove corresponding FIXME
comment.
(rmail-get-new-mail): Do not bind 'rmail-enable-multibyte'.
* lisp/files.el (auto-mode-alist): Add Rmail file pattern.
* lisp/international/mule-conf.el (file-coding-system-alist):
Add Rmail file pattern.
* doc/emacs/rmail.texi (Rmail Files): Document that "RMAIL" and
"*.rmail" files now visit in Rmail mode automatically.
* etc/NEWS: Announce the changes.
* test/lisp/mail/rmail-tests.el
(rmail-mode-makes-collection-buffer-unibyte): New test.
* lisp/emacs-lisp/elisp-scope.el
(elisp-scope--analyze-function-args): New helper function.
(elisp-scope-define-function-spec): New macro.
Convert simple function analyzers to use it.
* etc/NEWS: Announce it.
Many analyzers (those defined with
'elisp-scope-define-analyzer' and friends) are appropriate
for more than one function/macro. Before this commit, our
way of reusing an analyzer was to do this:
;; Define analyzer for `foo'
(elisp-scope-define-function-analyzer foo (...) ...)
;; Reuse it for `bar'
(put 'bar 'elisp-scope-analyzer #'elisp-scope--analyze-foo)
This isn't a good solution for users/packages that want to
reuse their custom analyzers, because it relies on too many
brittle internal implementation details.
This commit provides a nicer solution: we generalize the
analyzer-defining macros so they can take a list of symbols
and directly associated the defined analyzer with all of
the given symbols. So the above example is simplified to:
(elisp-scope-define-function-analyzer (foo bar) (...) ...)
* lisp/emacs-lisp/elisp-scope.el (elisp-scope-define-analyzer):
Accept either a symbol or a list of symbols, and register
the analyzer function for each symbol in the list (bug#81355).
(elisp-scope--define-function-analyzer)
(elisp-scope-define-function-analyzer)
(elisp-scope-define-macro-analyzer)
(elisp-scope-define-special-form-analyzer): Likewise.
Convert all call sites that used to register extra symbols
via separate 'put' calls to use this new feature instead.
* etc/NEWS: Announce it.
* lisp/vc/log-edit.el (log-edit-insert-changelog-entry): New function.
(log-edit-insert-changelog-entries): Use it when all log entries
come from the same ChangeLog file or buffer.
* test/lisp/vc/vc-tests/vc-test-misc.el
(vc-test-log-message-from-changelog): New test.
* doc/emacs/maintaining.texi (VC With A Merging VCS):
(Log Buffer): Document improved creation of commit messages from
ChangeLog. Improve documentation of *vc-log* header lines.
Document 'log-edit-hook'.
(VC Directory Commands): Correct documentation of 'M' and 'U'.
Document determination of current VC fileset without marking.
(Format of ChangeLog): Improve documentation of multi-item entries.
* etc/NEWS: Announce user-facing changes.
388adcc570 Finish reverting experiment with proportional font on mod...
7746db313a CC Mode: Fix erroneous type: arguments to two defcustoms.
ba7c04d26c ; Fix double docstring in a test
82009df4de Fix initials completion style after // in file name
6b31360a31 Fix c-pcm-try-completion with boundaries completion
e560eacf6d In pgtk_free_frame_resources transfer keyboard focus to p...
6f9ac7ffdb Fix fullscreen state handling for PGTK (Bug#81165, Bug#81...
727a57d971 ; Don't autoload 'define-multisession-variable'
d1c3ba95cb * lisp/progmodes/project.el: Update Commentary.
5fde9732b4 Localize cache invalidation to project-try-vc
707b0ba0f4 Fix project--clear-cache and project--value-in-dir in spe...
ba7d2b8232 * admin/notes/jargon: Add TTTT.
bcb83d7d2a Fix error handling in Tramp delete-{file,directory}
7b812bc38a Don't use window manager activation when a child frame ha...
b8f71a6011 Compile User Lisp files after adjusting 'load-path'
1ac2f60b53 Fix strange logic in vc-git-incoming-revision
10ae134ceb ; Add new text for xdisp.c
4d2701ecde Fix 'format-mode-line' when faces are in format string
a34c29e459 Restore frame's fullheight/fullwidth after exiting from f...
c12c91563e Fix interactive mode spec of `xwidget-webkit-end-edit-tex...
# Conflicts:
# src/xterm.c
* lisp/emacs-lisp/smie.el (smie-indent-virtual): Fall back to
'current-column' if a non-numeric symbol like 'noindent' is
encountered and display a warninig.
(smie-auto-fill, smie-config--guess-value): Check that the value
returned by smie-indent-calculate is a number before using it in
arithmetic operations. (Bug#81102)
* configure.ac (emacs_cv_android_x_or_later): Rename from
`emacs_cv_android_w_or_later', and test for attributes of
Android 17.
* doc/emacs/android.texi (Android Environment): Document new
permission `ACCESS_LOCAL_NETWORK'.
* java/AndroidManifest.xml.in: Declare permission
android.permission.ACCESS_LOCAL_NETWORK to re-enable Emacs to
access local network devices. Update `targetSdkVersion' to 37.
* java/INSTALL: Document new build-time requirements and
compatibility with recent build-tools releases.
* java/org/gnu/emacs/EmacsFillPolygon.java (perform): Use
non-deprecated variant of `Path#computeBounds'.
* src/android-asset.h (struct AAsset): <bytes_read>: New field.
(AAssetManager_open): Clear exceptions if no asset fd could be
created.
(android_asset_read_internal): Cast `buffer' to (jbyte *).
Record number of bytes read from the InputStream.
(AAsset_seek): Attempt to satisfy seek operations which do not
modify the file pointer.
* lisp/erc/erc-backend.el (erc-server-005): Add "." and "/" to regexp
for parameter keys as per the updated recommendation of the living
specification. See https://github.com/ircdocs/modern-irc/pull/251 and
the corresponding issue it closed.
* test/lisp/erc/erc-tests.el (erc-server-005): Expect slashes and
periods in parameter keys.
* doc/misc/erc.texi: Add Settings node under Modules.
* etc/ERC-NEWS: Mention new module along with function
`erc-channel-buffer-p.
* lisp/erc/erc-networks.el (erc-settings): Move to new module library
`erc-settings'.
(erc-get): Neuter completely by effectively aliasing to `ignore'.
* lisp/erc/erc-settings.el: New file.
* lisp/erc/erc.el (erc-channel-buffer-p): New function.
(erc-modules): Add `settings' to custom set.
* test/lisp/erc/erc-scenarios-settings.el: New file.
* test/lisp/erc/erc-settings-tests.el: New file.
* test/lisp/erc/erc-tests.el (erc-tests--modules): Add `settings'.
* test/lisp/erc/resources/settings/basic-sasl.eld: New file.
* test/lisp/erc/resources/settings/basic.eld: New file.
(Bug#76019)
* etc/ERC-NEWS: Mention change.
* lisp/erc/erc-button.el (erc-button-mode, erc-button-enable)
(erc-button-disable): Use `erc-with-initialized-session' instead of
`erc-mode-hook'.
* lisp/erc/erc-common.el (erc-with-initialized-session): New macro.
* lisp/erc/erc-goodies.el (erc-scrolltobottom-mode)
(erc-scrolltobottom-enable, erc-scrolltobottom-disable)
(erc-move-to-prompt-mode, erc-move-to-prompt-enable)
(erc-move-to-prompt-disable): Use `erc-with-initialized-session' instead
of `erc-mode-hook'.
* lisp/erc/erc-imenu.el (erc-imenu-mode, erc-imenu-enable)
(erc-imenu-disable): Use macro instead of `erc-mode-hook'.
* lisp/erc/erc-stamp.el (erc-stamp-mode, erc-stamp-enable)
(erc-stamp-disable): Use macro instead of `erc-mode-hook'.
* lisp/erc/erc-track.el (erc-track-mode, erc-track-enable)
(erc-track-disable): Use macro instead of `erc-mode-hook'.
* lisp/erc/erc-truncate.el (erc-truncate-mode, erc-truncate-enable)
(erc-truncate-disable): Use macro instead of `erc-mode-hook'.
* lisp/erc/erc.el (erc--set-modules-functions): New variable, an
internal hook to modify erc-modules membership.
(erc-open): Set major mode before updating modules and run
`erc--set-modules-functions'. (Bug#76019)
* etc/ERC-NEWS: New entries for the `erc-match' API and notification
options.
* lisp/erc/erc-desktop-notifications.el
(erc-desktop-notifications-ignored-when-focused): New option.
(erc-desktop-notifications-skip-predicates): New option.
(erc-notifications-notify): Address ancient comment regarding PRIVP
parameter possibly being unneeded when the current target matches the
nick.
(erc-notifications-PRIVMSG): Deprecate.
(erc-desktop-notifications-untracked-p, erc-desktop-notifications-fool-p)
(erc-desktop-notifications-focused-p): New functions for
`erc-desktop-notifications-skip-predicates'.
(erc-notifications-notify-on-match): Account for new options, and use
new `erc-match' API.
(erc-notifications-mode, erc-notifications-enable)
(erc-notifications-disable): Instead of the "PRIVMSG" response-handler
hook, use the `erc-match' API.
(erc-desktop-notifications--setup): New function.
(erc-desktop-notifications--query-NOTICE-p): New variable.
(erc-desktop-notifications-match-query): New struct type.
(erc-desktop-notifications--query-p): New function.
(erc-desktop-notifications--query-notify): New function.
* test/lisp/erc/erc-desktop-notifications-tests.el: New
file. (Bug#73798)
* doc/misc/erc.texi (Match API): New node under the Advanced chapter.
Update menus.
* lisp/erc/erc-match.el (erc-match--opt-pat-cache): New variable.
(erc-match--opt-pat-custom-set): New function.
(erc-pals, erc-fools, erc-keywords, erc-dangerous-hosts): Specify
`erc-match--opt-pat-custom-set' as `custom-set' function.
(erc-pal-highlight-type, erc-fool-highlight-type)
(erc-dangerous-host-highlight-type): Add `nick-or-mention' variant.
(erc-match-functions): New option.
(erc-add-entry-to-list, erc-remove-entry-from-list): Clear options
cache.
(erc-match, erc-match-traditional, erc-match-opt-current-nick)
(erc-match-opt-keyword, erc-match-user, erc-match-opt-fool)
(erc-match-opt-pal, erc-match-opt-dangerous-host): New struct types.
(erc-match--opt-pat-get, erc-match--opt-pat-make)
(erc-match--opt-pat-make-kw, erc-match--opt-pat-make-addr-beg)
(erc-match--opt-pat-make-addr-end, erc-match--current-nick-p)
(erc-match--keyword-p, erc-match--user-nuh-or-mention-p): New functions.
(erc-match-highlight-by-part): New generic function and methods.
(erc-match-highlight-matched): New variable.
(erc-match--instances): New variable.
(erc-match-highlight): New function.
(erc-match-get-message-body): New function.
(erc-match-get-match): New function
(erc-match--run-match): New function.
(erc-match--message): New function.
(erc-match-use-legacy-logic-p): New variable.
(erc-match-message): Move body to `erc-match--message-legacy. Rework as
thin wrapper.
(erc-match--message-legacy): New function with former body of
`erc-match-message'.
(erc-log-matches): Rework to be slightly less wasteful.
* test/lisp/erc/erc-match-tests.el (erc-match-tests--perform): Shadow
`erc-match--opt-pat-cache'.
(erc-match-message/pal/nick/legacy, erc-match-message/fool/nick/legacy)
(erc-match-message/dangerous-host/nick/legacy): New tests.
(erc-match-tests--hl-type-nick-or-mention): New function.
(erc-match-message/pal/nick-or-mention)
(erc-match-message/fool/nick-or-mention)
(erc-match-message/dangerous-host/nick-or-mention)
(erc-match-message/pal/message/legacy)
(erc-match-message/fool/message/legacy)
(erc-match-message/dangerous-host/message/legacy)
(erc-match-message/pal/all/legacy, erc-match-message/fool/all/legacy)
(erc-match-message/dangerous-host/all/legacy)
(erc-match-message/current-nick/nick-or-keyword/legacy)
(erc-match-message/keyword/keyword/legacy, erc-log-matches/legacy)
(ert-deftest erc-match--opt-pat-cache)
(erc-match-functions/api/non-parts-based)
(erc-match-functions/api/parts-based): New tests.
* test/lisp/erc/erc-scenarios-match-api.el: New file.
* test/lisp/erc/resources/match/functions/custom-match-log: New file.
* test/lisp/erc/resources/match/functions/custom.eld: New file.
(Bug#73798)
* lisp/erc/erc-button.el
(erc-button--display-error-notice-with-keys-and-warn): Use utility for
skipping past first word.
* lisp/erc/erc-fill.el (erc-fill-wrap): Use new `erc--pfx' msg-prop
interface.
* lisp/erc/erc-goodies.el (erc--command-indicator-body-find): New
function.
(erc--command-indicator-display): Add `erc--pfx' function-valued msg
prop for moving past command-indicator prompt to start of body. Stash
inserted prompt string in oneoff `erc--command-indicator' prop.
* lisp/erc/erc.el (erc--ensure-spkr-prop): Add `erc--pfx' msg prop for
finding the start of the message body after a speaker tag with the
`erc--speaker' text property.
(erc-display-message-highlight): Add `erc--pfx' functions for known
variants of the `erc-display-message' TYPE parameter, such as `notice'
and `error'.
(erc--ctcp-action-speaker-in-prefix-p): New variable.
(erc--pfx-skip-word-fwd, erc--pfx-skip-spkr-fwd)
(erc--pfx-skip-notice-fwd, erc--pfx-skip-template-fwd): New functions.
* test/lisp/erc/erc-tests.el (erc--pfx-skip-notice-fwd)
(erc--pfx-skip-template-fwd): New tests. (Bug#73798)
;; test/lisp/erc/resources/fill/snapshots/merge-01-start.eld:
;; test/lisp/erc/resources/fill/snapshots/merge-02-right.eld:
;; test/lisp/erc/resources/fill/snapshots/merge-wrap-01.eld:
;; test/lisp/erc/resources/fill/snapshots/merge-wrap-indicator-pre-01.eld:
;; test/lisp/erc/resources/fill/snapshots/monospace-01-start.eld:
;; test/lisp/erc/resources/fill/snapshots/monospace-02-right.eld:
;; test/lisp/erc/resources/fill/snapshots/monospace-03-left.eld:
;; test/lisp/erc/resources/fill/snapshots/monospace-04-reset.eld:
;; test/lisp/erc/resources/fill/snapshots/spacing-01-mono.eld:
;; test/lisp/erc/resources/fill/snapshots/stamps-left-01.eld: Update.
* doc/misc/erc.texi: Add "Modules" section to the main detailed menu.
(Modules): Promote "Local Modules" and "Module Loading" subheadings to
sections and proper nodes. Rename "Local Modules" to "Module Scope" but
retain anchor for compatibility.
(Module Example): New section under the Modules chapter.
* lisp/erc/erc-common.el (erc--with-dependent-type-match)
(erc--custom-with-type-match-features): Rename former to latter
to avoid confusion between actual Lisp types and Custom types.
* lisp/erc/erc-track.el (erc-track-faces-priority-list)
(erc-track-faces-normal-list): Use new name.
;; The problem this macro rather bluntly attempts to work around is
;; one of option values referencing symbols from libraries that
;; haven't been loaded. A general solution might be possible were
;; it not for ERC's inconsistent face and option names. Some don't
;; even reflect module aliases let alone their group or library,
;; e.g., `erc-pal-face'. If they were someday properly namespaced,
;; this macro could be replaced with a custom :match function that
;; adds temporary advice :after-until
;;
;; (compat-call plist-get (cdr (get 'face 'widget-type)) :match)
;;
;; It could then find the longest group name loaded by `cus-load'
;; that's a prefix of the face in question and then load the group's
;; `custom-loads' libraries (see `customize-read-group') with
;; `custom-load-symbol', all before trying `facep' again.
* test/lisp/erc/erc-scenarios-fill-wrap.el
(erc-scenarios-fill-wrap/right-margin-stamp-face--assert-superior): New
function.
(erc-scenarios-fill-wrap/right-margin-stamp-face): New test that fails
if the right-margin's timestamp doesn't display its face property
correctly.
* test/lisp/erc/resources/erc-scenarios-common.el
(erc-scenarios-common--run-in-term): Add control channel to run code
from the subprocess in the controlling process.
(erc-scenarios-common-term-with-line-mode): New macro.
(erc-scenarios-common--inferior-term-c2-proc): New variable.
(erc-scenarios-common-term-call-in-superior): New function. (Bug#80693)
* lisp/progmodes/prog-mode.el (prog--text-at-point-or-region-p):
New function (bug#63790, bug#81281).
(prog-fill-reindent-defun-default):
Use it instead of 'prog--text-at-point-p'.
* lisp/treesit.el (treesit-fill-reindent-defun):
Use it instead of 'prog--text-at-point-p'.
This fixes where point goes after using a marking or unmarking
command with point before the "./" entry.
* lisp/vc/vc-dir.el (vc-dir-mark-unmark, vc-dir-mark-file)
(vc-dir-unmark-file): Inline the relevant part of
vc-dir-next-line to skip the 'vc-dir--before-dotname-p'
conditional.
* lisp/vc/vc-hg.el (vc-hg--pushpull): Return the process object.
* lisp/vc/vc.el (vc-pull, vc-push): Use it.
(pull, push): Specify that it should be returned.
b365ef37b9 Fix pixels-vs-columns confusion in margin face fill (bug#...
e0185b0907 Fix ISO date insertion in diary
3c9517300e ; Tag process-test-stderr-filter :unstable on emba
422bf36847 Minor fix for 'format-mode-line'
1381479572 Improve the previous fix in toggle-window-dedicated
e486f2d975 Support tramp-rpc in filenotify-tests.el
f6a244333d ; * etc/NEWS: Presentational fixes and improvements.
c19e9ddd48 ; Improve documentation of 'emacs-lock' features
749ce42049 CC Mode: Set parse-sexp-lookup-properties for every mode
def15c1b97 Disable DMABUF and Compositing for xwidget
2c5b4911b3 ; * doc/lispref/commands.texi (Interactive Codes): More e...
ea87a99b84 ; Fix recent improvements in docs of splitting and mergin...
0ec6a3fd44 Fix failure code in 'run-hook-query-error-with-timeout'
72b8d88171 Use default-value in project--value-in-dir
b34952ee94 etags-regen--maybe-generate: No error when no project found
30fc250a26 ; * doc/lispref/frames.texi (Deleting Frames): Fix typo i...
8679bdf081 Mark ChangeLog entry as tiny change
070a3a356f VC revert: When un-adding, clear vc-backend property
c8a86c1561 ; make change-history-commit
884d7a198c Document new option 'delete-frame-choose-selected' (Bug#8...
f0bfa33039 Document 'split-frame' and 'merge-frames' in Elisp manual
0d67e76b94 Eglot: release version 1.24
f52457d17e Jsonrpc: release version 1.0.29
4f6b6f462c jsonrpc-shutdown: Ensure we wait whole timeout & increase...
# Conflicts:
# etc/NEWS
* src/emacs.c (kill-emacs): Send systemd STOPPING notification only
after calling 'kill-emacs-hook', because that hook could prevent
Emacs from exiting. (Bug#81296)
* lisp/vc/vc-dir.el (vc-dir--buffers-dolist): New macro,
factored out.
(vc-dir-resynch-file): Use it.
(vc-dir--refresh-headers): New function.
* lisp/vc/vc.el (vc-pull, vc-push): Use it.
* lisp/emacs-lisp/ewoc.el (ewoc--set-buffer-bind-dll-let*): New
debug declaration.
(ewoc-set-hf): Make it possible to set only the header or
footer.
* lisp/vc/vc-dir.el (vc-dir--set-header): New RESET-FOOTER
parameter.
(vc-dir-refresh): Pass it.
(vc-dir-process-output-limit): New variable.
(vc-dir-show-more-button)
(vc-dir-maybe-narrow-and-show-more-button): New functions.
* lisp/vc/vc-bzr.el (vc-bzr-dir-status-files):
* lisp/vc/vc-cvs.el (vc-cvs-dir-status-files):
* lisp/vc/vc-git.el (vc-git-dir-status-goto-stage):
* lisp/vc/vc-hg.el (vc-hg-dir-status-files):
* lisp/vc/vc-svn.el (vc-svn-dir-status-files): Preserve a
binding of vc-dir-process-output-limit in the delayed process.
Call vc-dir-maybe-narrow-and-show-more-button.
* lisp/vc/vc.el (dir-status-files):
* etc/NEWS: Document the change.
* lisp/vc/vc-dir.el (vc-dir--set-vc-dir-process-buffer): New
function, factored out. Also set vc-parent-buffer in the
vc-dir-process-buffer.
(vc-dir-refresh-files, vc-dir-refresh): Use it.
* lisp/vc/vc-dir.el (vc-dir-mark-all-files): When called on a
directory entry that is marked, remove the mark.
(vc-dir-unmark-file): When called on a file, at least one of whose
ancestors (i.e. containing directory entries) is marked, unmark
the nearest such ancestor and mark all descendents of that
directory that are file entries, except the file entry on which
the command is called, and leave the descendents that are
directory entries unmarked.
* test/lisp/vc/vc-tests/vc-test-misc.el (vc-test-vc-dir-next/previous)
(vc-test-vc-dir-mark/unmark-all-dir-entry): Add bug number reference.
(vc-test-vc-dir-mark-all-with-marked-directory): New test.
(vc-test--vc-dir-unmark-file): New function.
(vc-test-vc-dir-unmark-file-with-marked-directory): Use it in this
new test.
* lisp/vc/vc-dir.el (vc-dir-unmark-all-files): Confine the scope
of this command, when called on a VC Dir directory entry, to the
immediate child files of that directory. This is in accordance
with the command's doc string and makes it behave analgously to
'vc-dir-mark-all-files', whose behavior was change to be like this
much earlier.
* test/lisp/vc/vc-tests/vc-test-misc.el
(vc-test-vc-dir-mark/unmark-all-dir-entry): New test.
* lisp/vc/vc-dir.el (vc-dir--before-dotname-p): New function.
(vc-dir-next-line, vc-dir-next-directory): Use it to enable using
these commands to move point to the VC Dir root directory entry "./".
* test/lisp/vc/vc-tests/vc-test-misc.el
(vc-test-vc-dir-next/previous): New test.
* lisp/files.el (insert-directory): Set 'buffer-read-only' to t
for buffer "*ls error*", since it is only an informational buffer,
and let-bind 'inhibit-read-only' to t to write any 'ls' error
message to it (bug#80499, Message #230 and followups).
* lisp/simple.el (set-variable): Add check with 'boundp'
before using 'symbol-value'. This helps in rare cases
when used on an undefined variable name.
Correct for navigating between empty table cells which should be
respected rather than treated as blanks to skip.
* lisp/textmodes/markdown-ts-mode.el (markdown-ts--table-abutting-pos):
Fix to directly detect being in a table rather than inferring it.
* lisp/vc/vc-dir.el (vc-dir--count-outgoing): Bind
default-directory to the correct value in the idle callback, so
that we know we count the outgoing revisions for the correct
repo.
* lisp/vc/vc-dir.el (vc-dir--count-outgoing): Wrap calling
vc-incoming-outgoing-internal in a run-with-idle-timer, and put
the timer in the 'timer' overlay property.
(vc-dir-async-header-values): Document 'timer' overlay property.
(vc-dir--set-header): Cancel timers in the 'timer' overlay
property.
* doc/misc/modus-themes.org: Rewrite the manual in the interest
of clarity and consistency.
* etc/themes/modus-operandi-deuteranopia-theme.el:
* etc/themes/modus-operandi-theme.el:
* etc/themes/modus-operandi-tinted-theme.el:
* etc/themes/modus-operandi-tritanopia-theme.el:
* etc/themes/modus-vivendi-deuteranopia-theme.el:
* etc/themes/modus-vivendi-theme.el:
* etc/themes/modus-vivendi-tinted-theme.el:
* etc/themes/modus-vivendi-tritanopia-theme.el: Update the theme files.
* etc/themes/modus-themes.el: Refine existing faces, add support
for new faces, and make improvements to helper functions.
Release notes: <https://protesilaos.com/codelog/2026-06-21-emacs-modus-themes-5-3-0/>.
Ensure that buffer locals are set despite setters not supporting
'buffer-local (signaling an error is too heavy handed).
* lisp/cus-edit.el (setopt--set-local): If the defcustom setter
does not support 'setopt-local', warn and set the buffer local.
When line numbers are shown, 'center' was computed as the center of the
whole text area, which includes the line-number display, so it landed
half the line-number width too far to the right. Center it on the
editable text area instead. (Bug#81275)
* src/xdisp.c (calc_pixel_width_or_height): Correct the adjustment of
'center' for line-number display, so 'center' is the center of the
editable part of the text area.
* doc/lispref/display.texi (Pixel Specification): Say that 'center'
denotes the center of the editable text area.
* src/xdisp.c (calc_pixel_width_or_height): Track the line-number
width in a new LNUM_ADDED argument instead of overloading *ALIGN_TO,
so it is counted once and a window element following a numeric term is
still recognized. (Bug#81253)
(produce_stretch_glyph, display_min_width): Pass the new argument.
Follow-up on bug#81109.
* src/xdisp.c (get_overlay_arrow_glyph_row): Add a parameter to
select the base face.
(display_line): Use it to default to margin face for drawing
overlay arrow in margin. Also fix placement calculation.
* lisp/gnus/mml.el (mml-expand-html-into-multipart-related):
Accept URLs which both use a file:// scheme and have an empty host
component. These URLs describe absolute local file names and are
the only format accepted by 'url-generic-parse-url' which can
contain a Windows driver letter. (Bug#81250)
* lisp/progmodes/python.el (python--list-imports): Add
sanitizing sys.path.
(python--run-module): New constant.
(python--do-isort, python-fix-imports): Use it. (Bug#70440)
* lisp/vc/vc-git.el (vc-git--with-temp-index): New macro. Pass
the temporary index through 'file-local-name' when setting
GIT_INDEX_FILE.
(vc-git--stash-staged-changes): Use it. This fixes a Tramp bug:
GIT_INDEX_FILE was previously set to the full remote name of the
temporary index, which the remote Git process cannot use.
(vc-git--checkin): Prepare git apply --3way with a temporary
GIT_INDEX_FILE, so that sparse checkout errors from out-of-cone
untracked files do not leave the user's index partially
modified. (Bug#80951)
* test/lisp/vc/vc-git-tests.el: Require log-edit.
(vc-git-test-checkin-patch-sparse-checkout): New test.
* lisp/vc/vc.el (vc-standard-log-outgoing): New function.
(vc-default-log-outgoing):
* lisp/vc/vc-git.el (vc-git-log-outgoing):
* lisp/vc/vc-hg.el (vc-hg-log-outgoing): Use it.
* lisp/emacs-lisp/gv.el (gv--cond-expander): New function, extracted
from the `gv-expander` of `cond`.
(cond) <gv-expander>: Use it, and add a warning for missing default branch.
* src/xdisp.c (calc_pixel_width_or_height): Don't account for the
line-number display more than once. (Bug#81253)
* test/lisp/visual-wrap-tests.el
(visual-wrap-tests/line-numbers-align-to-wrap-prefix): New test.
* src/window.c (Fset_window_configuration): When
'focus-follows-mouse' equals 'auto-raise', explicitly select the
frame and set its input focus if necessary.
(restore_focus_frame): New function.
* src/window.h (restore_focus_frame): Add declaration.
* src/minibuf.c (read_minibuf): Restore frame focus also when
'read-minibuffer-restore-windows' is nil.
* src/xterm.c (x_focus_frame): Don't use window manager activation
when 'focus-follows-mouse' equals 'auto-raise'.
* .dir-locals.el (diff-add-log-use-relative-names): Move to `diff-mode`.
* lisp/vc/vc-git.el: Don't require `diff-mode`.
(vc-git-region-history-mode-map): Don't set the keymap parent yet.
(vc-git-region-history-font-lock): Declare `diff-font-lock-keywords` to
silence the compiler warning.
(vc-git-region-history-mode): Require `diff-mode` and set the keymap
parent here.
Change suggested by Richard Stallman in:
https://lists.gnu.org/r/emacs-devel/2026-06/msg00232.html
* lisp/electric.el (electric-indent-actions, electric-indent-chars)
(electric-indent-functions, electric-indent-inhibit)
(electric-layout-rules, electric-layout-allow-duplicate-newlines)
(electric-layout-allow-in-comment-or-string, electric-quote-comment)
(electric-quote-string, electric-quote-chars, electric-quote-paragraph)
(electric-quote-context-sensitive, electric-quote-replace-double)
(electric-quote-replace-consecutive, electric-quote-inhibit-functions)
(electric-quote-mode): Clarify in doc strings the effects, from the
user's point of view, of electric-indent-mode's, electric-layout-mode's,
and electric-quote-mode's user-facing options.
* lisp/emacs-lisp/edebug.el (edebug-prepare-margin): New
function to set up left margin for Edebug.
(edebug--display-1): Use it.
* src/xdisp.c (display_line): Try to use left margin to display
overlay arrow and fallback to the text area otherwise.
* doc/lispref/display.texi (Overlay Arrow):
* doc/lispref/edebug.texi (Using Edebug):
* doc/emacs/building.texi (Debugger Operation): Document the
change.
* etc/NEWS: Announce the change.
* src/editfns.c (Freplace_region_contents): If the temporary
storage is so large that malloc fails, do not signal an error.
Instead, fall back on destructive replacement.
We expect 'compareseq' to call 'buffer_chars_equal' very often, so
it's worth it to use some memory and make it as fast as possible.
* src/editfns.c (EXTRA_CONTEXT_FIELDS): Drop buffer, beg, and unibyte
fields; add arrays of character codes stored as C ints.
(Freplace_region_contents): Generate such arrays from the two regions
to be compared.
(buffer_chars_equal): Compare array elements instead of buffer
characters.
Make 'outline-search-function' a user option with named choices for
its predefined values, so users can configure it via Customize.
Preserves existing docstring and runtime semantics (bug#81053).
* lisp/outline.el (outline-search-function): Convert to defcustom.
* etc/NEWS: Announce it.
Add outline-search-from-regexp generic helper (bug#80887)
Minor modes and third-party packages that customize 'outline-regexp'
typically need an 'outline-search-function' implementation that
searches for 'outline-regexp' anchored at beginning of line. Without
a generic helper, each such user reinvents the function locally.
Add it to outline.el.
This pattern has been in production use as a default value of
'outline-search-function' (set via 'setq-default') without issues.
* lisp/outline.el (outline-search-from-regexp): New function.
* etc/NEWS: Announce it.
* doc/emacs/text.texi (Outline Visibility): Document the new
'outline-show-entry-and-parents' command and its 'C-c C-e' keybinding.
(Foldout): Update the Foldout example to reference the new command
(bug#79286).
The following commits were skipped:
2c6a03b08c Fix fontification in short unintegrated changes logs (bug...
7b23e17eb8 * lisp/vc/vc.el (vc-log-remote-unintegrated): Set vc-log-...
f89ff62367 Extend Tramp external operations
4dea6ea36b markdown-ts-mode: fix duplicated menu entries (bug#81201)
9cad2da66e ; Fix last change.
cd84bd6a0c vc-dir-recompute-file-state: Change directory to DEF-DIR
47bdbc8d85 Restore "interactive" when describing functions
1a5d9a4be3 Inhibit follow-link via `mouse-1' on the tab-bar (bug#81036)
c94d58ddbf Fix the tab close button appearance when clicking (bug#76...
a21614d4d6 ; Skip one vc-dir test on MS-Windows
abddd2075a ; Fix last change to vc-dir-recompute-file-state.
89bda8736a Install images with info documentation (bug#81204)
466789b511 vc-dir-recompute-file-state: Return nil state for nonexis...
* lisp/vc/vc.el (vc-log-view-type): Replace with ...
(vc-log-view-types): ... this. All uses changes.
(vc-log-remote-unintegrated): Newly pass a value for the log
view types. This matters for Hg repositories.
(vc-print-log-internal): Ensure log view types always contains
either 'long' or 'short'.
(vc-root-log-incoming, vc-root-log-outgoing, vc-log-search):
* lisp/vc/vc-dir.el (vc-dir--count-outgoing): Pass both
log-incoming/log-outgoing/log-search and short/long for the log
view types. This is necessary because these functions don't
call vc-print-log-internal. This will need to be refactored
when implementing the new fileset-specific vc-log-incoming and
vc-log-outgoing.
This change helps ensure that work buffers are "clean" for reuse
by arbitrary callers.
* lisp/emacs-lisp/subr-x.el (work-buffer--release): Call
'kill-all-local-variables' with KILL-PERMANENT 'reset.
* src/buffer.c (Fkill_all_local_variables): If KILL-PERMANENT is
'permanent-local, kill all locals without prejudice. If
KILL-PERMANENT is 'reset, also call 'reset_buffer'.
* test/lisp/emacs-lisp/subr-x-tests.el
(subr-x-with-work-buffer-locals-killed): New test.
* doc/lispref/variables.texi: Update 'kill-all-local-variables'
documentation.
* etc/NEWS: Announce the change to 'kill-all-local-variables'.
This ensures defcustom ':set' functions are invoked. The new
user option 'setopt-local-type-mismatch' can prompt users to
accept or discard type-mismatched values or to always accept or
discard such values.
* lisp/cus-edit.el (setopt-local-type-mismatch): New defcustom.
(setopt--set-local): Consult setopt-local-type-mismatch.
* lisp/files.el (hack-one-local-variable): Detect a custom
variable and call 'setopt--set-local'.
* etc/NEWS: Announce the change.
When a subtree is at the end of the buffer and followed by a
newline, flagging the subtree as invisible incorrectly swallows
the final newline.
* lisp/outline.el (outline-end-of-subtree): Check for eobp
to ensure the function steps back over the final newline when
the subtree ends at the end of the buffer (bug#80917).
* lisp/outline.el (outline-mode-prefix-map):
Rebind 'C-e' from 'outline-show-entry'
to 'outline-show-entry-and-parents'.
(outline-mode-menu-bar-map): Use 'outline-show-entry-and-parents'
instead of 'outline-show-entry'.
(outline-isearch-open-invisible): Use the new command instead of
the 'outline-show-entry' primitive. This prevents unintended
side effects for packages relying on the base API and avoids the
'isolated item' effect.
(outline-show-entry-and-parents): New function to climb the tree,
reveal parent headings, and unfold the current entry (bug#79286).
71ea4bbb6c vc-test-vc-dir-on-symlink: Use vc-test--with-author-identity
b8fa2243ea Fix M-RET in 'markdown-ts-in-table-mode-map'
c244314974 Fix recurrence of bug#80803 after changes in bug#80967
* lisp/vc/vc-dir.el (vc-dir-show-outgoing-count): Mark obsolete.
(vc-dir-async-header-values): Use a list of cons.
(vc-dir-headers, vc-dir-refresh): Update for new
vc-dir-async-header-values structure.
* doc/emacs/maintaining.texi (VC Directory Buffer): Delete
mention of the variable.
* etc/NEWS: Announce the obsoletion.
* lisp/vc/vc-dir.el (log-view-message-re): Declare.
(vc-dir--count-outgoing): Rewrite to not block on populating the
outgoing log.
(vc-dir-async-header-values): New variable.
(vc-dir-headers): Just insert "Outgoing : ", not its value.
(vc-dir-refresh): Insert overlays for async fields.
* lisp/vc/vc.el (vc--count-outgoing): Delete.
* doc/translations/README: Document how to compile all
translations, or just for one language. Clarify where Texinfo
source code resides, and where compiled output goes.
* Makefile.in (srcdir_doc_info_dir_inputs): Compute using sources
for each available translation. This fixes build error
``No rule to make target
'doc/misc/../translations/fr/misc/auth.texi', needed by
'info/dir''' introduced by support for doc translations.
fff343c332 ; Fix typos in iCalendar macro and recurrence docstrings
912c8e3691 Ensure Tramp backward compatibility
df9b97e516 ; update README for windows binaries
9e37c94079 Read a key sequence instead of a single key in 'map-y-or-...
2755f171fc ; Document new features and update NEWS
13842157d2 ; * etc/NEWS: Presentational fixes and improvements.
# Conflicts:
# etc/NEWS
df2508a8f6 Remove from CC Mode code that modifies 'major-mode-remap-...
3106dc7766 Assert we don't double-free timers (bug#81108)
90314895dd Don't cancel random timers in x_get_foreign_selection (bu...
5cd7785b0a Fix use-after-free in Ffuncall_with_delayed_message (bug#...
* lisp/progmodes/project.el (project-vc-dir): When called
interactively, call file-truename on the project root first.
* etc/NEWS: Document the change.
a24b081602 ; Fix last change
e33e9f7e85 Document 'margin' face as base for margin display strings...
cff9c8bc00 Improve prompting for mail sending by by 'report-emacs-bug'
# Conflicts:
# etc/NEWS
* lisp/calendar/time-date.el (format-seconds): Document that the arg
can be any time value, and need not be a number.
This has been true for some time, but has not been documented.
Avoid some (but not all) rounding errors internally, and add a
comment about the remaining rounding error.
* lisp/emacs-lisp/timer-list.el (list-timers):
* lisp/org/org-timer.el (org-timer-show-remaining-time):
* lisp/org/ox.el (org-export--stack-generate):
* lisp/time.el (emacs-uptime): Omit unnecessary conversion of time
value that can increase rounding error.
* test/lisp/calendar/time-date-tests.el (test-format-seconds):
Test that format-seconds works on time values that are not numbers.
The two -respondsToSelector: guards in -[EmacsWindow
setParentChildRelationships] tested @selector(toggleFullScreen) without
the trailing colon, but the method is -toggleFullScreen:. The colon-less
selector matches nothing, so the guarded code was always skipped. This
is inert on modern builds (MAC_OS_X_VERSION_MIN_REQUIRED >= 1070, where
the check is #if'd out), but on a binary targeting pre-10.7 yet running
on 10.7+ it would wrongly skip taking a child frame out of native
fullscreen.
* src/nsterm.m ([EmacsWindow setParentChildRelationships]): Add the
missing colon to both @selector(toggleFullScreen:) checks.
The new FOR_EACH_TAIL code detects simple cycles sooner than the old
code did, leading to integer overflows.
* src/fns.c (Fnthcdr): Avoid integer overflow if cycle is detected
early.
* src/lisp.h (struct for_each_tail_internal): Reduce to two words.
(FOR_EACH_TAIL_BASIC): Add compiler hint to indicate that tail is most
likely Qnil after the loop and a non-nil non-cons is unlikely.
(FOR_EACH_TAIL_STEP_CYCLEP): Rewrite.
* lisp/vc/vc-bzr.el (vc-bzr-dir-status-files):
* lisp/vc/vc-cvs.el (vc-cvs-dir-status-files):
* lisp/vc/vc-git.el (vc-git-dir-status-goto-stage):
* lisp/vc/vc-hg.el (vc-hg-dir-status-files):
* lisp/vc/vc-svn.el (vc-svn-dir-status-files): Set the
query-on-exit flag for the processes populating VC-Dir buffers
to nil.
* lisp/plstore.el (plstore-find, plstore-get, plstore--encode)
(plstore--decode): Use 'plstore--has-secret-keys' to replace
manual check for existence of secret keys. (Bug#81061)
When a plstore has entries with secret keys, processing the plstore
file would require decryption first. However, unlike other functions
like 'plstore-get', 'plstore-put', etc., 'plstore-delete' does not
check for secret keys and decrypt the file, which would corrupt the
file when deleting any entries with secret keys.
This patch adds checking for secret keys and decrypt the file when
needed before removing the entry with name.
* lisp/plstore.el (plstore--has-secret-keys): New.
* lisp/plstore.el (plstore-delete): Check for secret keys of the entry
and decrypt plstore before performing the deletion. (Bug#81061)
* src/xterm.c (x_suspend_background_fills)
(x_restore_background_fills): New functions.
(x_set_window_size, x_set_window_size_and_position)
(x_make_frame_invisible): Use them (bug#80961).
Ported from emacs-31 release branch:
commit 984932d4dc
Author: Sean Whitton <spwhitton@spwhitton.name>
Date: Mon Jun 1 11:48:42 2026 +0100
Disable markdown-ts-mode & markdown-ts-view-mode for Emacs 31
This synchronizes master's Eglot with emacs-31. The goal of that commit
is to demote those markdown-ts-mode.el modes to "experimental" status in
emacs-31, but Eglot was already relying on them and changes were needed.
984932d4dc is not the commit that best
does those changes, but since that commit was marked "do not merge" on
emacs-31, I thought it best to bring it here manually so any further
work -- which doesn't contradict the overarching intention -- can
continue in emacs-31 with clean merges to master (where the GNU-devel
core Elpa package is pulled from).
* lisp/progmodes/eglot.el (eglot-documentation-renderer)
(eglot--format-markup): Don't call eglot--builtin-mdown-p.
* doc/misc/eglot.texi (Customization Variables):
* etc/EGLOT-NEWS: Don't mention markdown-ts-mode
Co-authored-by: Sean Whitton <spwhitton@spwhitton.name>
Problem reported by Helmut Eller (Bug#81132#25).
* src/dispextern.h (IF_DEBUG): Omit cast that is useless if
the argument is already void.
* src/ftfont.c (adjust_anchor): Omit useless cast.
* Makefile.in (MAKE_DOC_FOR_DOCLANG): Remove unnecessary .PHONY
definitions for targets which will be encompassed by $(DOC).
(MAKE_DOC): Create a common target to to which to assign runtime
dependencies.
(misc-info-common, misc-dvi-common, misc-html-common)
(misc-pdf-common, misc-ps-common): Assign runtime dependencies
on Lisp etc. previously assigned to the bare targets now subject
to indirection.
* lib-src/emacsclient.c: Include <stdckdint.h>
(timeout): Now signed, and initially -1. All uses changed.
(decode_options): Do not worry about ERANGE or ranges, as other
code now deal with this; the old code was wrong anyway as it mixed
uintmax_t with INTMAX_MAX and INTMAX_MIN. But do check for syntax
errors and negative values.
(set_socket_timeout): Don’t time out if the timeout is 0 or enormous.
Silently ignore errors (Bug#81160).
(main): Allow --timeout=0, as per documentation.
This also avoids using ";" in make rules, which doesn't propagate
errors from the first command to the entire line.
* Makefile.in (MAKE_DOC_FOR_DOCLANG): New.
(MAKE_DOC): delegate to 'MAKE_DOC_FOR_DOCLANG' per language doc build.
Amend commit 75153f7b76 " Fix clash with locale variable" by Andreas Schwab.
Use DOCLANG instead of INFO_LANG for renaming, as documentation does not
produce only info output, and DOCLANG is iterating over DOCLANGS.
* Makefile.in: Rename 'LANG' to 'DOCLANG' to avoid clash with well-known
environment variable.
* doc/misc/Makefile.in: Adjusted accordingly, rename 'INFO_LANG' to 'DOCLANG'
where Andreas had already renamed 'LANG'.
* doc/translations/fr/misc/ses-fr.texi: rename 'INFO_LANG' to 'DOCLANG' in
explanatory comment.
LANG is a locale variable, use INFO_LANG instead.
* doc/misc/Makefile.in (INFO_LANG): Renamed from LANG, all uses
changed.
* doc/translations/fr/misc/ses-fr.texi: Use INFO_LANG instead of
LANG.
* src/term.c (syms_of_term) <tty-cursor-movement-use-TAB>: New var.
<tty-cursor-movement-use-TAB-BS>: Doc fix.
* src/cm.c (calccost): Use it to disable use of TABs for cursor
motion on text terminals.
* etc/NEWS: Announce the new variable.
* doc/misc/Makefile.in (INFO_TARGETS): Always build efaq-w32.info.
(info_template): Remove unnecessary extra prerequisite for
$$(buildinfodir)/$(1)$$(lang_suffix).info, which repeats an
existing pattern rule and causes ccmode.info be constantly
regenerated.
72d890c43e ; Update the documentation of 'debug'
69fd4b87f4 Don't make buffer read-only when reverting if 'view-mode'...
2955b51e80 ; * etc/NEWS: Document the change in mode-line faces.
# Conflicts:
# etc/NEWS
c3babe4b89 Fix lax whitespace highlight during query-replace
2e70b88623 Fix fill-paragraph combining text with preceding comment
ea54c33950 ; * etc/PROBLEMS: Link to bug#81124.
02897e208d emacsclient quote_argument is void
c618178066 ; Mark process-test-stderr-buffer as :unstable when runni...
2c1b45f5c5 ; Improve documentation of 'vc-dir-auto-hide-up-to-date'
768c8bf004 Revert "* admin/notes/documentation: Recommend not using ...
a7414f1859 native--compile-skip-on-battery-p: Try to fix ?b, ?B cond...
7cee526a8c Save and restore original local keymap in grep-edit-mode
4d87d203cf Fix display of inline SVG images in Rmail
4c55d04ebe Add treesit-ready-p check back to tree-sitter major modes...
7892ae5eaf Fix pathological slowness in flex completion
12eec781ed No longer raise error on HTTP 402 (Payment Required) (bug...
1800350b18 Avoid compilation-mode matching rust as gnu
The problems are:
- filtering out the info from info making templates misses some dependencies.
- naming PHONY target info.info is misleading, as there is also an info.info
in the info build directory
* doc/translations/fr/info_common.mk:
* doc/translations/default/info_common.mk: New file.
* doc/misc/Makefile.in: Get INFO_COMMON from language respective
info_common.mk helper script.
(INFO_TARGETS): Make it depend from info_common.mk settings.
(ORG_SETUP, ORG_SRC): Make it point at language specific sub-directory.
(texi_sources, DVI_TARGETS, HTML_TARGETS, PDF_TARGETS)
(PS_TARGETS, echo-info, info_template,efaq%$(lang_suffix).dvi)
(efaq%$(lang_suffix).pdf, efaq%$(lang_suffix).texi)
(efaq%$(lang_suffix).html): Make it use language specific suffix.
(${buildinfodir}/%$(lang_suffix).info, %$(lang_suffix).dvi)
(%$(lang_suffix).pdf, %$(lang_suffix).html, %$(lang_suffix).ps):
Make it use language specific suffix/subdirectory.
* Makefile.in (DOCLANGS): New variable, list of languages.
(install-info, uninstall): List targets into 'info_misc' for all languages.
(TAGS tags): Make tags for all languages.
($(DOCS)): Create target for all languages.
(texi_misc_fr, texi_misc_default): Set macro for all languages.
(srcdir_doc_info_dir_inputs): Macro concatenate texi_misc_lll for
all language lll.
* src/xfaces.c (Finternal_lisp_face_equal_p): Accept an additional
optional argument INHERIT; if non-nil, consider two faces equal if
one inherits from the other and doesn't specify any other
attributes to be different from it.
* src/xdisp.c (try_cursor_movement, try_window_id): Call
'Finternal_lisp_face_equal_p' with non-nil INHERIT argument, to
speed up redisplay in the default case when line numbers are shown.
(Bug#81133)
* test/src/xfaces-tests.el (xfaces-test-face-equality): New test.
* doc/misc/dbus.texi (Asynchronous Methods): HANDLER can also be
(HANDLER . ERROR-HANDLER).
* etc/NEWS: Mention ERROR-HANDLER of dbus-call-method-asynchronously.
* lisp/net/dbus.el (dbus-call-method-asynchronously): Adapt docstring.
(dbus-check-event, dbus-handle-event): HANDLER can also be
(HANDLER . ERROR-HANDLER).
* src/dbusbind.c (Fdbus_message_internal): HANDLER can also be
(HANDLER . ERROR-HANDLER). (Bug#80952)
* test/lisp/net/dbus-tests.el (dbus--test-method-another-handler)
(dbus--test-method-error-handler): New defvars.
(dbus--test-method-another-handler)
(dbus--test-method-error-handler): New functions.
(dbus-test04-call-method-error-handler): New test.
(dbus-test10-keep-fd): Extend test.
* msdos/sedlibmk.inp (GL_GNULIB_STDC_[^ =] &c.): Rename from
GL_STDC_... and define to 1 before other variables prefixed
GL_GNULIB_ are defined to 0.
(NEXT_AS_FIRST_DIRECTIVE_STDBIT_H)
(NEXT_AS_FIRST_DIRECTIVE_STDCOUNTOF_H, STDCOUNTOF_H): Define.
(GL_HAVE_STDBIT_H_CONDITION): Replace
GL_GENERATE_STDBIT_H_CONDITION.
(CXX_HAVE_STDCOUNTOF_H, GL_GNULIB_STREQ, GL_GNULIB_MEMEQ)
(GL_GNULIB_STRNUL, GL_GENERATE_STDCOUNTOF_H_CONDITION):
Substitute "1".
* src/conf_post.h (_REGEX_AVOID_UCHAR_H) [MSDOS]: Define to 1.
* src/term.c (init_tty) [MSDOS]: Set TN_max_colors to 16,
which was deleted inadvertently with recent MS Windows
modifications.
* config.bat: Rename stdcountof.in.h appropriately.
* src/lisp.h (lisp_h_make_fixnum_wrap) [USE_LSB_TAG]: Use compound
literal, not cast. This pacifies -Wuseless-cast when building on
Fedora 44 x86-64 with ‘./configure --enable-gcc-warnings
CFLAGS='-O2 -DDEFINE_KEY_OPS_AS_MACROS'’.
Avoid useless casts on GCC 14+ platforms on non MS-Windows, by
using a cast only if HAVE_NTGUI. That cast should not provoke
-Wuseless-cast regardless of how MS-Windows defines HDC, since it
casts to an Emacs-defined type. This change lets the code compile
again on Fedora 44 with --enable-gcc-warnings.
* src/dispextern.h (PIX_CONTAINER_TO_CONTEXT): New macro.
It defaults to the identity macro.
(Emacs_Pix_Context): Default to Emacs_Pix_Container.
* src/image.c (pbm_load, png_load_body, jpeg_load_body)
(tiff_load, gif_load, svg_load_image): Use the new macro
instead of a cast.
* src/conf_post.h: Add leading underscores to 'gl_consolesafe_*'
functions, to follow Gnulib's renaming.
* src/image.c (pbm_load, png_load_body, jpeg_load_body)
(tiff_load): Revert previous change that removed "useless" casts,
as removing them triggers warnings from MinGW GCC 9.2.
C2y will standardize countof as the macro that Emacs uses the name
ARRAYELTS for. Switch to the standard name, which is supported
by GCC 16+, by Clang 21, and by the Gnulib stdcountof-h module already
in use for compilers that do not support countof.
Also, use countof in a few places where we missed using ARRAYELTS.
* admin/coccinelle/arrayelts.cocci: Suggest countof, not ARRAYELTS.
* admin/merge-gnulib (GNULIB_MODULES): Add stdcountof-h,
as it is now a direct rather than an indirect dependency.
* exec/trace.c, src/lisp.h, src/sfnt.c: Include <stdcountof.h>.
(ARRAYELTS): Remove. All uses replaced by countof.
* lib-src/ebrowse.c, lib-src/etags.c, lib-src/make-docfile.c:
* lib-src/seccomp-filter.c, lwlib/lwlib-Xaw.c:
Prefer <stdcountof.h> and countof to doing things by hand.
In addition to the automatic changes, also do the following,
needed due to recent Gnulib changes.
* admin/merge-gnulib (AVOIDED_MODULES): Add btoc32,
c32_apply_type_test, c32_get_type_test, c32isalnum, c32rtomb,
c32tolower, c32toupper, localeinfo, mbrtoc32-regular.
Remove btowc, iswctype, mbrtowc, wcrtomb, wctype, wctype-h.
Also remove iswblank, iswdigit, iswxdigit, locale-h, raise,
stdarg-h, some of which perhaps could have been removed earlier.
* configure.ac (_REGEX_AVOID_UCHAR_H): New macro.
GCC 16’s -Wuseless-cast warning can be useful.
Fix the useless casts it identifies, and also fix false positives
by using compound literals, which are safer anyway than casts.
* src/composite.c (composition_adjust_point)
(Ffind_composition_internal):
* lwlib/xlwmenu.c (xlwMenuResources, xlwMenuClassRec)
(resource_widget_value, XlwMenuDestroy, Select):
* src/alloc.c (process_mark_stack):
* src/data.c (Faref):
* src/emacs-module.c (module_extract_big_integer):
* src/fileio.c (Finsert_file_contents):
* src/frame.h (FRAME_MESSAGE_BUF_SIZE):
* src/gtkutil.c (xg_tool_item_stale_p, update_frame_tool_bar):
* src/image.c (pbm_load, png_load_body, jpeg_load_body)
(tiff_load, gif_load):
* src/pdumper.c (ptrdiff_t_to_dump_off, dump_queue_dequeue)
(field_relpos, dump_field_emacs_ptr)
(dump_object_start_pseudovector, pdumper_remember_scalar_impl)
(pdumper_load, syms_of_pdumper):
* src/regex-emacs.c (BUF_PUSH, BUF_PUSH_2, POINTER_TO_OFFSET):
* src/xdisp.c (remember_mouse_glyph, pint2str):
* src/xterm.c (cvt_string_to_pixel, handle_one_xevent):
Omit useless casts. Perhaps they were formerly needed,
but they should not be needed now.
* src/alloc.c (Fmemory_info):
* src/category.c (Fdefine_category, Fmodify_category_entry):
* src/data.c (Fash):
* src/dispextern.h (GLYPH_CODE_P):
* src/emacs.c (load_seccomp):
* src/fns.c (Flocale_info, maybe_resize_hash_table):
* src/indent.c (check_display_width):
* src/json.c (symset_size):
* src/lisp.h (XUNTAG, BOOL_VECTOR_LENGTH_MAX, obarray_size)
(hash_table_index_size):
* src/lread.c (make_obarray, grow_obarray, Fobarray_clear):
* src/menu.c (digest_single_submenu, x_popup_menu_1):
* src/term.c (init_tty):
* src/widget.c (update_wm_hints):
* src/xdisp.c (truncate_echo_area):
* src/xfns.c (x_set_border_pixel):
* src/xfont.c (xfont_match, xfont_open):
* src/xmenu.c (set_frame_menubar):
* test/src/emacs-module-resources/mod-test.c (emacs_module_init):
Use compound literal instead of a cast that is useless in
some platforms but not others.
* src/dispextern.h, src/haikugui.h, src/w32gui.h:
(WINDOW_HANDLE_UINTPTR): New macro.
* src/frame.c (gui_report_frame_params):
* src/xterm.c (x_try_cr_xlib_drawable):
Use it.
* src/lisp.h (XUNTAG): And tag with UINTPTR_MAX to pacify
gcc warning about a constant out of range.
(hash_idx_t): Make it int_least32_t, as it need not be exactly 32 bits.
(PRIdHASH_IDX): New macro.
* src/pdumper.c (dump_queue_dequeue): Use it.
* src/profiler.c (setup_cpu_timer): Make a local EMACS_INT
rather than int, to avoid need for casting later.
* src/syntax.c (uninitialized_interval):
Use 1u rather than 1 so the cast is always useful.
A compound literal wouldn’t do here, as this macro
needs to be an integer constant expression.
* src/xfns.c (XICCallback, XICProc): Remove macros.
(Xxic_preedit_start_callback): Use a cleaner way to specify it,
avoiding the need for type macros, and for a cast
if HAVE_XICCALLBACK_CALLBACK.
* src/xterm.c (handle_one_xevent): 2nd arg is now XEvent *
on all platforms, as there is no need to diverge, and
diverging meant we needed lots of unnecessary casts.
`visual-wrap--content-prefix' previously returned a column count
computed as
(max (string-width prefix)
(ceiling (string-pixel-width prefix) avg-space-width))
with two problems:
* `string-width' ignores `buffer-invisibility-spec', so an invisible
prefix (hidden ATX markers under `markdown-ts-hide-markup', for
example) still reserved its character count on line 1 via a
`min-width' display property, shifting the visible heading right.
* With variable-pitch fonts, rounding the prefix width up to whole
columns added visible padding whenever the natural width did not
fall on an exact column boundary.
Return the prefix's natural pixel width via `string-pixel-width'
instead, which accounts for any display transformation applied to
the prefix (invisibility, `display' replacements, text scaling,
proportional fonts). Drop the `min-width' property from
`visual-wrap--apply-to-line' so line 1 renders at its natural width.
Switch the continuation `wrap-prefix' to a mixed-unit `:align-to'
sum form:
(space :align-to (+ (PIX) (EXTRA-INDENT . width)))
where PIX is the prefix's pixel width and EXTRA-INDENT is
`visual-wrap-extra-indent' in canonical character widths. The
display engine resolves each term per the active frame and sums
them, so no Lisp-level unit conversion is needed.
Since `min-width' is no longer installed, the accumulation cycle
that commit 81a5beb8af (bug#73882) worked around cannot recur.
Drop the `min-width' strip from `visual-wrap--content-prefix' and
the `min-width' removal from `visual-wrap--remove-properties'.
Keep `min-width' in `visual-wrap--safe-display-specs' so that
lines where other modes install it are not skipped.
* lisp/visual-wrap.el (visual-wrap--content-prefix): Return pixel
width instead of column count; drop the `min-width' strip.
(visual-wrap--apply-to-line): Drop `min-width' on line 1; use
mixed-unit `:align-to' sum form for the continuation wrap-prefix.
(visual-wrap--adjust-prefix): Handle only string prefixes; the
numeric (pixel) case is now handled inline in `--apply-to-line'
via the mixed-unit `:align-to' sum form.
(visual-wrap--remove-properties): Drop `min-width' removal.
(visual-wrap--safe-display-specs): Add note about `min-width'.
* test/lisp/visual-wrap-tests.el: Update expected `wrap-prefix'
values to the new sum form.
(visual-wrap-tests/invisible-prefix): New test motivated by bug#81039.
(visual-wrap-tests/negative-extra-indent): New test; verify that a
large negative `visual-wrap-extra-indent' produces a valid
wrap-prefix (the display engine clamps the stretch to zero).
* test/manual/visual-wrap-test.el: New file. Manual test suite
for visual-eyeball verification of prefix alignment behavior.
Reported-by: Andrea Alberti <a.alberti82@gmail.com>
Co-authored-by: Stefan Monnier <monnier@iro.umontreal.ca>
Building code with code is tricky. E.g. the code in gnus-draft-setup
suffered from a security issue because it forgot to quote
some arguments (see commit 142b1e0d4c).
* lisp/gnus/gnus-salt.el (gnus-pick-setup-message):
* lisp/gnus/gnus-msg.el (gnus-inews-add-send-actions):
* lisp/gnus/gnus-draft.el (gnus-draft-setup): Prefer passing functions
to message-add-action over passing it ELisp expressions.
* lisp/gnus/message.el (message-do-actions): Drop errors but not silently.
These were reported by happy-barney on GitHub
https://github.com/HaraldJoerg/cperl-mode/issues
* lisp/progmodes/cperl-mode.el (cperl-init-faces): Don't mistake
$method as a method declaration.
Move matcher for "use require" higher to prevent "require" being
fontified as keyword.
* test/lisp/progmodes/cperl-mode-resources/sub-names.pl: Add a
test case for $method
* test/lisp/progmodes/cperl-mode-tests.el
(cperl-test-fontify-declarations): Add a test case for a module
name looking like a keyword
(cperl-test-fontify-sub-names): Verify that $method does not
declare a method
* src/cmds.c (internal_self_insert): If the autofill function changed
the newline character we inserted, don't attempt to restore point.
* test/src/cmds-tests.el (self-insert-nonascii-autofill): New.
* src/casefiddle.c (do_casify_natnum): Extend range a little, to cover
character events with all modifier flags set.
* test/src/casefiddle-tests.el (casefiddle-allflags): New test.
This would (rarely) result in composition properties being shared
across the concatenation of two copies of a string.
* src/editfns.c (styled_format): Include the first argument in the
range.
* test/src/editfns-tests.el (editfns-tests--format-composition-property):
New.
* src/treesit.c (treesit_check_position): Return the validated
value.
(Ftreesit_node_first_child_for_pos):
(Ftreesit_node_descendant_for_range):
(Ftreesit_query_capture):
(Ftreesit__linecol_at): Fold calls to fix_position into
treesit_check_position in treesit.c.
This pacifies GCC 16.1.1 x86-64 -Warray-bounds when compiling with
-fsanitize=address. It’s also cleaner on more-typical platforms.
* src/termhooks.h (EVENT_INIT): Define via a compound literal
rather than via a memset plus an assignment. This evaluates the
argument lvalue only once, and is more likely to catch type errors.
* src/sfnt.c (memory_full_up) [TEST]: New static function.
(xmalloc, xcalloc, xrealloc): Use it instead of aborting.
(eassert) [TEST]: Remove; no longer needed.
(xaddmalloc, xaddrealloc): New static convenience functions.
(sfnt_read_cmap_format_12, sfnt_read_loca_table_short)
(sfnt_read_loca_table_long, sfnt_read_glyf_table)
(sfnt_read_simple_glyph, sfnt_read_compound_glyph)
(sfnt_read_glyph, sfnt_build_append, sfnt_build_outline_edges)
(sfnt_raster_glyph_outline, sfnt_build_outline_fedges)
(sfnt_raster_glyph_outline_exact, sfnt_read_hmtx_table)
(sfnt_read_name_table, sfnt_read_meta_table)
(sfnt_read_ttc_header, sfnt_read_fpgm_table)
(sfnt_read_prep_table, sfnt_create_uvs_context)
(sfnt_read_gvar_table, sfnt_read_packed_deltas)
(sfnt_vary_simple_glyph, sfnt_vary_compound_glyph):
Use the new functions to test for size overflow more reliably.
Use a cleaner way to decide whether a pointer addresses
the heap not the stack and thus needs freeing.
Fix a few more unlikely overflows.
(sfnt_read_cmap_format_12): The recently-added eassert is no
longer needed, so remove it.
(sfnt_read_simple_glyph): Initialize glyph->simple early
to simplify later code, as is done in similar functions.
Complicate size test to avoid potential unsigned overflow.
Even the earliest Android had plain ‘long long’,
so use that instead of doing it by hand.
* src/sfnt.c (struct sfnt_large_integer, sfnt_multiply_divide_1)
(sfnt_multiply_divide_2, sfnt_large_integer_add)
(sfnt_multiply_divide_round) [!INT64_MAX]: Remove.
(sfnt_multiply_divide, sfnt_multiply_divide_rounded)
(sfnt_mul_fixed, sfnt_mul_fixed_round, sfnt_div_fixed)
(sfnt_div_f26dot6, sfnt_mul_f26dot6, sfnt_mul_f26dot6_round)
(sfnt_mul_f2dot14, sfnt_dot_fix_14): Simplify by using long long.
* src/xselect.c (selection_data_for_offset):
Offset is size_t, not long, since that’s what caller passes.
(selection_data_size): Truncate large selection sizes to a value
that is more likely to work without involving undefined behavior.
Do not exceed X_ULONG_MAX which is all X can handle, or
PTRDIFF_MAX which can confuse underlying code.
(x_start_selection_transfer): Invoke selection_data_size just once.
* src/alloc.c (xcalloc): New function.
* src/dispnew.c (save_current_matrix):
* src/fns.c (Finternal__hash_table_histogram):
* src/nsfns.m (Fns_display_monitor_attributes_list):
* src/pgtkfns.c (Fpgtk_display_monitor_attributes_list):
* src/pgtkselect.c (pgtk_own_selection):
* src/profiler.c (make_log):
* src/sfnt.c (sfnt_poly_edges_exact):
* src/xfns.c (x_get_monitor_attributes_xinerama)
(x_get_monitor_attributes_xrandr, Fx_display_monitor_attributes_list):
Use it instead of multiplying by hand, conceivably with overflow.
* src/profiler.c (make_log):
Check for overflow in internal size calculations.
Use xnmalloc instead of multiply + xmalloc.
* src/sfnt.c (xzalloc) [TEST]: Remove, replacing with ...
(xicalloc) [TEST]: ... this new function. All callers changed.
(eassert) [TEST]: New macro.
* src/treesit.c (treesit_calloc_wrapper): Remove, replacing its
use with xcalloc.
* exec/exec.c (format_pid): Simplify. No need for a local array.
(exec_0): Shrink local buffer.
If names are too long, fail instead of silently truncating them.
Be cautious in case symlink is zero length (shouldn’t be possible
in Android, but it’s easy to be safe).
* src/xterm.c (x_dnd_begin_drag_and_drop): The n_ask_actions arg
is an int, not a size_t, as XChangeProperty supports only int and
our caller passes an int.
* src/json.c (json_out_grow_buf)
(json_make_object_workspace_for_slow_path)
(json_byte_workspace_put_slow_path):
Use xpalloc rather than doing it by hand.
* src/json.c (json_out_grow_buf):
Change arg from needed bytes to minimum increment of bytes.
Caller changed.
* src/alloc.c (STRING_BYTES_MAX): Also don’t allow sizes to exceed
PTRDIFF_MAX in internal calculations when calling malloc, as those
are problematic even if the final number of bytes does not exceed
PTRDIFF_MAX.
* src/alloc.c (memory_full_up): New function. Replace all callers
of memory_full (SIZE_MAX) with callers to this function.
This simplifies callers and should make future changes easier.
It also saves a whopping 296 bytes in executable size
with gcc 16.1.1 20260515 (Red Hat 16.1.1-2) x86-64.
4f13f52a3a * build-aux/git-hooks/commit-msg: Replace Markdown-style ...
dd42133315 vc-test--rename-file: Disable part of test for SCCS
eb653865c3 markdown-ts-mode: Don't enable unconditionally by default
# Conflicts:
# etc/NEWS
This is okay with regard to bootstrapping because vc-hooks.el is
loaded after loaddefs.el in loadup.el.
* lisp/emacs-lisp/cond-star.el (cl-lib): Don't require, so we
can use cond* in preloaded files.
(cond*-convert-condition): Replace calls to cl-assert.
* lisp/vc/vc-hooks.el (vc-refresh-state): Use cond*.
7a17f97baa Prettify special glyphs
f13287fde0 Revert "sh-script: Mark + and * as punctuation rather tha...
70b79b3ed8 Rename `icalendar-recur' type and related functions
3d2bb233f2 ; Minor Tramp changes
f6281d757d ; * etc/NEWS: Tell how to disable 'markdown-ts-mode'.
142b1e0d4c Fix Lisp injection via X-Draft-From in Gnus
d6f7b2d99b Save/restore old_buffer slot via window configurations (B...
e0fbecaf65 Adapt ert-remote-temporary-file-directory settings
3de7f0ce5e Fix warning message in 'markdown-ts-mode--initialize'
7df8604ea6 ; Improve documentation of lazy-highlight in search and r...
2936b36164 Fix "assertion 'GTK_IS_WINDOW (window)' failed"
98348a0bdc [Xt] Fix child frame resizing glitch
13b29eebc1 Eglot: use standard face for completion annotations (bug#...
# Conflicts:
# etc/NEWS
The advantage is that this works also for mixtures of alists and
vectors, as one obtains, e.g., from 'json-parse-buffer' and
'json-parse-string'.
* lisp/emacs-lisp/let-alist.el (let-alist--list-to-sexp): Use
'elt' instead of 'nth'.
(let-alist): Adapt doc string. (Bug#80992)
* src/w32proc.c (w32_raise): A more complete, Posix-compliant
implementation.
(sys_signal): Support SIGBREAK.
* src/syssignal.h (raise): Redirect to 'w32_raise'.
* src/atimer.c: Don't redirect 'raise', now done in syssignal.h.
(Bug#80760)
Quickly verify that the number of unchanged characters before and
after the region that changes are supposed to be limited to doesn't
change.
Suggested by Stefan Monnier.
* lisp/subr.el (combine-change-calls-1): Copy BEG into a marker, and
count the characters after the changed region. After the changes,
ensure the character counts still match.
* test/lisp/subr-tests.el (subr-test-combine-change-calls-error): New.
This avoids an alloca in x_set_mouse_color.
* src/xfns.c (x_set_mouse_color): Use local array rather than
alloca, since the string is small.
* src/xterm.c (X_ERROR_MESSAGE_SIZE): Move defn from here ...
* src/xterm.h: ... to here, and make it an enum not a macro.
* src/sysdep.c (serial_open): On failure, simply return -1
and set errno; do not call report_file_error, as the
caller is supposed to do that if needed.
Problem discovered on Fedora 44 x86-64 when using GCC 16.1.1 with
-fsanitize=address, with test/src/process-tests.el tests that use
process-tests--with-raised-rlimit. This function overrides the
default of 1024 for the maximum number of open files, which causes
undefined behavior (subscript errors) in src/process.c.
* src/process.c (inrange_fd, inrange_pipe): New functions.
(allocate_pty, create_process, create_pty, Fmake_pipe_process)
(Fmake_serial_process, connect_network_socket)
(network_interface_info, server_accept_connection)
(Fprocess_send_eof, child_signal_init):
Check that all newly allocated file descriptors are less than
FD_SETSIZE; close them and fail otherwise.
(create_pty, Fmake_pipe_process, Fmake_serial_process)
(connect_network_socket, server_accept_connection)
(child_signal_init): Remove no-longer-needed comparisons
to FD_SETSIZE, now that inrange_fd and inrange_pipe
do the checking for us.
* src/regex-emacs.c (forall_firstchar):
Avoid undefined behavior in the 2nd eassert when !bufp && !pend.
This pacifies GCC 16.1.1 20260501 (Red Hat 16.1.1-1) x86-64
when Emacs is configured with --enable-gcc-warnings.
Problem discovered with GCC 16.1.1 -fsanitize=undefined.
* src/fns.c (maybe_resize_hash_table): Avoid undefined
behavior when h->key_and_value or h->hash are null pointers,
in which case we call memcpy (destination, NULL, 0)
which has undefined behavior in C89 through C23.
* src/emacs-module.c (module_bignum_count_max):
Now of type ptrdiff_t, instead of likely being of type size_t.
(module_extract_big_integer): Omit now-unnecessary prefix +, a
now-unnecessary eassert against PTRDIFF_MAX, and and an
unnecessary cast to ptrdiff_t.
* src/comp.c (emit_static_object): Avoid an malloc/free of
a 1 KiB buffer; just put it on the stack. Use strnlen+mempcpy
instead of strncpy as there is no need to zero-fill buff.
Use int for values that must fit in int since we are
passing them to gcc_jit_context_new_rvalue_from_int.
Problem discovered with GCC 16.1.1 -fsanitize=undefined.
* src/data.c (Fash): Don’t left-shift a negative number;
behavior is undefined (ISO C23 § 6.5.8 ¶ 4).
When fetching images asynchronously, keep track of the
destination region and refrain from inserting the image if
that region has been modified in the mean time.
* lisp/net/shr.el (shr--image-fetched, shr--async-put-image): New functions.
(shr-insert-image, shr-zoom-image, shr-image-displayer, shr-tag-img):
Use them.
* lisp/mail/rmailmm.el (rmail-mime-render-html-shr): Add FIXME.
* test/src/process-tests.el (process-tests/broken-pipe): Use
CONNECTION-TYPE.
(process-tests/broken-pipe/pipe-all)
(process-tests/broken-pipe/pipe-stdin): Skip via 'skip-when'.
(process-tests/broken-pipe/pty)
(process-tests/broken-pipe/pty-stdin): Remove these invalid tests; EPIPE
from a PTY doesn't make sense.
This ensures that if the child process closed its stdin and Emacs tries
to write to it, the process can still do any remaining work and exit
normally. In practice, this can occur with commands like "head(1)"
(bug#79079).
* src/fileio.c (file_for_stream): New function, extracted from...
(Fset_binary_mode): ... here.
(Ffile__close_stream): New function.
* src/process.c (send_process): When encountering EPIPE, only close the
fd for the pipe to the child process's stdin.
* lisp/eshell/esh-io.el (eshell-output-object-to-target): Don't check
for process liveness anymore.
* test/src/process-tests.el (process-tests/broken-pipe): New function.
(process-tests/broken-pipe/pipe, process-tests/broken-pipe/pty)
(process-tests/broken-pipe/pipe-stdin)
(process-tests/broken-pipe/pty-stdin): New tests.
* etc/NEWS: Announce this change.
* test/src/process-tests.el (start-process-should-not-modify-arguments):
Clean up test process.
(process-test--check-pipe-process): New macro...
(process-test-make-pipe-process-no-buffer): ... call it.
* src/lisp.h (SAFE_ALLOCA_LISP_EXTRA): Remove. It is no longer
used, it makes life more difficult in the feature/igc3 branch,
and having it around tempted me to start using it again.
* src/editfns.c (styled_format): Don’t call SAFE_ALLOCA_LISP_EXTRA,
as this makes life more difficult in the feature/igc3 branch.
Also, allocate another byte for the format string trailing '\0',
so that we don’t rely in the str2num trick with trailing '\1'.
Problems reported by Pip Cet (Bug#81057#32).
Also, check alloca size more exactly. Ameliorate the extra
conditional branches by doing all the internal size calculations
before a conditional branch on overflow.
Problem reported by Helmut Eller (Bug#81057).
On x86-64 this patch shrinks USEFUL_PRECISION_MAX
from 16382 to 1074, SPRINTF_BUFSIZE from 21318 to 1386,
and sizeof initial_buffer from 22318 to 2386.
This also fixes a problem reported privately by Pip Cet:
exactly formatting the smallest positive IEEE double 2**-1074
with %f needs %.1074f and 1074 is DBL_MANT_DIG - DBL_MIN_EXP,
not merely 1 - DBL_MIN_EXP.
* src/editfns.c (USEFUL_PRECISION_MAX, SPRINTF_BUFSIZE):
Base these on double, not long double, since long double
is not the worst case (it is used only for converted u?intmax_t).
(USEFUL_PRECISION_MAX): Add DBL_MANT_DIG - 1 as per Pip Cet.
* src/editfns.c (styled_format): Streamline allocation of
auxiliary tables, by allocating them all in one go
rather than via separate alloca / mallocs.
* etc/NEWS: Document change.
* lisp/emacs-lisp/package-vc.el (package-vc--clone): Implement
logic to find and copy files from a previous installation.
(package-vc-install): Indicate the effect of the prefix argument
in the prompt.
cf96e9cb5a ; Fix byte-compilation warnings in non-Tree-Sitter builds
23575adc7b ; * doc/lispref/variables.texi (Local Variables): Fix typ...
8b6fb2f646 ; * doc/lispref/variables.texi (Local Variables): Fix 'na...
d3c72b8389 ; * src/xdisp.c (display_line): Fix commentary (bug#80693).
a981517b72 Fill margins with 'margin' face on truncated screen lines
8e37499035 ; * doc/lispref/os.texi (Init File): Fix markup (bug#81049).
f4c326c378 ; * src/sfnt.c (sfnt_read_cmap_format_12): Assert there's...
bf89ee6d07 ; * etc/PROBLEMS: Cursor not shown on Windows with system...
20500d6200 ; htmlfontify: Handle 'reset' face attribute value (bug#8...
d0d657fa90 ; Minor Tramp cleanup
93ea0d7d28 ; Improve documentation of VC commands in Dired
318084829c Eglot: adjust reference to completion frontends in manual
2a166c2dbd Eldoc: display documentation in visual-line-mode
aba60ad0c5 Eglot: prefer markdown-ts-view-mode for markup rendering ...
689c3bd508 Use 'read-multiple-choice' in 'markdown-ts-mode' (bug#81027)
71809ee5df Fix 'markdown-ts-code-span' face (bug#81026)
286833e401 Add read-only 'markdown-ts-view-mode' (bug#81023)
b39c123490 Fix strikethrough in 'markdown-ts-mode' (bug#80991)
0be998d4bc Fix code-span in headings in 'markdown-ts-mode' (bug#80979)
a00beb3a31 Make 'markdown-ts-inline-images' buffer local and test fo...
a0c05029fd * etc/NEWS: Mention new user option tramp-propagate-emacs...
2e71d2c709 Propagate EMACSCLIENT_TRAMP to remote hosts with Tramp
ff96db93f2 keyboard-tests.el: Try and fix the failure on EMBA
ce3098752c doc: Remove long obsolete references to `package-initialize`
9bc04b001a vc-next-action: Call vc-delete-file on FILESET-ONLY-FILES
13039e3442 ; touch-up last commit: copyright and comments
c2a24dcec8 ; update msys2 build helper for Emacs 31 & UCRT
3630baae72 hideshow: Support new 'margin' face for margin indicators...
20d17df3f4 Use the new 'margin' face in Flymake (bug#80693)
07f2bbc905 vc-dir-resynch-file: Pass down non-truename'd FILE
* lisp/mail/rmailsum.el (rmail-new-summary-1): If we are before,
or close to, msg number rmail-summary-starting-message,
start the search a little before there.
* etc/ERC-NEWS: Mention change.
* lisp/erc/erc.el (erc-connection-established): Apply `erc--open-target'
to all existing query buffers after they've been reassociated by
the erc-networks logic.
* lisp/erc/erc.el (erc--user-nuh-message-types): New variable.
(erc--shuffle-nuh-nickward, erc--interpret-nuh): Replace former with
latter, whose behavior is easier to predict.
* test/lisp/erc/erc-tests.el (erc--interpret-nuh): New test.
* lisp/erc/erc-button.el (erc-button--display-error-notice-with-keys):
Ensure tail of let-bound `erc-insert-post-hook' is a list.
* lisp/erc/erc-truncate.el (erc-truncate--warn-about-logging): Use
`erc--warn-once-before-connect' instead of calling
`erc-button--display-error-notice-with-keys-and-warn' directly.
* lisp/erc/erc.el (erc--warn-once-before-connect-function)
(erc--warn-once-before-connect-calls): New variables.
(erc--warn-once-before-connect): Refactor for readability, incorporating
new definitions above for flexibility and to help ensure uniqueness.
* lisp/erc/erc.el (erc--lwarn): During tests where the variable
`erc--warnings-buffer-name' is non-nil, don't display the Warnings
buffer, and inhibit messages for the benefit of batch runs.
* test/lisp/erc/erc-tests.el (erc--modify-local-map): Protect various
hooks from module-setup code.
* test/lisp/erc/resources/erc-tests-common.el
(erc-tests-common-equal-with-props): Act more like
`equal-including-properties' in accepting arbitrary objects rather than
just strings.
(erc-tests-common-with-global-modules): New macro.
(erc-tests-common-frozen-options): New variable.
(erc-tests-common-with-frozen-options): New macro.
(erc-tests-common-make-server-buf): Accept a buffer for the NAME arg.
(erc-tests-common-assert-get-inserted-msg-readonly-with): Instead of
shadowing, use macro to protect calling environment from effects of
activating global module.
* lisp/erc/erc.el (erc--insert-before-markers-transplanting-hidden):
Don't deliberately return anything because the return value is
undefined. The only existing call site, in `erc-insert-line', invokes
the function indirectly via `erc--insert-line-function' and discards the
result.
* test/lisp/erc/erc-scenarios-join-display-context.el: Require
`erc-join'.
* test/lisp/erc/erc-scenarios-log.el: Remove forward declarations and
require `erc-stamp'.
* test/lisp/erc/erc-scenarios-match.el: Require `erc-match'.
* test/lisp/erc/erc-scenarios-misc.el
(erc-scenarios-base-kill-server-track): Suppress unwanted newline in
test output.
* test/lisp/erc/erc-scenarios-sasl.el (erc-scenarios-sasl--plain-fail):
Don't redundantly bind `erc--warnings-buffer-name' or create a buffer
for it. Use literal value assigned by test fixture instead.
* test/lisp/erc/erc-scenarios-services-misc.el: Require `erc-services'.
* test/lisp/erc/erc-tests.el (erc-handle-irc-url): Remove redundant
`save-excursion'.
(erc-tests--modules): Reflow into single column for easier management of
divergent WIP patch sets. This should help minimize manual surgery when
applying them atop one another.
* test/lisp/erc/resources/erc-scenarios-common.el: Remove unused
`require's and forward declarations from top of file.
(erc-scenarios-common--make-bindings): Remove the non-existent
`erc-auth-source-parameters-join-function' and add
`erc--warnings-buffer-name'. The latter's buffer, if created, will be
killed automatically when the test body exits.
(erc-scenarios-common-with-cleanup): Generate locally scoped defvars to
be used in a manner similar to `dlet' for user options yet to be loaded.
(erc-scenarios-common--assert-date-stamps): Don't run when `erc-stamp'
isn't loaded.
* doc/misc/erc.texi: Change ERCVER to 5.7 without a "-git" suffix.
* lisp/erc/erc.el (erc-version): Change working version to 5.7-git. Do
the same for the package "Version" header. Bump required Compat version
to 31. Add new 5.7 to Emacs 32.1 mapping in top-level modification of
`customize-package-emacs-version-alist'.
The expiry time needs to be reconizable by parse-time-string,
which is only guaranteed with the C locale.
* lisp/url/url-cookie.el (url-cookie-parse-file-netscape): Use C
locale for formatted expiry time.
(url-cookie-handle-set-cookie): Likewise.
* lisp/erc/erc.el: Change "Version" package header from 5.6.2-git to
5.6.2. The ERCVER variable in doc/misc/erc.texi is already there.
Retain `customize-package-emacs-version-alist' mapping to Emacs 31.1
even though master has already advanced to 32.0.50.
(erc-version): Change version from 5.6.2-git to 5.6.2.
Allow completion "frontends" to provide extra information
that the backends they call can use to adjust or optimize
their behavior.
See some relevant discussion at
https://yhetil.org/emacs/jwv7bpl28y6.fsf-monnier+emacs@gnu.org/
* lisp/minibuffer.el (completion-frontend-properties):
New variable.
(completion-lazy-hilit-p): New function.
(completion-hilit-commonality, completion-lazy-hilit)
(completion-pcm--hilit-commonality)
(completion-flex-all-completions): Use it instead of
checking the 'completion-lazy-hilit' variable directly.
* lisp/completion-preview.el (completion-preview--capf-wrapper):
Bind 'completion-frontend-properties'.
(completion-preview--try-table): Add comment.
* etc/NEWS: Announce 'completion-frontend-properties'.
2d496b842d ; Fix Gregor Schmid's attribution for lua-mode.el.
69c50dcb47 ; package-activate-all: Drop requiring package now not pr...
f94637749a vc-switch-working-tree: Use project-current again
060451d6e0 treesit-explore-mode usability improvements (bug#80935)
48b064a2aa Fix 'vc-dir-resynch-file' again (bug#80967)
[WARNING]: Deprecation warnings can be disabled by setting `deprecation_warnings=False` in ansible.cfg.
[DEPRECATION WARNING]: Importing 'to_bytes' from 'ansible.module_utils._text' is deprecated. This feature will be removed from ansible-core version 2.24. Use ansible.module_utils.common.text.converters instead.
included: /home/albinus/src/tramp-tests/roles/test/tasks/adb.yml for localhost => (item={'name': 'adb', 'start': '04157df41d46b840'})
fatal: [localhost]: FAILED! => {
"assertion": "message == []",
"changed": false,
"evaluated_to": false,
"msg": "Assertion failed"
}
* Ant Java: works at least for jikes and javac
symbol: ant
@ -161,7 +179,7 @@ cucumber foo/cucumber.feature:15 # Scenario: deep backtrace in step definition
* EDG C/C++
symbol: edg-1 edg-2
symbols: edg-1 edg-2
build/intel/debug/../../../struct.cpp(42): error: identifier "foo" is undefined
build/intel/debug/../../../struct.cpp(44): warning #1011: missing return statement at end of ...
Dummy arg W in module SUBA line 8 file arrayclash.f is array
L4 used at line 55 file test/assign.f; never set
@ -304,6 +322,251 @@ In file included from /usr/include/c++/3.3/backward/warn.h:4,
from /usr/include/c++/3.3/backward/iostream.h:31:0,
from test_clt.cc:1:
* GCC nested notes
symbol: gcc-nested-notes
Example from https://developers.redhat.com/articles/2026/04/28/gcc-16-improved-error-messages-sarif-output#new_c___error_improvements with and without Unicode