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

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

Re: kill buffers according to regex


From: Henrik Enberg
Subject: Re: kill buffers according to regex
Date: Mon, 17 Jan 2005 20:45:04 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux)

Matthew Huggett <mhuggett@zam.att.ne.jp> writes:

> Hello all,
>
> Is there any built-in command to kill all buffers that match a regex?

(defun kill-buffers-matching (regexp)
  (interactive "sKill buffers matching: ")
  (dolist (i (buffer-list)) 
    (when (string-match regexp (buffer-name i)) 
      (kill-buffer i))))

reply via email to

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