Mercurial > cpython-lru_cache-weakref
diff Misc/python-mode.el @ 6678:de2f8f494ae3 legacy-trunk
(py-compute-indentation): Check for multiline stringness and
commentness so that hitting TAB in the middle of a comment will still
indent the line.
| author | Barry Warsaw <barry@python.org> |
|---|---|
| date | Wed, 26 Nov 1997 20:58:48 +0000 |
| parents | e45b83708d9e |
| children | f95c9ae2aaef |
line wrap: on
line diff
--- a/Misc/python-mode.el Wed Nov 26 20:30:33 1997 +0000 +++ b/Misc/python-mode.el Wed Nov 26 20:58:48 1997 +0000 @@ -1363,13 +1363,13 @@ ;; break, continue, and pass force one level of outdenting. (save-excursion (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)))) (beginning-of-line) (cond ;; 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))) (save-excursion (if (not py-align-multiline-strings-p) 0 ;; skip back over blank & non-indenting comment lines
