home *** CD-ROM | disk | FTP | other *** search
/ Mega CD-ROM 1 / megacd_rom_1.zip / megacd_rom_1 / FREEMACS / CONTRIB.ZIP / KEN.MIN < prev    next >
Text File  |  1989-01-11  |  3KB  |  181 lines

  1. Ken Van Wyk's preferences (This is out of date and no longer works, but you can
  2. get some good ideas from it)
  3.  
  4.  
  5. Name:U:backward-tab
  6. [*]#(sp,<<<<<<<<)[*]
  7.  
  8.  
  9. Name:U:center-line
  10. [*]#(pm,1)#(sm,0)
  11. #(sp,^)
  12. #(U:kill-spaces)
  13. #(sp,$)
  14. #(U:kill-spaces)
  15. #(F:set-mark)
  16. #(sp,##(Fmark))
  17. #(ds,column,##(lv,c))
  18. #(sp,^)
  19. #(Floop,(#(is, )),##(//,##(--,##(F-fill-column),##(column)),2))
  20. #(sp,0)#(pm)#(es,column)
  21. [*]
  22.  
  23.  
  24. Name:U:compile-file
  25. [*]
  26. #(Uset-mode-by-ext,#(Fextens-only,#(buffer-filename.##(ba,-1))))
  27. #(==,##(Ucompiler),,(
  28.    #(an,No compiler set - use standard lowercase filename extensions)
  29. ),(
  30.    #(F:write-current-file)
  31.    #(ex,#(env.COMSPEC),#(env.SWITCHAR)C ##(Ucompiler) #(buffer-filename.##(ba,-1)))
  32.    #(rd)
  33. ))
  34. [*]
  35.  
  36.  
  37. Name:U:kill-to-beginning-of-line
  38. [*]    
  39. #(==,arg1,,(
  40.     #(==,##(rm,<),(
  41. ),(
  42.         #(Fkill,<)
  43.     ),(
  44.         #(Fkill,^)
  45.     ))
  46. ),(
  47.     #(pm,1)
  48.     #(sm,0)
  49.     #(Floop,(#(sp,^<)),arg1)
  50.     #(Fkill,0)
  51.     #(pm)
  52. ))[*]
  53.  
  54.  
  55. Name:U:kill-to-bof
  56. [*]
  57. #(F:set-mark)
  58. #(sp,[)
  59. #(F:kill-region)
  60. [*]
  61.  
  62.  
  63. Name:U:kill-to-eof
  64. [*]
  65. #(F:set-mark)
  66. #(sp,])
  67. #(F:kill-region)
  68. [*]
  69.  
  70.  
  71. Name:U:screen-down
  72. [*]
  73. #(Floop,(#(sp,^<)),##(--,##(lv,r),1))
  74. #(F:previous-line)
  75. [*]
  76.  
  77.  
  78. Name:U:screen-up
  79. [*]
  80. #(Floop,(#(sp,$>)),##(--,##(lv,b),##(lv,r)))
  81. #(F:next-line)
  82. [*]
  83.  
  84.  
  85. Name:Ufind-non-blank
  86. [*]#(==,##(rm,arg1),( ),
  87.     (#(sp,arg1)#(SELF,arg1,arg2)),
  88.     (#(==,##(rm,arg1),(    ),
  89.         (#(sp,arg1)#(SELF,arg1,arg2)),
  90.         (#(==,arg2,crlf,
  91.             (#(==,##(rm,arg1),(
  92. ),                (#(sp,arg1)#(SELF,arg1,arg2)),
  93.             ))
  94.         ))
  95.     ))
  96. )
  97. [*]
  98.  
  99.  
  100. Name:Ufind-non-char
  101. [*]#(==,##(rm,arg2),arg1,
  102.     (#(sp,arg2)#(SELF,arg1,arg2)),)
  103. [*]
  104.  
  105.  
  106. Name:Ukill-chars
  107. Kill repeated characters.
  108. [*]#(Ufind-non-char,arg1,>)
  109. #(F:set-mark)
  110. #(Ufind-non-char,arg1,<)
  111. #(F:kill-region)
  112. [*]
  113.  
  114.  
  115. Name:Umark-whitespace
  116. Find the end of the whitespace, set a mark on it, and go to the beginning.
  117. [*]
  118. #(Ufind-non-blank,>,arg1)
  119. #(F:set-mark)
  120. #(Ufind-non-blank,<,arg1)
  121. [*]
  122.  
  123.  
  124. Name:Uset-mode-by-ext
  125. Determine what kind of file this is, and set the mode and compiler accordingly.
  126. [*]
  127. #(Fin-minor-mode,C-Mode,(#(Fexit-minor-mode,C-Mode)))
  128. #(Fin-minor-mode,Fill,(#(Fexit-minor-mode,Fill)))
  129. #(ds,Pcompiler,)
  130. #(ds,Pcompiler-switches,)
  131. #(Fcase,arg1,
  132.     (doc,(
  133.          #(Fenter-minor-mode,Fill)
  134.     )),
  135.     (txt,(
  136.          #(Fenter-minor-mode,Fill)
  137.     )),
  138.     (mss,(
  139.          #(Fenter-minor-mode,Fill)
  140.         )),
  141.     (pas,(
  142.              #(Fenter-minor-mode,C-Mode)
  143.          #(ds,Pcompiler,turbo)
  144.     )),
  145.     (c,(
  146.              #(Fenter-minor-mode,C-Mode)
  147.          #(ds,Pcompiler,MSC)
  148.     )),
  149.     (else,)
  150. )
  151. #(Fcase,arg1,
  152.     (for,(
  153.              #(Fenter-minor-mode,C-Mode)
  154.          #(ds,Pcompiler,watfor87)
  155.     )),
  156.     (bat,(
  157.     #(Fenter-minor-mode,C-Mode)
  158.        #(ds,Pcompiler, )
  159.     )),
  160.     (asm,(
  161.              #(Fenter-minor-mode,C-Mode)
  162.              #(ds,Pcompiler,masm)
  163.              #(ds,Pcompiler-switches,;)
  164.     )),
  165.     (else,)
  166. )
  167. [*]
  168.  
  169.  
  170. Name:Utest-ext
  171. Set the file mode to whatever extension the file currently has.
  172. [*]#(Uset-mode-by-ext,#(Fextens-only,#(buffer-filename.##(ba,-1))))[*]
  173.  
  174.  
  175. Name:Uword-case
  176. [*]
  177. #(sp,>-{+)
  178. #(F:set-mark)
  179. #(sp,})
  180. #(arg1)
  181. [*]