From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Ernest =?iso-8859-1?Q?Adrogu=E9?= Newsgroups: gmane.emacs.help Subject: unexpected result with keymap inheritance Date: Mon, 21 Nov 2016 01:28:38 +0100 Message-ID: <20161121002838.rkoniry5n6aemrzt@doriath.local> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1479689923 31807 195.159.176.226 (21 Nov 2016 00:58:43 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 21 Nov 2016 00:58:43 +0000 (UTC) User-Agent: NeoMutt/20161014 (1.7.1) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Nov 21 01:58:40 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c8cwM-0007PK-Vh for geh-help-gnu-emacs@m.gmane.org; Mon, 21 Nov 2016 01:58:40 +0100 Original-Received: from localhost ([::1]:46762 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c8cwQ-0003ko-IG for geh-help-gnu-emacs@m.gmane.org; Sun, 20 Nov 2016 19:58:38 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59397) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c8cTV-0008Bl-2x for help-gnu-emacs@gnu.org; Sun, 20 Nov 2016 19:28:45 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c8cTR-0000iT-To for help-gnu-emacs@gnu.org; Sun, 20 Nov 2016 19:28:45 -0500 Original-Received: from mail-wm0-x234.google.com ([2a00:1450:400c:c09::234]:37318) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c8cTR-0000h8-MU for help-gnu-emacs@gnu.org; Sun, 20 Nov 2016 19:28:41 -0500 Original-Received: by mail-wm0-x234.google.com with SMTP id t79so118222729wmt.0 for ; Sun, 20 Nov 2016 16:28:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:mail-followup-to:mime-version :content-disposition:user-agent; bh=s8bjWRDRVStzlcO85WtYsZ3KkF300Bdz04UEe+9wcIw=; b=viUw+du6neVeFA4zWELRkkJcHmT1ih/Xu409LsaoO3+1ErVz3Xx66Nic+dEee91wW+ +sqFGkDaNvBTEUKGhCniHxKDNab8p0YSqaTBJ6AI+lTgli2G9wO3TvZ04zpKvQZRN3P1 twGAZpVLA56bSkr8tQPteaM8zxjkRsyniWmhRigX/tAVRFRWM799gtDr1dYNovJdDXHV VBB4+Ws0vtOlcXs7C9iijbKzB26gl8K9U8QtCRqB0OGQCRwPwPSZkMf3iIDy3e+ct4+0 Oihr8Kouzq9adFxS1vj5pD3CZadBXMmdKSB/Jm5FJ+pLSNp4GxtwthbQ7M0wCN6dhTiK pM5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:mail-followup-to :mime-version:content-disposition:user-agent; bh=s8bjWRDRVStzlcO85WtYsZ3KkF300Bdz04UEe+9wcIw=; b=A3DX7hXBSrfmxCdc8GOm/rUtIXU6vyBpVE6lODCwr0+j2VYym2KFQhWoXnQLHfS2eH iXCooElwEAdvY7se2+J8isTdFSuPb8yegMGGXO6mI9mhb+DsKnfrf00lu69Ww73R8hT+ TD1faeRhV6rFIwm8jrc4byhzcMfl/N83qZwkbTlsDSiORrlMe5hlKHQog9ykB2cdICFA jWB0f0R48pSySM9ci9T5Pxm1Mp141gqkDxj6HgVL3TIH4oQuNiagOPFNfZDuwSlbaFiR 6BoqMscxVAKfqn0GK4hzqEqXulYf2B5El4/uDprf1yY878Sy9L054+wSQFLlYE4to5rH QPyA== X-Gm-Message-State: AKaTC000g3jM/P0Dh0sez0wpiqKayEmIvTkP7IQpjE7/4ZzKMQovKlbPZ+P5QuhEidWgQg== X-Received: by 10.28.187.11 with SMTP id l11mr10899064wmf.72.1479688120199; Sun, 20 Nov 2016 16:28:40 -0800 (PST) Original-Received: from doriath (203.98.15.37.dynamic.jazztel.es. [37.15.98.203]) by smtp.gmail.com with ESMTPSA id d64sm16396722wmh.3.2016.11.20.16.28.39 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 20 Nov 2016 16:28:39 -0800 (PST) Mail-Followup-To: help-gnu-emacs@gnu.org Content-Disposition: inline X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::234 X-Mailman-Approved-At: Sun, 20 Nov 2016 19:57:45 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:111752 Archived-At: Hi there, when I remove a binding from a child keymap that is shadowing a binding from its parent keymap, the resulting binding for the key is not the one in the parent keymap but the binding from the parent's parent keymap: (setq parent-map (make-sparse-keymap)) (setq child-map (make-sparse-keymap)) (set-keymap-parent parent-map global-map) (set-keymap-parent child-map parent-map) (define-key parent-map [?a] 'backward-char) (use-local-map child-map) (key-binding [?a]) => backward-char (define-key child-map [?a] 'forward-char) (key-binding [?a]) => forward-char (define-key child-map [?a] nil) (key-binding [?a]) => self-insert-command I thought the last line would evaluate to backward-char. Is this how it's supposed to work or is it some kind of bug? Cheers.