Path: 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 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)))) [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