Commit graph

181019 commits

Author SHA1 Message Date
João Távora
d0daaead22 Eglot: recall diagnostics froms unopened files on session start
This is exclusively for the benefit of rust-analyzer, which
sends publishDiagnostics for all project files upfront, and
never republishes them on 'didOpen'.

See https://github.com/joaotavora/eglot/issues/1531.

* lisp/progmodes/eglot.el (eglot--flymake-handle-push): Simplify.
Don't flymake-list-only-diagnostics here.
Save original diagnostic in flymake-list-only-diagnostics setting.
(eglot--on-shutdown): Cleanup flymake-list-only-diagnostics.
(eglot--flymake-report-push+pulled): Hack in data from
flymake-list-only-diagnostics.
2026-01-30 12:55:32 +00:00
Sean Whitton
705c0e3729 Bind 's' to diff-split-hunk in read-only diff-mode
* lisp/vc/diff-mode.el (diff-mode-shared-map): Bind 's' to
'diff-split-hunk'.
* etc/NEWS: Document the change.
2026-01-30 11:21:27 +00:00
Juri Linkov
077b33ef7d * lisp/progmodes/eglot.el (eglot-server-programs): Use "elp" for erlang-mode.
erlang_ls has been archived in favour of erlang-language-platform.
Suggested by Alan & Kim Zimmerman <alan.zimm@gmail.com> (bug#79943).
2026-01-30 09:53:30 +02:00
Juri Linkov
1ff0c58fee New function 'checkdoc-batch' (bug#80199)
* lisp/emacs-lisp/checkdoc.el (checkdoc--batch-flag): New variable.
(checkdoc-rogue-spaces, checkdoc-message-text): Use it along the
check for interactive calls to be able to collect errors in the
diagnostic buffer.
(checkdoc-show-diagnostics): Don't show the diagnostic buffer
when 'checkdoc--batch-flag' is non-nil.
(checkdoc-batch): New function to check the buffer and print the
content of the diagnostic buffer.
2026-01-30 09:41:42 +02:00
Juri Linkov
3584a762b8 New key 'M-j' for 'icomplete-mode' (bug#62108)
* lisp/icomplete.el (icomplete-exit): New alias for 'icomplete-fido-exit'.
(icomplete-minibuffer-map): Bind it to "M-j" .

* lisp/replace.el (multi-occur--prompt): Show "M-j" bound to 'icomplete-exit'
in 'icomplete-mode'.
2026-01-30 09:27:12 +02:00
Spencer Baugh
31944efb82 eager-display *Completions* again after completion failure
If the completion table requests eager-update (so *Completions*
should be updated as the user types, when already displayed)
then *Completions* will be dismissed automatically if the user
types something which isn't a completion.  Previously,
*Completions* wouldn't be redisplayed until the user requests it
again.  Now, if the completion table also enables eager-display
in addition to eager-update, then automatically redisplay
*Completions* after it disappears.

* lisp/minibuffer.el (completions--start-eager-display): Add
REQUIRE-EAGER-UPDATE argument and don't run if Completions is
already displayed.
(completions--after-change): Call
'completions--start-eager-display'.
(minibuffer-completion-help): Add the 'completions--after-change'
hook earlier, and let it remove itself (bug#80055).
2026-01-30 09:18:56 +02:00
Eli Zaretskii
eca025334e ; Fix last change
* etc/NEWS:
* doc/lispref/windows.texi (Choosing Window Options):
* doc/emacs/windows.texi (Window Choice): Improve documentation of
'split-window-preferred-direction'.
2026-01-29 22:13:02 +02:00
Sean Whitton
b9bfe461b2 ; Fix minibuffer-message NEWS entry. 2026-01-29 17:08:55 +00:00
Sean Whitton
88d787d97c ; * lisp/ldefs-boot.el: Regenerate. 2026-01-29 17:03:58 +00:00
Sean Whitton
12e53dfafe New C-x v T l and C-x v T L commands
* lisp/vc/vc.el (vc-log-outgoing-base)
(vc-root-log-outgoing-base): New commands.
* lisp/vc/vc-dir.el (vc-dir-mode-map):
* lisp/vc/vc-hooks.el (vc-prefix-map): Bind them.
* doc/emacs/vc1-xtra.texi (Outstanding Changes):
* etc/NEWS: Document them.
2026-01-29 17:01:32 +00:00
Sean Whitton
60b9435ad7 ; Fix/improve two comments. 2026-01-29 17:00:46 +00:00
Spencer Baugh
0ab5db015f (minibuffer-message): Do not block while displaying message.
* lisp/minibuffer.el (minibuffer--message-overlay)
(minibuffer--message-timer): New variables.
(minibuffer--delete-message-overlay): New function.
(minibuffer-message): Use a timer and 'pre-command-hook' to
clear message overlay instead of blocking with
'sit-for'. (bug#79510)
* etc/NEWS: Document the change.
2026-01-29 16:56:38 +00:00
Dmitry Gutov
3937833fff xref-find-backend: Error instead of returning nil
* lisp/progmodes/xref.el (xref-find-backend):
Signal error when we can't find a backend to use (bug#80246).
2026-01-29 17:11:45 +02:00
Sean Whitton
38d0ac8f67 ; * lisp/window.el (window--frame-landscape-p): Improve docstring. 2026-01-29 14:38:07 +00:00
Spencer Baugh
4dc7d6056f Use frame-pixel-width/height to determine if frame is landscape
* lisp/window.el (window--frame-landscape-p): New function.
(split-window-sensibly): Call it (bug#80053).
2026-01-29 14:38:07 +00:00
Mattias Engdegård
495f6b412d tutorial.el: don't mutate quoted list
* lisp/tutorial.el (tutorial--default-keys):
Don't sort quoted list in-place.  Sort at compile time, not load time.
Uniform key representation (vectors) so that the default comparison can
be used.  Eliminate unnecessary backquote.
(tutorial--sort-keys): Remove.
2026-01-29 13:53:53 +01:00
Mattias Engdegård
c07ffa2188 * lisp/tutorial.el (tutorial--describe-nonstandard-key): add space 2026-01-29 13:53:53 +01:00
Eli Zaretskii
792097d747 Avoid interference between child frame deletion and recentering
* src/frame.c (delete_frame) [HAVE_X_WINDOWS]: Block input while
child frame is displayed, and process the X events triggered by
that later.  Patch by Byakuren (https://web.liminal.cafe/~byakuren/).
(Bug#76186)

Copyright-paperwork-exempt: yes
2026-01-29 13:38:22 +02:00
Eli Zaretskii
80551807d4 ; Fix package-vc-tests for older versions of Git
* test/lisp/emacs-lisp/package-vc-tests.el
(package-vc-tests-create-repository): Fix commands for older
versions of Git.
2026-01-29 10:29:40 +02:00
Po Lu
1bbc7d955a ; Update Android dependencies again 2026-01-29 11:25:57 +08:00
Po Lu
f949d5ab62 ; Update Android dependencies 2026-01-29 11:20:48 +08:00
Dmitry Gutov
dfc2a66ad8 xref-matches-in-directory and xref-matches-in-files: More consistency
* lisp/progmodes/xref.el (xref--parse-hits, xref--sort-hits):
Extract from xref-matches-in-directory and xref-matches-in-files.
Use in both for better consistency between these functions.
2026-01-28 23:48:04 +02:00
Dmitry Gutov
d44b855b0c xref-matches-in-directory: Don't error on "Binary file ... matches"
* lisp/progmodes/xref.el (xref-matches-in-directory):
Consider the "Binary file ... matches" message (bug#80246).
2026-01-28 22:10:34 +02:00
Stefan Monnier
fbe4d649c3 (loaddefs-generate--make-autoload): Try harder to find autoload-macro
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--make-autoload):
Try and (auto)load the macro in case that defines `autoload-macro`.
Simplify the code for the `loaddefs--defining-macros` case.
2026-01-28 13:43:36 -05:00
Przemysław Kryger
b370a076b9 Create package-vc-tests repositories once per tests run (bug#80235)
* test/lisp/emacs-lisp/package-vc-tests.el
(package-vc-tests-repos): New variable.
(package-vc-tests-create-repository): Add argument `repos-dir'.
(package-vc-tests-make-temp-dir): Create a temporary directory
with prefix.
(package-vc-with-tests-environment): Use
`package-vc-tests-make-temp-dir' to create a temporary directory
for package test.  Use `package-vc-tests-repos' to cache test
package repository.
(package-vc-tests-preserve-pkg-artifacts-p): Detect when to
preserve package temporary files.
(package-vc-tests-environment-tear-down): Use
`package-vc-tests-preserve-pkg-artifacts-p'.  Use plural there
are more than one buffer.  Report temporary directory with test
repository.
(package-vc-tests-add-ert-run-tests-listener): Wrap listener in
args with custom functionality for `package-vc-tests'.  On tests
run start reset `package-vc-tests-repos' cache.  On tests run
end delete temporary directories.
2026-01-28 18:44:06 +01:00
Sean Whitton
43d6907ad9 Move outstanding changes commands from 'o' to 'T'
The main reason for this is that then these commands can have
the same bindings in VC-Dir buffers that they have under
vc-prefix-map.  'T' is a good mnemonic for "Topic" and a
serviceable mnemonic for "outsTanding".

* lisp/vc/vc-hooks.el (vc-prefix-map): Move 'o' to 'T'.
* lisp/vc/vc-dir.el (vc-dir-mode-map): New 'T' bindings.
2026-01-28 16:13:47 +00:00
Eli Zaretskii
08b7739cf1 ; Fix MS-Windows build broken by recent treesit.c changes
* src/treesit.c (ts_tree_cursor_copy) [WINDOWSNT]: Remove, as it
is no longer used.
(ts_tree_cursor_goto_previous_sibling) [WINDOWSNT]: Add.  (Bug#80108)
2026-01-28 14:09:12 +02:00
Michael Albinus
aaa505025f Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2026-01-28 12:44:30 +01:00
Michael Albinus
8c84a2ae71 New Tramp test
* test/lisp/net/tramp-tests.el (tramp-test45-force-remote-file-error):
New test.
2026-01-28 12:43:38 +01:00
Basil L. Contovounesios
f9080e9bc0 Always unset lisp_data when freeing images
Historically only the GIF code did this (since it stores animation
metadata in lisp_data), and recently the WebP code followed suit.
The benefit of clearing lisp_data is not 100% clear (to me:
bug#66221#41), but it probably can't hurt, so do it unconditionally
for all image types to simplify conditional compilation and avoid
warnings (bug#80266).

* src/image.c (image_clear_image): Set lisp_data to nil.
[HAVE_GIF || HAVE_WEBP] (gif_clear_image):
[HAVE_IMAGEMAGICK] (imagemagick_clear_image): Remove, replacing all
uses with image_clear_image.
2026-01-28 10:29:46 +01:00
Basil L. Contovounesios
89dad01763 ; Fix last change to test/src/process-tests.el. 2026-01-28 10:29:46 +01:00
Yuan Fu
69dc5d3f0e
Fix tree-sitter traversal slowness (bug#80108)
* configure.ac (LIBSYSTEMD_CFLAGS): Increase minimal required
tree-sitter version to 0.20.10.
* src/treesit.c (treesit_traverse_sibling_helper): When
traversing forward, use the new function
ts_tree_cursor_goto_previous_sibling.
2026-01-28 01:08:52 -08:00
Daniel Mendler
32cffe1707 Customizable xref-references-in-directory backend
Optionally use find and grep directly instead of going through the
Semantic framework (bug#80246).

* lisp/progmodes/project.el (project--vc-ignores): Require 'vc' to
ensure that vc-default-ignore-completion-table is available.

* lisp/progmodes/xref.el (xref-references-in-directory-function):
New user option.
(xref-references-in-directory): Call it.
(xref-references-in-directory-grep): Implementation based on find/grep.
(xref-references-in-directory-semantic): Implementation using Semantic.
(xref-matches-in-directory): Add new argument DELIMITED.

Co-authored-by: Dmitry Gutov <dmitry@gutov.dev>
2026-01-28 04:38:58 +02:00
Michael Albinus
d09cedc9bf ; Instrument filenotify test
* test/lisp/filenotify-tests.el (file-notify-test08-backup):
Instrument test.
2026-01-27 18:49:37 +01:00
Michael Albinus
50bb4ae1eb ; * test/src/process-tests.el: Instrument for bug#80166. 2026-01-27 18:39:47 +01:00
Michael Albinus
7fa90d50c6 Organize tramp-adb-handle-make-process a little bit better
* lisp/net/tramp-adb.el (tramp-adb-handle-make-process):
Call `tramp-taint-remote-process-buffer' where it belongs to.
2026-01-27 18:25:05 +01:00
Stefan Monnier
6e2a4b8111 (pcase--subtype-bitsets): Make it a bit more precise
`null`, `booleanp`, and `symbolp` were treated as equivalent in
`pcase--subtype-bitsets`, which was not incorrect to the extent
that we currently use this table only to detect
mutual-exclusion, but made it incorrect to use that same table
to test things like inclusion.

* lisp/emacs-lisp/cl-preloaded.el (built-in-class): New slot
`non-abstract-supertype`.
(cl--define-built-in-type): Add corresponding keyword argument.
(symbol, boolean): Use it.

* lisp/emacs-lisp/pcase.el (pcase--subtype-bitsets): Use it.

* lisp/emacs-lisp/cl-macs.el (cl--transform-lambda): Require `help`
before calling `help--docstring-quote`.  Fixes a corner case bootstrap
problem found along the way.
2026-01-27 11:17:37 -05:00
Przemysław Kryger
4fae092e2d Ensure skipped package-vc-tests are not installed (bug#80235)
* test/lisp/emacs-lisp/package-vc-tests.el
(package-vc-tests-packages): Add argument `full'.  When `full'
is non-nil, then return full entries.
(package-vc-test-deftest): Use `pkg-arg' for the name of
argument `in-body'.  Call `skip-when' and `skip-unless' before
`packgage-vc-tests-with-installed'.
2026-01-27 15:32:28 +01:00
Mattias Engdegård
19cd6972fa ; * lisp/files.el (file-name-version-regexp): typo in doc string 2026-01-27 15:30:21 +01:00
Stéphane Marks
99abaa70bf Document frame id related commands and tweak a return value (Bug#80192)
* doc/lispref/frames.texi (Input Focus): Document the commands
'select-frame-by-id' and 'undelete-frame-by-id'.
* lisp/frame.el (select-frame-by-id): Clarify return value and
add missing optional argument 'noerror' in sympathy with
'undelete-frame-by-id'.
2026-01-27 10:23:34 +01:00
Po Lu
53305372d0 ; Avoid warnings when neither GIF nor WebP are supported
* src/image.c (gif_clear_image): Render contingent on HAVE_GIF
|| HAVE_WEBP.
2026-01-27 11:01:35 +08:00
João Távora
b224605d30 Jsonrpc: avoid redisplay_internal calls from jsonrpc-request
The 'jsonrpc-request' function, when called with non-nil CANCEL-ON-INPUT,
relies on 'sit-for' to stop immediately when the user inputs something into
Emacs.  Although this behavior is working well, it has the hitherto
undiscovered side effect of invoking 'redisplay_internal', which triggers
expensive operations such as fontification.

This bug was noticied when using the 'breadcrumb' package in conjunction
with Eglot and a narrowed buffer.  To provide breadcrumbs for the current
context, breadcrumb.el invokes 'imenu--make-index-alist' on a timer.  That
function temporarily widens the buffer and then eventually calls
'redisplay_internal' (through 'eglot-imenu', 'jsonrpc-request', and
'sit-for').  This has the effect that the temporarily widened buffer is
re-rendered and displayed to the user until the LSP server answers the
request and 'imenu--make-index-alist' restores the restriction, an effect
that lasts between 0.5 and 2 seconds usually and is annoying and confusing.

To fix this, using a non-nil NODISP argument in the 'sit-for' is not enough
(though it's arguable it should be and maybe that's a separate bug).
Binding 'inhibit-redisplay' to 't' around 'sit-for' seems to fix the issue
robustly.

* lisp/jsonrpc.el (jsonrpc-request): Bind inhibit-redisplay to t and pass
  NODISP to sit-for.
2026-01-26 22:57:09 +00:00
Eli Zaretskii
3dbddb4497 Fix image.c compilation when HAVE_GIF is not defined
* src/image.c (gif_clear_image): Make it available for other image
types.  (Bug#80266)
2026-01-26 18:33:59 +02:00
Stefan Monnier
120a451c04 (read_char_minibuf_menu_prompt): Fix bug#80146
* src/keyboard.c (read_char_minibuf_menu_prompt): Give priority
to a binding in the map over the `menu_prompt_more_char` "binding".
(follow_key): Move before new first use.
2026-01-26 10:14:03 -05:00
Eli Zaretskii
9983b18935 Fix point-adjustment when overlays are specific to windows
* src/keyboard.c (adjust_point_for_property): Consider only
overlays associated with the selected window.  (Bug#80255)
2026-01-26 16:49:01 +02:00
Bastien Guerry
d5a0dc0bad Update TUTORIAL.translators
* etc/tutorials/TUTORIAL.translators (Maintainer): Add myself
as TUTORIAL.fr co-maintainer.
2026-01-26 14:45:48 +01:00
Eli Zaretskii
821928808c ; Improve last change
* lisp/cus-start.el (line-spacing): Add :tag's.  (Bug#76390)
2026-01-26 14:29:47 +02:00
Daniel Mendler
446177ce25 ; Update defcustom type of 'line-spacing'
* lisp/cus-start.el: Update type of `line-spacing'.  (Bug#76390)
2026-01-26 14:24:10 +02:00
Mattias Engdegård
fd9d685c63 Neater pcase predicate transform
Suggested by Stefan Monnier.

* lisp/emacs-lisp/pcase.el (pcase--macroexpand): Simplify.
* test/lisp/emacs-lisp/pcase-tests.el (pcase-pred-equiv): New test.
2026-01-26 12:22:44 +01:00
Daniel Mendler
0fcf100301
Use a custom buffer name for package review diffs
* lisp/emacs-lisp/package.el (package-review): Specify a buffer
using 'diff-no-select' instead of falling back to the default
"*Diff*".

(Bug#80249)
2026-01-25 12:32:24 +01:00