* lisp/dabbrev.el (dabbrev-completion): Revert this part of last
change, but additionally set `dabbrev--last-abbrev-location` so we know
what the vars were reset for.
(dabbrev-capf): Be more careful about when and how to reset the vars.
(dabbrev--abbrev-at-point): Don't set `dabbrev--last-abbrev-location`,
so it doesn't mess with the marker we set it to in
`dabbrev-capf` or `dabbrev-completion`.
This is expected to happen in some cases.
* lisp/vc/vc-git.el (vc-git--with-apply-temp): New OKSTATUS
parameter.
(vc-git--checkin): Use it to ignore 'git apply --3way' exiting
1.
Use private names. Use hashed function symbols. Do not restrict the
overlay to the miniwindow, since the minibuffer can be displayed by
other windows, for example by packages using child frames or by
vertico-buffer-mode (bug#79490).
* lisp/minibuffer.el (minibuffer-nonselected-setup): Rename to
minibuffer--nonselected-setup. Use hashed function symbols.
Add docstring.
(minibuffer-nonselected-check): Rename to
minibuffer--nonselected-check. Use hashed function symbols.
Do not restrict overlay to miniwindow.
(minibuffer-nonselected-overlay): Rename to
minibuffer--nonselected-overlay.
(minibuffer-nonselected-mode): Use hashed function symbol for
custom-initialize-delay.
(global-hl-line-buffers): Rename from recently added 'global-hl-line-modes',
use :type 'buffer-predicate' and change the default value to a condition
to not match completion-list-mode.
(global-hl-line-highlight): Use 'buffer-match-p' instead of
'easy-mmode--globalized-predicate-p' (bug#79481).
* 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.
* lisp/vc/vc-git.el (vc-git--checkin): Restore dropping stash of
staged changes after applying it. This was accidentally lost
when factoring out vc-git--with-apply-temp-to-staging.
* lisp/electric.el (electric-indent--activate-indent-actions):
Rename from `electric-indent-toggle-indent-actions`. Adjust callers.
Make its result less dependent on the input state. Support `yank` and
`before-save` at the same time.
(electric-indent-actions): Use it instead if `electric-indent-mode`.
* 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).