From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ulrich Mueller Newsgroups: gmane.emacs.devel Subject: Re: Case mapping of sharp s Date: Mon, 30 Nov 2009 08:01:32 +0100 Message-ID: <19219.28108.775726.216289@a1i15.kph.uni-mainz.de> References: <4B05A11F.5000700@gmx.de> <4B05D3EE.2000101@gmx.de> <4B0759BA.2010303@gmx.de> <19207.50135.691132.983395@a1i15.kph.uni-mainz.de> <4B0C32BF.2020708@gmx.de> <87ljhpau88.fsf@mail.jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1259564531 18298 80.91.229.12 (30 Nov 2009 07:02:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 30 Nov 2009 07:02:11 +0000 (UTC) Cc: emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 30 08:02:04 2009 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 1NF0Gp-00038w-Sl for ged-emacs-devel@m.gmane.org; Mon, 30 Nov 2009 08:02:04 +0100 Original-Received: from localhost ([127.0.0.1]:58170 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NF0Gp-0005VL-7y for ged-emacs-devel@m.gmane.org; Mon, 30 Nov 2009 02:02:03 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NF0Gf-0005Uv-UQ for emacs-devel@gnu.org; Mon, 30 Nov 2009 02:01:53 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NF0Ga-0005To-Ip for emacs-devel@gnu.org; Mon, 30 Nov 2009 02:01:52 -0500 Original-Received: from [199.232.76.173] (port=58793 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NF0Ga-0005Tl-9K for emacs-devel@gnu.org; Mon, 30 Nov 2009 02:01:48 -0500 Original-Received: from a1iwww1.kph.uni-mainz.de ([134.93.134.1]:40675) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NF0GZ-0008Bn-K9 for emacs-devel@gnu.org; Mon, 30 Nov 2009 02:01:47 -0500 Original-Received: from a1i15.kph.uni-mainz.de (a1i15.kph.uni-mainz.de [134.93.134.92]) by a1iwww1.kph.uni-mainz.de (8.14.0/8.13.4) with ESMTP id nAU71X6j018686; Mon, 30 Nov 2009 08:01:33 +0100 Original-Received: from a1i15.kph.uni-mainz.de (localhost [127.0.0.1]) by a1i15.kph.uni-mainz.de (8.14.3/8.14.2) with ESMTP id nAU71WpM005073; Mon, 30 Nov 2009 08:01:32 +0100 Original-Received: (from ulm@localhost) by a1i15.kph.uni-mainz.de (8.14.3/8.14.3/Submit) id nAU71WGW005070; Mon, 30 Nov 2009 08:01:32 +0100 In-Reply-To: <87ljhpau88.fsf@mail.jurta.org> X-Mailer: VM 8.0.12 under 23.1.1 (x86_64-pc-linux-gnu) X-MIME-Autoconverted: from 8bit to quoted-printable by a1iwww1.kph.uni-mainz.de id nAU71X6j018686 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 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:117959 Archived-At: >>>>> On Mon, 30 Nov 2009, Juri Linkov wrote: > BTW, does anyone know how to put a set of characters into one > category for the purpose of searching, without affecting case > mapping? I.e. to not change the current case mappings, but allow a > character from one category to match all other characters from the > same category. > `set-case-syntax-pair' is not suitable because it does this only for > a pair of characters and also changes case mappings. > Of course, it's possible to search with a regexp that matches a > character set in [...], or more convenient when a space in a regexp > is substituted with a set of characters from `search-spaces-regexp'. > I can't find a function like `set-case-syntax-pair' that would > define a set of equivalent characters for the search, so maybe this > is not possible. I'm not sure if it's exactly what you need, but I use the following to search for characters while ignoring any accents: (let ((eqv-list '("aA=E0=C0=E1=C1=E2=C2=E3=C3=E4=C4=E5=C5" "cC=E7=C7" "eE=E8=C8=E9=C9=EA=CA=EB=CB" "iI=EC=CC=ED=CD=EE=CE=EF=CF" "nN=F1=D1" "oO=F2=D2=F3=D3=F4=D4=F5=D5=F6=D6=F8=D8" "uU=F9=D9=FA=DA=FB=DB=FC=DC" "yY=FD=DD=FF")) (table (standard-case-table)) canon) (setq canon (copy-sequence table)) (mapcar (lambda (s) (mapcar (lambda (c) (aset canon c (aref s 0))) s)) eqv-list) (set-char-table-extra-slot table 1 canon) (set-char-table-extra-slot table 2 nil) (set-standard-case-table table)) I don't know if there is a simpler way to achieve this. See also the following thread, from 1994 :-) Ulrich