From fad22dec878e8dc263a71348587c4ee182a4ea9b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fabi=C3=A1n=20Ezequiel=20Gallina?= Date: Thu, 17 May 2012 00:03:25 -0300 Subject: [PATCH] Fixed indentation case for after beginning of block --- lisp/progmodes/python.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index fbd6fdd4005..e6faf73547e 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -584,6 +584,7 @@ START is the buffer position where the sexp starts." (while (and (forward-line -1) (python-info-continuation-line-p) (not (bobp)))) + (back-to-indentation) (when (not (looking-at block-regexp)) (forward-line 1))) (back-to-indentation) @@ -591,7 +592,9 @@ START is the buffer position where the sexp starts." (or (re-search-forward block-start-line-end (line-end-position) t) - (python-info-continuation-line-p))) + (save-excursion + (goto-char (line-end-position)) + (python-info-continuation-line-p)))) (point-marker))))) 'after-beginning-of-block) ;; After normal line -- 2.39.5