]> git.eshelyaron.com Git - emacs.git/commitdiff
Fixed indentation guess logic to never accept 0 as a possible value
authorFabián Ezequiel Gallina <fgallina@cuca>
Thu, 17 May 2012 03:03:01 +0000 (00:03 -0300)
committerFabián Ezequiel Gallina <fgallina@gnu.org>
Thu, 17 May 2012 03:03:01 +0000 (00:03 -0300)
lisp/progmodes/python.el

index 16a6d4b45d079f4ad554004f6796110622bda072..69df053505423b5ddd9b25e7c07c6f0bf0223bb4 100644 (file)
@@ -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.