bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#7695: 24.0.50; (elisp) Mouse Menus: incorrect and some missing info


From: Drew Adams
Subject: bug#7695: 24.0.50; (elisp) Mouse Menus: incorrect and some missing info
Date: Mon, 20 Dec 2010 17:15:50 -0800

emacs -Q
 
This is about `(elisp) Mouse Menus' and, in particular, its explanation
about the use of `@' at the beginning of a menu item string.  The doc is
unclear (to me), seems to be missing some info, and is incorrect in at
least one respect.
 
Incorrect: "See the file `lisp/mouse.el' for an example of this."  There
is no use of any menu item with a name that starts with `@' in mouse.el.
 
Unclear and perhaps missing some info:
 
Eval this.

(defun bar (event)
 (interactive "e")
 (x-popup-menu
  event
  `(keymap "Bar" (bar "@" ,@(mouse-menu-major-mode-map)))))

(global-set-key [(control mouse-3)] nil)
(global-set-key [(control down-mouse-3)] 'bar)
 
Then `C-mouse-3' in an emacs-lisp-mode buffer.  There is only one major
mode menu, and what you see is a popup menu that has the same items as
the major-mode menu.  OK.
 
Now use `C-mouse-3' in Dired.  In Dired there are several major-mode
menus.  Instead of getting the items from the major-mode menus as items
in the popup menu, you get each of the major-mode menus as a submenu.
 
I don't see this behavior described anywhere.  The explanation about `@'
in this node sort of fits the case where there is a single major-mode
menu.  (But even then it is not clear.)  But it does not at all seem to
fit the case where there are multiple major-mode menus.
 
Unless that is part of what this final paragraph is trying to say:
 
"Multiple keymaps that define the same menu prefix key produce
separate panes or separate submenus."
 
I don't think so, but then again, I'm not sure what that paragraph _is_
trying to say.  Certainly the test case I gave does not involve any
prefix key (but it is about a mouse menu that uses `@').
 
Wrt `@' as a prefix for menu or menu-item name: We should document how
you get a menu name to show a prefix of `@' - IOW, how to escape the
special interpretation of `@'.  (I tried escaping with one and multiple
slashes, but that doesn't seem to work.)  And if there is _no_ way to
escape the special behavior (poor Emacs), then that should be stated
explicitly.
 
Also, I wonder if the submenus case is not more common now than the
"panes" case.  (Also, menu "panes" are referred to in several places in
the manual, without, AFAICT, any description of what is actually meant
by a menu "pane".)  The behavior for the submenus case is less well
described - not too clear, in fact.  It seems thrown in as an
afterthought.  That might have been OK at one time, if the submenus case
was uncommon.  But isn't it common now?
 
Also, most of what this Info node describes does not necessarily have
anything to do with prefix keys.  It describes mouse menu behavior and
its relation to menu-item names (and `in particular @' as a name
prefix).  The discussion of using a prefix key should be clearly
separated out, probably into a separate Info node.
 
This node seems to mix up lots of different stuff, some of which has
some relation in some contexts to some of the other stuff.  But those
relations are not all _necessary_ relations, and anyway they are not
elucidated.  At least that's my impression, but I admit that my
understanding of what the node is trying to say is foggy.
 
 
 

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'
 






reply via email to

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