jed-users mailing list

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

Re: Problem with define_word


Paul Lamb <pal@xxxxxxxxxxxxxx> wrote:
>Please note, in particular the line,
>
>   define_word("-\\\"!#$%&'()*+,./0-9:;<=>?@A-Z[]^_a-z{|}~");

For slang-2, you will need to use:

   define_word("-\\\\\"!#$%&'()*+,./0-9:;<=>?@A-Z[]^_a-z{|}~");

Without the extra set of backslashes, slang-2.0.7 will produce an
"invalid character class" error.  The support for unicode necessitated
the introduction of character classes as a way of defining character
attributes.  In your case, the define_word function is interpreting
the character combination \" as a character class, which is invalid.
The extra set of backslashes is necessary to quote the \ character.

The following character classes are supported:

    \w matches a unicode "word" character, taken to be alphanumeric.
    \a alphabetic character, excluding digits
    \s matches whitespace
    \l matches lowercase
    \u matches uppercase
    \d matches a digit
    \\ matches a backslash
    \^ matches a ^ character

Does this change solve the problem?
Thanks,
--John

--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


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