%%   User Initialization file for the JED editor
%%   If a user does not have a startup file in the user's home directory,
%%   JED will automatically load this from JED_LIBRARY.   Thus is is easier
%%   for a system manager to make defaults for all users.

%%   Do not edit this file directly.  Instead, copy it to your home 
%%   directory (sys$login:jed.rc on VMS or $HOME/.jedrc on Unix) and edit
%%   the resulting file.  

%%   To uncomment a line, simply remove any leading '%' characters.

%%   This file is divided into various sections.  The first section pertains
%%   to keybindings (e.g., Wordstar, Emacs, EDT, etc...) and the following
%%   sections pertain to user preferences (e.g., default TAB size etc...)

if (BATCH == 0)
{
%%----------------------------------------------------------------------
%%  Keybindings  (not loaded for batch processes)
%%  
%%    Default bindings are Emacs-like with EDT emulation on Unix and VMS.
%%    For the PC, only Emacs is enabled by default.
%%
%%    For Wordstar like bindings, comment out EDT and Emacs lines and
%%    uncomment Wordstar line.
%%

      evalfile("emacs"); pop();        % Emacs-like bindings
#NOT_IBMPC
      evalfile("edt"); pop();          % EDT--- Unix and VMS
#endif
#IBMPC
%      evalfile("edt"); pop();         % EDT--- IBMPC
#endif

%     evalfile("wordstar"); pop();     % Wordstar
   
%%----------------------------------------------------------------------
%%  
%%  Initial help screen --- comment out to disable.
%%  Note that for the help to be valid, it must occur AFTER bindings are 
%%  loaded.
   
help();               % Pops up a help window-- bound to Control-H Control-H

}  %Batch

%%----------------------------------------------------------------------
%% JED internal variables  --- defaults shown
%%
DISPLAY_TIME    = 1;    % non-zero enables the time to be displayed on 
                        %  status line, zero disables it.
HIGHLIGHT	= 1;	% non-zero for region highlighting
HORIZONTAL_PAN	= 20;	% if zero, no automatic panning.  If positive, only
                        % the current line is panned.  If negative, pan window.
#IBMPC			% For msdos, panning window might be better:
  HORIZONTAL_PAN  = -20;
#end
LINENUMBERS	= 1;	% Non zero displays line number on status line
BLINK		= 1;	% if non zero, blink matching parenthesis
TAB_DEFAULT	= 8;	% Tab size  (also try edit_tab_stops)
WRAP		= 78;	% wrap column
ADD_NEWLINE	= 1;	% add newline to file when writing if one not present
IGNORE_BEEP	= 0;	% If non zero, to not beep terminal during error msgs.
_traceback	= 0;	% Non zero means dump traceback on S-Lang errors
WRAP_INDENTS	= 0;	% Non zero indents next line after wrapping current.
			%  Make this a 1 if you want indented text mode.
KILL_LINE_FEATURE = 1;
			% If non-zero, kill line will kill through end of the 
			%  line if Point is at the beginning of the line. For
			%  emacs-like behavior, set this to zero.
#NOT_MSDOS
OUTPUT_RATE    = 0;     % Should be set automatically by JED. It is the 
                        % of chars sent to terminal / second.  (0 = Infinity)
			% 
			% If JED pauses during screen updates, then you need
			% to set your baud rate properly or simply set this
			% variable to zero.  JED is not slow, rather it assumes
			% your terminal is so it sleeps when writing to 
			% terminal.  By default, this is set to zero.  I 
			% suggest that you comment it out and let JED set it 
			% if your baud rate is correct.
#end
%%  C-mode variables:

C_INDENT	= 3;	% amount of space to indent within block.
C_BRACE		= 2;	% amount of space to indent brace
C_BRA_NEWLINE   = 0;    % If non-zero, insert a newline first before inserting
                        % a '{'.  Many C programmers like this to be 0. A zero
			% value will force '{' to be on same line as insertion.
				
			% Note that in C mode, the keys '{' and '}' are bound
			% to the commands 'brace_bra_cmd' and 'brace_ket_cmd'
			% respectively.
			   
#IBMPC
%% Alt-key handling on PC systems.  Setting this variable controls how the
%% Alt key is handled.  By default it is set to 27 (Ascii ESCAPE).  This means
%% that any key pressed in conjunction with the alt key produces ESCAPE 
%% followed by the key itself.  If ALT-X is pressed, an ESCAPE-X is generated.
%% Set it to zero to turn off Alt key processing.
ALT_CHAR = 27;

#end

%%
%% 8 bit stuff  -- see documentation for a complete discussion
%%

META_CHAR	= -1;	% All chars with hi bit set will self insert

#IBMPC
  DISPLAY_EIGHT_BIT = 1;
#end
#NOT_IBMPC
  DISPLAY_EIGHT_BIT = 160; % Other systems assume ISO Latin 1
#end

%%
%%  COLORS: IBMPC ONLY!
%%     0:black  1:blue 2:green 3:cyan 4:red 5:magenta 6:brown 7:white
%%
#IBMPC
      $0 = 7; %%  foreground color (white)
      $1 = 1; %%  background color (blue)
      
      COLOR = $0 + ($1 shl 4);
      call("redraw");
#end

#UNIX
%
%  Terminal type.  By default, on unix termcap is used.  However, some
%  (if not all) termcaps do not include AL, DL strings for vtxxx terminals.
%
%  True blue vt100 terminals cannot insert and delete lines so the AL and DL
%  termcap entries are not appropriate for them.  However, almost no one
%  uses a true vt100 terminal anymore but they set their TERM variable to
%  vt100 just the same.  If you do not like the way your terminal scrolls,
%  and it is more than a vt100, either set your TERM variable appropriately
%  or add vt100 to the list below. 
%  
  if (is_substr("vt102 vt200 vt220 vt300 vt320 vt420 xterms", getenv("TERM")))
    { set_term_vtxxx(0) }
#end
  

variable compile_parse_error_function;
%%
%%  Compiler interface--- select your compiler:
%%
compile_parse_error_function = "Ultrix_cc";
% compile_parse_error_function = "bcc";
% compile_parse_error_function = "gcc";

%%
%%  Hooks:
%%
%%     is_paragraph_separator  is used to determine if current line delimits
%%          a paragraph.
%%
%%     By default, jed considers any line which is either empty, begins with
%%      a backslash, or a percent char to delimit a paragraph.  In slang, this
%%      is expressed as:
%%
%%     define is_paragraph_separator ()
%%     {
%%       bol();
%%       if (looking_at("\\") or looking_at("%")) return (1);
%%       
%%       skip_while();
%%       return (eolp());
%%     }
%%
%%     The default implementation is in C.
%%
%%     This particular definition was chosen since is it is useful for (La)TeX
%%


%%
%%  Insert contents of other window
%%
define insert_other_window()
{
  if (nwindows() != 2) return;
  otherwindow();
  whatbuf();
  otherwindow();
  insbuf();
}

%% This sets terminals to vt320 on vt320s of course:
%%"\e[63;1\"p"  tt_send
