home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / EFFO / forum3.lzh / BRIEFE / emacsrc < prev    next >
Text File  |  1987-12-27  |  8KB  |  242 lines

  1. ;    EMACSRC: Startup file for MicroEMACS 3.8 
  2. ; This file is executed everytime the 
  3. ; editor is entered
  4.  
  5. bind-to-key delete-next-word            M-^F
  6. bind-to-key delete-previous-word        M-^B
  7.  
  8. ;    ***** Rebind the Function key group
  9.  
  10. bind-to-key hunt-forward                FN01 
  11. bind-to-key hunt-backward               FN02
  12. bind-to-key set-mark                    FN03 
  13. bind-to-key goto-line                   FN04 
  14. bind-to-key execute-macro-35            FN05
  15. bind-to-key search-forward              SFN01
  16. bind-to-key search-reverse              SFN02
  17. bind-to-key copy-region                 SFN03
  18. bind-to-key goto-matching-fence         SFN04
  19. bind-to-key transpose-characters        SFN05
  20. bind-to-key query-replace-string        CFN01
  21. bind-to-key replace-string              CFN02
  22. bind-to-key kill-region                 CFN03
  23. bind-to-key exchange-point-and-mark     CFN04
  24. bind-to-key execute-macro-37            CFN05
  25.  
  26. bind-to-key execute-macro-32            FN06 
  27. bind-to-key execute-macro-31            FN07
  28. bind-to-key split-current-window        FN08 
  29. bind-to-key delete-other-windows        FN09 
  30. bind-to-key execute-macro-26            FN10
  31. bind-to-key execute-macro-33            SFN06
  32. bind-to-key execute-macro-30            SFN07
  33. bind-to-key move-window-up              SFN08
  34. bind-to-key move-window-down            SFN09
  35. bind-to-key unmark-buffer               SFN10
  36. bind-to-key delete-buffer               CFN06
  37. bind-to-key execute-macro-29            CFN07
  38. bind-to-key execute-macro-27            CFN08
  39. bind-to-key execute-macro-28            CFN09
  40. bind-to-key execute-macro-38            CFN10
  41.  
  42. bind-to-key execute-named-command       FN11
  43. bind-to-key execute-macro               FN12
  44. bind-to-key i-shell                     FN13 
  45. bind-to-key apropos                     FN14 
  46. bind-to-key buffer-position             FN15
  47. bind-to-key exit-emacs                  SFN11
  48. bind-to-key begin-macro                 SFN12
  49. bind-to-key pipe-command                SFN13
  50. bind-to-key describe-key                SFN14
  51. bind-to-key list-buffers                SFN15
  52. bind-to-key quick-exit                  CFN11
  53. bind-to-key end-macro                   CFN12
  54. bind-to-key filter-buffer               CFN13
  55. bind-to-key describe-bindings           CFN14
  56. bind-to-key execute-macro-39            CFN15
  57.  
  58. ; macro: delete function key window if present
  59. 26 store-macro
  60.             save-window
  61.             1 next-window
  62.             !if &sequal $cbufname "Function Keys"
  63.                 delete-window
  64.             !endif
  65.             restore-window
  66. !endm
  67.  
  68. ; macro: grow window (resizing function keys window if present)
  69. 27 store-macro
  70.             shrink-window
  71.             save-window
  72.             1 next-window
  73.             !if &sequal $cbufname "Function Keys"
  74.                 !force 5 resize-window
  75.             !endif
  76.             restore-window
  77. !endm
  78.  
  79. ; macro: grow window (resizing function keys window if present)
  80. 28 store-macro
  81.             grow-window
  82.             save-window
  83.             1 next-window
  84.             !if &sequal $cbufname "Function Keys"
  85.                 !force 5 resize-window
  86.             !endif
  87.             restore-window
  88. !endm
  89.  
  90. ; macro: delete window (skipping function keys)
  91. 29 store-macro
  92.             delete-window
  93.             !if &sequal $cbufname "Function Keys"
  94.                 next-window
  95.             !endif
  96. !endm
  97.  
  98. ; macro: previous window (skipping function keys)
  99. 30 store-macro
  100.             previous-window
  101.             !if &sequal $cbufname "Function Keys"
  102.                 previous-window
  103.             !endif
  104. !endm
  105.  
  106. ; macro: next window (skipping function keys)
  107. 31 store-macro
  108.             next-window
  109.             !if &sequal $cbufname "Function Keys"
  110.                 next-window
  111.             !endif
  112. !endm
  113.  
  114. ; macro: next buffer (skipping function keys)
  115. 32 store-macro
  116.             next-buffer
  117.             !if &sequal $cbufname "Function Keys"
  118.                 next-buffer
  119.             !endif
  120. !endm
  121.  
  122. ; macro: previous buffer
  123. 33 store-macro
  124.             set %oldbuf $cbufname
  125. *L1       
  126.             set %prebuf $cbufname
  127.             execute-macro-32
  128.             !if &sequal %oldbuf $cbufname
  129.                 !goto L2
  130.             !endif
  131.             !goto L1
  132. *L2         
  133.             execute-macro-32
  134.             !if &sequal %prebuf $cbufname
  135.                 !goto found
  136.             !endif
  137.             !goto L2
  138. *found
  139. !endm
  140.  
  141. ; macro: enter insert mode
  142. 34 store-macro
  143.             delete-mode "OVER"
  144.             bind-to-key execute-macro-35 FN05
  145.             write-message "[Insert Mode]"
  146. !endm
  147.  
  148. ; macro: enter overwrite mode
  149. 35 store-macro
  150.             add-mode "OVER"
  151.             bind-to-key execute-macro-34 FN05
  152.             write-message "[Overwrite Mode]"
  153. !endm
  154.  
  155. ; macro: start window display with current line
  156. 36 store-macro
  157.             1 redraw-display
  158. !endm
  159.  
  160. ; macro: looking for function keys buffer
  161. 40 store-macro
  162.             1 next-window
  163.             !if &sequal "Function Keys" $cbufname
  164.                 !goto found
  165.             !endif
  166.             1 split-current-window
  167.             select-buffer "Function Keys"
  168. *found      
  169.             beginning-of-file
  170.             !force 5 resize-window
  171. !endm
  172.  
  173. ; macro: bring up function keys buffer, search for normal function keys
  174. 37 store-macro
  175.         save-window
  176.         execute-macro-40
  177.         search-forward "FN01"
  178.         1 redraw-display
  179.         restore-window
  180.         !if &sequal $cbufname "Function Keys"
  181.             next-window
  182.         !endif
  183. !endm
  184.  
  185. ; macro: bring up function keys buffer, search for shift function keys
  186. 38 store-macro
  187.         save-window
  188.         execute-macro-40
  189.         search-forward "FN06"
  190.         1 redraw-display
  191.         restore-window
  192.         !if &sequal $cbufname "Function Keys"
  193.             next-window
  194.         !endif
  195. !endm
  196.  
  197. ; macro: bring up function keys buffer, search for control function keys
  198. 39 store-macro
  199.         save-window
  200.         execute-macro-40
  201.         search-forward "FN11"
  202.         1 redraw-display
  203.         restore-window
  204.         !if &sequal $cbufname "Function Keys"
  205.             next-window
  206.         !endif
  207. !endm
  208.  
  209. ; this code is executed on startup
  210.         split-current-window
  211.         select-buffer "Function Keys"
  212.         add-mode "RED"
  213.         insert-string "FN01 hunt-forward          SFN01 search-forward       CFN01 query-replace~n"
  214.         insert-string "FN02 hunt-backward         SFN02 search-reverse       CFN02 replace~n"
  215.         insert-string "FN03 set-mark              SFN03 copy-region          CFN03 kill-region~n"
  216.         insert-string "FN04 goto-line             SFN04 goto-matching-fence  CFN04 exchange-point-mark~n"
  217.         insert-string "FN05 toggle overwrite      SFN05 transpose-characters CFN05 help~n"
  218.         insert-string "FN06 next-buffer           SFN06 previous-buffer      CFN06 delete-buffer~n"
  219.         insert-string "FN07 next-window           SFN07 previous-window      CFN07 delete-window~n"
  220.         insert-string "FN08 split-current-window  SFN08 move-window-up       CFN08 grow-window~n"
  221.         insert-string "FN09 delete-other-windows  SFN09 move-window-down     CFN09 shrink-window~n"
  222.         insert-string "FN10 delete-fkey-window    SFN10 unmark-buffer        CFN10 help~n"
  223.         insert-string "FN11 execute-named-command SFN11 exit-emacs           CFN11 quick-exit~n"
  224.         insert-string "FN12 execute-macro         SFN12 begin-macro          CFN12 end-macro~n"
  225.         insert-string "FN13 i-shell               SFN13 pipe-command         CFN13 filter-buffer~n"
  226.         insert-string "FN14 apropos               SFN14 describe-key         CFN14 describe-bindings~n"
  227.         insert-string "FN15 buffer-position       SFN15 list-buffers         CFN15 help~n"
  228.         unmark-buffer        
  229.         add-mode "VIEW"
  230.         next-window
  231.         delete-other-windows
  232.         
  233.         4 handle-tab
  234.         add-global-mode CMODE
  235.         add-global-mode MAGIC
  236.         unbind-key ^T
  237.         unbind-key ^L
  238.         bind-to-key previous-word ^L
  239.         bind-to-key next-word ^T
  240.         
  241.