diff options
| author | Fabián Ezequiel Gallina | 2012-05-17 00:03:18 -0300 |
|---|---|---|
| committer | Fabián Ezequiel Gallina | 2012-05-17 00:03:18 -0300 |
| commit | 9787f82961e029a8a096aa2a4a327eebb974b13c (patch) | |
| tree | f2786d75542f14bc4f548de47d8661e26df46fa3 /lisp/progmodes/python.el | |
| parent | f8994527d4968182a2d111be6c5e5d4a93fc5eb3 (diff) | |
| download | emacs-9787f82961e029a8a096aa2a4a327eebb974b13c.tar.gz emacs-9787f82961e029a8a096aa2a4a327eebb974b13c.zip | |
Indentation enhancements on after-backslash
Multiline sentences beginning with "import", "from" or "return" are
indented correctly now.
Diffstat (limited to 'lisp/progmodes/python.el')
| -rw-r--r-- | lisp/progmodes/python.el | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 4589a828ebe..20176944ebc 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -681,14 +681,15 @@ START is the buffer position where the sexp starts." | |||
| 681 | (current-column)) | 681 | (current-column)) |
| 682 | (t | 682 | (t |
| 683 | (goto-char context-start) | 683 | (goto-char context-start) |
| 684 | (if (not (member | 684 | (if (not |
| 685 | (save-excursion | 685 | (save-excursion |
| 686 | (back-to-indentation) | 686 | (back-to-indentation) |
| 687 | (message (current-word))) | 687 | (looking-at |
| 688 | '("return" "import" "from"))) | 688 | "\\(?:return\\|from\\|import\\)\s+"))) |
| 689 | (current-indentation) | 689 | (current-indentation) |
| 690 | (+ (current-indentation) | 690 | (+ (current-indentation) |
| 691 | python-indent-offset)))))) | 691 | (length |
| 692 | (match-string-no-properties 0)))))))) | ||
| 692 | indentation)) | 693 | indentation)) |
| 693 | ('inside-paren | 694 | ('inside-paren |
| 694 | (or (save-excursion | 695 | (or (save-excursion |