jed-users mailing list

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

Problem with define_word


For ~10 years (since Red Hat 4) I have used the appended (and inherited)
.jedrc,  most recently using jed-0.99.16-6 & slang-1.4.9-8 on RHEL4u4. 

Please note, in particular the line,

   define_word("-\\\"!#$%&'()*+,./0-9:;<=>?@A-Z[]^_a-z{|}~");

This has emulated the default VMS EDT behaviour characterised by
      $ edit/edi nl:
      *show word
      delimiter 

That is, the jed/edt keypad KP1 (WORD) skipped words as delimited by 
spaces, tabs and end-of-line.

I am building a RHEL5 system and have installed jed-0.99.18-5 and
slang-2.0.6-4.el5.

Define_word, KP1 (WORD) now skips to the beginning of the next line!

If I remove the define_word, KP1 will skip to "words" delimimited 
by, at least
	space $ . _ = " ^

Curiously, some of these characters do not appear in this statement
in /usr/share/jed/lib/edt.sl

	%define_word("!-~");

I use jed as a general text editor (not for programs) so this behaviour
is not helpful. It's compatibility with VMS (which I still use) is much
valued.

Any help would be appreciated.

Paul Lamb


---------------------------------------------------------------------------

%   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.
% atp 1994 colour off switch
define no_colours_please()
     {
       USE_ANSI_COLORS = 0;
       call("redraw");
     }

define paste_mode()
     {
	setkey("newline","^M");
     }

%   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 such as default TAB sizes, line 
%   and column numbers on status line, colors, indentation style, 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.  If you do not want EDT
%    bindings, simply coment out the appropriate line.   
%
%    For Wordstar like bindings, comment out EDT and Emacs lines and
%    uncomment Wordstar line.
%

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

%     evalfile("wordstar"); pop();     % Wordstar
   
%----------------------------------------------------------------------
%
%   TAB key setting  -- by default, the tab key is bound to 'indent_line_cmd'.
%                       If you want a real tab inserted, uncomment next line.
%
   setkey("self_insert_cmd", "^I");
%   setkey("backward_delete_char", "^H");
%   setkey("help_prefix","^[[11~");
   
%----------------------------------------------------------------------
%  
%  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
% To disable it, uncomment the next line.
enable_top_status_line (0);


}  %Batch

%----------------------------------------------------------------------
% JED global variables  --- defaults shown
%
#ifdef VMS UNIX
USE_ANSI_COLORS = 0;   % if non-zero, JED will display colors on a color
                        % terminal (Unix and VMS only) See doc/color.txt 
                        % for more discussion and look below for setting
                        % the colors.
#endif
Startup_With_File = -1;  % if greater then zero, force JED to prompt for a file
                        %   if none is specified on the command line.  If 
                        %   negative, inhibit startup message.
DISPLAY_TIME    = -1;    % non-zero enables the time to be displayed on 
                        %  status line, zero disables it.  If this value
                        %  is -1, 24 hour time will be used.
HIGHLIGHT	= 1;	% non-zero for region highlighting
WANT_SYNTAX_HIGHLIGHT = 1;
                        % Highlight syntax in C mode.  See section on colors
                        %  below for choosing how to highlight.  On Unix and 
                        %  VMS systems, USE_ANSI_COLORS must also be non-zero.
HORIZONTAL_PAN	= -20;	% if zero, no automatic panning.  If positive, only
                        % the current line is panned.  If negative, pan window.
#ifdef MSDOS		% For msdos, panning window might be better:
  HORIZONTAL_PAN  = -1;
#endif

#ifdef MSDOS
  LINENUMBERS	= 2;	% A value of zero means do NOT display line number on 
#else                   % status line line.  A value of 1, means to display
  LINENUMBERS	= 1;	% the linenumber. A value greater than 1 will also
#endif			% display column number information.  I recommend a 
			% value of 2 only at high baud rates

BLINK		= 1;	% if non zero, blink matching parenthesis
TAB_DEFAULT	= 8;	% Tab size  (also try edit_tab_stops)
WRAP		= 76;	% 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.
#ifndef MSDOS OS2
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 JED sleeps when writing to the
			% terminal.  By default, this is set to zero.  I 
			% suggest that you comment it out and let JED set it 
			% ASSUMING YOUR BAUD RATE IS CORRECT.  For example, on
                        % Unix, enter 'stty 2400' at the shell prompt to set
			% the baud rate to 2400.  Setting this variable
			% properly will synchronize JED's screen writes to
			% your terminal output rate for increased performance.
