summaryrefslogtreecommitdiffstats
path: root/Misc/python-mode.el
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>1997-11-26 20:58:48 (GMT)
committerBarry Warsaw <barry@python.org>1997-11-26 20:58:48 (GMT)
commit3b3ff4e96e71a58515a5ebac04e05e1221149cfb (patch)
treebc043b9f729680b57f7d872904f4252168df2b93 /Misc/python-mode.el
parent8c4a8de75ea3d5e82fb7919f6088aca623b2f29f (diff)
downloadcpython-3b3ff4e96e71a58515a5ebac04e05e1221149cfb.zip
cpython-3b3ff4e96e71a58515a5ebac04e05e1221149cfb.tar.gz
cpython-3b3ff4e96e71a58515a5ebac04e05e1221149cfb.tar.bz2
(py-compute-indentation): Check for multiline stringness and
commentness so that hitting TAB in the middle of a comment will still indent the line.
Diffstat (limited to 'Misc/python-mode.el')
-rw-r--r--Misc/python-mode.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/Misc/python-mode.el b/Misc/python-mode.el
index 688bb82..0cd3dd5 100644
--- a/Misc/python-mode.el
+++ b/Misc/python-mode.el
@@ -1363,13 +1363,13 @@ the new line indented."
;; 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