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: Re: unexpected result with keymap inheritance Date: Tue, 22 Nov 2016 01:30:15 +0100 Message-ID: <20161122003014.wzywiqst627yyp3l@doriath.local> References: <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 1479774654 32372 195.159.176.226 (22 Nov 2016 00:30:54 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 22 Nov 2016 00:30:54 +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 Tue Nov 22 01:30:51 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 1c8yz3-0007gg-EJ for geh-help-gnu-emacs@m.gmane.org; Tue, 22 Nov 2016 01:30:49 +0100 Original-Received: from localhost ([::1]:52472 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c8yz6-0008FC-Ue for geh-help-gnu-emacs@m.gmane.org; Mon, 21 Nov 2016 19:30:52 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37276) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c8yyg-0008EP-Kt for help-gnu-emacs@gnu.org; Mon, 21 Nov 2016 19:30:27 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c8yyb-0000pj-OJ for help-gnu-emacs@gnu.org; Mon, 21 Nov 2016 19:30:26 -0500 Original-Received: from mail-wm0-x22e.google.com ([2a00:1450:400c:c09::22e]:35063) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c8yyb-0000ow-HG for help-gnu-emacs@gnu.org; Mon, 21 Nov 2016 19:30:21 -0500 Original-Received: by mail-wm0-x22e.google.com with SMTP id a197so10064112wmd.0 for ; Mon, 21 Nov 2016 16:30:21 -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:references :mime-version:content-disposition:in-reply-to:user-agent; bh=xCuMLzZfQ3UZrLW38rTBt+hPEuRtPosRhmN5i5j6a98=; b=Oasa0JNqDwrxiNT3UwcM5bnsMPRrFipQQd+YsM6vLosKlsNBRJ9sgMR+QYZSxWS3Gc e5xdDeloQc520/LLRpB9dZUErYH7z2i48VqBJ1DH2CaPV6w2EUvnyHfp6vH1fToITuO8 eI186IqwgC0PIqcvYKVKV/aQhGXSLe3Tc57xC/KwnfrM0zzc4dBRudrSbapmD/LK837G Uw04kHGdMUzwR3kaWQBnzs5lKHPLTRQ3RzXUpjHaYj0jiJ8i3cufakvL1RWFyxhPf7t/ T9zwm9pKByNRY/gxo3J1bj1fYHiqsJDHQUlyCVBXCeu7jc0/zeprjnHpycPRS/1Tct5d NWzA== 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 :references:mime-version:content-disposition:in-reply-to:user-agent; bh=xCuMLzZfQ3UZrLW38rTBt+hPEuRtPosRhmN5i5j6a98=; b=P/OoPCui8s45CRXSqpA+BGMtX6zw0c+Th2Pac+JnsDGvGqfxzsIoXyRO78hkKzVAe9 iJrxdiEihL8CVBiGZRhPTX9Jbkh5QVPV28p+8JWoH+tCeh3SQkmfAIAT8zq6TrZeMVve uqW9lufhZZ3fnJGndLFnIde1egvSsQcHmVijJ2V0fQ2zafLk4ZiaRjPn+qGzv78Gk/a2 U7TlVM3D8a0dNcmW9sAOmvmW07PnSVftiGU3QX5yaRwn0NAqkCJ5jP8gS6F8dhoxarPQ JWy/xpjjGinPjOzgpdaGD7Gl3M1Fskpht2qx98LUVuaA24N4O1OUIM4mlmaQ/MQkVmTv i7qg== X-Gm-Message-State: AKaTC03esJALKpqkkSMHzmrUo3cxlIO1rfj34O/uBBpgEGomSOe/PS51tZ2EON7rEODBPw== X-Received: by 10.28.213.133 with SMTP id m127mr20012928wmg.90.1479774619836; Mon, 21 Nov 2016 16:30:19 -0800 (PST) Original-Received: from doriath (203.98.15.37.dynamic.jazztel.es. [37.15.98.203]) by smtp.gmail.com with ESMTPSA id js10sm27723653wjb.19.2016.11.21.16.30.17 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 21 Nov 2016 16:30:17 -0800 (PST) Mail-Followup-To: help-gnu-emacs@gnu.org Content-Disposition: inline In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::22e 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:111759 Archived-At: 2016-11-21, 09:12 (-0500); Stefan Monnier escriu: > > (set-keymap-parent parent-map global-map) > > Since `key-binding` checks global-map after the buffer-local map anyway, > putting global-map as the parent of your buffer-local map has basically > no effect. > > > (define-key child-map [?a] nil) > > This does not *remove* a binding from child-map. Instead it marks the > key as unbound, thus hiding any potential corresponding binding in > parent keymaps. > > Emacs does not provide a "remove binding" operation on keymaps. > > > (key-binding [?a]) > > => self-insert-command > > Here the binding was not found in the buffer-local map but in the global > map instead. Understood. Thanks for clarifying this.