f89ff62367 Extend Tramp external operations
4dea6ea36b markdown-ts-mode: fix duplicated menu entries (bug#81201)
9cad2da66e ; Fix last change.
cd84bd6a0c vc-dir-recompute-file-state: Change directory to DEF-DIR
47bdbc8d85 Restore "interactive" when describing functions
1a5d9a4be3 Inhibit follow-link via `mouse-1' on the tab-bar (bug#81036)
c94d58ddbf Fix the tab close button appearance when clicking (bug#76...
a21614d4d6 ; Skip one vc-dir test on MS-Windows
abddd2075a ; Fix last change to vc-dir-recompute-file-state.
89bda8736a Install images with info documentation (bug#81204)
466789b511 vc-dir-recompute-file-state: Return nil state for nonexis...
71ea4bbb6c vc-test-vc-dir-on-symlink: Use vc-test--with-author-identity
b8fa2243ea Fix M-RET in 'markdown-ts-in-table-mode-map'
c244314974 Fix recurrence of bug#80803 after changes in bug#80967
* lisp/textmodes/markdown-ts-mode.el
(markdown-ts--fontify-unordered-list-marker): Skip leading
whitespace in the node range before applying the display bullet,
since the tree-sitter grammar bundles indent into the first
list_marker_* node.
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
* 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.
4f13f52a3a * build-aux/git-hooks/commit-msg: Replace Markdown-style ...
dd42133315 vc-test--rename-file: Disable part of test for SCCS
eb653865c3 markdown-ts-mode: Don't enable unconditionally by default
# Conflicts:
# etc/NEWS
* 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.
7a17f97baa Prettify special glyphs
f13287fde0 Revert "sh-script: Mark + and * as punctuation rather tha...
70b79b3ed8 Rename `icalendar-recur' type and related functions
3d2bb233f2 ; Minor Tramp changes
f6281d757d ; * etc/NEWS: Tell how to disable 'markdown-ts-mode'.
142b1e0d4c Fix Lisp injection via X-Draft-From in Gnus
d6f7b2d99b Save/restore old_buffer slot via window configurations (B...
e0fbecaf65 Adapt ert-remote-temporary-file-directory settings
3de7f0ce5e Fix warning message in 'markdown-ts-mode--initialize'
7df8604ea6 ; Improve documentation of lazy-highlight in search and r...
2936b36164 Fix "assertion 'GTK_IS_WINDOW (window)' failed"
98348a0bdc [Xt] Fix child frame resizing glitch
13b29eebc1 Eglot: use standard face for completion annotations (bug#...
# Conflicts:
# etc/NEWS
* 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.
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.
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.
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'.
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.
* 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.
* 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.
* 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.
* 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)
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>
* 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.
* 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.
* 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.