Re: Double syntax context switch



Hi Paul,

On Sun, 2005-04-17 at 11:27, Paul Sheer wrote:
> :-) like i say - the current implementation *is*
> the specification LOL. so exactly how it behaves
> is the way it is supposed to!  *duck*

I understood that answer, but although I think this syntax highlighting
works great for 99.9% of the cases the particular example I gave is not
very intuitive to me. So I would like to propose to update the
specification in this respect ;-p . Maybe you can give a clue on how
this could be fixed, or changed if you like.

> to be less evasive: i should say that keywords
> take precidence over context switches.

I got that from the cooledit and mcedit manpages. Just have been using
mc and mcedit for years but have never more than glanced over the man
pages.

However the "keyword takes precedence over context" still does *not*
explain why in the "context exclusive" example in

echo '"';

the first ' is interpreted as keyword and thus gets coloured as a
keyword in the default context, then also gets interpreted as a context
switch, consequently the following " gets first interpreted as a keyword
in the new (= ' ') context, and thus coloured in the colours of this new
context. But then the " *also* gets interpreted as a context switch,
although the previous context has not yet been closed. That does not
make sense to me, and it *only* happens if the context length inside the
's is 1 character long (so only if the closing ' follows immediately
upon the enclosed " - a space or character on either side blocks the "
from being interpreted as a context change).

So if you have any idea how we could change this behaviour without
affecting all the other behaviour that would be really great. For now I
just have to work around by not using the "exclusive" keywords on
contexts that could be a single character.

Leonard.

-- 
mount -t life -o ro /dev/dna /genetic/research





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]