all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: "Lennart Borgman \(gmail\)" <lennart.borgman@gmail.com>
Cc: Claus <claus.klingberg@gmail.com>, Emacs Devel <emacs-devel@gnu.org>
Subject: Re: [Fwd: Re: more on mumamo/php mode]
Date: Tue, 24 Jul 2007 21:01:44 -0400	[thread overview]
Message-ID: <jwvlkd5jo2h.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <46A6795E.4060405@gmail.com> (Lennart Borgman's message of "Wed\, 25 Jul 2007 00\:12\:46 +0200")

>>> "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	other threads:[~2007-07-25  1:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-22 10:50 [Fwd: Re: more on mumamo/php mode] Lennart Borgman (gmail)
2007-07-24 18:37 ` Claus
2007-07-24 20:02   ` Stefan Monnier
2007-07-24 22:12     ` Lennart Borgman (gmail)
2007-07-25  1:01       ` Stefan Monnier [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvlkd5jo2h.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=claus.klingberg@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=lennart.borgman@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.