[Python-mode] [ python-mode-Patches-1023335 ] Handle triple-quoted
strings correctly.
SourceForge.net
noreply at sourceforge.net
Mon Nov 1 17:15:28 CET 2004
Patches item #1023335, was opened at 2004-09-07 00:22
Message generated for change (Comment added) made by jlgijsbers
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=581351&aid=1023335&group_id=86916
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Edward Loper (edloper)
Assigned to: Nobody/Anonymous (nobody)
Summary: Handle triple-quoted strings correctly.
Initial Comment:
This patch adds an option that will color triple-quoted strings
correctly. It works by turning off syntax-highlighting for strings and
comments (by registering quotes and hashes in the syntax table as
normal punctuation); and using a fairly advanced keyword matcher
to find all strings and comments. The keyword matcher uses a text-
property to keep track of the syntax category of each character, and
only updates it as needed. Therefore, the option can only be used if
text-properties are available (but they are available on all current
versions of emacs, as far as I know).
Caveat: it's possible that this will be slow on some machines, or
under certian circumstances. But it's not noticably slower on the
machines & files I've tested it on.
----------------------------------------------------------------------
Comment By: Johannes Gijsbers (jlgijsbers)
Date: 2004-11-01 17:15
Message:
Logged In: YES
user_id=469548
I applied this patch to the latest python-mode and while
triple-quoted-strings mostly work fine (thank you! thank
you! thank you!), comments seem to be a bit broken. Take a
look at BaseHTTPServer.py from the Python CVS for a
particularly bad example.
I'm running "GNU Emacs 21.3.50.1 (i386-pc-linux-gnu, GTK+
Version 2.4.10)
of 2004-10-11 on surfboy, modified by Debian", compiled
from Emacs CVS using the emacs-snapshot package.
----------------------------------------------------------------------
Comment By: Edward Loper (edloper)
Date: 2004-09-07 04:15
Message:
Logged In: YES
user_id=195958
So I did. Trying again.
----------------------------------------------------------------------
Comment By: Skip Montanaro (montanaro)
Date: 2004-09-07 03:41
Message:
Logged In: YES
user_id=44345
Edward, perhaps you forgot to check the box when uploading
the patch? There's nothing currently attached to this item.
-Skip
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=581351&aid=1023335&group_id=86916
More information about the Python-mode
mailing list