jed-users mailing list

[2012 Date Index] [2012 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: [Jed-users-l] menu_append_item


Mike McClain <mike.junk@xxxxxxxxxxx> wrote:
> menu_append_item ("Global.&Help", "See Function &Source", "see_src");
>
> I can't find the correct combination to get "see_src" into the menu.

My guess is that it was placed at the top of the Help menu instead of
at the bottom.  If so, then the reason for this is that your
menu_append_item statement was executed prior to the Help menu getting
populated.  This happens in jed/lib/popups.sl, which does not get
loaded until the menus are accessed.  The rationale for this is that
many of us rarely use the menus, so for efficiency they get loaded
only upon demand.

With that in mind, you have two choices:

1.  Force popups.sl to load:

require ("popups.sl");
menu_append_item (...);

2.  Create a hook that will get called when popups.sl is loaded:

private define my_load_menu_popup_hook (menubar)
{
   menu_append_item ("Global.&Help", "See Function &Source", "see_src");
}
append_to_hook ("load_popup_hooks", &my_load_menu_popup_hook);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Finally, it appears that you are trying to achieve some of the
functionality that is in jed/lib/ctags.sl.  For this you need to run
the ctags program on the source files (ctags *.sl) to generate a tags
file.  ctags is available for most Unix systems and may be already
installed on your system.

Good luck,
--John
_______________________________________________
Jed-users-l mailing list
Jed-users-l@xxxxxxxx
http://mailman.jtan.com/mailman/listinfo/jed-users-l


[2012 date index] [2012 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]