From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: Unquoted special characters in regexps Date: Sun, 26 Feb 2006 20:06:45 +0100 Message-ID: <4401FC45.1030608@gmx.at> References: <4400AD8E.5050001@gmx.at> <4400BBB1.2050800@gmx.at> <200602252213.k1PMDBP24413@raven.dms.auburn.edu> <4401A98D.3070809@gmx.at> <4401E0F2.7030800@gmx.at> <200602261742.k1QHg3d05475@raven.dms.auburn.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1141015901 31241 80.91.229.2 (27 Feb 2006 04:51:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 27 Feb 2006 04:51:41 +0000 (UTC) Cc: schwab@suse.de, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 27 05:51:39 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 1FDaMF-0004RH-1U for ged-emacs-devel@m.gmane.org; Mon, 27 Feb 2006 05:51:39 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FDaMF-0001OT-OG for ged-emacs-devel@m.gmane.org; Sun, 26 Feb 2006 23:51:42 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FDRF0-00044B-62 for emacs-devel@gnu.org; Sun, 26 Feb 2006 14:07:34 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FDREo-00041Q-J7 for emacs-devel@gnu.org; Sun, 26 Feb 2006 14:07:23 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FDREf-0003z8-3i for emacs-devel@gnu.org; Sun, 26 Feb 2006 14:07:15 -0500 Original-Received: from [213.165.64.20] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.52) id 1FDRFB-0003xT-NI for emacs-devel@gnu.org; Sun, 26 Feb 2006 14:07:46 -0500 Original-Received: (qmail invoked by alias); 26 Feb 2006 19:07:04 -0000 Original-Received: from N868P031.adsl.highway.telekom.at (EHLO [62.47.52.127]) [62.47.52.127] by mail.gmx.net (mp038) with SMTP; 26 Feb 2006 20:07:04 +0100 X-Authenticated: #14592706 User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en Original-To: Luc Teirlinck In-Reply-To: <200602261742.k1QHg3d05475@raven.dms.auburn.edu> X-Y-GMX-Trusted: 0 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:51006 Archived-At: > 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. In mathematics `(3 + 4' is a silly expression just like `3 + 4)'. In Lisp `(+ 3 4' is invalid just like `+ 3 4)'. A regular expression interpretation machine shouldn't handle expressions differently. By the way try to evaluate (regexp-opt (list "foo]" "bar]")) You want to patch `regexp-opt.el' too?