home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 2 / crawlyvol2.bin / apps / text_ed / emacs / st520.rc < prev    next >
Text File  |  1989-06-07  |  4KB  |  189 lines

  1. ;    EMACS.RC:    Standard micro Startup program
  2. ;            for MicroEMACS 3.9d and above
  3. ;            (C)opyright 1987 by Daniel M Lawrence
  4. ;            Last Update: 10/20/87
  5.  
  6. set $discmd FALSE
  7. write-message "[Setting up....]"
  8.  
  9. ; If you screen "SNOWS", uncomment this line
  10. ;    set $flicker "TRUE"
  11.  
  12. ; To use an IBM-PC EGA card, uncomment the following line
  13. ;    set $sres "EGA"
  14.  
  15. ;    ***** Rebind the Function key group
  16.  
  17. bind-to-key search-forward        FN;
  18. bind-to-key search-reverse        FN<
  19. bind-to-key hunt-forward        FN=
  20. bind-to-key hunt-backward        FN>
  21. bind-to-key execute-macro-1        FN?
  22. bind-to-key execute-macro-2        FN@
  23. bind-to-key next-window            FNA
  24. bind-to-key execute-macro-3        FNB
  25. bind-to-key save-file            FNC
  26. bind-to-key exit-emacs            FND
  27.  
  28. bind-to-key execute-macro-10        FNT
  29. bind-to-key execute-macro-11        FNU
  30. bind-to-key execute-macro-12        FNV
  31. bind-to-key execute-macro-13        FNW
  32. bind-to-key execute-macro-14        FNX
  33. bind-to-key execute-macro-15        FNY
  34. bind-to-key execute-macro-16        FNZ
  35. bind-to-key execute-macro-17        FN[
  36. bind-to-key execute-macro-18        FN\
  37. bind-to-key execute-macro-19        FN]
  38.  
  39. ;    Set Default Global modes
  40.  
  41. add-global-mode "blue"
  42. bind-to-key next-page FNG
  43. bind-to-key previous-page FNR
  44.  
  45. ;    Toggle function key window display
  46.  
  47. 1    store-macro
  48.     !if %rcfkeys
  49.         !goto rcfoff
  50.     !endif
  51.  
  52. ;    toggle function key window on
  53.     save-window
  54.     1 next-window
  55.     !if &sequal $cbufname "emacs.hlp"
  56.         delete-window
  57.     !endif
  58.     !if ¬ &sequal $cbufname "Function Keys"
  59.         1 split-current-window
  60.         select-buffer "Function Keys"
  61.         add-mode "red"
  62.         !force 5 resize-window
  63.         1 goto-line
  64.     !endif
  65.     set %rcfkeys TRUE
  66.     !force restore-window
  67.     !if &sequal $cbufname "Function Keys"
  68.         next-window
  69.     !endif
  70.     write-message "[Function key window ON]"
  71.     !return
  72.  
  73.     ;Toggle the function key window off
  74. *rcfoff
  75.     save-window
  76.     1 next-window
  77.     !if &sequal "Function Keys" $cbufname
  78.         delete-window
  79.     !endif
  80.     !force restore-window
  81.     write-message "[Function key window OFF]"
  82.     set %rcfkeys FALSE
  83. !endm
  84.  
  85. ;    Toggle HELP file onscreen
  86.  
  87. 2 store-macro
  88.     1 next-window
  89.  
  90.     ;Make sure the function key window isn't up!
  91.     !if &sequal $cbufname "Function Keys"
  92.         delete-window
  93.     !endif
  94.     set %rcfkeys FALSE
  95.  
  96.     ;Bring up page 1
  97.     !if ¬ &seq $cbufname "emacs.hlp"
  98.         help
  99.         8 resize-window
  100.         add-mode "red"
  101.         beginning-of-file
  102.         2 forward-character
  103.     !endif
  104.  
  105. *rchelp
  106.  
  107.     write-message "[INS/HOME] Page    [FN6] EXIT     ^G  Exit leaving page on screen"
  108.     update-screen
  109.     set %rctmp >key
  110.     !if &equ &asc %rctmp 0
  111.         set %rctmp >key
  112.         !if &seq %rctmp R
  113.             beginning-of-line
  114.             !force search-reverse "=>"
  115.             1 redraw-display
  116.             !goto rchelp
  117.         !endif
  118.         !if &seq %rctmp G
  119.             beginning-of-line
  120.             2 forward-character
  121.             !force search-forward "=>"
  122.             1 redraw-display
  123.             !goto rchelp
  124.         !endif
  125.         !if &seq %rctmp "~@"
  126.             delete-window
  127.             !if &seq %rcfkeys TRUE
  128.                 set %rcfkeys FALSE
  129.                 execute-macro-1
  130.             !endif
  131.             write-message "[Help Exited]"
  132.             !return
  133.         !endif
  134.     !endif
  135.     !if &equ &asc %rctmp 7
  136.         next-window
  137.         set %rcfkeys FALSE
  138.         write-message "[Help Aborted]"
  139.         !return
  140.     !endif
  141.     !goto rchelp
  142. !endm
  143.  
  144. ;    Load a new page
  145.  
  146. 3    store-macro
  147.     !if &seq &find newpage.cmd ""
  148.         write-message "[Can not find NEWPAGE.CMD]"
  149.         !return
  150.     !endif
  151.     execute-file newpage.cmd
  152. !endm
  153.  
  154. ;procedure to clean out the current page (which is nothing right now)
  155.  
  156. store-procedure    clean
  157.     ; nothing by default
  158. !endm
  159.  
  160. ;    Set up auto CMODE
  161.  
  162. 20    store-macro
  163.     set %rctmp &sin $cfname "."
  164.     !if &equ %rctmp 0
  165.         !return
  166.     !endif
  167.     set %rctmp &mid $cfname &add %rctmp 1 5
  168.     !if &or &seq %rctmp "c" &seq %rctmp "h"
  169.         add-mode "cmode"
  170.     !endif
  171. !endm
  172. bind-to-key execute-macro-20    M-FNR
  173.  
  174. ;    bring up the function key window
  175.  
  176.     1 split-current-window
  177.     select-buffer "Function Keys"
  178.     insert-string "f1 search-> f2 <-search |    MicroEMACS:  Text Editor~n"
  179.     insert-string "f3 hunt->   f4 <-hunt   | ~n"
  180.     insert-string "f5 fkeys    f6 help     |  Available function key Pages include:~n"
  181.     insert-string "f7 nxt wind f8 pg[    ] |    WORD  PROG  BOX~n"
  182.     insert-string "f9 save     f10 exit    |  [use the f8 key to load Pages]~n"
  183.     unmark-buffer
  184.     delete-window
  185.     set %rcfkeys FALSE
  186.     execute-macro-1
  187.     set $discmd TRUE
  188.  
  189.