df2508a8f6 Remove from CC Mode code that modifies 'major-mode-remap-...
3106dc7766 Assert we don't double-free timers (bug#81108)
90314895dd Don't cancel random timers in x_get_foreign_selection (bu...
5cd7785b0a Fix use-after-free in Ffuncall_with_delayed_message (bug#...
* lisp/progmodes/project.el (project-vc-dir): When called
interactively, call file-truename on the project root first.
* etc/NEWS: Document the change.
* lisp/progmodes/cc-mode.el: Remove code that adds to
'major-mode-remap-defaults', as enabling and disabling tree-sitter
based modes now goes through 'treesit-enabled-modes'.
This fixes bug#81084.
* lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1):
In the test for a cast near the end of the function, add a test
for a {...} block which isn't a statement block, allowing such
blocks to be recognized as operands of casts.
Now that markdown-ts-view-mode is demoted to "experimental" in emacs-31,
simplify bits of eglot.el and rewrite docs to be more neutral. In
practice 'gfm-view-mode' is still used if found, just like before, but
intrepid users can still try the "experimental" modes.
* lisp/progmodes/eglot.el (eglot-documentation-renderer): Rewrite
doc string.
(eglot--accepted-formats): Rewrite.
(eglot--builtin-mdown-p): Remove.
* doc/misc/eglot.texi (Customization Variables): Rewrite entry.
* etc/EGLOT-NEWS: Tweak.
Ported from emacs-31 release branch:
commit 984932d4dc
Author: Sean Whitton <spwhitton@spwhitton.name>
Date: Mon Jun 1 11:48:42 2026 +0100
Disable markdown-ts-mode & markdown-ts-view-mode for Emacs 31
This synchronizes master's Eglot with emacs-31. The goal of that commit
is to demote those markdown-ts-mode.el modes to "experimental" status in
emacs-31, but Eglot was already relying on them and changes were needed.
984932d4dc is not the commit that best
does those changes, but since that commit was marked "do not merge" on
emacs-31, I thought it best to bring it here manually so any further
work -- which doesn't contradict the overarching intention -- can
continue in emacs-31 with clean merges to master (where the GNU-devel
core Elpa package is pulled from).
* lisp/progmodes/eglot.el (eglot-documentation-renderer)
(eglot--format-markup): Don't call eglot--builtin-mdown-p.
* doc/misc/eglot.texi (Customization Variables):
* etc/EGLOT-NEWS: Don't mention markdown-ts-mode
Co-authored-by: Sean Whitton <spwhitton@spwhitton.name>
The old boolean 'eglot-prefer-plaintext' is replaced by the more
expressive 'eglot-documentation-renderer', which can hold a major-mode
symbol, t (plain text), or nil (auto-detect each time). By selecting a
renderer once at startup the repeated per-request lookups are avoided,
which helps with the slowness reported in bug#81150.
* lisp/progmodes/eglot.el (eglot-prefer-plaintext): Declare obsolete
alias to 'eglot-documentation-renderer'.
(eglot-documentation-renderer): New defcustom, reworked from from
eglot-prefer-plaintext.
(eglot--accepted-formats): Use new variable.
(eglot--format-markup): Use new variable.
* etc/EGLOT-NEWS: Announce change.
* doc/misc/eglot.texi (Customization Variables): Document
eglot-documentation-renderer.
c3babe4b89 Fix lax whitespace highlight during query-replace
2e70b88623 Fix fill-paragraph combining text with preceding comment
ea54c33950 ; * etc/PROBLEMS: Link to bug#81124.
02897e208d emacsclient quote_argument is void
c618178066 ; Mark process-test-stderr-buffer as :unstable when runni...
2c1b45f5c5 ; Improve documentation of 'vc-dir-auto-hide-up-to-date'
768c8bf004 Revert "* admin/notes/documentation: Recommend not using ...
a7414f1859 native--compile-skip-on-battery-p: Try to fix ?b, ?B cond...
7cee526a8c Save and restore original local keymap in grep-edit-mode
4d87d203cf Fix display of inline SVG images in Rmail
4c55d04ebe Add treesit-ready-p check back to tree-sitter major modes...
7892ae5eaf Fix pathological slowness in flex completion
12eec781ed No longer raise error on HTTP 402 (Payment Required) (bug...
1800350b18 Avoid compilation-mode matching rust as gnu
These were reported by happy-barney on GitHub
https://github.com/HaraldJoerg/cperl-mode/issues
* lisp/progmodes/cperl-mode.el (cperl-init-faces): Don't mistake
$method as a method declaration.
Move matcher for "use require" higher to prevent "require" being
fontified as keyword.
* test/lisp/progmodes/cperl-mode-resources/sub-names.pl: Add a
test case for $method
* test/lisp/progmodes/cperl-mode-tests.el
(cperl-test-fontify-declarations): Add a test case for a module
name looking like a keyword
(cperl-test-fontify-sub-names): Verify that $method does not
declare a method
* lisp/progmodes/grep.el (grep-edit-original-mode-map): New
variable.
(grep-change-to-grep-edit-mode): Save the current local map
before switching to grep-edit-mode-map.
(grep-edit-save-changes): Restore the saved local map instead of
assuming grep-mode-map (bug#81090).
Copyright-paperwork-exempt: yes
* lisp/progmodes/compile.el
(compilation-error-regexp-alist-alist): Put 'rust' before 'gnu'
to avoid a mismatch since the " |" has become optional (bug#81075).
Copyright-paperwork-exempt: yes
No reason not to. Tested with gfm-view-mode and markdown-ts-mode
* lisp/progmodes/eglot.el (eglot-client-capabilities): Annouce
markdown support for completion docs.
The fringe indicator uses a custom lightning-bolt bitmap, an alternative
to the margin indicator on GUI frames. It is non-interactive, however.
* lisp/progmodes/eglot.el (eglot--fringe-action): New fringe bitmap.
(eglot-code-action-indications): Add 'left-fringe' to default value
and to docstring. Update incompatibility note.
(eglot-code-action-suggestion): Handle 'left-fringe' indication.
Eglot previously needed gfm-view-mode from markdown-mode.el to render
Markdown from LSP servers. It now prefers markdown-ts-view-mode when
available.
* lisp/progmodes/eglot.el (eglot--accepted-formats): Recognize
markdown-ts-view-mode as a Markdown renderer.
(eglot--format-markup): Rework with cl-labels; prefer
markdown-ts-view-mode over gfm-view-mode.
* doc/misc/eglot.texi (Eglot Features): Don't mention
markdown-mode directly.
* etc/EGLOT-NEWS: Mention change
Github-reference: https://github.com/joaotavora/eglot/discussions/1588
When the server negotiates positionEncoding utf-8 or utf-16,
ParameterInformation.label vector offsets are byte/code-unit counts
into the signature label, not character counts. Using them raw caused
wrong highlights and crashes on Unicode-rich signatures.
* lisp/progmodes/eglot.el (eglot--sig-info): Mostly rewrite.
(eglot-move-to-utf-8-linepos-function): Tweak docstring.
(eglot-move-to-utf-8-linepos, eglot-move-to-utf-16-linepos): Return
position moved to.
See discussion at
https://yhetil.org/emacs/86y0hy9e6g.fsf@gnu.org/
* lisp/emacs-lisp/elisp-scope.el (elisp-scope-analyze-form):
Add example in docstring.
* lisp/progmodes/elisp-mode.el (elisp-fontify-semantically):
Clarify use of 'cursor-sensor-mode'.
This ensures we only compute the 'help-echo' string once per
symbol in a certain position.
* lisp/progmodes/elisp-mode.el
(elisp--annotate-symbol-with-help-echo): Add caching for
when the symbol role's :help property is a function.
* lisp/progmodes/eglot.el (eglot-code-action-indicator): No lighbulb, no
fancy lightning bolt, just use zigzags which seem to display well on
typical fonts and typically have a width of 1.
* lisp/progmodes/project.el (project-prompter)
(project-prompt-project-dir, project-prompt-project-name):
Delete ALLOW-EMPTY parameter. Default to the current project if
there is one.
* lisp/vc/vc.el (project-root): Declare.
(vc--prompt-other-working-tree): Replace ALLOW-EMPTY parameter
with new ALLOW-CURRENT parameter.
(vc-working-tree-switch-project): Allow selecting the current
working tree, for symmetry with project-switch-project.
* etc/NEWS: Update.