]> code.delx.au - gnu-emacs/commitdiff
(find-file-hook, auto-revert-tail-mode):
authorJason Rumney <jasonr@gnu.org>
Sat, 24 Mar 2007 13:39:21 +0000 (13:39 +0000)
committerJason Rumney <jasonr@gnu.org>
Sat, 24 Mar 2007 13:39:21 +0000 (13:39 +0000)
Use file size in bytes for auto-revert-tail-pos not characters.

lisp/autorevert.el

index bd9d6fe76e80b1805937def54d825c8ce9b3ada7..170ca4b88c2443c00880faad13b163d184ebfcca 100644 (file)
@@ -278,7 +278,7 @@ the list of old buffers.")
 (add-hook 'find-file-hook
          (lambda ()
            (set (make-local-variable 'auto-revert-tail-pos)
-                (save-restriction (widen) (1- (point-max))))))
+                (nth 7 (file-attributes buffer-file-name)))))
 
 ;; Functions:
 
@@ -341,7 +341,7 @@ Use `auto-revert-mode' for changes other than appends!"
       (add-hook 'before-save-hook (lambda () (auto-revert-tail-mode 0)) nil t)
       (or (local-variable-p 'auto-revert-tail-pos) ; don't lose prior position
          (set (make-local-variable 'auto-revert-tail-pos)
-              (save-restriction (widen) (1- (point-max)))))
+              (nth 7 (file-attributes buffer-file-name))))
       ;; let auto-revert-mode set up the mechanism for us if it isn't already
       (or auto-revert-mode
          (let ((auto-revert-tail-mode t))