From: Fabián Ezequiel Gallina Date: Thu, 17 May 2012 03:03:22 +0000 (-0300) Subject: Fixed cornercase for normal lines when indentation was triggered in the middle of... X-Git-Tag: emacs-24.2.90~1199^2~546 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=257b0017ef0d33618554664b999a2a18850a39bd;p=emacs.git Fixed cornercase for normal lines when indentation was triggered in the middle of them --- diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index cdf8419f288..03524812a2d 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -572,7 +572,7 @@ START is the buffer position where the sexp starts." (let ((block-regexp (python-rx block-start)) (block-start-line-end ":[[:space:]]*$")) (back-to-indentation) - (while (and (forward-comment -9999) (not (bobp)))) + (forward-comment -9999) (back-to-indentation) (when (or (python-info-continuation-line-p) (and (not (looking-at block-regexp)) @@ -595,7 +595,8 @@ START is the buffer position where the sexp starts." 'after-beginning-of-block) ;; After normal line ((setq start (save-excursion - (while (and (forward-comment -9999) (not (bobp)))) + (back-to-indentation) + (forward-comment -9999) (python-nav-sentence-start) (point-marker))) 'after-line)