all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "RealityMonster" <jan.sacharuk@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: how can i kill all the buffers
Date: 31 Jan 2007 17:02:09 -0800	[thread overview]
Message-ID: <1170291729.222129.81800@l53g2000cwa.googlegroups.com> (raw)
In-Reply-To: <1170170369.232375.163210@h3g2000cwc.googlegroups.com>

On Jan 30, 8:19 am, "step" <fxl...@gmail.com> wrote:
>  1. this is any command to kill all buffers ,not close the emacs
>
>  2. if only i  want to close the buffers of some mode (ep: c
> files),can i do it?
>
>  3x

I took kill-some-buffers and modified it a bit.

(defun kill-all-buffers (&optional list)
  "For each buffer in LIST, kill it. If it's been modified don't do
anything.
LIST defaults to all existing live buffers."
  (interactive)
  (if (null list)
      (setq list (buffer-list)))
  (while list
    (let* ((buffer (car list))
	   (name (buffer-name buffer)))
      (and (not (string-equal name ""))
	   (/= (aref name 0) ? )
	   (if (not (buffer-modified-p buffer)) t )
	   (kill-buffer buffer)))
    (setq list (cdr list))))

  parent reply	other threads:[~2007-02-01  1:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-30 15:19 how can i kill all the buffers step
2007-01-30 16:51 ` HS
2007-01-30 17:06 ` Marc Tfardy
2007-01-30 17:15 ` Marc Tfardy
2007-01-30 22:34 ` Eric Hanchrow
2007-01-30 22:46   ` Peter Dyballa
2007-01-30 23:00     ` Eric Hanchrow
2007-01-30 23:11       ` Peter Dyballa
2007-01-31  1:25   ` Drew Adams
2007-02-01  1:02 ` RealityMonster [this message]
2007-02-01  4:23 ` Eric Hanchrow

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1170291729.222129.81800@l53g2000cwa.googlegroups.com \
    --to=jan.sacharuk@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.