From: Mathias Dahl <brakjoller@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: HELP: One Bindkey for Two Different Commands
Date: Wed, 21 Nov 2007 16:57:41 +0100 [thread overview]
Message-ID: <uabp7vbey.fsf@gmail.com> (raw)
In-Reply-To: 665ebabd-0a59-43c3-a720-13db124257d8@a28g2000hsc.googlegroups.com
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
next prev parent reply other threads:[~2007-11-21 15:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.3878.1195637702.18990.help-gnu-emacs@gnu.org>
2007-11-21 12:46 ` HELP: One Bindkey for Two Different Commands Edward
2007-11-21 15:57 ` Mathias Dahl [this message]
[not found] <mailman.3868.1195615322.18990.help-gnu-emacs@gnu.org>
2007-11-21 7:46 ` David Kastrup
2007-11-21 9:33 ` Drew Adams
2007-11-21 1:41 Edward
2007-11-21 3:20 ` Drew Adams
2007-11-21 13:03 ` Johan Bockgård
2007-11-30 16:39 ` Stefan Monnier
2007-11-30 16:55 ` Drew Adams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=uabp7vbey.fsf@gmail.com \
--to=brakjoller@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.