Article View: comp.emacs
Article #7980Re: deleted buffers
From: Masanobu UMEDA
Date: Mon, 28 Nov 1988 00:42
Date: Mon, 28 Nov 1988 00:42
22 lines
1331 bytes
1331 bytes
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
#<killed buffer> 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
Technical Details
Message-ID:
<UMERIN.88Nov28094230@photon.stars.flab.Fujitsu.JUNET>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!kddlab!ccut!ascgw!fgw!flab!umerinReferences:
<1587@harlqn.UUCP> <32722@bbn.COM>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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: <UMERIN.88Nov28094230@photon.stars.flab.Fujitsu.JUNET> 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