[Top][All Lists]

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

[Nano-devel] treating underscore as alphanumeric

From: Benno Schulenberg
Subject: [Nano-devel] treating underscore as alphanumeric
Date: Fri, 21 Mar 2014 17:15:58 +0100

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;

Maybe this should be made dependent upon a settable option, say
"underscores", but I think underscore is so much considered a
substitute alphanumeric, that this won't be necessary.

What do you say?


-- - IMAP accessible web-mail

reply via email to

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