HCoop
/
bpt
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9af886e
)
(Fbuffer_swap_text): Signal error if swapping a dead buffer.
author
Chong Yidong
<cyd@stupidchicken.com>
Tue, 9 Dec 2008 23:08:05 +0000
(23:08 +0000)
committer
Chong Yidong
<cyd@stupidchicken.com>
Tue, 9 Dec 2008 23:08:05 +0000
(23:08 +0000)
src/buffer.c
patch
|
blob
|
blame
|
history
diff --git
a/src/buffer.c
b/src/buffer.c
index
8041e3a
..
50db471
100644
(file)
--- a/
src/buffer.c
+++ b/
src/buffer.c
@@
-2192,6
+2192,9
@@
DEFUN ("buffer-swap-text", Fbuffer_swap_text, Sbuffer_swap_text,
CHECK_BUFFER (buffer);
other_buffer = XBUFFER (buffer);
+ if (NILP (other_buffer->name))
+ error ("Cannot swap a dead buffer's text");
+
/* Actually, it probably works just fine.
* if (other_buffer == current_buffer)
* error ("Cannot swap a buffer's text with itself"); */