From 257b0017ef0d33618554664b999a2a18850a39bd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fabi=C3=A1n=20Ezequiel=20Gallina?= Date: Thu, 17 May 2012 00:03:22 -0300 Subject: [PATCH] Fixed cornercase for normal lines when indentation was triggered in the middle of them --- lisp/progmodes/python.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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) -- 2.39.5