emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: find-file-noselect needs save-match-data


From: David Kastrup
Subject: Re: find-file-noselect needs save-match-data
Date: Fri, 15 Jun 2007 22:03:28 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>>     Actually, I'd even argue against any such new function, on the grounds
>>     that it's solving a non-problem, i.e. it will just add new functions,
>>     new code, new complexity for no real benefit.
>
>> This function is good because it will enable programmers to DTRT in a
>> simpler way in many cases.
>
> I fail to see the simplicity.  All the difficulty comes from having to think
> about when to be careful about the match-data.
>
> After that, there is no real difference whether the problem is solved by
> save-match-data or fast-string-match or some extra argument to string-match
> or by let-binding inihibit-match-data.

Apropos: it appears to have been lost in the noise: save-match-data in
its current implementation is _not_ a noop around code not touching
match-data, since it converts integer data into markers (which move
their positions under buffer changes) and then back again.  Is there a
compelling rationale for that?  If not: now would be the time to
change this.  We have quite a lot of time to figure out whether this
change causes unexpected problems for someone.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

[Prev in Thread] Current Thread [Next in Thread]