From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [Fwd: Re: more on mumamo/php mode] Date: Tue, 24 Jul 2007 21:01:44 -0400 Message-ID: References: <46A3367A.6010000@gmail.com> <46A6795E.4060405@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1185325316 19446 80.91.229.12 (25 Jul 2007 01:01:56 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 25 Jul 2007 01:01:56 +0000 (UTC) Cc: Claus , Emacs Devel To: "Lennart Borgman \(gmail\)" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 25 03:01:54 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IDVGC-0005pF-Nm for ged-emacs-devel@m.gmane.org; Wed, 25 Jul 2007 03:01:52 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IDVGC-0008Oy-5y for ged-emacs-devel@m.gmane.org; Tue, 24 Jul 2007 21:01:52 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IDVG9-0008Oq-1j for emacs-devel@gnu.org; Tue, 24 Jul 2007 21:01:49 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IDVG6-0008Oe-Jv for emacs-devel@gnu.org; Tue, 24 Jul 2007 21:01:47 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IDVG6-0008Ob-FS for emacs-devel@gnu.org; Tue, 24 Jul 2007 21:01:46 -0400 Original-Received: from bc.sympatico.ca ([209.226.175.184] helo=tomts22-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IDVG5-0007Hx-Uo for emacs-devel@gnu.org; Tue, 24 Jul 2007 21:01:46 -0400 Original-Received: from ceviche.home ([70.53.195.145]) by tomts22-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20070725010145.LHKU18413.tomts22-srv.bellnexxia.net@ceviche.home> for ; Tue, 24 Jul 2007 21:01:45 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id C44CBB4010; Tue, 24 Jul 2007 21:01:44 -0400 (EDT) In-Reply-To: <46A6795E.4060405@gmail.com> (Lennart Borgman's message of "Wed\, 25 Jul 2007 00\:12\:46 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) X-detected-kernel: Solaris 8 (1) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:75504 Archived-At: >>> "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