|
From: | Herbert Euler |
Subject: | Re: find-file-noselect needs save-match-data |
Date: | Sun, 10 Jun 2007 08:11:47 +0800 |
Since most applications do not use the match data in practice, I think if an application use the match data, it should require it explicitly. I.e., please take a look at the following: ;; Normal applications (no use of match data). (if (string-match "foo" bar) ;; True branch. ;; False branch.) (foo-bar) ;; Applications that use match-data. (if (string-match "foo" bar) (with-match-data (match-data) ;; True branch.) ;; No need to use `with-match-data' here, since there is no ;; match data. ;; False branch.) (foo-bar)
And of course functions like `string-match' do not set match data by default, as if `inhibit-match-data' is turned on by default. Regards, Guanpeng Xu _________________________________________________________________Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
[Prev in Thread] | Current Thread | [Next in Thread] |