[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-29 3cae0e3d96a: python-ts-mode: Fix single-quote string fontificat
From: |
Dmitry Gutov |
Subject: |
emacs-29 3cae0e3d96a: python-ts-mode: Fix single-quote string fontification |
Date: |
Sat, 25 Feb 2023 20:12:46 -0500 (EST) |
branch: emacs-29
commit 3cae0e3d96a5436735ab34327fc5c20e0cc864ee
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>
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).
---
lisp/progmodes/python.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- emacs-29 3cae0e3d96a: python-ts-mode: Fix single-quote string fontification,
Dmitry Gutov <=