Xref: utzoo comp.emacs:9482 gnu.emacs.help:290 Path: utzoo!utgpu!watserv1!watmath!uunet!ns-mx!iowasp.physics.uiowa.edu!maverick.ksu.ksu.edu!zaphod.mps.ohio-state.edu!julius.cs.uiuc.edu!psuvax1!husc6!m2c!wpi.WPI.EDU!wpi!john From: john@wpi.WPI.EDU (John F Stoffel) Newsgroups: wpi.ccc,comp.emacs,gnu.emacs.help Subject: elisp problem... Message-ID: Date: 9 Nov 90 22:36:51 GMT Sender: news@wpi.WPI.EDU (News) Organization: Phule's Company Lines: 36 Nntp-Posting-Host: wpi.wpi.edu I'm trying to hack the following elisp code to delete the buffer it has just left when it goes to the new buffer. This code is for enhancements to dired to go up and down directories easier. (defun dired-up-directory () "Find .., switching to its buffer if it exists" (interactive) (let* ((target-dir (parent dired-directory)) (target-dir-entry (assoc target-dir dired-dirs-alist)) (target-dir-buffer (car (cdr target-dir-entry)))) (cond (target-dir-entry (cond ((memq target-dir-buffer (buffer-list)) (switch-to-buffer target-dir-buffer)) (t (setq dired-dirs-alist (alist-delete target-dir-entry dired-dirs-alist)) (find-file target-dir)))) (t (find-file target-dir)))) ) I'm trying to use (kill-buffer (previous-window)) which worked in another function to kill the buffer, but nothing happens now. I've tried placing it right after the (interactive), just before and after (switch-to-buffer ...), and at the very end after (t (find-file target-dir)))) but nothing happens. It all loads fine, but it go... blah! No while I'd like a fix for this problem, I'd also like an explanation of WHY it didn't work. Thanks for your time and effort... -- I dreamt about a reefer five feet long, | John Stoffel a might immense, but not too stong, | john@wpi.wpi.edu you'll be high, but not for long. |--------------------------------- when you're, a viper... <-- The Viper Drag Ain't Misbehaiving