diff options
author | Guido van Rossum <guido@python.org> | 1995-03-09 14:45:40 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1995-03-09 14:45:40 (GMT) |
commit | 1b761a6ef99e842997daef55a1379ba3751fa7e6 (patch) | |
tree | 62f03eda64d64084822d614090557fde64336f90 /Misc/python-mode-old.el | |
parent | 04cba5bcec193add89d7b0f49a585529ec9ce92a (diff) | |
download | cpython-1b761a6ef99e842997daef55a1379ba3751fa7e6.zip cpython-1b761a6ef99e842997daef55a1379ba3751fa7e6.tar.gz cpython-1b761a6ef99e842997daef55a1379ba3751fa7e6.tar.bz2 |
cope with triple-quoted strings (says Barry)
Diffstat (limited to 'Misc/python-mode-old.el')
-rw-r--r-- | Misc/python-mode-old.el | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Misc/python-mode-old.el b/Misc/python-mode-old.el index de5a8cb..76b391c 100644 --- a/Misc/python-mode-old.el +++ b/Misc/python-mode-old.el @@ -596,6 +596,13 @@ the new line indented." ;; happens to be a continuation line too (re-search-backward "^[ \t]*\\([^ \t\n#]\\|#[ \t\n]\\)" nil 'move) + ;; if we landed inside a string, go to the beginning of that string + (let ((state (parse-partial-sexp + (save-excursion (beginning-of-python-def-or-class) + (point)) + (point)))) + (if (nth 3 state) + (goto-char (nth 2 state)))) (py-goto-initial-line) (if (py-statement-opens-block-p) (+ (current-indentation) py-indent-offset) |