From: Fredrik Arnerup <e97_far@e.kth.se>
Subject: Re: define-key and functions
Date: Sat, 06 Dec 2003 20:15:09 +0100 [thread overview]
Message-ID: <87wu99oj0i.fsf@e.kth.se> (raw)
In-Reply-To: brising-B3148C.12491006122003@netnews.attbi.com
Bill Rising <brising@louisville.edu> writes:
> Hello wizards,
>
> Is there a way to use a function which takes arguments in define-key?
>
> For instance:
> (define-key global-map "C-m" 'foo-new-line)
> runs the command foo-new-line if C-m is pressed.
>
> Is there a way to pass an argument to foo-new-line?
(define-key global-map "\C-m"
(lambda () (interactive) (foo-new-line argument)))
You really don't want to redefine C-m though. It's the same as Enter!
--
Fredrik Arnerup <e97_far@e.kth.se>
next prev parent reply other threads:[~2003-12-06 19:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-06 17:49 define-key and functions Bill Rising
2003-12-06 19:06 ` François Fleuret
2003-12-06 19:15 ` Fredrik Arnerup [this message]
2003-12-06 19:19 ` Bill Rising
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=87wu99oj0i.fsf@e.kth.se \
--to=e97_far@e.kth.se \
/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.