* bug#6853: 24.0.50; python mode coloring broke
@ 2010-08-13 23:05 Thomas Riccardi
2012-06-18 23:06 ` Glenn Morris
2012-09-24 18:44 ` bug#6853: python font-lock and empty triple-quoted strings Fabián Ezequiel Gallina
0 siblings, 2 replies; 5+ messages in thread
From: Thomas Riccardi @ 2010-08-13 23:05 UTC (permalink / raw)
To: 6853
[-- Attachment #1: Type: text/plain, Size: 358 bytes --]
emacs trunk revno: 101071
How to reproduce:
1/ emacs -Q test.py
2/ coloring is wrong starting L96
The test.py file is joint to this email.
I tried to remove as many lines as possible:
If you remove any line above L25 from the test.py file, the bug
disappears...
If you add or remove lines below L25, the line where the bug starts will
still be L96.
[-- Attachment #2: test.py --]
[-- Type: text/x-python, Size: 1027 bytes --]
from core.url_open import URLOpen
from core.tesseract import Tesseract
CAPTCHACODE = "captchacode"
MEGAVAR = "megavar"
class CaptchaParser(HTMLParser):
""""""
def __init__(self, data):
""""""
HTMLParser.__init__(self)
self.located = False
self.captcha = None
self.captchacode = ""
self.megavar = ""
self.feed(data)
self.close()
def handle_starttag(self, tag, attrs):
""""""
if self.get_starttag_text() == '<TD width="100" align="center" height="40">':
elif tag == "img":
""""""
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
"test"
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#6853: 24.0.50; python mode coloring broke
2010-08-13 23:05 bug#6853: 24.0.50; python mode coloring broke Thomas Riccardi
@ 2012-06-18 23:06 ` Glenn Morris
2012-06-23 21:58 ` Thomas Riccardi
2012-09-24 18:44 ` bug#6853: python font-lock and empty triple-quoted strings Fabián Ezequiel Gallina
1 sibling, 1 reply; 5+ messages in thread
From: Glenn Morris @ 2012-06-18 23:06 UTC (permalink / raw)
To: Thomas Riccardi; +Cc: 6853
Thomas Riccardi wrote:
> emacs trunk revno: 101071
>
>
> How to reproduce:
> 1/ emacs -Q test.py
> 2/ coloring is wrong starting L96
>
>
> The test.py file is joint to this email.
Thanks for the report; sorry no-one ever replied.
It looks like a complicated example file, and I don't know what I am
supposed to be seeing. Line 96 looks the same to me as line 95. Do you
still see this issue, and if so could you say exactly what is wrong?
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#6853: 24.0.50; python mode coloring broke
2012-06-18 23:06 ` Glenn Morris
@ 2012-06-23 21:58 ` Thomas Riccardi
2012-06-24 23:39 ` Glenn Morris
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Riccardi @ 2012-06-23 21:58 UTC (permalink / raw)
To: Glenn Morris; +Cc: 6853
[-- Attachment #1: Type: text/plain, Size: 995 bytes --]
On Tue, Jun 19, 2012 at 1:06 AM, Glenn Morris <rgm@gnu.org> wrote:
> Thomas Riccardi wrote:
>
>> emacs trunk revno: 101071
>>
>>
>> How to reproduce:
>> 1/ emacs -Q test.py
>> 2/ coloring is wrong starting L96
>>
>>
>> The test.py file is joint to this email.
>
> Thanks for the report; sorry no-one ever replied.
>
> It looks like a complicated example file, and I don't know what I am
> supposed to be seeing. Line 96 looks the same to me as line 95. Do you
> still see this issue, and if so could you say exactly what is wrong?
The test.py file is indeed an unnecessary complicated example.
Here is a simpler file reproducing the issue:
def test():
""""""
return None
The issue is the following:
All the lines after the empty triple-quoted string are colored with
the 'font-lock-string-face' face.
This seems to be a legit python code:
http://docs.python.org/reference/lexical_analysis.html#string-literals
There is the same issue with triple-quoted strings using simple quotes '.
[-- Attachment #2: test2.py --]
[-- Type: application/octet-stream, Size: 35 bytes --]
def test():
""""""
return None
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#6853: 24.0.50; python mode coloring broke
2012-06-23 21:58 ` Thomas Riccardi
@ 2012-06-24 23:39 ` Glenn Morris
0 siblings, 0 replies; 5+ messages in thread
From: Glenn Morris @ 2012-06-24 23:39 UTC (permalink / raw)
To: Thomas Riccardi; +Cc: 6853
Thomas Riccardi wrote:
> def test():
> """"""
> return None
>
> The issue is the following:
> All the lines after the empty triple-quoted string are colored with
> the 'font-lock-string-face' face.
Thanks, that's much clearer. This issue still occurs with the latest
python.el in the Emacs trunk.
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#6853: python font-lock and empty triple-quoted strings
2010-08-13 23:05 bug#6853: 24.0.50; python mode coloring broke Thomas Riccardi
2012-06-18 23:06 ` Glenn Morris
@ 2012-09-24 18:44 ` Fabián Ezequiel Gallina
1 sibling, 0 replies; 5+ messages in thread
From: Fabián Ezequiel Gallina @ 2012-09-24 18:44 UTC (permalink / raw)
To: 6853
I tried this and the current trunk's python.el seems to be working well
on the given test file.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-09-24 18:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-13 23:05 bug#6853: 24.0.50; python mode coloring broke Thomas Riccardi
2012-06-18 23:06 ` Glenn Morris
2012-06-23 21:58 ` Thomas Riccardi
2012-06-24 23:39 ` Glenn Morris
2012-09-24 18:44 ` bug#6853: python font-lock and empty triple-quoted strings Fabián Ezequiel Gallina
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).