# This file contains all of the editor's buffer and window modes
#
# It should be processed by the "mktbls" program, which produces the
#  headers #included by main.c
#
# All that is necessary to add a new mode to the editor is to add
#  an entry to this file, write the supporting code, and rebuild.
#
# If you want to know which modes are already taken, look
#  at nemode.h, after you build it.
#
# The modes are table entries in the BUFFER and WINDOW structures.
#
# $Log: modetbl,v $
# Revision 1.39  1994/04/27  11:22:50  pgf
# changes for  and
#
# Revision 1.38  1994/04/22  13:49:11  pgf
# new hooks
#
# Revision 1.37  1994/04/22  11:30:50  pgf
# added cd-hook, ocwd, title, iconname, xvile, pcvile variables.  title,
# iconname, and font are now conditional on X11.  $xvile can be used
# to test whether to set them or not
#
# Revision 1.36  1994/04/08  19:55:36  pgf
# deleted obsolescent "target" variable
#
# Revision 1.35  1994/04/05  14:04:02  pgf
# added "view-on-readonly" mode
#
# Revision 1.34  1994/04/04  16:14:58  pgf
# kev's 4.4 changes
#
# Revision 1.33  1994/03/29  16:24:20  pgf
# kev's changes: selection and attributes
#
# Revision 1.32  1994/02/22  11:03:15  pgf
# truncated RCS log for 4.0
#
#
#
# Mode-table entries.  Capitalized letters are used for abbreviations.
# The second column is the root of the index-definition.
# The third column is flags used to control updates after a mode is changed.
# The fourth column (if present) controls conditional compilation of the mode.
.globals
bool								# GMD prefix
	"AutoBuffer"	ABUFF 		0			# auto-buffer (lru)
	"dirc"		DIRC		0		COMPLETE_DIRS # directory-completion (slow!)
	"Alt-TabPos"	ALTTABPOS	0			# emacs-style cursor positioning
	"expand-path"	EXPAND_PATH	0			# true iff %/# don't substitute shortened-path
	"flash"		FLASH		0		OPT_FLASH # visible-bell (flash)
	"glob"		GLOB		0		!OPT_GLOB_PIPE # enable/disable filename globbing
	"HIstory"	HISTORY		0		OPT_HISTORY # command-history
	"ImplyBuffer"	IMPLYBUFF 	0			# imply-buffer (vi-like)
	"multibeep"	MULTIBEEP	0			# multiple successive identical failed motions all beep
	"Popup-Choices"	POPUP_FILEC	0		NOTYET	# popup buffer showing file-completion choices
	"Popup-Msgs"	POPUP_MSGS	0		NOTYET	# popup buffer when multiple messages emitted
	"ShowRam"	RAMSIZE		0		RAMSIZE	# show ram-usage
	"SameBangs"	SAMEBANGS	0			# use same "!!" data for ^X-!
	"view-on-readonly" RONLYVIEW	0		# set view mode for readonly files
	"xterm-mouse"	XTERM_MOUSE	0		OPT_XTERM # (patch) mode to control whether we allow mouse-clicking
int								# VAL_ prefix
	"printing-low"	PRINT_LOW	WFHARD			# low end of high-bit-set printable range
	"printing-high"	PRINT_HIGH	WFHARD			# high end of high-bit-set printable range
	"report"	REPORT		0			# threshold for reporting changes
	"timeoutlen"	TIMEOUTVAL	0			# how long to catnap for more input
regex								# VAL_ prefix
	"C-SUFfixes"	CSUFFIXES	0			# match against filenames to turn on c-mode
string								# VAL_ prefix
	"expand-chars"	EXPAND_CHARS	0			# list of chars we can expand (%,#,:)
	"glob"		GLOB		0		OPT_GLOB_PIPE # select filename globbing style

