diff options
Diffstat (limited to 'lisp/progmodes/python.el')
| -rw-r--r-- | lisp/progmodes/python.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 740dfee5870..d5126fa8881 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -3107,7 +3107,8 @@ JUSTIFY should be used (if applicable) as in `fill-paragraph'." (end-of-line) (when (not (python-syntax-context 'paren)) (skip-syntax-backward "^)"))) - (while (python-syntax-context 'paren) + (while (and (python-syntax-context 'paren) + (not (eobp))) (goto-char (1+ (point-marker)))) (point-marker))) (let ((paragraph-start "\f\\|[ \t]*$") @@ -3118,7 +3119,8 @@ JUSTIFY should be used (if applicable) as in `fill-paragraph'." (while (not (eobp)) (forward-line 1) (python-indent-line) - (goto-char (line-end-position)))) t) + (goto-char (line-end-position)))) + t) ;;; Skeletons |
