home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 June
/
SIMTEL_0692.cdr
/
msdos
/
editor
/
me_cd.arc
/
MEMUTT.DOC
< prev
next >
Wrap
Lisp/Scheme
|
1988-10-11
|
30KB
|
635 lines
========================================================================
== The ME Mutt Connection Craig Durland 8/88 ==
========================================================================
This document describes the link between the Mutt programming langauge
(see MUTT.DOC) and the Mutt Editor (see ME.DOC).
========================================================================
== The ME Mutt functions ==
========================================================================
(append-to-register n [text]) [NUMBER [STRING] : VOID]
Append text or region to register n.
Register 0 is the kill buffer. Registers 1,2,3,4 are general purpose.
For example:
If the region contains "This is a test" then
(clear-register 0)
(append-to-register 0) (append-to-register 0 " foo bar")
will set the kill buffer to "This is is a test foo bar".
Note: appending to a register that contains a rectangle does nothing.
See also: clear-register, copy-rectangle, insert-register, the kill
buffer commmands in ME.DOC.
(arg-flag) [zip : BOOLEAN]
Check to see if somebody set the arg-prefix before calling this
routine (via (universal-argument) or (arg-prefix n)).
See also: arg-prefix.
(arg-prefix [arg]) [[NUMBER] : NUMBER]
Get or set the universal-argument.
With an arg, its the same as ^U before a function.
Notes:
The arg-flag is set to TRUE.
This really sets two prefixes: one for ME commands and one for
Mutt pgms. ME commands and exe-key use and reset the prefix to
1. Pgms can only read the prefix and so it will stay the same
for all children of a pgm unless it is changed by (arg-prefix
n). If it is changed, all the children AND parents will see the
new value. It is a good idea to make a copy of the value upon
entry to a pgm if it is possible that a child will do a
(arg-prefix n).
If prefix is not set, it is always 1 (and the arg-flag is FALSE)
when a pgm or ME command is run from the keyboard.
Note that there is a difference between (arg-prefix 1) and the default.
eg (arg-prefix 1)(delete-char) puts the deleted character into the kill
buffer but (delete-char) does not.
For example, to make META-n start the (universal-argument) count at n,
use the following (where n is 1,2,3,4,5,6,7,8 or 9):
(defun
META-arg { (arg-prefix (- (key-pressed) 0x230))(universal-argument) }
MAIN
{
(int j)
(for (j 1)(< j 10)(+= j 1)
(bind-to-key (concat "META-arg")(concat "M-" j)))
}
)
See also: (arg-flag), (universal-argument) in ME.DOC.
(argc) [zip : NUMBER]
The number of parameters on the command line when ME was invoked +1.
eg "ME foo bar" has argc == 3.
Use argv to look at the parameters.
(argv) [NUMBER : STRING]
The ME command line parameters. There are argc of them, numbering
0...argc-1. (argv 0) is the name of the program (ME) (unless you are
running on MS-DOS 2.x where it is ""), (argv 1) is the first file name
(which is loaded by ME), (argv 2) is the next file name, etc.
For example:
; sequentially load the files specified on the command line
(int nth-file) ; file to load next (a global var initialized to 0)
(defun next-file
{
(if (== 0 nth-file)(nth-file 2)) ; already loaded first file
(if (< nth-file (argc))
{ (visit-file (argv nth-file))(+= nth-file 1) }
(msg "All files read in.")
)
})
(attached-buffer n | name) [NUMBER|STRING : NUMBER]
If given a number, attached-buffer returns the buffer that is attached
to window n. n==-1 means use the current window.
If given a name, attached-buffer returns the buffer that is named
name. Returns -1 if there if the buffer does not exist.
For example:
if the third window is displaying buffer "foobar" and foobar is
the second buffer then:
(attached-buffer -1) and (attached-buffer 2) both return 1.
(attached-buffer "foobar") returns 1.
(attached-buffer "FOOBAR") returns -1.
See also: buffers, windows.
(buffer-created-hook) [zip : zip]
This is called when a buffer is created and allows a pgm to set up
a buffer.
Note: You defun this pgm.
WARNING: This can give ME a headache. Don't do anything fancy (like
switching buffers, inserting, etc). Not even I know for sure what
is safe here.
BUGS: Does not get called on first file on command line.
eg me foo.bar - buffer-created-hook not called on foo.bar but
is called there after (assuming it is defuned in init.mut).
The elsleazo workaround is to put (buffer-created-hook) at the end
of init.mut (ie after the hook has been defuned).
See also: buffer-var, init.mut (an example of how to use
buffer-created-hook to set modes based on file name extension).
(buffer-flags n [x]) [NUMBER [NUMBER] : NUMBER]
Get or set the buffer flags. There are 8 flags represented by the
lower 8 bits of x.
Bit Flag
0x01 Modified. 1 if the buffer has been modified since last save.
0x02 NoCare. Don't care about buffer contents.
0x04 Hidden. Buffer is hidden from user.
The other bits are not used (currently) and may be used by pgms.
Notes:
The Modified flag reports the same info that buffer-modified does.
If you want to mark a buffer as not modified it is better to use
not-modified or buffer-modified because buffer-flags will not
update the modeline if the buffer is being displayed.
The NoCare flag is used whenever ME wants exit or change a buffer -
it is set, ME will not ask before changes are made.
A buffer with the Hidden flag set is invisible to the user -
(next-buffer) skips it, the help and command completion routines
ignore it.
ME only changes the Modified flag.
See also: buffer-modified, buffers.
(buffer-modified n [bool]) [NUMBER [BOOLEAN] : BOOLEAN]
Check to see if buffer n is modified.
If n==-1 the current buffer is used.
(buffer-modified -1) : TRUE if the current buffer is modified.
(buffer-modified 0) : TRUE if the first buffer is modified.
(buffer-modified -1 FALSE) : mark the current buffer as not modified.
(buffer-modified n FALSE) : mark the nth buffer as not modified.
See also: buffer-flags, buffers, current-buffer, (not-modified).
(buffer-name n) [NUMBER : STRING]
Return the name of the nth buffer.
(buffer-name -1) returns the name of the current buffer.
(buffer-name 0) returns the name of the first buffer.
See also: buffers, current-buffer, file-name.
(buffer-stats n array INT 6) [NUMBER BLOB : VOID]
Get some stats on the nth buffer. n==-1 means current buffer.
These stats are: buffer-size (in characters), dot (number of
characters from the start of the buffer), lines (number of text
lines in the buffer), buffer-row (the line in the buffer the dot is
on), wasted (the number of characters allocated but not used) and
character-at-dot (ASCII value - eg if the dot is on a "A" then
character-at-dot==65).
Note that buffer-size may NOT be the same as the file size.
An example of a typical buffer stats routine (ie whats bound to
"^X=") is:
(defun show-buffer-stats ; bind this to "^X="
{
(INT buffer-size dot lines buffer-row wasted char-at-dot ratio)
(buffer-stats -1 (pointer buffer-size))
(ratio 0)(if (!= 0 buffer-size)(ratio (/ (* 100 dot) buffer-size)))
(msg "Row=" buffer-row " (of " lines ")"
" Col=" (current-column) " Y=" (window-row)
" CH=0x" (tobase char-at-dot 16) " .=" dot
" (" ratio "% of " buffer-size "))
})
(buffer-var n [value]) [NUMBER [NUMBER] : NUMBER]
Each buffer has 10 numeric variables (numbered 0,1,...9) associated
with it. These vars are not used by ME - they are there for pgm use.
They live and die with the buffer and are not initialized.
eg (buffer-var 0 123) sets var 0 to 123. (msg (buffer-var 0)) displays
123 in the minibuffer. (x (buffer-var 0)) assigns 123 to x.
(buffer-var 1 (+ (buffer-var 0) 1)) set bvar 1 to 124.
See also: buffer-created-hook, markring.mut (an example).
(buffers) [zip : NUMBER]
Return the number of buffers.
If (buffers) returns n, the buffers are numbered 0 ... n-1.
See also: buffer-modified, buffer-name, current-buffer, file-name.
(clear-buffer n [yes/no]) [NUMBER [STRING] : BOOLEAN]
Clear the nth buffer. n==-1 means current buffer.
Remove all contents of the buffer and clear the marks. If the buffer
is modified (and not marked NoCare), clear-buffer will ask if it
should be cleared. If you want the buffer cleared no matter what,
use (clear-buffer n "yes"). If you want the user to decide:
(ask-user)(clear-buffer n).
See also: (kill-buffer) (in ME.DOC).
(clear-register n) [NUMBER : NUMBER]
Clears the nth register by setting it to "".
Register 0 is the kill buffer. Registers 1,2,3,4 are general purpose.
See also: append-to-register, insert-register, the kill buffer commmands
in ME.DOC.
(compare-dot-and-mark) [zip : NUMBER]
Returns: 1 (dot on same line as mark), 2 (dot above mark),
3 (dot below mark).
See also: region-stats.
(complete "prompt" selector) [STRING NUMBER : STRING]
Works the same as ask but allows command completion.
Selector: bitwise OR the lists you want:
bit value list
0 1 ME keywords (listed in ME.DOC)
1 2 pgm names
2 4 Mutt keywords
3 8 buffer names
4 16 system vars
eg: (defun pgm-completer {(insert-text (complete "command: " 23))})
See also: ask
(copy-rectangle register) [NUMBER : VOID]
Copy the region-rectangle to the register. The buffer is not changed.
The register only contains the rectangle after the copy - anything
in the register before the copy is lost.
If there is no mark, the pgm aborts.
The region-rectangle is the rectangle that has the point at one corner
and the mark at the oppsite corner.
Register 0 is the kill buffer. Registers 1,2,3,4 are general purpose.
For example: To put the rectangle into the kill buffer and remove it
from the screen, use: (defun cut-rect { (copy-rectangle 0)
(erase-rectangle 0) })
See also: erase-rectangle, register-stats, region-stats.
(current-buffer) [zip : NUMBER]
Return the number of the current buffer.
See also: buffer-modified, buffer-name, buffers, file-name.
(current-column [column]) [[NUMBER] : NUMBER]
With no argument, returns the column after the dot. Otherwise, the
dot is set to column.
(beginning-of-line) is 1.
When you set the current-column, the dot will get as close as possible
to the position you specify, subject to:
- the dot will not leave the current line.
- because of tabs and such, the dot may not be in the column you
specify but will be BEFORE the character that would have caused
the dot to be beyond the specified position.
The new dot column is returned.
If you wish to force the dot to be in column n, use (current-column n)
(to-col n).
(current-directory [name]) [[STRING] : STRING|BOOLEAN]
(current-directory) returns the current directory (eg "/users/craig").
(current-directory "tools") attempts to set the current directory to
tools. Returns TRUE if successful, FALSE otherwise.
Note: This is available on UNIX only. Wildcards and ~ OK.
See also: dir.mut for examples.
(current-window) [zip : NUMBER]
Return the number of the current window. The windows are numbered 0,
1, ... (windows)-1 where window 0 is the top window on the screen.
See also: attached-buffer, windows,
(next-window), (previous-window) (in ME.DOC).
(delete-window n) [NUMBER : BOOLEAN]
Remove the nth window from the screen. n==-1 means the current window.
If there is only one window on screen, it is not deleted and FALSE is
returned otherwise TRUE is returned.
See also: (delete-other-windows) (in ME.DOC).
(EoB) [zip : BOOLEAN]
True if the cursor is at the end of the buffer. Note that end of
buffer is the empty line you get to with (end-of-buffer).
(erase-rectangle delete) [BOOLEAN : VOID]
Delete or clear the region-rectangle. If delete is TRUE, the text in
the rectangle is removed, otherwise it is set to blanks (short lines
are not extended).
The dot is left at the upper left corner of the rectangle and the mark
is at the lower right corner.
The region-rectangle is the rectangle that has the point at one corner
and the mark at the oppsite corner.
See also: copy-rectangle, register-stats.
(exe-key keycode) [NUMBER : BOOLEAN]
Execute a key gotten by get-key. This is the same as pressing that
key combo on the keyboard.
Returns TRUE if the key was executable.
Note: key-pressed is set to the key being executed.
See also: arg-prefix, get-key, key-pressed.
(file-name n) [NUMBER : STRING]
Return the name of the file attached to the nth buffer. If a file is
NOT attached, returns "".
(file-name -1) returns the name of the file attached to the current
buffer.
See also: buffer-modified, buffer-name, buffers, current-buffer,
rename-buffer (in ME.DOC).
(forward-line n) [NUMBER : BOOLEAN]
Move the dot forward n lines (backwards if n < 0).
The dot is left at column one.
Returns TRUE if all OK, FALSE if try move off the edge of the buffer
(the dot is left at the closest edge).
(get-key) [zip : NUMBER]
Wait for and grap the next ME key combo pressed. These have a rather
strange format so it is a good idea to print out the ones you need
with (insert-text (get-key)). If you look at the hex values you
might see a pattern.
key combo get-key value
CR C-M 333 (0x014D)
f1 F-1 2097 (0x0831)
a 97 (0x0061)
A 65 (0x0041)
^A C-A 321 (0x0141)
^XA ^Xa C-XA 1089 (0x0441)
^X^A C-XC-A 1345 (0x0541)
M-A 577 (0x0241)
See also: exe-key, getchar.
(get-matched sub-string) [STRING : STRING]
Return the RE substitution of the last (re-search-xxx) or
(looking-at).
See REGEXP.DOC for syntax of the sub string.
eg if (re-search-forward 'f\w*r') matched "foobar" then (get-matched "&")
returns "foobar".
See also: (looking-at), (RE-string), (re-search-forward),
(re-search-reverse).
(getchar) [zip : STRING]
Get a character from the keyboard with no echo. This is different from
get-key in that the string is the ASCII value of the next key hit. You
should only use this for real raw input.
See also: get-key.
(getenv environment-variable-name) [STRING : STRING]
Get the value of a environment variable.
Returns "" if not found.
For example: (getenv "SHELL") might return "D:/MUSH.EXE".
(insert-register n) [NUMBER : VOID]
Insert the contents of nth register at the point in the current buffer.
Register 0 is the kill buffer. Registers 1,2,3,4 are general purpose.
(insert-register 0) is the same as (yank).
If the register contains a rectangle, the upper left corner of the
rectangle will be at the dot.
See also: append-to-register, clear-register, register-stats, the
kill buffer commmands in ME.DOC.
(insert-text stuff) [STRINGs|NUMBERs|BOOLEANS|VOIDs : VOID]
Same as msg but the string is inserted into the current buffer.
eg (insert-text "foo = " foo)
See also: msg
(isspace) [zip : BOOLEAN]
TRUE if character under cursor is a space or tab.
(key-bound-to keystroke-string) [STRING : STRING]
Tell what command a key is bound to.
For example, (key-bound-to "^A") returns "beginning-of-line".
If the key is not bound, key-bound-to returns "".
The typical function to tell what a key is bound to is:
(defun describe-key ; what is a key bound to
{
(string key 10 bind 80)
(key (ask "Key: "))
(if (== "" (bind (key-bound-to key)))(msg key " is not bound.")
(msg key " is bound to " bind))
})
For Mutt programmer types, a handy program is:
(defun deref-key ; surround a command with braces
{
(string key 10 bind 80)
(key (ask "Key: "))
(if (!= "" (bind (key-bound-to key)))(insert-text "(" bind ")"))
})
This allows programming using keys rather than remembering command
names.
See also: complete.
(key-pressed) [zip : NUMBER]
Return the keycode of the key pressed to invoke the currently
executing pgm.
Note: exe-key sets this.
See also: exe-key, picture-self-insert in picture.mut for an example.
(key-pressed-hook key) [NUMBER : zip]
This is called when the user presses a key in the main loop (ie
key-pressed-hook is not called from the following: get-key,
exe-key, anything that queries the user in the mini buffer). The
key is passed to the hook. See get-key for the format of a key.
After the hook has finished, the key is executed.
For example:
If the user presses "a" (key-pressed-hook 0x61) is called and then
"a" is inserted.
Pressing ^X^F causes (key-pressed-hook 0x546) to be called. After
the hook returns, visit-file is called. Any keys pressed while in
visit-file will NOT trigger the hook.
See also: saveall.mut and abbrev.mut for examples.
(key-waiting) [zip : BOOLEAN]
Returns TRUE if a user pressed key is sitting in the input buffer.
See also: getchar, get-key.
(looking-at RE-string) [STRINGs|NUMBERs|BOOLEANS|VOIDs : BOOLEAN]
Test to see if the text following the dot matches a regular expression.
TRUE if it does. The arguments are concatenated together to form the RE.
See REGEXP.DOC for syntax of the pattern string.
eg if the text following the dot is "foobar" then (looking-at 'f\w*r')
returns TRUE.
You can retrieve the matched info with get-matched.
Remember that if you use the "string" form, "\" & "^" MUST be quoted:
"\\", "\^" if you don't want strange results. You can
avoid this problem by using ' instead of ". (See MUTT.DOC).
See also: get-matched, RE-string.
(modify-syntax-entry modify-string) [STRING : STRING]
Modify the syntax table that is used by things that deal with words, etc.
eg (forward-word) or (re-search-forward).
String has the form: <type><characters to modify> where type is "w" if
characters are parts of words, "W" if characters are not parts of words.
eg (modify-syntax-entry "W0123456789") sez numbers are not parts of words
(modify-syntax-entry "w-") sez "-" is part of a word.
Default parts of words are: A-Za-z0123456789$'_
(move-cursor row column) [NUMBER NUMBER : VOID]
Move the hardware cursor to (row,column).
Row and column are both start at zero.
Move-cursor does not change the point.
(prefix-key n [new-prefix]) [NUMBER [STRING] : STRING]
Get or set the nth prefix key. Returns the prefix keycode in ASCII
form.
n notes
0 The META prefix. Default is C-[ (ESCAPE).
1 Default is C-X.
2 open
3 open
META is a prefix so it can be overloaded (mimiced by) another key.
A consequence of this is you cannot prefix a METAed key when a META
key is a prefix. For example, C-XM-P is OK but M-XM-P is not.
If you have a real META key, you can turn off prefix key 0.
Prefix keys 2 and 3 are open - use them for anything you like.
To turn off a prefix key, set it to "S-" or some other impossible
keycode (like "S-0").
(puts "string") [STRINGs|NUMBERs : STRING]
Send a string to the terminal. ME does not see this.
Useful for defining function keys or creating popup windows.
See also: insert-text, msg, popup.mut
(RE-string RE-pattern string) [STRING STRING : BOOLEAN]
Test to see if a string matches a regular expression.
TRUE if it does.
You can retrieve the matched info with get-matched.
See REGEXP.DOC for syntax of the pattern string.
See also: get-matched, looking-at.
(region-stats pointer-to-data) [BLOB : VOID]
Get stats on the region. pointer-to-data is a pointer the data area
that the stats are put into:
(byte type) (int ulcol width height) (INT size)
type: 1 (dot on same line as mark), 2 (dot above mark), 3 (dot
below mark). This is the same info as (compare-dot-and-mark).
ulcol: upper left column of the region-rectangle.
width, height: of the region-rectangle.
size: Number of bytes in the region.
For example:
get-region-stats
{
(byte type)(int ulcol width height)(INT size)
(region-stats (loc type))
(msg
(switch type
1 "Dot and mark on same line."
2 "Dot above mark."
3 "Dot below mark."
)
" Upper left column:" ulcol
" Width:" width " Height:" height " Size:" size
)
})
See also: compare-dot-and-mark.
(register-stats register pointer-to-data) [NUMBER BLOB : VOID]
Get stats on register. pointer-to-data is a pointer the the data area
that the stats are put into:
(byte type) (int width height) (INT size)
type: 0 means text and 1 is rectangle.
width, height: If the register is a rectangle.
size: Number of bytes in the register.
For example:
(defun get-register-stats
{
(byte type)(int width height)(INT size)
(int n)
(n (atoi (ask "register: ")))
(register-stats n (loc type))
(msg "Register[" n "]: " (if (== type 0) "Text." "Rectangle.")
" Width:" width " Height:" height " Size:" size
)
})
(sysvar sysvar-name [value]) [STRING [NUMBER] : NUMBER]
Access or set a sysvar. This enables a pgm to give the user access to
sysvars.
Example:
(string sysvar-name 50)(sysvar-name "HELP")
(sysvar sysvar-name) gets the current value of HELP and
(sysvar sysvar-name 0) sets it to zero.
See also: sysvar.mut for coding examples.
(to-col column) [NUMBER : NUMBER]
Insert space until the dot is at column. If the dot is at or past
column, nothing happens.
Returns column.
If the sysvar tab-stops is zero then tabs and blanks are used,
otherwise only blanks are used as space.
(update) [zip : VOID]
Hard refresh the screen. Does not affect the minibuffer. Different from
(refresh-screen) in that the refresh occurs now, rather than waiting
for the program to end.
Note that keys in the typeahead buffer will keep the update from
completing.
(window-ledge n [left-edge]) [NUMBER [NUMBER] : NUMBER]
Set the left edge of window n. Returns the current or new value. If
n==-1, the current window is used. The window will display only the
text starting at column left-edge.
If horizontal-scroll is enabled and setting window-ledge causes the
cursor to move off screen, the display routines will reset the left
edge so that the cursor is on screen. Turning off horizontal-scroll
will prevent this.
With this command you can scroll windows manually (ie without using
the cursor) (see wscroll.mut).
The current screen column can be calculated by:
(- (current-column)(window-ledge -1))
See also: horizontal-scroll.
(window-height n) [NUMBER : NUMBER]
Return the height of the nth window (n==-1 means current window).
Note that the height does not include the mode line. If there is only
one window then
(window-height -1) == (window-height 0) == (- (screen-length) 1).
(window-row) [zip : NUMBER]
Return the row the dot is on in the current window. The top row of a
window is 1. Note that this is not the screen row (unless the
current window is the top most one).
Note: It is the display routines that figure out the window-row. If
called when the display is out of sync (such as a pgm doing display
manipulation) this could very well be incorrect. update can force a
display sync.
(windows) [zip : NUMBER]
Return the number of window on the screen.
See also: current-window.
(yesno prompt) [STRINGs|NUMBERs|BOOLEANs|VOIDs : BOOLEAN]
Show the prompt (with " [y/n]? " appended) and wait for [Y, y, N, or n]
CR to be typed. Returns TRUE on Y or y. The pgm aborts on ^G.
========================================================================
== SYSTEM VARIABLES (sysvars) ==
========================================================================
System vars are used like any other var - (sysvar) returns its value and
(sysvar value) sets it to value.
Most sysvars are global - they effect all buffers, windows, etc. Some
sysvars are buffer local - they only effect a single buffer. When you
set a local sysvar, it is set for the current buffer. If you want to set
these to something other than the default for every buffer, do so in
buffer-created-hook.
Unless otherwise noted, all sysvars are global.
HELP Set the help level [[NUMBER] : NUMBER]
(HELP) returns the current setting.
(HELP n) sets the level to n and returns n.
Help level:
0 : no help
!0 : gimme help (if you make typo in (ME-command)
(describe-bindings) will be executed).
Initial value: 1
beeper [[NUMBER] : NUMBER]
Now and then ME will beep at you. This annoys some people. You can tell
ME to shut up by setting beeper to 0. Setting it to nonzero restores
the gift of gab.
Initial value: 1
case-fold-search [[NUMBER] : NUMBER]
Affects searching (query-replace, search-forward, search-reverse).
If 1, case is ignored.
Initial value: 1
horizontal-scroll [step-size] [[NUMBER] : NUMBER]
This sysvar controls horizontal scrolling - moving text left and right
on the screen. If 0, horizontal scrolling is disabled, otherwise
the horizontal scrolling rate is set to step-size. When the screen
has to scroll, it will move in chunks in order to reduce the amount
screen thrashing. Change it to best suit your hardware and
preferences.
The range for step-size is [0 : screen-width). If you set it outside
of this range, you are asking for many unpleasent surprises.
See also: window-ledge.
modeline-color [[NUMBER] : NUMBER]
Change the the mode line color.
Note that the color values are display dependent.
See also: text-color, ERRATA.DOC.
overstrike [value] [[NUMBER] : NUMBER]
Overstrike is the mode opposite of insert (the default mode). Overstrike
mode is very much a bag on the side of ME and ment only for occasional
use.
The following are different in overstrike mode:
- The tab key is disabled but you can still set the tab stops.
- <CR> sends you the start of the next line.
- Backspace is the same as backward-character.
- The mode line.
- self-insert don't, they overstrike.
If you wish to have overstrike toggled by the insert key, put the
following into your init.mut:
(defun toggle-overstrike {(overstrike (- 1 (overstrike)))})
(bind-to-key "toggle-overstrike" "F-G")
Initial value: 0
screen-length [new-screen-length] [[NUMBER] : NUMBER]
Change the size of the physical screen. This allows the same ME code
to run on different size screens.
For example, say ME came configured for a HP150 (which has 24 screen
lines) and you wanted to run it on a HP110 (which has 16 lines). To
change the screen size: (screen-length 16). (screen-length)
returns the screen size -1. This is ME's "logical" screen size - ME
leaves one line open for the minibuffer.
If you need to use this often, put it in you init.mut file.
Range: [5 : physical screen length]
See also: ERRATA.DOC file.
screen-width [[NUMBER] : NUMBER]
Change the physical screen width.
Range: [5 : physical screen width]
tab-stops Local [[NUMBER] : NUMBER]
If given an argument then set the tab stops to every nth column.
If n==0 use the tab character.
If n>1 use spaces to simulate the tab character.
Initial value: 0
text-color [[NUMBER] : NUMBER]
Change the the text color.
Note that the color values are display dependent.
See also: modeline-color, ERRATA.DOC.
word-wrap Local [[NUMBER] : NUMBER]
Setting word-wrap >0 turns it on, 0 turns it off.
Initial value: 0
When ME decides it is time to word wrap, it does a (exe-key "^M")
which executes whatever is bound to the Enter key. This also
provides a hook if your pgm wants to do something at that time.
See also: word wrap, (set-fill-column) (both in ME.DOC).
========================================================================
== Miscellaneous ==
========================================================================
Initialization file (init.mco)
ME has an initialization file "init.mco". It attempts to load this
file first from the current directory. If it is not there then it
looks at the environment variable ME and tries that directory. Note
that a trailing slash is required for the ME variable. So, in MS-DOS,
"set ME=C:/medir/" will cause "C:/medir/init.mco" to be loaded.
Note that if there is an initialization file and it loads OK, ME
does not process the command line in any way. This means that
init.mut can process argv in any way it wants to. It also means it
has to read in any files the user stuck there for editing. This means
you can create your own command line options, read all the files in at
once, read the files one at a time, etc.