home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / MISC / GNU / EMACSPAT.ZIP / TIMTEX.MIN < prev    next >
Encoding:
Internet Message Format  |  1990-04-10  |  4.2 KB

  1. From: Tim Hoverd <logcam!timh@relay.EU.net>
  2. Date: Tue, 10 Apr 90 08:24:06+010
  3. To: nelson@image.soe.clarkson.edu
  4. Subject: tex.min for Freemacs 1.6a
  5.  
  6. Russ,
  7.  
  8. Thanks for v 1.6a, which is great.  In case you haven't had time to do this
  9. yet, here is tex.min that I have hacked around for the new editor.  I've
  10. had to guess a bit as to what the autoload mechanism does, but it seems to
  11. work.
  12.  
  13. [ I hacked it to use T as the lib letter instead of Tim's choice of X.  I
  14. have reserved X for extensions to the lib letter scheme.  See libs.doc.
  15. -russ ]
  16.  
  17. Name:F:TeX-mode
  18. This will set the local mode to TeX-mode.  The code is contained in the
  19. T library.
  20. [*]#(T!TeX-mode)[*]
  21.  
  22.  
  23. Name:Tfilename
  24. [*]tex[*]
  25.  
  26.  
  27. Name:T!TeX-mode
  28. Sets up a mode for editing TeX documents.
  29. [*]#(Fexit-mode)
  30. #(ds,local-mode-changes,##(local-mode-changes)(
  31.     #(Fexit-minor-mode,Fill)
  32. ))
  33. #(Fenter-minor-mode,Fill)
  34. #(Flocal-bind-key,K.Return,F:newline-and-indent)
  35. #(Flocal-bind-key,K.C-j,F:newline-and-indent)
  36. #(Flocal-bind-key,K.Tab,T:Tab-under)
  37. #(Flocal-bind-key,K.M-i,T:Tab-across)
  38. #(Flocal-bind-key,K.S-Tab,T:Tab-across)
  39. #(Flocal-bind-key,K.M-[,T:emphasise)
  40. #(Flocal-bind-key,K.M-],T:close-LaTeX-environment)
  41. #(Flocal-bind-key,K.",T:TeX-double-quote)
  42. #(Flocal-bind-key,K.$,T:TeX-flash-$)
  43. #(Flocal-bind-key,K.C-c C-b,T:TeX-buffer)
  44. #(Flocal-bind-key,K.C-c C-v,T:TeX-view)
  45. #(Flocal-bind-key,F-left-comment,%)
  46. #(Flocal-bind-key,F-right-comment,)
  47. #(Fmodename,TeX)
  48. [*]
  49.  
  50.  
  51. Name:T-TeX-command
  52. The command used to run TeX.
  53. [*]c:\tex\latex[*]
  54.  
  55.  
  56. Name:T-TeX-directory
  57. The directory to do all TeX stuff in.
  58. [*]c:\tmp[*]
  59.  
  60.  
  61. Name:T-TeX-dvi-command
  62. Name of dvi-previewer.
  63. [*]c:\tex\view[*]
  64.  
  65.  
  66. Name:T:Tab-across
  67. Moves the current line across so that its beginning lines up with the next
  68. non-blank character on the previous line
  69. [*]
  70. #(pm,1)
  71. #(sp,^+)
  72. #(T:Tab-under)
  73. #(sp,0)
  74. #(pm)
  75. [*]
  76.  
  77.  
  78. Name:T:Tab-under
  79. Move across to position under next non-blank position in the previous line.
  80. If the current line is already longer than the previous one then 
  81. insert a simple tab character.
  82. [*]
  83. #(pm,1)
  84. #(F:previous-line)
  85. #(==,##(rm,$),,(
  86.     #(sp,0)
  87.     #(is,(    ))
  88.    ),(
  89.     #(sp,}+)
  90.     #(ds,temp,##(lv,cs))
  91.     #(sp,0)
  92.     #(g?,##(temp),##(lv,cs),(
  93.         #(is,#(Floop, ,##(--,##(temp),##(lv,cs))))
  94.         ),(
  95.         #(is,(    ))))
  96.     #(ds,column,##(lv,cs))))
  97. #(pm)
  98. [*]
  99.  
  100.  
  101. Name:T:TeX-buffer
  102. Run TeX on the current buffer.
  103. [*]
  104. #(Fsave-excursion,(
  105.     #(sp,[)
  106.     #(wf,#(T-TeX-directory)/$texfile.tex,])
  107.     #(ds,temp,#(lv,cd))
  108.     #(sv,cd,#(T-TeX-directory))
  109.     #(ex,#(env.COMSPEC),#(env.SWITCHAR)C #(T-TeX-command) $texfile.tex)
  110.     #(sv,cd,#(temp))
  111. ))
  112. [*]
  113.  
  114.  
  115. Name:T:TeX-double-quote
  116. Attempts to deduce whether the point is at the beginning of a word or the
  117. end, and inserts either `` or '' as appropriate.
  118. [*]
  119. #(ds,Ttemp,#(rm,<))
  120. #(Fcase,#(Ttemp),
  121.     ( ,(#(is,``))),
  122.     (,(#(is,``))),
  123.     (#(is,''))
  124. )
  125. [*]
  126.  
  127.  
  128. Name:T:TeX-flash-$
  129. Flash the nearest $ no farther away than the current paragraph.
  130. [*]
  131. #(an)
  132. #(pm,3)
  133. #(sm,0,<)
  134. #(is,$)
  135. #(lp,(
  136.  
  137. ))
  138. #(l?,.,[,,2,,(
  139.     #(sm,2,[)
  140. ))
  141. #(lp,$)
  142. #(l?,0,2,0,,(
  143.     #(sp,0)
  144.     #(rd)
  145.     #(n?,kbd-buffer,,(
  146.         #(ds,temp,#(it,100))
  147.         #(==,##(temp),Timeout,,(
  148.             #(Fkbd-in,##(temp))
  149.         ))
  150.     ))
  151.     #(sp,1)
  152.     ),(
  153.     #(an,Can't find a $ in this paragraph)))
  154. #(pm)
  155. [*]
  156.  
  157.  
  158. Name:T:TeX-indent
  159. Inserts the "standard" indentation used for TeX documents
  160. [*]#(is,  )[*]
  161.  
  162.  
  163. Name:T:TeX-view
  164. Use the TeX previewer to show the compiled file.
  165. [*]
  166. #(ex,#(env.COMSPEC),#(env.SWITCHAR)C #(T-TeX-dvi-command) #(T-TeX-directory)\$texfile)
  167. [*]
  168.  
  169.  
  170. Name:T:close-LaTeX-environment
  171. The current line has a \begin{} structure on it.  Insert the appropriate
  172. \end structure.
  173. [*]
  174. #(sp,$)
  175. #(==,##(rc,]),0,(
  176.     #(is,(
  177. ))
  178.     #(sp,^<^)
  179.     ),(
  180.     #(sp,^)))
  181. #(pm,3)
  182. #(lp,})#(l?,0,$,,1)
  183. #(ds,temp,##(rm,1))
  184. #(sp,$>)
  185. #(is,##(temp)(
  186. ))
  187. #(sp,^<^)
  188. #(sm,0)
  189. #(lp,begin)#(l?,0,$,1,2)
  190. #(sp,1)
  191. #(dm,2)
  192. #(is,end)
  193. #(sp,^)
  194. #(is,(
  195. ))
  196. #(sp,^<)
  197. #(T:Tab)
  198. #(T:TeX-indent)
  199. #(pm)
  200. [*]
  201.  
  202.  
  203. Name:T:emphasise
  204. [*]#(Frun-kbd-macro,{<>\<>e<>m<> <>\<>/<>}<>C-b<>C-b<>C-b<>)[*]
  205.  
  206. Name:T:Tab
  207. Insert the same whitespace as on the previous line.
  208. [*]#(pm,1)
  209. #(sp,^<^)
  210. #(==,##(rc,[),0,,(
  211.     #(Fnewline-and-indent-do)
  212.     #(ds,temp,##(rm,^))
  213.     #(sp,$>)
  214.     #(is,##(temp))
  215. ))
  216. #(sp,0)
  217. #(pm)
  218. [*]
  219.  
  220. Name:Fautoload-T
  221. [*]tex[*]
  222.  
  223.