Answers:
你试过了erase-buffer
吗?
erase-buffer is an interactive built-in function in `C source code'.
(erase-buffer)
Delete the entire contents of the current buffer.
Any narrowing restriction in effect (see `narrow-to-region') is removed,
so the buffer is truly empty after this.
如何找到这样的功能? M-x apropos buffer erase
kill-buffer
您可以使用一些setf
魔术。
(setf (buffer-string) "")
erase-buffer
调用之后仍然存在。