]> code.delx.au - gnu-emacs/commitdiff
Fixed indentation case for after beginning of block
authorFabián Ezequiel Gallina <fgallina@cuca>
Thu, 17 May 2012 03:03:25 +0000 (00:03 -0300)
committerFabián Ezequiel Gallina <fgallina@gnu.org>
Thu, 17 May 2012 03:03:25 +0000 (00:03 -0300)
lisp/progmodes/python.el

index fbd6fdd4005d8e8fd39f555946a12063c972af9a..e6faf73547e326d77486f861e6afcb05e0f531d7 100644 (file)
@@ -584,6 +584,7 @@ START is the buffer position where the sexp starts."
                            (while (and (forward-line -1)
                                        (python-info-continuation-line-p)
                                        (not (bobp))))
+                           (back-to-indentation)
                            (when (not (looking-at block-regexp))
                              (forward-line 1)))
                          (back-to-indentation)
@@ -591,7 +592,9 @@ START is the buffer position where the sexp starts."
                                     (or (re-search-forward
                                          block-start-line-end
                                          (line-end-position) t)
-                                        (python-info-continuation-line-p)))
+                                        (save-excursion
+                                          (goto-char (line-end-position))
+                                          (python-info-continuation-line-p))))
                            (point-marker)))))
          'after-beginning-of-block)
         ;; After normal line