Edward Wijaya <ewijaya@singnet.com.sg> writes:
Hi,
I am looking for a key that:
1. Kill all the existing buffer without having have to close Emacs
hi, i've got this code in my .emacs:
;;; kill all buffers
(defun my-blank-slate-emacs ()
"kill all buffers, leaving *scratch* only"
(interactive)
;;close all frames but one, first
(mapcar (lambda (x) (delete-frame x))
(cdr (visible-frame-list)))
;;then, kill all buffers
(mapcar (lambda (x) (kill-buffer x))
(buffer-list))
;;make there be only one window holding buffer *scratch*
(delete-other-windows))
(global-set-key "\C-x!" 'my-blank-slate-emacs)
hth,
jao