fill-paragraph in comments results in mess

Bug #1084769 reported by Barry Warsaw
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-mode.el
Fix Released
Medium
Andreas Roehler

Bug Description

In Emacs 24.2, r1151 lp:python-mode (6.0.13), fill-paragraph (M-q) in a comment region results in a mess.

-----snip snip-----
def update():
    # We need to get a reliable checksum for the dictionary in
    # newpkg_list. Dictionary order is unpredictable, so to get a
    # reproducible checksum, we get the items of the dict, sort on the
    # keys, then get the json representation of this sorted list, encode
    # this to bytes assuming utf-8, and hash
    # the resulting bytes.
-----snip snip-----

Put point at the beginning of one of the lines in the comment, say bol of "# keys".

Hit M-q (i.e. fill-paragraph)

This is the result:

-----snip snip-----
def update(): # We need to get a reliable checksum for the dictionary in #
newpkg_list. Dictionary order is unpredictable, so to get a # reproducible
checksum, we get the items of the dict, sort on the # keys, then get the json
representation of this sorted list, encode # this to bytes assuming utf-8, and
hash # the resulting bytes.
-----snip snip-----

Changed in python-mode:
milestone: none → 6.1.0
assignee: nobody → Andreas Roehler (a-roehler)
importance: Undecided → Medium
Changed in python-mode:
status: New → Fix Committed
Changed in python-mode:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.