aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChong Yidong2008-12-09 23:08:05 +0000
committerChong Yidong2008-12-09 23:08:05 +0000
commitdc9cc5743b880fedfba00a681306e33589a7d893 (patch)
treeb4d93ae9e05abcda734b680c22090821d3902e4f /src
parent9af886ee0f22d2bb2ff8bb4a6cb32e947919237f (diff)
downloademacs-dc9cc5743b880fedfba00a681306e33589a7d893.tar.gz
emacs-dc9cc5743b880fedfba00a681306e33589a7d893.zip
(Fbuffer_swap_text): Signal error if swapping a dead buffer.
Diffstat (limited to 'src')
-rw-r--r--src/buffer.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 8041e3abce5..50db471ae12 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -2192,6 +2192,9 @@ DEFUN ("buffer-swap-text", Fbuffer_swap_text, Sbuffer_swap_text,
2192 CHECK_BUFFER (buffer); 2192 CHECK_BUFFER (buffer);
2193 other_buffer = XBUFFER (buffer); 2193 other_buffer = XBUFFER (buffer);
2194 2194
2195 if (NILP (other_buffer->name))
2196 error ("Cannot swap a dead buffer's text");
2197
2195 /* Actually, it probably works just fine. 2198 /* Actually, it probably works just fine.
2196 * if (other_buffer == current_buffer) 2199 * if (other_buffer == current_buffer)
2197 * error ("Cannot swap a buffer's text with itself"); */ 2200 * error ("Cannot swap a buffer's text with itself"); */