emacs-devel
[Top][All Lists]
Advanced

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

Re: Missing `with' macro?


From: Richard Stallman
Subject: Re: Missing `with' macro?
Date: Tue, 08 Aug 2006 14:01:51 -0400

    OK, I've done my homework now.  The querying function is
    `ask-user-about-supersession-threat'; it's called from lock_file() in
    filelock.c, which uses get_truename_buffer() to find the buffer whose
    modification time to examine.  This means that if an existing buffer
    visiting the file is out of date, and get_truename_buffer() happens to
    return it instead of the up-to-date buffer created by `with-file', the
    supersession query will be raised.

I see.  When there is more than one candidate, get_truename_buffer
picks the one that comes first in the buffer list.  So the cleanest
solution would be to make sure it always finds with-file's buffer.

The simplest and most natural way is to put that buffer at the front
of the buffer list.  There are kludgy ways to do this from Lisp, but
the cleanest way is just to make a primitive to do it.




reply via email to

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