Last active
October 11, 2017 08:30
-
-
Save kobapan/d9c78f636a1bb75001a1 to your computer and use it in GitHub Desktop.
elisp カレントバッファ以外の全てのバッファを閉じる
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun kill-other-buffers () | |
"Kill all other buffers." | |
(interactive) | |
(let ((exclude '("*scratch*" "*Messages*"))) | |
(mapc (lambda (b) | |
(let ((buf (buffer-name b))) | |
(unless (member buf exclude) | |
(kill-buffer buf)))) | |
(delq (current-buffer) (buffer-list))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment