home *** CD-ROM | disk | FTP | other *** search
/ Mega CD-ROM 1 / megacd_rom_1.zip / megacd_rom_1 / FREEMACS / EMACS16A.ZIP / ASM.MIN < prev    next >
INI File  |  1989-11-06  |  3KB  |  149 lines

  1. [*]#(ds,Fext-mode-list,##(Fext-mode-list)(.asm,ASM,
  2. ))
  3. #(ds,Fmodified)
  4. #(F:save-all-libs)
  5. [*]
  6.  
  7.  
  8. Support for assembly language.  Press C-c C-c to install, then answer 'y'
  9. to write the changes to disk.
  10.  
  11.  
  12.  
  13. Name:U:asm-format
  14. Reformat assembly language into a consistent indentation format.
  15. [*]#(sp,^)
  16. #(Fwhitespace,(
  17.     #(F:delete-horizontal-whitespace)
  18.     #(==,##(rc,$),0,,(
  19.         #(sp,^<^)
  20.         #(Fforward-skip-white,no)
  21.         #(ds,temp,#(Fcase,##(bc,##(rm,>)),
  22.             (##(bc,;),((    ))),
  23.             (13,((    ))),
  24.             (##(rm,^))
  25.         ))
  26.         #(sp,$)
  27.         #(==,##(rm,<),:,(#(ds,temp,(    ))))
  28.         #(sp,$>)
  29.         #(is,#(==,##(temp),,(    ),(##(temp))))
  30.     ))
  31. ),,nocrlf)
  32. #(Uasm-format-do)
  33. #(sp,$>)[*]
  34.  
  35.  
  36. Name:F:asm-mode
  37. [*]#(F:ASM-mode)[*]
  38.  
  39.  
  40. Name:Uasm-format-do
  41. [*]#(Fcase,##(bc,##(rm,>)),
  42.     (##(bc,"),),
  43.     (##(bc,'),),
  44.     (##(bc,;),),
  45.     (13,),
  46.     (
  47.         #(Fwhile-yes,(
  48.             #(Fwhitespace,,(
  49.                 #(sp,>)
  50.                 yes
  51.             ))
  52.         ))
  53.         #(==,##(rc,$),0,,(
  54.             #(F:delete-horizontal-whitespace)
  55.             #(==,##(rm,<),(,),,(
  56.                 #(is,(    ))
  57.             ))
  58.             #(SELF)
  59.         ))
  60.     )
  61. )[*]
  62.  
  63.  
  64. Name:U:masm
  65. [*]#(ds,masm-buffer,#(Fbuffer-fn))
  66. #(F:write-modified-files)
  67. #(Ffind-or-make-buffer,*masm*)
  68. #(ex,#(Fsearch-path,masm),#(masm-buffer);,,\pipe_out,\pipe_out)
  69. #(rf,\pipe_out)
  70. #(de,\pipe_out)
  71. #(ds,error-buffer,##(ba,-1))
  72. #(es,error-handler)
  73. #(ds,k,##(gs,Fredisplay-two))
  74. #(sv,ow,##(ba,-1))
  75. #(sp,[)
  76. #(..,##(ba,##(old-buffer)))
  77. #(Fenter-local-modes)
  78. [*]
  79.  
  80.  
  81. Name:U:ASM-colon
  82. Insert a colon, and delete the indentation iff it follows a label.
  83. [*]#(Fsave-excursion,(
  84.     #(sp,^)
  85.     #(Flooking-at,([ ##(bc,9,d,a)][ ##(bc,9,d,a)]*[a-zA-Z_][a-zA-Z_]*$),(
  86.         #(Ffind-non-blank,>,arg1)
  87.         #(dm,^)
  88.     ))
  89. ))
  90. #(is,:)[*]
  91.  
  92.  
  93. Name:U:ASM-comment
  94.   Introduce a comment or convert an already existing comment into a
  95. comment of a `bigger' kind.  These are the known comment classes:
  96.  
  97.     1-- to the right of the code (at the comment-column)
  98.     2-- comment on a own line, indented like code
  99.     3-- at the left-most column.
  100.  
  101. Suggested usage:  while writing your code, trigger asm-comment
  102. repeatedly until you are satisfied with the kind of comment.
  103. [*]#(Fand,(#(==,##(lv,cs),##(F-comment-column))),(#(==,##(rc,$),0)),(
  104.     #(is,##(F-left-comment))
  105. ),(
  106.     #(sp,^)
  107.     #(Flooking-at,.*#(Fregexp-quote,(##(F-left-comment))),(
  108.         #(sp,$)
  109.         #(pm,1)
  110.         #(lp,##(F-left-comment))
  111.         #(l?,.,^,0,,(#(sp,0)))
  112.         #(pm)
  113.         #(F:delete-horizontal-whitespace)
  114.         #(==,##(rc,^),0,(
  115.             #(sp,$)
  116.         ),(
  117.             #(Fcrlf)
  118.             #(Fpad-to-column,##(F-comment-column))
  119.         ))
  120.     ),(
  121.         #(F:indent-for-comment)
  122.     ))
  123. ))
  124. [*]
  125.  
  126.  
  127. Name:F:ASM-mode
  128. This will set the local mode to Assembly Language.
  129. [*]#(Fexit-mode)
  130. #(Flocal-bind-key,F-left-comment,;)
  131. #(Flocal-bind-key,F-right-comment,)
  132. #(Flocal-bind-key,K.M-C-i,U:asm-format)
  133. #(Flocal-bind-key,K.M-Tab,U:asm-format)
  134. #(Flocal-bind-key,staydown-hook,(
  135.     #(n?,UASM-staydown-do.ARG1,(
  136.         #(UASM-staydown-do.ARG1)
  137.     ),(
  138.         #(Fstaydown-do-do,ARG1)
  139.     ))
  140. ))
  141. #(mp,staydown-hook,,ARG1)
  142. #(Fset-modename,ASM)
  143. [*]
  144.  
  145.  
  146. Name:UASM-staydown-do.59
  147. [*]#(Fbackward-skip-white)
  148. #(Fstaydown-mark,$)[*]
  149.