From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: Problem: Keymap not working... Date: Mon, 07 Feb 2005 13:37:00 -0700 Message-ID: <36q1rcF5493j4U2@individual.net> References: <87braxzj3u.fsf@lux99.localhost> <36promF53us79U1@individual.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1107808858 31856 80.91.229.2 (7 Feb 2005 20:40:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 7 Feb 2005 20:40:58 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Feb 07 21:40:58 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1CyFgX-00040O-5k for geh-help-gnu-emacs@m.gmane.org; Mon, 07 Feb 2005 21:40:41 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CyFuj-0006rz-1D for geh-help-gnu-emacs@m.gmane.org; Mon, 07 Feb 2005 15:55:21 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsmi-us.news.garr.it!newsmi-eu.news.garr.it!NewsITBone-GARR!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 23 Original-X-Trace: individual.net Tmdyut3vyJPPFLYpweBTkAKyeDcVTCumzdC2W3mpr9fgypp7s= User-Agent: Mozilla Thunderbird 0.9 (X11/20041105) X-Accept-Language: en-us, en In-Reply-To: <36promF53us79U1@individual.net> Original-Xref: shelby.stanford.edu gnu.emacs.help:128428 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org X-MailScanner-To: geh-help-gnu-emacs@m.gmane.org Xref: main.gmane.org gmane.emacs.help:23948 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:23948 Kevin Rodgers wrote: > You need to return the keymap from the let form, so that it is bound to > the variable. Also, it's not a bug but it is a little confusing to use > the name of the global variable as the name of the local variable: > > (defvar musman-mode-map > (let ((map (make-sparse-keymap))) > (define-key musman-mode-map "\C-ck" 'musman-Konzert) > ... > (define-key musman-mode-map "\C-c z" 'musman-Zur?ckrufen) > map)) Oops, that should be: (defvar musman-mode-map (let ((map (make-sparse-keymap))) (define-key map "\C-ck" 'musman-Konzert) ... (define-key map "\C-c z" 'musman-Zur?ckrufen) map)) -- Kevin Rodgers