emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/autorevert.el


From: Luc Teirlinck
Subject: [Emacs-diffs] Changes to emacs/lisp/autorevert.el
Date: Wed, 01 Jun 2005 16:51:03 -0400

Index: emacs/lisp/autorevert.el
diff -c emacs/lisp/autorevert.el:1.49 emacs/lisp/autorevert.el:1.50
*** emacs/lisp/autorevert.el:1.49       Mon Apr  4 08:51:19 2005
--- emacs/lisp/autorevert.el    Wed Jun  1 20:51:03 2005
***************
*** 484,529 ****
  This function is also responsible for removing buffers no longer in
  Auto-Revert mode from `auto-revert-buffer-list', and for canceling
  the timer when no buffers need to be checked."
!   (let ((bufs (if global-auto-revert-mode
!                 (buffer-list)
!               auto-revert-buffer-list))
!       (remaining ())
!       (new ()))
!     ;; Partition `bufs' into two halves depending on whether or not
!     ;; the buffers are in `auto-revert-remaining-buffers'.  The two
!     ;; halves are then re-joined with the "remaining" buffers at the
!     ;; head of the list.
!     (dolist (buf auto-revert-remaining-buffers)
!       (if (memq buf bufs)
!         (push buf remaining)))
!     (dolist (buf bufs)
!       (if (not (memq buf remaining))
!         (push buf new)))
!     (setq bufs (nreverse (nconc new remaining)))
!     (while (and bufs
!               (not (and auto-revert-stop-on-user-input
!                         (input-pending-p))))
!       (let ((buf (car bufs)))
!       (if (buffer-name buf)           ; Buffer still alive?
!           (with-current-buffer buf
!             ;; Test if someone has turned off Auto-Revert Mode in a
!             ;; non-standard way, for example by changing major mode.
!             (if (and (not auto-revert-mode)
!                      (not auto-revert-tail-mode)
!                      (memq buf auto-revert-buffer-list))
!                 (setq auto-revert-buffer-list
!                       (delq buf auto-revert-buffer-list)))
!             (when (auto-revert-active-p) (auto-revert-handler)))
!         ;; Remove dead buffer from `auto-revert-buffer-list'.
!         (setq auto-revert-buffer-list
!               (delq buf auto-revert-buffer-list))))
!       (setq bufs (cdr bufs)))
!     (setq auto-revert-remaining-buffers bufs)
!     ;; Check if we should cancel the timer.
!     (when (and (not global-auto-revert-mode)
!              (null auto-revert-buffer-list))
!       (cancel-timer auto-revert-timer)
!       (setq auto-revert-timer nil))))
  
  
  ;; The end:
--- 484,530 ----
  This function is also responsible for removing buffers no longer in
  Auto-Revert mode from `auto-revert-buffer-list', and for canceling
  the timer when no buffers need to be checked."
!   (save-match-data
!     (let ((bufs (if global-auto-revert-mode
!                   (buffer-list)
!                 auto-revert-buffer-list))
!         (remaining ())
!         (new ()))
!       ;; Partition `bufs' into two halves depending on whether or not
!       ;; the buffers are in `auto-revert-remaining-buffers'.  The two
!       ;; halves are then re-joined with the "remaining" buffers at the
!       ;; head of the list.
!       (dolist (buf auto-revert-remaining-buffers)
!       (if (memq buf bufs)
!           (push buf remaining)))
!       (dolist (buf bufs)
!       (if (not (memq buf remaining))
!           (push buf new)))
!       (setq bufs (nreverse (nconc new remaining)))
!       (while (and bufs
!                 (not (and auto-revert-stop-on-user-input
!                           (input-pending-p))))
!       (let ((buf (car bufs)))
!         (if (buffer-name buf)         ; Buffer still alive?
!             (with-current-buffer buf
!               ;; Test if someone has turned off Auto-Revert Mode in a
!               ;; non-standard way, for example by changing major mode.
!               (if (and (not auto-revert-mode)
!                        (not auto-revert-tail-mode)
!                        (memq buf auto-revert-buffer-list))
!                   (setq auto-revert-buffer-list
!                         (delq buf auto-revert-buffer-list)))
!               (when (auto-revert-active-p) (auto-revert-handler)))
!           ;; Remove dead buffer from `auto-revert-buffer-list'.
!           (setq auto-revert-buffer-list
!                 (delq buf auto-revert-buffer-list))))
!       (setq bufs (cdr bufs)))
!       (setq auto-revert-remaining-buffers bufs)
!       ;; Check if we should cancel the timer.
!       (when (and (not global-auto-revert-mode)
!                (null auto-revert-buffer-list))
!       (cancel-timer auto-revert-timer)
!       (setq auto-revert-timer nil)))))
  
  
  ;; The end:




reply via email to

[Prev in Thread] Current Thread [Next in Thread]