home *** CD-ROM | disk | FTP | other *** search
- From: Tim Hoverd <logcam!timh@relay.EU.net>
- Date: Tue, 10 Apr 90 08:24:06+010
- To: nelson@image.soe.clarkson.edu
- Subject: tex.min for Freemacs 1.6a
-
- Russ,
-
- Thanks for v 1.6a, which is great. In case you haven't had time to do this
- yet, here is tex.min that I have hacked around for the new editor. I've
- had to guess a bit as to what the autoload mechanism does, but it seems to
- work.
-
- [ I hacked it to use T as the lib letter instead of Tim's choice of X. I
- have reserved X for extensions to the lib letter scheme. See libs.doc.
- -russ ]
-
- Name:F:TeX-mode
- This will set the local mode to TeX-mode. The code is contained in the
- T library.
- [*]#(T!TeX-mode)[*]
-
-
- Name:Tfilename
- [*]tex[*]
-
-
- Name:T!TeX-mode
- Sets up a mode for editing TeX documents.
- [*]#(Fexit-mode)
- #(ds,local-mode-changes,##(local-mode-changes)(
- #(Fexit-minor-mode,Fill)
- ))
- #(Fenter-minor-mode,Fill)
- #(Flocal-bind-key,K.Return,F:newline-and-indent)
- #(Flocal-bind-key,K.C-j,F:newline-and-indent)
- #(Flocal-bind-key,K.Tab,T:Tab-under)
- #(Flocal-bind-key,K.M-i,T:Tab-across)
- #(Flocal-bind-key,K.S-Tab,T:Tab-across)
- #(Flocal-bind-key,K.M-[,T:emphasise)
- #(Flocal-bind-key,K.M-],T:close-LaTeX-environment)
- #(Flocal-bind-key,K.",T:TeX-double-quote)
- #(Flocal-bind-key,K.$,T:TeX-flash-$)
- #(Flocal-bind-key,K.C-c C-b,T:TeX-buffer)
- #(Flocal-bind-key,K.C-c C-v,T:TeX-view)
- #(Flocal-bind-key,F-left-comment,%)
- #(Flocal-bind-key,F-right-comment,)
- #(Fmodename,TeX)
- [*]
-
-
- Name:T-TeX-command
- The command used to run TeX.
- [*]c:\tex\latex[*]
-
-
- Name:T-TeX-directory
- The directory to do all TeX stuff in.
- [*]c:\tmp[*]
-
-
- Name:T-TeX-dvi-command
- Name of dvi-previewer.
- [*]c:\tex\view[*]
-
-
- Name:T:Tab-across
- Moves the current line across so that its beginning lines up with the next
- non-blank character on the previous line
- [*]
- #(pm,1)
- #(sp,^+)
- #(T:Tab-under)
- #(sp,0)
- #(pm)
- [*]
-
-
- Name:T:Tab-under
- Move across to position under next non-blank position in the previous line.
- If the current line is already longer than the previous one then
- insert a simple tab character.
- [*]
- #(pm,1)
- #(F:previous-line)
- #(==,##(rm,$),,(
- #(sp,0)
- #(is,( ))
- ),(
- #(sp,}+)
- #(ds,temp,##(lv,cs))
- #(sp,0)
- #(g?,##(temp),##(lv,cs),(
- #(is,#(Floop, ,##(--,##(temp),##(lv,cs))))
- ),(
- #(is,( ))))
- #(ds,column,##(lv,cs))))
- #(pm)
- [*]
-
-
- Name:T:TeX-buffer
- Run TeX on the current buffer.
- [*]
- #(Fsave-excursion,(
- #(sp,[)
- #(wf,#(T-TeX-directory)/$texfile.tex,])
- #(ds,temp,#(lv,cd))
- #(sv,cd,#(T-TeX-directory))
- #(ex,#(env.COMSPEC),#(env.SWITCHAR)C #(T-TeX-command) $texfile.tex)
- #(sv,cd,#(temp))
- ))
- [*]
-
-
- Name:T:TeX-double-quote
- Attempts to deduce whether the point is at the beginning of a word or the
- end, and inserts either `` or '' as appropriate.
- [*]
- #(ds,Ttemp,#(rm,<))
- #(Fcase,#(Ttemp),
- ( ,(#(is,``))),
- (,(#(is,``))),
- (#(is,''))
- )
- [*]
-
-
- Name:T:TeX-flash-$
- Flash the nearest $ no farther away than the current paragraph.
- [*]
- #(an)
- #(pm,3)
- #(sm,0,<)
- #(is,$)
- #(lp,(
-
- ))
- #(l?,.,[,,2,,(
- #(sm,2,[)
- ))
- #(lp,$)
- #(l?,0,2,0,,(
- #(sp,0)
- #(rd)
- #(n?,kbd-buffer,,(
- #(ds,temp,#(it,100))
- #(==,##(temp),Timeout,,(
- #(Fkbd-in,##(temp))
- ))
- ))
- #(sp,1)
- ),(
- #(an,Can't find a $ in this paragraph)))
- #(pm)
- [*]
-
-
- Name:T:TeX-indent
- Inserts the "standard" indentation used for TeX documents
- [*]#(is, )[*]
-
-
- Name:T:TeX-view
- Use the TeX previewer to show the compiled file.
- [*]
- #(ex,#(env.COMSPEC),#(env.SWITCHAR)C #(T-TeX-dvi-command) #(T-TeX-directory)\$texfile)
- [*]
-
-
- Name:T:close-LaTeX-environment
- The current line has a \begin{} structure on it. Insert the appropriate
- \end structure.
- [*]
- #(sp,$)
- #(==,##(rc,]),0,(
- #(is,(
- ))
- #(sp,^<^)
- ),(
- #(sp,^)))
- #(pm,3)
- #(lp,})#(l?,0,$,,1)
- #(ds,temp,##(rm,1))
- #(sp,$>)
- #(is,##(temp)(
- ))
- #(sp,^<^)
- #(sm,0)
- #(lp,begin)#(l?,0,$,1,2)
- #(sp,1)
- #(dm,2)
- #(is,end)
- #(sp,^)
- #(is,(
- ))
- #(sp,^<)
- #(T:Tab)
- #(T:TeX-indent)
- #(pm)
- [*]
-
-
- Name:T:emphasise
- [*]#(Frun-kbd-macro,{<>\<>e<>m<> <>\<>/<>}<>C-b<>C-b<>C-b<>)[*]
-
- Name:T:Tab
- Insert the same whitespace as on the previous line.
- [*]#(pm,1)
- #(sp,^<^)
- #(==,##(rc,[),0,,(
- #(Fnewline-and-indent-do)
- #(ds,temp,##(rm,^))
- #(sp,$>)
- #(is,##(temp))
- ))
- #(sp,0)
- #(pm)
- [*]
-
- Name:Fautoload-T
- [*]tex[*]
-
-