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

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

Re: Number of open buffers?


From: David Kastrup
Subject: Re: Number of open buffers?
Date: 21 Nov 2003 00:40:25 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

lawrence mitchell <address@hidden> writes:

> David Kastrup wrote:
> 
> [...]
> 
> > Wel, if we want to squeeze characters of source, we can do so without
> > cl, too.
> 
> > (defun get-number-of-file-buffers ()
> >   (apply '+ (mapcar (lambda(x)(if(buffer-file-name x)1 0)) (buffer-list))))
> 
> I see your apply and raise you a:
> 
> (defun get-number-of-file-buffers ()
>   (length (delq nil (mapcar 'buffer-file-name (buffer-list)))))

I was looking for something like that, but the delq escaped me.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum


reply via email to

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