]> code.delx.au - gnu-emacs/blobdiff - lisp/autorevert.el
Improve documentation of 'with-eval-after-load'
[gnu-emacs] / lisp / autorevert.el
index 17fa43a6d1ea3e4795e5600414f4b08585caf3b3..b7f1f3691f0bf2e6b03528e768a2abe35cd901ef 100644 (file)
@@ -1,6 +1,6 @@
 ;;; autorevert.el --- revert buffers when files on disk change  -*- lexical-binding:t -*-
 
-;; Copyright (C) 1997-1999, 2001-2015 Free Software Foundation, Inc.
+;; Copyright (C) 1997-1999, 2001-2016 Free Software Foundation, Inc.
 
 ;; Author: Anders Lindgren
 ;; Keywords: convenience
@@ -458,7 +458,11 @@ specifies in the mode line."
   :global t :group 'auto-revert :lighter global-auto-revert-mode-text
   (auto-revert-set-timer)
   (if global-auto-revert-mode
-      (auto-revert-buffers)
+      (progn
+        ;; Disable file notification because it could use too many resources.
+        ;; See Bug#22814.
+        (setq auto-revert-use-notify nil)
+        (auto-revert-buffers))
     (dolist (buf (buffer-list))
       (with-current-buffer buf
        (when auto-revert-use-notify
@@ -664,8 +668,8 @@ This is an internal function used by Auto-Revert Mode."
                  (not (eq revert 'fast)))
         (message "Reverting buffer `%s'." (buffer-name)))
       ;; If point (or a window point) is at the end of the buffer, we
-      ;; want to keep it at the end after reverting.  This allows to
-      ;; tail a file.
+      ;; want to keep it at the end after reverting.  This allows one
+      ;; to tail a file.
       (when buffer-file-name
         (setq eob (eobp))
         (walk-windows