summaryrefslogtreecommitdiff
path: root/lisp/textmodes
AgeCommit message (Collapse)Author
2026-05-29(reftex-isearch-minor-mode): A few more simplificationsStefan Monnier
* lisp/textmodes/reftex-global.el (reftex-isearch-minor-mode): Simplify docstring. Remove redundant `setq`s and mode line update.
2026-05-29Refactor reftex-isearch-minor-mode to use define-minor-modeLuniya DW
See L88 in etc/TODO. * lisp/textmodes/reftex-global.el (reftex-isearch-minor-mode): Use `define-minor-mode`. * lisp/textmodes/reftex.el (reftex-isearch-minor-mode): Remove redundant variable definition.
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-27Fix fill-paragraph combining text with preceding commentJuri Linkov
* lisp/textmodes/fill.el (fill-paragraph): Handle the case when a non-comment line follows a comment line with non-nil 'fill-paragraph-handle-comment' (bug#80449). Skip such a comment line before filling a non-comment line. * test/lisp/textmodes/fill-tests.el (fill-test-fill-paragraph-handle-comment): Add new test. * test/lisp/textmodes/fill-resources/fill-paragraph-handle-comment.erts: New file.
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-23Merge from origin/emacs-31Sean Whitton
4f13f52a3aa * build-aux/git-hooks/commit-msg: Replace Markdown-style ... dd42133315b vc-test--rename-file: Disable part of test for SCCS eb653865c3a markdown-ts-mode: Don't enable unconditionally by default # Conflicts: # etc/NEWS
2026-05-23markdown-ts-mode: Don't enable unconditionally by defaultRahul Martim Juliato
* lisp/textmodes/markdown-ts-mode.el (markdown-ts-mode-maybe): New function. (auto-mode-alist): Bind ".md", ".markdown", and ".mdx" to 'markdown-ts-mode-maybe' instead of 'markdown-ts-mode'. * etc/NEWS: Update the 'markdown-ts-mode' entry.
2026-05-23Merge from origin/emacs-31Eli Zaretskii
7a17f97baa7 Prettify special glyphs f13287fde0d Revert "sh-script: Mark + and * as punctuation rather tha... 70b79b3ed8d Rename `icalendar-recur' type and related functions 3d2bb233f27 ; Minor Tramp changes f6281d757d3 ; * etc/NEWS: Tell how to disable 'markdown-ts-mode'. 142b1e0d4c3 Fix Lisp injection via X-Draft-From in Gnus d6f7b2d99bd Save/restore old_buffer slot via window configurations (B... e0fbecaf658 Adapt ert-remote-temporary-file-directory settings 3de7f0ce5e5 Fix warning message in 'markdown-ts-mode--initialize' 7df8604ea63 ; Improve documentation of lazy-highlight in search and r... 2936b36164d Fix "assertion 'GTK_IS_WINDOW (window)' failed" 98348a0bdc9 [Xt] Fix child frame resizing glitch 13b29eebc16 Eglot: use standard face for completion annotations (bug#... # Conflicts: # etc/NEWS
2026-05-23New tool bar icons for artist-modeElias Gabriel Perez
* etc/images/artist-mode/README: * etc/images/artist-mode/char-for-spray.xpm: * etc/images/artist-mode/char-to-fill.xpm: * etc/images/artist-mode/ellipse.xpm: * etc/images/artist-mode/eraser.xpm: * etc/images/artist-mode/fill.xpm: * etc/images/artist-mode/line.xpm: * etc/images/artist-mode/pen.xpm: * etc/images/artist-mode/poly-line.xpm: * etc/images/artist-mode/rectangle.xpm: * etc/images/artist-mode/spray.xpm: * etc/images/artist-mode/square.xpm: * etc/images/artist-mode/text.xpm: * etc/images/artist-mode/char-for-spray.pbm: * etc/images/artist-mode/char-to-fill.pbm: * etc/images/artist-mode/ellipse.pbm: * etc/images/artist-mode/eraser.pbm: * etc/images/artist-mode/fill.pbm: * etc/images/artist-mode/line.pbm: * etc/images/artist-mode/pen.pbm: * etc/images/artist-mode/poly-line.pbm: * etc/images/artist-mode/rectangle.pbm: * etc/images/artist-mode/spray.pbm: * etc/images/artist-mode/square.pbm: * etc/images/artist-mode/text.pbm: New files. * lisp/textmodes/artist.el (artist-tool-bar-map): New variable. (artist-mode, artist-mode-exit): Use it (bug#80644).
2026-05-22Fix warning message in 'markdown-ts-mode--initialize'Eli Zaretskii
* lisp/textmodes/markdown-ts-mode.el (markdown-ts-mode--initialize): Tweak the warning message when Tree-sitter is not available. (Bug#81100)
2026-05-20markdown-ts-mode: hide fence lines in view-mode (bug#81081)Rahul Martim Juliato
* lisp/textmodes/markdown-ts-mode.el (markdown-ts--fontify-delimiter): When `markdown-ts-hide-markup' is enabled in `markdown-ts-view-mode', also hide the whole line containing a `fenced_code_block_delimiter' (including its terminating newline) so Eldoc/LSP markdown snippets render without stray blank lines around the code block. Scoped to view-mode and to fenced delimiters on purpose: the same handler is shared by inline delimiters (emphasis, code span, link brackets) where munching surrounding whitespace would collapse word separators, and tuning rendering for hide-markup-while-editing is not a goal.
2026-05-20markdown-ts-mode: align default face definitions with markdown-modeJoão Távora
Match the out-of-the-box appearance of markdown-ts-mode to the non-tree-sitter markdown-mode package, making switching between modes less jarring. * lisp/textmodes/markdown-ts-mode.el (markdown-ts-delimiter) (markdown-ts-heading-1, markdown-ts-heading-2, markdown-ts-heading-3) (markdown-ts-heading-4, markdown-ts-heading-5, markdown-ts-heading-6) (markdown-ts-block-quote, markdown-ts-code-block, markdown-ts-code-span) (markdown-ts-indented-code-block, markdown-ts-html-tag) (markdown-ts-html-block, markdown-ts-thematic-break) (markdown-ts-entity-reference, markdown-ts-numeric-character-reference) (markdown-ts-table, markdown-ts-table-header, markdown-ts-table-cell) (markdown-ts-table-delimiter-cell, markdown-ts-language-keyword) (markdown-ts-list-marker, markdown-ts-hard-line-break-backslash) (markdown-ts-hard-line-break-backslash-hidden) (markdown-ts-hard-line-break-space-hidden) (markdown-ts-task-unchecked, markdown-ts-task-checked): Tweak.
2026-05-20Fix markdown-ts-mode atx_heading face computation (bug#81042)Stéphane Marks
The grammar reports leading spaces as part of the atx_heading "marker" and we cannot use the length of the marker as a result. Instead, count the number of consecutive # after any blanks to determine its "level." * lisp/textmodes/markdown-ts-mode.el (markdown-ts--fontify-atx-heading): Count the octothorpes rather than using the length of the marker node's text.
2026-05-20Allow markdown-ts--run-command-in-code-block to ignore output (bug#81041)Stéphane Marks
Do not assume every command run in 'markdown-ts--run-command-in-code-block' produces output that needs to be merged from the temp/work buffer into the source buffer. One example is 'xref-find-definitions', the temp buffer of which is unrelated to the source buffer. * lisp/textmodes/markdown-ts-mode.el (markdown-ts-code-block-commands): Add 'complete-symbol'. (markdown-ts-code-block-ignore-output-commands): New defvar. (markdown-ts--run-command-in-code-block): Ignore command output when necessary.
2026-05-14Use 'read-multiple-choice' in 'markdown-ts-mode' (bug#81027)Rahul Martim Juliato
Replace the "c" character-prompt interactive spec with 'read-multiple-choice', which presents named options instead of requiring users to decode the prompt string and type a single character. * lisp/textmodes/markdown-ts-mode.el (markdown-ts-table-align-column): Use 'read-multiple-choice'. Adjust ALIGN docstring punctuation. * lisp/textmodes/markdown-ts-mode-x.el (markdown-ts-toc-insert-template): Use 'read-multiple-choice'.
2026-05-14Fix 'markdown-ts-code-span' face (bug#81026)Rahul Martim Juliato
* lisp/textmodes/markdown-ts-mode.el (markdown-ts-code-span): Inherit from 'font-lock-keyword-face' rather than 'font-lock-string-face'.
2026-05-14Add read-only 'markdown-ts-view-mode' (bug#81023)Rahul Martim Juliato
This new derived mode is intended for consumers that render Markdown content for display rather than editing, such as Eglot and Eldoc when showing documentation popups and buffers. It pre-sets the relevant customizations (markup hidden, inline images on, hard-line-break markup hidden, native code-block fontification, table and code-block context minor modes off), makes the buffer read-only, and uses its own keymap derived from 'special-mode-map' so navigation keys behave like a viewer. A pre-init hook lets callers normalize buffer content before the grammar parses it; 'markdown-ts-add-final-newline' is the default so that markup depending on a terminating newline parses correctly. 'markdown-ts-buffer-string' returns the rendered buffer string with overlay faces flattened into text properties, which is useful for callers that capture the rendered output. Along the way: 'list_marker_parenthesis' is now recognized as an ordered list marker; the strikethrough query is simplified to a single rule; thematic breaks span the window via an ':extend' underline when the face supports it. * lisp/textmodes/markdown-ts-mode.el (markdown-ts-view-mode): New read-only derived mode. (markdown-ts-view-mode-map): New keymap. (markdown-ts-view-mode-pre-init-hook): New hook, defaulting to 'markdown-ts-add-final-newline'. (markdown-ts-mode--initialize): New helper, factored out of 'markdown-ts-mode' so 'markdown-ts-view-mode' can reuse the parser readiness and setup logic after overriding local variables. (markdown-ts-mode): Call 'markdown-ts-mode--initialize'. (markdown-ts-add-final-newline): New function. (markdown-ts-buffer-string): New function. (markdown-ts-unordered-list-marker): New defcustom. (markdown-ts-hard-line-break-backslash) (markdown-ts-hard-line-break-space): Accept the symbol 'hide. (markdown-ts--fontify-hard-line-break): Honor 'hide. (markdown-ts--fontify-atx-heading) (markdown-ts--fontify-setext-heading) (markdown-ts--fontify-atx-delimiter) (markdown-ts--fontify-unordered-list-marker) (markdown-ts--list-item-depth): New functions supporting clean rendering when markup is hidden. (markdown-ts--fontify-thematic-break): Use ':extend' underline span when the face supports it. (markdown-ts--resolve-display-value): Accept non-cons values. (markdown-ts--list-ordered-item-p): Also recognize 'list_marker_parenthesis'. (markdown-ts--range-settings): Mark markdown-inline embed as ':local t'. (markdown-ts--set-up): Create the markdown-inline parser only in the inline setup branch; drop the redundant 'markdown-ts-hide-markup' make-local-variable. (markdown-ts--treesit-settings): Route atx and setext headings to their dedicated fontifiers; route unordered list markers through 'markdown-ts--fontify-unordered-list-marker'; move 'strikethrough' to the simpler paragraph-inline query.
2026-05-13Fix strikethrough in 'markdown-ts-mode' (bug#80991)Rahul Martim Juliato
* lisp/textmodes/markdown-ts-mode.el (markdown-ts--treesit-settings): Add a new font-lock block for 'paragraph-inline' that handles strikethrough nodes more carefully.
2026-05-13Fix code-span in headings in 'markdown-ts-mode' (bug#80979)Rahul Martim Juliato
* lisp/textmodes/markdown-ts-mode.el (markdown-ts--treesit-settings): Move the 'code_span' and 'code_span_delimiter' font-lock rules into a separate block with ':override prepend' instead of 'append'. The heading feature (level 1) applies its face via 'font-lock-append-text-property', so a code span that later appends 'markdown-ts-code-span' ends up with '(markdown-ts-heading-N markdown-ts-code-span)', where the heading face takes priority and the code-span face is suppressed. Prepending ensures 'markdown-ts-code-span' appears first in the face list and wins visually.
2026-05-13Make 'markdown-ts-inline-images' buffer local and test for GUI (bug#80978)Stéphane Marks
* lisp/textmodes/markdown-ts-mode.el (markdown-ts-inline-images): Now buffer local. (markdown-ts--fontify-image): Defensively test for graphical display before rendering images.
2026-05-11Fix 'sgml-parse-tag-backward' to handle tags in commentsPhilip Kaludercic
* lisp/textmodes/sgml-mode.el (sgml--find-<>-backward): Ignore SGML tags that happen to occur within comments. This also means that the contents of comments are not indented, but also do not affect the indentation of tags following the comments as well. (Bug#80841)
2026-05-05; Fix byte-compilation warnings in markdown-ts-modeEli Zaretskii
* lisp/textmodes/markdown-ts-mode-x.el: Use 'treesit-declare-unavailable-functions'. * lisp/treesit.el (treesit-declare-unavailable-functions): Add declaration.
2026-05-05Improve 'markdown-ts-mode'Rahul Martim Juliato
Overhaul 'markdown-ts-mode' with comprehensive fontification, code block handling, editing commands, fill-paragraph support, inline image previews, a mode menu, and table editing. Add 'markdown-ts-mode-x.el' with conversion/export and TOC support. * lisp/textmodes/markdown-ts-mode.el: Add Version, Package-Requires, and Keywords header fields. Expand Commentary with documentation for code block language modes, code block commands, bidirectional text, and known tree-sitter grammar bugs. (require 'goto-addr, xref, icons): New requirements. (markdown-ts): New customization group with :version and :package-version tags. (markdown-ts-hide-markup): Add :version and :package-version. (markdown-ts-ellipsis): New option for folded heading ellipsis. (markdown-ts-menu-bar-show): New option to toggle mode menu. (markdown-ts-default-folding): New option for default fold level. (markdown-ts-inline-images): New option to display inline images. (markdown-ts-image-max-width): New option for image max width. (markdown-ts-display-remote-inline-images): New option for remote image handling. (markdown-ts--resolve-display-value): New helper to resolve display values using char-displayable-p. (markdown-ts-checked-checkbox): New option for checked checkbox display string or icon. (markdown-ts-checked-checkbox-icon): New icons.el icon for the checked variant. (markdown-ts-unchecked-checkbox): New option for unchecked checkbox display string or icon. (markdown-ts-unchecked-checkbox-icon): New icons.el icon for the unchecked variant. (markdown-ts-thematic-break-character): New option for thematic break display character. (markdown-ts-hard-line-break-backslash): New option for the glyph shown in place of a trailing-backslash hard line break when markup is hidden. (markdown-ts-hard-line-break-space): New option for the glyph shown in place of a trailing-spaces hard line break when markup is hidden. (markdown-ts-code-block-in-context-mode-lighter): New option for code block context mode lighter string. (markdown-ts-inhibit-code-block-mode-warnings): New option to inhibit code-block major-mode messages and warnings. (markdown-ts-table-default-column-width): New option for default table column width. (markdown-ts-enable-table-mode): New option to enable table mode. (markdown-ts-table-auto-align): New option for triggers that cause automatic table alignment. (markdown-ts-table-align-features): New option for table align features. (markdown-ts-in-table-mode-lighter): New option for markdown-ts-in-table-mode lighter string. (markdown-ts-emphasis, markdown-ts-bold) (markdown-ts-strikethrough, markdown-ts-link) (markdown-ts-link-destination, markdown-ts-code-span) (markdown-ts-code-block, markdown-ts-code-block-markup-hidden) (markdown-ts-indented-code-block, markdown-ts-html-tag) (markdown-ts-html-block, markdown-ts-thematic-break) (markdown-ts-entity-reference) (markdown-ts-numeric-character-reference, markdown-ts-latex) (markdown-ts-table-header, markdown-ts-table-cell) (markdown-ts-table-delimiter-cell, markdown-ts-task-unchecked) (markdown-ts-task-checked): New faces. (markdown-ts-hard-line-break-backslash) (markdown-ts-hard-line-break-backslash-hidden) (markdown-ts-hard-line-break-space) (markdown-ts-hard-line-break-space-hidden): New faces for the two hard-line-break variants, with distinct shown/hidden appearances. (markdown-ts-in-code-block): New face for when point is inside a fenced code block. (markdown-ts-table): New face for Markdown pipe table background. (markdown-ts-in-table): New face for markdown-ts-in-table-mode when point is in a table. (markdown-ts--set-up-inline): New variable for lightweight setup in embedded inline markdown-ts-mode buffers used by code block commands. (markdown-ts-default-code-block-mode): New variable to define default mode for anonymous code blocks. (markdown-ts-fontify-code-blocks-natively): New option to enable/disable native fontification of fenced code block contents. (markdown-ts-enable-code-block-context-mode): New option to enable/disable code block context integration. (markdown-ts-code-block-modes): New variable replacing markdown-ts--code-block-language-map and markdown-ts-code-block-source-mode-map with unified language to mode mapping including heuristic lookup. (markdown-ts-code-block-force-conventional-modes): New variable listing tree-sitter modes whose fontification of code block content should be harvested via a temporary buffer. (markdown-ts-table-export-buffer): New constant for table export output buffer name. (markdown-ts--table-row-types, markdown-ts--table-cell-types) (markdown-ts--table-delimiter-cell-types) (markdown-ts--table-delimiter-cell-subtypes): New constants for pipe table node type classification. (markdown-ts--make-link-button): New function to create clickable link buttons with mailto, browse-url, and find-file dispatch. (markdown-ts--fontify-link-destination): New fontifier that hides link destinations when markup is hidden. (markdown-ts--link-ref-cache, markdown-ts--link-ref-cache-tick) (markdown-ts--link-ref-definitions) (markdown-ts--resolve-link-ref): New link reference definition cache with case-insensitive matching per CommonMark spec. (markdown-ts--fontify-link-node): New fontifier for inline, reference, shortcut, and collapsed links as clickable buttons. (markdown-ts--fontify-autolink): New fontifier for URI and email autolinks with angle bracket hiding. (markdown-ts--fontify-link-ref-label) (markdown-ts--fontify-link-ref-destination): New fontifiers for link reference definitions. (markdown-ts--slug-github-strip-re, markdown-ts--slug-github) (markdown-ts--slug-pandoc, markdown-ts--explicit-id-re) (markdown-ts--heading-text-and-id) (markdown-ts--heading-id-cache) (markdown-ts--heading-id-cache-tick) (markdown-ts--build-heading-ids, markdown-ts--heading-ids) (markdown-ts--follow-fragment): New fragment link support with GitHub and Pandoc slug algorithms. (markdown-ts--latex-block-valid-p) (markdown-ts--fontify-latex-block): New LaTeX/math fontifier with cross-paragraph validation. (markdown-ts--fontify-backslash-escape): New fontifier that hides backslash in escapes except inside LaTeX blocks. (markdown-ts--decode-entity, markdown-ts--fontify-entity): New HTML entity decoder and fontifier using org-entities and sgml-char-names with display property for decoded values. (markdown-ts--fontify-checkbox): New fontifier showing the configured checkbox glyph when markup is hidden. (markdown-ts--fontify-hard-line-break): New fontifier for 'hard_line_break' nodes. (markdown-ts--fontify-heading): New fontifier for ATX and Setext headings. (markdown-ts--fontify-thematic-break): New fontifier showing horizontal line when markup is hidden. (markdown-ts--fontify-code-block): New fontifier applying background overlay to code blocks with language and mode properties. (markdown-ts-at-code-block-p) (markdown-ts-code-block-language-at) (markdown-ts-code-block-mode-at): New accessors for code block overlay properties. (markdown-ts--imenu-code-block-node-p): New helper for imenu code block detection. (markdown-ts--image-alone-on-line-p) (markdown-ts--fontify-image): New inline image display with standalone and inline positioning. (markdown-ts--bare-url-regexp) (markdown-ts--bare-email-uri-regexp) (markdown-ts--fontify-bare-uri): New bare URL/email fontification via jit-lock using goto-addr regexps. (markdown-ts--treesit-settings): Rewrite with dedicated faces, custom fontifiers, and new font-lock features for all inline and block elements. Also add a new 'error' font-lock feature highlighting tree-sitter ERROR nodes. (markdown-ts--code-block-languages) (markdown-ts--code-block-non-ts-modes): New buffer-local alists for code block language tracking. (markdown-ts--harvest-mode-treesit-configuration): Rename from markdown-ts--harvest-treesit-configs with delay-mode-hooks. (markdown-ts--configure-current-buffer): Rename from markdown-ts--add-config-for-mode. (markdown-ts--language-at-node): New helper extracting language symbol from code_fence_content node. (markdown-ts--non-ts-fontify-cache): New buffer-local hash table caching fontification results for non-tree-sitter code blocks. (markdown-ts--fontify-non-ts-collect-faces): New function harvesting face properties from a mode in an indirect or temporary buffer. (markdown-ts--fontify-non-ts-code-block): New fontifier for non-tree-sitter modes via temporary buffer font-lock. (markdown-ts--code-block-language-mode): New function with heuristic mode name probing. (markdown-ts--code-block-ts-language): Rename from markdown-ts--convert-code-block-language with support for non-ts modes and recursive markdown handling. (markdown-ts-code-block-commands) (markdown-ts-code-block-thing-commands) (markdown-ts-code-block-region-commands): New command lists for code-block context execution. (markdown-ts--enable-code-block-in-context-mode) (markdown-ts--maybe-run-command-in-code-block) (markdown-ts--code-block-xref-find-definitions) (markdown-ts--run-command-in-code-block): New code block minor mode with temp-buffer command dispatch. (markdown-ts--code-block-newline): New command for newline inside code blocks, dispatching to the block's mode. (markdown-ts--range-settings): Update range configuration; remove :range-fn treesit-range-fn-exclude-children. (markdown-ts--remove-image-overlays) (markdown-ts--outline-view-change): New helpers for image overlay management during outline fold/unfold. (markdown-ts--outline-invisible-p): New helper testing whether a position is inside an outline-folded region. (markdown-ts--host-ranges-notifier): New function pruning stale code block overlays when the host parse tree changes. (markdown-ts--barf-if-not-mode): New helper signaling a user-error when the current buffer is not derived from markdown-ts-mode. (markdown-ts-code-block-in-context-mode): New minor mode enabled when point is within a fenced code block, activating markdown-ts-code-block-in-context-mode-map so eligible commands dispatch to the block's major mode. (markdown-ts--set-hide-markup): Clear image overlays when toggling markup visibility. (markdown-ts--set-inline-images) (markdown-ts-toggle-inline-images): New functions for toggling inline image display. (markdown-ts--parser-heading-max-level): New constant. (markdown-ts--heading-at-point, markdown-ts--heading-level) (markdown-ts--section-at-point): New heading navigation helpers. (markdown-ts-promote, markdown-ts-demote): New commands for heading and list item promotion/demotion with region support. (markdown-ts--promote-or-demote) (markdown-ts--promote-or-demote-region): New heading level adjustment functions. (markdown-ts-move-subtree-up, markdown-ts-move-subtree-down): New commands for moving sections and list items. (markdown-ts--section-folded-p) (markdown-ts--move-subtree-up-or-down): New subtree move with folding state preservation. (markdown-ts-toggle-checkbox): New command to toggle task list checkboxes. (markdown-ts--list-item-at-point): New helper with block quote marker handling. (markdown-ts--list-marker-width, markdown-ts--list-item-region) (markdown-ts--list-ordered-item-p): New list item helpers. (markdown-ts--list-promote-or-demote): New function with ordered list nesting guard. (markdown-ts--list-node-bol, markdown-ts--list-move): New list item movement functions. (markdown-ts-renumber-list): New command for sequential list renumbering with prefix argument support. (markdown-ts--list-item-new-marker) (markdown-ts--new-marker-for-line): New marker string generators for list item insertion. (markdown-ts--line-block-quote-depth): New helper counting block quote depth. (markdown-ts-newline): New RET command for context-aware newline. (markdown-ts-insert-list-item): New M-RET command that creates a new list item. (markdown-ts--fill-unfillable-block-query): New tree-sitter query for unfillable blocks. (markdown-ts--list-item-text-column): New helper for list item text alignment. (markdown-ts--fill-list-item): New function filling within list items without merging adjacent items. (markdown-ts--adaptive-fill): New adaptive fill function for list item continuation. (markdown-ts--fill-forward-paragraph): New paragraph motion respecting list items and unfillable blocks. (markdown-ts-fill-paragraph): New fill-paragraph-function with cond* dispatch for lists, block quotes, HTML comments, and unfillable blocks. (markdown-ts--fill-html-comment): New HTML comment filler with continuation alignment. (markdown-ts--block-quote-prefix): New helper preserving existing block quote marker style. (markdown-ts--fill-block-quote): New block quote filler with list item text column alignment. (markdown-ts-emphasis-alist): New alist of emphasis markers. (markdown-ts--emphasis-node-at-point): New tree-sitter based emphasis detection. (markdown-ts-remove-emphasis): New command removing emphasis at point or region. (markdown-ts-emphasize): New interactive emphasis insertion with region wrapping and word-at-point support. (markdown-ts-insert-structure): New command for inserting code blocks, block quotes, and dividers. (markdown-ts--insert-code-block): New function with language completion from known modes. (markdown-ts--insert-block-quote): New function with region wrapping. (markdown-ts--insert-divider): New function for horizontal rules. (markdown-ts--apply-ellipsis): New function applying custom ellipsis via display table. (markdown-ts--set-up): Rename from markdown-ts-setup. (markdown-ts-outline-cycle): New TAB command cycling outline visibility on headings. (markdown-ts-mode-map): New keymap for code block navigation, bindings for heading navigation, structure editing, emphasis, and list operations. (markdown-ts-code-block-in-context-mode-map): New keymap for code block context. (markdown-ts-mode-menu): New menu bar with Show/Hide, Navigate Headings, Edit Structure, and Editing sections. (markdown-ts-mode): Add outline-minor-mode, ellipsis, folding, fill-paragraph integration, code-block-context-mode hooks, comment settings, and outline-view-change-hook. Use markdown-ts-mode directly in auto-mode-alist instead of markdown-ts-mode-maybe. (markdown-ts-mode-install-parsers): New command for installing required and optional tree-sitter language grammars. (markdown-ts-code-block-context-mode): New minor mode for code block context. (markdown-ts--find-code-block-delimiter) (markdown-ts--find-next-code-block-delimiter): New helpers for locating fenced code block delimiter nodes. (markdown-ts-move-to-next-code-block) (markdown-ts-move-to-previous-code-block): New commands for navigating between fenced code blocks. (markdown-ts--table-abutting-pos, markdown-ts--table-node-cell) (markdown-ts--table-node-row, markdown-ts--table-parse-error-p): New pipe table node helpers. (markdown-ts-at-table-p): New predicate returning non-nil when point is at or within a pipe table. (markdown-ts--enable-in-table-mode): New helper enabling markdown-ts-in-table-mode from post-command-hook. (markdown-ts--table-body-row-near-pos): New helper locating the nearest body row to a position. (markdown-ts--table-compute-node-column) (markdown-ts-table--goto-column): New helpers for column-based table navigation. (markdown-ts--table-aligners, markdown-ts--table-make-aligner) (markdown-ts--table-align-cell): New table cell alignment helpers. (markdown-ts-table-insert-table): New command to insert a pipe table with configurable rows and columns. (markdown-ts-table-delete-table): New command to delete the pipe table at point. (markdown-ts-table-previous-row, markdown-ts-table-next-row) (markdown-ts-table-previous-cell, markdown-ts-table-next-cell): New commands for navigating table rows and cells. (markdown-ts-table-insert-row-below) (markdown-ts-table-insert-row-above) (markdown-ts-table-clone-row-below) (markdown-ts-table-clone-row-above) (markdown-ts-table-insert-row): New commands for inserting and cloning table rows. (markdown-ts-table-delete-row, markdown-ts-table-move-row-up) (markdown-ts-table-move-row-down, markdown-ts-table-move-row): New commands for deleting and moving table rows. (markdown-ts-table-insert-column-left) (markdown-ts-table-insert-column-right) (markdown-ts-table-clone-column-left) (markdown-ts-table-clone-column-right) (markdown-ts-table-insert-column): New commands for inserting and cloning table columns. (markdown-ts-table-delete-column) (markdown-ts-table-move-column-left) (markdown-ts-table-move-column-right) (markdown-ts-table-move-column): New commands for deleting and moving table columns. (markdown-ts-table-align-column-left) (markdown-ts-table-align-column-center) (markdown-ts-table-align-column-right) (markdown-ts-table-align-column): New commands for setting column alignment. (markdown-ts-table-align-table): New command to align all columns in the table at point. (markdown-ts-table-transpose-table): New command to transpose the table at point. (markdown-ts-table-convert-csv-region) (markdown-ts-table-convert-tsv-region) (markdown-ts-table-convert-region): New commands to convert delimited text regions to pipe tables. (markdown-ts-table-export-table-csv) (markdown-ts-table-export-table-tsv) (markdown-ts-table-export-table): New commands to export the pipe table at point to CSV or TSV format. (markdown-ts-in-table-mode-map): New keymap for markdown-ts-in-table-mode. (markdown-ts--code-block-in-context-mode-ov): New buffer-local variable for code block context overlay. (markdown-ts--code-block-in-context-mode-update-ov): New function updating the code block context overlay. (markdown-ts-in-table-mode): New minor mode enabled when point is within a pipe table, activating markdown-ts-in-table-mode-map. (markdown-ts--in-table-mode-ov) (markdown-ts--in-table-mode-get-ov) (markdown-ts--table-tick-update) (markdown-ts--table-tick-stale-p) (markdown-ts--in-table-mode-update-ov): New helpers supporting markdown-ts-in-table-mode overlay management. (markdown-ts-table-mode): New minor mode providing table editing commands and auto-alignment. (markdown-ts-mode-maybe): Remove; auto-mode-alist now uses markdown-ts-mode directly. Auto-mode-alist: Add .markdown and .mdx extensions. * lisp/textmodes/markdown-ts-mode-x.el: New file providing extra features for markdown-ts-mode. (markdown-ts-commonmark-spec-url, markdown-ts-gfm-spec-url): New constants for CommonMark and GFM specification URLs. (markdown-ts-browse-commonmark-spec) (markdown-ts-browse-gfm-spec): New commands to browse the CommonMark and GFM specifications. (markdown-ts-convert): New customization group for Markdown conversion/export features. (markdown-ts-default-converter): New option to set the default format and converter for Markdown export. (markdown-ts-convert-display-function): New option specifying the function used to display converted output. (markdown-ts-converters): New variable listing format/converter configurations for pandoc, cmark, cmark-gfm, markdown, and markdown.pl. (markdown-ts-convert-file, markdown-ts-convert): New commands to convert Markdown buffers or files to HTML, PDF, and other formats via external converters. (markdown-ts-toc): New customization group for table of contents features. (markdown-ts-toc-generate-warn-if-none): New option controlling behavior when no TOC is found during generation. (markdown-ts-toc-update-before-save-mode-lighter): New option for the before-save TOC update minor mode lighter string. (markdown-ts-toc-slug-function): New option to select the slug algorithm used for TOC heading anchors. (markdown-ts--toc-handles, markdown-ts--toc-handle-classes): New variables defining TOC handle types and classes. (markdown-ts--toc-expand-candidate-handles, markdown-ts--tocs) (markdown-ts--tocs-sanity-check) (markdown-ts--toc-collect-candidates) (markdown-ts--toc-list-item-depth) (markdown-ts--toc-atx_header-normalize) (markdown-ts--toc-text-normalizers) (markdown-ts--toc-text-normalize): New internal helpers for TOC parsing and text normalization. (markdown-ts-toc-update-before-save-mode): New minor mode that regenerates tables of contents before saving. (markdown-ts-toc-clear-and-remove, markdown-ts-toc-clear): New commands to remove or clear TOC bodies. (markdown-ts-toc-insert-template): New command to insert a TOC template at point. (markdown-ts-toc-generate): New command to generate tables of contents in the current buffer. Includes fixes for: (bug#80613) (bug#80625) (bug#80690) Co-authored-by: Stéphane Marks <shipmints@gmail.com>
2026-05-03Add for <picture> to 'html-tag-alist' and 'html-tag-help'Philip Kaludercic
* lisp/textmodes/sgml-mode.el (html-tag-alist): Add very basic skeleton. (html-tag-help): Add description.
2026-05-03Add for <details> to 'html-tag-alist' and 'html-tag-help'Philip Kaludercic
* lisp/textmodes/sgml-mode.el (html-tag-alist): Add skeleton. (html-tag-help): Add description.
2026-05-03Prevent indentation within whitespace sensitive HTML tagsPhilip Kaludercic
* lisp/textmodes/sgml-mode.el (sgml-whitespace-sensitive-tags): Add new variable. (sgml-calculate-indent): Check if in the context of a tag specified by 'sgml-whitespace-sensitive-tags'. (html-mode): Set 'sgml-whitespace-sensitive-tags' to not adjust the indentation within <pre> and <textarea> tags.
2026-05-03Use 'read-shell-command' to read SGML validation commandPhilip Kaludercic
* lisp/textmodes/sgml-mode.el (sgml-validate): Update interactive spec.
2026-05-03Raise an error if 'sgml-validate-command' is not configuredPhilip Kaludercic
* lisp/textmodes/sgml-mode.el (sgml-validate-command): If no known program is installed, fall back to nil as the default value instead of a warning message.
2026-05-03Implement 'sgml-name-8bit-mode' as a proper minor modePhilip Kaludercic
* lisp/textmodes/sgml-mode.el (sgml-name-8bit-mode): Merge 'defcustom' and 'defun' into a 'define-minor-mode'.
2026-05-03Refine SGML offset user option typesPhilip Kaludercic
* lisp/textmodes/sgml-mode.el (sgml-basic-offset) (sgml-attribute-offset): Allow natural numbers, not arbitrary integers.
2026-05-03Allow setting 'sgml-xml-mode' buffer locallyPhilip Kaludercic
* lisp/textmodes/sgml-mode.el (sgml-xml-mode): Add :safe property.
2026-05-03Allow changing SGML "quick keys" after loading sgml-mode.elPhilip Kaludercic
* lisp/textmodes/sgml-mode.el (sgml-quick-keys): Replace with user option, that adjusts 'sgml-mode-map'. (sgml-mode-map): Don't insert quick keys. (html-quick-keys): Replace with user option, that adjusts 'html-mode-map'. (html-mode-map): Don't insert quick keys.
2026-05-02Mark myself as maintainer of sgml-modePhilip Kaludercic
* admin/MAINTAINERS: Update my entry. * lisp/textmodes/sgml-mode.el: Update "Maintainer" header.
2026-05-02Don't break line when inserting <code> tagsPhilip Kaludercic
* lisp/textmodes/sgml-mode.el (html-tag-alist): Remove '\n' from the completion rules for "code" tag. (Bug#80771)
2026-04-22; (string-edit-minor-mode): Fix mode line lighter.Eshel Yaron
2026-04-02Filter out some range settings in markdown-ts-modeYuan Fu
* lisp/textmodes/markdown-ts-mode.el: (markdown-ts--add-config-for-mode): Filter out functional queries.
2026-04-02Assume wide chars may span any number of columns during semlf fillingRoi Martin
* lisp/textmodes/fill.el (fill-region-as-paragraph-semlf): Use `most-positive-fixnum' as the fill-column value during the unfill phase.
2026-03-28Better support for anonymous faces in Enriched Text modeEli Zaretskii
* lisp/textmodes/enriched.el (enriched-face-ans): Support :underline, :weight, and :slant in anonymous faces. Suggested by Madhu <enometh@meer.net>.
2026-03-27; * lisp/textmodes/css-mode.el: Update maintainer's email address.Eli Zaretskii
2026-03-27* lisp/textmodes/css-mode.el (css-pseudo-class-ids): Add 'has' (bug#80664).YugaEgo
2026-03-15Merge remote-tracking branch 'origin/scratch/error-API'Stefan Monnier
2026-03-14; Fix last changeEli Zaretskii
* lisp/textmodes/flyspell.el (flyspell-generic-progmode-verify): Fix capitalization and whitespace of last change.
2026-03-14Fix auto-correct previous word with 'flyspell-prog-mode'Timon Reinold
* lisp/textmodes/flyspell.el (flyspell-generic-progmode-verify): Take into account the word 'flyspell-auto-correct-previous-word' moved to (i.e., the word starting at point, not the character before point), when checking whether it should be checked/corrected by flyspell-prog-mode. (Bug#80289) Copyright-paperwork-exempt: yes
2026-03-10Use single-arg form of `signal` to re-throw an errorStefan Monnier
* lisp/vc/smerge-mode.el (smerge-extend): * lisp/vc/diff-mode.el (diff-beginning-of-file-and-junk): * lisp/transient.el (transient--with-emergency-exit): * lisp/textmodes/tex-mode.el (latex-forward-sexp): * lisp/tar-mode.el (tar-mode): * lisp/savehist.el (savehist--reload): * lisp/progmodes/octave.el (inferior-octave-resync-dirs): * lisp/progmodes/js.el (js--re-search-forward): * lisp/plstore.el (plstore--decrypt): * lisp/net/dbus.el (dbus-ignore-errors, dbus-register-signal) (dbus-handle-event): * lisp/mouse.el (mouse-drag-track, mouse-drag-region-rectangle): * lisp/minibuffer.el (completion-pcm--find-all-completions): * lisp/mail/rfc2231.el (rfc2231-parse-string): * lisp/mail/rfc2047.el (rfc2047-encode-region): * lisp/jit-lock.el (jit-lock-fontify-now): * lisp/international/ja-dic-utl.el (skkdic-lookup-key): * lisp/gnus/nnselect.el (nnselect-generate-artlist): * lisp/gnus/mml-sec.el (mml-secure-epg-encrypt, mml-secure-epg-sign): * lisp/gnus/mail-source.el (mail-source-fetch-pop) (mail-source-check-pop): * lisp/gnus/gnus-art.el (gnus-article-read-summary-keys): * lisp/files.el (basic-save-buffer-2, files--ensure-directory) (files--force, copy-directory): * lisp/eshell/esh-io.el (eshell-output-object-to-target): * lisp/epa.el (epa-decrypt-file, epa-verify-file, epa-sign-file) (epa-encrypt-file, epa-decrypt-region, epa-verify-region) (epa-sign-region, epa-encrypt-region, epa-delete-keys) (epa-export-keys, epa-insert-keys): * lisp/emacs-lisp/package.el (package--unless-error): * lisp/emacs-lisp/multisession.el (multisession--read-file-value): * lisp/emacs-lisp/lisp.el (up-list-default-function): * lisp/desktop.el (desktop-kill): * lisp/calendar/time-date.el (date-to-time): * lisp/calendar/appt.el (appt-display-message): * lisp/calc/calc.el (calc-do): * lisp/bookmark.el (bookmark-handle-bookmark): * src/fileio.c (report_file_errno): * lisp/vc/vc.el (vc-checkout, vc-pull): Use `(signal err)` instead of `(signal (car err) (cdr err))`.
2026-03-10unfill-paragraph: Use most-positive-fixnumSean Whitton
* lisp/textmodes/fill.el (unfill-paragraph): Use most-positive-fixnum.
2026-03-09Fix 'emacs-news-find-heading'Eli Zaretskii
* lisp/textmodes/emacs-news-mode.el (emacs-news-find-heading): HEADING must be a complete line, otherwise we have false positives and false negatives. (Bug#80569)
2026-03-08; Fix documentation of 'emacs-news-mode' commandsEli Zaretskii
* lisp/textmodes/emacs-news-mode.el (emacs-news-next-untagged-entry) (emacs-news-previous-untagged-entry, emacs-news-cycle-tag) (emacs-news-count-untagged-entries, emacs-news-goto-section) (emacs-news-find-heading, emacs-news-open-line) (emacs-news-delete-temporary-markers): Doc fixes. (Bug#80569)
2026-03-08* lisp/textmodes/fill.el (unfill-paragraph): Fix for wide chars.Sean Whitton
2026-03-05unfill-paragraph: Reimplement in terms of fill-regionSean Whitton
* lisp/textmodes/fill.el (unfill-paragraph): Reimplement in terms of fill-region.
2026-03-05; Move unfill-paragraph to fill.el. Document it in (elisp)Filling.Sean Whitton