Greg Klanderman <greg(a)alphatech.com> writes in xemacs-beta(a)xemacs.org:
What is the right autoload magic to add menus into the menubar for a
package? I notice that VC and EDIFF are no longer adding menus by
default, you have to ask for them in .emacs. Is that intended?
It's probably a side-effect of eliminating the files they were
previously dumping.
Personally I think this is bad - this means only an expert
who hacks her .emacs will ever use these packages.
I'd like to add a sub menu for PCL CVS, but something like:
;;;###autoload(pcl-menu-install)
gets run so early in startup that the "loading <foo.el>
..." messages
get printed to stdout. What is the right way?
If your menu code is loading files, you've done something wrong.
Look at how it is done in eudc:
;;;###autoload
(if (and (string-match "XEmacs" emacs-version)
(featurep 'menubar)
(not (featurep 'eudc))
(not (featurep 'infodock)))
(add-submenu '("Tools")
'("Directory Search"
["Load Hotlist of Servers" eudc-load-eudc t]
["New Server" eudc-set-server t]
["---" nil nil]
["Query with Form" eudc-query-form t]
["Expand Inline Query" eudc-expand-inline t]
["---" nil nil]
["Get Email" eudc-get-email t]
["Get Phone" eudc-get-phone t])))
You need to ensure that menubars are compiled in and you are running
in vanilla XEmacs (and not InfoDock).