From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#9751: 23.3; Alternative Keyboard Feature/Bug Date: Mon, 24 Oct 2011 09:01:33 -0400 Message-ID: References: <675A64DA-C90A-4DBC-A3DB-C564A318B70F@cs.duke.edu> <0DC129AB-1830-4EED-A487-1C4CDCE4CB46@cs.duke.edu> <83sjmvjxps.fsf@gnu.org> <672DC73F-99F7-4CDC-86DA-318FCA8DEB70@cs.duke.edu> <87r528pllc.fsf@mail.jurta.org> <878vogmazh.fsf@mail.jurta.org> <87fwimeety.fsf@mail.jurta.org> <87sjmlhwbt.fsf@mail.jurta.org> <87fwijdmb0.fsf@mail.jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1319461370 22198 80.91.229.12 (24 Oct 2011 13:02:50 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 24 Oct 2011 13:02:50 +0000 (UTC) Cc: lekktu@gmail.com, Andreas Schwab , Nikos Pitsianis , 9751@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 24 15:02:45 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RIKAu-0003PZ-M3 for geb-bug-gnu-emacs@m.gmane.org; Mon, 24 Oct 2011 15:02:44 +0200 Original-Received: from localhost ([::1]:37658 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RIKAu-0004Jy-8X for geb-bug-gnu-emacs@m.gmane.org; Mon, 24 Oct 2011 09:02:44 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:47685) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RIKAm-0004Je-4y for bug-gnu-emacs@gnu.org; Mon, 24 Oct 2011 09:02:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RIKAg-00071W-UN for bug-gnu-emacs@gnu.org; Mon, 24 Oct 2011 09:02:36 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33661) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RIKAg-00071S-Sn for bug-gnu-emacs@gnu.org; Mon, 24 Oct 2011 09:02:30 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RIKC9-0007DK-Mg for bug-gnu-emacs@gnu.org; Mon, 24 Oct 2011 09:04:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 24 Oct 2011 13:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9751 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 9751-submit@debbugs.gnu.org id=B9751.131946139527677 (code B ref 9751); Mon, 24 Oct 2011 13:04:01 +0000 Original-Received: (at 9751) by debbugs.gnu.org; 24 Oct 2011 13:03:15 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RIKBP-0007CM-3j for submit@debbugs.gnu.org; Mon, 24 Oct 2011 09:03:15 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RIKBL-0007C8-LY for 9751@debbugs.gnu.org; Mon, 24 Oct 2011 09:03:13 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AiIFAA9hpU5MCqLO/2dsb2JhbABDhHWiFIIIgQaBbgEBBAEjMyMFCwsaAhgOAgIUGA0kiBOhfZEygTCFfIEUBKE7hEU X-IronPort-AV: E=Sophos;i="4.69,398,1315195200"; d="scan'208";a="144109668" Original-Received: from 76-10-162-206.dsl.teksavvy.com (HELO pastel.home) ([76.10.162.206]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 24 Oct 2011 09:01:34 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id E898D58B4A; Mon, 24 Oct 2011 09:01:33 -0400 (EDT) In-Reply-To: <87fwijdmb0.fsf@mail.jurta.org> (Juri Linkov's message of "Mon, 24 Oct 2011 08:17:31 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 24 Oct 2011 09:04:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:53065 Archived-At: > typing `=CE=B2' in Info has no effect, it doesn't call `beginning-of-buff= er'. > When typing in Info `C-h k =CE=B2', it says: > =CE=B2 is undefined Ah, thanks, now I see. So the issue is the following one: 1- keymaps provide a way to hide bindings in parent keymaps (by using an explicit nil binding), but not to hide a binding in subsequent maps (e.g. a local map can't hide a binding in the global map). 2- for the main keymaps used to bind keys to commands, we can work around this limitation by binding the key to the command `undefined'. 3- but function-key-map doesn't know about this convention, so `undefined' is not recognized as "not bound". I think it would be good to fix (1), but there are very few keymaps that are both "special in that the bindings are not commands" and have a "subsequent keymap" at the same time. Also even if we fix (1), we'd have to update all the code using `undefined' to use the new special value (unless we choose `undefined' for that new value, of course). So I think that fixing (3) is the best choice for now. Does the patch below work for you? Stefan =3D=3D=3D modified file 'src/keyboard.c' --- src/keyboard.c 2011-10-03 20:50:54 +0000 +++ src/keyboard.c 2011-10-24 13:00:50 +0000 @@ -9852,7 +9852,9 @@ } } =20 - if (first_binding < nmaps && NILP (submaps[first_binding]) + if (first_binding < nmaps + && NILP (submaps[first_binding]) + && !EQ (defs[first_binding], Qundefined) && indec.start >=3D t) /* There is a binding and it's not a prefix. (and it doesn't have any input-decode-map translation pending).