[Top][All Lists]

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

Re: Number of open buffers?

From: lawrence mitchell
Subject: Re: Number of open buffers?
Date: Thu, 20 Nov 2003 22:46:47 +0000
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50

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)))))

lawrence mitchell <>

reply via email to

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