Dear Barry,

Within a multi-line string, using quotes switches out of string mode. This
can cause the remainder of the code to end up in string-mode. Try either of
these:

s="""
a semi-quoted "string inside the string switches syntax highlighting
out of string mode and when the string really ends, real code ends up
in string-mode"""


def func_highlighted_as_string():
    a=1

t="""
It also interprets a "string with # in it" as an unbalanced-quote
                                  # since it thinks the hash mark is
                                  # an actual comment"""



Emacs  : GNU Emacs 23.2.50.1 (i386-apple-darwin9.8.0, NS
apple-appkit-949.54)
 of 2010-08-18 on braeburn.aquamacs.org - Aquamacs Distribution 2.1
Package: python-mode 5.1.0aq

current state:
==============
(setq
 py-python-command "python"
 py-indent-offset 4
 py-block-comment-prefix "##"
 py-temp-directory "/var/folders/oA/oAy-YWg-FoSh1QxGzAILA++++TI/-Tmp-/"
 py-beep-if-tab-change t
 )
_______________________________________________
Python-mode mailing list
Python-mode@python.org
http://mail.python.org/mailman/listinfo/python-mode

Reply via email to