[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: If exists, Kill buffer
From: |
J. David Boyd |
Subject: |
Re: If exists, Kill buffer |
Date: |
Fri, 07 Oct 2005 12:32:08 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
Tim Johnson <tim@johnsons-web.com> writes:
> I need a function that will kill a (named) buffer if it exists.
> 1)Is there one?
> a)If not, I will need a function that checks for the existance
> of a buffer by name.
> b)Is there one?
> Pointers to docs, resources welcomed.
> tim
>
> --
> Tim Johnson <tim@johnsons-web.com>
> http://www.alaska-internet-solutions.com
I don't recall where I came by this, on this group probably...
(defun kill-buffers-matching (regexp)
(interactive "sKill buffers matching: ")
(dolist (i
(buffer-list))
(when (string-match regexp (buffer-name i))
(kill-buffer i))))
Dave in Largo, FL