2 Jan 2004 23:28
Re: Killing Buffers
Edward Wijaya <ewijaya <at> singnet.com.sg>
2004-01-02 22:28:39 GMT
2004-01-02 22:28:39 GMT
Courtesy of Jose Ruiz. ------- Forwarded message ------- From: "Jose A. Ortega Ruiz" <jao <at> gnu.org> To: Edward Wijaya <ewijaya <at> singnet.com.sg> Subject: Re: Killing Buffers Date: Fri, 02 Jan 2004 14:04:55 +0100 > Edward Wijaya <ewijaya <at> 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
RSS Feed