From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.devel Subject: Re: A simple implementation of context-sensitive keys Date: Thu, 11 Sep 2008 16:22:47 +0200 Message-ID: <87hc8miwy0.fsf@thinkpad.tsdh.de> References: <87y72079mg.fsf@thinkpad.tsdh.de> <87d4jbg62j.fsf@thinkpad.tsdh.de> <48C92024.6080804@gmail.com> <48C921CB.3010700@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1221143435 1066 80.91.229.12 (11 Sep 2008 14:30:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 11 Sep 2008 14:30:35 +0000 (UTC) Cc: Stefan Monnier , emacs-devel@gnu.org To: "Lennart Borgman \(gmail\)" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 11 16:31:28 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 1KdnCG-0007nz-BT for ged-emacs-devel@m.gmane.org; Thu, 11 Sep 2008 16:31:00 +0200 Original-Received: from localhost ([127.0.0.1]:50798 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KdnBG-0007BM-0c for ged-emacs-devel@m.gmane.org; Thu, 11 Sep 2008 10:29:58 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kdn6O-0004R3-Td for emacs-devel@gnu.org; Thu, 11 Sep 2008 10:24:57 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kdn6L-0004Od-GE for emacs-devel@gnu.org; Thu, 11 Sep 2008 10:24:55 -0400 Original-Received: from [199.232.76.173] (port=34272 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kdn6K-0004OF-QR for emacs-devel@gnu.org; Thu, 11 Sep 2008 10:24:52 -0400 Original-Received: from deliver.uni-koblenz.de ([141.26.64.15]:15957) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kdn6K-0003bX-HZ for emacs-devel@gnu.org; Thu, 11 Sep 2008 10:24:52 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by deliver.uni-koblenz.de (Postfix) with ESMTP id CE56378975AA; Thu, 11 Sep 2008 16:24:51 +0200 (CEST) Original-Received: from deliver.uni-koblenz.de ([127.0.0.1]) by localhost (deliver.uni-koblenz.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 14685-03; Thu, 11 Sep 2008 16:24:50 +0200 (CEST) X-CHKRCPT: Envelopesender vrfy tassilo@member.fsf.org Original-Received: from thinkpad.tsdh.de (dhcp188.uni-koblenz.de [141.26.71.188]) by deliver.uni-koblenz.de (Postfix) with ESMTP id AFCF17897598; Thu, 11 Sep 2008 16:24:50 +0200 (CEST) Mail-Followup-To: "Lennart Borgman \(gmail\)" , Stefan Monnier , emacs-devel@gnu.org In-Reply-To: <48C921CB.3010700@gmail.com> (Lennart Borgman's message of "Thu, 11 Sep 2008 15:48:59 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-Virus-Scanned: amavisd-new at uni-koblenz.de 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:103811 Archived-At: "Lennart Borgman (gmail)" writes: Hi! >> Currently the problem of which minor mode gets the key press is >> resolved just by the corresponding minor mode's position in >> minor-mode-map-alist. The first one gets it. > > Eh, and maybe I should have added that it is easier to understand what >I am talking about after looking here: > > (info "(elisp) Searching Keymaps") So I guess a first step into the right direction would be to enhance `describe-key' that it doesn't stop if KEY is found, but to list the shadowed commands, too. Something like ,---- | TAB (translated from ) runs the command message-tab, which is an | interactive compiled Lisp function in | `/usr/share/emacs/23.0.60/lisp/gnus/message.el'. | | It is bound to TAB in `message-mode-map'. <== This is new | | (message-tab) | | Complete names according to `message-completion-alist'. | Execute function specified by `message-tab-body-function' when not in | those headers. | | It shadows the following commands: <== This is new | | `foo' (bound to TAB in `foo-mode-map') | `bar' (bound to TAB in `bar-mode-map') | ... `---- Bye, Tassilo -- A child of five could understand this! Fetch me a child of five!