[Top][All Lists]

[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 ()
  (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 ()
  (loop for buffer being the buffers
     do (kill-buffer buffer)))

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

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

reply via email to

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