nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] the default whitespace indicators


From: Mike Frysinger
Subject: Re: [Nano-devel] the default whitespace indicators
Date: Mon, 10 Mar 2014 18:04:26 -0400
User-agent: KMail/4.12.3 (Linux/3.13.0; KDE/4.12.3; x86_64; ; )

On Mon 10 Mar 2014 22:11:32 Benno Schulenberg wrote:
> On Mon, Mar 10, 2014, at 0:48, Mike Frysinger wrote:
> > and » and · when in a multibyte locale.
> 
> How to make nano check whether it's running in a multibyte
> locale?  Just have it look at the last four chars of LC_MESSAGES,
> to see whether it's "utf8"?

LC_CTYPE controls this aspect, not LC_MESSAGES.  but we don't really want to 
get into the business of parsing that as i don't believe POSIX defines the 
values well enough to rely on it.

if you look in src/rcfiles.c and look for 'Two single-column characters 
required', you should be able to use that same logic to detect whether those 
two chars are OK to use.

> Something slightly related: how about adding something like
>   color ,red " +      +"
> to several nanorc files, to highlight spaces before tabs?  The
> tabs themselves get highlighted too, which is not so good,
> but it's better than not to be warned at all.

sometimes it's valid to have them (like when you have indented comment or 
string blocks).  maybe if you put a ^ anchor it'll help reduce false 
positives:
        color ,red "^ + +"
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

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