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: Herbert Euler
Subject: Re: find-file-noselect needs save-match-data
Date: Tue, 05 Jun 2007 11:10:35 +0800

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/





reply via email to

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