summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>1997-11-26 20:58:48 +0000
committerBarry Warsaw <barry@python.org>1997-11-26 20:58:48 +0000
commite9307b16e0b6cdeab0dc61616d301a02a8be1dbc (patch)
tree5192fa07ce91551c67926883e664a47439219a31
parent1a372272883aa5fe7b60f65cc83b50969bbc380e (diff)
downloadcpython-e9307b16e0b6cdeab0dc61616d301a02a8be1dbc.tar.gz
(py-compute-indentation): Check for multiline stringness and
commentness so that hitting TAB in the middle of a comment will still indent the line.
-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 688bb82068..0cd3dd5736 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