emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Fwd: Re: How to know which function a menu item calls?]


From: Richard M. Stallman
Subject: Re: [Fwd: Re: How to know which function a menu item calls?]
Date: Tue, 08 Nov 2005 01:26:18 -0500

    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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]