aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/autorevert.el2
-rw-r--r--lisp/files.el12
3 files changed, 16 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index c35be3ec270..f6340047e0a 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12014-04-04 Glenn Morris <rgm@gnu.org>
2
3 * files.el (buffer-stale--default-function)
4 (buffer-stale-function, revert-buffer--default):
5 * autorevert.el (auto-revert-buffers): Doc tweaks.
6
12014-04-03 Eli Zaretskii <eliz@gnu.org> 72014-04-03 Eli Zaretskii <eliz@gnu.org>
2 8
3 * international/characters.el: Preload uni-mirrored.el. (Bug#17169) 9 * international/characters.el: Preload uni-mirrored.el. (Bug#17169)
diff --git a/lisp/autorevert.el b/lisp/autorevert.el
index a08bf7fee6a..f1074e22e51 100644
--- a/lisp/autorevert.el
+++ b/lisp/autorevert.el
@@ -672,7 +672,7 @@ Should `auto-revert-mode' be active in some buffers, those buffers
672are checked. 672are checked.
673 673
674Non-file buffers that have a custom `revert-buffer-function' and 674Non-file buffers that have a custom `revert-buffer-function' and
675a `buffer-stale-function' are reverted either when Auto-Revert 675`buffer-stale-function' are reverted either when Auto-Revert
676Mode is active in that buffer, or when the variable 676Mode is active in that buffer, or when the variable
677`global-auto-revert-non-file-buffers' is non-nil and Global 677`global-auto-revert-non-file-buffers' is non-nil and Global
678Auto-Revert Mode is active. 678Auto-Revert Mode is active.
diff --git a/lisp/files.el b/lisp/files.el
index d5c6028ff47..e721a813a59 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -5349,13 +5349,16 @@ This should not be relied upon.")
5349 "Default function to use for `buffer-stale-function'. 5349 "Default function to use for `buffer-stale-function'.
5350This function ignores its argument. 5350This function ignores its argument.
5351This returns non-nil if the current buffer is visiting a readable file 5351This returns non-nil if the current buffer is visiting a readable file
5352whose modification time does not match that of the buffer." 5352whose modification time does not match that of the buffer.
5353
5354This function only handles buffers that are visiting files.
5355Non-file buffers need a custom function"
5353 (and buffer-file-name 5356 (and buffer-file-name
5354 (file-readable-p buffer-file-name) 5357 (file-readable-p buffer-file-name)
5355 (not (verify-visited-file-modtime (current-buffer))))) 5358 (not (verify-visited-file-modtime (current-buffer)))))
5356 5359
5357(defvar buffer-stale-function #'buffer-stale--default-function 5360(defvar buffer-stale-function #'buffer-stale--default-function
5358 "Function to check whether a non-file buffer needs reverting. 5361 "Function to check whether a buffer needs reverting.
5359This should be a function with one optional argument NOCONFIRM. 5362This should be a function with one optional argument NOCONFIRM.
5360Auto Revert Mode passes t for NOCONFIRM. The function should return 5363Auto Revert Mode passes t for NOCONFIRM. The function should return
5361non-nil if the buffer should be reverted. A return value of 5364non-nil if the buffer should be reverted. A return value of
@@ -5450,7 +5453,10 @@ start and end.
5450 5453
5451Calls `revert-buffer-insert-file-contents-function' to reread the 5454Calls `revert-buffer-insert-file-contents-function' to reread the
5452contents of the visited file, with two arguments: the first is the file 5455contents of the visited file, with two arguments: the first is the file
5453name, the second is non-nil if reading an auto-save file." 5456name, the second is non-nil if reading an auto-save file.
5457
5458This function only handles buffers that are visiting files.
5459Non-file buffers need a custom function."
5454 (with-current-buffer (or (buffer-base-buffer (current-buffer)) 5460 (with-current-buffer (or (buffer-base-buffer (current-buffer))
5455 (current-buffer)) 5461 (current-buffer))
5456 (let* ((auto-save-p (and (not ignore-auto) 5462 (let* ((auto-save-p (and (not ignore-auto)