diff options
| author | Jason Rumney | 2008-12-24 11:20:32 +0000 |
|---|---|---|
| committer | Jason Rumney | 2008-12-24 11:20:32 +0000 |
| commit | baae5c2d8453b653cb1cffd638d9bd90064d6275 (patch) | |
| tree | 41bcf421e601d5b290a026005b07d17ea49f21fe /src/buffer.c | |
| parent | b08ddfb407a2017fd781fadf6cc2573909a2b664 (diff) | |
| download | emacs-baae5c2d8453b653cb1cffd638d9bd90064d6275.tar.gz emacs-baae5c2d8453b653cb1cffd638d9bd90064d6275.zip | |
* ralloc.c (r_alloc_reset_variable): New function.
* buffer.c (Fbuffer_swap_text) [REL_ALLOC]: Reset ralloc's internal
record of what points where.
Diffstat (limited to 'src/buffer.c')
| -rw-r--r-- | src/buffer.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/buffer.c b/src/buffer.c index 110cb4f7faf..33667b79ead 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -2182,6 +2182,10 @@ advance_to_char_boundary (byte_pos) | |||
| 2182 | return byte_pos; | 2182 | return byte_pos; |
| 2183 | } | 2183 | } |
| 2184 | 2184 | ||
| 2185 | #ifdef REL_ALLOC | ||
| 2186 | extern void r_alloc_reset_variable P_ ((PTR *, PTR *)); | ||
| 2187 | #endif /* REL_ALLOC */ | ||
| 2188 | |||
| 2185 | DEFUN ("buffer-swap-text", Fbuffer_swap_text, Sbuffer_swap_text, | 2189 | DEFUN ("buffer-swap-text", Fbuffer_swap_text, Sbuffer_swap_text, |
| 2186 | 1, 1, 0, | 2190 | 1, 1, 0, |
| 2187 | doc: /* Swap the text between current buffer and BUFFER. */) | 2191 | doc: /* Swap the text between current buffer and BUFFER. */) |
| @@ -2223,6 +2227,13 @@ DEFUN ("buffer-swap-text", Fbuffer_swap_text, Sbuffer_swap_text, | |||
| 2223 | swapfield (own_text, struct buffer_text); | 2227 | swapfield (own_text, struct buffer_text); |
| 2224 | eassert (current_buffer->text == ¤t_buffer->own_text); | 2228 | eassert (current_buffer->text == ¤t_buffer->own_text); |
| 2225 | eassert (other_buffer->text == &other_buffer->own_text); | 2229 | eassert (other_buffer->text == &other_buffer->own_text); |
| 2230 | #ifdef REL_ALLOC | ||
| 2231 | r_alloc_reset_variable ((PTR *) ¤t_buffer->own_text.beg, | ||
| 2232 | (PTR *) &other_buffer->own_text.beg); | ||
| 2233 | r_alloc_reset_variable ((PTR *) &other_buffer->own_text.beg, | ||
| 2234 | (PTR *) ¤t_buffer->own_text.beg); | ||
| 2235 | #endif /* REL_ALLOC */ | ||
| 2236 | |||
| 2226 | swapfield (pt, EMACS_INT); | 2237 | swapfield (pt, EMACS_INT); |
| 2227 | swapfield (pt_byte, EMACS_INT); | 2238 | swapfield (pt_byte, EMACS_INT); |
| 2228 | swapfield (begv, EMACS_INT); | 2239 | swapfield (begv, EMACS_INT); |