jed-users mailing list

[2012 Date Index] [2012 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: [Jed-users-l] Invalid character class?


Mike McClain <mike.junk@xxxxxxxxxxx> wrote:
> private variable non_white = "-A-Za-z0-9~!@#$%^&*()_+=}{\]\[:';|\\\?><,./" + "\"";
> define_word(non_white);
>
> Gives this error when skip_word executed:
>     Invalid character class?

The documentation for define_word needs to be updated to reflect the
fact that it now makes use of the SLwchar functions from the slang
library.  You can use the documentation for the strtrans function to
see how the word string should be formatted.

In your case, the problem is with the backslash characters.  In
particular, this combination: "\\\?".  The slang parser interprets the
"\\" pair as a single "\", and "\?" as just "?".  As a result, the C
code for define_word will see "\?", which will get passed on to the
SLwchar_strtolut function for processing.  This function is the one
that is generating the error since it does not recognize "\?" as a
valid character class (see the strtrans documentation).

It seems that you may want to use:

   private variable non_white = "\\g";  % unicode graphic character
   define_word (non_white);

--John
_______________________________________________
Jed-users-l mailing list
Jed-users-l@xxxxxxxx
http://mailman.jtan.com/mailman/listinfo/jed-users-l


[2012 date index] [2012 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]