nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] [PATCH] syntax: c: change the highlighting of preproces


From: Benno Schulenberg
Subject: Re: [Nano-devel] [PATCH] syntax: c: change the highlighting of preprocessor directives
Date: Thu, 21 Dec 2017 20:01:53 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0


[It seems your mail didn't make it to the list.  So I am quoting in full.]

Op 21-12-17 om 02:29 schreef Liu Hao:
On 2017/12/21 3:00, Benno Schulenberg wrote:
Ah.  Thanks.  It is a match-beginning-of-buffer "anchor".  That makes sense.
Your "beginning of a search" wording had me puzzled.  But it is: the
beginning of the buffer in which to search.

But... how portable is this?  The BSDs won't understand this, I guess. So
how do we tell the BSDs that they should use the gnulib regex module? Because we want to use GNU-specific regular expressions.


I don't know. AFAICT the \< and \> things are already GNU extensions, so it is
less vicious to have another extension.  :|

Well, for \< and \> we have fixbounds() -- see in src/utils.c.  So, if
there is a BSD equivalent of \`, we could add it to "fixbounds".

There were indeed problems when building GNU nano using the bundled regex
library from GNUlib. I can't recall for now... IIRC it didn't recognize
[[:alpha:]], [[:space:]] etc (maybe it was \s, \w etc), Therefore I had to get
a regex library ripped from Glibc.

Strange.  I would have thought that the stuff in gnulib closely matches
the stuff in glibc.

Fortunately it had already been already done and as long as both were GPL'd it
was safe to be incorporated into nano.

Benno



reply via email to

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