From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: [Fwd: Re: How to know which function a menu item calls?] Date: Tue, 08 Nov 2005 09:12:39 +0100 Message-ID: <43705DF7.3040807@student.lu.se> References: <436E5AED.4030208@student.lu.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1131438135 15943 80.91.229.2 (8 Nov 2005 08:22:15 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 8 Nov 2005 08:22:15 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 08 09:22:07 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EZOiG-0002ly-CC for ged-emacs-devel@m.gmane.org; Tue, 08 Nov 2005 09:20:16 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EZOiF-00029e-JG for ged-emacs-devel@m.gmane.org; Tue, 08 Nov 2005 03:20:15 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EZOeF-0000BY-KQ for emacs-devel@gnu.org; Tue, 08 Nov 2005 03:16:08 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EZOdt-0007tB-66 for emacs-devel@gnu.org; Tue, 08 Nov 2005 03:15:56 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EZOdi-0007Ea-FC for emacs-devel@gnu.org; Tue, 08 Nov 2005 03:15:34 -0500 Original-Received: from [81.228.8.83] (helo=pne-smtpout1-sn2.hy.skanova.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EZOdb-0000rr-US; Tue, 08 Nov 2005 03:15:28 -0500 Original-Received: from [192.168.123.121] (83.249.218.244) by pne-smtpout1-sn2.hy.skanova.net (7.2.060.1) id 436A3A5300111CFC; Tue, 8 Nov 2005 09:12:40 +0100 User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en Original-To: rms@gnu.org In-Reply-To: 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:45583 Archived-At: Richard M. Stallman wrote: > Which of course has an unhelpful prompt (Describe key:). If the > prompt were to be changed to say something like "Describe event (key, > mouse or menu selection):", it would be more obvious what it can do. > >How about this? > >*** help.el 07 Aug 2005 13:30:23 -0400 1.284 >--- help.el 08 Nov 2005 00:26:58 -0500 >*************** >*** 606,618 **** > > (defun describe-key (key &optional untranslated up-event) > "Display documentation of the function invoked by KEY. >! KEY should be a key sequence--when calling from a program, >! pass a string or a vector. >! If non-nil UNTRANSLATED is a vector of the untranslated events. >! It can also be a number in which case the untranslated events from >! the last key hit are used." > ;; UP-EVENT is the up-event that was discarded by reading KEY, or nil. >! (interactive "kDescribe key: \np\nU") > (if (numberp untranslated) > (setq untranslated (this-single-command-raw-keys))) > (save-excursion >--- 606,620 ---- > > (defun describe-key (key &optional untranslated up-event) > "Display documentation of the function invoked by KEY. >! KEY can be any kind of a key sequence; it can include keyboard events, >! mouse events, and/or menu events. When calling from a program, >! pass KEY as a string or a vector. >! >! If non-nil, UNTRANSLATED is a vector of the correspondinguntranslated events. >! It can also be a number, in which case the untranslated events from >! the last key sequence entered are used." > ;; UP-EVENT is the up-event that was discarded by reading KEY, or nil. >! (interactive "kDescribe key (or click or menu item): \np\nU") > (if (numberp untranslated) > (setq untranslated (this-single-command-raw-keys))) > (save-excursion > > I think it is good.