>>>> "Hrvoje" == Hrvoje Niksic
<hniksic(a)srce.hr> writes:
Hrvoje> What am I to do with these functions? Add them to
Hrvoje> imenu.el? Are they in FSF version?
You could. Since I don't use the menubar, I bind this function (or my
latest version of it) to Shift-Button-3 so that I can pop up the
Imenu, and leave Button-3 to the major mode menu. FSF doesn't have
the same problem because what they bind to Ctrl-Button-3 is a menu
which contains the major-mode menu and the Imenu as submenus.
As a side note, I also wish there was a way to pop up the menu, and
interact with it from the keyboard alone. I used to be able to do
this with funcmenu, but I now see that while I can pop the menu up
from the keyboard, I can't move the cursor around or select menu items
without going to the mouse. I suspect that XEmacs doesn't give me the
primitives necessary to do this, but that I might be able to code
something up with help from my window manager.
Here's my lastest version of the popup function:
-------------------- snip snip --------------------
(defun baw:imenu-popup-menu (event)
"Wrapper for mouse button bindings for imenu."
(interactive "e")
(let* ((answer (imenu--mouse-menu (imenu--make-index-alist) event))
(name (car answer))
(position (cdr answer)))
(if (< 0 position)
(imenu-default-goto-function name position)
(imenu--cleanup)
(setq imenu--index-alist nil))))
(global-set-key [(shift button3)] 'baw:imenu-popup-menu)
-------------------- snip snip --------------------
-Barry