]> granicus.if.org Git - python/commitdiff
(py-goto-statement-below): Watch out for landing in a triple quoted
authorBarry Warsaw <barry@python.org>
Thu, 23 May 2002 19:42:16 +0000 (19:42 +0000)
committerBarry Warsaw <barry@python.org>
Thu, 23 May 2002 19:42:16 +0000 (19:42 +0000)
string with text in column zero.  Skip that stuff when looking for the
"first statement following the statement containing point".

Misc/python-mode.el

index ec997c26dea5d5f2b8e579a73d5d1138c342a309..e327ad913b7505bf4e12f6534abf6263e9634d8b 100644 (file)
@@ -2604,8 +2604,8 @@ moves to the end of the block (& does not set mark or display a msg)."
       (while (and
              (setq last-pos (point))   ; always true -- side effect
              (py-goto-statement-below)
-             (> (current-indentation) initial-indent))
-       nil))
+             (> (current-indentation) initial-indent)
+             )))
 
      ;; else plain code line; stop at next blank line, or stmt or
      ;; indenting comment line indented <
@@ -3341,7 +3341,8 @@ does not include blank lines, comments, or continuation lines."
   (let ((start (point)))
     (py-goto-beyond-final-line)
     (while (and
-           (looking-at py-blank-or-comment-re)
+           (or (looking-at py-blank-or-comment-re)
+               (py-in-literal))
            (not (eobp)))
       (forward-line 1))
     (if (eobp)