]> git.eshelyaron.com Git - emacs.git/commitdiff
Fixed indentation inside parens when comments are around
authorFabián Ezequiel Gallina <fgallina@cuca>
Thu, 17 May 2012 03:02:54 +0000 (00:02 -0300)
committerFabián Ezequiel Gallina <fgallina@gnu.org>
Thu, 17 May 2012 03:02:54 +0000 (00:02 -0300)
lisp/progmodes/python.el

index e4019373362fdb2a902fa3003a817511d622f197..3cdfb43e35fa95e1b162a59af69302281cb638f9 100644 (file)
@@ -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)))