[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Killing Buffers
From: |
Brian Palmer |
Subject: |
Re: Killing Buffers |
Date: |
14 Jan 2004 10:21:05 -0800 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Portable Code) |
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.