Path: utzoo!attcan!uunet!kddlab!ccut!ascgw!fgw!flab!umerin
From: umerin@photon.stars.flab.Fujitsu.JUNET (Masanobu UMEDA)
Newsgroups: comp.emacs
Subject: Re: deleted buffers
Message-ID: 
Date: 28 Nov 88 00:42:30 GMT
References: <1587@harlqn.UUCP> <32722@bbn.COM>
Sender: news@flab.flab.fujitsu.JUNET
Organization: Fujitsu Laboratories Ltd., Kawasaki, Japan.
Lines: 22
In-reply-to: mesard@bbn.com's message of 26 Nov 88 19:30:14 GMT

In article <32722@bbn.COM> mesard@bbn.com (Wayne Mesard) writes:
   From article <1587@harlqn.UUCP>, by jcgs@harlqn.UUCP (John Sturdy):
   > Could anyone tell me how to recognize a deleted buffer object? I'm looking
   > for something like
   >    (buffer-deleted-p BUFFER)
   > or
   >    (deleted-buffer-p OBJECT)
   > but I can't find anything like them.

   When a buffer gets killed, the buffer structure (I assume) gets set to
   # if anything's still pointing to it.  And the
   buffer-name of this psuedo buffer is nil.  So, this should do what you want:

     (defun killed-bufferp (buffer)
       (and (bufferp buffer)
	    (null (buffer-name buffer))))

Or, (not (memq buffer (buffer-list)))
--
Masanobu UMEDA
umerin@flab.flab.Fujitsu.JUNET
umerin%flab.flab.Fujitsu.JUNET@uunet.uu.NET