summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2016-04-18 10:11:44 +0200
committerMichael Albinus <michael.albinus@gmx.de>2016-04-18 10:11:44 +0200
commit5a0cbe51f4a32aedb2060bf18afc36c4dfe329db (patch)
treec0006cc1959570077d57c565d71545adf12faa5d /lisp
parent2007e324443c125d1d88818a875c90f103698010 (diff)
downloademacs-5a0cbe51f4a32aedb2060bf18afc36c4dfe329db.tar.gz
Fix Bug#23276
* lisp/autorevert.el (auto-revert-handler): Ignore errors coming from `revert-buffer'. (Bug#23276)
Diffstat (limited to 'lisp')
-rw-r--r--lisp/autorevert.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/autorevert.el b/lisp/autorevert.el
index b7f1f3691f0..b8693dfb210 100644
--- a/lisp/autorevert.el
+++ b/lisp/autorevert.el
@@ -684,7 +684,10 @@ This is an internal function used by Auto-Revert Mode."
;; not to forget that. This gives undesirable results when
;; the file's mode changes, but that is less common.
(let ((buffer-read-only buffer-read-only))
- (revert-buffer 'ignore-auto 'dont-ask 'preserve-modes)))
+ ;; Bug#23276: When the file has been deleted, keep the
+ ;; buffer unchanged.
+ (ignore-errors
+ (revert-buffer 'ignore-auto 'dont-ask 'preserve-modes))))
(when buffer-file-name
(when eob (goto-char (point-max)))
(dolist (window eoblist)