From 3de7f0ce5e5fca16045b3f96ceab607d66782d4d Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 22 May 2026 19:12:12 +0300 Subject: [PATCH] Fix warning message in 'markdown-ts-mode--initialize' * lisp/textmodes/markdown-ts-mode.el (markdown-ts-mode--initialize): Tweak the warning message when Tree-sitter is not available. (Bug#81100) --- lisp/textmodes/markdown-ts-mode.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/textmodes/markdown-ts-mode.el b/lisp/textmodes/markdown-ts-mode.el index 7f87ff5d0bc..be2247b870e 100644 --- a/lisp/textmodes/markdown-ts-mode.el +++ b/lisp/textmodes/markdown-ts-mode.el @@ -5402,9 +5402,12 @@ With a prefix argument, ARG, if needed, install parsers for `html', (markdown-ts--set-up)) (t (warn "markdown-ts-mode cannot be set up; using fundamental-mode. -The tree-sitter parsers `markdown' and `markdown-inline' were not found. +%s." + (if (treesit-available-p) + "The tree-sitter parsers `markdown' and `markdown-inline' were not found. Use the command `markdown-ts-mode-install-parsers' to install them. -With a prefix argument, it can also install optional parsers.") +With a prefix argument, it can also install optional parsers" + "Emacs was built without Tree-sitter support, or could not load Tree-sitter")) (fundamental-mode))))) ;;;###autoload