[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nano-devel] treating underscore as alphanumeric
From: |
Eitan Adler |
Subject: |
Re: [Nano-devel] treating underscore as alphanumeric |
Date: |
Fri, 21 Mar 2014 09:41:26 -0700 |
On 21 March 2014 09:15, Benno Schulenberg <address@hidden> wrote:
>
> Hi all,
>
> Having bound the functions prevword and nextword to other keys
> so they are now accessible to me, I find they don't quite behave
> as I would wish, both with wordbounds set and unset.
>
> With wordbounds set, it will treat all punctuation characters as
> alphanumeric, so when encountering "function(variable, other)"
> it will jump from function to other, but I want it to jump from
> function to variable. It does that when wordbounds is unset,
> but then it will treat for example "MB_CUR_MAX" as three words --
> not what I want either.
>
> So I would like to propose to add in src/chars.c, to the function
> is_alnum_mbchar(), this:
>
> if (strncmp((const char*)c, "_", 1) == 0)
> return TRUE;
I have no opinion on the feature. It may be nicer to write this is
if (*c == '_') return TRUE; instead of using strncmp.
--
Eitan Adler