From df700cc99edbf1a51f78a52903cd6a9065121e22 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fabi=C3=A1n=20Ezequiel=20Gallina?= Date: Thu, 17 May 2012 00:02:55 -0300 Subject: [PATCH] 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) --- lisp/progmodes/python.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- 2.39.2