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: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~15^2~410 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=458442fe78c4223cc87d44d862f1912a1bd66e37;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