diff options
| author | Fabián Ezequiel Gallina <fgallina@cuca> | 2012-05-17 00:02:54 -0300 |
|---|---|---|
| committer | Fabián Ezequiel Gallina <fgallina@gnu.org> | 2012-05-17 00:02:54 -0300 |
| commit | 13d1a42edb24bec24ff85f85f3fce686cd476e72 (patch) | |
| tree | ad3fbe5aea2634d410efc3180517532ed4264b86 /lisp/progmodes/python.el | |
| parent | bbac1eb8aba7459dc90e1f8bb21e603d16779077 (diff) | |
Fixed indentation inside parens when comments are around
Diffstat (limited to 'lisp/progmodes/python.el')
| -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." (save-excursion (goto-char context-start) (forward-char) - (if (looking-at "[[:space:]]*$") + (save-restriction + (narrow-to-region + (line-beginning-position) + (line-end-position)) + (forward-comment 1)) + (if (looking-at "$") (+ (current-indentation) python-indent-offset) (forward-comment 1) (current-column))) |
