🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.emacs
Article #7970

Re: deleted buffers

#7970
From: Randal L. Schwartz Stonehenge
Date: Sat, 26 Nov 1988 23:17
25 lines
1494 bytes
In article <1587@harlqn.UUCP>, jcgs@harlqn (John Sturdy) writes:
| 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.

How about something like:

(defun deleted-buffer-p (object)
  "T if OBJECT is a deleted editor buffer."
  (and (bufferp object)
       (not (memq object (buffer-list)))))

I tried it on two test cases, and it worked.  Your mileage may vary.

Why are you testing for a deleted buffer?
-- 
Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095
on contract to BiiN Technical Information Services (for now :-),
in a former Intel building in Hillsboro, Oregon, USA.
<merlyn@intelob.biin.com> or ...!tektronix!inteloa[!intelob]!merlyn
SOME MAILERS REQUIRE <merlyn@intelob.intel.com> GRRRRR!
Standard disclaimer: I *am* my employer!
Technical Details
Message-ID: <3234@mipos3.intel.com>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!tut.cis.ohio-state.edu!rutgers!apple!voder!pyramid!oliveb!intelca!mipos3!merlyn
References: <1587@harlqn.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!tut.cis.ohio-state.edu!rutgers!apple!voder!pyramid!oliveb!intelca!mipos3!merlyn
From: merlyn@intelob.biin.com (Randal L. Schwartz @ Stonehenge)
Newsgroups: comp.emacs,gnu.emacs
Subject: Re: deleted buffers
Message-ID: <3234@mipos3.intel.com>
Date: 26 Nov 88 23:17:18 GMT
References: <1587@harlqn.UUCP>
Sender: news@mipos3.intel.com
Reply-To: merlyn@intelob.biin.com (Randal L. Schwartz @ Stonehenge)
Organization: Stonehenge; netaccess via BiiN, Hillsboro, Oregon, USA
Lines: 25
In-reply-to: jcgs@harlqn.UUCP (John Sturdy)