aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2014-04-03 21:49:28 -0400
committerGlenn Morris2014-04-03 21:49:28 -0400
commit0360792967fa95567a9ec2d767f3a33563c1bbc5 (patch)
treec92075f12afe51acd8e334d36b5db26f494ffa6f
parentbbab1c4fb8ecaf7dfe9d9e2a43b053f28bde2e53 (diff)
downloademacs-0360792967fa95567a9ec2d767f3a33563c1bbc5.tar.gz
emacs-0360792967fa95567a9ec2d767f3a33563c1bbc5.zip
Doc updates for default values of some -function vars no longer being nil
* doc/emacs/files.texi (Backup Names): * doc/emacs/arevert-xtra.texi (Supporting additional buffers): * doc/lispref/backups.texi (Making Backups, Reverting): Update for default values of some -function vars no longer being nil. * etc/NEWS: Related edits.
-rw-r--r--doc/emacs/ChangeLog6
-rw-r--r--doc/emacs/arevert-xtra.texi6
-rw-r--r--doc/emacs/files.texi4
-rw-r--r--doc/lispref/ChangeLog5
-rw-r--r--doc/lispref/backups.texi39
-rw-r--r--etc/NEWS2
6 files changed, 36 insertions, 26 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index 34679b8ba1d..bd593f49db3 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,9 @@
12014-04-04 Glenn Morris <rgm@gnu.org>
2
3 * files.texi (Backup Names):
4 * arevert-xtra.texi (Supporting additional buffers):
5 Update for default values of some -function vars no longer being nil.
6
12014-03-16 Dmitry Gutov <dgutov@yandex.ru> 72014-03-16 Dmitry Gutov <dgutov@yandex.ru>
2 8
3 * programs.texi (Matching): Update the missed spot. (Bug#17008) 9 * programs.texi (Matching): Update the missed spot. (Bug#17008)
diff --git a/doc/emacs/arevert-xtra.texi b/doc/emacs/arevert-xtra.texi
index a13f59b69bd..0f05d1db0e1 100644
--- a/doc/emacs/arevert-xtra.texi
+++ b/doc/emacs/arevert-xtra.texi
@@ -103,11 +103,11 @@ arguments to list only some of the files. @file{*Find*} and
103This section is intended for Elisp programmers who would like to add 103This section is intended for Elisp programmers who would like to add
104support for auto-reverting new types of buffers. 104support for auto-reverting new types of buffers.
105 105
106To support auto-reverting the buffer must first of all have a 106To support auto-reverting the buffer must first of all have a suitable
107@code{revert-buffer-function}. @xref{Definition of 107@code{revert-buffer-function}. @xref{Definition of
108revert-buffer-function,, Reverting, elisp, the Emacs Lisp Reference Manual}. 108revert-buffer-function,, Reverting, elisp, the Emacs Lisp Reference Manual}.
109 109
110In addition, it @emph{must} have a @code{buffer-stale-function}. 110In addition, it must have a @code{buffer-stale-function}.
111 111
112@c FIXME only defvar in all of doc/emacs! 112@c FIXME only defvar in all of doc/emacs!
113@defvar buffer-stale-function 113@defvar buffer-stale-function
@@ -149,7 +149,7 @@ also be useful if the function is consulted for purposes other than
149auto-reverting. 149auto-reverting.
150@end defvar 150@end defvar
151 151
152Once the buffer has a @code{revert-buffer-function} and a 152Once the buffer has a suitable @code{revert-buffer-function} and
153@code{buffer-stale-function}, several problems usually remain. 153@code{buffer-stale-function}, several problems usually remain.
154 154
155The buffer will only auto-revert if it is marked unmodified. Hence, 155The buffer will only auto-revert if it is marked unmodified. Hence,
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi
index 3b9aefa332b..9310c44f1e6 100644
--- a/doc/emacs/files.texi
+++ b/doc/emacs/files.texi
@@ -594,8 +594,8 @@ directory. Emacs creates the directory, if necessary, to make the
594backup. 594backup.
595 595
596@vindex make-backup-file-name-function 596@vindex make-backup-file-name-function
597 If you define the variable @code{make-backup-file-name-function} to 597 If you set the variable @code{make-backup-file-name-function} to
598a suitable Lisp function, that overrides the usual way Emacs 598a suitable Lisp function, you can override the usual way Emacs
599constructs backup file names. 599constructs backup file names.
600 600
601@node Backup Deletion 601@node Backup Deletion
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index bf3c6f170ea..456c2cbdc12 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,8 @@
12014-04-04 Glenn Morris <rgm@gnu.org>
2
3 * backups.texi (Making Backups, Reverting):
4 Update for default values of some -function vars no longer being nil.
5
12014-03-25 Eli Zaretskii <eliz@gnu.org> 62014-03-25 Eli Zaretskii <eliz@gnu.org>
2 7
3 * files.texi (Kinds of Files): Improve documentation of 8 * files.texi (Kinds of Files): Improve documentation of
diff --git a/doc/lispref/backups.texi b/doc/lispref/backups.texi
index 83ffb2f95e4..9fa97fc1300 100644
--- a/doc/lispref/backups.texi
+++ b/doc/lispref/backups.texi
@@ -90,8 +90,7 @@ save disk space. (You would put this code in your init file.)
90@smallexample 90@smallexample
91@group 91@group
92(add-hook 'rmail-mode-hook 92(add-hook 'rmail-mode-hook
93 (lambda () 93 (lambda () (setq-local make-backup-files nil)))
94 (set (make-local-variable 'make-backup-files) nil)))
95@end group 94@end group
96@end smallexample 95@end smallexample
97@end defopt 96@end defopt
@@ -150,13 +149,12 @@ ignored.
150@end defopt 149@end defopt
151 150
152@defopt make-backup-file-name-function 151@defopt make-backup-file-name-function
153This variable's value is a function to use for making backups instead 152This variable's value is a function to use for making backup file names.
154of the default @code{make-backup-file-name}. A value of @code{nil} 153The function @code{make-backup-file-name} calls it.
155gives the default @code{make-backup-file-name} behavior.
156@xref{Backup Names,, Naming Backup Files}. 154@xref{Backup Names,, Naming Backup Files}.
157 155
158This could be buffer-local to do something special for specific 156This could be buffer-local to do something special for specific
159files. If you define it, you may need to change 157files. If you change it, you may need to change
160@code{backup-file-name-p} and @code{file-name-sans-versions} too. 158@code{backup-file-name-p} and @code{file-name-sans-versions} too.
161@end defopt 159@end defopt
162 160
@@ -727,25 +725,24 @@ buffer-local bindings for these variables:
727@defvar revert-buffer-function 725@defvar revert-buffer-function
728@anchor{Definition of revert-buffer-function} 726@anchor{Definition of revert-buffer-function}
729The value of this variable is the function to use to revert this 727The value of this variable is the function to use to revert this
730buffer. If non-@code{nil}, it should be a function with two optional 728buffer. It should be a function with two optional
731arguments to do the work of reverting. The two optional arguments, 729arguments to do the work of reverting. The two optional arguments,
732@var{ignore-auto} and @var{noconfirm}, are the arguments that 730@var{ignore-auto} and @var{noconfirm}, are the arguments that
733@code{revert-buffer} received. If the value is @code{nil}, reverting 731@code{revert-buffer} received.
734works the usual way.
735 732
736Modes such as Dired mode, in which the text being edited does not 733Modes such as Dired mode, in which the text being edited does not
737consist of a file's contents but can be regenerated in some other 734consist of a file's contents but can be regenerated in some other
738fashion, can give this variable a buffer-local value that is a function to 735fashion, can give this variable a buffer-local value that is a special
739regenerate the contents. 736function to regenerate the contents.
740@end defvar 737@end defvar
741 738
742@defvar revert-buffer-insert-file-contents-function 739@defvar revert-buffer-insert-file-contents-function
743The value of this variable, if non-@code{nil}, specifies the function to use to 740The value of this variable specifies the function to use to
744insert the updated contents when reverting this buffer. The function 741insert the updated contents when reverting this buffer. The function
745receives two arguments: first the file name to use; second, @code{t} if 742receives two arguments: first the file name to use; second, @code{t} if
746the user has asked to read the auto-save file. 743the user has asked to read the auto-save file.
747 744
748The reason for a mode to set this variable instead of 745The reason for a mode to change this variable instead of
749@code{revert-buffer-function} is to avoid duplicating or replacing the 746@code{revert-buffer-function} is to avoid duplicating or replacing the
750rest of what @code{revert-buffer} does: asking for confirmation, 747rest of what @code{revert-buffer} does: asking for confirmation,
751clearing the undo list, deciding the proper major mode, and running the 748clearing the undo list, deciding the proper major mode, and running the
@@ -753,21 +750,21 @@ hooks listed below.
753@end defvar 750@end defvar
754 751
755@defvar before-revert-hook 752@defvar before-revert-hook
756This normal hook is run by @code{revert-buffer} before 753This normal hook is run by the default @code{revert-buffer-function}
757inserting the modified contents---but only if 754before inserting the modified contents. A custom @code{revert-buffer-function}
758@code{revert-buffer-function} is @code{nil}. 755may or may not run this hook.
759@end defvar 756@end defvar
760 757
761@defvar after-revert-hook 758@defvar after-revert-hook
762This normal hook is run by @code{revert-buffer} after inserting 759This normal hook is run by the default @code{revert-buffer-function}
763the modified contents---but only if @code{revert-buffer-function} is 760after inserting the modified contents. A custom @code{revert-buffer-function}
764@code{nil}. 761may or may not run this hook.
765@end defvar 762@end defvar
766 763
767@c FIXME? Move this section from arevert-xtra to here? 764@c FIXME? Move this section from arevert-xtra to here?
768@defvar buffer-stale-function 765@defvar buffer-stale-function
769The value of this variable, if non-@code{nil}, specifies a function 766The value of this variable specifies a function to call to check
770to call to check whether a non-file buffer needs reverting 767whether a non-file buffer needs reverting
771@iftex 768@iftex
772(@pxref{Supporting additional buffers,,, emacs-xtra, Specialized Emacs Features}). 769(@pxref{Supporting additional buffers,,, emacs-xtra, Specialized Emacs Features}).
773@end iftex 770@end iftex
diff --git a/etc/NEWS b/etc/NEWS
index ea62be87bfb..c3998934b5e 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -159,6 +159,7 @@ You can change the default by customizing `blink-cursor-blinks'.
159** In keymaps where SPC scrolls forward, S-SPC now scrolls backward. 159** In keymaps where SPC scrolls forward, S-SPC now scrolls backward.
160This affects View mode, etc. 160This affects View mode, etc.
161 161
162+++
162** The default value of `make-backup-file-name-function' is no longer nil. 163** The default value of `make-backup-file-name-function' is no longer nil.
163Instead it defaults to a function that does what the nil value used to. 164Instead it defaults to a function that does what the nil value used to.
164 165
@@ -1400,6 +1401,7 @@ argument, with the same interpretation as the returned value of
1400 1401
1401** Revert and Autorevert changes 1402** Revert and Autorevert changes
1402 1403
1404FIXME buffer-stale-function no longer just for non-file buffers?
1403*** The default values of `buffer-stale-function', `revert-buffer-function', 1405*** The default values of `buffer-stale-function', `revert-buffer-function',
1404and `revert-buffer-insert-file-contents-function' are no longer nil. 1406and `revert-buffer-insert-file-contents-function' are no longer nil.
1405Instead they default to functions that do what the nil value used to. 1407Instead they default to functions that do what the nil value used to.