[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problems with latest CVS.
From: |
Luc Teirlinck |
Subject: |
Re: Problems with latest CVS. |
Date: |
Tue, 17 Feb 2004 19:10:36 -0600 (CST) |
Latest patch. (Deletes two more functions and adds to a docstring.
No other changes.) I could commit if desired.
===File ~/autorevert-newdiff================================
*** autorevert.el.~1.21.~ Mon Feb 16 20:04:45 2004
--- autorevert.el Tue Feb 17 18:25:15 2004
***************
*** 158,164 ****
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)
--- 158,169 ----
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.
! Note also that for some non-file buffers the check whether the
! buffer needs updating may be imperfect, due to efficiency
! considerations, and may not take all information listed in the
! buffer into account. Hence, a non-nil value for this option does
! not necessarily make manual updates useless for non-file buffers."
:group 'auto-revert
:type 'boolean)
***************
*** 260,312 ****
(not (memq major-mode
global-auto-revert-ignore-modes)))))
- (defun auto-revert-list-diff (a b)
- "Check if strings in list A differ from list B."
- (when (and a b)
- (setq a (sort a 'string-lessp))
- (setq b (sort b 'string-lessp))
- (let (elt1 elt2)
- (catch 'break
- (while (and (setq elt1 (and a (pop a)))
- (setq elt2 (and b (pop b))))
- (if (not (string= elt1 elt2))
- (throw 'break t)))))))
-
- (defun auto-revert-dired-file-list ()
- "Return list of dired files."
- (let (file list)
- (save-excursion
- (goto-char (point-min))
- (while (not (eobp))
- (if (setq file (dired-get-filename t t))
- (push file list))
- (forward-line 1)))
- list))
-
- (defun auto-revert-dired-changed-p ()
- "Check if dired buffer has changed."
- (when (and (stringp dired-directory)
- ;; Exclude remote buffers, would be too slow for user
- ;; modem, timeouts, network lag ... all is possible
- (not (string-match "@" dired-directory))
- (file-directory-p dired-directory))
- (let ((files (directory-files dired-directory))
- (dired (auto-revert-dired-file-list)))
- (or (not (eq (length files) (length dired)))
- (auto-revert-list-diff files dired)))))
-
(defun auto-revert-buffer-p ()
"Check if current buffer should be reverted."
! ;; - Always include dired buffers to list. It would be too expensive
;; to test the "revert" status here each time timer launches.
- ;; - Same for VC buffers.
(or (and (eq major-mode 'dired-mode)
(or (and global-auto-revert-mode
global-auto-revert-non-file-buffers)
! auto-revert-mode))
! (and (not (buffer-modified-p))
(auto-revert-vc-buffer-p))
! (and (not (buffer-modified-p))
(if (buffer-file-name)
(and (file-readable-p (buffer-file-name))
(not (verify-visited-file-modtime (current-buffer))))
--- 265,296 ----
(not (memq major-mode
global-auto-revert-ignore-modes)))))
(defun auto-revert-buffer-p ()
"Check if current buffer should be reverted."
! ;; - Always include VC buffers to list. It would be too expensive
;; to test the "revert" status here each time timer launches.
(or (and (eq major-mode 'dired-mode)
(or (and global-auto-revert-mode
global-auto-revert-non-file-buffers)
! auto-revert-mode)
! (not (buffer-modified-p))
! (stringp dired-directory)
! ;; Exclude remote buffers, would be too slow for user
! ;; modem, timeouts, network lag ... all is possible
! (not (string-match "@" dired-directory))
! (file-directory-p dired-directory)
! (file-readable-p dired-directory)
! (not (let ((attributes (file-attributes dired-directory))
! (modtime (visited-file-modtime)))
! (or (eq modtime 0)
! (not (eq (car attributes) t))
! (and (= (car (nth 5 attributes)) (car modtime))
! (= (nth 1 (nth 5 attributes)) (cdr modtime)))))))
! (and (not (eq major-mode 'dired-mode))
! (not (buffer-modified-p))
(auto-revert-vc-buffer-p))
! (and (not (eq major-mode 'dired-mode))
! (not (buffer-modified-p))
(if (buffer-file-name)
(and (file-readable-p (buffer-file-name))
(not (verify-visited-file-modtime (current-buffer))))
***************
*** 375,382 ****
(cond
((eq major-mode 'dired-mode)
;; Dired includes revert-buffer-function
! (when (and revert-buffer-function
! (auto-revert-dired-changed-p))
(setq revert t)))
((auto-revert-vc-buffer-p)
(when (auto-revert-handler-vc)
--- 359,365 ----
(cond
((eq major-mode 'dired-mode)
;; Dired includes revert-buffer-function
! (when revert-buffer-function
(setq revert t)))
((auto-revert-vc-buffer-p)
(when (auto-revert-handler-vc)
============================================================
- Problems with latest CVS., Luc Teirlinck, 2004/02/16
- Re: Problems with latest CVS., Luc Teirlinck, 2004/02/16
- Re: Problems with latest CVS., Luc Teirlinck, 2004/02/16
- Re: Problems with latest CVS., Luc Teirlinck, 2004/02/16
- Re: Problems with latest CVS., Luc Teirlinck, 2004/02/16
- Re: Problems with latest CVS., Eli Zaretskii, 2004/02/17
- Re: Problems with latest CVS., Luc Teirlinck, 2004/02/17
- Re: Problems with latest CVS., Luc Teirlinck, 2004/02/17
- Re: Problems with latest CVS., Luc Teirlinck, 2004/02/17
- Re: Problems with latest CVS., Luc Teirlinck, 2004/02/17
- Re: Problems with latest CVS.,
Luc Teirlinck <=
Re: Problems with latest CVS., Kim F. Storm, 2004/02/16