* [Fwd: Re: How to know which function a menu item calls?]
@ 2005-11-06 19:35 Lennart Borgman
2005-11-08 6:26 ` Richard M. Stallman
0 siblings, 1 reply; 3+ messages in thread
From: Lennart Borgman @ 2005-11-06 19:35 UTC (permalink / raw)
Is this a good suggestion?
-------- Original Message --------
Subject: Re: How to know which function a menu item calls?
Date: Sun, 06 Nov 2005 15:47:01 +0100
From: Harald Hanche-Olsen <hanche@math.ntnu.no>
Organization: Norwegian university of science and technology
To: help-gnu-emacs@gnu.org
Newsgroups: gnu.emacs.help
References: <mailman.14166.1131282184.20277.help-gnu-emacs@gnu.org>
<436e02fa$0$41146$14726298@news.sunsite.dk>
+ Ralf Angeli <dev.null@iwi.uni-sb.de>:
| * Weihua JIANG (2005-11-06) writes:
|
|> However, I don't know how to know which function calls when I clicked a
|> menu item?
|> Can any one tell me how to know it?
|
| C-h k
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.
It doesn't matter if the prompt is long, since at most, a few key
strokes need to be echoed in the minibuffer next to it.
If some emacs maintainer reads this, please consider it a feature
request, even if it is in the wrong forum. ;-)
--
* Harald Hanche-Olsen <URL:http://www.math.ntnu.no/~hanche/>
- Debating gives most of us much more psychological satisfaction
than thinking does: but it deprives us of whatever chance there is
of getting closer to the truth. -- C.P. Snow
_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
--
Lennart
från Lund
lennart.borgman.073@student.lu.se
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Fwd: Re: How to know which function a menu item calls?]
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
0 siblings, 1 reply; 3+ messages in thread
From: Richard M. Stallman @ 2005-11-08 6:26 UTC (permalink / raw)
Cc: emacs-devel
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Fwd: Re: How to know which function a menu item calls?]
2005-11-08 6:26 ` Richard M. Stallman
@ 2005-11-08 8:12 ` Lennart Borgman
0 siblings, 0 replies; 3+ messages in thread
From: Lennart Borgman @ 2005-11-08 8:12 UTC (permalink / raw)
Cc: emacs-devel
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-11-08 8:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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.