jed-users mailing list

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

Re: Popup on mode load


On Tue, Jun 17, 2003 at 04:25:10PM +0000, Joerg Sommer wrote:
> begin  Günter Milde <milde@xxxxxxxxxxxxxxxxxxxx> wrote:
> > On Sun, Jun 15, 2003 at 06:52:24PM +0000, Joerg Sommer wrote:
> >> Hello,
> >> 
> >> how to popup a menu on mode load? If a empty latex file is loaded, I
> >> would like a popup (Mode.Templates) for selection a template, that's
> >> filled in.
> > 
> > define latex_mode_hook ()
> > {
> >    define_blocal_var("run_buffer_hook", "latex_compose"); 
> >    % ... or whatever your current latex_mode_hook is
> >    if (bobp and eobp) % buffer empty
> >       menu_select_menu("Global.M&ode.&Templates");
> > }
> 
> That's also my idea, but I get an error, if I write that.

It seems like the Mode menu popup is not ready when the mode-hook is called. 
2 fixes:

1. (quick) 
  -       menu_select_menu("Global.M&ode.&Templates");
  +       menu_select_menu("Global.M&ode");
  and press Enter on Mode>Templates
  
2. (elaborated)
  use a templates add-on (there are 2 or 3 contributed modes for this around) 
  let it insert a File>New_from_Template item and call this.

Günter

-- 
Milde at ife.et.tu-dresden.de

--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


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