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: Wed, 23 Nov 2016 11:16:39 +0100 Message-ID: <20161123101639.7v7y2xslyvkkg6uo@doriath.local> References: <20161121002838.rkoniry5n6aemrzt@doriath.local> <87twb0sqnr.fsf@gmail.com> <871sy3jpu4.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1479896244 3812 195.159.176.226 (23 Nov 2016 10:17:24 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 23 Nov 2016 10:17:24 +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 Wed Nov 23 11:17:17 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 1c9Uc8-0007Mg-PN for geh-help-gnu-emacs@m.gmane.org; Wed, 23 Nov 2016 11:17:16 +0100 Original-Received: from localhost ([::1]:60715 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c9Uc9-0001jr-62 for geh-help-gnu-emacs@m.gmane.org; Wed, 23 Nov 2016 05:17:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48472) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c9Ube-0001jZ-EX for help-gnu-emacs@gnu.org; Wed, 23 Nov 2016 05:16:47 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c9Ubb-0008Ca-Aq for help-gnu-emacs@gnu.org; Wed, 23 Nov 2016 05:16:46 -0500 Original-Received: from mail-wm0-x22a.google.com ([2a00:1450:400c:c09::22a]:36157) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c9Ubb-0008By-3y for help-gnu-emacs@gnu.org; Wed, 23 Nov 2016 05:16:43 -0500 Original-Received: by mail-wm0-x22a.google.com with SMTP id g23so70999204wme.1 for ; Wed, 23 Nov 2016 02:16:42 -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=eZMUOhwZclq/A2q5yO6Tz4oWLyDN5i81mSjh/PK6gwo=; b=lz8+j/+tLjyVC/36Yx1zLrs2IxnGOuJQzUN7WoS6JSEK00SHT16OiICB873fG3OOKB 5yIDQWwclhTRcHyeJUCqyjrZ1Ne2INFjxKTqPhB6g3D+SI9P0I9WnVURYtcq3euA2C4Z cwqm68d6QbmgV7R5UYEmtx1TDbvbSmo2tmu5S1DufvO00oH8Bjx1AWDr4e0DjsfLUnvk AMtgiSg3RBP/mn+UwrdLtMAG4bmFFLJ/S3qyLGVAiJj3/loE9+/SOlaedSbC9I9XN2SH xr1vv8wosGaaTGKst0hhyb007t1pl9Xsb9J5vm0Twr3lYT+pkeJUNfAvLVVCg7RVoXqj d6Pw== 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=eZMUOhwZclq/A2q5yO6Tz4oWLyDN5i81mSjh/PK6gwo=; b=Gg8kjSKanatdjr6AL9BxrvPV9U/crMEQZVaXIB52pVWyFLlANJZRG2XFbw9mXJqp66 A7ejyFDJsm70z4j8XoWfeypSUO1d0XHSmGY58+Tqy+N8cRCfkkBIrQyzq3SCFOe4NNz0 usYYCdPL08xyTSe68d5uVjAgxtOSp5qgQJ9gyGI+858oTlKKEgT8z256bAwKrNxhHed6 anGwucZrkG3qpjZyPfnsxSI4d+XS58SCYIHIF4yCP1gdN9DpXaB/I7p0aV1yn+8kvsVf kZPDKFEUufjOJjt+1CrReyYlJYUsAdszEayEvmNqKmFcxkfKgrE9A7zB/nlxNPIvAC3H t9bQ== X-Gm-Message-State: AKaTC02bYty6IkMrT5UROKfT6o+5NvDEPplk5o7YyfB4WCkquSHRUmgGHTzhbKw3hKACmQ== X-Received: by 10.194.66.101 with SMTP id e5mr2411109wjt.172.1479896201413; Wed, 23 Nov 2016 02:16:41 -0800 (PST) Original-Received: from doriath (203.98.15.37.dynamic.jazztel.es. [37.15.98.203]) by smtp.gmail.com with ESMTPSA id e5sm1930576wma.12.2016.11.23.02.16.40 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 23 Nov 2016 02:16:40 -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::22a 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:111773 Archived-At: 2016-11-22, 20:12 (-0500); Stefan Monnier escriu: > Do you have a more concrete description of when you want to do that? Suppose you do (let ((map minibuffer-local-map)) (define-key map [(control ?p)] 'previous-history-element) (define-key map [(control ?n)] 'next-history-element)) Now, ido defines its own map that inherits from minibuffer-local-map. In this map, C-p is bound to ido-toggle-prefix, so one thing you may want to do is move ido-toggle-prefix to another key, so that it stops shadowing your C-p binding. Therefore you would do (define-key ido-common-completion-map [(control ?o)] 'ido-toggle-prefix) (unbind-key ido-common-completion-map [(control ?p)]) where unbind-key is a function that removes any reference to a key from the given map. Without unbind-key, you have to define the same binding in both maps, which can be inconvenient if later you decide to change it. It's not super-annoying but in my opinion it would be nice to have a function like unbind-key. Cheers.