* lisp/leim/quail/latin-ltx.el: Add math "alphabets" that can be matched
with simple regexps; a few others are added by hand. There are 13
variants: bf, it, bfit, bb, scr, bfscr, frak, bffrak, sf, bfsf, sfit,
bfsfit, and tt.
* lisp/leim/quail/latin-ltx.el (latin-ltx--define-rules): Add standard
TeX names that were missing; some already had other aliases. Add a few
other non-systematic additions.
This seems more appropriate given the context, and additionally
the CJK symbols often render wider, as a full width CJK glyph,
while the math symbols render narrower. There was some related
discussion in bug#12948, where an analogous change was made
for \langle and \rangle.
* lisp/leim/quail/latin-ltx.el (latin-ltx--define-rules):
Change rules for \llbracket, \rrbracket and \ldata, \rdata to
generate Unicode code points in the Miscellaneous Mathematical
Symbols-A block (U+27E6, U+27E7 and U+27EA, U+27EB) instead of
the CJK Symbols and Punctuation block (U+301A, U+301B and
U+300A , U+300B).
Copyright-paperwork-exempt: yes
Transform (pred P) for P in {atom, nlistp, identity, not} into
predicates that pcase already understands in type terms.
This doesn't affect the behaviour but generates better code.
It is useful to bind these to [remap scroll-up-command] and
[remap scroll-down-command] even if you don't want to enable
pixel-scroll-precision-mode because of how it sets
make-cursor-line-fully-visible.
* nt/inc/ms-w32.h (strerror): Redirect to sys_strerror after
including <string.h>, to prevent the linker from thinking it
should be imported from some DLL. Reported by Richard Copley
<rcopley@gmail.com>.
* src/w32.c: Remove now unneeded prototype of sys_strerror.
* lisp/progmodes/eglot.el (eglot--format-server-message): New helper.
(eglot-handle-notification<window/showMessage>)
(eglot-handle-request<window/showMessageRequest>): Use it.
* lisp/progmodes/python.el (python-ts-mode):
Set 'treesit-sexp-thing-down-list' to 'list' to override
sexp navigation with list navigation (bug#72478).
* lisp/emacs-lisp/lisp.el (up-list): Mention 'up-list-function' in docstring.
* etc/NEWS: Announce the new customization option (bug#80215).
* lisp/textmodes/yaml-ts-mode.el (yaml-ts-mode): New customization group.
(yaml-ts-mode-yamllint-options): New customization option.
(yaml-ts-mode--flymake-process): New variable that stores the reference
to the flymake process.
(yaml-ts-mode-flymake): New function that implements support for Flymake.
* lisp/progmodes/json-ts-mode.el (json-ts--get-path-at-node)
(json-ts--path-to-jq, json-ts--path-to-python): New functions.
(json-ts-jq-path-at-point): New command for getting JSON path at point.
* test/lisp/progmodes/json-ts-mode-tests.el: New file.
Add tests for the utility command.
* etc/NEWS: Announce new command 'json-ts-jq-path-at-point' (bug#80190).
The doc string of 'frame-or-buffer-changed-p' says not to call it
with the nil argument, but term.el did. Since "M-x term" puts
'term--update-term-menu' on the 'menu-bar-update-hook' ahead of
'menu-bar-update-buffers', it caused the latter decide that there
was no change in buffers, because the internal state variable
used by 'frame-or-buffer-changed-p' when called with the nil
argument was reset by 'term--update-term-menu'. Fix that by using
a non-nil state variable.
* lisp/term.el (term--buffers-changed): New variable.
(term--update-term-menu): Use it when calling
'frame-or-buffer-changed-p'. (Bug#80231)
Some language servers request file watching for a very large number of
directories (e.g. Python virtualenvs), which can exhaust system
resources and cause slow startup.
https://github.com/joaotavora/eglot/issues/1568
* lisp/progmodes/eglot.el (eglot-max-file-watches): New variable.
(eglot--count-file-watches): New function.
(eglot--watch-globs): Use them to limit watches. Signal jsonrpc-error
when limit is reached.
(eglot-watch-files-outside-project-root): Fix docstring punctuation.
* etc/EGLOT-NEWS: Mention change.
Now also accepts file operation kinds as keys in the alist form.
* lisp/progmodes/eglot.el (eglot-confirm-server-edits): Rework
default value, docstring and defcustom type.
(eglot--confirm-server-edits): Also check for operation-kind-based
entries.
The current 2026 landscape suggests servers (especially gopls
and ocamllsp) take advantage of this, so let's give it to them
by default.
* lisp/progmodes/eglot.el (eglot-advertise-cancellation):
Default to t.
* etc/EGLOT-NEWS: Mention change.
If the user simply C-g's signal a 'jsonrpc-error' with code 32000 to
mean "no error", provide an LSP :failureReason and keep server chill.
* lisp/progmodes/eglot.el (eglot-handle-request<workspace/applyEdit>>):
Else, if the server asks us a question, the user has just 10
seconds to ponder, which is a bit silly.
* lisp/progmodes/eglot.el (eglot-execute): Pass timeout=nil to
eglot--request.
Previously, the default answer pre-filled in the minibuffer was
obscuring the other possible answers.
* lisp/progmodes/eglot.el
(eglot-handle-request<window/showMessageRequest>): Rework.
It was completely broken, with a cancel being set for every sent (and
probably already received) async request, and no actual discarding
of the response of a cancelled request.
* lisp/progmodes/eglot.el (eglot--async-request): Fix cancellation
of async requests.
(eglot--semtok-request): Don't need 'buf' &aux anymore.
Previously, 'quit' could cause remote endpoints to never get a
reply and thus sometimes hang. Ensure we always reply. Also,
give the application a chance to signal jsonrpc-error with the
served code=32000, meaning "no error".
* doc/lispref/text.texi (JSONRPC Overview): Rework section on
request dispatchers.
* lisp/jsonrpc.el (jsonrpc-connection-receive): Rework.
This allows clients such as Eglot to act on the user
C-g's/quits out of a blocking jsonrpc-request call. It also
fixes the TIMEOUT=nil passed to jsonrpc-request. An infinite
timeout in that case (for a long-running request, for example)
and it was not being transmitted to the lower
jsonrpc-async-request.
* lisp/jsonrpc.el (jsonrpc-request): Add CANCEL-ON-QUIT. Rework
docstring.
* lisp/window.el (quit-restore-window): Try to restore the
previously selected window only if WINDOW is either the selected
window or BURY-OR-KILL is neither 'burying' nor 'killing'.
Otherwise, this might deliberately change the selected window,
for example, when 'kill-buffer-quit-windows' is non-nil and WINDOW
shows the buffer to kill.
Using 'user-error' in 'hs-minor-mode', prevents the major-mode
from initializing correctly when hideshow is not supported in
that mode, using 'message' instead fixes this.
* lisp/progmodes/hideshow.el (hs-minor-mode): Tweak.
In async mode, the workaround for the old Terminal.app collides
with the binding we install for the primary DA. Just drop it.
* lisp/term/xterm.el (xterm--init): Remove workaround for very old
macOS `Terminal.app`.
The info returned from `garbage-collect` is really handy to
track the evolution of the heap size, but sadly it's available only
at the cost of running a full GC, which has two big downsides:
it's slow, it affects what we're measuring, and it can't be used
in `post-gc-hook`.
So, this patch makes it available without running the GC.
* src/alloc.c (Fgarbage_collect_heapsize): New function, extracted from
`Fgarbage_collect`.
(Fgarbage_collect): Use it.
(syms_of_alloc): defsubr it.
* doc/lispref/internals.texi (Garbage Collection): Extract
documentation for it from that of `garbage-collect`.