From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: 'ignore hides \r in keymap Date: Thu, 03 Nov 2005 18:26:52 +0100 Message-ID: <436A485C.6020803@student.lu.se> References: <436802B8.4090509@student.lu.se> 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 1131038981 9642 80.91.229.2 (3 Nov 2005 17:29:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 3 Nov 2005 17:29:41 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 03 18:29:34 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EXis4-0001Ro-HW for ged-emacs-devel@m.gmane.org; Thu, 03 Nov 2005 18:27:28 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EXis3-00073q-OP for ged-emacs-devel@m.gmane.org; Thu, 03 Nov 2005 12:27:27 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EXirZ-0006iR-J4 for emacs-devel@gnu.org; Thu, 03 Nov 2005 12:26:57 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EXirX-0006fq-OU for emacs-devel@gnu.org; Thu, 03 Nov 2005 12:26:57 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EXirW-0006fk-0A for emacs-devel@gnu.org; Thu, 03 Nov 2005 12:26:55 -0500 Original-Received: from [81.228.8.83] (helo=pne-smtpout1-sn2.hy.skanova.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EXirW-00056k-2Z for emacs-devel@gnu.org; Thu, 03 Nov 2005 12:26:54 -0500 Original-Received: from [192.168.123.121] (83.249.218.244) by pne-smtpout1-sn2.hy.skanova.net (7.2.060.1) id 436A3A5300004143 for emacs-devel@gnu.org; Thu, 3 Nov 2005 18:26:52 +0100 User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en Original-To: Emacs Devel In-Reply-To: <436802B8.4090509@student.lu.se> X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:45363 Archived-At: Could someone please check this? Am I misunderstanding something here too, or? It seems to me that \r is handled different than other keys here. Lennart Borgman wrote: > This is one of those strange errors I wish I did not see. It seems > like 'ignore somehow hides \r in a keymap. To show this start with > "emacs -Q" and evaluate the following: > > ;; Set up > (defconst km (make-sparse-keymap)) > (define-key km "\r" (lambda()(interactive)(message "hit RET"))) > > ;; Convinience switching to/from km > (define-key km [(home)] (lambda()(interactive)(use-local-map nil))) > (global-set-key [(control meta home)] > (lambda()(interactive)(use-local-map km))) > > ;; Test using either of these and then hit RET > (define-key km [?i] (lambda()(interactive)(define-key km '[t] 'ignore))) > (define-key km [?n] (lambda()(interactive)(define-key km '[t] nil))) > > Activate the km keymap with C-M-home. Switch between using 'ignore or > nil for unbound keys in km by hitting i and n. I see the following: > > - Using nil and hitting RET gives the message "hit RET" > - Using 'ignore and hitting RET gives nothing. > > I am doing this with CVS Emacs from 2005-10-27 on w32.