Indentation enhancements on after-backslash
Multiline sentences beginning with "import", "from" or "return" are indented correctly now.
This commit is contained in:
parent
f8994527d4
commit
9787f82961
1 changed files with 7 additions and 6 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue