From: Fabián Ezequiel Gallina Date: Thu, 17 May 2012 03:02:55 +0000 (-0300) Subject: Fixed infinite while loop in python-info-current-defun X-Git-Tag: emacs-24.2.90~1199^2~624 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=df700cc99edbf1a51f78a52903cd6a9065121e22;p=emacs.git Fixed infinite while loop in python-info-current-defun 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) --- diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 9f14bef5258..250f4812a33 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -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)