From: Guido van Rossum Date: Thu, 9 Mar 1995 14:45:40 +0000 (+0000) Subject: cope with triple-quoted strings (says Barry) X-Git-Tag: v1.2b4~83 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1b761a6ef99e842997daef55a1379ba3751fa7e6;p=thirdparty%2FPython%2Fcpython.git cope with triple-quoted strings (says Barry) --- diff --git a/Misc/python-mode-old.el b/Misc/python-mode-old.el index de5a8cb8b579..76b391c5980b 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)