简体   繁体   中英

emacs: kill a buffer and remove it from the buffer list

In Emacs, when a buffer is killed, it is still displayed on the buffer list (though it's empty after opening it from the list). Is is possible to remove the buffer from the buffer list?

只需按g刷新缓冲区列表。

You can define a function to achieve it automatically:

(defun my-kill-buffer ()
  (interactive)
  (kill-buffer)
  (if (get-buffer "*Buffer List*")
      (save-excursion
        (set-buffer "*Buffer List*")
        (revert-buffer))
))

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM