* lisp/time-stamp.el (time-stamp, time-stamp--system-name):
Use 'string-match-p' instead of 'string-match'.
(time-stamp--count-newlines): New function to implement the algorithm.
(time-stamp--system-name-1): New function, a testing seam.
* test/lisp/time-stamp-tests.el (with-time-stamp-system-name): Use the
new testing seam to expand test coverage.
* test/lisp/emacs-lisp/package-vc-tests.el
(package-vc-tests-packages): Rename test packages to avoid
suffix being treated as a version number by
`package--description-file'.
(package-vc-tests-add): Ensure suffix capitalisation remains as
original when calling `replace-regexp-in-string'.
(package-vc-tests-create-repository): Fix typo in temporary
email and use a reserved TLD.
(package-vc-tests-environment-tear-down): Rename preserved
buffers to avoid conflicts between tests.
* test/lisp/vc/vc-git-tests.el (vc-git-test--with-repo): Use
example.com, domain following RFC 2606.
* test/lisp/vc/vc-tests/vc-tests.el
(vc-test--with-author-identity): Use example.com, domain
following RFC 2606.
* lisp/emacs-lisp/package-vc.el (package-vc--make): Use same
format for buffer as `package-vc--build-documentation'.
* test/lisp/emacs-lisp/package-vc-tests.el
(message-auto-save-directory): Silence byte compiler.
(package-vc-with-tests-environment): Initialize package archives
after setting a temporary `package-user-dir'. Set up
`package-gnupghome-dir'. Remove `default-directory' binding.
(package-vc-tests-environment-tear-down): Fix argument order in
`package-vc-tests-log-buffer-name' call.
(package-vc-tests-with-installed): Rename from
`package-vc-with-installed-tests'.
(package-vc-test-deftest): Use
`package-vc-tests-with-installed'.
(prepare-patch): Bind `message-auto-save-directory' to
`package-vc-tests-dir'.
* test/lisp/package-vc-tests.el: Rename to
test/lisp/emacs-lisp/package-vc-tests.el
* test/lisp/package-vc-resources/Makefile.in: Rename to
test/lisp/emacs-lisp/package-vc-resources/Makefile.in
* test/lisp/package-vc-resources/test-package-SUFFIX-inc.texi.in:
Rename to
test/lisp/emacs-lisp/package-vc-resources/test-package-SUFFIX-inc.texi.in
* test/lisp/package-vc-resources/test-package-SUFFIX-lib-v0.1.el.in:
Rename to
test/lisp/emacs-lisp/package-vc-resources/test-package-SUFFIX-lib-v0.1.el.in
* test/lisp/package-vc-resources/test-package-SUFFIX-lib-v0.2.el.in:
Rename to
test/lisp/emacs-lisp/package-vc-resources/test-package-SUFFIX-lib-v0.2.el.in
* test/lisp/package-vc-resources/test-package-SUFFIX-v0.1.el.in:
Rename to
test/lisp/emacs-lisp/package-vc-resources/test-package-SUFFIX-v0.1.el.in
* test/lisp/package-vc-resources/test-package-SUFFIX-v0.2.el.in:
Rename to
test/lisp/emacs-lisp/package-vc-resources/test-package-SUFFIX-v0.2.el.in
* test/lisp/package-vc-resources/test-package-SUFFIX.texi.in:
Rename to
test/lisp/emacs-lisp/package-vc-resources/test-package-SUFFIX.texi.in
* test/lisp/package-vc-tests.el
(package-vc-tests-preserve-artefacts): When non nil then
preserve temporary test files and buffers.
(package-vc-tests-dir, package-vc-tests-packages)
(package-vc-tests-repository): Silence byte compiler.
(package-vc-tests-packages): Define packages to test.
(package-vc-tests-add): Copy a an in file template, update
SUFFIX in it and add it to index.
(package-vc-tests-create-repository): Create a package git
repository with a test package's source.
(package-vc-tests-package-desc): Retrieve a `package-desc' for
tested package.
(package-vc-tests-package-spec): Retrieve a pkg-spec for tested
package.
(package-vc-tests-package-lisp-dir): Determine a lisp directory
for a package.
(package-vc-tests-package-main-file): Calculate expected
location of package's main file.
(package-vc-tests-load-history-marker): Create a load history
marker.
(package-vc-tests-load-history-pattern): Create a regexp pattern
to search in `load-history'.
(package-vc-tests-load-history-position): Calculate a position
in `load-history'.
(package-vc-tests-load-history-interesting-entries): Return
`load-history' entries related to the current
`package-vc-tests-dir'.
(package-vc-tests-explain-load-history-position): Return ERT
explanation for load history position failures.
(package-vc-tests-log-buffer-name): Return name of a log buffer
used to build package or its documentation.
(package-vc-tests-log-buffer-exists): Return non-nil when a log
buffer used to build package or its documentation exists.
(package-vc-tests-explain-log-buffer): Print contents of log
buffer used to build package or its documentation and return ERT
explanation for the failure.
(package-vc-tests-elc-files): Check that there are elc files and
that there is no compiled autoloads file amongst them.
(package-vc-tests-assert-delete-elc): Assert that .elc files are
present for a package.
(package-vc-tests-assert-package-alist): Assert that
`package-alist' contains a `package-desc' for package, and that
the `package-desc' has correct slot `version' and slot
`dir'.:(package-vc-tests-reset-head^): Reset head of checkout of
tested packages to HEAD^.
(package-vc-tests-packages-head): Return current checkout
revision.
(package-vc-tests-make-spec): Make a new test spec for a test
package.
(with-package-vc-tests-environment): Setup test environment.
(package-vc-tests-environment-tear-down): Tear down test
environment.
(with-package-vc-tests-installed): Withing a test environment,
install package, evaluate test body, and then tear down the test
environment.
(package-vc-tests-install-from-elpa)
(package-vc-tests-install-from-spec): Install a test package.
(package-vc-tests-checkout-from-elpa-install-from-checkout)
(package-vc-tests-checkout-with-git-install-from-checkout):
Checkout and install a test package.
(package-vc-tests-package-vc-async-wait): Wait for an
asynchronous VC command to finish.
(package-vc-tests-deftest): Define series tests for each package
in `package-vc-tests-under-test'.
(install-post-conditions): Tests that after installing a test
package the `load-history' entries, package's main file, commit,
elc files, and `package-alist' entry are correct.
(require): Test that after calling `require' the `load-history'
entries are correct.
(upgrade, upgrade-all): Test that after calling
`package-vc-upgrade'/`package-vc-upgrade-all' the `load-history'
entries, package's elc files, commit, and `package-alist' entry
are correct.
(upgrade-after-require, upgrade-all-after-require): Test that
after calling `require' followed by
`package-vc-upgrade'/`package-vc-upgrade-all' the `load-history'
entries, commit, package's elc files, and `package-alist' entry
are correct.
(rebuild): Test that after calling `package-vc-rebuild' on an
old version of a package, the package's old function, old macro,
elc files, and `package-alist' entry are correct.
(rebuild-after-require): Test that after calling `require'
followed by `package-vc-rebuild' on an old version of a package,
the package's old function, old macro, elc files, and
`package-alist' entry are correct.
(prepare-patch): Test that after calling
`package-vc-prepare-patch' the message buffer is correct.
(log-incoming): Test that after calling
`package-vc-log-incoming' the log buffer is correct.
(pkg-spec-doc-make-shell-command): Test that :doc, :make, and
:shell-command slots in a pkg spec execute.
* test/lisp/package-vc-resources/test-package-SUFFIX-v0.1.el.in:
* test/lisp/package-vc-resources/test-package-SUFFIX-lib-v0.1.el.in:
Code template of version 0.1 of a test package.
* test/lisp/package-vc-resources/test-package-SUFFIX-v0.2.el.in:
* test/lisp/package-vc-resources/test-package-SUFFIX-lib-v0.2.el.in:
Code template of code of version 0.2 of a test package.
* test/lisp/package-vc-resources/test-package-SUFFIX-inc.texi.in:
* test/lisp/package-vc-resources/test-package-SUFFIX.texi.in:
Documentation template of a test package.
* test/lisp/package-vc-resources/Makefile.in: Makefile template of
a test package.
Co-developed-by: Philip Kaludercic <philipk@posteo.net>
(Bug#79188)
Ensure that the long description of a package is the same regardless of
originating package archive and package installation state.
* lisp/emacs-lisp/package.el: Add documentation on additional files that
Emacs creates during package installation.
(package-desc): Update incomplete description of slot `kind'.
(package-install-from-archive): Download '*-readme.txt' from the archive
and save it as 'README-elpa' to avoid the issues described in bug#79411.
* test/lisp/emacs-lisp/package-resources/multi-file-readme.txt:
* test/lisp/emacs-lisp/package-resources/simple-single-readme.txt:
Update readmes to mark them as "server readmes" and distinguish them
from what the packages themselves provide in their documentation.
* test/lisp/emacs-lisp/package-tests.el (package-test-install-singlefile)
(package-test-describe-installed-with-ws-only-readme): Add tests.
(package-test-install-multifile): Test more files for presence.
(package-test-describe-package)
(package-test-describe-installed-multi-file-package)
(package-test-describe-non-installed-package)
(package-test-describe-non-installed-multi-file-package): Test for
server readme being used as long description. (Bug#79411)
* test/lisp/emacs-lisp/package-tests.el (with-package-test): Remove
unused keyword :update-news and its implementation. Add documentation
for remaining keywords, since in particular :basedir was being overused.
Eliminate code redundancy by reimplementing keyword :upload-base in
terms of equivalent macro `ert-with-temp-directory' macro. Implement
other minor improvements.
(package-test-install-file, package-test-bug58367, package-test-bug65475)
(package-test-install-file-EOLs, package-test-install-multifile): Remove
superfluous :basedir keyword from `with-package-test' calls to not give
future developers bad example.
(package-test-install-multifile): Move file tests out of
`with-temp-buffer', as they are independent of current buffer. (Bug#79411)
When using vc-exec-after to parse program output, check that the
program didn't die to a signal or exit with an error exit code
before attempting the parse. Continue to use plain
vc-run-delayed where we aren't parsing output, because in these
cases it doesn't matter to CODE if the output is incomplete.
* lisp/vc/vc-dispatcher.el (vc-exec-after): <process-status>:
Treat PROC dying to a signal the same as PROC exiting non-zero.
(vc-exec-after): <accept-process-output>: Restore making a
nonblocking call, for the case of vc-exec-after called from a
process sentinel. diff-hl *does* require this.
(vc-exec-after): <OKSTATUS>: New parameter, replacing SUCCESS,
which never worked as documented.
* test/lisp/vc/vc-tests/vc-test-misc.el (vc-test-exec-after-3):
Test it.
(vc-run-delayed-success): New macro.
* lisp/vc/vc-git.el (vc-git-dir-status-goto-stage):
* lisp/vc/vc-hg.el (vc-hg-dir-status-files):
* lisp/vc/vc.el (vc-pull-and-push): Use it.
* lisp/obsolete/vc-arch.el (vc-exec-after):
* lisp/obsolete/vc-mtn.el (vc-exec-after):
* lisp/vc/vc-bzr.el (vc-exec-after):
* lisp/vc/vc-cvs.el (vc-exec-after):
* lisp/vc/vc-git.el (vc-exec-after):
* lisp/vc/vc-hg.el (vc-exec-after):
* lisp/vc/vc-svn.el (vc-exec-after): Update declarations.
* doc/misc/tramp.texi (Remote processes): Rewrite subsection
"Running remote processes on MS Windows hosts".
* etc/NEWS: Mention remote process support for Tramp's "smb" method.
Presentational fixes and improvements.
* lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist):
Use `tramp-smb-handle-make-process', `tramp-smb-handle-shell-command'
and `tramp-handle-start-file-process'.
(tramp-smb-matching-line): New defvar.
(tramp-smb-handle-make-process, tramp-smb-handle-shell-command)
(tramp-smb-shell-prompt): New defuns.
(tramp-smb-handle-process-file): Rewrite.
(tramp-smb-handle-start-file-process): Remove.
(tramp-smb-get-localname, tramp-smb-shell-quote-localname):
New optional argument SHARE.
(tramp-smb-send-command): Remove echoed command string.
(tramp-smb-maybe-open-connection): Initialize variables.
(tramp-smb-wait-for-output): Wait more robust.
(tramp-smb-call-winexe): Check for share. Goto current directory.
(tramp-smb-connection-local-powershell-variables): New defconst.
Set it as connection local variables.
* test/lisp/net/tramp-tests.el (tramp-test28-process-file)
(tramp-test29-start-file-process, tramp-test30-make-process)
(tramp-test32-shell-command, tramp--test-async-shell-command)
(tramp--test-supports-processes-p): Adapt for "smb" method.
(tramp-test34-explicit-shell-file-name)
(tramp-test45-asynchronous-requests): Skip for "smb" method.
(tramp--test-check-files): Skip shell test for some special
characters in the "smb" case.
(tramp-test52-unload): Disable further tests.
Simplify fill-tests.el by grouping similar tests in the same
erts file. Move the test code into the erts files, so it is
closer to the test cases, which provides context. Add basic
test cases for common filling operations and for the scenarios
described in Bug#79575.
* test/lisp/textmodes/fill-tests.el (fill-test-end-period)
(fill-test-haskell): Rename from `test-fill-end-period' and
`test-fill-haskell' to follow the same naming convention of
the other tests.
(fill-test-fill-region-as-paragraph-default)
(fill-test-fill-region-as-paragraph-semlf)
(fill-test-fill-region-as-paragraph, fill-test-fill-region)
(fill-test-fill-paragraph, fill-test-fill-paragraph-semlf):
Group tests and move test code into erts files.
(fill-test-fill-paragraph-semlf-emacs-lisp-mode)
(fill-test-fill-paragraph-semlf-c-mode)
(fill-test-fill-paragraph-semlf-org-mode)
(fill-test-fill-paragraph-semlf-markdown-mode): Rename from
`fill-test-semlf-emacs-lisp-mode', `fill-test-semlf-c-mode',
`fill-test-semlf-org-mode' and
`fill-test-semlf-markdown-mode'. Move test code into erts
files.
(fill-test-semlf, fill-test-semlf-fill-region)
(fill-test-semlf-justify)
(fill-test-semlf-sentence-end-double-space)
(fill-test-semlf-fill-column)
(fill-test-semlf-punctuation-marks, fill-test-semlf-twice)
(fill-test-semlf-fill-prefix, fill-test-semlf-indented-block)
(fill-test-semlf-revert): Delete tests since they are now
grouped with other tests.
* test/lisp/textmodes/fill-resources/fill-paragraph.erts:
* test/lisp/textmodes/fill-resources/fill-paragraph-semlf.erts:
* test/lisp/textmodes/fill-resources/fill-region-as-paragraph.erts:
* test/lisp/textmodes/fill-resources/fill-region-as-paragraph-default.erts:
* test/lisp/textmodes/fill-resources/fill-region-as-paragraph-semlf.erts:
Add test cases for the function specified in the file name,
including tests for the scenarios described in the bug report.
* test/lisp/textmodes/fill-resources/fill-region.erts: Add
test case for custom `fill-region-as-paragraph-function',
include test code in the test specification.
* test/lisp/textmodes/fill-resources/fill-paragraph-semlf-c-mode.erts:
* test/lisp/textmodes/fill-resources/
fill-paragraph-semlf-emacs-lisp-mode.erts:
* test/lisp/textmodes/fill-resources/fill-paragraph-semlf-markdown-mode.erts:
* test/lisp/textmodes/fill-resources/fill-paragraph-semlf-org-mode.erts:
Rename from semlf-*-mode.erts, prefix test names with the
tested function and include test code in the test
specification.
* test/lisp/textmodes/fill-resources/semlf-fill-column.erts:
* test/lisp/textmodes/fill-resources/semlf-fill-prefix.erts:
* test/lisp/textmodes/fill-resources/semlf-fill-region.erts:
* test/lisp/textmodes/fill-resources/semlf-fill-region-as-paragraph.erts:
* test/lisp/textmodes/fill-resources/semlf-indented-block.erts:
* test/lisp/textmodes/fill-resources/semlf-justify.erts:
* test/lisp/textmodes/fill-resources/semlf-punctuation-marks.erts:
* test/lisp/textmodes/fill-resources/semlf-revert.erts:
* test/lisp/textmodes/fill-resources/semlf-sentence-end-double-space.erts:
* test/lisp/textmodes/fill-resources/semlf-twice.erts:
* test/lisp/textmodes/fill-resources/semlf.erts: Delete
files. (Bug#79575)
The empty vector and string(s) are immutable, contain no references and
always read as the same objects.
* src/print.c (PRINT_CIRCLE_CANDIDATE_P): Turn macro into...
(print_circle_candidate_p): ...a function, and exclude [] and "".
* test/src/print-tests.el (print-circle): Add test case.
* lisp/time-stamp.el (time-stamp--message, time-stamp--system-name):
New utility functions.
(time-stamp, time-stamp-once, time-stamp-string-preprocess):
Call the new functions.
* lisp/time-stamp.el (time-stamp-once): Do not look for additional
templates once we have displayed the warning about being disabled.
Move earlier the check for arguments being the correct type.
* test/lisp/time-stamp-tests.el (time-stamp-custom-messages): New test.
* lisp/vc/diff-mode.el (diff-file-kill): New optional DELETE
parameter.
(diff-kill-creations-deletions):
* lisp/vc/vc.el (vc--fileset-by-state): New functions.
(diff-kill-creations-deletions, diff-filename-drop-dir)
(diff-hunk-file-names, diff-file-next, diff-hunk-header-re)
(vc-dir-resynch-file): Declare.
(vc--apply-to-other-working-tree): Handle copying and moving
files in the added, removed, missing and unregistered states.
* test/lisp/vc/vc-tests/vc-tests.el
(vc-test--apply-to-other-working-tree): New test.
This patch adds tests for the following scenarios:
- Every element is handled (basic functionality)
- Result specified in SPEC is returned
- Bindings named "tail" are not shadowed by 'dolist'
* test/lisp/subr-tests.el (subr-tests--dolist--every-element-is-handled)
(subr-tests--dolist--returns-spec-result)
(subr-tests--dolist--does-not-shadow-tail-binding): New tests.
(Bug#79778)
The core of the problem is that `completion-pcm--prepare-delim-re`
is designed to match a "delimiter" in the pattern but was misused
to match a sequence of delimiter chars in the completions.
* lisp/minibuffer.el (completion-pcm--delim-re): Rename from
`completion-pcm--prepare-delim-re` and change its calling convention.
(completion-pcm--segments->regex): Use it.
(completion-pcm-word-delimiters): Adjust accordingly.
* test/lisp/minibuffer-tests.el (completion-pcm--test-zerowidth-delim):
New test.
* lisp/progmodes/ruby-mode.el (ruby-smie-rules): Check for ':' and
'=>' as previous tokens, and handle symbols ending with ':' to
properly indent keyword argument arrays and hashes when
ruby-bracketed-args-indent is nil.
* lisp/progmodes/ruby-ts-mode.el (ruby-ts--parent-call-or-bol):
Handle arrays/hashes that are children of 'pair' nodes (keyword
arguments) to ensure consistent indentation.
* test/lisp/progmodes/ruby-mode-resources/ruby-bracketed-args-indent.rb:
Add test cases for keyword argument arrays and hashes with both
symbol-colon and hash-rocket syntax.
When ruby-bracketed-args-indent is nil, arrays and hashes used as
keyword argument values now indent by ruby-indent-level from the
line start, matching the documented behavior and fixing inconsistent
indentation (bug#74517).
(https://lists.gnu.org/archive/html/emacs-devel/2025-11/msg00939.html)
* lisp/replace.el (replace--push-stack): Add new args
'next-replacement' and 'match-again' and push them to the stack.
(perform-replace): Restore the previous already calculated values
of 'next-replacement' and 'match-again' from the stack for the
'backup' ('^') key (bug#79811).
* test/lisp/replace-tests.el (query-replace-tests): Add tests.
* lisp/textmodes/ispell.el (ispell-add-per-file-word-list): Deal
with `comment-end' in a way that works for comments that don’t
nest.
We proceed as follows: when `comment-end' is non-empty, we only
ever insert one start and one end comment, the first time we add
a local word. This works with both C-style (which don’t nest)
and Rust-style comments (which do).
If we’re using line comments (i.e. comments that only have a
`comment-start'), then continue to insert one on each line.
* test/lisp/textmodes/ispell-tests/ispell-tests.el
(ispell/ispell-add-per-file-word-list/nxml): Adjust test.
Bug#79871
* test/src/buffer-tests.el (test-restore-buffer-modified-p)
(test-buffer-chars-modified-ticks): Don't leave unsaved and
modified file buffers after the tests.
The tests are pretty basic, I don't expect them to catch
anything else than giant bugs.
* test/lisp/progmodes/eglot-tests.el (eglot-test-semtok-basic)
(eglot-test-semtok-refontify): New tests.
(eglot--semtok-faces, eglot--semtok-wait): New helpers.
* lisp/vc/vc-dispatcher.el (vc-do-command): Support discarding
standard error.
* lisp/vc/vc-hg.el (vc-hg-dir-status-files): Discard standard
error of 'hg status' to avoid parsing mistakes.
(vc-hg-command): Update docstring given new meaning of first
argument to vc-do-command.
* test/lisp/vc/vc-tests/vc-test-misc.el (vc-test-do-command-1)
(vc-test-do-command-2, vc-test-do-command-3)
(vc-test-do-command-4, vc-test-do-command-5)
(vc-test-do-command-6, vc-test-do-command-7): New tests.
Newer/newest clangd support more encodings and actually
negotiate with us, so test shouldn't assume UTF-16..
* test/lisp/progmodes/eglot-tests.el
(eglot-tests--lsp-abiding-column-1): Tweak.
Credentials cached in 'url-basic-auth-storage' are keyed by
"server:port", but were being looked up by just "server" in
'url-basic-auth'.
* lisp/url/url-auth.el (url-basic-auth): Lookup cached basic auth
credentials by "server:port". (Bug#79486)
* test/lisp/url/url-auth-tests.el (url-auth-test-auth-retrieve-cache):
Check the digest auth test-cases cache retrieval test cases against the
basic auth logic.
* test/lisp/vc/vc-tests/vc-test-misc.el (vc-test-exec-after-1)
(vc-test-exec-after-2, vc-test-exec-after-3)
(vc-test-exec-after-4, vc-test-exec-after-5): Fix shell commands
for MS-Windows: use "&" instead of ";" and don't use fractional
times for 'sleep', as some Windows ports of 'sleep' don't support
that.
* test/lisp/emacs-lisp/cl-lib-tests.el (cl-test-ldiff):
* test/lisp/emacs-lisp/seq-tests.el (test-seq-union):
These tests relied on literal constants being unique in the sense of
'eq', and would fail if they stop being that (already the case for
strings).
* test/lisp/erc/erc-scenarios-base-reuse-buffers.el
(erc-scenarios-common--base-reuse-buffers-channel-buffers): Extend some
timeouts.
* test/lisp/erc/erc-scenarios-keep-place-indicator.el
(erc-scenarios-keep-place-indicator--follow): Prefer `ert-skip' here
instead of an :unstable tag because ERC's tests can run locally on some
systems with "SELECTOR=t".
Latest tree-sitter library throws a syntax error if the
predicate names in a query don't end with question mark. So we
made the following change:
:equal changed to :eq?
:match changed to :match?
:pred changed to :pred?
Old names are transparently converted to new names when
expanding patterns.
:match predicate can now take the regexp and the node in any
order: it'll figure out which is which automatically. This way
it works with current Emacs convention (regexp first), as well
as tree-sitter's match convention (regexp second).
* doc/lispref/parsing.texi (Pattern Matching): Update manuel to
use new predicate names.
* src/treesit.c:
(Ftreesit_pattern_expand):
(Ftreesit_query_expand):
(treesit_predicate_match):
(treesit_eval_predicates):
(syms_of_treesit): Use new predicate names.
* test/src/treesit-tests.el (treesit-query-api): Update test.
* lisp/emacs-lisp/map-ynp.el (map-y-or-n-p): Use the 'read-key'
branch only when the variable 'y-or-n-p-use-read-key' is non-nil.
Add a new cond-branch to read from the minibuffer.
Add a special case when def is nil in a kmacro in batch mode (bug#67836).
* test/lisp/files-tests.el (files-tests--with-buffer-offer-save):
Let-bind 'y-or-n-p-use-read-key' to t.
* doc/lispref/commands.texi (Reading One Event): Mention
'read-char-choice-use-read-key'.
* lisp/emacs-lisp/rmc.el (rmc--show-help): Show non-selected
resized Help window at bottom. Inhibit useless message.
Remove unnecessary call to 'pop-to-buffer'.
(read-multiple-choice): Call 'read-multiple-choice--from-minibuffer'
when 'read-char-choice-use-read-key' is nil.
(read-multiple-choice--from-minibuffer): New function.
* test/lisp/emacs-lisp/rmc-tests.el (test-rmc--with-minibuffer-setup):
New macro.
(test-read-multiple-choice, test-read-multiple-choice-help):
Test both values of 'read-char-choice-use-read-key'.
* lisp/emacs-lisp/cl-extra.el (cl--types-of-memo): Delete var.
(cl--derived-type-specializers-memo): New var.
(cl-types-of): Delete function.
(cl--derived-type-specializers): New function.
(cl--derived-type-dispatch-list): Delete var.
(cl--derived-type-generalizer): Use the `:need-specializers` API instead.
(cl--derived-type-generalizers): Don't fill
`cl--derived-type-dispatch-list` any more.
* lisp/emacs-lisp/cl-preloaded.el (cl--derived-type-list): Delete var.
(cl--define-derived-type): Don't add type to `cl--derived-type-list`.
* test/lisp/emacs-lisp/cl-extra-tests.el (cl-types-test): Adjust.
When multiple wildcards occur in a PCM pattern,
completion-pcm--pattern->regex previously would generate one
instance of [^z-a]* for each of those wildcards, even if the
wildcards were adjacent and could therefore be matched by a
single [^z-a]*. This can make regex matching performance much
worse. For example, with a minibuffer containing "*/" with
point at the start, completion-pcm-all-completions would take
several seconds to match in project-find-file in the Emacs repo.
Now, we run completion-pcm--pattern->segments on the pattern
first, which adds additional structure to the pattern, including
consolidating adjacent regexes into a single sublist. Then
completion-pcm--segments->regex generates a single regex
wildcard for each of those pattern wildcards. As a consequence,
we need to update the callers of completion-pcm--pattern->regex
which pass non-nil GROUP. This provides a substantial
performance improvement in various edge cases.
* lisp/minibuffer.el (completion-pcm--pattern->segments)
(completion-pcm--segments->regex): Add. (bug#79693)
(completion-pcm--pattern->regex)
(completion-pcm--merge-completions): Call pattern->segments and
segments->regex.
(completion-pcm--pattern-point-idx): Delete.
(completion-pcm--segments-point-idx): Add.
(completion-pcm--hilit-commonality): Call
completion-pcm--segments-point-idx to find the submatch
containing point.
* test/lisp/minibuffer-tests.el (completion-pcm-test-5): Add
more tests of highlighting the first difference.
(completion-pcm-test-pattern->regex): Add tests showing the
regex form of PCM patterns.
Replace the use of 'elisp-scope-face(-1)' for analyzing face
specifications with 'elisp-scope-1' calls with an
appropriate OUTSPEC argument. This allows us to analyze
face specifications even when they are not passed directly
to relevant functions, but rather appear in a tail position
of a form that evaluates to a face specification.
* lisp/emacs-lisp/elisp-scope.el
(elisp-scope--match-spec-to-arg): Add new 'face' spec.
Use it instead of...
(elisp-scope-face, elisp-scope-face-1): ...these functions.
Remove them, no longer used.
* test/lisp/progmodes/elisp-mode-resources/semantic-highlighting.el:
Add test.