diff options
Diffstat (limited to 'lisp/progmodes/python.el')
| -rw-r--r-- | lisp/progmodes/python.el | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 1c99937c4b9..f31832fec9c 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -1454,21 +1454,24 @@ With positive ARG search backwards, else search forwards." | |||
| 1454 | (line-beg-pos (line-beginning-position)) | 1454 | (line-beg-pos (line-beginning-position)) |
| 1455 | (line-content-start (+ line-beg-pos (current-indentation))) | 1455 | (line-content-start (+ line-beg-pos (current-indentation))) |
| 1456 | (pos (point-marker)) | 1456 | (pos (point-marker)) |
| 1457 | (min-indentation (+ (current-indentation) | 1457 | (min-indentation (if (python-info-current-line-empty-p) |
| 1458 | (if (python-info-looking-at-beginning-of-defun) | 1458 | most-positive-fixnum |
| 1459 | python-indent-offset 0))) | 1459 | (current-indentation))) |
| 1460 | (body-indentation | 1460 | (body-indentation |
| 1461 | (and (> arg 0) | 1461 | (and (> arg 0) |
| 1462 | (save-excursion | 1462 | (or (and (python-info-looking-at-beginning-of-defun) |
| 1463 | (while (and | 1463 | (+ (current-indentation) python-indent-offset)) |
| 1464 | (or (not (python-info-looking-at-beginning-of-defun)) | 1464 | (save-excursion |
| 1465 | (>= (current-indentation) min-indentation)) | 1465 | (while |
| 1466 | (setq min-indentation | 1466 | (and |
| 1467 | (min min-indentation (current-indentation))) | 1467 | (python-nav-backward-block) |
| 1468 | (python-nav-backward-block))) | 1468 | (or (not (python-info-looking-at-beginning-of-defun)) |
| 1469 | (or (and (python-info-looking-at-beginning-of-defun) | 1469 | (>= (current-indentation) min-indentation)) |
| 1470 | (+ (current-indentation) python-indent-offset)) | 1470 | (setq min-indentation |
| 1471 | 0)))) | 1471 | (min min-indentation (current-indentation))))) |
| 1472 | (or (and (python-info-looking-at-beginning-of-defun) | ||
| 1473 | (+ (current-indentation) python-indent-offset)) | ||
| 1474 | 0))))) | ||
| 1472 | (found | 1475 | (found |
| 1473 | (progn | 1476 | (progn |
| 1474 | (when (and (python-info-looking-at-beginning-of-defun nil t) | 1477 | (when (and (python-info-looking-at-beginning-of-defun nil t) |