home *** CD-ROM | disk | FTP | other *** search
/ Mega CD-ROM 1 / megacd_rom_1.zip / megacd_rom_1 / FREEMACS / EMACS16A.ZIP / QUICK.REF < prev    next >
Text File  |  1990-03-05  |  13KB  |  309 lines

  1.  
  2.  
  3.     Enclosed is a 5 page MINT reference card that I put together.. thought
  4.     you might like it.
  5.  
  6. ___________________________________________________________________________
  7. dave    ENET:    CHILD::WECKER - DTN: 522_3873 - MS: CXO1-2/N22
  8.     USENET:    decwrl!child.dec.com!wecker
  9.     ARPA:    wecker%child.dec.com@decwrl.dec.com
  10.     SNAIL:    115 Palm Springs Drive, Colorado Springs CO 80921
  11. ___________________________________________________________________________
  12.  
  13.  
  14. [Brought up to date by Russell Nelson]
  15.  
  16.  
  17.  
  18. Return    prototype        function            Title
  19. ------    ------------------- ---------------------------    ----------------------
  20. mod    #(%%,A,B)        A % B            "Modulo"
  21. and    #(&&,A,B)        A & B            "And"
  22. mul    #(**,A,B)        A * B            "Multiply"
  23. sum    #(++,A,B)        A + B            "Add"
  24. sub    #(--,A,B)        A - B            "Subtract"
  25. div    #(//,A,B)        A / B            "Divide"
  26. str    #(==,A,B,T,F)        A==B ? T : F        "String Equality"
  27. xor    #(^^,A,B)        A ^ B            "Exclusive-Or"
  28. N    #(N,A1,A2,...)        N <- params            "Default"
  29. Y/N    #(a?,A,B,Y,N)        A<B (alphabetically)    "Alphabetic?"
  30.     #(an,L,F,R)        show L,R at bot (F)win:scrn    "Announce"
  31. buf#    #(ba,N)            N: 0=new +=specific -=cur    "Buffer Allocate"
  32. chr    #(bc,V,F,T)        convert V using From,To    "Base Conversion"
  33.     #(bi,N,M,E)        buf[N] = text upto mark M    "Buffer Insert"
  34.     #(bl,P,D)           bell P=divisor, D=duration  "Bell"
  35. time    #(ct,F)            (F)?file time:cur time    "C Time"
  36.     #(db)            does interrupt 3        "Debug"
  37.     #(de,N)            delete file N        "Delete File"
  38.     #(dm,M)            delete region        "Delete to Mark"
  39.     #(ds,N,B)         N = B             "Define String"
  40.     #(es,N1,N2,...)        free all Ns            "Erase String"
  41.     #(ev)            read MS-DOS into env.NAME    "Environment"
  42.     #(ex,F,A,I,O,E)        prog=F args=A I=inp O=out    "Execute Program"
  43. list    #(ff,N,S)        dir of N, seperator=S    "Find Files"
  44. left    #(fm,N,X,Z)        N=right of match X or Z    "First Match"
  45. str    #(g?,A,B,T,F)        A>B ? T : F            "Arithmetic Greater"
  46. substr    #(gn,N,D,Z)        N+=D or Z            "Get N (characters)"
  47. char    #(go,N,Z)        N++ or Z            "Get One (character)"
  48. N    #(gs,N,A1,A2,...)   N <- params            "Get String"
  49.     #(hl,N)            exit return code N        "Halt"
  50.     #(is,S,E)        insert S at point        "Insert String"
  51. key    #(it,T)            get input in T hundreths    "Input Timed"
  52. Y/N    #(l?,S,E,F,L,Y,N)   between Start-End mark F,L    "Look&Test"
  53.     #(ll,A)            read .ed file A        "Load Library"
  54.     #(lp,S,N,R,F)        set pat to S, R=re? F=fold?    "Look Pattern"
  55. lst    #(ls,S,P)        prefix P, seperator S    "List Strings"
  56. var    #(lv,F)            (see table)            "Load Variable"
  57. Y/N    #(mb,M,Y,N)        if M before .        "Mark Before"
  58.     #(mp,N,P1,P2,...)   N <- param markers        "Make Parameter"
  59. Y/N    #(n?,F,Y,N)        Is there a string F        "Name exists?"
  60. num    #(nc,A)            char count of A        "Number of Characters"
  61.     #(ow,S)            write on screen        "Over Write"
  62.     #(pm,S,E)        S: 0:pop -:global +:local    "Push/Pop Mark"
  63. x,y    #(pp)            mouse position        "Pick Position"
  64. num    #(rc,M)            size of region        "Read Count"
  65.     #(rd,F)            F != NULL -> FULL redraw    "Redisplay"
  66.     #(rf,N)            read file N at dot        "Read File"
  67. str    #(rm,M,V)        get region            "Read Mark"
  68.     #(rn,O,N)        O becomes N            "Rename file"
  69.     #(rs,N)            N=0                "Restore String"
  70. lst    #(sa,A,B,C,...)        sorted with commas between    "Sort Ascending"
  71. num    #(sc,W,F)        W=word F=function        "Spell Check"
  72. Cth chr    #(si,N,C)        Cth chr of N        "String Index"
  73.     #(sl,A,F1,F2,...)   write .ed file A        "Save Library"
  74.     #(sm,M,V)        Mark M = Mark V (or .)    "Set Mark"
  75.     #(sp,M)            . = M            "Set Point"
  76.     #(st,S)            256 chars 0=blank 1=!blank    "Syntax Table"
  77.     #(sv,F,V)        (see table)            "Store Variable"
  78.     #(tr,M,S)        tran frm point to M using S "Translate to Mark"
  79.     #(wf,N,M)        write file N between .-M    "Write File"
  80.     #(xy,X,Y)        position cursor on screen    "X Y"
  81. or    #(||,A,B)        A | B            "Or"
  82.  
  83.     #(buffer-fn.B)         get the filename for a buffer        Files
  84.     ##(Lfilename)        filename for library L            Libs
  85.     ##(lib-list)        all loaded libraries
  86.     ##(lib-name)        current library
  87.     #(Fload-lib,FILE)   load library
  88.     #(Fsave-lib,FILE)   save library
  89.     #(F:save-all-libs)  save everybody
  90.     #(L&setup)        executed when lib L is loaded
  91.     ##(Lmodified)        exists of lib L was modified
  92.     ##(buffer-mode.B)   mode for buffer number B            Buffers
  93.     ##(buffer-type.B)   type of buffer number B
  94.     ##(buffer-filename.B) filename of buffer B
  95.     #(Ffor-all-buffers,S) execute S in all buffers
  96.     #(Fbuffer-modified,Y,N) does Y if modified else N
  97.     #(Fsave-buffer-if-modified) saves into ##(buffer-filename).tmp
  98.     #(Fok-to-trash-buffer,F) does F if user says OK
  99.     #(Ftrash-buffer)    allow user to save a buffer            Strings
  100.     #(M:ef,S)        edit a string
  101.     #(M:give-name,S)    create a new string
  102.     #(M:done-editing)   defines the new strings
  103.     #(Fself-insert)        default key binding
  104.     #(K.KEY)        binding for key KEY
  105.     #(F:bind-to-key,F,K) binds Function to Key
  106.     #(F:unbind-key)        will prompt for key to delete
  107.     #(M:keys-edit)        creates a buffer to edit all keys
  108.     #(M:keys-read)        reads the edit buffer back into keys
  109.     ##(Fmark)        current mark                Marks
  110.     #(Fset-new-mark,M)  add mark to 16 mark ring
  111.     #(F:swap-point-and-mark) does the usual
  112.     #(Freadline,PROMPT,ACTION,HELP,MODE)                Input
  113.     ##(value)        initial value for Freadline
  114.     #(Floop,V,X)        rescans Value Count times            Programs
  115.     #(..,F)            executes F and discards the value
  116.     #(Fhead,R)        get head of ring R                Rings
  117.     ##(R.head)        name of ring head string
  118.     ##(R.size)        ring size
  119.     #(Frotate,R)        rotates a ring
  120.     #(Funrotate,R)        unrotates a ring
  121.     #(Fring,R,S)        make new ring R of size S
  122.     #(F:un-kill)        pull head string off of ring        Kill
  123.     #(Fkill,M)        if ##(result)==kill append kill
  124.     #(Fbackward-kill,M) kill from M to . (preserving order)
  125.     #(Fredefine,S,V)    String is pushed and set to Val        Stacks
  126.     #(Funredefine,S)    String is popped
  127.     #(Fmax,A,B)        Numerical maximum                Misc
  128.     #(Fisupper,C,Y,N)   test C and exec Y or N
  129.     #(Fpad-to-column,C) adds tabs and spaces
  130.     #(Fyes-or-no,,Y,N)  wait for yes or no to be typed
  131.     #(Ferror,E)        reports E if it is not null
  132.     ##(F-fill-column)   used by #(Fformat-paragraph)
  133.     ##(F-comment-column) where comments should be aligned to
  134.     #(Fmultiple,S,L)    execute String on List elems (sep = ,)
  135.     #(Fcase,A,(V1,S1),(V2,S2)...) case statement (A == Vn)
  136.  
  137. Basic strings:
  138.  
  139.     ()            protected string
  140.     #()            active function    
  141.     ##()            neutral function
  142.     #(d,KEY)        process KEY
  143.     #(g)            waits for a KEY and returns it
  144.     #(k)            redisplay screen and modeline
  145.  
  146. The scanning algorithm:
  147.  
  148.     1. neutral = "" active = "#(d,#(g))" ptr = beginning of active
  149.     2. if (none active) goto 1
  150.     3. if (cr,lf,ht) delete it and goto 2
  151.     4. if ("(") scan to matching ")" and move contents to neutral goto 2
  152.     5. if (",") mark end of neutral as end of arg, del(,), goto 2
  153.     6. if ("#(") mark end of neutral as arg and active, del("#(") goto 2
  154.     7. if ("##(") mark end of neutral as arg and neutral, del("##(") goto 2
  155.     8. if ("#") move it to end of neutral, goto 2.
  156.     9. if (")") mark end of netural as end fnc,arg. execute last fnc in
  157.         neutral. Put result in neutral or active (depending on fnc type).
  158.         if break-key is down, input it and goto 1. else goto 2.
  159.     10. Move char from active to neutral, goto 2
  160.  
  161. Names of Marks:
  162.  
  163.     Character    Meaning
  164.     ___________    _______
  165.     @ through Z    Global user marks
  166.     0 through 9    Local user marks.
  167.     <        The character to the left of the point.
  168.     >        The character to the right of the point.
  169.     {        The first blank character to the left of the point.
  170.     }        The first blank character to the right of the point.
  171.     -        The first non-blank character to the left of the point.
  172.     +        The first non-blank character to the right of the point.
  173.     [        The beginning of the file.
  174.     ]        The end of the file.
  175.     ^        The beginning of this line.
  176.     $        The end of this line.
  177.     .        The point.
  178.  
  179.  
  180. Guidlines for announce #(an) strings:
  181.     ...    wait for operation to complete
  182.     ?    enter one character (y/n)
  183.     !    error
  184.     :    enter return terminated string
  185.         anything else is advisory and is ignorable
  186.  
  187. Load variable #(lv) values:
  188.      F            Value returned
  189.      --------------------    --------------
  190.      as (Auto Save)        Auto save counter (0..65535)
  191.      bc (Background Color)    Background color (0..7), initially 0
  192.      bl (Bottom Line)    bottom line of current window (1..23)
  193.      bo (Background Origin)    Background color (0..7), originally
  194.      bs (Bot Scroll)    percentage of bot screen that scrolls (0..100)
  195.      cl (Current Line)    number of current line (1..32767)
  196.      cn (Computer Name)    currently, either 'IBM-PC' or 'Z-100'.
  197.      cs (Column on Screen)    column on screen (1..32767)
  198.      cw (Current Window)    window currently in use (1..2)
  199.      fc (Foreground Color)    Foreground color (0..15), initially 7
  200.      fo (Foreground Origin)    Foreground color (0..15), originally
  201.      im (Inverse Mark)    Mark that is showing inverse video.
  202.      is (Inhibit Snow)    inhibit snow on CGA (0..1)
  203.      lc (Left Column)    Left Column on screen (1..)
  204.      mb (Modified Buffer)    flag, zero if buffer not modified (0..2)
  205.      nl (Number of Lines)    number of lines (1..32767) 
  206.      ow (Other Window)    buffer being displayed in "other" window (0..)
  207.      pb (Percentage Before)    Percentage of text buffer before point. (0..100)
  208.      rs (Row on Screen)    row on screen (-32768..32767)
  209.      tc (Tab Columns)    number of columns per tab (2,4,8,16)
  210.      tl (Top Line)        top line of current window (1..23)
  211.      ts (Top Scroll)    percentage of top screen that scrolls (0..100)
  212.      vn (Version Number)    current version number.
  213.      wp (Window Percent)    percent of screen allocated to the top window
  214.      ws (Whitespace Showing)redisplay shows whitespace (0..1)
  215.      none of the above    number of current line (1..32767)
  216.  
  217. Set variable #(sv) values:
  218.      F            Value set
  219.      --------------------    --------------
  220.      as (Auto Save)        Auto save counter (0..65535)
  221.      bc (Background Color)    Background color (0..7) initially 0
  222.      bl (Bottom Line)    bottom line of current window (1..23)
  223.      bs (Bot Scroll)    percentage of bot screen that scrolls (0..100)
  224.      cl (Current Line)    number of current line (1..32767)
  225.      cs (Column on Screen)    the point is moved to column on screen (1..32767)
  226.      cw (Current Window)    window currently in use (1..2)
  227.      fc (Foreground Color)    Foreground color (0..15) initially 7
  228.      im (Inverse Mark)    Mark to inverse video to.
  229.      is (Inhibit Snow)    inhibit snow on CGA (0..1)
  230.      lc (Left Column)    Left Column on screen (1..)
  231.      mb (Modified Buffer)    flag, zero if buffer not modified (0..2)
  232.      ow (Other Window)    buffer being displayed in "other" window (0..)
  233.      rs (Row on Screen)    moves the cursor to the    Vth row on screen (1..)
  234.      tc (Tab Columns)    number of columns per tab (2,4,8,16)
  235.      tl (Top Line)        top line of current window (1..23)
  236.      ts (Top Scroll)    percentage of top screen that scrolls (0..100)
  237.      wp (Window Percent)    percent of screen allocated to the top window
  238.      ws (Whitespace Showing)redisplay shows whitespace (0..1)
  239.      none of the above    number of current line (1..32767)
  240.  
  241.  
  242. Regular expression characters:
  243.  
  244.     \    causes the following character to have no special meaning.
  245.     ^    matches the beginning of a line.
  246.     $    matches the end of a line.
  247.     .    matches any single character.
  248.     [,;]    matches , or ; (for instance).
  249.     [a-z]    matches a-z (for instance).
  250.     [~a-z]    matches anything but a-z (for instance).
  251.     *    causes the previous character to be matched zero or more times.
  252.  
  253. Timed input return values:
  254.  
  255.     Timeout no input was typed
  256.     C-@    Control-@
  257.     C-A    Control-A
  258.     ...    The rest of the control characters are fashioned similarly.
  259.     C-_    Control-_
  260.          Space (a single space)
  261.     !    Bang
  262.     ...    The rest of the printables just return themselves
  263.     Delete
  264.  
  265. Key Names:
  266.  
  267.     BackSpace    Ins        Up Arrow        Home
  268.     Tab        Del        Down Arrow        End
  269.     Return        I Chr        Right Arrow        Pg Up
  270.     Escape        D Chr        Left Arrow        Pg Dn
  271.     Enter        Ins Line    Break
  272.     Help        Del Line    Sys Req
  273.     F0,F1,F2,F3...    KP+,KP-,KP. KP0,KP1,KP2,KP3,KP4,KP5,KP6,KP7,KP8,KP9
  274.     Left Down    Left Up        Right Down
  275.     Right Up    Middle Down Middle Up
  276.  
  277. Base Conversion:
  278.  
  279.       Character    Meaning
  280.        a or A    ASCII character.
  281.        d or D    decimal number.
  282.        h or H    hexadecimal number.
  283.        o or O    octal number.
  284.        b or B    binary number.
  285.  
  286. Spell Function codes:
  287.  
  288.     0 will spell check the word given in W.
  289.     1 will add a word given in W to the dictionary.
  290.     2 will return the number of words, or an error code as given below.
  291.     3 will write the speller to the file given in W.
  292.     4 will empty the dictionary.
  293.     5 will return the maximum number of words in the dictionary.
  294.  
  295. Spell Returns:
  296.  
  297.      0 No error (function code 2: zero words in dictionary).
  298.     -1 Speller not installed.
  299.     -2 illegal function call was made
  300.     -3 word was mis-spelled
  301.     -4 word too long to add to dict / spell check
  302.     -5 dictionary is full!
  303.     -6 disk full, speller not saved
  304.  
  305.  
  306.  
  307.  
  308.  
  309.