Barry Warsaw  committed de2f8f4

(py-compute-indentation): Check for multiline stringness and
commentness so that hitting TAB in the middle of a comment will still
indent the line.

  • Participants
  • Parent commits e45b837
  • Branches legacy-trunk

Comments (0)

Files changed (1)

File Misc/python-mode.el

   ;; break, continue, and pass force one level of outdenting.
     (let* ((bod (py-point 'bod))
-	   (pps (parse-partial-sexp bod (point))))
+	   (pps (parse-partial-sexp bod (point)))
+	   (boipps (parse-partial-sexp bod (py-point 'boi))))
        ;; are we inside a multi-line string or comment?
-       ((or (and (nth 3 pps)
-		 (nth 3 (parse-partial-sexp bod (py-point 'boi))))
-	    (nth 4 pps))
+       ((or (and (nth 3 pps) (nth 3 boipps))
+	    (and (nth 4 pps) (nth 4 boipps)))
 	  (if (not py-align-multiline-strings-p) 0
 	    ;; skip back over blank & non-indenting comment lines