From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: I do not understand input-decode-map Date: Mon, 29 Sep 2008 21:31:14 -0400 Message-ID: References: <48E14168.5060400@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1222738293 17394 80.91.229.12 (30 Sep 2008 01:31:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 30 Sep 2008 01:31:33 +0000 (UTC) Cc: Emacs Devel To: "Lennart Borgman \(gmail\)" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 30 03:32:30 2008 connect(): Connection refused 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 1KkU6G-00023c-Hr for ged-emacs-devel@m.gmane.org; Tue, 30 Sep 2008 03:32:28 +0200 Original-Received: from localhost ([127.0.0.1]:44913 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KkU5D-00071R-Nk for ged-emacs-devel@m.gmane.org; Mon, 29 Sep 2008 21:31:23 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KkU59-00071M-3k for emacs-devel@gnu.org; Mon, 29 Sep 2008 21:31:19 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KkU56-00071A-Fp for emacs-devel@gnu.org; Mon, 29 Sep 2008 21:31:17 -0400 Original-Received: from [199.232.76.173] (port=36764 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KkU56-000717-9b for emacs-devel@gnu.org; Mon, 29 Sep 2008 21:31:16 -0400 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182]:45703 helo=ironport2-out.teksavvy.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KkU55-0006Cx-TF for emacs-devel@gnu.org; Mon, 29 Sep 2008 21:31:16 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AuYEAKse4UjO+KDT/2dsb2JhbACBZLpQgWeBBA X-IronPort-AV: E=Sophos;i="4.33,334,1220241600"; d="scan'208";a="27738786" Original-Received: from 206-248-160-211.dsl.teksavvy.com (HELO pastel.home) ([206.248.160.211]) by ironport2-out.teksavvy.com with ESMTP; 29 Sep 2008 21:31:14 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 65BFC4B4DE; Mon, 29 Sep 2008 21:31:14 -0400 (EDT) In-Reply-To: <48E14168.5060400@gmail.com> (Lennart Borgman's message of "Mon, 29 Sep 2008 22:58:16 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. 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:104240 Archived-At: > This works, ie typing "." gives ":" (even in for example Viper) > (define-key input-decode-map [?\.] [?\:]) > Why does not the next work? > (setq input-decode-map (make-sparse-keymap)) > (defvar my-second-map (make-sparse-keymap)) > (define-key my-second-map [?\:] [?\.]) > (define-key input-decode-map [?\,] my-second-map) > Typing "," does what it use to do. Not too bad, but not what I expected ... The detailed behavior is fairly tricky. Basically, it's difficult to know when to stop waiting for more keys. IIRC the code basically stops if the current input (rewritten/remapped as necessary) is a valid key sequence bound to a command. Stefan