summaryrefslogtreecommitdiff
path: root/lisp/progmodes
AgeCommit message (Collapse)Author
2026-06-02Support Ansible messages in compilation-modeMichael Albinus
* etc/NEWS: Mention Ansible integration in compilation mode. * etc/compilation.txt: Add examples of Ansible error, warning and note messages. Fix typos. * lisp/progmodes/compile.el (compilation-error-regexp-alist-alist): Add Ansible regexps for error, warning and note messages. * test/lisp/progmodes/compile-tests.el (compile-tests--test-regexps-data): Add new test cases. (compile-test-error-regexps): Increase expected infos.
2026-06-01Disable markdown-ts-mode & markdown-ts-view-mode for Emacs 31João Távora
Ported from emacs-31 release branch: commit 984932d4dc992af384b8201caa6f1ba8457cfb2a 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. 984932d4dc992af384b8201caa6f1ba8457cfb2a 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>
2026-06-01Merge from origin/emacs-31Sean Whitton
2c2f1c00acc ; * lisp/vc/vc-dir.el (vc-dir-update): Add an assertion. 51f823a3afa ; * etc/NEWS: Fix annotation. 271cc5c76c0 More tests for fill-paragraph-handle-comment.erts cc9f35c54ba ; * etc/PROBLEMS: Minor fixes of last change. 2727a6f4e8d ; Document problems caused by validation of *.eln files o... f1dd84bec99 ; * lisp/play/doctor.el (doctor-death): Fix Samaritans UR... 0bfbe06090c Update to Org 9.8.5 aac5e0457ae Eglot: replace eglot-prefer-plaintext with eglot-document... ec3d662de0b Make HTML button elements tab-stoppable in eww (bug#81107) # Conflicts: # etc/NEWS
2026-05-30Eglot: replace eglot-prefer-plaintext with eglot-documentation-rendererJoão Távora
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.
2026-05-29Merge from origin/emacs-31Sean Whitton
c3babe4b896 Fix lax whitespace highlight during query-replace 2e70b88623e Fix fill-paragraph combining text with preceding comment ea54c33950f ; * etc/PROBLEMS: Link to bug#81124. 02897e208d0 emacsclient quote_argument is void c6181780663 ; Mark process-test-stderr-buffer as :unstable when runni... 2c1b45f5c56 ; Improve documentation of 'vc-dir-auto-hide-up-to-date' 768c8bf0045 Revert "* admin/notes/documentation: Recommend not using ... a7414f18598 native--compile-skip-on-battery-p: Try to fix ?b, ?B cond... 7cee526a8cc Save and restore original local keymap in grep-edit-mode 4d87d203cfb Fix display of inline SVG images in Rmail 4c55d04ebe3 Add treesit-ready-p check back to tree-sitter major modes... 7892ae5eaf4 Fix pathological slowness in flex completion 12eec781ed6 No longer raise error on HTTP 402 (Payment Required) (bug... 1800350b186 Avoid compilation-mode matching rust as gnu
2026-05-25;cperl-mode.el: Fix fontification edge casesHarald Jörg
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
2026-05-24Save and restore original local keymap in grep-edit-modeZhengyi Fu
* 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
2026-05-23Add treesit-ready-p check back to tree-sitter major modes (bug#80909)Yuan Fu
* lisp/progmodes/c-ts-mode.el (c-ts-mode): (c++-ts-mode): * lisp/progmodes/cmake-ts-mode.el (cmake-ts-mode): * lisp/progmodes/dockerfile-ts-mode.el (dockerfile-ts-mode): * lisp/progmodes/elixir-ts-mode.el (elixir-ts-mode): * lisp/progmodes/go-ts-mode.el (go-ts-mode): (go-mod-ts-mode): (go-work-ts-mode): * lisp/progmodes/heex-ts-mode.el (heex-ts-mode): * lisp/progmodes/js.el (js-ts-mode): * lisp/progmodes/lua-ts-mode.el (lua-ts-mode): * lisp/progmodes/python.el (python-ts-mode): * lisp/progmodes/rust-ts-mode.el (rust-ts-mode): * lisp/progmodes/sh-script.el (bash-ts-mode): * lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode): (tsx-ts-mode): * lisp/textmodes/css-mode.el (css-ts-mode): * lisp/textmodes/mhtml-ts-mode.el (mhtml-ts-mode): * lisp/textmodes/toml-ts-mode.el (toml-ts-mode): * lisp/textmodes/yaml-ts-mode.el (yaml-ts-mode): * lisp/treesit-x.el (treesit-generic-mode-setup): Add the check.
2026-05-23Avoid compilation-mode matching rust as gnuThomas Mühlbacher
* 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
2026-05-23Revert "sh-script: Mark + and * as punctuation rather than a symbol constituent"Eli Zaretskii
This reverts commit b3c0aee42b086af4b3c6e26da1a5d81490b6128b. It caused regressions in 'sh-script', see bug#80794 and bug#80854.
2026-05-21Eglot: use standard face for completion annotations (bug#81088)João Távora
* lisp/progmodes/eglot.el (eglot-completion-at-point): Use completions-annotations face, not font-lock-function-name-face.
2026-05-20Eglot: announce markdown support for completion docsJoão Távora
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.
2026-05-19hideshow: Menu entry for 'hs-toggle-all'Lin Sun
* lisp/progmodes/hideshow.el: Menu entry for hs-toggle-all (bug#81045).
2026-05-18Eglot: fix eglot--format-makrup when MARKUP just a stringJoão Távora
* lisp/progmodes/eglot.el (eglot--format-markup): Fix case where markup is string.
2026-05-18Eglot: unbreak for treesit-less buildsJoão Távora
* lisp/progmodes/eglot.el (eglot--builtin-mdown-p): New helper. (eglot--accepted-formats) (eglot--format-markup): Use it.
2026-05-18; * lisp/progmodes/eglot.el (eglot-code-action-indications): Tweak.João Távora
2026-05-17Eglot: fix thinko in recent markdown-related commit (bug#81063)Brian Leung
* lisp/progmodes/eglot.el (eglot--format-markup): Correct return value for gfm-view-mode.
2026-05-17Eglot: add left-fringe code action indicator (bug#80326)João Távora
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.
2026-05-17; Improve documentation of commands that move by compilation errorsEli Zaretskii
* lisp/simple.el (next-error): * lisp/progmodes/compile.el (compilation-next-error) (compilation-previous-error): Doc fixes.
2026-05-16; Fix byte-compilation warnings in non-Tree-Sitter buildsEli Zaretskii
* lisp/progmodes/eglot.el (treesit-grammar-location): * lisp/treesit.el (treesit-grammar-location): Declare.
2026-05-14Eglot: prefer markdown-ts-view-mode for markup rendering (bug#80127)João Távora
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
2026-05-12hideshow: Support new 'margin' face for margin indicators. (Bug#80693)Elias Gabriel Perez
* lisp/progmodes/hideshow.el (hs-indicator-hide): Remove 'default' face. (hs--make-indicators-overlays): Rework.
2026-05-12Use the new 'margin' face in Flymake (bug#80693)Juri Linkov
* lisp/progmodes/flymake.el (flymake--bs-display): Use the 'margin' face when it's available.
2026-05-11* lisp/progmodes/hideshow.el (hs--set-variable): Use 'set-local' (bug#80999)Elias Gabriel Perez
2026-05-09Eglot: fix eglot--sig-info with non-UTF-32 positionEncodingJoão Távora
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.
2026-05-08; Fix Gregor Schmid's attribution for lua-mode.el.Sean Whitton
2026-05-07; Fix two file headers misunderstood by authors.el.Sean Whitton
2026-05-06; Expand 'elisp-fontify-symbol' and 'elisp-scope-analyze-form' docsEshel Yaron
See discussion at https://yhetil.org/emacs/868q9wag3h.fsf@gnu.org/ * lisp/progmodes/elisp-mode.el (elisp-fontify-symbol): * lisp/emacs-lisp/elisp-scope.el (elisp-scope-analyze-form): Expand docstring.
2026-05-05; * lisp/progmodes/elisp-mode.el (elisp-fontify-semantically): Fix typo.Eli Zaretskii
2026-05-05; More 'elisp-scope' and 'elisp-fontify-semantically' doc improvementsEshel Yaron
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'.
2026-05-05elisp-mode: Cache 'help-echo' function results (bug#80948)Eshel Yaron
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.
2026-05-05; (elisp-fontify-symbol): Improve docstring.Eshel Yaron
2026-05-05; Fix doc string of 'elisp-fontify-semantically' (bug#80948)Eli Zaretskii
* lisp/progmodes/elisp-mode.el (elisp-fontify-semantically): Doc fix.
2026-05-02Eglot: find well behaved UTF char for code actions (bug#80326)João Távora
* 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.
2026-05-02Project prompters always default to current project, if anySean Whitton
* 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.
2026-05-01; project.el: Use when-let* not if-let* where appropriate.Sean Whitton
2026-04-30; Add comment thing for c-ts-modeYuan Fu
* lisp/progmodes/c-ts-mode.el (c-ts-mode--thing-settings): Add comment thing.
2026-04-27Fix defining a few faces as emptyJonas Bernoulli
e72afa9dbf92f45 replaced nil, which is invalid as a face definition, with ((t (:inherit default))), but that does not actually result in an "empty" face, which doesn't set any attributes. Instead it doubles down on all attributes set for the default face. Replace that with ((t)), which accomplishes what appears to have been the intention. * lisp/net/shr.el (shr-h4, shr-h5, shr-h6): * lisp/nxml/nxml-mode.el (nxml-text): * lisp/progmodes/make-mode.el (makefile-shell): Use empty face definition ((t)), instead of ((t (:inherit default))).
2026-04-26; Fix & improve last change.Sean Whitton
2026-04-26New user option compilation-search-extra-pathKai Ma
* lisp/progmodes/compile.el (compilation-search-extra-path): New option (bug#80279). (compilation-start): Use it. (compilation-search-path): * doc/emacs/building.texi: * etc/NEWS: Document it, and also compilation-search-path.
2026-04-22Eglot: add eglot--server-buffer-name and use it consistentlyJoão Távora
* lisp/progmodes/eglot.el (eglot--server-buffer-name): New function. (eglot--connect): Rename events and stderr buffers after serverInfo arrives to include the server's self-reported name. (eglot-show-workspace-configuration, eglot-describe-connection) (eglot--define-hierarchy-command): Use eglot--server-buffer-name. (eglot--propose-changes-as-diff): Add SERVER argument; use eglot--server-buffer-name. (eglot--apply-workspace-edit): Add SERVER argument; pass server to eglot--propose-changes-as-diff. (eglot-handle-request workspace/applyEdit, eglot-execute) (eglot-rename): Pass server to eglot--apply-workspace-edit.
2026-04-22Eglot: add eglot--server-name helperJoão Távora
* lisp/progmodes/eglot.el (eglot--server-name): New function. (eglot--list-connections-entries, eglot-describe-connection): Use it.
2026-04-21; Cleanup defcustoms in 'lua-mode'john muhl
* lisp/progmodes/lua-mode.el (lua-always-show) (lua-documentation-url): Add :version, remove :group. (Bug#80840)
2026-04-21Eglot: handle visited file name changes (typically C-x C-w)João Távora
When the user renames a buffer's file via set-visited-file-name, notify the server with didClose (old URI) and didOpen (new URI). The TextDocumentIdentifier cache still holds the old URI when after-set-visited-file-name-hook fires, so didClose uses it correctly; didOpen then clears and rebuilds it from the new name. * lisp/progmodes/eglot.el (eglot--managed-mode): Hook and unhook eglot--after-set-visited-file-name-hook. (eglot--after-set-visited-file-name-hook): New function.
2026-04-21Eglot: use Unicode box-drawing chars in hierarchy buffersJoão Távora
Use box-drawing characters for the tree guides in hierarchy buffers when the display supports them. * lisp/progmodes/eglot.el (eglot--hierarchy-2): Rework.
2026-04-20Eglot: unbreak diagnostics in symlinked projectsJoão Távora
Now that 'eglot-uri-to-path' tries to return "project-root-familiar" paths, unresolving the absolute path name, it's important to update 'eglot--find-buffer-visiting' to consider the two alternative ways to refer to a file. IOW, this was already a bug, but the latest changes to 'eglot-uri-to-path' made it more evident. * lisp/progmodes/eglot.el (eglot--find-buffer-visiting): Also consider buffer-file-name.
2026-04-19(js-jsx--detect-after-change): Fix test regressionStefan Monnier
Commit 6942d508f0c made js-mode-regexp-syntax-bug-25529 fail, because it changes the moment and place in which `syntax-propertize` gets called, uncovering a bug where `js-jsx--detect-after-change` narrows the buffer, then calls `re-search-forward` which calls `syntax-propertize`, so we end up doing `syntax-propertize` while narrowed which can fail in all kinds of ways. * lisp/progmodes/js.el (js-jsx--detect-and-enable): Change optional arg to BEG and END. (js-jsx--detect-after-change): Use them to avoid narrowing. * lisp/emacs-lisp/syntax.el (syntax-propertize): Emit a message when called narrowed and the narrowing starts later than the nearest already propertized position.
2026-04-17Fix c-ts-mode-set-style when STYLE is a function (bug#80777)Yuan Fu
* lisp/progmodes/c-ts-mode.el (c-ts-mode-set-style): Prepend the language symbol in front of the styles.
2026-04-17Eglot: add M-x eglot-describe-connectionJoão Távora
Also add more bindings to M-x eglot-list-connections * lisp/progmodes/eglot.el (eglot-list-connections-mode-map): Add bindings for e, w, RET. (eglot-events-buffer-of-listed-connection) (eglot-show-workspace-configuration-of-listed-connection) (eglot-describe-listed-connection): New commands. (eglot-describe-connection): New command. * doc/misc/eglot.texi: Document new keys and eglot-describe-connection. * etc/EGLOT-NEWS: Announce.
2026-04-16Eglot: adjust previous change to eglot-uri-to-pathJoão Távora
* lisp/progmodes/eglot.el (eglot-uri-to-path): Tweak.