.buffers
bool								# MD prefix
	"animated"	UPBUFF		0		OPT_UPBUFF # update scratch-buffers
	"AutoIndent"	AIND		0			# auto-indent
	"AutoSave"	ASAVE		0			# auto-save mode
	"BackspaceLimit" BACKLIMIT	0			# backspace limited in insert mode
	"check-modtime" CHK_MODTIME	0		!SMALLER # check buffer-modtime
	"cmode"		CMOD		WFHARD|WFMODE		# C indentation and fence match
	"crypt"		CRYPT		0		CRYPT	# encrytion mode active
	"dos"		DOS		WFHARD|WFMODE		# "dos" mode -- lines end in crlf
	"IgnoreCase"	IGNCASE		0			# Exact matching for searches
	"magic"		MAGIC		0			# regular expressions in search
	"Meta-Insert-Bindings" METAINSBIND 0			# honor meta bindings in insert mode
	"NewLine"	NEWLINE		WFHARD			# trailing newline (vi-style)
	"ShowMatch"	SHOWMAT		0			# auto-indent
	"ShowMoDe"	SHOWMODE	WFMODE			# show insert/replace/command mode
	"TabInsert"	TABINSERT	0			# okay to insert tab chars
	"TagRelative"	TAGSRELTIV	0			# tags are relative to tagsfile path
	"terse"		TERSE		0			# be terse -- suppress messages
	"view"		VIEW		WFMODE			# read-only buffer
	"WrapScan"	SWRAP 		0			# wrap-around search mode
	"WrapWords"	WRAP		0			# word wrap
int								# VAL_ prefix
	"AutoSaveCNT"	ASAVECNT	0			# how often auto-saves occur
	"C-ShiftWidth"	C_SWIDTH	0			# shift-width for C buffers
	"C-TabStop"	C_TAB		WFHARD|WFMODE		# tab spacing for C buffers
	"FillCol"	FILL		0			# column for paragraph reformat, and line break
	"ShiftWidth"	SWIDTH		0			# shiftwidth for ^T/^D/<</>>
	"TabStop"	TAB		WFHARD|WFMODE		# tab spacing for most buffers
	"TagLength"	TAGLEN		0			# required significant length for tag lookups
	"UndoLimit"	UNDOLIM		0			# how much undo stack is saved
	"WrapMargin"	WRAPMARGIN	0			# width of right margin for autowrap
string								# VAL_ prefix
	"tags"		TAGS		0			# list of tags files
regex								# VAL_ prefix
	"comments"	COMMENTS	0			# matches leading comment for comment reformatting
	"paragraphs"	PARAGRAPHS	0			# delimits a paragraph
	"sections"	SECTIONS	0			# delimits a section
	"sentences"	SENTENCES	0			# delimits a sentence

.windows
bool								# WMD prefix
	"LIst"		LIST		WFHARD			# "list" mode -- show tabs and EOL
	"NUmber"	NUMBER		WFSTAT|WFHARD		# line-numbers shown
	"HorizScroll"	HORSCROLL	0			# scroll whole screen
	"LineWrap"	LINEWRAP	WFHARD		OPT_LINEWRAP # wrap lines wider than screen
	"ruler"		RULER		WFSTAT		!SMALLER # display line+col in modeline
	"Unprintable-as-Octal" NONPRINTOCTAL  WFHARD		# print non-printing chars in octal
	"Terse-SELections" TERSELECT	0		OPT_SELECTIONS # don't display extent of selections on message line
int								# VAL_ prefix
	"SIDEways"	SIDEWAYS	WFMODE|WFHARD		# sideways offset for display
color
	"fcolor"	FCOLOR		WFHARD|WFCOLR	COLOR	# foreground color
	"bcolor"	BCOLOR		WFHARD|WFCOLR	COLOR	# background color
