*** /tmp/ediffWnT0dx 2019-03-24 15:30:02.022068542 +0100 --- /home/albinus/src/emacs/lisp/autorevert.el 2019-03-24 15:26:41.756960378 +0100 *************** *** 343,352 **** ;; Functions: ! (defun auto-revert-remove-current-buffer () "Remove dead buffer from `auto-revert-buffer-list'." (setq auto-revert-buffer-list ! (delq (current-buffer) auto-revert-buffer-list))) ;;;###autoload (define-minor-mode auto-revert-mode --- 343,352 ---- ;; Functions: ! (defun auto-revert-remove-current-buffer (&optional buffer) "Remove dead buffer from `auto-revert-buffer-list'." (setq auto-revert-buffer-list ! (delq (or buffer (current-buffer)) auto-revert-buffer-list))) ;;;###autoload (define-minor-mode auto-revert-mode *************** *** 772,781 **** (setq bufs (delq nil (mapcar (lambda (buf) ! (with-current-buffer buf ! (and (or (not (file-remote-p default-directory)) ! (file-remote-p default-directory nil t)) ! buf))) bufs))) ;; Partition `bufs' into two halves depending on whether or not ;; the buffers are in `auto-revert-remaining-buffers'. The two --- 772,783 ---- (setq bufs (delq nil (mapcar (lambda (buf) ! (and (buffer-live-p buf) ! (with-current-buffer buf ! (and ! (or (not (file-remote-p default-directory)) ! (file-remote-p default-directory nil t)) ! buf)))) bufs))) ;; Partition `bufs' into two halves depending on whether or not ;; the buffers are in `auto-revert-remaining-buffers'. The two *************** *** 792,815 **** (not (and auto-revert-stop-on-user-input (input-pending-p)))) (let ((buf (car bufs))) ! (with-current-buffer buf ! (if (buffer-live-p buf) ! (progn ! ;; 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)) ! (auto-revert-remove-current-buffer)) ! (when (auto-revert-active-p) ! ;; Enable file notification. ! (when (and auto-revert-use-notify ! (not auto-revert-notify-watch-descriptor)) ! (auto-revert-notify-add-watch)) ! (auto-revert-handler))) ;; Remove dead buffer from `auto-revert-buffer-list'. ! (auto-revert-remove-current-buffer)))) (setq bufs (cdr bufs))) (setq auto-revert-remaining-buffers bufs) ;; Check if we should cancel the timer. --- 794,816 ---- (not (and auto-revert-stop-on-user-input (input-pending-p)))) (let ((buf (car bufs))) ! (if (not (buffer-live-p buf)) ;; Remove dead buffer from `auto-revert-buffer-list'. ! (auto-revert-remove-current-buffer buf) ! (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)) ! (auto-revert-remove-current-buffer)) ! (when (auto-revert-active-p) ! ;; Enable file notification. ! (when (and auto-revert-use-notify ! (not auto-revert-notify-watch-descriptor)) ! (auto-revert-notify-add-watch)) ! (auto-revert-handler))))) (setq bufs (cdr bufs))) (setq auto-revert-remaining-buffers bufs) ;; Check if we should cancel the timer.