* 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.
* 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.
* 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)
* 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.
* 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'.
* 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.
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.
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
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.
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.
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.
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.
* 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.
* 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)
* 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).
* 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.
* 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.