diff options
| author | Fabián Ezequiel Gallina | 2012-05-17 00:02:54 -0300 |
|---|---|---|
| committer | Fabián Ezequiel Gallina | 2012-05-17 00:02:54 -0300 |
| commit | 13d1a42edb24bec24ff85f85f3fce686cd476e72 (patch) | |
| tree | ad3fbe5aea2634d410efc3180517532ed4264b86 /lisp | |
| parent | bbac1eb8aba7459dc90e1f8bb21e603d16779077 (diff) | |
| download | emacs-13d1a42edb24bec24ff85f85f3fce686cd476e72.tar.gz emacs-13d1a42edb24bec24ff85f85f3fce686cd476e72.zip | |
Fixed indentation inside parens when comments are around
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/progmodes/python.el | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index e4019373362..3cdfb43e35f 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -568,7 +568,12 @@ START is the buffer position where the sexp starts." | |||
| 568 | (save-excursion | 568 | (save-excursion |
| 569 | (goto-char context-start) | 569 | (goto-char context-start) |
| 570 | (forward-char) | 570 | (forward-char) |
| 571 | (if (looking-at "[[:space:]]*$") | 571 | (save-restriction |
| 572 | (narrow-to-region | ||
| 573 | (line-beginning-position) | ||
| 574 | (line-end-position)) | ||
| 575 | (forward-comment 1)) | ||
| 576 | (if (looking-at "$") | ||
| 572 | (+ (current-indentation) python-indent-offset) | 577 | (+ (current-indentation) python-indent-offset) |
| 573 | (forward-comment 1) | 578 | (forward-comment 1) |
| 574 | (current-column))) | 579 | (current-column))) |