如何使用elisp完全清除缓冲区?


Answers:


23

你试过了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


1
有一些例外,例如,不删除叠加层对象,并且可能还有一些我不熟悉的东西,在erase-buffer调用之后仍然存在。
法律名单

是的,问题不是很精确在缓冲区中包含“ 一切 ”和“ 所有 ” 。如果您想摆脱与缓冲区相关的所有东西,那么您就是您的朋友。kill-buffer
2015年


By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.