home *** CD-ROM | disk | FTP | other *** search
/ back2roots/padua / padua.7z / padua / shell / SKsh017.lzh / scr_source / emacs_mode.s < prev    next >
Encoding:
Text File  |  1991-04-19  |  1.3 KB  |  38 lines

  1. #!c:sksh
  2.  
  3. #*************************************************************************
  4. # This function sets emacs mode editing
  5. #*************************************************************************
  6.  
  7.    if [ "$1" = '-?' ]
  8.    then
  9.       echo 'Usage:' $(basename $0)
  10.       echo '       (sets command line editing to emacs mode)'
  11.       return 1
  12.    fi
  13.  
  14.    [ "$SIZE" = 'normal' ] ||
  15.        echo "This command does not operate with Tiny_SKsh." && return 2
  16.  
  17.    options -e                          # turn on command line editing
  18.  
  19.    setmap -r                           # reset the keymap
  20.  
  21.    setmap -m 0 BOL ISM '#' PIO ACC     # comment out line macro
  22.  
  23.    setmap 0  8 BS   9  CC1  1  BOL  2 LFT   4  DEL  127 DEL  5 EOL  6 RHT \
  24.              7 ZAP  11 KEL  14 DN   15 EXE  16 UP   18  SRH 27 @1 155 @2 \
  25.              12 RDL 26 TIM  21 REP 20 SPC 25 YNK
  26.  
  27.    setmap 1  27 CC1  = CC2  \* CC3  8 BDW  f FWW  b BKW  d DLW  \. ILP \
  28.              \/ ILT  '<' HOL  '>' TOL  '#' '!0'  48 ERC  49 ERC  50 ERC \
  29.              51 ERC  52 ERC  53 ERC  54 ERC  55 ERC  56 ERC  57 ERC
  30.  
  31.    setmap 2  A UP   B DN  C RHT  D LFT  T HOL  S TOL  ' ' @3 \
  32.              48 FNK  49 FNK  50 FNK  51 FNK  52 FNK  53 FNK  54 FNK \
  33.              55 FNK  56 FNK  57 FNK
  34.  
  35.    setmap 3  A BKW  @ FWW
  36.  
  37.    echo "\nCommand line editing set to emacs mode.\n"
  38.