aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/python.el
diff options
context:
space:
mode:
authorNoam Postavsky2018-06-02 16:22:17 -0400
committerNoam Postavsky2018-06-16 18:34:19 -0400
commit05345babc988060cca540770599282102c34f2a7 (patch)
treee9bef969663372264d34621e03106db997118916 /lisp/progmodes/python.el
parent92b609c572c127b6c6616413549809ff20ee30c1 (diff)
downloademacs-05345babc988060cca540770599282102c34f2a7.tar.gz
emacs-05345babc988060cca540770599282102c34f2a7.zip
Fix off by one error in python-mode assertion (Bug#30964)
* lisp/progmodes/python.el (python-nav-end-of-statement): Don't assert that string-start is strictly greater than last-string-end, because the string end is a position outside of the string and may therefore be the same as the following string's start. * test/lisp/progmodes/python-tests.el (python-nav-end-of-statement-2): New test.
Diffstat (limited to 'lisp/progmodes/python.el')
-rw-r--r--lisp/progmodes/python.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 6f4a343310c..e39ff08739b 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -1518,7 +1518,7 @@ of the statement."
1518 ;; are somehow out of whack. This has been 1518 ;; are somehow out of whack. This has been
1519 ;; observed when using `syntax-ppss' during 1519 ;; observed when using `syntax-ppss' during
1520 ;; narrowing. 1520 ;; narrowing.
1521 (cl-assert (> string-start last-string-end) 1521 (cl-assert (>= string-start last-string-end)
1522 :show-args 1522 :show-args
1523 "\ 1523 "\
1524Overlapping strings detected (start=%d, last-end=%d)") 1524Overlapping strings detected (start=%d, last-end=%d)")