Emacs' python-mode buggy?

scott cotton scott at chronis.pobox.com
Thu Apr 29 02:28:45 EDT 1999


I've often noticed that emacs font locking is weird with
TQS's.  the strangest thing is that with one TQS, the next
line of code can end up in string color, but if you move
that line of code around by temporarily adding leading
whitespace or moving further down the file, it will change
to regular code fonts without me ever changing the TQS above
it.

while i haven't looked closely at the pymode code, i do
think that emac's fontifying stuff works on a certain
limited amount of context only (in terms of surrounding
characters to the cursor).  with such a contstraint, it
seems amazing to me that pymode does as well it does
fontifying stuff.

at any rate, i'll opt for a little sporadic twiddling of
source code over using vi(m) or something anyday.

scott

On 29 Apr 1999 07:48:21 +0300, Markus Stenberg <mstenber at cc.helsinki.fi> wrote:
>Ken Manheimer <klm at digicool.com> writes:
>> Markus Stenberg wrote:
>> I can't speak to the intimacy issue, but the python-mode syntax recognition
>> may be due to having a leading '(' open paren in the first column in one of
>> your docstrings.  If so, emacs' syntax confusion (not to be mistaken for
>> poor gender identification) can be remedied by escaping the leading open
>> paren with a '\' backslash, like so:
>
>Ah, what's causing that problem?
>
>> \(this is what to do with parens in docstrings.)
>> 
>> If it is the problem, well, it's emacs' problem, not pymode.  If it's not,
>> well, do track it down.  
>> 
>> Oh, does that bug constitute the "tons" you mention, or were there others? 
>> I never was good at estimating the weight of bugs - all that chiton, you
>> know.
>
>Think there is two, as one of my (moderately large) modules has no
>docstrings with ('s yet still exhibits that behavior. (ok, I got carried
>away, but I was moderately frustrated over the feature :-P)
>
>> Ken Manheimer
>> klm at digicool.com
>
>-Markus
>
>-- 
>		        Markus Stenberg
>Finger fingon at mpoli.fi for PGP key --  PGP key id: 1024/5DAC7D21
>
>




More information about the Python-list mailing list