From: Yuan Fu Date: Sun, 27 Aug 2023 21:49:56 +0000 (-0700) Subject: Escape percent character in treesit--inspect-name (bug#65540) X-Git-Tag: emacs-29.1.90~167 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=458442fe78c;p=emacs.git Escape percent character in treesit--inspect-name (bug#65540) * lisp/treesit.el (treesit-inspect-node-at-point): Escape percent. --- diff --git a/lisp/treesit.el b/lisp/treesit.el index 04d460fdea4..41ebc62fca6 100644 --- a/lisp/treesit.el +++ b/lisp/treesit.el @@ -2459,7 +2459,8 @@ in `treesit-parser-list'." 'bold nil)) name (if (treesit-node-check node 'named) ")" "\"")))) - (setq treesit--inspect-name name) + ;; Escape the percent character for mode-line. (Bug#65540) + (setq treesit--inspect-name (string-replace "%" "%%" name)) (force-mode-line-update) (when arg (if node-list