diff options
| author | Fabián Ezequiel Gallina | 2012-05-17 00:03:10 -0300 |
|---|---|---|
| committer | Fabián Ezequiel Gallina | 2012-05-17 00:03:10 -0300 |
| commit | 86f1889aa95d179c6d46fbb138eb47578c9aa372 (patch) | |
| tree | 7a0c1a3aee3c813e5e5738507910c72bf5e45dfc /lisp/progmodes/python.el | |
| parent | 66bbb27f8dc210f81beec6a11a8613efefd1d5ad (diff) | |
| download | emacs-86f1889aa95d179c6d46fbb138eb47578c9aa372.tar.gz emacs-86f1889aa95d179c6d46fbb138eb47578c9aa372.zip | |
Fixed indentation issue when indenting a python-indent-dedenter from end of line
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) |