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: Stefan Monnier
Subject: Re: find-file-noselect needs save-match-data
Date: Fri, 15 Jun 2007 10:23:52 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

>     Yes, I proposed to add `save-match-data' to a variety of file handling
>     functions at the outermost level.  The main reason for my proposal was
>     to introduce some sort of consistency among functions in files.el with
>     respect to saving match-data.

> I think that the file-manipulation functions that seem clean and
> abstract ought to call `save-match-data'.

find-file-noselect is a huge function which runs major modes, looks for
file-local variables, looks for other buffers already visiting the file,
checks the buffer if it is still uptodate w.r.t the file, ...

It's nowhere near "clean and abstract".
Anybody who expects such a large function to preserve the match-data will
basically expect *every* function to preserve the match-data.


        Stefan




reply via email to

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