diff options
author | Richard M. Stallman <rms@gnu.org> | 2009-07-16 19:37:08 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2009-07-16 19:37:08 +0000 |
commit | 137987ab43d15cfafc0e11639d80f700408d5bea (patch) | |
tree | ea05163cd68ed870506f63056913399827e202c1 /doc/lispref/buffers.texi | |
parent | bede3e9f87bd10b0fb0f3f516353667c63082dd4 (diff) |
* buffers.texi (Swapping Text): Recommend setting
write-region-annotate-functions and buffer-saved-size.
* backups.texi (Auto-Saving): Document buffer-saved-size = -2.
Diffstat (limited to 'doc/lispref/buffers.texi')
-rw-r--r-- | doc/lispref/buffers.texi | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/lispref/buffers.texi b/doc/lispref/buffers.texi index 5d03865e8e..97242d8d5d 100644 --- a/doc/lispref/buffers.texi +++ b/doc/lispref/buffers.texi @@ -1192,6 +1192,13 @@ overlays, the text properties, the undo list, the value of the 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 |