From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "D. Goel" Newsgroups: gmane.emacs.devel Subject: Re: define-key acting strange.. Date: 24 May 2002 02:43:25 -0400 Sender: emacs-devel-admin@gnu.org Message-ID: References: <200205202134.g4KLY4g26004@aztec.santafe.edu> <200205240044.g4O0iEu01307@aztec.santafe.edu> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1022222709 24413 127.0.0.1 (24 May 2002 06:45:09 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 24 May 2002 06:45:09 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17B8p3-0006Le-00 for ; Fri, 24 May 2002 08:45:09 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17B94o-0001eu-00 for ; Fri, 24 May 2002 09:01:26 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 17B8pK-0004Ch-00; Fri, 24 May 2002 02:45:26 -0400 Original-Received: from ipr-mail.umd.edu ([128.8.86.132]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 17B8nQ-0003oS-00; Fri, 24 May 2002 02:43:28 -0400 Original-Received: from poynting.umd.edu (root@poynting.umd.edu [128.8.86.100]) by ipr-mail.umd.edu (8.9.3/8.9.3) with ESMTP id CAA18260; Fri, 24 May 2002 02:43:27 -0400 (EDT) Original-Received: from poynting.umd.edu (sendmail@localhost [127.0.0.1]) by poynting.umd.edu (8.9.3/8.9.3) with SMTP id CAA01708; Fri, 24 May 2002 02:43:26 -0400 (EDT) Original-Received: (from deego@localhost) by poynting.umd.edu (8.9.3/8.9.3) id CAA29289; Fri, 24 May 2002 02:43:26 -0400 (EDT) X-Authentication-Warning: poynting.umd.edu: deego set sender to deego@glue.umd.edu using -f Original-To: rms@gnu.org In-Reply-To: Original-Lines: 55 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:4325 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:4325 ( A quick update before i go away for the long weekend.. to... Maryland!!!.. ).. All of the problem was being caused by the one line in that expression: (guess i will have to wait another day to learn GDB :) (define-key [t] ).. and that could be anything .. Emacs is not frozen.. 'tis just that this line has the effect of adding a (t . ) to your keymap <-- Whether this result is a bug or not, i am not sure.. Now depending on and the other bindings in the key-translation-map, one might end up effectively getting a 'frozen' emacs.. Consider this expression: (this is how i first traced that (not-really-a-)bug..) (progn (message "DOING") (define-key key-translation-map [t] "f") (define-key key-translation-map "u" "v") (message "DONE") (goto-char (point-max)) (insert (format "%s" key-translation-map)) (write-file "~/gg.gg") ) After eval'ing this, key-translation-map looks like this: (keymap (117 . v) (t . f) (24 keymap (56 . iso-transl-ctl-x-8-map))) (117 is u...).. Once you have this keymap, *everything* you type inserts a f, except when you type u, which inserts v. So, everything is happening in accordance with key-translation-map, IMHO. In the original expression, everything was getting mapped to [T]... which just beeped at us .. what is [T] ? BTW, up-arrow inserts 3 f's... guess why ? :) up-->ESC O A --> f f f Wishing a great weekend to all.. D -- Why don't *we* have congressmen like the one writing this!!! ----> http://www.gnu.org.pe/resmseng.html