changeset 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 ff0c29a49703
children 6d3be100a133
files lisp/ChangeLog lisp/emacs-lisp/easymenu.el
diffstat 2 files changed, 14 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Fri May 20 14:30:34 2005 +0000
+++ b/lisp/ChangeLog	Fri May 20 15:30:59 2005 +0000
@@ -1,3 +1,8 @@
+2005-05-20  David Kastrup  <dak@gnu.org>
+
+	* emacs-lisp/easymenu.el (easy-menu-add): Correct docstring since
+	easy-menu-add is not a nop on Emacs; and clarify when to call it.
+
 2005-05-20  Carsten Dominik  <dominik@science.uva.nl>
 
 	* textmodes/org.el (org-agenda-toggle-time-grid): New command.
--- a/lisp/emacs-lisp/easymenu.el	Fri May 20 14:30:34 2005 +0000
+++ b/lisp/emacs-lisp/easymenu.el	Fri May 20 15:30:59 2005 +0000
@@ -471,11 +471,15 @@
 
 (defun easy-menu-add (menu &optional map)
   "Add the menu to the menubar.
-This is a nop on Emacs since menus are automatically activated when the
-corresponding keymap is activated.  On XEmacs this is needed to actually
-add the menu to the current menubar.
-Maybe precalculate equivalent key bindings.
-Do it only if `easy-menu-precalculate-equivalent-keybindings' is on."
+On Emacs, menus are already automatically activated when the
+corresponding keymap is activated.  On XEmacs this is needed to
+actually add the menu to the current menubar.
+
+This also precalculates equivalent key bindings when
+`easy-menu-precalculate-equivalent-keybindings' is on.
+
+You should call this once the menu and keybindings are set up
+completely and menu filter functions can be expected to work."
   (when easy-menu-precalculate-equivalent-keybindings
     (if (and (symbolp menu) (not (keymapp menu)) (boundp menu))
 	(setq menu (symbol-value menu)))