Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!cbatt!ihnp4!oddjob!matt From: matt@oddjob.UUCP Newsgroups: comp.emacs Subject: Re: using variables before they are defined Message-ID: <3682@oddjob.UChicago.EDU> Date: Wed, 4-Mar-87 20:53:39 EST Article-I.D.: oddjob.3682 Posted: Wed Mar 4 20:53:39 1987 Date-Received: Fri, 6-Mar-87 22:46:41 EST References: <8703042144.AA02330@sri-c3-5> Reply-To: matt@oddjob.uchicago.edu (Ka Kahula) Organization: Very Little Lines: 25 wohler@SPAM.ISTC.SRI.COM (Bill Wohler) writes: ) i'd like to bind a key in the mh-folder-mode-map to one of my ) functions. however, the line ) ) (define-key mh-folder-mode-map "\eE" 'mh-extract-unsent-mail) ) ) in my .emacs dies since mh-folder-mode-map has not been defined yet. There is a variable called mh-folder-mode-hook. If it has a non-nil value when you enter mh-folder-mode then that value is executed. I have in my .emacs file: (setq mh-letter-mode-hook (function (lambda nil (setq indent-line-function 'indent-to-left-margin)))) You should try: (setq mh-folder-mode-hook (function (lambda nil (define-key mh-folder-mode-map "\eE" 'mh-extract-unsent-mail)))) ________________________________________________________ Matt University matt@oddjob.uchicago.edu Crawford of Chicago {astrovax,ihnp4}!oddjob!matt