From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Carsten Dominik Newsgroups: gmane.emacs.devel Subject: Re: Weired side-effect of using the remap feature in keymaps Date: Fri, 30 Mar 2007 23:40:02 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v624) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1175292349 24715 80.91.229.12 (30 Mar 2007 22:05:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 30 Mar 2007 22:05:49 +0000 (UTC) Cc: thomas.baumann@ch.tum.de, emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 31 00:05:43 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HXPDw-0005UC-Th for ged-emacs-devel@m.gmane.org; Sat, 31 Mar 2007 00:05:35 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HXPGg-0004nb-6K for ged-emacs-devel@m.gmane.org; Fri, 30 Mar 2007 17:08:22 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HXPGb-0004nK-Vr for emacs-devel@gnu.org; Fri, 30 Mar 2007 18:08:18 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HXPGZ-0004n8-OY for emacs-devel@gnu.org; Fri, 30 Mar 2007 18:08:16 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HXPGZ-0004n5-Kv for emacs-devel@gnu.org; Fri, 30 Mar 2007 17:08:15 -0500 Original-Received: from korteweg.uva.nl ([146.50.98.70]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HXPDp-0005Rj-Bu for emacs-devel@gnu.org; Fri, 30 Mar 2007 18:05:25 -0400 Original-Received: from [192.168.2.2] ([81.70.211.230]) by korteweg.uva.nl with Microsoft SMTPSVC(6.0.3790.1830); Fri, 30 Mar 2007 23:40:17 +0200 In-Reply-To: X-Mailer: Apple Mail (2.624) X-OriginalArrivalTime: 30 Mar 2007 21:40:17.0192 (UTC) FILETIME=[01E8C280:01C77314] X-detected-kernel: Windows 2000 SP4, XP SP1+ X-Greylist: delayed 1507 seconds by postgrey-1.27 at monty-python; Fri, 30 Mar 2007 18:05:25 EDT 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:68783 Archived-At: On Mar 30, 2007, at 23:23, Richard Stallman wrote: > 1. Start Emacs with emacs -Q > > 2. Evaluate the following Lisp code: > > ;; Define a keymap > (defvar my-dummy-map (make-keymap)) > > ;; Now use the remap feature to remap delete-backward-char > (define-key my-dummy-map > (vector 'remap 'delete-backward-char) 'backward-char) > > ;; Create a buffer and actually install that map. This step > ;; seems to be necessary for the bug to occcur. > (switch-to-buffer (get-buffer-create "foo")) > (use-local-map my-dummy-map) > > 3. Now, start calc with `M-x calc RET'. > > 4. If you now check the definition of the DEL key, for example with > `C-h k DEL', you will see that in calc-mode, this key is now bound > to `backward-char', even though the remapping was done in > `my-dummy-map'. When calc binds the DEL key, it actually scans the > global map for any key bound to `delete-backward-char' using > > (where-is-internal 'delete-backward-char global-map) > > This search seems to fail after the code above, i.e. something > seems to have changed in global map which should not have changed. > > Nothing has changed in global-map. When I do the same call to > where-is-internal in some other buffer, it correctly returns ([127]). I forgot to mention this: I tried the same, and also found that it would return ([127]). However, when running the *compiled* calc.elc, it returns nil. - Carsten