From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Richard M. Stallman" Newsgroups: gmane.emacs.devel Subject: Re: [Fwd: Re: How to know which function a menu item calls?] Date: Tue, 08 Nov 2005 01:26:18 -0500 Message-ID: References: <436E5AED.4030208@student.lu.se> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1131431299 346 80.91.229.2 (8 Nov 2005 06:28:19 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 8 Nov 2005 06:28:19 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 08 07:28:16 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EZMxa-0005zX-O0 for ged-emacs-devel@m.gmane.org; Tue, 08 Nov 2005 07:27:59 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EZMxa-0007ir-5a for ged-emacs-devel@m.gmane.org; Tue, 08 Nov 2005 01:27:58 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EZMwI-00075H-BM for emacs-devel@gnu.org; Tue, 08 Nov 2005 01:26:39 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EZMw8-00073p-Mn for emacs-devel@gnu.org; Tue, 08 Nov 2005 01:26:29 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EZMvz-00073D-8d for emacs-devel@gnu.org; Tue, 08 Nov 2005 01:26:21 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EZMvz-0003zD-Bw for emacs-devel@gnu.org; Tue, 08 Nov 2005 01:26:19 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1EZMvy-0005Qh-I9; Tue, 08 Nov 2005 01:26:18 -0500 Original-To: Lennart Borgman In-reply-to: <436E5AED.4030208@student.lu.se> (message from Lennart Borgman on Sun, 06 Nov 2005 20:35:09 +0100) 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:45579 Archived-At: 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