home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: gnu.emacs.help
- Path: sparky!uunet!destroyer!gatech!psuvax1!liblit
- From: liblit@cs.psu.edu (Benjamin R. Liblit)
- Subject: Re: keymap defs -- using lambda expressions
- In-Reply-To: TTN@ECL.PSU.EDU's message of Sun, 24 Jan 93 20:28:49 GMT
- Message-ID: <C1DMuy.Hw2@cs.psu.edu>
- Sender: news@cs.psu.edu (Usenet)
- Nntp-Posting-Host: waldo.cs.psu.edu
- References: <hyk1H?8o3c@atlantis.psu.edu>
- Date: Sun, 24 Jan 1993 21:11:15 GMT
- Lines: 19
-
- In article <hyk1H?8o3c@atlantis.psu.edu>, TTN@ECL.PSU.EDU (Thien-Thi Nguyen) writes:
- > (define-key some-mode-map '(lambda () (kill-buffer (current-buffer))))
-
- You're missing an argument to define-key. The general format is:
-
- (define-key KEYMAP KEY DEFINITION)
-
- You've got the keymap and the definition, but you're missing the key
- itself. Try something like the following:
-
- (define-key some-mode-map "k" '(lambda () .....))
-
- That would find the given lambda function to the "k" key in the given
- keymap. For more information on how keys can be specified, see
- "String Type" in the elisp reference.
-
- --
- Ben Liblit ----- "Fais que tes reves soient plus longs que la nuit."
- liblit@cs.psu.edu -- brl102@psuvm.psu.edu -- brl102@psuvm.bitnet
-