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))
|
||||
(t
|
||||
(goto-char context-start)
|
||||
(if (not (member
|
||||
(save-excursion
|
||||
(back-to-indentation)
|
||||
(message (current-word)))
|
||||
'("return" "import" "from")))
|
||||
(if (not
|
||||
(save-excursion
|
||||
(back-to-indentation)
|
||||
(looking-at
|
||||
"\\(?:return\\|from\\|import\\)\s+")))
|
||||
(current-indentation)
|
||||
(+ (current-indentation)
|
||||
python-indent-offset))))))
|
||||
(length
|
||||
(match-string-no-properties 0))))))))
|
||||
indentation))
|
||||
('inside-paren
|
||||
(or (save-excursion
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue