Next: , Previous: , Up: Menus   [Contents][Index]


27.6 Pop-Up Menus

Function: popup-menu menu-description &optional event

This function pops up a menu specified by menu-description, which is a menu description (see Menu Format). The menu is displayed at the current mouse position.

Function: popup-menu-up-p

This function returns t if a pop-up menu is up, nil otherwise.

Variable: popup-menu-titles

If true (the default), pop-up menus will have title bars at the top.

Some machinery is provided that attempts to provide a higher-level mechanism onto pop-up menus. This only works if you do not redefine the binding for button3.

Command: popup-mode-menu

This function pops up a menu of global and mode-specific commands. The menu is computed by combining global-popup-menu and mode-popup-menu. This is the default binding for button3. You should generally not change this binding.

Variable: global-popup-menu

This holds the global popup menu. This is present in all modes. (This is nil by default.)

Variable: mode-popup-menu

The mode-specific popup menu. Automatically buffer local. This is appended to the default items in global-popup-menu.

Constant: default-popup-menu

This holds the default value of mode-popup-menu.

Variable: activate-popup-menu-hook

Function or functions run before a mode-specific popup menu is made visible. These functions are called with no arguments, and should interrogate and modify the value of global-popup-menu or mode-popup-menu as desired. Note: this hook is only run if you use popup-mode-menu for activating the global and mode-specific commands; if you have your own binding for button3, this hook won’t be run.

The following convenience functions are provided for displaying pop-up menus.

Command: popup-buffer-menu event

This function pops up a copy of the ‘Buffers’ menu (from the menubar) where the mouse is clicked. It should be bound to a mouse button event.

Command: popup-menubar-menu event

This function pops up a copy of menu that also appears in the menubar. It should be bound to a mouse button event.


Next: , Previous: , Up: Menus   [Contents][Index]