From: Fabián Ezequiel Gallina Date: Thu, 17 May 2012 03:02:54 +0000 (-0300) Subject: Fixed indentation inside parens when comments are around X-Git-Tag: emacs-24.2.90~1199^2~626 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=13d1a42edb24bec24ff85f85f3fce686cd476e72;p=emacs.git Fixed indentation inside parens when comments are around --- 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)))