From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: discrepancy between read-key-sequence and manual Date: Mon, 11 Sep 2006 15:42:19 +0200 Message-ID: <85lkoqh64k.fsf@lola.goethe.zz> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1157982172 20729 80.91.229.2 (11 Sep 2006 13:42:52 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 11 Sep 2006 13:42:52 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 11 15:42:50 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GMm3g-0007Ux-Cp for ged-emacs-devel@m.gmane.org; Mon, 11 Sep 2006 15:42:44 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GMm3f-0004N7-G2 for ged-emacs-devel@m.gmane.org; Mon, 11 Sep 2006 09:42:43 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GMm3O-0004MO-I5 for emacs-devel@gnu.org; Mon, 11 Sep 2006 09:42:26 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GMm3N-0004Lu-Fo for emacs-devel@gnu.org; Mon, 11 Sep 2006 09:42:26 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GMm3N-0004Lr-A7 for emacs-devel@gnu.org; Mon, 11 Sep 2006 09:42:25 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GMm4e-0005BB-K3 for emacs-devel@gnu.org; Mon, 11 Sep 2006 09:43:44 -0400 Original-Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.34) id 1GMm3M-0000lV-L4 for emacs-devel@gnu.org; Mon, 11 Sep 2006 09:42:24 -0400 Original-Received: by lola.goethe.zz (Postfix, from userid 1002) id C61331C40B5C; Mon, 11 Sep 2006 15:42:19 +0200 (CEST) Original-To: emacs-devel@gnu.org User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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:59675 Archived-At: (info "(elisp) Active Keymaps") states: Normally the active keymaps are the `keymap' property keymap, the keymaps of any enabled minor modes, the current buffer's local keymap, and the global keymap, in that order. Therefore, Emacs searches for each input key sequence in all these keymaps. Here is a pseudo-Lisp description of how this process works: (or (if overriding-terminal-local-map (FIND-IN overriding-terminal-local-map) (if overriding-local-map (FIND-IN overriding-local-map) (or (FIND-IN (get-text-property (point) 'keymap)) (FIND-IN-ANY emulation-mode-map-alists) (FIND-IN-ANY minor-mode-overriding-map-alist) (FIND-IN-ANY minor-mode-map-alist) (if (get-text-property (point) 'local-map) (FIND-IN (get-text-property (point) 'local-map)) (FIND-IN (current-local-map)))))) (FIND-IN (current-global-map))) However, the code in read-key-sequence actually does (or (if (or overriding-terminal-local-map overriding-local-map) (or (FIND-IN overriding-terminal-local-map) (FIND-IN overriding-local-map)) [...] Namely, if overriding-terminal-local-map is present but no match is found in it, overriding-local-map is also searched for a match. Should the code be made to match the documentation, or the other way round? -- David Kastrup, Kriemhildstr. 15, 44793 Bochum