# 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.
#
# $Header: /usr2/foxharp/src/pgf/vile/RCS/modetbl,v 1.71 1996/04/16 02:29:34 pgf Exp $
#
#
# 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 		chgd_autobuf	# 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
	"ErrorBells"	ERRORBELLS	0		# audible/visible-bells
	"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
	"maplonger"	MAPLONGER	0		# favor longer maps
	"Popup-Choices"	POPUP_CHOICES	0		OPT_POPUPCHOICE&&!OPT_ENUM_MODES # popup buffer showing file-completion choices
	"Popup-Msgs"	POPUP_MSGS	0		OPT_POPUP_MSGS	# popup buffer when multiple messages emitted
	"ReadOnly-on-ReadOnly" RONLYRONLY	0	# set readonly mode for readonly files
	"remap"		REMAP		0		# should mappings be reapplied
	"remapfirst"	REMAPFIRST	0		# should 1st char of a map be remapped?
	"resolve-links"	RESOLVE_LINKS	0		HAVE_SYMLINK # cache/resolve directory names (can be slow if NFS times-out)
	"ShowRam"	RAMSIZE		0		OPT_RAMSIZE	# show ram-usage
	"SameBangs"	SAMEBANGS	0		# use same "!!" data for ^X-!
	"working"	WORKING		chgd_working	OPT_WORKING # "working" message
	"usefilelock"	USEFILELOCK	0		OPT_LCKFILES # okay use filelocks
	"VIEW-on-ReadOnly" RONLYVIEW	0		# set view mode for readonly files
	"warn-unread"	WARNUNREAD	0		# warn if quitting with unread buffers
	"warn-reread"	WARNREREAD	0		# warn before rereading a buffer
	"warn-rename"	WARNRENAME	0		# warn before renaming a buffer
	"xterm-mouse"	XTERM_MOUSE	chgd_xterm	# mode to control whether we allow mouse-clicking
	"SmoothScroll"	SMOOTH_SCROLL	0		# should we update even if there is typeahead?
enum
	"fcolor"	FCOLOR		chgd_color	OPT_COLOR	# foreground color
	"bcolor"	BCOLOR		chgd_color	OPT_COLOR	# background color
	"Popup-Choices"	POPUP_CHOICES	0		OPT_POPUPCHOICE&&OPT_ENUM_MODES # popup buffer showing file-completion choices
int							# VAL_ prefix
	"printing-low"	PRINT_LOW	chgd_charset	# low end of high-bit-set printable range
	"printing-high"	PRINT_HIGH	chgd_charset	# 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
	"timeoutlen-user" TIMEOUTUSERVAL 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
	"backup-style"  BACKUPSTYLE	0		OPT_FILEBACK # file backup style
	"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
	"AutoWrite"	AUTOWRITE	0		# auto-write when shelling out
	"BackspaceLimit" BACKLIMIT	0		# backspace limited in insert mode
	"check-modtime" CHK_MODTIME	0		!SMALLER # check buffer-modtime
	"cmode"		CMOD		chgd_major_w	# C indentation and fence match
	"crypt"		CRYPT		0		OPT_ENCRYPT	# encrytion mode active
	"dos"		DOS		chgd_major_w	# "dos" mode -- lines end in crlf
	"IgnoreCase"	IGNCASE		chgd_hilite	# Exact matching for searches
	"locked"	LOCKED		chgd_disabled	OPT_LCKFILES # mode locked
	"magic"		MAGIC		chgd_hilite	# regular expressions in search
	"Meta-Insert-Bindings" METAINSBIND 0		# honor meta bindings in insert mode
	"NewLine"	NEWLINE		chgd_buffer	# trailing newline (vi-style)
	"ReadOnly"	READONLY	chgd_major	# allow writing the buffer
	"ShowMatch"	SHOWMAT		0		# show matching braces during insert
	"ShowMoDe"	SHOWMODE	chgd_major	# 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		chgd_major	# read-only buffer
	"WrapScan"	SWRAP 		0		# wrap-around search mode
	"WrapWords"	WRAP		0		# word wrap
enum
	"visual-matches"  HILITEMATCH	chgd_hilite	OPT_HILITEMATCH # highlight all search matches
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		chgd_major_w	# tab spacing for C buffers
	"FillCol"	FILL		0		# column for paragraph reformat, and line break
	"ShiftWidth"	SWIDTH		0		# shiftwidth for ^T/^D/<</>>
	"TabStop"	TAB		chgd_major_w	# 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
	"fence-pairs"	FENCES		chgd_fences	# pairs of fences {,}; (,); etc.
	"locker"	LOCKER		chgd_disabled	OPT_LCKFILES  # Name of locker
	"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		chgd_window	# "list" mode -- show tabs and EOL
	"NUmber"	NUMBER		chgd_window	# line-numbers shown
	"HorizScroll"	HORSCROLL	0		# scroll whole screen
	"LineWrap"	LINEWRAP	chgd_window	OPT_LINEWRAP # wrap lines wider than screen
	"ruler"		RULER		chgd_status	!SMALLER # display line+col in modeline
	"Unprintable-as-Octal" NONPRINTOCTAL  chgd_window # 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	chgd_major_w	# sideways offset for display
#
# 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		OPT_PROCEDURES	# procedure to run when entering buf
"cd-hook"	CDHOOK		OPT_PROCEDURES	# 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	OPT_PROCEDURES	# procedure to run when quitting
"flicker"	FLICKER			# flicker suppression
"font"		FONT		DISP_X11	# current font
"iconname"	ICONNAM		DISP_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
"modeline-format" MLFORMAT	OPT_MLFORMAT # modeline format string
"modified"	MODIFIED		# is current buffer modified?
"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
"pid"		PROCESSID		# vile's process-id
"progname"	PROGNAME		# returns current prog name - "vile"
"qidentifier"	QIDENTIF		# current qualified identifier
"ram"		RAM		OPT_RAMSIZE	# ram in use by malloc
"read-hook"	RDHOOK		OPT_PROCEDURES	# 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		DISP_X11	# window title
"version"	VERSION			# current version number
"wline"		WLINE			# # of lines in current window
"word"		WORD			# current word
"write-hook"	WRHOOK		OPT_PROCEDURES	# 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
"glo"	GLOBMODE	MONAMIC		# retrieve global setting
"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
"loc"	LOCMODE		MONAMIC		# retrieve local setting
"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
"tri"	TRIM		MONAMIC		# trims leading/trailing/repeated whitespace
"tru"	TRUTH		MONAMIC		# Truth of the universe logical test
"upp"	UPPER		MONAMIC		# uppercase string
"wr"	WRITABLE	MONAMIC		# is a file writeable?
