From 3bc7234349185da21828e5a2a1e31a16dcf93ba8 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 21 Sep 2021 11:39:24 -0400 Subject: [PATCH] * python.el (python-syntax-stringify): Extend comment about last change --- lisp/progmodes/python.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 7818ab1ab05..c58ac6f637d 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -777,6 +777,13 @@ is used to limit the scan." ((null string-start) ;; This set of quotes delimit the start of a string. Put ;; string fence syntax on last quote. (bug#49518) + ;; FIXME: This makes sexp-movement a bit suboptimal since """a""" + ;; is now treated as 3 strings. + ;; We could probably have our cake and eat it too by + ;; putting the string fence on the first quote and then + ;; convincing `syntax-ppss-flush-cache' to flush to before + ;; that fence when any char of the 3-char delimiter + ;; is modified. (put-text-property (1- quote-ending-pos) quote-ending-pos 'syntax-table (string-to-syntax "|"))) (t -- 2.39.5