From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Herbert Euler" Newsgroups: gmane.emacs.devel Subject: Re: find-file-noselect needs save-match-data Date: Tue, 05 Jun 2007 11:10:35 +0800 Message-ID: References: <46643852.6070709@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-Trace: sea.gmane.org 1181013054 22945 80.91.229.12 (5 Jun 2007 03:10:54 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 5 Jun 2007 03:10:54 +0000 (UTC) Cc: emacs-devel@gnu.org To: rudalics@gmx.at Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jun 05 05:10:53 2007 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 1HvPRX-0008Cx-WD for ged-emacs-devel@m.gmane.org; Tue, 05 Jun 2007 05:10:48 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HvPRX-0005pm-93 for ged-emacs-devel@m.gmane.org; Mon, 04 Jun 2007 23:10:47 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HvPRU-0005on-CM for emacs-devel@gnu.org; Mon, 04 Jun 2007 23:10:44 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HvPRS-0005oZ-Vn for emacs-devel@gnu.org; Mon, 04 Jun 2007 23:10:44 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HvPRS-0005oW-N9 for emacs-devel@gnu.org; Mon, 04 Jun 2007 23:10:42 -0400 Original-Received: from bay0-omc1-s30.bay0.hotmail.com ([65.54.246.102]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HvPRS-00042s-9h for emacs-devel@gnu.org; Mon, 04 Jun 2007 23:10:42 -0400 Original-Received: from hotmail.com ([65.55.154.108]) by bay0-omc1-s30.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2668); Mon, 4 Jun 2007 20:10:41 -0700 Original-Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Mon, 4 Jun 2007 20:10:41 -0700 Original-Received: from 65.55.154.123 by by143fd.bay143.hotmail.msn.com with HTTP; Tue, 05 Jun 2007 03:10:35 GMT X-Originating-IP: [202.165.107.100] X-Originating-Email: [herberteuler@hotmail.com] X-Sender: herberteuler@hotmail.com In-Reply-To: <46643852.6070709@gmx.at> X-OriginalArrivalTime: 05 Jun 2007 03:10:41.0333 (UTC) FILETIME=[19481E50:01C7A71F] X-detected-kernel: Windows 2000 SP4, XP SP1+ 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:72253 Archived-At: >While you're there, could you look at some other functions in >files.el as well? At least `convert-standard-filename', >`file-truename', `file-name-sans-versions', `insert-directory', >could benefit from `save-match-data' too. I just got a possibly wrong idea today morning. The error happens in the case that some command, which changes the match data, is added into a hook. When the hook is executed, the match data is also changed. Now, if we could assume that _hooks shall not change the match data_, we can save and restore the match data automatically when we run hooks. I am not sure about this assumption, though. Adding `save-match-data' to functions one by one works, but it is difficult to check all of the functions, and it is not the overall solution. How do you think? Regards, Guanpeng Xu _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/