]> git.eshelyaron.com Git - emacs.git/commitdiff
Fixed infinite while loop in python-info-current-defun
authorFabián Ezequiel Gallina <fgallina@cuca>
Thu, 17 May 2012 03:02:55 +0000 (00:02 -0300)
committerFabián Ezequiel Gallina <fgallina@gnu.org>
Thu, 17 May 2012 03:02:55 +0000 (00:02 -0300)
Was caused when a beginning of defun was in the beginning of buffer
because python-beginning-of-innermost-defun never reached the real
start when (bobp)

lisp/progmodes/python.el

index 9f14bef5258110dd2a20865018576fb7e43bcfeb..250f4812a33d17904de07ecfac5ada0b13796cc9 100644 (file)
@@ -786,7 +786,8 @@ innermost definition."
                       (forward-line -1)
                       (not (bobp))
                       (not (back-to-indentation))))
-          (forward-line 1)
+          (unless (bobp)
+            (forward-line 1))
           (point-marker))
       (if innermost
           (python-beginning-of-defun)