Xref: utzoo comp.emacs:9483 gnu.emacs.help:291 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!ns-mx!iowasp.physics.uiowa.edu!maverick.ksu.ksu.edu!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu! dali.cs.montana.edu!milton!uw-beaver!ubc-cs!kiwi!spain!manderso From: manderso@spain.mpr.ca (Mark Anderson) Newsgroups: comp.emacs,gnu.emacs.help Subject: Re: elisp problem... Message-ID: <2429@kiwi.mpr.ca> Date: 10 Nov 90 01:28:40 GMT References: Sender: news@eric.mpr.ca Reply-To: manderso@mprgate.mpr.ca (Mark Anderson) Organization: MPR Teltech Ltd., Burnaby, B.C., Canada Lines: 26 In article john@wpi.WPI.EDU (John F Stoffel) writes: >I'm trying to hack the following elisp code to delete the buffer it >has just left when it goes to the new buffer. [...] >I'm trying to use (kill-buffer (previous-window)) Just glancing at this, don't you mean: (kill-buffer (window-buffer (previous-window))) Or, after switching to a new buffer I think you can kill the previous one with: (switch-to-buffer ...) (kill-buffer (car (cdr (buffer-list)))) Or you could always kill the current buffer before switching: (kill-buffer (current-buffer)) (switch-to-buffer ...) Or maybe I don't really understand the problem. :-) -- Mark Anderson manderso@mprgate.mpr.ca