all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Brian Palmer <bpalmer@rescomp.Stanford.EDU>
Subject: Re: Killing Buffers
Date: 14 Jan 2004 10:21:05 -0800	[thread overview]
Message-ID: <0wheku275ny.fsf@rescomp.Stanford.EDU> (raw)
In-Reply-To: 400417BD.7050203@yahoo.com

Kevin Rodgers <ihs_4664@yahoo.com> writes:

> Brian Palmer wrote:
>  > Sorry 'bout that. It's as simple as changing, in
>  > kill-all-other-buffer-frames
>  > (buffers-to-kill (buffer-list)))
>  > to
>  > (buffers-to-kill (mapcar 'buffer-name (buffer-list))))
> 
> How could that have any effect?  Each element of buffers-to-kill is
> passed directly to kill-buffer, which handles a buffer or a buffer name
> the same.  And if you used buffers instead of names, you could use delq
> instead of delete.

The trouble was that cur-buf-name uses the buffer name, but
buffers-to-kill had been actual buffers. (I think I started with one,
and changed approach). Either using buffers throughout, or using names
throughout, is required. Personally, I prefer using names. Your point
about eq rather than equal is spot-on, however. 
 
> On a stylistic note, you use setf from the Common Lisp compatibility
> library, but call mapcar without side effect instead of using the
> (CL-inspired) mapc built-in function.

Thanks! I'm always looking for stylistic feedback. 
-- 
I'm awfully glad I'm a Beta, because I don't work so hard.

  reply	other threads:[~2004-01-14 18:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-29 13:34 Killing Buffers Edward Wijaya
2003-12-29  6:27 ` Friedrich Dominicus
2003-12-29  6:55 ` Eli Zaretskii
2004-01-02 18:49 ` Bruce Ingalls
2004-01-02 20:54   ` Brian Palmer
2004-01-03  3:46     ` Andi Kleen
2004-01-05 19:27       ` Kevin Rodgers
2004-01-03 13:51     ` Bruce Ingalls
2004-01-12 15:02       ` Brian Palmer
2004-01-13 16:07         ` Kevin Rodgers
2004-01-14 18:21           ` Brian Palmer [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-01-02 22:28 Edward Wijaya

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=0wheku275ny.fsf@rescomp.Stanford.EDU \
    --to=bpalmer@rescomp.stanford.edu \
    /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.