mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-05 11:21:04 -08:00
(Fbuffer_swap_text): Signal error if swapping a dead buffer.
This commit is contained in:
parent
9af886ee0f
commit
dc9cc5743b
1 changed files with 3 additions and 0 deletions
|
|
@ -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"); */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue