help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: No query at autorevert


From: Kevin Rodgers
Subject: Re: No query at autorevert
Date: Wed, 24 May 2006 09:39:18 -0600
User-agent: Thunderbird 1.5.0.2 (Windows/20060308)

Florian Kaufmann wrote:
I try to enable the global auto revert mode. But I'd like XEmacs to ask
me whether it should really revert a buffer in the case it detects that
the file on disk has changed. So I wrote in my init.el file
(global-auto-revert-mode 1)
and in my custom.el file
(custom-set-variables
  '(revert-without-query (quote (""))))

Now auto revert works, the buffers are reverted if they are changed
outside XEmacs, however I never get queried if i really want to revert
the buffer. Any ideas?

By "really want to revert the buffer" do you mean "explicitly revert
the buffer (via `M-x' or the menu bar File menu)"?

If so:

(defadvice revert-buffer (around query activate)
  "Always query when invoked by the user."
  (let ((revert-without-query (if (interactive-p)
                                  nil
                                revert-without-query)))
    ad-do-it))

--
Kevin





reply via email to

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