diff options
| author | Noam Postavsky | 2019-06-21 07:49:22 -0400 |
|---|---|---|
| committer | Noam Postavsky | 2019-06-22 19:25:44 -0400 |
| commit | 0f01a58c390faf30c33b369fc81b2a14ec5b7f2e (patch) | |
| tree | 358768de2c6ca522218c2dfc5dad8af523c518e7 /lisp/progmodes/python.el | |
| parent | f46b16b9fb00d341f222422a9514f5bd62f29971 (diff) | |
| download | emacs-0f01a58c390faf30c33b369fc81b2a14ec5b7f2e.tar.gz emacs-0f01a58c390faf30c33b369fc81b2a14ec5b7f2e.zip | |
Fix python docstring auto-fill (Bug#36056)
* lisp/progmodes/python.el (python-mode): Set
fill-indent-according-to-mode locally to t. This lets auto-fill do
the right thing when auto-filling inside a docstring. The default was
to nil on 2001-11-25 "(fill-indent-according-to-mode): Default to nil"
with the comment that it "screws up CC-mode's filling tricks". But
presumably it shouldn't be a problem for python-mode.
* test/lisp/progmodes/python-tests.el (python-auto-fill-docstring):
New test.
Diffstat (limited to 'lisp/progmodes/python.el')
| -rw-r--r-- | lisp/progmodes/python.el | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 188bc973d99..e1f9a33a691 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -5379,6 +5379,7 @@ REPORT-FN is Flymake's callback function." | |||
| 5379 | (set (make-local-variable 'paragraph-start) "\\s-*$") | 5379 | (set (make-local-variable 'paragraph-start) "\\s-*$") |
| 5380 | (set (make-local-variable 'fill-paragraph-function) | 5380 | (set (make-local-variable 'fill-paragraph-function) |
| 5381 | #'python-fill-paragraph) | 5381 | #'python-fill-paragraph) |
| 5382 | (set (make-local-variable 'fill-indent-according-to-mode) t) ; Bug#36056. | ||
| 5382 | 5383 | ||
| 5383 | (set (make-local-variable 'beginning-of-defun-function) | 5384 | (set (make-local-variable 'beginning-of-defun-function) |
| 5384 | #'python-nav-beginning-of-defun) | 5385 | #'python-nav-beginning-of-defun) |