From: Dmitry Gutov Date: Sun, 26 Feb 2023 01:09:29 +0000 (+0200) Subject: python-ts-mode: Fix single-quote string fontification X-Git-Tag: emacs-29.0.90~318 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3cae0e3d96a5436735ab34327fc5c20e0cc864ee;p=emacs.git python-ts-mode: Fix single-quote string fontification * lisp/progmodes/python.el (python--treesit-fontify-string): Look for ', not just ", as opening delimiter (bug#61796). --- diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 8220e3086fd..5aab31c3ea8 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -1070,7 +1070,7 @@ fontified." ;; Don't highlight string prefixes like f/r/b. (save-excursion (goto-char string-beg) - (when (search-forward "\"" string-end t) + (when (re-search-forward "[\"']" string-end t) (setq string-beg (match-beginning 0)))) (treesit-fontify-with-override string-beg string-end face override start end)))