diff options
Diffstat (limited to 'lisp/progmodes/python.el')
| -rw-r--r-- | lisp/progmodes/python.el | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index c2483436fe9..e0c937d7ce5 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -1455,11 +1455,17 @@ With positive ARG search backwards, else search forwards." | |||
| 1455 | (line-beg-pos (line-beginning-position)) | 1455 | (line-beg-pos (line-beginning-position)) |
| 1456 | (line-content-start (+ line-beg-pos (current-indentation))) | 1456 | (line-content-start (+ line-beg-pos (current-indentation))) |
| 1457 | (pos (point-marker)) | 1457 | (pos (point-marker)) |
| 1458 | (min-indentation (+ (current-indentation) | ||
| 1459 | (if (python-info-looking-at-beginning-of-defun) | ||
| 1460 | python-indent-offset 0))) | ||
| 1458 | (body-indentation | 1461 | (body-indentation |
| 1459 | (and (> arg 0) | 1462 | (and (> arg 0) |
| 1460 | (save-excursion | 1463 | (save-excursion |
| 1461 | (while (and | 1464 | (while (and |
| 1462 | (not (python-info-looking-at-beginning-of-defun)) | 1465 | (or (not (python-info-looking-at-beginning-of-defun)) |
| 1466 | (>= (current-indentation) min-indentation)) | ||
| 1467 | (setq min-indentation | ||
| 1468 | (min min-indentation (current-indentation))) | ||
| 1463 | (python-nav-backward-block))) | 1469 | (python-nav-backward-block))) |
| 1464 | (or (and (python-info-looking-at-beginning-of-defun) | 1470 | (or (and (python-info-looking-at-beginning-of-defun) |
| 1465 | (+ (current-indentation) python-indent-offset)) | 1471 | (+ (current-indentation) python-indent-offset)) |