all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lennart Borgman <lennart.borgman.073@student.lu.se>
Cc: emacs-devel@gnu.org
Subject: Re: [Fwd: Re: How to know which function a menu item calls?]
Date: Tue, 08 Nov 2005 09:12:39 +0100	[thread overview]
Message-ID: <43705DF7.3040807@student.lu.se> (raw)
In-Reply-To: <E1EZMvy-0005Qh-I9@fencepost.gnu.org>

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.

      reply	other threads:[~2005-11-08  8:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-06 19:35 [Fwd: Re: How to know which function a menu item calls?] Lennart Borgman
2005-11-08  6:26 ` Richard M. Stallman
2005-11-08  8:12   ` Lennart Borgman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43705DF7.3040807@student.lu.se \
    --to=lennart.borgman.073@student.lu.se \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.