jed-users mailing list

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

Re: A small and a large window on startup


Hi Martin,

I use the following. In .jedrc I define:

define window_set_rows (rows)
{
  if(rows >= SCREEN_HEIGHT-3)
    onewindow();
  variable misfit = rows - window_info('r');
  if (misfit > 0)
    {
      % window too small
      loop(misfit)
        enlargewin ();
    }
  
  if (misfit < 0) 
    {
      % window too large
      variable curbuf = whatbuf();
      otherwindow;
      loop(-misfit)
        enlargewin ();
%      otherwindow;
      pop2buf(curbuf);
    }
%  recenter(what_line);
}

Adapted from bufutils.sl. In /usr/local/jed/lib/acompile.sl I have defined
the function mycompile (just put this at the end of that file):

public define mycompile ()
{
   variable b, n;
   variable cmd = NULL;

   if (_NARGS == 1)
     cmd = ();

   Compile_Output_Buffer = "*compile*";
   
   if (Compile_Process_Id != -1)
     {
	if (bufferp (Compile_Output_Buffer))
	  error ("A compile process is already running.");
	ERROR_BLOCK
	  {
	     _clear_error ();
	  }
	kill_process (Compile_Process_Id);
	Compile_Process_Id = -1;
     }
	
   
   b = whatbuf();
   save_buffers();

   cmd = "make";
   compile_start_process (cmd);
   window_set_rows(5);

   pop2buf(b);
   
   %compile_parse_errors ();
}

The only difference between this and the default compile is that it always
save buffers, always runs make, and sets the height of the compile buffer to
5 rows. I then bind mycompile to F2.

Thomas

--------------------------
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]