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

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

Re: global-auto-revert-mode and VC modeline: no CVS rev. update


From: Stefan Monnier
Subject: Re: global-auto-revert-mode and VC modeline: no CVS rev. update
Date: 25 Jun 2001 17:34:24 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.0.104

>>>>> "Jakub" == Jakub Narebski <address@hidden> writes:
> I wanted to get rid of it, and used M-x global-auto-revert-mode. It
> reverts buffer from file after commit, but _does not_ update CVS revision
> info in the mode line. That's strange, because M-x revert-buffer does that
> (and refontifies buffer as well).

I believe the reason is that M-x revert-buffer will happily throw away
any minor-mode you currently have (which is OK since you asked explicitly
to revert the buffer), while auto-revert is being a bit more conservative
and tries to only revert the buffer's content without changing the
major/minor modes.

So I'd say it's a bug in auto-revert.  You can try the patch below.


        Stefan

--- autorevert.el       2001/03/26 11:13:14     1.13
+++ autorevert.el       2001/06/25 21:32:47
@@ -342,7 +309,10 @@
                                auto-revert-mode))))
                (if auto-revert-verbose
                    (message "Reverting buffer `%s'." buf))
-               (revert-buffer t t t)))
+               (revert-buffer 'ignore-auto 'dont-ask 'preserve-modes)
+               ;; `preserve-modes' avoids changing the (minor) modes.  But we
+               ;; do want to reset the mode for VC, so we do it explicitly.
+               (vc-find-file-hook)))
          ;; Remove dead buffer from `auto-revert-buffer-list'.
          (setq auto-revert-buffer-list
                (delq buf auto-revert-buffer-list))))



reply via email to

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