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-all-buffers () | |
(interactive) | |
(mapcar (lambda (b) | |
;; Don't blow away scratch, for reasons, and also because doing so screws up | |
;; default-directory, setting it to the last thing we tab-completed (!?). This | |
;; causes annoyance when you try to set a path in the minibuffer later, making | |
;; it try to cd to that directory and then complaining that it's not there. | |
(if (not (string= (buffer-name b) "*scratch*")) | |
(kill-buffer b))) | |
(buffer-list)) | |
(delete-other-windows)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment