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

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

kill-dired-buffers


From: Kevin A. Burton
Subject: kill-dired-buffers
Date: 01 Jan 2002 17:44:26 -0800
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.1.50

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Wrote this last week.  It has been really nice to have ever since and I thought
I would share!

(defun kill-dired-buffers()
  "Kill all dired buffers."
  (interactive)

  (save-excursion
    (let((count 0))

      (dolist(buffer (buffer-list))

        (set-buffer buffer)

        (when (equal major-mode 'dired-mode)

          (setq count (1+ count))
          
          (kill-buffer buffer)))

      (message "Killed %i dired buffer(s)." count ))))

- -- 
Kevin A. Burton ( address@hidden, address@hidden, address@hidden )
             Location - San Francisco, CA, Cell - 415.595.9965
        Jabber - address@hidden,  Web - http://relativity.yi.org/

When I was a child, my mother said to me, If you become a soldier you'll be a
general. If you become a monk you'll end up as the Pope. Instead, I became a
painter and wound up as Picasso.
    - Pablo Picasso (1881-1973)

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Get my public key at: http://relativity.yi.org/pgpkey.txt

iD8DBQE8MmX6AwM6xb2dfE0RAjyNAJ91rc9h3ODhUk+wljwKUdDDoG2uQQCdH5W6
9v9MebrV9LoampByQ7rnUBI=
=FJzZ
-----END PGP SIGNATURE-----



reply via email to

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