nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] [PATCH] syntax: lua: fix word boundaries on standard li


From: Benno Schulenberg
Subject: Re: [Nano-devel] [PATCH] syntax: lua: fix word boundaries on standard library functions
Date: Mon, 1 Jan 2018 13:42:15 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0


Op 31-12-17 om 03:30 schreef Tom Levy:
I think the original "^" was misplaced and this should actually be

color brightred "\<texture\>"

I am not familiar with POV-Ray, but I looked at some examples and "texture" appears to be just like the other keywords:

Okay.  If it's just like the other keywords, then it can easily be included
in one of the other regexes.  Saves a regex.  Or two.

I would also keep the redundant parentheses for consistency with the other declarations, but I think I can predict your response to that

:D

I'll send a patch to remove the partial name highlighting. I don't think we should report missing functions as errors because our list might become out of
date again.

True.

Ugh.  It colors the leading parenthesis too?  Ugly.

Actually, another rule overrides the colour of "(" so it looks fine.

Okay.

True.  But I would write it as: [][)(}{].

I actually thought of that, but the "[][" made me cringe.

And all those backslashes make me giddy.  :)

I looked at the other files and found two different styles:

syntax/awk.nanorc:16: color green "(\{|\}|\(|\)|\;|\]|\[|\\|<|>|!|=|&|\+|-|\*|%|/|\?:|\^|\|)" syntax/pov.nanorc:13: color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)"

I don't like that style.  I prefer conciseness.

syntax/sh.nanorc:12: color green "[{}():;|`$<>!=&\\]"

Contains a redundant backslash too.  But that as an aside.

Why avoid icolor?

Because when most characters in the regex are non-alpha, the "i"
means hardly anything.  But in this case...

For the first hex regex it saves 11 characters and makes the regex much more readable. All the letters (x, a-f, p) are case-insensitive.

Okay.

Benno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]