Mercurial > emacs
changeset 103936:7ffee8f51e96
* buffers.texi (Swapping Text): Recommend setting
write-region-annotate-functions and buffer-saved-size.
* backups.texi (Auto-Saving): Document buffer-saved-size = -2.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 16 Jul 2009 19:37:08 +0000 |
parents | 73ee844b3bb6 |
children | b0f266cccf0b |
files | doc/lispref/ChangeLog doc/lispref/backups.texi doc/lispref/buffers.texi |
diffstat | 3 files changed, 18 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/lispref/ChangeLog Thu Jul 16 10:24:07 2009 +0000 +++ b/doc/lispref/ChangeLog Thu Jul 16 19:37:08 2009 +0000 @@ -1,3 +1,10 @@ +2009-07-16 Richard Stallman <rms@gnu.org> + + * buffers.texi (Swapping Text): Recommend setting + write-region-annotate-functions and buffer-saved-size. + + * backups.texi (Auto-Saving): Document buffer-saved-size = -2. + 2009-07-15 Glenn Morris <rgm@gnu.org> * edebug.texi: Minor re-phrasings throughout.
--- a/doc/lispref/backups.texi Thu Jul 16 10:24:07 2009 +0000 +++ b/doc/lispref/backups.texi Thu Jul 16 19:37:08 2009 +0000 @@ -632,6 +632,10 @@ the buffer stores a positive value in this variable, thus reenabling auto-saving. Turning auto-save mode off or on also updates this variable, so that the substantial decrease in size is forgotten. + +If it is @minus{}2, that means this buffer should disregard changes in +buffer size; in particular, it should not shut off auto-saving +temporarily due to changes in buffer size. @end defvar @defvar auto-save-list-file-name
--- a/doc/lispref/buffers.texi Thu Jul 16 10:24:07 2009 +0000 +++ b/doc/lispref/buffers.texi Thu Jul 16 19:37:08 2009 +0000 @@ -1192,6 +1192,13 @@ enable-multibyte-characters}), etc. @end defun + If you use @code{buffer-swap-text} on a file-visiting buffer, you +should set up a hook to save the buffer's original text rather than +what it was swapped with. @code{write-region-annotate-functions} +works for this purpose. You should probably set +@code{buffer-saved-size} to @minus{}2 in the buffer, so that changes +in the text it is swapped with will not interfere with auto-saving. + @node Buffer Gap @section The Buffer Gap