#endif

%                           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.


#ifdef UNIX
% JED Email.  JED uses the UC Berkeley mail program for Email.   Most systems
% have this.  Try ^Xm mail and you get an error, uncomment this next line 
% restart JED and try again.  This is definitely the case for Linux.  Again,
% only uncomment out this line if mail fails!

% variable UCB_Mailer; UCB_Mailer = "/bin/mail";
#endif

#ifdef MSDOS
% 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;

#endif

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

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

#ifdef MSDOS OS2
  DISPLAY_EIGHT_BIT = 1;
#else
  DISPLAY_EIGHT_BIT = 160; % Other systems assume ISO Latin 1
#endif

#ifdef XWINDOWS
%  COLORS: 
%
%  Note that to use the colors below with MS-Kermit, do 
%  'set term color 30 47' at the MS-Kermit prompt.
%  (See the file 'colors.txt' for a description of using JED with color 
%  terminals.)
%  Foreground and background:
%    "black", "blue", "green", "cyan", "red", "magenta", "brown", "lightgray"
%  Foreground Only:
%    "gray", "brightblue", "brightgreen", "brightcyan", "brightred", 
%    "brightmagenta", "yellow", "white"
%  This is a limitation of video adapters on PC systems.  For MSDOS, I 
%  reprogram the controller so that high intensity background colors may be
%  displayed.  There does not seem to be a way to do this in MS-Kermit.
   USE_ANSI_COLORS = 1; 

   $1 = "wheat"; $2 = "black";
   set_color("normal", "lightgray", $2);
   set_color("status", "lightgray", $2);
   set_color("region",$2, "white");
   set_color("operator", "green",$2);      % +, -, etc..
   set_color("number", "brightblue", $2);    % 10, 2.71, etc..
   set_color("comment", "magenta", $2);% /* comment */
   set_color("string", "brightblue", $2);    % "string" or 'char'
   set_color("keyword", "brightred", $2);    % if, while, unsigned, ...
   set_color("delimeter", "yellow", $2);     % {}[](),.;...
   set_color("preprocess", "cyan", $2); % #ifdef ....

#ifdef UNIX VMS
if (USE_ANSI_COLORS) call ("redraw");
#else
   call("redraw");
#endif
#endif  XWindows

#ifdef 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. 
%  
  $1 = "vt102 vt200 vt220 vt300 vt320 vt420 xterms";

  if (is_substr($1, getenv("TERM"))) set_term_vtxxx(0);

#endif
  

variable compile_parse_error_function;
%
%  Compiler interface--- select your compiler:
%
% compile_parse_error_function = "gcc";
#ifdef UNIX
%      compile_parse_error_function = "Ultrix_cc";
#else
#ifdef MSDOS
       compile_parse_error_function = "bcc";
#endif
#endif


%
%  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();
}

define quick_save_exit ()
 {
    save_buffers;
    exit;
  }

%setkey("quick_save_exit","^X^A");


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


% ----------------------------------------------------------------------

% Attaptions from above ATP .jedrc

HORIZONTAL_PAN	= 0;	% if zero, no automatic panning. 
WRAP            = 10000;	% (don't) wrap column

define_word("-\\\"!#$%&'()*+,./0-9:;<=>?@A-Z[]^_a-z{|}~");

define my_mode_hook (ext)
   {
      return 1;
   }
%mode_hook_pointer = &my_mode_hook;

setkey("self_insert_cmd","{");   
setkey("self_insert_cmd","}");   
setkey("self_insert_cmd","^I");   
setkey("newline",        "^M");   
unsetkey("^H"); 
setkey("bol","^H"); 

% ==== ends ====

------------------------------------------------------------------------
Dr Paul Lamb,  Head of Computing
Mullard Space Science Laboratory
University College London
Holmbury St. Mary
Dorking
Surrey
RH5 6NT
UK

Email: pal@xxxxxxxxxxxxxx
Tel:   +44 (0) 1483 204 136
Fax:   +44 (0) 1483 278 312

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


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