diff lisp/progmodes/python.el @ 90813:e6fdae9180d4

Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 698-710) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 216) - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-196
author Miles Bader <miles@gnu.org>
date Tue, 24 Apr 2007 21:56:25 +0000
parents 4ef881a120fe 3ae6fc8b3d2c
children d7172f202ab8
line wrap: on
line diff
--- a/lisp/progmodes/python.el	Tue Apr 24 11:35:23 2007 +0000
+++ b/lisp/progmodes/python.el	Tue Apr 24 21:56:25 2007 +0000
@@ -981,11 +981,15 @@
 		       (_ (if (python-comment-line-p)
 			      (python-skip-comments/blanks t)))
 		       (ci (current-indentation))
-		       (open (python-open-block-statement-p)))
+		       (open (python-open-block-statement-p))
+		       opoint)
 		  (if (and (zerop ci) (not open))
 		      (not (goto-char point))
 		    (catch 'done
-		      (while (zerop (python-next-statement))
+		      (setq opoint (point))
+		      (while (and (zerop (python-next-statement))
+		      		  (not (= opoint (point))))
+			(setq opoint (point))
 			(when (or (and open (<= (current-indentation) ci))
 				  (< (current-indentation) ci))
 			  (python-skip-comments/blanks t)