diff options
Diffstat (limited to 'lisp/progmodes/python.el')
| -rw-r--r-- | lisp/progmodes/python.el | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index dc7e46dc129..b6bb825fc1a 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -700,8 +700,7 @@ START is the buffer position where the sexp starts." | |||
| 700 | (let* ((indentation (python-indent-calculate-indentation)) | 700 | (let* ((indentation (python-indent-calculate-indentation)) |
| 701 | (remainder (% indentation python-indent-offset)) | 701 | (remainder (% indentation python-indent-offset)) |
| 702 | (steps (/ (- indentation remainder) python-indent-offset))) | 702 | (steps (/ (- indentation remainder) python-indent-offset))) |
| 703 | (setq python-indent-levels '()) | 703 | (setq python-indent-levels '(0)) |
| 704 | (setq python-indent-levels (cons 0 python-indent-levels)) | ||
| 705 | (dotimes (step steps) | 704 | (dotimes (step steps) |
| 706 | (setq python-indent-levels | 705 | (setq python-indent-levels |
| 707 | (cons (* python-indent-offset (1+ step)) python-indent-levels))) | 706 | (cons (* python-indent-offset (1+ step)) python-indent-levels))) |
| @@ -740,7 +739,9 @@ to (`nth' `python-indent-current-level' `python-indent-levels')" | |||
| 740 | (if (or (and (eq this-command 'indent-for-tab-command) | 739 | (if (or (and (eq this-command 'indent-for-tab-command) |
| 741 | (eq last-command this-command)) | 740 | (eq last-command this-command)) |
| 742 | force-toggle) | 741 | force-toggle) |
| 743 | (python-indent-toggle-levels) | 742 | (if (not (equal python-indent-levels '(0))) |
| 743 | (python-indent-toggle-levels) | ||
| 744 | (python-indent-calculate-levels)) | ||
| 744 | (python-indent-calculate-levels)) | 745 | (python-indent-calculate-levels)) |
| 745 | (beginning-of-line) | 746 | (beginning-of-line) |
| 746 | (delete-horizontal-space) | 747 | (delete-horizontal-space) |