From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: Qs on key-description, substitute-command-keys Date: Fri, 14 Oct 2005 15:53:00 -0700 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1129330737 19722 80.91.229.2 (14 Oct 2005 22:58:57 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 14 Oct 2005 22:58:57 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 15 00:58:56 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EQYVE-0005T6-Mp for ged-emacs-devel@m.gmane.org; Sat, 15 Oct 2005 00:58:17 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EQYVE-0002uG-7c for ged-emacs-devel@m.gmane.org; Fri, 14 Oct 2005 18:58:16 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EQYQO-0007of-OG for emacs-devel@gnu.org; Fri, 14 Oct 2005 18:53:16 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EQYQM-0007lD-R4 for emacs-devel@gnu.org; Fri, 14 Oct 2005 18:53:16 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EQYQM-0007kr-Ka for emacs-devel@gnu.org; Fri, 14 Oct 2005 18:53:14 -0400 Original-Received: from [141.146.126.230] (helo=agminet03.oracle.com) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1EQYQM-0005WR-OE for emacs-devel@gnu.org; Fri, 14 Oct 2005 18:53:14 -0400 Original-Received: from rgmsgw301.us.oracle.com (rgmsgw301.us.oracle.com [138.1.186.50]) by agminet03.oracle.com (Switch-3.1.7/Switch-3.1.7) with ESMTP id j9EMrBBZ016380 for ; Fri, 14 Oct 2005 17:53:11 -0500 Original-Received: from rgmsgw301.us.oracle.com (localhost [127.0.0.1]) by rgmsgw301.us.oracle.com (Switch-3.1.7/Switch-3.1.7) with ESMTP id j9EMrAe8006600 for ; Fri, 14 Oct 2005 16:53:10 -0600 Original-Received: from dradamslap (dhcp-amer-csvpn-gw2-141-144-74-16.vpn.oracle.com [141.144.74.16]) by rgmsgw301.us.oracle.com (Switch-3.1.7/Switch-3.1.7) with SMTP id j9EMr9nm006566 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Fri, 14 Oct 2005 16:53:10 -0600 Original-To: "Emacs-Devel" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-reply-to: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 Importance: Normal X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE 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:44051 Archived-At: I never got any feedback on this question: Also, is there a good way to control which of several key bindings for a command is output by `substitute-command-keys'? The only way I've found is to make sure that the one I want is the last of the key sequences for that command defined in the map - and that's not always feasible. I found nothing in the manual about which binding is displayed or how to control that. Does anyone know how to control which of several bindings for a command is displayed by `substitute-command-keys'? The workaround I mentioned works only when you can control all of the `define-key's. It does not work, for instance, if you do a `substitute-key-definition' or, presumably, a (define-key [remap...]...). For example: (substitute-key-definition 'scroll-left 'my-cmd 'minibuffer-local-completion-map) `scroll-left' is globally bound to `C-next' and `C-x <'. I would like the former binding to show via `substitute-command-keys', but the latter shows. I have several bindings like this, all closely related, and all simple bindings using prefix `C-'. But the resulting doc string shows bindings that are all seemingly unrelated (all over the map, so to speak ;-)). If there is no way to control this, could Emacs itself be configured to prefer a binding that does not use a prefix key whenever there is one? That is, could it be designed so that `substitute-command-keys' prefers to show `C-next' instead of `C-x <' for `scroll-left'? (Somehow, I anticipate people saying that some terminals don't have [next] keys, so `C-x <' is better...) Thx.