]> code.delx.au - gnu-emacs/commitdiff
Fixed cornercase for normal lines when indentation was triggered in the middle of...
authorFabián Ezequiel Gallina <fgallina@cuca>
Thu, 17 May 2012 03:03:22 +0000 (00:03 -0300)
committerFabián Ezequiel Gallina <fgallina@gnu.org>
Thu, 17 May 2012 03:03:22 +0000 (00:03 -0300)
lisp/progmodes/python.el

index cdf8419f288d2c235c7b1832664b56c44805b896..03524812a2de60642b8b58a1ed53bd67ddc79824 100644 (file)
@@ -572,7 +572,7 @@ START is the buffer position where the sexp starts."
                        (let ((block-regexp (python-rx block-start))
                              (block-start-line-end ":[[:space:]]*$"))
                          (back-to-indentation)
-                         (while (and (forward-comment -9999) (not (bobp))))
+                         (forward-comment -9999)
                          (back-to-indentation)
                          (when (or (python-info-continuation-line-p)
                                    (and (not (looking-at block-regexp))
@@ -595,7 +595,8 @@ START is the buffer position where the sexp starts."
          'after-beginning-of-block)
         ;; After normal line
         ((setq start (save-excursion
-                       (while (and (forward-comment -9999) (not (bobp))))
+                       (back-to-indentation)
+                       (forward-comment -9999)
                        (python-nav-sentence-start)
                        (point-marker)))
          'after-line)