From: Dmitry Gutov Date: Mon, 12 Feb 2018 00:27:52 +0000 (+0300) Subject: Fix an infloop in python-nav-beginning-of-statement X-Git-Tag: emacs-27.0.90~5699 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=76a1bd1896655ef092f4510f2099a772d6bb1df5;p=emacs.git Fix an infloop in python-nav-beginning-of-statement * lisp/progmodes/python.el (python-nav-beginning-of-statement): Fix an infloop (bug#30277). --- diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 5baf6e0f80a..ff8269d9705 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -1474,7 +1474,7 @@ nested definitions." (defun python-nav-beginning-of-statement () "Move to start of current statement." (interactive "^") - (back-to-indentation) + (forward-line 0) (let* ((ppss (syntax-ppss)) (context-point (or @@ -1489,6 +1489,7 @@ nested definitions." (python-info-line-ends-backslash-p)) (forward-line -1) (python-nav-beginning-of-statement)))) + (back-to-indentation) (point-marker)) (defun python-nav-end-of-statement (&optional noend)