nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] [PATCH] syntax variables


From: Brand Huntsman
Subject: Re: [Nano-devel] [PATCH] syntax variables
Date: Wed, 17 Jan 2018 14:38:31 -0700

On Wed, 17 Jan 2018 21:51:20 +0100
Benno Schulenberg <address@hidden> wrote:

> > This also solves the EOL comment issue with #RGB colors, without
> > quoting the colors.  
> 
> Do you mean your patch changes things in such a way that it becomes
> possible to allow EOL comments?  Or that the patch changes the comment
> regex in such a way as to do the right thing, even when #rrggbb
> numbers are present?

The patch won't help with EOL comments on commands with strings. But it would 
help on commands with EOL comments on other commands. The error regex 
highlights everything and a normal EOL comment regex below it would highlight 
everything after a #, so "set titlecolor #000,reed" has second half blue, and 
the color regex fails to match because "reed" is incorrect. It stomps all over 
the error regex.

With syntax variables, the EOL comment would only match to _correct_ command 
lines. There might be a valid EOL comment after the invalid command and that 
wouldn't get highlighted blue, just more red to better indicate an error.

My upcoming color patches add a lot more duplication to the two color commands 
and syntax variables would make them easier to maintain.

And my local nanorc.nanorc highlights each component of commands like "bind KEY 
FN MENU", making it easier to read. This requires duplication that syntax 
variables would eliminate.




reply via email to

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