Hi,
I spent a lot of frustrating time to get running the minor-mode menu for =
ECB.
For GNU Emacs just do a call to `easy-menu-define' and bib is your =
uncle.
For XEmacs you have to write something like this - at least for
a global-minor-mode (here the snippet from ecb.el):
;; menus - dealing with the menu for XEmacs is really a =
pain...
(when ecb-running-xemacs
(let ((dummy-buf-name " *dummytogetglobalmap*"))
(save-excursion
(set-buffer (get-buffer-create dummy-buf-name))
(add-submenu nil ecb-minor-menu)
(kill-buffer dummy-buf-name)))
(save-excursion
(dolist (buf (buffer-list))
(set-buffer buf)
(if (null (car (find-menu-item current-menubar
(list =
ecb-menu-name))))
(add-submenu nil ecb-minor-menu)))))
This activates the ECB-menu for each buffer at activation-time ECB - =
this is necessary
because ECB is a global minor mode regardless of the current buffer.
If EDE is a local minor-mode then maybe the following line is enough:
(add-submenu nil ede-minor-menu)
Run this line *after* defining the ede-minor-menu with =
`easy-menu-define' as
done in ede.el at line 490...
Not tested - but maybe a helpful hint....
Again, dealing with menus in XEmacs is a pain...
Ciao,
Klaus
Nicolas Pernetty wrote:
> On Tue, 28 Jun 2005 21:36:22 -0400, "Eric M. Ludlam"
> <eric@...> wrote :
>>>=20
>>>> Have just tried, and the menu still doesn't appear.
>>>> I'll try at work tomorrow but I doubt that it's related to the
>>>> configuration (I haven't too much things in my .xemacs directory).
>>>=20
>>>> It will be maybe faster if someone could point me the part which
>>> create > the menu. I will then try to execute it directly and see if
>>> the > problem is in the instructions which create the menu ?
>>>=20
>>> Sorry, I can't help you on this point. Maybe someone else ?
>>>=20
>>> --drkm
>> [ ... ]
>>=20
>> ede.el, line 490 is where the menu is created. I didn't do anything
>> on purpose for making the menu work for XEmacs. I know it needs
>> something special but there my experience ends. I was thusly
>> surprised when drkm postulated that it worked for him in XEmacs.
>> Emacs will show menus that show up in the minor-mode-map. XEmacs
>> needs some sort of declaration for a menu to appear. I would be
>> happy to accept a patch that would fix this deficiency.
>>=20
>> Eric
>>=20
>=20
> I'm a real beginner with (X)emacs, but I'll try to give it a shot and
> make a patch.
>=20
> Regards,
>=20
>=20
> -------------------------------------------------------
> SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
> from IBM. Find simple to follow Roadmaps, straightforward articles,
> informative Webcasts and more! Get everything you need to get up to
> speed, fast. =
http://ads.osdn.com/?ad_id=3D7477&alloc_id=3D16492&op=3Dclick
> _______________________________________________
> Cedet-devel mailing list
> Cedet-devel@...
> https://lists.sourceforge.net/lists/listinfo/cedet-devel
|