emacs-devel
[Top][All Lists]
Advanced

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

Re: [Fwd: Re: more on mumamo/php mode]


From: Stefan Monnier
Subject: Re: [Fwd: Re: more on mumamo/php mode]
Date: Tue, 24 Jul 2007 21:01:44 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

>>> "I found why this error happens. In the recent CVS Emacs, as
>>> utf-translate-cjk-mode is on by default, some Unicode characters will
>>> be decoded into one of CJK character set. But, as
>>> xsdre-range-list-to-char-alternative (xsd-regexp.el) simply do
>>> something like this to generate a character range: (format "%c-%c"
>>> (decode-char 'ucs FROM) (decode-char 'ucs TO)) the resulting regexp
>>> causes the above error."
>> 
>> What it should do instead is to loop over all chars between FROM and TO and
>> add them one by one.  Character-ranges in regexps work rather poorly in
>> such cases.
>> 
>>> The patch below is supposingly fixing this issue (and is working for
>>> me).
>> 
>> It works around the problem, but will most likely break the use of those
>> CJK chars.


> There are too much things I do not understand here. Could please you or
> someone else who understands this write the needed code?

As I said above, you just need to enumerate the chars individually rather
than use char-ranges in regexps.  I.e. you ned to replace things like "a-d"
with "abcd".  It may result in absurdly large regexps and it may be
a problem in itself, but in that case the only better solution would be to
restructure the code so as not to use regexps, or use category classes or
something like that.


        Stefan




reply via email to

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