<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Sun, 08 Dec 1985 00:04:06 GMT
From   : Stanley Dunn <smd%umcp-cs.uucp@BRL.ARPA>
Subject: Emacs Setup file for the MIX Editor

My apologies for being so late with this, but finally
I have posted my Emacs setup file for the MIX Editor.

This setup is by no means perfect, and I am sure many of you
will have better ideas on how I did some of the conversions.
If you do make changes, I would like to know so that my 
setup can be updated.

My wish list --

1. You still have to type the file name to exit MIX (^X ^F),
since I did not modify the editor to use a variable
to keep the file name.

2. I would like to fix delete line (^K) but too many troubles
with the MIX =JL command. Any ideas?

3. Blank compression is still a problem.  I have turned it 
off in this setup.

Enjoy, and keep me informed.  Thanks.

-- Stanley Dunn
Univ. of Md. Dept. of Computer Science

Here it is --
;
INIT "^GLoading   EMACS setup file ..."      ;send message to terminal
;
; Terminal Characteristics for the Morrow MT-70        (ADM 31)
;
TERMINAL CLEAR   '^[*'
TERMINAL CLREOS          '^[Y'
TERMINAL CLREOL          '^[T'
TERMINAL INSLINE  '^[E'
TERMINAL DELLINE  '^[R'
TERMINAL DELCHAR  '^[W'
TERMINAL INSONE          '^[Q'
TERMINAL CURSOR          '^[='
TERMINAL SCROLL          '^J'
TERMINAL RSCROLL  '^[E^K'
CURSOR  ROWCOL
HEIGHT        24
WIDTH         80
;
TRANSKEY "^H" "=RU"                     ;Make Back Space delete
;
;     Attempt to define        equivalent EMACS commands.
;     Stanley Dunn, August 10, 1985.
;
TRANSKEY "^[x" "=CM"                    ;Command Mode (^[ is ESC key)
TRANSKEY "^[u" "^u"                     ;Help escape character
;
TRANSKEY "^n" "=LD"                     ;Line down
TRANSKEY "^p" "=LU"                     ;Line up
TRANSKEY "^v" "=SD"                     ;Screen down
TRANSKEY "^[v" "=SU"                    ;Screen up
TRANSKEY "^a" "=LB"                     ;Line beginning
TRANSKEY "^e" "=LE"                     ;Line end
TRANSKEY "^f" "=CR"                     ;Character right
TRANSKEY "^[f" "=WR"                    ;Word right
TRANSKEY "^b" "=CL"                     ;Character left
TRANSKEY "^[b" "=WL"                    ;Word left
TRANSKEY "^o" "=OL"                     ;Open line
;
MACKEY "^[<"  "=GO1=NL"              ;Go to top of file
MACKEY "^[>" "=GO-1=NL=SU"           ;Go to bottom of file, up 1 screen
;
TRANSKEY "^d" "=DC"                     ;Delete character
TRANSKEY "^[d" "=DW"                    ;Delete word
;
; Because of the problem with using the        =JL
; function in MIX, the EMACS ^k        function is altered.
; In EMACS, ^k deletes to end of line, and hitting
; ^k a second time will        delete the line break.
; If 2 windows are open        in MIX, doing a =JL to
; delete the line break        will scroll EVERYTHING up,
; including the        second window!
;
; More often than not an entire        line will be deleted, so
; ^k is        made to delete the line, and esc-k is made to
; delete to end, if it is absolutely needed.
;
TRANSKEY "^k" "=DL"                     ;Delete an entire line
TRANSKEY "^[k" "=DE"                    ;Delete to end if needed (watch out!)
;
TRANSKEY "^s" "=FS"                     ;Find string
;
; Macro        to get parameters for the replacing functions.
; This uses variables 0        and 1.
;
MACNAME        "M1" "=GV0=NL'Replace:'=NL=GV1=NL'With:'=NL"
MACKEY "^[q" "=CMM1=NL=QR=0=NL=1=NL=PP"    ;Query replace, then go back
MACKEY "^[r" "=CMM1=NL=RG=0=NL=1=NL=PP"    ;Global replace, then go back
;
; Set mark in Emacs is a ^@ which does not seem        to work
; in the Mix Editor, so        I used ^x<sp> instead.
;
TRANSKEY "^x " "=XB"                    ;Mark the beginning of a block
MACKEY "^w" "=XE=OB=DB"                 ;Mark the end, and output
;
; In Emacs, ^y is an undo for the delete buffer
; which        can contain single lines.
; This ^y will only undelete marked buffers.
;
TRANSKEY "^y" "=IB"                     ;Restore the block
;
TRANSKEY "^x^s"      "=SA"              ;Write file, continue editing
TRANSKEY "^x^f"      "=EX"              ;Really exit
;
; Macro        to read filename for opening a second window.
; uses variable        2, so as not to conflict with the
; search and replace variables 0 and 1.
;
MACNAME        "M2" "=GV2=NL'Visit file:'=NL"
MACKEY "^x^v" "=CMM2=NL=SS12=NL=NL=OW=ED=2=NL"        ;Open new window with file
;
; This will only work if one window is open.
; In Emacs both        windows are closed, and the
; the editor exits.
;
MACKEY "^c" "=QTY=NL"                   ;Abort (I think this is correct)
;
TRANSKEY "^u" "=RP"                     ;Repeat a command
;
MACKEY "^x2" "=SS12=NL=NL"      ;Open an empty second window
TRANSKEY "^xp" "=OW"                    ;Dummy these for the time being
TRANSKEY "^xn" "=OW"                    ;They should go up and down
;
; Initial commands:
;   - set tabs stops at        8
;   - turn off auto indent
;   - set cursor to beginning of line
;
START "=TB8=NL=AI=LB"
;
; Leaving Editor:
;   - ring bell
;   - clear screen
;
EXIT "^G^Z"                       ;send message to terminal
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>