Article View: comp.emacs
Article #7967Re: deleted buffers
From: Wayne Mesard
Date: Sat, 26 Nov 1988 19:30
Date: Sat, 26 Nov 1988 19:30
25 lines
1233 bytes
1233 bytes
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))))
[The above was derived from setq'ing a variable to (car (buffer-list)),
killing the buffer and seeing what happened. IOW, this is the voice of
limited experience, not authority.]
--
unsigned *Wayne_Mesard(); "Whatta maroon!"
MESARD@BBN.COM -B.Bunny
BBN, Cambridge, MA
Technical Details
Message-ID:
<32722@bbn.COM>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!bbn!bbn.com!mesardReferences:
<1587@harlqn.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!bbn!bbn.com!mesard From: mesard@bbn.com (Wayne Mesard) Newsgroups: comp.emacs Subject: Re: deleted buffers Message-ID: <32722@bbn.COM> Date: 26 Nov 88 19:30:14 GMT References: <1587@harlqn.UUCP> Sender: news@bbn.COM Lines: 25