"fore:#00007F" breaks indentation

Bug #328788 reported by Chrisgreen-users
2
Affects Status Importance Assigned to Milestone
python-mode.el
Fix Released
Medium
Andreas Roehler

Bug Description

class a:
    def __init__(self):
        self.StyleSetSpec(self.STYLE_FIELD,
"fore:#00007F" )
            self.StyleSetSpec(self.STYLE_FIELD,
"fore:#00007F" )
                self.StyleSetSpec(self.STYLE_FIELD,
"fore:#00007F" )
                    self.StyleSetSpec(self.STYLE_FIELD,
"fore:#00007F" )

[http://sourceforge.net/tracker/index.php?func=detail&aid=918263&group_id=86916&atid=581349]

Related branches

Revision history for this message
Chrisgreen-users (chrisgreen-users) wrote :

Aiee! Didn't realize there was no formatting in these boxes
( too used to wiki )

Revision history for this message
Montanaro (montanaro) wrote :

Sorry it's taken me so long to look into this. I believe I
found the problem but don't know how to fix it, so I'll
describe what I found so that maybe someone with more
lisp-fu than me can solve the problem.

Basically, too much reliance is placed on regular
expressions to determine the end of the first line of a
compound statement. In (py-statement-opens-block-p) it
searches "for a colon with nothing after it except
whitespace, and maybe a comment". Unfortunately, once it
gets there, it's smack dab in the middle of a string. There
is a check for being in a comment, but not one for being in
a string. I somehow think the proper solution might involve
calling (py-in-literal), but I'm having trouble making it
work. If we're in a string we need to keep searching.

Changed in python-mode:
assignee: nobody → Andreas Roehler (a-roehler)
Changed in python-mode:
status: New → Fix Committed
Changed in python-mode:
milestone: none → 6.0
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.