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 14b65669c4b..ec5d8c55512 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -4084,6 +4084,12 @@ JUSTIFY should be used (if applicable) as in `fill-paragraph'." | |||
| 4084 | (goto-char (line-end-position)))) | 4084 | (goto-char (line-end-position)))) |
| 4085 | t) | 4085 | t) |
| 4086 | 4086 | ||
| 4087 | (defun python-do-auto-fill () | ||
| 4088 | "Like `do-auto-fill', but bind `fill-indent-according-to-mode'." | ||
| 4089 | ;; See Bug#36056. | ||
| 4090 | (let ((fill-indent-according-to-mode t)) | ||
| 4091 | (do-auto-fill))) | ||
| 4092 | |||
| 4087 | 4093 | ||
| 4088 | ;;; Skeletons | 4094 | ;;; Skeletons |
| 4089 | 4095 | ||
| @@ -5379,7 +5385,7 @@ REPORT-FN is Flymake's callback function." | |||
| 5379 | (set (make-local-variable 'paragraph-start) "\\s-*$") | 5385 | (set (make-local-variable 'paragraph-start) "\\s-*$") |
| 5380 | (set (make-local-variable 'fill-paragraph-function) | 5386 | (set (make-local-variable 'fill-paragraph-function) |
| 5381 | #'python-fill-paragraph) | 5387 | #'python-fill-paragraph) |
| 5382 | (set (make-local-variable 'fill-indent-according-to-mode) t) ; Bug#36056. | 5388 | (set (make-local-variable 'normal-auto-fill-function) #'python-do-auto-fill) |
| 5383 | 5389 | ||
| 5384 | (set (make-local-variable 'beginning-of-defun-function) | 5390 | (set (make-local-variable 'beginning-of-defun-function) |
| 5385 | #'python-nav-beginning-of-defun) | 5391 | #'python-nav-beginning-of-defun) |