Path: utzoo!utgpu!watmath!att!tut.cis.ohio-state.edu!cwjcc!ukma!xanth!talos!kjones From: kjones@talos.uucp (Kyle Jones) Newsgroups: comp.emacs Subject: Re: Problem with buffer object life in GNU Emacs Lisp Message-ID: <1989Aug7.152011.10962@talos.uucp> Date: 7 Aug 89 15:20:11 GMT References: <1414@novavax.UUCP> Reply-To: kjones%talos.uucp@uunet.uu.net Lines: 17 Bob Weiner writes: > If you do something like: > > (setq rmail-summary-buffer (get-buffer "RMAIL-summary")) > > and then kill the actual summary buffer, rmail-summary-buffer will now > reference a 'killed buffer' object. Typical code uses get-buffer to > check if such a buffer exists, if it does not, get-buffer usually returns > nil. The global reference rmail-summary-buffer prevents the object from > being garbage collected so (get-buffer "RMAIL-summary") still returns a > non-nil value and your conditional code fails. > [...] > This is all based on GNU Emacs 18.52. Thanks for any help. I tried this under GNU Emacs 18.52 here and get-buffer returned nil. Could you have confused get-buffer with bufferp? The latter will return non-nil even if it's argument is a killed buffer.