There won't be any uncommitted changes in the new working tree
yet, so vc-dir is unlikely to be useful.
* lisp/vc/vc.el (vc-add-working-tree): Finish by calling 'dired'
not 'vc-dir'.
* test/lisp/vc/vc-tests/vc-tests.el
(vc-test--other-working-trees): Delete stubbing out 'vc-dir'.
* test/lisp/minibuffer-tests.el (with-minibuffer-setup)
(completing-read-with-minibuffer-setup): Prevent instrumenting
functions that call these macros from erroring due to an invalid
debug specification in the 'declare' form. Use 't' as the debug
spec since it is the most general and adequate here.
* test/lisp/vc/vc-tests/vc-tests.el (vc-test--checkin-patch):
For the last stage of the test, restore alternative code path
for Git, though this time limited to when running the test on
MS-Windows. Cf. subthread starting from
<https://lists.gnu.org/archive/html/emacs-devel/2025-09/msg00785.html>.
* lisp/vc/vc-git.el
(vc-git--with-apply-temp-to-staging): Rename ...
(vc-git--with-apply-temp): ... to this. New ARGS parameter.
All uses changes.
(vc-git--checkin): In POST function, apply PATCH-STRING to the
working tree with 'git apply --3way --ours'.
* lisp/vc/vc-hg.el (vc-hg--checkin): Document what the call to
'hg update' is for.
* test/lisp/vc/vc-tests/vc-tests.el (vc-test--checkin-patch):
Delete completed FIXME and workaround.
This patch makes 'next-completion' and 'previous-completion' work
in the vertical completions format analogously to how they work in
the default horizontal format (bug#78959). It also fixes wrapping
in the vertical format and confines navigation (including
wrapping) in column-wise movement in the vertical format to the
current line, analogously to how navigation (including wrapping)
in line-wise movement in the horizontal format is confined to the
current column.
* doc/emacs/mini.texi (Completion): Fix several typos and improve
wording is several places.
(Completion Commands): Document navigation of the *Completions*
buffer in the vertical format. Document the difference between
format-sensitive movement and strictly column-wise or line-wise
movement. Document 'minibuffer-complete-and-exit' and update the
documentation of 'minibuffer-completion-auto-choose' and
'minibuffer-choose-completion'. Document the use of a numeric
prefix argument with the navigation commands.
(Completion Options): Rearrange and improve documentation of
'completions-sort', 'completions-format' and
'completion-auto-wrap', updating the latter to document the new
behavior.
* lisp/minibuffer.el (minibuffer-visible-completions-map): Rebind
"<left>" to 'minibuffer-previous-column-completion' and "<right>"
to 'minibuffer-next-column-completion'.
(minibuffer-next-completion): Add check for whether completions
format is vertical to decide whether to call
'next-line-completion' and replace calling 'next-completion' by
'next-column-completion'.
(minibuffer-next-column-completion)
(minibuffer-previous-column-completion): New commands.
* lisp/simple.el (completion-list-mode-map): Rebind "<left>" to
'previous-column-completion' and "<right>" to 'next-column-completion'.
(last-completion): Add handling for vertical completions format.
(completion--move-to-candidate-end): Always move point to the
position immediately after the last character of the completion
candidate. This unifies the behavior, simplifies the
implementation and facilitates implementing the improved
navigation of the *Completions* buffer.
(previous-column-completion, next-column-completion): New
commands, replacing the previous definitions of
'previous-completion' and 'next-completion' to reflect their
column-wise operation. Confine navigation (including wrapping) in
vertical format to the current line.
(previous-line-completion, next-line-completion): Implement
line-wise navigation (including wrapping) through all completions
in vertical format, not just those in the current column as in
horiztonal format. Update doc strings.
(next-completion, previous-completion): Redefine to call
'{next,previous}-line-completion' when completions format is
vertical and '{next,previous}-column-completion' otherwise.
* test/lisp/minibuffer-tests.el
(completions-format-navigation--tests): New function providing a
template to define tests of the navigation and wrapping behavior
with specified numbers of completion candidates.
(completions-format-navigation-test-{2,3,4,5,10,15,16}): New tests.
* lisp/vc/vc-git.el (vc-git--mailinfo): New function.
(vc-git-checkin-patch): Use it to extract authorship, date and
log message information from patches.
(vc-git--call): New INFILE argument. All uses changed.
* lisp/vc/vc-hg.el (vc-hg--checkin): When COMMENT is nil, take
authorship, date and log message information from the patch.
* lisp/vc/vc.el (checkin-patch): Specify to use authorship, date
and comment information in PATCH-STRING (bug#79408).
(prepare-patch): Specify that patch should include authorship
identity, date and log message information for REV if supported.
(diff-bounds-of-hunk): Declare.
(vc-default-checkin-patch): Warn if it looks like we will ignore
patch authorship information.
* test/lisp/vc/vc-tests/vc-tests.el (vc-hg-command)
(vc-git--out-str): Declare.
(vc-test--checkin-patch): New function.
(vc-test-git08-checkin-patch, vc-test-hg08-checkin-patch): New
tests.
* lisp/progmodes/ruby-mode.el (ruby-syntax-propertize):
Create an exception for assign-division operator not to be
recognized as regexp start (bug#79454).
* test/lisp/progmodes/ruby-mode-resources/ruby.rb: Add example.
* test/lisp/textmodes/ispell-resources/fake-aspell-new.bash:
Avoid using associative arrays since they are not available
in old bash versions that come with some systems (bug#79177).
* lisp/auth-source.el (auth-source-ignore-non-existing-file):
Rename it from `auth-source-ignore-empty-file'.
(auth-source-backends-parser-file): Use it.
* doc/misc/auth.texi (Help for users):
* etc/NEWS:
* test/lisp/auth-source-tests.el (auth-source-validate-backend)
(auth-source-test-netrc-create-secret):
Use `auth-source-ignore-non-existing-file'.
* test/lisp/net/tramp-tests.el (tramp-test16-file-expand-wildcards)
(tramp-test26-interactive-file-name-completion):
Prefer #'string-lessp over 'string<.
(tramp--test-ange-ftp-p, tramp-test47-read-password)
(tramp-test47-read-otp-password): Use function read syntax.
They were caused by compilation errors going to 'display-warning'
which prints a duplicate of the message to stdout when running
noninteractively.
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-tests--log-warning-for-byte-compile)
(bytecomp-tests--with-warnings): New. Wrap around compilation calls in
this file.
Correct a few edge cases where we used the keymaps at point when
looking up keymaps for an event position which is outside the
current buffer. Namely:
- Clicking on a part of the mode line which is after the end of
mode-line-format produces an event with non-nil posn-area but
nil posn-string.
- Even if posn-string doesn't have a local keymap, we should
still ignore the keymaps at point if posn-string is non-nil.
* src/keymap.c (Fcurrent_active_maps): Ignore keymaps at point
for more positions outside the buffer. (bug#76620)
* doc/misc/auth.texi: Replace @code{"..."} by @t{"..."}.
(Help for users): Describe property lists format. Explain, that
empty files in auth-sources are ignored when
auth-source-ignore-empty-file is non-nil.
(Help for developers): Add auth-source-creation-defaults to vindex.
* etc/NEWS: Introduce auth-source-ignore-empty-file.
Presentational fixes and improvements.
* lisp/auth-source.el (auth-source-ignore-empty-file): New defcustom.
(auth-source-backends-parser-file): Use it. (Bug#9113)
* test/lisp/auth-source-tests.el (auth-source-validate-backend):
Let-bind `auth-source-ignore-empty-file'.
(auth-source-test-searches): Set file suffix.
(auth-source-test-netrc-create-secret): Adapt test.
* test/lisp/textmodes/ispell-tests/ispell-tests.el:
* test/lisp/textmodes/ispell-tests/ispell-aspell-tests.el:
* test/lisp/textmodes/ispell-tests/ispell-international-ispell-tests.el:
* test/lisp/textmodes/ispell-tests/ispell-hunspell-tests.el: New files.
* test/lisp/textmodes/ispell-resources/fake-aspell.bash: Add a mock
`aspell' for use in ispell.el test, with old version.
* test/lisp/textmodes/ispell-resources/fake-aspell-new.bash: Add a mock
`aspell' for use in ispell.el test, with recent version.
* lisp/minibuffer.el (define-completion-category): New function.
(completion-category-get): New function, implements completion
category property lookup with (multiple) inheritance.
(completion-metadata-get, completion--styles)
(completion--cycle-threshold): Use it.
(completion-category-defaults): Mention it in docstring.
Remove entry for 'project-buffer' category, and instead...
* lisp/progmodes/project.el: ...have 'project-buffer' inherit
from 'buffer'.
* test/lisp/minibuffer-tests.el
(completion-category-inheritance): New test.
* etc/NEWS: Announce support for category inheritance.
Revert "Avoid duplicating strings in pcm--merge-completions",
commit b511c38bba. It broke
existing behavior, now covered by tests adding in this commit.
* lisp/minibuffer.el (completion-pcm--merge-completions):
* test/lisp/minibuffer-tests.el (completion-pcm-test-anydelim):
(completion-pcm-bug4219):
* etc/NEWS: Announce 'let-alist' support for indexing.
* test/lisp/emacs-lisp/let-alist-tests.el (let-alist-numbers):
Add a test for 'let-alist's support for indexing.
* doc/lispref/lists.texi (Association Lists): Document indexing
with 'let-alist'. (Bug#66509)
Escape literal % characters in Eglot URIs
Otherwise, a literal % in a file-name will be interpreted (by the
language server) as if it were a part of a percent-encoded sequence.
See Bug#78984 for context on why `url-path-allowed-chars' cannot be
changed to escape literal % characters.
* lisp/progmodes/eglot.el (eglot--uri-path-allowed-chars): Escape %,
remove the redundant variable definition.
* test/lisp/progmodes/eglot-tests.el (eglot-test-path-to-uri-escape):
test it.
Command edebug-bounce-to-previous-value uses the previous value
observed while single-stepping or evaluating an expression to
bounce point in the outside current buffer to the buffer
position corresponding to that value.
* lisp/emacs-lisp/edebug.el (edebug-previous-value): Add
variable.
(edebug-compute-previous-result, edebug-eval-expression): Update
it.
(edebug-bounce-to-previous-value): Add command.
(edebug-mode-map): Add keybinding for the new command, replacing
the binding of "P" to edebug-view-outside.
(edebug-mode-menus): Add menu entry for the new command.
* doc/lispref/edebug.texi (Edebug Views): Add documentation.
* test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el
(edebug-test-code-bounce-point): Add test code.
* test/lisp/emacs-lisp/edebug-tests.el
(edebug-tests-bounce-outside-buffer)
(edebug-tests-bounce-outside-point)
(edebug-tests-bounce-outside-mark)
(edebug-tests-bounce-record-outside-environment)
(edebug-tests-should-have-bounced-to): Add infrastructure to
test bounces.
(edebug-tests-check-keymap): Update tests to new key bindings.
(edebug-tests-bounce-point)
(edebug-tests-bounce-to-previous-value)
(edebug-tests-bounce-to-previous-non-position): Add tests.
(edebug-tests-evaluation-of-current-buffer-bug-19611): Clean up
side effects. (Bug#79288)
* lisp/progmodes/lua-ts-mode.el (lua-ts--comment-font-lock):
Apply 'font-lock-comment-delimiter-face' to the entire span of
initial dashes. In particular, this improves the appearance of
LuaCATS and EmmyLua style annotations which use "---".
* test/lisp/progmodes/lua-ts-mode-resources/font-lock.lua:
Add tests. (Bug#79258)
* doc/misc/calc.texi (Customizing Calc): Document the new option.
* etc/NEWS: Document the new option.
* lisp/calc/calc.el (calc-inhibit-startup-message): New option to
inhibit Calc’s startup message.
(calc): Respect the option in Calc’s startup code.
* test/lisp/calc/calc-tests.el (ert): Require ert-x for
'ert-with-message-capture'.
(calc-inhibit-startup-message): Test the new user option.
Previously, one could select a completion via M-<up>/M-<down>,
but then RET would not actually select the chosen completion.
With the addition of completion-auto-deselect, this is not
actually necessary: we can reasonably assume that when a
completion is selected, the user wants to use that, since their
last action must have been to select it. So, just choose the
selected completion on RET. This lets us default
minibuffer-completion-auto-choose to nil.
For minibuffers with require-match completion, this can be done
by changing the existing command bound to RET. For minibuffers
with nil require-match completion, RET was previously bound to
exit-minibuffer, and changing exit-minibuffer to have this logic
is risky. We handle that case by adding a new
minibuffer-completion-exit which wraps exit-minibuffer and bind
RET to it.
* lisp/minibuffer.el (minibuffer-insert-completion-if-selected)
(minibuffer-completion-exit, completion--selected-candidate):
Add.
(minibuffer-complete-and-exit): Call
minibuffer-choose-completion. (bug#77253)
(minibuffer-local-completion-map): Bind RET to
minibuffer-completion-exit, overriding exit-minibuffer.
(completion-in-region-mode-map): Bind RET to
minibuffer-choose-completion when there's a selected candidate.
(minibuffer-completion-auto-choose): Default to nil.
(minibuffer-visible-completions--filter)
(minibuffer-visible-completions-map): Delete RET binding, no
longer necessary.
* lisp/simple.el (completion-setup-function): Update completion
help text to show more correct bindings.
* test/lisp/minibuffer-tests.el (completions-header-format-test)
(minibuffer-next-completion): Set
minibuffer-completion-auto-choose=t explicitly.
(with-minibuffer-setup, minibuffer-completion-RET-prefix)
(completion-in-region-next-completion): Add new tests.
* etc/NEWS: Announce.
Only allow string mutation that is certain not to require string data to
be resized and reallocated: writing bytes into a unibyte string, and
changing ASCII to ASCII in a multibyte string.
This ensures that mutation will never transform a unibyte string to
multibyte, that the size of a string in bytes never changes, and that
the byte offsets of characters remain the same. Most importantly, it
removes a long-standing obstacle to reform of string representation and
allow for future performance improvements.
* src/data.c (Faset): Disallow resizing string mutation.
* src/fns.c (clear_string_char_byte_cache):
* src/alloc.c (resize_string_data): Remove.
* test/src/data-tests.el (data-aset-string): New test.
* test/lisp/subr-tests.el (subr--subst-char-in-string):
Skip error cases.
* test/src/alloc-tests.el (aset-nbytes-change):
Remove test that is no longer relevant.
* doc/lispref/strings.texi (Modifying Strings):
* doc/lispref/sequences.texi (Array Functions):
* doc/lispref/text.texi (Substitution): Update manual.
* etc/NEWS: Announce.