diff options
| author | Noam Postavsky | 2016-07-10 21:52:23 -0400 |
|---|---|---|
| committer | Noam Postavsky | 2016-07-14 20:01:39 -0400 |
| commit | 9ba51edf62b25c678508a316ec78a09b18d3bf9e (patch) | |
| tree | 99f1e4e776bc3814a41164d41a8c10dbfe425b0d /doc | |
| parent | 452aa949bc4de77b1fba103de6b61e55b2ca8c0b (diff) | |
| download | emacs-9ba51edf62b25c678508a316ec78a09b18d3bf9e.tar.gz emacs-9ba51edf62b25c678508a316ec78a09b18d3bf9e.zip | |
Document buffer-swap-text+save-excursion interaction
* doc/lispref/buffers.texi (Swapping Text):
* src/buffer.c (Fbuffer_swap_text): Add warning about interaction of
`buffer-swap-text' and `save-excursion' (Bug #4655).
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lispref/buffers.texi | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/lispref/buffers.texi b/doc/lispref/buffers.texi index 1f7f263fb21..740d7cfd8a1 100644 --- a/doc/lispref/buffers.texi +++ b/doc/lispref/buffers.texi | |||
| @@ -1211,6 +1211,12 @@ swapped as well: the positions of point and mark, all the markers, the | |||
| 1211 | overlays, the text properties, the undo list, the value of the | 1211 | overlays, the text properties, the undo list, the value of the |
| 1212 | @code{enable-multibyte-characters} flag (@pxref{Text Representations, | 1212 | @code{enable-multibyte-characters} flag (@pxref{Text Representations, |
| 1213 | enable-multibyte-characters}), etc. | 1213 | enable-multibyte-characters}), etc. |
| 1214 | |||
| 1215 | @strong{Warning:} If this function is called from within a | ||
| 1216 | @code{save-excursion} form, the current buffer will be set to | ||
| 1217 | @var{buffer} upon leaving the form, since the marker used by | ||
| 1218 | @code{save-excursion} to save the position and buffer will be swapped | ||
| 1219 | as well. | ||
| 1214 | @end defun | 1220 | @end defun |
| 1215 | 1221 | ||
| 1216 | If you use @code{buffer-swap-text} on a file-visiting buffer, you | 1222 | If you use @code{buffer-swap-text} on a file-visiting buffer, you |