From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: RE: shouldn't substitute-command-keys remove duplicates? Date: Thu, 20 Mar 2008 21:59:49 -0700 Message-ID: <002201c88b10$64aa5040$0600a8c0@us.oracle.com> References: <002101c88b0e$a8e17510$0600a8c0@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1206075613 21639 80.91.229.12 (21 Mar 2008 05:00:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Mar 2008 05:00:13 +0000 (UTC) To: Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 21 06:00:43 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JcZMw-0002eZ-KR for ged-emacs-devel@m.gmane.org; Fri, 21 Mar 2008 06:00:43 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JcZMM-000561-D3 for ged-emacs-devel@m.gmane.org; Fri, 21 Mar 2008 01:00:06 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JcZMG-00055h-9w for emacs-devel@gnu.org; Fri, 21 Mar 2008 01:00:00 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JcZMD-00053z-8d for emacs-devel@gnu.org; Fri, 21 Mar 2008 00:59:59 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JcZMD-00053j-3r for emacs-devel@gnu.org; Fri, 21 Mar 2008 00:59:57 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JcZMC-0002nT-Ls for emacs-devel@gnu.org; Fri, 21 Mar 2008 00:59:56 -0400 Original-Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1JcZMC-0005U2-At for emacs-pretest-bug@gnu.org; Fri, 21 Mar 2008 00:59:56 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1JcZM9-0002mv-BO for emacs-pretest-bug@gnu.org; Fri, 21 Mar 2008 00:59:56 -0400 Original-Received: from rgminet01.oracle.com ([148.87.113.118]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JcZM9-0002md-17 for emacs-pretest-bug@gnu.org; Fri, 21 Mar 2008 00:59:53 -0400 Original-Received: from agmgw1.us.oracle.com (agmgw1.us.oracle.com [152.68.180.212]) by rgminet01.oracle.com (Switch-3.2.4/Switch-3.1.6) with ESMTP id m2L4xotK020242 for ; Thu, 20 Mar 2008 22:59:50 -0600 Original-Received: from acsmt351.oracle.com (acsmt351.oracle.com [141.146.40.151]) by agmgw1.us.oracle.com (Switch-3.2.0/Switch-3.2.0) with ESMTP id m2KFSwcF020858 for ; Thu, 20 Mar 2008 22:59:50 -0600 Original-Received: from inet-141-146-46-1.oracle.com by acsmt351.oracle.com with ESMTP id 3619526711206075589; Thu, 20 Mar 2008 21:59:49 -0700 Original-Received: from dradamslap1 (/141.144.80.154) by bhmail.oracle.com (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 20 Mar 2008 21:59:49 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <002101c88b0e$a8e17510$0600a8c0@us.oracle.com> Thread-Index: AciLDqhguczuKSdlTqyozf2RISJGfgAAMb/g X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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:93096 gmane.emacs.pretest.bugs:21631 Archived-At: As an example, filecache.el does this (via ;;;###autoload): (define-key minibuffer-local-completion-map [C-tab] 'file-cache-minibuffer-complete) (define-key minibuffer-local-map [C-tab] 'file-cache-minibuffer-complete) (define-key minibuffer-local-must-match-map [C-tab] 'file-cache-minibuffer-complete) This is in spite of the fact that minibuffer-local-map is the parent of minibuffer-local-completion-map and minibuffer-local-completion-map is the parent of minibuffer-local-must-match-map. The first and third bindings here are therefore superfluous, but they serve to show that (substitute-command-keys "\\{minibuffer-local-must-match-map\\}") doesn't remove the duplicate entries: minibuffer-local-must-match-map ------------------------------- Local keymap for minibuffer input with completion, for exact match. key binding --- ------- C-g abort-recursive-edit TAB minibuffer-complete C-j minibuffer-complete-and-exit RET minibuffer-complete-and-exit ESC Prefix Command SPC minibuffer-complete-word ? minibuffer-completion-help file-cache-minibuffer-complete file-cache-minibuffer-complete file-cache-minibuffer-complete next-history-element ... > From: Drew Adams Sent: Thursday, March 20, 2008 9:47 PM > Shouldn't substitute-command-keys remove duplicates? > > If you explicitly bind a key to the same command in both a > keymap km > and its parent pkm, and then you call this, the binding is > written > twice: > > (define-key km "a" 'foo) > (define-key pkm "a" 'foo) > > (substitute-command-keys "\\{km\\}") > > key binding > --- ------- > > ... > a foo > a foo > ... > > In GNU Emacs 22.1.90.1 (i386-mingw-nt5.1.2600) > of 2008-01-30 on PRETEST > Windowing system distributor `Microsoft Corp.', version > 5.1.2600 > configured using `configure --with-gcc (3.4) --cflags > -Ic:/gnuwin32/include'