;;; zonk-buffers.el ;;; ;;; Copyright (C) 1999, 2000, 2004, 2007, 2008 Thien-Thi Nguyen ;;; ;;; This file is part of ttn's personal elisp library, released under ;;; the terms of the GNU General Public License as published by the ;;; Free Software Foundation; either version 3, or (at your option) any ;;; later version. There is NO WARRANTY. See file COPYING for details. ;;; Description: Delete certain buffers. (defvar zonkable-buffer-regexps '("\\*mail" "\\*ftp" "\\*emerge" "\\*Completions" "^sent " "\\*vc" "\\*Man" "\\*Locate" "\\*grep" "\\*Occur" " info dir" " \\*info tag table\\*" "\\s-Log\\*$" "\\*MailCrypt\\*" "\\*\\(Database\\|Compile\\)-Log\\*" "\\*Apropos\\*" "\\*Bookmark List\\*" ;; Add new regexps here. ) "List of regular expressions for `zonk-buffers'.") ;;;###autoload (defun zonk-buffers () "Delete buffers matching regexps in `zonkable-buffer-regexps'." (interactive) (mapcar (lambda (bufname) (mapcar (lambda (re) (and (string-match re bufname) (get-buffer bufname) (kill-buffer bufname))) zonkable-buffer-regexps)) (mapcar 'buffer-name (buffer-list)))) (provide 'zonk-buffers) ;;; zonk-buffers.el ends here