]> code.delx.au - gnu-emacs/blobdiff - lisp/autorevert.el
*** empty log message ***
[gnu-emacs] / lisp / autorevert.el
index 55038391f5d08cdaf65124cb3051f7789ecd5253..de07345f21c7fb8efb356cc682eb2c5400dba242 100644 (file)
@@ -1,11 +1,11 @@
-;;; autorevert --- revert buffers when files on disk change
+;;; autorevert.el --- revert buffers when files on disk change
 
-;; Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 1998, 1999, 2001 Free Software Foundation, Inc.
 
-;; Author: Anders Lindgren <andersl@csd.uu.se>
+;; Author: Anders Lindgren <andersl@andersl.com>
 ;; Keywords: convenience
-;; Created: 1 Jun 1997
-;; Date: 3 Jul 1997
+;; Created: 1997-06-01
+;; Date: 1999-11-30
 
 ;; This file is part of GNU Emacs.
 
@@ -97,6 +97,7 @@ Global Auto-Revert Mode applies to all buffers."
 Never set this variable directly, use the command `auto-revert-mode'
 instead.")
 
+;;;###autoload
 (defcustom global-auto-revert-mode nil
   "When on, buffers are automatically reverted when files on disk change.
 
@@ -163,16 +164,6 @@ When non-nil, both file buffers and buffers with a custom
   :group 'auto-revert
   :type 'boolean)
 
-(defcustom global-auto-revert-non-file-buffers nil
-  "When nil only file buffers are reverted by Global Auto-Revert Mode.
-
-When non-nil, both file buffers and buffers with a custom
-`revert-buffer-function' are reverted by Global Auto-Revert Mode.
-
-Use this option with care since it could lead to excessive reverts."
-  :group 'auto-revert
-  :type 'boolean)
-
 (defcustom global-auto-revert-ignore-modes '()
   "List of major modes Global Auto-Revert Mode should not check."
   :group 'auto-revert
@@ -237,7 +228,8 @@ Use `global-auto-revert-mode' to automatically revert all buffers."
   (auto-revert-set-timer)
   (when auto-revert-mode
     (auto-revert-buffers)
-    (run-hooks 'auto-revert-mode-hook)))
+    (run-hooks 'auto-revert-mode-hook))
+  auto-revert-mode)
 
 
 ;;;###autoload
@@ -350,7 +342,7 @@ the timer when no buffers need to be checked."
                                auto-revert-mode))))
                (if auto-revert-verbose
                    (message "Reverting buffer `%s'." buf))
-               (revert-buffer t t)))
+               (revert-buffer t t t)))
          ;; Remove dead buffer from `auto-revert-buffer-list'.
          (setq auto-revert-buffer-list
                (delq buf auto-revert-buffer-list))))
@@ -381,4 +373,4 @@ the timer when no buffers need to be checked."
 (if global-auto-revert-mode
     (global-auto-revert-mode 1))
 
-;; autorevert.el ends here.
+;;; autorevert.el ends here