#
# The "environment" variables are similar to modes, but are not so neatly
# organized into groups of universal/buffer/window.
.environment
"abufname"	ABUFNAME		# alternate buffer name (i.e. '#')
"cbufname"	CBUFNAME		# current buffer name
"buffer-hook"	BUFHOOK		PROC	# procedure to run when entering buf
"cd-hook"	CDHOOK		PROC	# procedure to run when cd'ing
"cfilname"	CFNAME			# current file name
"char"		CURCHAR			# current character under the cursor
"curcol"	CURCOL			# current column pos of cursor
"curline"	CURLINE			# current line in file
"cwd"		CWD			# current directory
"cwline"	CWLINE			# current screen line in window
"debug"		DEBUG			# macro debugging
"directory"	DIRECTORY		# controls location of temp-files
"discmd"	DISCMD			# display commands on command line
"disinp"	DISINP			# display command line input characters
"exit-hook"	EXITHOOK	PROC	# procedure to run when quitting
"flicker"	FLICKER			# flicker suppression
"font"		FONT		X11	# current font
"iconname"	ICONNAM		X11	# current font
"identifier"	IDENTIF			# current identifier
"kill"		KILL			# kill buffer (read only)
"lastkey"	LASTKEY			# last keyboard char struck
"line"		LINE			# text of current line
"llength"	LLENGTH			# length of current line
"match"		MATCH			# last matched magic pattern
"mode"		MODE			# are we inserting/overwriting/command
"ntildes"	NTILDES			# number of tildes displayed at eob
"ocwd"		OCWD			# previous directory
"os"		OS			# what os are we on?
"pagelen"	PAGELEN			# number of lines used by editor
"pagewid"	CURWIDTH		# current screen width
"palette"	PALETTE			# current palette string
"pathname"	PATHNAME		# current path-like word
"pending"	PENDING			# type ahead pending flag
"progname"	PROGNAME		# returns current prog name - "vile"
"qidentifier"	QIDENTIF		# current qualified identifier
"ram"		RAM		RAMSIZE	# ram in use by malloc
"read-hook"	RDHOOK		PROC	# procedure to run when reading
"replace"	REPLACE			# replacement pattern
"search"	SEARCH			# search pattern
"seed"		SEED			# current random number seed
"shell"		SHELL			# shell-environment variable 
"sres"		SRES			# current screen resolution
"status"	STATUS			# returns the status of the last command
"tpause"	TPAUSE			# length to pause for paren matching
"title"		TITLE		X11	# window title
"version"	VERSION			# current version number
"wline"		WLINE			# # of lines in current window
"word"		WORD			# current word
"write-hook"	WRHOOK		PROC	# procedure to run when writing

.functions
"abs"	ABS		MONAMIC		# absolute value of a number
"add"	ADD		DYNAMIC		# add two numbers together
"and"	AND		DYNAMIC		# logical and
"asc"	ASCII		MONAMIC		# char to integer conversion
"bin"	BIND		MONAMIC		# lookup what function name is bound to a key
"cat"	CAT		DYNAMIC		# concatenate string
"chr"	CHR		MONAMIC		# integer to char conversion
"div"	DIV		DYNAMIC		# division
"env"	ENV		MONAMIC		# retrieve a system environment var
"equ"	EQUAL		DYNAMIC		# logical equality check
"gre"	GREATER		DYNAMIC		# logical greater than
"gtk"	GTKEY		NILNAMIC	# get 1 character
"ind"	IND		MONAMIC		# evaluate indirect value
"lef"	LEFT		DYNAMIC		# left string(string, len)
"len"	LENGTH		MONAMIC		# string length
"les"	LESS		DYNAMIC		# logical less than
"low"	LOWER		MONAMIC		# lower case string
"mid"	MID		TRINAMIC	# mid string(string, pos, len)
"mod"	MOD		DYNAMIC		# modulo
"neg"	NEG		MONAMIC		# negate
"not"	NOT		MONAMIC		# logical not
"or"	OR		DYNAMIC		# logical or
"rd"	READABLE	MONAMIC		# is a file readable?
"rig"	RIGHT		DYNAMIC		# right string(string, pos)
"rnd"	RND		MONAMIC		# get a random number
"seq"	SEQUAL		DYNAMIC		# string logical equality check
"sgr"	SGREAT		DYNAMIC		# string logical greater than
"sin"	SINDEX		DYNAMIC		# find the index of one string in another
"sle"	SLESS		DYNAMIC		# string logical less than
"sub"	SUB		DYNAMIC		# subtraction
"tim"	TIMES		DYNAMIC		# multiplication
"tru"	TRUTH		MONAMIC		# Truth of the universe logical test
"upp"	UPPER		MONAMIC		# uppercase string
"wr"	WRITABLE	MONAMIC		# is a file writeable?
