From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Re: Unquoted special characters in regexps Date: Sun, 26 Feb 2006 11:42:03 -0600 (CST) Message-ID: <200602261742.k1QHg3d05475@raven.dms.auburn.edu> References: <4400AD8E.5050001@gmx.at> <4400BBB1.2050800@gmx.at> <200602252213.k1PMDBP24413@raven.dms.auburn.edu> <4401A98D.3070809@gmx.at> <4401E0F2.7030800@gmx.at> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1141459485 10925 80.91.229.2 (4 Mar 2006 08:04:45 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 4 Mar 2006 08:04:45 +0000 (UTC) Cc: schwab@suse.de, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 04 09:04:43 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FFRkk-00026D-GF for ged-emacs-devel@m.gmane.org; Sat, 04 Mar 2006 09:04:38 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FFRkm-0006IW-O7 for ged-emacs-devel@m.gmane.org; Sat, 04 Mar 2006 03:04:40 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FFRQq-0002YK-2q for emacs-devel@gnu.org; Sat, 04 Mar 2006 02:44:04 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FDPyu-0006Vt-Dr for emacs-devel@gnu.org; Sun, 26 Feb 2006 12:46:53 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FDPyp-0006VX-Cd for emacs-devel@gnu.org; Sun, 26 Feb 2006 12:46:49 -0500 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FDPzL-0007hl-Ha for emacs-devel@gnu.org; Sun, 26 Feb 2006 12:47:19 -0500 Original-Received: from raven.dms.auburn.edu (raven.dms.auburn.edu [131.204.53.29]) by manatee.dms.auburn.edu (8.13.3+Sun/8.13.3) with ESMTP id k1QHkbIK010139; Sun, 26 Feb 2006 11:46:37 -0600 (CST) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.7p1+Sun/8.11.7) id k1QHg3d05475; Sun, 26 Feb 2006 11:42:03 -0600 (CST) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: rudalics@gmx.at In-reply-to: <4401E0F2.7030800@gmx.at> (message from martin rudalics on Sun, 26 Feb 2006 18:10:10 +0100) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.1 (manatee.dms.auburn.edu [131.204.53.104]); Sun, 26 Feb 2006 11:46:37 -0600 (CST) 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:51133 Archived-At: Martin Rudalics wrote: >>Anyway, the first `]' has a special meaning but it's not "inside" the >>character alternative. > > > It is part of it, just like the leading '['. As a consequence, in your model "[" is a valid regexp too. What matters is the following. If you type `[' it has a special meaning if you type it _outside_ the _context_ of a character alternative. Its special meaning there is that it starts that context. Inside that special context, `[' has no special meaning. On the other hand, if you type `]' it has no special meaning _unless_ you are in the _context_ of a character alternative. Its special meaning in that context is that it ends that context. So `[' is special outside the context of a character alternative, but not inside it, `]' is special inside that context, but not outside. > It's a bug in the manual. Please fix it. I plan to do that. I just want to wait to make sure that Richard agrees. Sincerely, Luc.