From: Fabián Ezequiel Gallina Date: Thu, 17 May 2012 03:03:01 +0000 (-0300) Subject: Fixed indentation guess logic to never accept 0 as a possible value X-Git-Tag: emacs-24.2.90~1199^2~607 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=14d9f80c0d82a9c13f6e1e627eeb5ebac41a009a;p=emacs.git Fixed indentation guess logic to never accept 0 as a possible value --- diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 16a6d4b45d0..69df0535054 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -437,7 +437,9 @@ These make `python-indent-calculate-indentation' subtract the value of (forward-line 1)) (forward-line 1) (forward-comment 1) - (setq python-indent-offset (current-indentation))))))) + (let ((indent-offset (current-indentation))) + (when (> indent-offset 0) + (setq python-indent-offset indent-offset)))))))) (defun python-indent-context (&optional stop) "Return information on indentation context.