1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-03-07 22:41:26 -08:00
Commit graph

179644 commits

Author SHA1 Message Date
Jakub Ječmínek
d3333cb1b2 nnmbox-read-mbox: fix Xref header parsing
* lisp/gnus/nnmbox.el (nnmbox-read-mbox): Use the 'mail-fetch-field'
function instead of a broken regexp which matched Date-like headers.

(Bug#79167)
2025-09-26 16:03:11 +02:00
Eli Zaretskii
bf750adc4e Fix bug#79518 with 'windmove-mode' in "C-h m" display
* lisp/windmove.el (windmove-mode): Make sure "C-h m" mentions it.
2025-09-26 14:55:34 +03:00
Eli Zaretskii
0fe5113fa3 Fix dunnet when played on terminals which don't support UTF-8
* lisp/play/dunnet.el (dun-rooms, dun-endgame-question, dun-help)
(dun-physobj-desc, dun-endgame-questions): Don't use non-ASCII
characters.  (Bug#79520)
2025-09-26 14:24:00 +03:00
Stefan Monnier
fa8e32f757 (dabbrev-completion): Try and fix the test regressions
* 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`.
2025-09-25 15:24:53 -04:00
Elías Gabriel Pérez
06d87e44cb (electric-indent-actions): Add missing NEWS
* lisp/electric.el (electric-indent-actions): Fix docstring.
2025-09-25 13:40:27 -04:00
Sean Whitton
9a86a093bc vc-git--checkin: Ignore 'git apply --3way' exiting 1
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.
2025-09-25 18:19:38 +01:00
Eli Zaretskii
69ac58b5d2 ; Avoid byte-compiler warnings in python.el
* lisp/progmodes/python.el (treesit-node-prev-sibling)
(treesit-node-field-name-for-child): Declare.
2025-09-25 20:06:12 +03:00
Sean Whitton
b2e35d1d2c vc-git--checkin: Avoid passing --ours to git-apply
* lisp/vc/vc-git.el (vc-git--with-apply-temp): New BUFFER param.
(vc-git--checkin): Avoid passing --ours to git-apply.
2025-09-25 17:44:30 +01:00
Michael Albinus
3536f1aa33 Adapt tramp-tests.el
* test/lisp/net/tramp-tests.el
(tramp-test26-interactive-file-name-completion): Adapt test.
2025-09-25 15:02:50 +02:00
Juri Linkov
e719f62a50 * lisp/minibuffer.el (minibuffer--nonselected-check): Simplify condition. 2025-09-25 09:50:39 +03:00
Yuan Fu
202425f934
Fix infloop in python-ts-mode string fontification (bug#79457)
* lisp/progmodes/python.el (python--treesit-fontify-string):
Make sure there's no infloop.
2025-09-24 19:59:05 -07:00
Alcor
77921ce458 (dabbrev-capf): Improve last fix for bug#61274
Copyright-paperwork-exempt: yes

* lisp/dabbrev.el (dabbrev-completion): Don't call
`dabbrev--reset-global-variables` any more.
(dabbrev-capf): Call it here, unconditionally, instead.
2025-09-24 16:58:08 -04:00
Juri Linkov
cef3f8f11d * lisp/minibuffer.el (minibuffer--nonselected-check): Fix condition.
To detect the completions buffer check for the buffer-local value of
'completion-reference-buffer' in the newly selected window.
2025-09-24 20:46:14 +03:00
Daniel Mendler
d924520187 Improve minibuffer-nonselected-mode
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.
2025-09-24 20:32:05 +03:00
Juri Linkov
5e396874a9 * lisp/hl-line.el: Rename global-hl-line-modes to global-hl-line-buffers.
(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).
2025-09-24 20:14:03 +03:00
Juri Linkov
d769bae814 * lisp/wid-edit.el (buffer-predicate): Implement complete specification.
Support all conditions of 'buffer-match-p' in the Customization UI,
including recursive 'not', 'or' and 'and' (bug#79481).
2025-09-24 20:07:22 +03:00
Sean Whitton
19426ea56c VC: New cherry-pick-comment API function
* lisp/vc/vc-git.el (vc-git-cherry-pick-comment):
* lisp/vc/vc-hg.el (vc-hg-cherry-pick-comment):
* lisp/vc/vc.el (vc-default-cherry-pick-comment):
New functions (bug#79408).
2025-09-24 17:24:41 +01:00
Sean Whitton
8368fcb38c vc-git--checkin: Apply PATCH-STRING to working tree
* 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.
2025-09-24 16:07:51 +01:00
Sean Whitton
190450f4f0 vc-git--checkin: Restore dropping stash of staged changes
* 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.
2025-09-24 15:00:42 +01:00
Eli Zaretskii
db3d6f06c3 * lisp/window.el (display-buffer-alist): Fix :key-type (bug#79496). 2025-09-24 08:56:37 +03:00
Stefan Monnier
d0b81f5d80 (electric-indent-actions): Fix corner case and refine setup
* 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`.
2025-09-23 16:38:49 -04:00
Stefan Monnier
34bcac0d62 lisp/electric.el (electric-indent-actions): Fix bootstrap 2025-09-23 16:24:13 -04:00
Elías Gabriel Pérez
2a782c8d28 Add electric-indent actions to reindent (bug#79371)
* 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.
2025-09-23 16:16:54 -04:00
Stefan Monnier
578aeedbe9 (electric-indent-functions-without-reindent): Pare down
* 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'.
2025-09-23 13:48:06 -04:00
Michael Albinus
c16b0d9af3 ; Instrument file-notify-test07-many-events
* test/lisp/filenotify-tests.el (file-notify--test-monitor):
Improve instrumentation.
2025-09-23 11:23:11 +02:00
Eli Zaretskii
bea8b09568 ; * doc/lispref/symbols.texi (Shorthands): Fix markup. 2025-09-23 09:00:57 +03:00
Yuan Fu
7b8c17d527
Fix python-ts-mode font-lock breakage by grammar change (bug#79457)
* lisp/progmodes/python.el (python--treesit-fontify-string): Use
new algorithm.
2025-09-22 16:41:06 -07:00
Sean Whitton
192a0e1773 ; * lisp/vc/vc-git.el (vc-git--checkin): Fix error message. 2025-09-22 17:21:38 +01:00
Roi Martin
85c42b3a87 Fix font lock in php-ts-mode
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)
2025-09-22 18:11:39 +03:00
Stephen Berman
77ca60b48d Navigate *Completions* buffer based on 'completions-format'
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.
2025-09-22 16:04:42 +02:00
Philipp Stephani
aeadaf7748 Fix minor incorrect statement about shorthands.
* doc/lispref/symbols.texi (Shorthands): Make documentation match
reality.  See symbol_char_span in src/lread.c.
2025-09-22 14:40:32 +02:00
Philipp Stephani
dac0040f8d ; * doc/lispref/symbols.texi (Shorthands): Add missing parenthesis. 2025-09-22 14:28:08 +02:00
Andrea Corallo
ec4066d532 Revert "* Clean-up some compilation warnings in vc-hooks.el"
This reverts commit dd622e06e7 as
functions are autoloaded.
2025-09-22 10:28:40 +02:00
Andrea Corallo
0b9e96ce5e Make native lisp code reflect EQ C implementation
* 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.
2025-09-22 10:28:40 +02:00
Andrea Corallo
e7380934d0 * Make sure the compiler optimizes for symbols_with_pos_enabled 0 in EQ
* src/lisp.h (EQ): Make use '__builtin_expect'.
2025-09-22 10:28:40 +02:00
Pip Cet
020e2f5ddb Change EQ to move slow code path into a separate function
* src/data.c (slow_eq): New function.
    * src/lisp.h (EQ): Call it.
2025-09-22 10:28:40 +02:00
Juri Linkov
e58efac78e * lisp/keymap.el (read-only-keymap-bind): The remaining fix.
Replace 'browse-url-keymap-filter' with 'read-only-keymap-filter'.
2025-09-22 09:20:27 +03:00
Po Lu
36635b934e Fix bootstrap and prevent browse-url from preloading numerous files
* 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.
2025-09-22 09:42:34 +08:00
Sean Whitton
8310795bab VC checkin-patch: Support extracting commit metadata from patches
* 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.
2025-09-21 21:59:02 +01:00
Sean Whitton
0109b4a758 * lisp/vc/vc-git.el (vc-git--checkin): Validate parameters. 2025-09-21 21:44:28 +01:00
Juri Linkov
8a501c47a4 Support 'RET' for visiting URLs in read-only buffers (bug#74792)
* 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'.
2025-09-21 20:52:02 +03:00
Roi Martin
203faa6e42 Suffix tree-sitter cache variables with "-cached"
* lisp/progmodes/cmake-ts-mode.el (cmake-ts-mode--indent-rules)
(cmake-ts-mode--indent-rules-cached, cmake-ts-mode--font-lock-settings)
(cmake-ts-mode--font-lock-settings-cached):
* lisp/progmodes/go-ts-mode.el (go-ts-mode--font-lock-settings)
(go-ts-mode--font-lock-settings-cached):
* lisp/progmodes/js.el (js--treesit-indent-rules)
(js--treesit-indent-rules-cached, js--treesit-font-lock-settings)
(js--treesit-font-lock-settings-cached): Suffix tree-sitter cache
variables with "-cached" (bug#79363).
2025-09-21 19:49:20 +03:00
Roi Martin
2ae54a8b17 Fix font lock and cache indent rules in mhtml-ts-mode
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.
2025-09-21 19:49:18 +03:00
Steven Allen
ae32e25419 Fix minibuffer-nonselected-mode when using recursive minibuffers
* 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).
2025-09-21 19:34:33 +03:00
Eli Zaretskii
33e6176932 ; * lisp/international/textsec-check.el (textsec-suspicious-p): Doc fix. 2025-09-21 13:03:16 +03:00
Juri Linkov
49d8302b40 * lisp/progmodes/js.el: Obsolete 'js--treesit-sexp-nodes'.
(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).
2025-09-20 21:20:04 +03:00
Eli Zaretskii
2ba301b30e ; * etc/NEWS: Merge two "Register" sections. Fix wording. 2025-09-20 19:37:48 +03:00
Masatake YAMATO
a760f1fe6e (register-preview-info): sort registers in preview buffer
* lisp/register.el (register-preview): Sort alist returned
from `register-of-type-alist'.  (Bug#79474)
2025-09-20 19:35:07 +03:00
Eli Zaretskii
7f6b68cd7c ; * doc/emacs/programs.texi (Hideshow): Fix last change. 2025-09-20 13:38:00 +03:00
Eli Zaretskii
5a56c0fb43 ; * lisp/ldefs-boot.el: Update. 2025-09-20 06:35:11 -04:00