help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Killing Buffers


From: Edward Wijaya
Subject: Re: Killing Buffers
Date: Fri, 02 Jan 2004 22:28:39 -0000
User-agent: Opera7.23/Linux M2 build 518

Courtesy of Jose Ruiz.

------- Forwarded message -------
From: "Jose A. Ortega Ruiz" <jao@gnu.org>
To: Edward Wijaya <ewijaya@singnet.com.sg>
Subject: Re: Killing Buffers
Date: Fri, 02 Jan 2004 14:04:55 +0100

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]