[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

zmacs mode, incremental compilation



    Date: Wed, 22 Jun 88 09:58:02 EDT
    From: schabes@linc.cis.upenn.edu (Yves Schabes)

     I am trying to define a zmacs mode in which I would like to
    use a special purpose incremental compilation.

    I would appreciate any help on:
     - the definition of a zmacs mode
Look at the definition of, say, Lisp-mode (m-. around; look at
zwei:com-lisp-mode and zwei:lisp-mode).

     - the use of bp in zmacs

>From your description this is probably not what you want.  A word of
caution when dealing with BP's: OBEY ABSTRACTION!  BP's maintain a lot
of state; as long as you modify them with the bp primitives and not with
aref et al you should not get an inconsistent buffer.

     - how to grab a region from zmacs
     - how to find the current definition in zmacs

If you define a language mode the the language-specific commands should
follow automatically.  That is, the sectioniser asks the language how to
sectionise; the compile commands ask the mode which compiler to use and
call it on sections returned by the sectioniser or the region.  So you
see you don't need to worry about those particular details, but just on
how to parse your own language.

I would suggest starting from and building upon existing language
definitions wherever possible.  Since modes are flavors you can build a
specialised flavor if you can get away with that and inherit a lot of
another existing mode.

Good luck.  It's not as hard as it sounds from this description.