[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-24 r116904: Doc updates for buffer-stale-function no
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] emacs-24 r116904: Doc updates for buffer-stale-function now applying to file buffers too |
Date: |
Fri, 04 Apr 2014 02:10:01 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 116904
revision-id: address@hidden
parent: address@hidden
committer: Glenn Morris <address@hidden>
branch nick: emacs-24
timestamp: Thu 2014-04-03 22:09:35 -0400
message:
Doc updates for buffer-stale-function now applying to file buffers too
* doc/emacs/arevert-xtra.texi (Supporting additional buffers):
* doc/lispref/backups.texi (Reverting):
Update for buffer-stale-function also applying to file-buffers.
* lisp/autorevert.el (auto-revert-buffers):
* lisp/files.el (buffer-stale--default-function)
(buffer-stale-function, revert-buffer--default): Doc tweaks.
* etc/NEWS: Related edits.
modified:
doc/emacs/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-6227
doc/emacs/arevert-xtra.texi
arevertxtra.texi-20091113204419-o5vbwnq5f7feedwu-6232
doc/lispref/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-6155
doc/lispref/backups.texi
backups.texi-20091113204419-o5vbwnq5f7feedwu-6162
etc/NEWS news-20100311060928-aoit31wvzf25yr1z-1
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/autorevert.el
autorevert.el-20091113204419-o5vbwnq5f7feedwu-1197
lisp/files.el files.el-20091113204419-o5vbwnq5f7feedwu-265
=== modified file 'doc/emacs/ChangeLog'
--- a/doc/emacs/ChangeLog 2014-04-04 01:49:28 +0000
+++ b/doc/emacs/ChangeLog 2014-04-04 02:09:35 +0000
@@ -3,6 +3,8 @@
* files.texi (Backup Names):
* arevert-xtra.texi (Supporting additional buffers):
Update for default values of some -function vars no longer being nil.
+ (Supporting additional buffers):
+ Update for buffer-stale-function also applying to file-buffers.
2014-03-16 Dmitry Gutov <address@hidden>
=== modified file 'doc/emacs/arevert-xtra.texi'
--- a/doc/emacs/arevert-xtra.texi 2014-04-04 01:49:28 +0000
+++ b/doc/emacs/arevert-xtra.texi 2014-04-04 02:09:35 +0000
@@ -107,11 +107,11 @@
@code{revert-buffer-function}. @xref{Definition of
revert-buffer-function,, Reverting, elisp, the Emacs Lisp Reference Manual}.
-In addition, it must have a @code{buffer-stale-function}.
+In addition, it must have a suitable @code{buffer-stale-function}.
@c FIXME only defvar in all of doc/emacs!
@defvar buffer-stale-function
-The value of this variable is a function to check whether a non-file
+The value of this variable is a function to check whether a
buffer needs reverting. This should be a function with one optional
argument @var{noconfirm}. The function should return address@hidden
if the buffer should be reverted. The buffer is current when this
@@ -132,7 +132,7 @@
@code{auto-revert-interval} seconds (like the Buffer Menu), use:
@example
-(set (make-local-variable 'buffer-stale-function)
+(setq-local buffer-stale-function
#'(lambda (&optional noconfirm) 'fast))
@end example
=== modified file 'doc/lispref/ChangeLog'
--- a/doc/lispref/ChangeLog 2014-04-04 01:49:28 +0000
+++ b/doc/lispref/ChangeLog 2014-04-04 02:09:35 +0000
@@ -2,6 +2,8 @@
* backups.texi (Making Backups, Reverting):
Update for default values of some -function vars no longer being nil.
+ (Reverting): Update for buffer-stale-function
+ also applying to file-buffers.
2014-03-25 Eli Zaretskii <address@hidden>
=== modified file 'doc/lispref/backups.texi'
--- a/doc/lispref/backups.texi 2014-04-04 01:49:28 +0000
+++ b/doc/lispref/backups.texi 2014-04-04 02:09:35 +0000
@@ -764,7 +764,9 @@
@c FIXME? Move this section from arevert-xtra to here?
@defvar buffer-stale-function
The value of this variable specifies a function to call to check
-whether a non-file buffer needs reverting
+whether a buffer needs reverting. The default value only handles
+buffers that are visiting files, by checking their modification time.
+Buffers that are not visiting files require a custom function
@iftex
(@pxref{Supporting additional buffers,,, emacs-xtra, Specialized Emacs
Features}).
@end iftex
=== modified file 'etc/NEWS'
--- a/etc/NEWS 2014-04-04 01:49:28 +0000
+++ b/etc/NEWS 2014-04-04 02:09:35 +0000
@@ -1401,11 +1401,14 @@
** Revert and Autorevert changes
-FIXME buffer-stale-function no longer just for non-file buffers?
++++
*** The default values of `buffer-stale-function', `revert-buffer-function',
and `revert-buffer-insert-file-contents-function' are no longer nil.
Instead they default to functions that do what the nil value used to.
++++
+*** `buffer-stale-function' is now used for buffers visiting files too.
+
---
*** If Emacs is compiled with file notification support, it uses notifications
instead of checking file time stamps. To disable this, set the user option
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2014-04-03 19:53:43 +0000
+++ b/lisp/ChangeLog 2014-04-04 02:09:35 +0000
@@ -1,3 +1,9 @@
+2014-04-04 Glenn Morris <address@hidden>
+
+ * files.el (buffer-stale--default-function)
+ (buffer-stale-function, revert-buffer--default):
+ * autorevert.el (auto-revert-buffers): Doc tweaks.
+
2014-04-03 Eli Zaretskii <address@hidden>
* international/characters.el: Preload uni-mirrored.el. (Bug#17169)
=== modified file 'lisp/autorevert.el'
--- a/lisp/autorevert.el 2014-01-01 07:43:34 +0000
+++ b/lisp/autorevert.el 2014-04-04 02:09:35 +0000
@@ -672,7 +672,7 @@
are checked.
Non-file buffers that have a custom `revert-buffer-function' and
-a `buffer-stale-function' are reverted either when Auto-Revert
+`buffer-stale-function' are reverted either when Auto-Revert
Mode is active in that buffer, or when the variable
`global-auto-revert-non-file-buffers' is non-nil and Global
Auto-Revert Mode is active.
=== modified file 'lisp/files.el'
--- a/lisp/files.el 2014-04-03 07:06:40 +0000
+++ b/lisp/files.el 2014-04-04 02:09:35 +0000
@@ -5349,13 +5349,16 @@
"Default function to use for `buffer-stale-function'.
This function ignores its argument.
This returns non-nil if the current buffer is visiting a readable file
-whose modification time does not match that of the buffer."
+whose modification time does not match that of the buffer.
+
+This function only handles buffers that are visiting files.
+Non-file buffers need a custom function"
(and buffer-file-name
(file-readable-p buffer-file-name)
(not (verify-visited-file-modtime (current-buffer)))))
(defvar buffer-stale-function #'buffer-stale--default-function
- "Function to check whether a non-file buffer needs reverting.
+ "Function to check whether a buffer needs reverting.
This should be a function with one optional argument NOCONFIRM.
Auto Revert Mode passes t for NOCONFIRM. The function should return
non-nil if the buffer should be reverted. A return value of
@@ -5450,7 +5453,10 @@
Calls `revert-buffer-insert-file-contents-function' to reread the
contents of the visited file, with two arguments: the first is the file
-name, the second is non-nil if reading an auto-save file."
+name, the second is non-nil if reading an auto-save file.
+
+This function only handles buffers that are visiting files.
+Non-file buffers need a custom function."
(with-current-buffer (or (buffer-base-buffer (current-buffer))
(current-buffer))
(let* ((auto-save-p (and (not ignore-auto)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-24 r116904: Doc updates for buffer-stale-function now applying to file buffers too,
Glenn Morris <=