diff lisp/autorevert.el @ 90979:988f1edc9674

Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 803-805) - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-227
author Miles Bader <miles@gnu.org>
date Mon, 09 Jul 2007 08:00:55 +0000
parents 4ef881a120fe 59741e45a674
children f55f9811f5d7
line wrap: on
line diff
--- a/lisp/autorevert.el	Sun Jul 08 18:09:12 2007 +0000
+++ b/lisp/autorevert.el	Mon Jul 09 08:00:55 2007 +0000
@@ -447,20 +447,21 @@
 (defun auto-revert-tail-handler ()
   (let ((size (nth 7 (file-attributes buffer-file-name)))
 	(modified (buffer-modified-p))
-	buffer-read-only		; ignore
+	(inhibit-read-only t)		; Ignore.
 	(file buffer-file-name)
-	buffer-file-name)		; ignore that file has changed
+	(buffer-file-name nil))		; Ignore that file has changed.
     (when (> size auto-revert-tail-pos)
+      (run-hooks 'before-revert-hook)
       (undo-boundary)
       (save-restriction
 	(widen)
 	(save-excursion
 	  (goto-char (point-max))
 	  (insert-file-contents file nil auto-revert-tail-pos size)))
-      (run-mode-hooks 'after-revert-hook)
+      (run-hooks 'after-revert-hook)
       (undo-boundary)
       (setq auto-revert-tail-pos size)
-      (set-buffer-modified-p modified)))
+      (restore-buffer-modified-p modified)))
   (set-visited-file-modtime))
 
 (defun auto-revert-buffers ()
@@ -534,5 +535,5 @@
 
 (run-hooks 'auto-revert-load-hook)
 
-;;; arch-tag: f6bcb07b-4841-477e-9e44-b18678e58876
+;; arch-tag: f6bcb07b-4841-477e-9e44-b18678e58876
 ;;; autorevert.el ends here