* lisp/electric.el (electric-indent-actions)
(electric-indent-function): New user options.
(electric-indent-should-reindent-p, electric-indent--yank-advice)
(electric-indent-save-hook): New functions.
(electric-indent-post-self-insert-function): Use them.
* lisp/electric.el (electric-indent-functions-without-reindent):
Remove obsolete entries: Haskell modes, python-mode, and
coffer-mode already disable electric reindentation on their
side, so we don't need those entries any more.
* lisp/org/org.el (org-mode): Don't rely on
`electric-indent-functions-without-reindent'.
Fix font lock in php-ts-mode when the tree-sitter grammars are
automatically installed. Also, update php-ts-mode to call the new
`mhtml-ts-mode--treesit-font-lock-settings' function.
* lisp/progmodes/php-ts-mode.el (php-ts-mode--keywords)
(php-ts-mode--operators): Generate the lists after the tree-sitter
grammars are installed.
(php-ts-mode--font-lock-settings, php-ts-mode--font-lock-settings-cached)
(php-ts-mode--custom-html-font-lock-settings)
(php-ts-mode--custom-html-font-lock-settings-cached): Evaluate the rules
after the tree-sitter grammars are installed. Also, add cache for the
rules.
(php-ts-mode): Call the new
`php-ts-mode--custom-html-font-lock-settings' function. (Bug#79363)
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.
* src/comp.c (ABI_VERSION): Bump new version
(comp_t): add 'eq'.
(helper_link_table): add 'slow_eq'.
(emit_slow_eq): New function.
(emit_EQ): Rework to reflect EQ implementation.
(declare_runtime_imported_funcs): Import 'slow_eq'.
(Fcomp__init_ctxt): Register emitter 'emit_eq' for op code Qeq.
This and the previous 2 commits increase elisp-benchmarks performance by
3.6% on my test machine. Also a (small) reduction in eln size comes with
it.
* lisp/keymap.el (read-only-keymap-filter)
(read-only-keymap-bind): New functions, removed from
browse-url.el.
* lisp/net/browse-url.el (browse-url-keymap-filter)
(browse-url-keymap-bind): Move to keymap.el. All callers
changed.
* 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/net/browse-url.el (browse-url-keymap-filter)
(browse-url-keymap-bind): New functions.
(browse-url-button-map): Bind "C-c RET" to 'browse-url-button-open'
and rebind "RET" with the filter 'browse-url-keymap-bind'.
* lisp/ansi-osc.el (ansi-osc-hyperlink-map):
* lisp/net/goto-addr.el (goto-address-highlight-keymap):
* lisp/progmodes/bug-reference.el (bug-reference-map):
Bind "RET" with the filter 'browse-url-keymap-bind'.
Fix font lock in mhtml-ts-mode when the required tree-sitter grammars
are automatically installed (bug#79363). Also, cache tree-sitter indent
rules.
* lisp/textmodes/mhtml-ts-mode.el
(mhtml-ts-mode--treesit-font-lock-settings): Evaluate the rules only
after the tree-sitter grammars are installed.
(mhtml-ts-mode--treesit-indent-rules): Cache indent rules.
(mhtml-ts-mode): Call the new
`mhtml-ts-mode--treesit-font-lock-settings' function.
* lisp/minibuffer.el (minibuffer-nonselected-setup): Use
window-buffer-change-functions in addition to
window-selection-change-functions to detect changes from one recursive
minibuffer to another within the same minibuffer-window.
(minibuffer-nonselected-check): Ensure that the target minibuffer is
current before checking/deleting the overlay (bug#79472).
(js--treesit-sexp-nodes): Set the default value to nil and make obsolete.
(js--treesit-thing-settings): Instead of using
'js--treesit-sexp-nodes', define a list of named and anonymous nodes
that don't match the 'sexp' thing (bug#79465).
* lisp/shell.el (shell-eval-command): Instead of always taking the last
element from the shell-dirtrack-query command, first try selecting the
last directory. (Bug#79441)
* doc/lispref/processes.texi (Accepting Output):
* src/process.c (Faccept_process_output): Document better the
meaning of the timeout of 'accept-process-output' a,d the fact
that it doesn't always return as soon as some output is available.
See https://lists.gnu.org/archive/html/emacs-devel/2025-08/msg00750.html
for more details.
* lisp/help-fns.el (help-fns-function-description-header): If a
function type symbol begins with a vowel, precede it with the
article "an" instead of "a". To date this only prevents
displaying "a interpreted-function", and it's susceptible to
future false positives (bug#79469).
This fixes bug#79438.
* lisp/progmodes/cc-align.el (c-lineup-class-field-cont): New
function.
* lisp/progmodes/cc-vars.el (c-offsets-alist): Change the
entry for class-field-cont from + to
c-lineup-class-field-cont.
* doc/misc/cc-mode.texi (Misc Line-Up): Add a new entry for
c-lineup-class-field-cont.
* lisp/minibuffer.el (minibuffer-nonselected): New face.
(minibuffer-nonselected-overlay): New buffer-local variable.
(minibuffer-nonselected-check, minibuffer-nonselected-setup):
New functions.
(minibuffer-nonselected-mode): New command (bug#49844).
(mhtml-ts-mode--treesit-font-lock-settings): Replace variable
'js--treesit-font-lock-settings' with the function call.
(mhtml-ts-mode--treesit-indent-rules): Replace variable
'js--treesit-indent-rules' with the function call (bug#79363).
* src/bytecode.c (exec_byte_code): Reset quitcounter to 1 after longjmp;
the exact value isn't important. This may reduce register pressure a
tiny bit or at least remove a useless stack slot.
* lisp/ffap.el (ffap-latex-mode): Starting with TeXlive 2025, the
kpsewhich utility may return blank lines before the first valid
path for `ffap'. The old behavior of `ffap-latex-mode' was to
simply return the first line of output from kpsewhich (if the
output was nonempty). The fix simply skips all \r and \n chars.
(Bug#79397)
Copyright-paperwork-exempt: yes
Fix font lock and indentation in js-ts-mode when the tree-sitter grammar
is automatically installed (Bug#79363).
* lisp/progmodes/js.el (js--treesit-indent-rules)
(js--treesit-font-lock-settings): Evaluate the rules only after the
tree-sitter grammar is installed.
(js-ts-mode): Call the new `js--treesit-indent-rules' and
`js--treesit-font-lock-settings' functions.