mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-05 03:20:39 -08:00
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.
|
||
|---|---|---|
| .. | ||
| cperl-mode-resources | ||
| flymake-resources | ||
| js-resources | ||
| ruby-mode-resources | ||
| xref-resources | ||
| asm-mode-tests.el | ||
| autoconf-tests.el | ||
| bat-mode-tests.el | ||
| cc-mode-tests.el | ||
| compile-tests.el | ||
| cperl-mode-tests.el | ||
| elisp-mode-tests.el | ||
| etags-tests.el | ||
| executable-tests.el | ||
| f90-tests.el | ||
| flymake-tests.el | ||
| gdb-mi-tests.el | ||
| glasses-tests.el | ||
| grep-tests.el | ||
| js-tests.el | ||
| octave-tests.el | ||
| opascal-tests.el | ||
| pascal-tests.el | ||
| perl-mode-tests.el | ||
| project-tests.el | ||
| ps-mode-tests.el | ||
| python-tests.el | ||
| ruby-mode-tests.el | ||
| scheme-tests.el | ||
| sh-script-tests.el | ||
| sql-tests.el | ||
| subword-tests.el | ||
| tcl-tests.el | ||
| xref-tests.el | ||