From 14d9f80c0d82a9c13f6e1e627eeb5ebac41a009a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fabi=C3=A1n=20Ezequiel=20Gallina?= Date: Thu, 17 May 2012 00:03:01 -0300 Subject: [PATCH] Fixed indentation guess logic to never accept 0 as a possible value --- lisp/progmodes/python.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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. -- 2.39.5