diff options
| author | Fabián Ezequiel Gallina | 2012-05-17 00:03:01 -0300 |
|---|---|---|
| committer | Fabián Ezequiel Gallina | 2012-05-17 00:03:01 -0300 |
| commit | 14d9f80c0d82a9c13f6e1e627eeb5ebac41a009a (patch) | |
| tree | 44858797b07c1c0ad8bf1db9b6ab5307ea0f6c7d | |
| parent | 78334b439dac55783347e4062cba58cfef638201 (diff) | |
| download | emacs-14d9f80c0d82a9c13f6e1e627eeb5ebac41a009a.tar.gz emacs-14d9f80c0d82a9c13f6e1e627eeb5ebac41a009a.zip | |
Fixed indentation guess logic to never accept 0 as a possible value
| -rw-r--r-- | lisp/progmodes/python.el | 4 |
1 files changed, 3 insertions, 1 deletions
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 | |||
| 437 | (forward-line 1)) | 437 | (forward-line 1)) |
| 438 | (forward-line 1) | 438 | (forward-line 1) |
| 439 | (forward-comment 1) | 439 | (forward-comment 1) |
| 440 | (setq python-indent-offset (current-indentation))))))) | 440 | (let ((indent-offset (current-indentation))) |
| 441 | (when (> indent-offset 0) | ||
| 442 | (setq python-indent-offset indent-offset)))))))) | ||
| 441 | 443 | ||
| 442 | (defun python-indent-context (&optional stop) | 444 | (defun python-indent-context (&optional stop) |
| 443 | "Return information on indentation context. | 445 | "Return information on indentation context. |