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

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

Re: Kill other buffers


From: Alan Mackenzie
Subject: Re: Kill other buffers
Date: Tue, 13 Dec 2005 08:15:16 +0000
User-agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.0.35 (i686))

Andreas R?hler <address@hidden> wrote on Mon, 12 Dec 2005
21:35:30 +0100:

> Right, or try that:

> (defun kill-all-buffers (&optional arg)
>   "with arg, save all buffers before deleting them"
>   (interactive "P")
>   (if arg
>       (save-some-buffers))
>   (let ((pufferliste (buffer-list)))
>     (while pufferliste
>       (progn
>         (if (not (equal (car pufferliste) (current-buffer)))
>             (kill-buffer (car pufferliste)))
>         (setq pufferliste (cdr pufferliste))))))

> ;; make a key at `C-c k' 
> (global-set-key "\C-ck" 'kill-all-buffers)

Wow!  You're a brave, brave man!  With a binding like that in my .emacs,
I'd be trembling in fear every time I did C-x k, lest I accidentally
wiped out everything.

> ar

-- 
Alan Mackenzie (Munich, Germany)
Email: address@hidden; to decode, wherever there is a repeated letter
(like "aa"), remove half of them (leaving, say, "a").



reply via email to

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