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: category codes and regexps Date: Mon, 26 Jul 2004 08:59:57 +0900 (JST) Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: <200407252359.IAA03317@etlken.m17n.org> References: <20040725.225927.239650643.wl@gnu.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: sea.gmane.org 1090800055 24233 80.91.224.253 (26 Jul 2004 00:00:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 26 Jul 2004 00:00:55 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 26 02:00:44 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Bosv5-0003LI-00 for ; Mon, 26 Jul 2004 02:00:44 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Bosy6-00055l-4C for ged-emacs-devel@m.gmane.org; Sun, 25 Jul 2004 20:03:50 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1Bosy0-00055g-A8 for emacs-devel@gnu.org; Sun, 25 Jul 2004 20:03:44 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1Bosxy-00052K-39 for emacs-devel@gnu.org; Sun, 25 Jul 2004 20:03:44 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Bosxy-00052G-0K for emacs-devel@gnu.org; Sun, 25 Jul 2004 20:03:42 -0400 Original-Received: from [192.47.44.130] (helo=tsukuba.m17n.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1BosuV-0000ko-5G; Sun, 25 Jul 2004 20:00:07 -0400 Original-Received: from fs.m17n.org (fs.m17n.org [192.47.44.2]) by tsukuba.m17n.org (8.12.3/8.12.3/Debian-6.6) with ESMTP id i6PNxwPi016610; Mon, 26 Jul 2004 08:59:58 +0900 Original-Received: from etlken.m17n.org (etlken.m17n.org [192.47.44.125]) by fs.m17n.org (8.11.6p2/8.11.6) with ESMTP id i6PNxvU19431; Mon, 26 Jul 2004 08:59:57 +0900 (JST) Original-Received: (from handa@localhost) by etlken.m17n.org (8.8.8+Sun/3.7W-2001040620) id IAA03317; Mon, 26 Jul 2004 08:59:57 +0900 (JST) Original-To: wl@gnu.org In-reply-to: <20040725.225927.239650643.wl@gnu.org> (message from Werner LEMBERG on Sun, 25 Jul 2004 22:59:27 +0200 (CEST)) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.3 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI) 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: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:25957 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:25957 In article <20040725.225927.239650643.wl@gnu.org>, Werner LEMBERG writes: > Assume that I want to check a buffer for characters which aren't Thai, > and which aren't in the range a-z. My first idea was this: > [^\cta-z] > This fails because `\' isn't special within [...]. What's the correct > (interactive) way to do that? I tried hard without finding a regexp > which can handle this. Unfortunately [...] can't be used with category nor syntax. [ ^ a - z ESC : (insert (make-char 'thai-tis620 #x20)) RET - ESC : (insert (make-char 'thai-tis620 #x7f)) RET ] will produce a regex that you want. Another way is to make a new category (say, menumonic `T') that contains a-z and Thai. Then you can specify: \CT --- Ken'ichi HANDA handa@m17n.org