Mercurial > emacs
comparison lisp/emacs-lisp/easymenu.el @ 62557:efeaec0ce9c4
(easy-menu-add): Correct docstring since
easy-menu-add is not a nop on Emacs; and clarify when to call it.
author | David Kastrup <dak@gnu.org> |
---|---|
date | Fri, 20 May 2005 15:30:59 +0000 |
parents | 2acfd9cf6713 |
children | 925395d813a9 5b029ff3b08d |
comparison
equal
deleted
inserted
replaced
62556:ff0c29a49703 | 62557:efeaec0ce9c4 |
---|---|
469 | 469 |
470 \(fn MENU)") | 470 \(fn MENU)") |
471 | 471 |
472 (defun easy-menu-add (menu &optional map) | 472 (defun easy-menu-add (menu &optional map) |
473 "Add the menu to the menubar. | 473 "Add the menu to the menubar. |
474 This is a nop on Emacs since menus are automatically activated when the | 474 On Emacs, menus are already automatically activated when the |
475 corresponding keymap is activated. On XEmacs this is needed to actually | 475 corresponding keymap is activated. On XEmacs this is needed to |
476 add the menu to the current menubar. | 476 actually add the menu to the current menubar. |
477 Maybe precalculate equivalent key bindings. | 477 |
478 Do it only if `easy-menu-precalculate-equivalent-keybindings' is on." | 478 This also precalculates equivalent key bindings when |
479 `easy-menu-precalculate-equivalent-keybindings' is on. | |
480 | |
481 You should call this once the menu and keybindings are set up | |
482 completely and menu filter functions can be expected to work." | |
479 (when easy-menu-precalculate-equivalent-keybindings | 483 (when easy-menu-precalculate-equivalent-keybindings |
480 (if (and (symbolp menu) (not (keymapp menu)) (boundp menu)) | 484 (if (and (symbolp menu) (not (keymapp menu)) (boundp menu)) |
481 (setq menu (symbol-value menu))) | 485 (setq menu (symbol-value menu))) |
482 (and (keymapp menu) (fboundp 'x-popup-menu) | 486 (and (keymapp menu) (fboundp 'x-popup-menu) |
483 (x-popup-menu nil menu)) | 487 (x-popup-menu nil menu)) |