From: Barry Margolin <barmar@alum.mit.edu>
To: help-gnu-emacs@gnu.org
Subject: Re: global-set-key with parameter
Date: Thu, 09 Oct 2008 02:40:51 -0400 [thread overview]
Message-ID: <barmar-B0829E.02405109102008@news.motzarella.org> (raw)
In-Reply-To: mailman.652.1223525988.25473.help-gnu-emacs@gnu.org
In article <mailman.652.1223525988.25473.help-gnu-emacs@gnu.org>,
Fred Picher <frederificc@yahoo.ca> wrote:
> Hello all,
>
> I would like to bind the following function and parameter to the F5
> key in emacs 23, which is currently undefined. This is to save the
> buffer layout to be recalled using the lowercase 'w' key:
>
> C-x r w w
>
> That would be the window-configuration-to-register command I
> think. I could do something like:
>
> (global-set-key [f5] 'window-configuration-to-register)
>
> But how is the 'w' parameter passed to this command ?
You need to write a new Elisp function that calls
window-configuration-to-register with the parameter, and bind the key to
THAT function.
(defun window-config-to-register-w ()
"Store the window configuration in register 'w'."
(interactive)
(window-configuration-to-register ?w))
(global-set-key [f5] 'window-configuration-to-register-w)
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
next parent reply other threads:[~2008-10-09 6:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.652.1223525988.25473.help-gnu-emacs@gnu.org>
2008-10-09 6:40 ` Barry Margolin [this message]
2008-10-09 13:49 ` global-set-key with parameter Fred Picher
[not found] <mailman.685.1223560176.25473.help-gnu-emacs@gnu.org>
2008-10-09 14:11 ` harven
2008-10-08 18:32 Fred Picher
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=barmar-B0829E.02405109102008@news.motzarella.org \
--to=barmar@alum.mit.edu \
--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.