home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / gnu / emacs / help / 5482 < prev    next >
Encoding:
Text File  |  1993-01-24  |  1.2 KB  |  32 lines

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