Mercurial > emacs
diff doc/lispref/buffers.texi @ 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 | c32ec20d0ab5 |
children | caa79498564a |
line wrap: on
line diff
--- 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