1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-21 20:13:29 -08:00
Commit graph

180803 commits

Author SHA1 Message Date
Sean Whitton
fb09c11482 ; whitespace-global-modes: Replace "automagically". 2026-01-12 10:38:29 +00:00
Sean Whitton
c270402f71 save-place-alist-to-file: Use prin1, not pp (bug#80183)
* lisp/saveplace.el (save-place-alist-to-file): Use 'prin1', not
'pp' (bug#80183).  Suggested by Daniel Mendler
<mail@daniel-mendler.de>.
2026-01-12 09:59:40 +00:00
Stefan Monnier
9dcf0bc428 Fix recent test suite regression (bug#80177)
* lisp/emacs-lisp/cl-generic.el (cl--generic-make-function):
Preserve advertised-calling-convention info.

* test/lisp/emacs-lisp/pcase-tests.el (pcase-tests-quote-optimization):
Require `byte-opt` to fix the test when the compiler is not loaded yet.

* lisp/progmodes/elisp-mode.el: Fix some >80column problems.
(elisp--xref-format-extra)
(elisp--xref-format): Make them constant, now that we don't have
the purespace.  Also, use %S since some of the elements
don't necessarily have names and even if they do, we'd want to
escape any funny characters in them to avoid ambiguities.
(elisp--xref-find-definitions): Fix uses of
`elisp--xref-format-extra` accordingly.
Improve heuristic to distinguish proper `cl-defgeneric` from
implicit ones.
(elisp-eldoc-docstring-length-limit)
(elisp-eldoc-funcall-with-docstring-length): Remove redundant `:group`.
* lisp/cedet/mode-local.el (xref-mode-local-overload): Pass the
override symbol rather than its name through `elisp--xref-format-extra`.
* test/lisp/progmodes/elisp-mode-tests.el (find-defs-constructor):
Adjust test to new text.
2026-01-11 18:26:53 -05:00
Juri Linkov
762902c2c6 Adapt tab-bar/tab-line faces to dark background mode (bug#80135)
* lisp/faces.el (tab-bar, tab-line): Adapt to dark background.
Suggested by Philip Kaludercic <philipk@posteo.net>.

* lisp/tab-bar.el (tab-bar-tab, tab-bar-tab-inactive, tab-bar-tab-highlight):
* lisp/tab-line.el (tab-line-tab, tab-line-tab-inactive)
(tab-line-tab-current, tab-line-highlight): Adapt faces to dark background.
2026-01-11 20:58:28 +02:00
João Távora
990ef36510 Eglot: support textDocument/prepareRename for more accurate eglot-rename
See https://github.com/joaotavora/eglot/issues/1554.

* lisp/progmodes/eglot.el (eglot--rename-interactive): New helper.
(eglot-rename): Use it.
2026-01-11 18:28:25 +00:00
Eli Zaretskii
588d95e91d Fix Emacs responsiveness when debugging many thread-exit events
* lisp/progmodes/gdb-mi.el (gdb-start-wait-for-pending): New
function.
(gdb-thread-exited): Call 'gdb-start-wait-for-pending' to make
sure the timer which waits for pending GDB commands is launched
just once, even if many =thread-exited notifications are received
at a high rate.  Suggested by Neil Roberts <bpeeluk@yahoo.co.uk>.
(Bug#80157)
2026-01-11 17:19:49 +02:00
F. Jason Park
f740d033ae ; Don't use cl-letf with generic function in ERC test
* test/lisp/erc/erc-tests.el (erc--update-channel-modes): Use advice
instead.  See 058bac45 "cl-generic.el: Avoid an O(N^2)
behavior".  (Bug#80175)
* test/lisp/erc/resources/erc-d/erc-d-tests.el
(erc-d-tests--start-server): Increase timeout to hopefully address
anomalous EMBA failure.  Unrelated to cited bug.
2026-01-11 05:25:03 -08:00
F. Jason Park
c84aea1c1b Use seq-doseq for iterating over strings in ERC
* lisp/erc/erc-common.el (erc--doarray): Remove unused function.
* lisp/erc/erc.el (erc--channel-mode-types, erc--process-channel-modes)
(erc--parse-user-modes): Replace `erc--doarray' with `seq-doseq'.
* test/lisp/erc/erc-tests.el (erc--doarray): Remove test.
2026-01-11 05:25:03 -08:00
João Távora
12730179ac Eglot: release version 1.21
* lisp/progmodes/eglot.el (Version): Bump to 1.21.

* etc/EGLOT-NEWS: Announce new version.
2026-01-11 13:15:27 +00:00
João Távora
d33ef0c5ca Eglot: properly announce semantic tokens support to servers
* lisp/progmodes/eglot.el (eglot-client-capabilities): Property
annouce semantic tokens.
2026-01-11 13:15:27 +00:00
João Távora
67dd97a4f7 Eglot: solve misc Elisp compatibility problems on Emacs 26.3
* lisp/progmodes/eglot.el (eglot--semtok-request)
(eglot--semtok-after-send-changes): Unbreak for 26.3.

* test/lisp/progmodes/eglot-tests.el (eglot--tests-connect): Use
  split-string.
  (eglot-test-rust-completion-exit-function): Use skip-unless.
2026-01-11 13:15:27 +00:00
João Távora
a59fafde75 Eglot: don't use text-property-search-forward unavailable on 26.3
* lisp/progmodes/eglot.el (eglot--format-markup)
(eglot--semtok-font-lock-2): Rewrite.

* test/lisp/progmodes/eglot-tests.el (eglot--semtok-wait): Rewrite.
2026-01-11 13:15:27 +00:00
Phil Sainty
4484a9f875 Avoid byte-compiled code in `ibuffer-maybe-show-predicates' value (bug#80117)
* lisp/ibuffer.el (ibuffer-hidden-buffer-p): New function.
(ibuffer-maybe-show-predicates): Use it.
(ibuffer-fontification-alist): Use it (for consistency).

This prevents byte-compiled code appearing in the *Help* buffer
and in the customize UI for `ibuffer-maybe-show-predicates'.
2026-01-11 22:31:49 +13:00
Martin Rudalics
38092d879b Fix crash where dead frame remains on list of live frames (Bug#80120)
* src/fns.c (delq_no_quit): New function.
* src/lisp.h: Extern delq_no_quit.
* src/frame.c (delete_frame): Call delq_no_quit to remove frame
from Vframe_list uninterruptedly (Bug#80120).
2026-01-11 10:22:54 +01:00
Michael Albinus
1bc8e61df4 Don't use "make -j" when running tests
* test/infra/gitlab-ci.yml (.job-template):
* test/README: Don't use "make -j".
2026-01-11 10:21:12 +01:00
Stefan Monnier
0e4a8ae1fa lisp/subr.el (insert-for-yank-1): Use with-silent-modifications 2026-01-10 23:51:46 -05:00
João Távora
25a6f28ad5 Eglot: release version 1.20
* lisp/progmodes/eglot.el (Version): Bump to 1.20.

* etc/EGLOT-NEWS: Announce new version.
2026-01-11 03:42:01 +00:00
João Távora
4e6a81da6c Eglot: add new command 'eglot-momentary-inlay-hints'
* doc/misc/eglot.texi (Eglot Commands)
(Customization Variables): Advertise eglot-momentary-inlay-hints.

* etc/EGLOT-NEWS: Advertise new command.

* lisp/progmodes/eglot.el (eglot--momentary-hints-data): New variable.
(eglot-momentary-inlay-hints): New command.
2026-01-11 03:42:01 +00:00
João Távora
fde1a5ebeb Eglot: de-spam eglot-mode-line-progress
Too spammy when many progress reporters are created by servers
such as rust-analyzer.

* lisp/progmodes/eglot.el (eglot-mode-line-progress): Tweak.
2026-01-11 03:42:01 +00:00
João Távora
68de337f26 Eglot: improve diagnostics tests
* test/lisp/progmodes/eglot-tests.el
(eglot-test-basic-diagnostics): Robustify.
(eglot-test-basic-pull-diagnostics)
(eglot-test-basic-stream-diagnostics): New tests.
2026-01-11 03:42:01 +00:00
João Távora
189e39c52a Eglot: improve automated test machinery
* test/lisp/progmodes/eglot-tests.el
(eglot--wait-for): Fix thinkos and improve.
(eglot--tests-connect): Take TIMEOUT and SERVER kwargs.
(eglot-test-eclipse-connect)
(eglot-test-slow-sync-connection-wait)
(eglot-test-slow-sync-connection-intime): Update
eglot--tests-connect call.
2026-01-11 03:42:01 +00:00
João Távora
fefd6526e2 Eglot: enhance eglot-list-connections-mode
* lisp/progmodes/eglot.el (eglot-list-connections-mode)
(eglot-list-connections): Tweak.
2026-01-11 03:42:01 +00:00
João Távora
7e13073c3c Eglot: don't notify server of in-disk changes for managed files
Not only is this notification strictly redundant for files
managed by Eglot (since didSave, didClose and didChange are
scrupulously sent), but it also confuses some serers which end
up posting a bunch of useless textDocument/publishDiagnostics,
for example.
2026-01-11 03:42:01 +00:00
João Távora
236647ab58 Eglot: spectacular optimization in files with many diagnostics
In a large (or simply long) file with many diagnostics, calling
eglot-range-region repeteadly constantly throws Emacs for a spin
around the buffer, since each diagnostics comes annotated with a
(line/col): LSP range spec that is reasonably expensive to
translate into Elisp point positions.

A much faster approach for such large lists is to first sort all the
objects containing ranges by their start lines and then do a
single pass of the buffer, moving lines by delta.

By much faster, I do mean spectacularly (100x) faster. A long python
with 7000 "ruff" diagnostics, before the change, typical editor
operations (add/delete words) are impossible.

       14053  84%    - jsonrpc-connection-receive
       14052  84%     - #<byte-code-function B94>
       14052  84%      - apply
       14052  84%       - eglot-handle-notification
       14052  84%        - applyn
       14052  84%         - #<byte-code-function 6DB>
       14052  84%          - eglot--flymake-handle-push
       12295  74%           - eglot--flymake-make-diag
       12218  73%            + eglot-range-region
          50   0%            + eglot--check-object
          12   0%              plist-member
           3   0%              flymake-make-diagnostic

After the change:

          99   1%    - jsonrpc-connection-receive
          99   1%     - #<byte-code-function 0EE>
          99   1%      - apply
          99   1%       - eglot-handle-notification
          99   1%        - apply
          99   1%         - #<byte-code-function E84>
          99   1%          - eglot--flymake-handle-push
          99   1%           - eglot--call-with-ranged
          99   1%            - #<byte-code-function 2C6>
          99   1%             - eglot-move-to-utf-16-linepos
          99   1%                line-end-position

* lisp/progmodes/eglot.el (eglot-move-to-linepos-function):
Forward declare.
(eglot--call-with-ranged, eglot--collecting-ranged): New helpers.
(eglot--flymake-report-1)
(eglot--imenu-SymbolInformation): Use eglot--collecting-ranged.
(eglot--imenu-DocumentSymbol): Could use eglot--collecting-ranged.

* etc/EGLOT-NEWS: Mention it
2026-01-11 03:42:01 +00:00
João Távora
fa5a656292 Eglot: add support for experimental $/streamingDiagnosticsProvider
* lisp/progmodes/eglot.el
(eglot-client-capabilities): Advertise $streamingDiagnostics
(eglot--streamed-diagnostics): New variable.
(eglot-handle-notification<$/streamDiagnostics>): New method.
(eglot--flymake-make-diag): Tweak docstring.
(eglot-flymake-backend): Rework.
(eglot--flymake-reset): Set eglot--streamed-diagnostics.
2026-01-11 03:42:01 +00:00
João Távora
89633fef71 Eglot: rework Flymake integration ahead of more changes
LSP Diagnostics are converted to Flymake diagnostics just-in-time.
Introduce helpers that allow precise control over the type of the
reports (clearing or incremental) and the inhibition of reports.

* lisp/progmodes/eglot.el
(eglot--pulled-diagnostics)
(eglot--pushed-diagnostics): Rework docstring.
(eglot--flymake-sniff-diagnostics): Rename from
eglot--flymake-diagnostics.
(eglot--diagnostics-map, cl-loop, eglot-warning)
(eglot-note, eglot-error): Move to Flymake section.
(eglot--find-buffer-visiting): New helper..
(eglot--flymake-handle-push): New helper.
(eglot--flymake-report-1, eglot--flymake-report-2)
(eglot--flymake-report-push+pulled): New helpers.
(eglot--flymake-make-diag): Take REGION arg.
(eglot--handle-notification<textDocument/PublishDiagnostics>):
Use eglot--flymake-handle-push.
(eglot--flymake-pull): Call eglot--flymake-report-push+pulled.
(eglot--flymake-report): Delete.
(eglot--flymake-reset): New helper.
(eglot--managed-mode): Use eglot--flymake-reset.
(eglot--diag-to-lsp-diag): Delete.
(eglot--signal-textDocument/didOpen)
(eglot--managed-mode): Use eglot--flymake-reset.
(eglot--maybe-activate-editing-mode): Don't reset Flymake things here.
(eglot--code-action-params): Tweak.
(eglot--code-action-bounds): Use eglot--flymake-sniff-diagnostics.
(eglot--capf-session-flush): Tweak.
2026-01-11 03:42:01 +00:00
João Távora
6921244718 Eglot: document LSP server multiplexer support
This documents how to use LSP multiplexer programs like Rassumfrassum
to connect multiple language servers to a single buffer.

* doc/misc/eglot.texi (Top): Add "Multi-server support" menu entry.
(Multi-server support): New chapter.
(Using Rassumfrassum, Design rationale): New sections documenting
how to use the Rassumfrassum multiplexer program with Eglot, with
practical examples for C++, Python, and multi-language files.
(Performance): Mention Rassumfrassum as solution for JSONRPC traffic
performance issues.
(Reporting bugs): Add guidance for troubleshooting multiplexer-related
bugs.  Improve project description guidance.  Fix various typos.
* lisp/progmodes/eglot.el (eglot-server-programs): Add a couple
of rass entries.

* etc/EGLOT-NEWS: Announce support for LSP server multiplexers via
Rassumfrassum.
2026-01-11 03:42:01 +00:00
João Távora
cc5ebad841 Flymake: clarify :region in docstring of f-diagnostic-functions
* lisp/progmodes/flymake.el (flymake-diagnostic-functions):
Clarify meaning of :region.  Re-fill docstring.
2026-01-11 03:42:01 +00:00
João Távora
b26e9bb6bc Jsonrpc: add major mode for events buffers
If the 'jq' program is installed, this dramatically simplifies debugging
LSP transcripts.

* lisp/jsonrpc.el (jsonrpc-events-jq-at-point): New function.
(jsonrpc-events-occur-at-point): New function.
(jsonrpc-events-mode-map): New variable.
(jsonrpc-events-mode): New major mode.
(jsonrpc-events-buffer): Use new mode.
2026-01-11 03:42:01 +00:00
JD Smith
0bb36ec255 Limit yanks to a single set of modification hook calls
* lisp/subr.el (insert-for-yank-1): Locally set
`inhibit-modification-hooks' to t prior to changing yanked text
properties.  Bug#77221
2026-01-10 15:35:18 -05:00
Yavor Doganov
e5a8c4ae00 ; NS: Fix typo in -resetCursorRects implementations
* src/nsterm.m ([EmacsView resetCursorRects]): Fix typo in
selector name; restrict respondsToSelector: check to Cocoa.
([EmacsScroller resetCursorRects]): Likewise.  (Bug#80098)
2026-01-10 15:58:38 +02:00
Jacob S. Gordon
57df5d5cba ; 'holiday-float': Improve documentation of edge case
When MONTH DAY falls on DAYNAME the holiday may be closer to MONTH DAY
than expected.  Describe this situation in the function's doc string.
(Bug#00000)

* lisp/calendar/holidays.el (holiday-float): Improve documentation.
2026-01-10 15:37:55 +02:00
pinmacs
e136425932 ; * lisp/net/sieve-mode.el (sieve-indent-offset)
Use the new 'sieve-indent-offset' customizable variable.

Copyright-paperwork-exempt: yes
2026-01-10 15:32:35 +02:00
Eli Zaretskii
ddd9fcb57c ; * doc/emacs/files.texi (Filesets): Fix long lines. 2026-01-10 15:28:17 +02:00
James Thomas
f5ef8f9e8e ; Doc fix: 'fileset-run-cmd' is not just for shell
* doc/emacs/files.texi (Filesets): Fix wording (bug#80008).
2026-01-10 15:26:34 +02:00
Elías Gabriel Pérez
bdd9acb6aa hideshow: Reword documentation (bug#80116)
* etc/NEWS: Reword entry.

* lisp/progmodes/hideshow.el: Reword Commentary Header.

(hs-block-start-mdata-select, hs-block-end-regexp)
(hs-c-start-regexp, hs-forward-sexp-function)
(hs-adjust-block-beginning-function)
(hs-adjust-block-end-function, hs-find-block-beginning-function)
(hs-find-next-block-function)
(hs-looking-at-block-start-predicate)
(hs-inside-comment-predicate): Reword docstrings.

(hs-block-positions): Reword docstring, and move
'hs-adjust-block-beginning-function' so that it is not affected
by 'pos-eol'.

(hs-find-block-beg-fn--default): Use 0 instead of
'hs-block-start-mdata-select'.

* lisp/treesit.el (treesit-hs-find-block-beginning): Update
code.
2026-01-10 14:55:55 +02:00
Sean Whitton
316fd10702 ; Spelling fix. 2026-01-10 12:51:37 +00:00
Sean Whitton
b07b3ae9f4 ; Fixes to last change. 2026-01-10 12:49:43 +00:00
Jared Finder
4e779d20f1 Update cursor display using Xterm escape sequences
* lisp/term/xterm.el (xterm-update-cursor): New user option.
(xterm--init): Use it.
(xterm--post-command-hook): New function for all xterm
functionality installed in 'post-command-hook'.
(xterm--init-frame-title): Install it.
(xterm--init-update-cursor, xterm--set-cursor-type)
(xterm--update-cursor-type, xterm--update-cursor-color): New
functions.
(xterm--cursor-type-to-int): New constant.
* doc/emacs/display.texi (Cursor Display):
* etc/NEWS: Document the new feature.
2026-01-10 12:49:43 +00:00
Eli Zaretskii
88d3101fdd ; Fix description of NS/GNUstep CPP conditions
* admin/CPP-DEFINES (NS_IMPL_GNUSTEP, NS_IMPL_COCOA): Fix
description (bug#80110).
2026-01-10 14:36:10 +02:00
Yavor Doganov
98f56a156e NS: Use Cocoa implementation of EmacsBell -init if named image is declared
* configure.ac: Check for 'NSImageNameCaution' declaration when
building on GNUstep.
* src/nsterm.m ([EmacsBell init]): Use fallback implementation on
GNUstep only if 'NSImageNameCaution' is not declared.  (Bug#80107)
2026-01-10 14:30:43 +02:00
Eli Zaretskii
ee65464ca1 ; Fix documentation of a recent commit
* lisp/emacs-lisp/package.el (package-review-policy)
(package-review-diff-command): Fix doc strings and tags of option
values.
(package-review-directory, package--review-p, package-review): Doc
fixes.
2026-01-10 14:25:45 +02:00
Liu Hui
53225d8a3a Fix cursor position in calendar-generate-window (bug#80069)
* lisp/calendar/calendar.el (calendar-generate-window): Move
cursor to today before running calendar-today-visible-hook.
2026-01-10 12:21:12 +00:00
Sean Whitton
09aad81166 vc--apply-to-other-working-tree: Handle 'diff-default-read-only'.
* lisp/vc/vc.el (vc--apply-to-other-working-tree): Bind
inhibit-read-only to non-nil to handle the case when
diff-default-read-only is non-nil (bug#80128).
2026-01-10 12:08:11 +00:00
Sean Whitton
cd88b8c2ba ; Fix last change. 2026-01-10 11:51:58 +00:00
Sean Whitton
fc682db9d8 * lisp/vc/vc.el (vc-deduce-fileset): Don't return empty FILESET.
Suggested by Spencer Baugh <sbaugh@janestreet.com>.
2026-01-10 11:50:12 +00:00
Philip Kaludercic
da42dd0491
; Fix order of @item and indices in help.texi
* doc/emacs/help.texi (Apropos): Place @kindex and @findex
before @item.
2026-01-10 12:43:17 +01:00
Philip Kaludercic
5b89d46965
Bind 'apropos-user-option' to C-h u
* doc/emacs/help.texi: Adjust documentation.
* etc/NEWS: Mention change.
* lisp/help.el (help-map): Add binding.
2026-01-10 12:38:05 +01:00
Philip Kaludercic
c8d19034aa
Allow 'package-isolate' to fetch missing packages
* lisp/emacs-lisp/package.el (package-isolate): Fetch missing
packages and make them available in the new Emacs process, but
not the current one.
* etc/NEWS: Mention change.
2026-01-10 12:38:05 +01:00
Philip Kaludercic
881be95cdd
Allow reviewing packages before installaion
* lisp/emacs-lisp/package.el (package-review-policy)
(package-review-directory, package-review-diff-command): Add
new options.
(package--review-p): Add new function to consult
'package-review-policy'.
(package-review): Add new function.
(package-unpack): Use new functions.
(package-install-from-archive): Return package descriptors of
installed packages.
(package-download-transaction): Handle failure of a incomplete
transaction.
(package-install): Report if a package installation failed.
(package-upgrade): Anticipate a failed package transaction by
not deleting a package beforehand.
(package-install-from-buffer): Handle the failure to download
dependencies or a rejection during the actual package review.
* doc/emacs/package.texi: Document feature.
* etc/NEWS: Mention new feature.
2026-01-10 12:38:05 +01:00