Last active
January 24, 2017 03:02
-
-
Save dsjt/a9e76f11191446f6e32c7cfe3b188b2a to your computer and use it in GitHub Desktop.
開いたバッファを掃除するemacsコマンド
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
(require 'cl) | |
;;;###autoload | |
(defun my/kill-other-buffers () | |
"Kill all other buffers." | |
(interactive) | |
(loop for buf in (buffer-list) | |
unless (or | |
(get-buffer-window buf) | |
(string= (substring (buffer-name buf) 0 1) " ") | |
(get-buffer-process buf) | |
(member (buffer-name buf) ;; 消さないバッファ名を指定 | |
'("*Messages*" "*Compile-Log*" "*Help*" | |
"*scratch*"))) | |
do (kill-buffer buf))) | |
(global-set-key (kbd "C-l C-c C-c") 'my/kill-other-buffers) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment