Indentation enhancements on after-backslash

Multiline sentences beginning with "import", "from" or "return" are
indented correctly now.
This commit is contained in:
Fabián Ezequiel Gallina 2012-05-17 00:03:18 -03:00 committed by Fabián Ezequiel Gallina
parent f8994527d4
commit 9787f82961

View file

@ -681,14 +681,15 @@ START is the buffer position where the sexp starts."
(current-column)) (current-column))
(t (t
(goto-char context-start) (goto-char context-start)
(if (not (member (if (not
(save-excursion (save-excursion
(back-to-indentation) (back-to-indentation)
(message (current-word))) (looking-at
'("return" "import" "from"))) "\\(?:return\\|from\\|import\\)\s+")))
(current-indentation) (current-indentation)
(+ (current-indentation) (+ (current-indentation)
python-indent-offset)))))) (length
(match-string-no-properties 0))))))))
indentation)) indentation))
('inside-paren ('inside-paren
(or (save-excursion (or (save-excursion