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 16:36:16 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

Ignoramus15351 <address@hidden> writes:

> people, thank you, you are all beautiful.
> 
> The following works like a charm:
> 
> (defun get-number-of-file-buffers ()
>   (interactive)

Delete the (interactive) line: the function does nothing useful when
called interactively and thus should not clutter up command
completion.

>   (let (num)
>     (setq num 0)
>     (dolist (buf (buffer-list))
>       (when (buffer-file-name buf)
>         (setq num (+ num 1))
>         ))
>     num
>     )
>   )

Pffft.  The most verbose version.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum


reply via email to

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