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

Skip Montanaro skip at pobox.com
Wed Jan 28 10:25:28 EST 2004


    >> (place cursor on first open quote, hit M-q) [fails]
    ...

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

Maybe a not-too-much less simple-minded job would be to extract the string
within the triple quotes, stuff it in a separate text-mode buffer, select it
all, set the fill column appropriately, fill it, then stuff the result back
into the right place.

Skip



More information about the Python-mode mailing list