From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.bugs Subject: Re: symbol-macrolet clobbers (match-data), bug or feature? Date: Wed, 15 Aug 2007 21:08:15 -0400 Message-ID: References: <1187124191.406368.291750@x40g2000prg.googlegroups.com> Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1187226354 1692 80.91.229.12 (16 Aug 2007 01:05:54 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 16 Aug 2007 01:05:54 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org To: Howard Yeh! Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 16 03:05:50 2007 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1ILTnQ-0000Nv-St for geb-bug-gnu-emacs@m.gmane.org; Thu, 16 Aug 2007 03:05:21 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ILTnQ-0001sU-7p for geb-bug-gnu-emacs@m.gmane.org; Wed, 15 Aug 2007 21:05:08 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ILTmx-0001cM-5K for bug-gnu-emacs@gnu.org; Wed, 15 Aug 2007 21:04:39 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ILTmw-0001bq-EB for bug-gnu-emacs@gnu.org; Wed, 15 Aug 2007 21:04:38 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ILTmw-0001bm-5Y for bug-gnu-emacs@gnu.org; Wed, 15 Aug 2007 21:04:38 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1ILTmv-0003Hc-OU for bug-gnu-emacs@gnu.org; Wed, 15 Aug 2007 21:04:37 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1ILTqR-0002VO-D7; Wed, 15 Aug 2007 21:08:15 -0400 In-reply-to: <1187124191.406368.291750@x40g2000prg.googlegroups.com> (message from Howard Yeh! on Tue, 14 Aug 2007 20:43:11 -0000) X-Detected-Kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:16367 Archived-At: This is an interesting idea, but I'd rather it be implemented in a way that does not require loading CL, and not using symbol-macrolet. One way to do that is to write a list of variables to bind to certain match values, like this: (r=~ "\\(abc\\)\\(efg\\)?" "abcefg" ((s0 b0 e0) (s1) (s2)) (list (match-data) b0 e0 s0 s1 s2)) which would be equivalent to your (r=~ "\\(abc\\)\\(efg\\)?" "abcefg" (list (match-data) <0 >0 $0 $1 $2))