summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/subr-x.el
diff options
context:
space:
mode:
authorJoão Távora <joaotavora@gmail.com>2021-09-19 11:42:20 +0100
committerJoão Távora <joaotavora@gmail.com>2021-09-21 10:56:27 +0100
commit0646c6817139aa905a2f6079fdc82eb4be944de0 (patch)
tree99744a6d07ea4486b2abd0911c9aa3c22de96747 /lisp/emacs-lisp/subr-x.el
parent9ad962e118a17daf073ef5308233f9301755035d (diff)
downloademacs-0646c6817139aa905a2f6079fdc82eb4be944de0.tar.gz
emacs-0646c6817139aa905a2f6079fdc82eb4be944de0.tar.bz2
emacs-0646c6817139aa905a2f6079fdc82eb4be944de0.zip
Make syntax-ppss more accurate for Python triple quotes (bug#49518)
By putting delimiter syntax on the last character of Python triple-quoted strings, this makes syntax-ppss be more accurate. Previously: emacs -Q something.py type two single quotes M-: (nth 3 (syntax-ppss)) notice how the return value says you're outside a string, correctly type another quote M-: (nth 3 (syntax-ppss)) notice how the return value says you're inside a string, correctly backspace the quote just entered M-: (nth 3 (syntax-ppss)) notice how the return value says you're inside a string, incorrectly With this patch the last step is corrected. This helps things like electric-pair-mode. Also, the test python-syntax-after-python-backspace now passes, again. * lisp/progmodes/python.el (python-syntax-stringify): Put delimiter syntax in "inner" of the surrouding triple quotes. * test/lisp/progmodes/python-tests.el (python-syntax-after-python-backspace): Passes again.
Diffstat (limited to 'lisp/emacs-lisp/subr-x.el')
0 files changed, 0 insertions, 0 deletions