[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master 4b39b74: python.el: don't syntax-propertize single/double quo
Re: master 4b39b74: python.el: don't syntax-propertize single/double quoted strings
Wed, 10 Apr 2019 12:23:34 -0400
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
> But that test was added to prevent regression of an actual bug, right?
> Did your commit reintroduce the bug? If so, disabling the test doesn't sound
Here was my answer in the actual commit,
diff --git a/test/lisp/progmodes/python-tests.el
index 94c846ecb1..999cf8dc7a 100644
@@ -5345,13 +5345,23 @@ python-tests-shell-interpreter
(ert-deftest python-tests--python-nav-end-of-statement--infloop ()
"Checks that `python-nav-end-of-statement' doesn't infloop in a
buffer with overlapping strings."
+ ;; FIXME: The treatment of strings has changed in the mean time, and the
+ ;; test below now neither signals an error nor inf-loops.
+ ;; The description of the problem it's trying to catch is not clear enough
+ ;; to be able to see if the underlying problem is really fixed, sadly.
+ ;; E.g. I don't know what is meant by "overlap", really.
+ (skip-unless nil)
(python-tests-with-temp-buffer "''' '\n''' ' '\n"
;; Create a situation where strings nominally overlap. This
;; shouldn't happen in practice, but apparently it can happen when
;; a package calls `syntax-ppss' in a narrowed buffer during JIT
+ ;; FIXME: 4-5 is the SPC right after the opening triple quotes: why
+ ;; put a string-fence syntax on it?
(put-text-property 4 5 'syntax-table (string-to-syntax "|"))
+ ;; FIXME: 8-9 is the middle quote in the closing triple quotes:
+ ;; it shouldn't have any syntax-table property to remove anyway!
(remove-text-properties 8 9 '(syntax-table nil))
(setq-local syntax-propertize-function nil)