Thread View: wpi.ccc
1 messages
1 total messages
Started by John F Stoffel
Fri, 09 Nov 1990 22:36
elisp problem...
Author: John F Stoffel
Date: Fri, 09 Nov 1990 22:36
Date: Fri, 09 Nov 1990 22:36
36 lines
1978 bytes
1978 bytes
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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads