diff options
| author | Dima Kogan | 2015-02-21 10:47:22 +0100 |
|---|---|---|
| committer | Michael Albinus | 2015-02-21 10:47:22 +0100 |
| commit | 6982acc4e1561e681ea18a91ee87c32cd3b47f57 (patch) | |
| tree | 1468762c9470104d4df64387d2f3c48ecc773677 | |
| parent | 3ebf06300b8186feac5e9b436ca263dc908ed886 (diff) | |
| download | emacs-6982acc4e1561e681ea18a91ee87c32cd3b47f57.tar.gz emacs-6982acc4e1561e681ea18a91ee87c32cd3b47f57.zip | |
Install notification handlers when enabling the auto-revert modes.
* autorevert.el (auto-revert-mode, auto-revert-tail-mode)
(global-auto-revert-mode): Remove (let (auto-revert-use-notify) ... )
wrappers. Call (auto-revert-buffers) consequently in order to
install handlers.
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/autorevert.el | 11 |
2 files changed, 11 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4e59654e0c2..7f5fb7ddf0d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2015-02-21 Dima Kogan <dima@secretsauce.net> | ||
| 2 | |||
| 3 | * autorevert.el (auto-revert-mode, auto-revert-tail-mode) | ||
| 4 | (global-auto-revert-mode): Remove (let (auto-revert-use-notify) ... ) | ||
| 5 | wrappers. Call (auto-revert-buffers) consequently in order to | ||
| 6 | install handlers. | ||
| 7 | |||
| 1 | 2015-02-21 Wilson Snyder <wsnyder@wsnyder.org> | 8 | 2015-02-21 Wilson Snyder <wsnyder@wsnyder.org> |
| 2 | 9 | ||
| 3 | Sync with upstream verilog-mode revision 0d6420b. | 10 | Sync with upstream verilog-mode revision 0d6420b. |
diff --git a/lisp/autorevert.el b/lisp/autorevert.el index 02cef24f2aa..4dd021e4c76 100644 --- a/lisp/autorevert.el +++ b/lisp/autorevert.el | |||
| @@ -361,9 +361,8 @@ without being changed in the part that is already in the buffer." | |||
| 361 | (delq (current-buffer) auto-revert-buffer-list))) | 361 | (delq (current-buffer) auto-revert-buffer-list))) |
| 362 | (auto-revert-set-timer) | 362 | (auto-revert-set-timer) |
| 363 | (when auto-revert-mode | 363 | (when auto-revert-mode |
| 364 | (let (auto-revert-use-notify) | 364 | (auto-revert-buffers) |
| 365 | (auto-revert-buffers) | 365 | (setq auto-revert-tail-mode nil))) |
| 366 | (setq auto-revert-tail-mode nil)))) | ||
| 367 | 366 | ||
| 368 | 367 | ||
| 369 | ;;;###autoload | 368 | ;;;###autoload |
| @@ -417,8 +416,7 @@ Use `auto-revert-mode' for changes other than appends!" | |||
| 417 | (y-or-n-p "File changed on disk, content may be missing. \ | 416 | (y-or-n-p "File changed on disk, content may be missing. \ |
| 418 | Perform a full revert? ") | 417 | Perform a full revert? ") |
| 419 | ;; Use this (not just revert-buffer) for point-preservation. | 418 | ;; Use this (not just revert-buffer) for point-preservation. |
| 420 | (let (auto-revert-use-notify) | 419 | (auto-revert-buffers)) |
| 421 | (auto-revert-handler))) | ||
| 422 | ;; else we might reappend our own end when we save | 420 | ;; else we might reappend our own end when we save |
| 423 | (add-hook 'before-save-hook (lambda () (auto-revert-tail-mode 0)) nil t) | 421 | (add-hook 'before-save-hook (lambda () (auto-revert-tail-mode 0)) nil t) |
| 424 | (or (local-variable-p 'auto-revert-tail-pos) ; don't lose prior position | 422 | (or (local-variable-p 'auto-revert-tail-pos) ; don't lose prior position |
| @@ -463,8 +461,7 @@ specifies in the mode line." | |||
| 463 | :global t :group 'auto-revert :lighter global-auto-revert-mode-text | 461 | :global t :group 'auto-revert :lighter global-auto-revert-mode-text |
| 464 | (auto-revert-set-timer) | 462 | (auto-revert-set-timer) |
| 465 | (if global-auto-revert-mode | 463 | (if global-auto-revert-mode |
| 466 | (let (auto-revert-use-notify) | 464 | (auto-revert-buffers) |
| 467 | (auto-revert-buffers)) | ||
| 468 | (dolist (buf (buffer-list)) | 465 | (dolist (buf (buffer-list)) |
| 469 | (with-current-buffer buf | 466 | (with-current-buffer buf |
| 470 | (when auto-revert-use-notify | 467 | (when auto-revert-use-notify |