> I want to bind the mouse-popup-menubar to a keyboard enent, > *not* to C-mouse-3 which is the default binding. When I try > > (global-set-key (kbd "M-<f1>") 'mouse-popup-menubar) > > for example, and then I press M-<F1> I get the message > > mouse-popup-menubar must be bound to an event with parameters > mouse-popup-menubar is defined with (interactive "@e \nP"). The `e' is an event from which it can determine the window, buffer, and screen position to associate the popup-menu with. In fact it's possible that different menus will display depending on what buffer you click in.
It seems your best chance of clean operation is to write a function that makes up a contrived event list appropriate to your cursor position and uses it to call mouse-popup-menubar. It likely depends on your windowing software if keyboard completion of the popup is possible. On W32 systems it is. Between this function and the Emacs Lisp Reference manual you can probably find a way to create the appropriate event. (defun event-test (event) (interactive "@e") (message "Event = %s" event) ) (global-set-key [S-mouse-3] 'event-test) >From what returned above I was able to get the menu to pop up. See below. Looks promising. The word `keyboard' was made up. The above said S-mouse-3 like you'd expect. M-: (mouse-popup-menubar `(keyboard (,(selected-window) 248 (126 . 104) 70080603 nil 248 (15 . 6) nil (6 . 8) (8 . 16))) ()) <ret> P.S. The final () in the above call is the `P' prefix arg. Your keyboard function should grab this and pass it along to be complete. Good luck. If you invent something useful please post. _______________________________________________ Help-gnu-emacs mailing list Help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs