[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: HELP: One Bindkey for Two Different Commands
From: |
Mathias Dahl |
Subject: |
Re: HELP: One Bindkey for Two Different Commands |
Date: |
Wed, 21 Nov 2007 16:57:41 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (windows-nt) |
Edward <edward.dodge@gmail.com> writes:
> (defun ya-ya ()
> (interactive) ; new
> (if (cdr (window-list))
> (other-window 1) ; command with argument
> (call-interactively 'switch-to-buffer))) ; command called
> interactively, argument to be passed at that time
Could it be that what you really want is this?
(defun ya-ya ()
(interactive)
(if (cdr (window-list))
(other-window 1)
(switch-to-buffer (other-buffer)))) ;; Switch to previous buffer
Just guessing... :)
/Mathias