diff lisp/progmodes/python.el @ 77663:32334cd7302e

(python-guess-indent): Check non-nullness before comparing indent against the 2..8 interval.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Tue, 08 May 2007 01:35:26 +0000
parents da9f2ed7fb46
children 0b0c0f93563c ca9519bf5703
line wrap: on
line diff
--- a/lisp/progmodes/python.el	Mon May 07 23:42:38 2007 +0000
+++ b/lisp/progmodes/python.el	Tue May 08 01:35:26 2007 +0000
@@ -461,7 +461,7 @@
 	      (let ((initial (current-indentation)))
 		(if (zerop (python-next-statement))
 		    (setq indent (- (current-indentation) initial)))
-		(if (and (>= indent 2) (<= indent 8)) ; sanity check
+		(if (and indent (>= indent 2) (<= indent 8)) ; sanity check
 		    (setq done t))))))
 	(when done
 	  (when (/= indent (default-value 'python-indent))