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

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

Re: [h-e-w] how to close all buffers at once?


From: Eli Daniel
Subject: Re: [h-e-w] how to close all buffers at once?
Date: Tue, 16 May 2006 10:12:34 -0400

Or more concisely:

(defun close-all-buffers ()
  (interactive)
  (mapc 'kill-buffer (buffer-list)))

If you put this in your .emacs, you can do M-x close-all-buffers.  To bind it to a key (for example, C-c x), then also add something like:

(global-set-key "\C-cx" 'close-all-buffers)

On 5/16/06, Tom Capey <address@hidden > wrote:
* Zahar Malinovsky <address@hidden > writes:

> is there a function to close all opened buffers all at once?

(require 'cl)

(defun close-all-buffers ()
  (interactive)
  (loop for buffer being the buffers
     do (kill-buffer buffer)))


  It's an unusual request.  I use ibuffer myself to kill off
  buffers selectively.



/Tom
--
First direct your gaze downward -- instructions on globe
deluxation by Daniel Engber.



--- Disclaimer ---

Unless otherwise agreed expressly in writing by a Director of Edina Software, this communication is to be treated as confidential and the information in it may not be used or disclosed except for the purpose for which it has been sent. If you have reason to believe that you are not the intended recipient of this communication, please contact the sender immediately.

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________




reply via email to

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