summaryrefslogtreecommitdiff
path: root/lisp/autorevert.el
diff options
context:
space:
mode:
authorJason Rumney <jasonr@gnu.org>2007-03-24 13:39:21 +0000
committerJason Rumney <jasonr@gnu.org>2007-03-24 13:39:21 +0000
commitced3c1e229c74188440c1adba3c231f2aa24e130 (patch)
treec9cc6c6dccee5a0ceeff8302a619acae942d6973 /lisp/autorevert.el
parent2eed4e682464ff6f2c7c89444ca54ccd0b2743a9 (diff)
downloademacs-ced3c1e229c74188440c1adba3c231f2aa24e130.tar.gz
(find-file-hook, auto-revert-tail-mode):
Use file size in bytes for auto-revert-tail-pos not characters.
Diffstat (limited to 'lisp/autorevert.el')
-rw-r--r--lisp/autorevert.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/autorevert.el b/lisp/autorevert.el
index bd9d6fe76e8..170ca4b88c2 100644
--- a/lisp/autorevert.el
+++ b/lisp/autorevert.el
@@ -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))