From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: regex and case-fold-search problem Date: Fri, 30 Aug 2002 10:11:51 +0900 (JST) Sender: emacs-devel-admin@gnu.org Message-ID: <200208300111.KAA04337@etlken.m17n.org> References: <200208230625.PAA23426@etlken.m17n.org> <200208262151.g7QLpfA12782@wijiji.santafe.edu> <200208290853.RAA03185@etlken.m17n.org> <5x8z2pj13t.fsf@kfs2.cua.dk> <200208291338.WAA03607@etlken.m17n.org> <200208291600.g7TG0NZ11087@rum.cs.yale.edu> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: main.gmane.org 1030670057 18345 127.0.0.1 (30 Aug 2002 01:14:17 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 30 Aug 2002 01:14:17 +0000 (UTC) Cc: storm@cua.dk, rms@gnu.org, emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17kaMX-0004lV-00 for ; Fri, 30 Aug 2002 03:14:13 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17kat3-0004tG-00 for ; Fri, 30 Aug 2002 03:47:49 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17kaNu-0002ZA-00; Thu, 29 Aug 2002 21:15:38 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17kaKQ-0001tq-00 for emacs-devel@gnu.org; Thu, 29 Aug 2002 21:12:02 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17kaKO-0001ta-00 for emacs-devel@gnu.org; Thu, 29 Aug 2002 21:12:01 -0400 Original-Received: from tsukuba.m17n.org ([192.47.44.130]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17kaKL-0001tK-00; Thu, 29 Aug 2002 21:11:58 -0400 Original-Received: from fs.m17n.org (fs.m17n.org [192.47.44.2]) by tsukuba.m17n.org (8.11.6/3.7W-20010518204228) with ESMTP id g7U1Bql17141; Fri, 30 Aug 2002 10:11:52 +0900 (JST) (envelope-from handa@m17n.org) Original-Received: from etlken.m17n.org (etlken.m17n.org [192.47.44.125]) by fs.m17n.org (8.11.3/3.7W-20010823150639) with ESMTP id g7U1Bp922110; Fri, 30 Aug 2002 10:11:51 +0900 (JST) Original-Received: (from handa@localhost) by etlken.m17n.org (8.8.8+Sun/3.7W-2001040620) id KAA04337; Fri, 30 Aug 2002 10:11:51 +0900 (JST) Original-To: monnier+gnu/emacs@rum.cs.yale.edu In-Reply-To: <200208291600.g7TG0NZ11087@rum.cs.yale.edu> (monnier+gnu/emacs@rum.cs.yale.edu) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.1.30 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:7140 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:7140 In article <200208291600.g7TG0NZ11087@rum.cs.yale.edu>, "Stefan Monnier" writes: > Two things: > - Neither `upper(lower(x)) = x' nor `lower(upper(x)) = x' are guaranteed. > - The regexp matcher right now only has access to one of the two tables > (I believe it's the `lower' but I'm not even sure) and so two chars > are deemed to match if translate(a) = translate(b). > The first might be a non-issue, I don't know. There's an EQUIVALENCES table. It seems that the documentation of set-case-table says that: X and Y match in case-fold-search if: equiv(X) == Y or equiv(equiv(X)) == Y or equiv(equiv(equiv(X))) == Y or ... Correct? > The second is more serious because that means that if we want to use > `upper' we'll need to somehow pass that table as well, which requires > changing the interface to the reg-matching functions. TRANSLATE table is passed as the member `tranlate' of re_pattern_buffer. Instead of setting it to lowercase table, we can set it to the case-table itself that has upcase, canon, and equiv tables in the extra slots. Or, if we can use EQUIVALENCES table as above, what we need is only that table. --- Ken'ichi HANDA handa@etl.go.jp