[Python-mode] python-mode 3.105; M-q comment action

Bernhard Herzog bh at intevation.de
Wed Jan 28 08:15:08 EST 2004


Barry Warsaw <barry at python.org> writes:

> Yes, this works fine in 4.49.  But for some reason, this doesn't:
>
> Before:
>
> def f(a):
>     """This is a docstring that is really long and produces a multiline comment if you're not careful."""
>     a = 1
>
> (place cursor on first open quote, hit M-q)
>
> After:
>
> def f(a):
>     """This is a docstring that is really long and produces a multiline
>     comment if you're not careful."""  a = 1

I think that never worked.  The code is quite simple minded.  It only
tries to fill a string if the cursor is inside the string.  Placing it
on the second quote of the opening triple quote works, for instance.  If
the cursor is on the third it again doesn't work because Emacs doesn't
grok triple quoted strings (at least not in the python-mode I'm
currently using, 4.48).  There's a similar problem if the triple quoted
string contains characters of he same quote type as the triple quote.

   Bernhard

-- 
Intevation GmbH                                 http://intevation.de/
Skencil                                http://sketch.sourceforge.net/
Thuban                                  http://thuban.intevation.org/



More information about the Python-mode mailing list