GNU bug report logs -
#36056
26.2; Python Documentation String Indent In Auto Fill Mode
Previous Next
Reported by: ricercar <ricercar <at> lycos.com>
Date: Sun, 2 Jun 2019 14:55:01 UTC
Severity: normal
Tags: fixed
Found in version 26.2
Fixed in version 27.1
Done: Noam Postavsky <npostavs <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 36056 <at> debbugs.gnu.org (full text, mbox):
ricercar <ricercar <at> lycos.com> writes:
> There is some peculiar behavior when using auto-fill-mode editing Python
> code. For example if I start typing the following:
>
> def some_function(keyword_argument0, keyword_argument1,
> keyword_argument2='foobar'):
> """
> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
>
>
> and press Enter, it will look like this:
>
> def some_function(keyword_argument0, keyword_argument1,
> keyword_argument2='foobar'):
> """
> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
> eiusmod tempor incididunt ut labore et dolore magna
> aliqua.
>
> That is, the subsequent lines of the documentation string are indented
> as to match the indentation of the second line of the list of keyword
> arguments, rather than four columns as I would expect.
I'm not familiar with this part of Emacs or python.el, and I don't know
what else this may break, but from stepping through do-auto-fill I
discovered the following setting gives the desired auto-fill behaviour:
(add-hook 'python-mode-hook
(lambda ()
(setq-local fill-indent-according-to-mode t)))
HTH,
--
Basil
This bug report was last modified 5 years and 248 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.