* 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.
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.)
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.
* 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.
* 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.
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
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.
* 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/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.
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)
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.
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 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)
* 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'.
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)