unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#7691: 24.0.50; x-popup-menu with keymap - :help keyword
@ 2010-12-20 21:12 Drew Adams
  2010-12-20 21:30 ` Drew Adams
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Drew Adams @ 2010-12-20 21:12 UTC (permalink / raw)
  To: 7691

`x-popup-menu's doc says that it accepts a keymap or a list of keymaps
as its second arg, which it does.
 
The advantage of using a keymap instead of the alternative "multiple
panes" format as the second arg is that keymap keywords (e.g. :enable)
are honored.
 
And keywords seem to work OK - except for :help.  Example:
 
(defun eee (event)
  (interactive "e")
  (x-popup-menu
   event '(keymap "The Menu"
    (foo menu-item "Foo" 'forward-char
         :enable pop-up-frames
         :help "WHY DOESN'T THIS SHOW UP?"))))
 
(global-set-key [(control mouse-3)] nil)
(global-set-key [(control down-mouse-3)] 'eee)
 
Then `C-mouse-3'.  Turn `pop-up-frames' on and off to see that :enable
works.
 
But put the pointer over item `Foo' in the menu and you will not see the
:help displayed.  This is true also if `tooltip-mode' is off (the help
does not show in the minibuffer/echo area).
 
There is this note in `(elisp) Pop-Up Menus':
 
 "Don't use `x-popup-menu' to display a menu if you
  could do the job with a prefix key defined with a menu
  keymap.  If you use a menu keymap to implement a menu,
  `C-h c' and `C-h a' can see the individual items in that
  menu and provide help for them.  If instead you implement
  the menu by defining a command that calls `x-popup-menu',
  the help facilities cannot know what happens inside that
  command, so they cannot give any help for the menu's items."
 
I cannot tell if that note is supposed to speak to the limitation/bug
I'm reporting.  First, "use a menu keymap" is not the same thing as
using a prefix key defined with a menu keymap.  In the example I show
above, I do "use a keymap".
 
Second, what I'm looking for here is a tooltip displaying the :help
string - not `C-h c' etc.
 
Third, if that note is indeed meant to apply also to the limitation/bug
I'm reporting, then I don't understand the reason given for that.  If
:enable, :visible, etc. can be handled, why couldn't :help also be
handled?
 

In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
 of 2010-12-20 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.4) --no-opt --cflags
-Ic:/imagesupport/include'
 






^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-04-28  9:50 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-20 21:12 bug#7691: 24.0.50; x-popup-menu with keymap - :help keyword Drew Adams
2010-12-20 21:30 ` Drew Adams
2010-12-20 22:22 ` Stefan Monnier
2010-12-20 22:41   ` Drew Adams
2010-12-20 23:05   ` Jason Rumney
2010-12-20 23:17     ` Drew Adams
2010-12-21  2:11       ` Lennart Borgman
2010-12-21  3:32         ` Jason Rumney
2010-12-21 11:06 ` grischka
2016-04-28  9:50 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).