Nếu tôi muốn xóa mọi thứ trong bộ đệm bằng elisp, tôi phải làm thế nào?
Nếu tôi muốn xóa mọi thứ trong bộ đệm bằng elisp, tôi phải làm thế nào?
Câu trả lời:
Bạn đã thử erase-bufferchưa
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.
Làm thế nào để tìm một chức năng như vậy? M-x apropos buffer erase
kill-bufferlà bạn của bạn.
Bạn có thể sử dụng một số setfphép thuật.
(setf (buffer-string) "")
Cũng có câu trả lời này :
C-x h + del Phím xóa bộ đệm
Lưu ý: Điều này đòi hỏi transient-mark-modephải được kích hoạt (theo mặc định).
erase-bufferđược gọi.