diff options
| author | Leonardo Nobrega | 2014-09-30 19:00:57 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2014-09-30 19:00:57 -0400 |
| commit | d3b7a90bc2ad20192d1afd23eb1aa6a18ceda569 (patch) | |
| tree | dd6b0d2e8e7829fd43db345c04f8c316bc256b76 /lisp/progmodes/python.el | |
| parent | 572fe798cd0a00ad4a9050a7962cf8e8fbcc209b (diff) | |
| download | emacs-d3b7a90bc2ad20192d1afd23eb1aa6a18ceda569.tar.gz emacs-d3b7a90bc2ad20192d1afd23eb1aa6a18ceda569.zip | |
* lisp/progmodes/python.el (python-fill-paren): Don't inf-loop at EOB.
Fixes: debbugs:18462
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'." | |||
| 3107 | (end-of-line) | 3107 | (end-of-line) |
| 3108 | (when (not (python-syntax-context 'paren)) | 3108 | (when (not (python-syntax-context 'paren)) |
| 3109 | (skip-syntax-backward "^)"))) | 3109 | (skip-syntax-backward "^)"))) |
| 3110 | (while (python-syntax-context 'paren) | 3110 | (while (and (python-syntax-context 'paren) |
| 3111 | (not (eobp))) | ||
| 3111 | (goto-char (1+ (point-marker)))) | 3112 | (goto-char (1+ (point-marker)))) |
| 3112 | (point-marker))) | 3113 | (point-marker))) |
| 3113 | (let ((paragraph-start "\f\\|[ \t]*$") | 3114 | (let ((paragraph-start "\f\\|[ \t]*$") |
| @@ -3118,7 +3119,8 @@ JUSTIFY should be used (if applicable) as in `fill-paragraph'." | |||
| 3118 | (while (not (eobp)) | 3119 | (while (not (eobp)) |
| 3119 | (forward-line 1) | 3120 | (forward-line 1) |
| 3120 | (python-indent-line) | 3121 | (python-indent-line) |
| 3121 | (goto-char (line-end-position)))) t) | 3122 | (goto-char (line-end-position)))) |
| 3123 | t) | ||
| 3122 | 3124 | ||
| 3123 | 3125 | ||
| 3124 | ;;; Skeletons | 3126 | ;;; Skeletons |