   This is the _Zile_ manual.

   Zile is small Emacs clone.  Zile is a customizable, self-documenting
real-time display editor.  Zile was written to be as similar as
possible to Emacs; every Emacs user should feel at home with Zile.

1 Overview
**********

The _Zile_ editor is written entirely in _ANSI C_.  It should run on
any POSIX system.

   Zile should really appear like Emacs, but a lot of good ideas were
also taken from other editors; in particular, ce for the internal
structure.

2 Features
**********

   - Small but fast and powerful.  It is useful for small footprint
     installations (e.g. on floppy disk) and small computers.

   - 8-bit clean.  Zile can operate with binary files.

   - Looks like _Emacs_.  Key sequences and function names are
     identical to Emacs.

   - Multi buffer editing with multi level undo.  Zile can open as many
     files and restore as many undo operations as memory allows.

   - Multi window.  Zile can display multiple windows on the screen.

   - Killing, yanking and registers.  The killing, yanking and register
     features of Emacs are available in Zile.

   - Minibuffer completion.  This works for `M-x' commands, file,
     buffer and variable names.

   - Auto fill (word wrap).  Zile automatically breaks the lines when
     they become too wide (if Auto Fill Mode is enabled).

   - Auto line ending detection.  When a file is loaded, its line
     ending is detected automatically as either LF, CR or CRLF.  Files
     with mixed line endings will be displayed as if they had LF line
     endings.  If a CR line ending is detected, "(Mac)" is shown in the
     modeline, and for CRLF, "(DOS)".

3 Invoking Zile
***************

The options are as follows:

`FILE'
     Edit file `FILE'.

`+NUMBER'
     Go to line `NUMBER' in the next file opened.

`--batch'
     Do not do interactive display; implies `-q'.

`--help'
     Display a help message and exit.

`-f, --funcall FUNC'
     Call Zile function `FUNC' with no arguments.

`--no-init-file, -q'
     Do not load an init file.

`--version'
     Display version information and exit.

   Zile returns 0 on successful termination, 1 if it cannot start up,
for example because of an invalid command-line argument, and 2 if it
crashes or runs out of memory.

4 Initialization file
*********************

When Zile is started, it normally loads the `.zile' file in your home
directory.  We call this file your "initialization file" because it
specifies how to initialize Zile for you.  You can use the command line
switch `-q' to tell Zile not to load the initialization file.

4.1 File syntax
===============

The initialization file is written in Zile Lisp.  Zile Lisp is a tiny
subset of Emacs Lisp that consists of the Zile commands plus `setq'.
See the next subsection for a sample initialization file.

4.2 A sample file
=================

This is an initialization file that shows the default variable settings.
You can use it as a model for your own init file.

     ; .zile sample configuration

     ; Do not display the splash screen at startup [default: nil]
     (setq inhibit-splash-screen nil)

     ; The default tabulation width [default: 8]
     (setq tab-width 8)

     ; Always indent [default: t]
     ; Controls the operation of the TAB key.
     ; If t, hitting TAB always just indents the current line.
     ; If nil, hitting TAB indents the current line if point is at the
     ; left margin or in the line's indentation, otherwise it inserts a
     ; "real" TAB character.
     (setq tab-always-indent t)

     ; Insert real tabs [default: nil]
     ; If non-nil, insert-tab inserts `real' tabs; otherwise, it always
     ; inserts spaces.
     (setq indent-tabs-mode nil)

     ; The default fill column (in Auto Fill Mode) [default: 72]
     (setq fill-column 72)

     ; Enable Auto Fill Mode [default: nil]
     (setq auto-fill-mode nil)

     ; Kill whole line regardless of cursor position [default: nil]
     (setq kill-whole-line nil)

     ; Ignore case when searching [default: t]
     (setq case-fold-search t)

     ; Match case when replacing [default: t]
     (setq case-replace t)

     ; Enable bell [default: t]
     ; Non-nil means ring the terminal bell on any error.
     (setq ring-bell t)

     ; Standard indentation level [default: 4]
     ; Default number of columns for margin-changing functions to indent.
     (setq standard-indent 4)

     ; If non-nil, deactivates the mark when the buffer contents change.
     ; Also enables highlighting of the region whenever the mark is active.
     ; The variable `highlight-nonselected-windows' controls whether to
     ; highlight all windows or just the selected window. [default: t]
     (setq transient-mark-mode t)

     ; If non-nil, highlight region even in nonselected windows.
     ; [default: nil]
     (setq highlight-nonselected-windows nil)

     ; Specify whether backups are made [default: t]
     ; Non-nil means make a backup of a file the first time it is saved.
     ; This is done by appending `~' to the file name.
     (setq make-backup-files t)

     ; Specify target backup directory [default: nil]
     ; The directory for backup files, which must exist.
     ; If this variable is nil, the backup is made in the original file's
     ; directory.
     ; This value is used only when `make-backup-files' is `t'.
     (setq backup-directory nil)

     ; Rebind keys
     ; (global-set-key "key" 'func)

     ; Better bindings for when backspace generates C-h
     ;(global-set-key "\BACKSPACE"  'backward-delete-char)
     ;(global-set-key "\C-h"        'backward-delete-char)
     ;(global-set-key "\M-:"        'mark-paragraph)
     ;(global-set-key "\M-hb"       'list-bindings)
     ;(global-set-key "\M-hd"       'describe-function)
     ;(global-set-key "\M-hf"       'describe-function)
     ;(global-set-key "\M-hF"       'view-zile-FAQ)
     ;(global-set-key "\M-hk"       'describe-key)
     ;(global-set-key "\M-hlr"      'list-registers)
     ;(global-set-key "\M-hs"       'help-config-sample)
     ;(global-set-key "\M-ht"       'help-with-tutorial)
     ;(global-set-key "\M-hw"       'where-is)
     ;(global-set-key "\M-hv"       'describe-variable)

5 Getting help
**************

This table contains the commands that can be used during an editing
session to get help.

`C-h C-f, <f1> C-f'
     Show the Frequently Asked Questions about Zile.

`C-h f, <f1> f'
     Describe a function.

`C-h h, <f1> h, <f1> <f1>'
     Show this manual.

`C-h k, <f1> k'
     Describe a key sequence.

`C-h b, <f1> b'
     Show the defined bindings.

`C-h t, <f1> t'
     Show a tutorial window.

`C-h v, <f1> v'
     Describe a variable.

`C-h w, <f1> w'
     Show the key or keys to which a command is bound.

6 Key names
***********

This table contains the names of the keys that are used in Zile.

<SPC>
     Space

<RET>
     Return

<TAB>
     Tab

<BACKSPACE>
     Backspace

<ESC>
     Escape

<DELETE>
     Delete

<CTRL>
     Control

<META>
     Meta (also known as <EDIT> or <ALT> on some keyboards).

<PRIOR>
     PgUp (page up) (also called <PAGEUP>).

<NEXT>
     PgDn (page down) (also called <PAGEDOWN>).

   In key combinations, like `M-g', the `M-' prefix means hold the
<META> (or <EDIT> or <ALT>) key down while typing `g'.  The combination
`C-x' means hold the <CTRL> key down while typing `x'.

7 Functions
***********

This table contains the full list of available functions, that can be
called with the `M-x' key (most functions also have a key binding).

`auto-fill-mode'
     Toggle Auto Fill Mode.  In Auto Fill Mode, inserting a space at a
     column beyond `fill-column' automatically breaks the line at a
     previous space.

`back-to-indentation'
     Move point to the first non-whitespace character on this line.

`backward-char'
     Move point left one character.  On attempt to pass beginning or
     end of buffer, stop and signal error.

`backward-delete-char'
     Delete the previous character.  Join lines if the character is a
     newline.

`backward-kill-word'
     Kill characters backward until encountering the end of a word.
     With argument, do this that many times.

`backward-paragraph'
     Move backward to start of paragraph.  With argument N, do it N
     times.

`backward-sexp'
     Move backward across one balanced expression (sexp).  With
     argument, do it that many times.  Negative arg -N means move
     forward across N balanced expressions.

`backward-word'
     Move backward until encountering the end of a word (forward if the
     argument is negative).  With argument, do this that many times.

`beginning-of-buffer'
     Move point to the beginning of the buffer; leave mark at previous
     position.

`beginning-of-line'
     Move point to beginning of current line.

`call-last-kbd-macro'
     Call the last keyboard macro that you defined with `C-x ('.  A
     prefix argument serves as a repeat count.

`capitalize-word'
     Capitalize the following word (or argument N words), moving over.
     This gives the word(s) a first character in upper case and the rest
     lower case.

`cd'
     Make the user specified directory become the current buffer's
     default directory.

`copy-region-as-kill'
     Save the region as if killed, but don't kill it.

`copy-to-register'
     Copy region into the user specified register.

`delete-blank-lines'
     On blank line, delete all surrounding blank lines, leaving just
     one.  On isolated blank line, delete that one.  On non-blank line,
     delete any immediately following blank lines.

`delete-char'
     Delete the following character.  Join lines if the character is a
     newline.

`delete-horizontal-space'
     Delete all spaces and tabs around point.

`delete-other-windows'
     Make the selected window fill the screen.

`delete-region'
     Delete the text between point and mark.

`delete-window'
     Remove the current window from the screen.

`describe-bindings'
     Show a list of all defined keys, and their definitions.

`describe-function'
     Display the full documentation of a function.

`describe-key'
     Display documentation of the function invoked by a key sequence.

`describe-variable'
     Display the full documentation of a variable.

`downcase-region'
     Convert the region to lower case.

`downcase-word'
     Convert following word (or argument N words) to lower case, moving
     over.

`end-kbd-macro'
     Finish defining a keyboard macro.  The definition was started by
     `C-x ('.  The macro is now available for use via `C-x e'.

`end-of-buffer'
     Move point to the end of the buffer; leave mark at previous
     position.

`end-of-line'
     Move point to end of current line.

`enlarge-window'
     Make current window one line bigger.

`exchange-point-and-mark'
     Put the mark where point is now, and point where the mark is now.

`execute-extended-command'
     Read function name, then read its arguments and call it.

`fill-paragraph'
     Fill paragraph at or after point.

`find-alternate-file'
     Find the file specified by the user, select its buffer, kill
     previous buffer.  If the current buffer now contains an empty file
     that you just visited (presumably by mistake), use this command to
     visit the file you really want.

`find-file'
     Edit the specified file.  Switch to a buffer visiting the file,
     creating one if none already exists.

`find-file-read-only'
     Edit the specified file but don't allow changes.  Like `find-file'
     but marks buffer as read-only.  Use M-x toggle-read-only to permit
     editing.

`forward-char'
     Move point right one character.  On reaching end of buffer, stop
     and signal error.

`forward-line'
     Move N lines forward (backward if N is negative).  Precisely, if
     point is on line I, move to the start of line I + N.

`forward-paragraph'
     Move forward to end of paragraph.  With argument N, do it N times.

`forward-sexp'
     Move forward across one balanced expression (sexp).  With
     argument, do it that many times.  Negative arg -N means move
     backward across N balanced expressions.

`forward-word'
     Move point forward one word (backward if the argument is negative).
     With argument, do this that many times.

`global-set-key'
     Bind a command to a key sequence.  Read key sequence and function
     name, and bind the function to the key sequence.

`goto-char'
     Read a number N and move the cursor to character number N.
     Position 1 is the beginning of the buffer.

`goto-line'
     Move cursor to the beginning of the specified line.  Line 1 is the
     beginning of the buffer.

`help'
     Show a help window.

`help-with-tutorial'
     Show a tutorial.

`indent-for-tab-command'
     Indent line or insert a tab.

`insert-buffer'
     Insert after point the contents of the user specified buffer.
     Puts mark after the inserted text.

`insert-file'
     Insert contents of the user specified file into buffer after point.
     Set mark after the inserted text.

`insert-register'
     Insert contents of the user specified register.  Puts point before
     and mark after the inserted text.

`isearch-backward'
     Do incremental search backward.  With a prefix argument, do a
     regular expression search instead.  As you type characters, they
     add to the search string and are found.  Type return to exit,
     leaving point at location found.  Type `C-r' to search again
     backward, `C-s' to search again forward.  `C-g' when search is
     successful aborts and moves point to starting point.

`isearch-backward-regexp'
     Do incremental search forward for regular expression.  With a
     prefix argument, do a regular string search instead.  Like
     ordinary incremental search except that your input is treated as a
     regexp.  See `C-s' for more info.

`isearch-forward'
     Do incremental search forward.  With a prefix argument, do an
     incremental regular expression search instead.  As you type
     characters, they add to the search string and are found.  Type
     return to exit, leaving point at location found.  Type `C-s' to
     search again forward, `C-r' to search again backward.  `C-g' when
     search is successful aborts and moves point to starting point.

`isearch-forward-regexp'
     Do incremental search forward for regular expression.  With a
     prefix argument, do a regular string search instead.  Like
     ordinary incremental search except that your input is treated as a
     regexp.  See `C-s' for more info.

`just-one-space'
     Delete all spaces and tabs around point, leaving one space.

`keyboard-quit'
     Cancel current command.

`kill-buffer'
     Kill the current buffer or the user specified one.

`kill-line'
     Kill the rest of the current line; if no non-blanks there, kill
     thru newline.

`kill-region'
     Kill between point and mark.  The text is deleted but saved in the
     kill ring.  The command `C-y' (yank) can retrieve it from there.

     If the buffer is read-only, Zile will beep and refrain from
     deleting the text, but put the text in the kill ring anyway.  This
     means that you can use the killing commands to copy text from a
     read-only buffer.

     If the previous command was also a kill command, the text killed
     this time appends to the text killed last time to make one entry
     in the kill ring.

`kill-sexp'
     Kill the sexp (balanced expression) following the cursor.  With
     ARG, kill that many sexps after the cursor.  Negative arg -N means
     kill N sexps before the cursor.

`kill-word'
     Kill characters forward until encountering the end of a word.
     With argument, do this that many times.

`list-buffers'
     Display a list of names of existing buffers.  The list is
     displayed in a buffer named `*Buffer List*'.  Note that buffers
     with names starting with spaces are omitted.

        - The `M' column contains a `*' for buffers that are modified.

        - The `R' column contains a `%' for buffers that are read-only.

`list-registers'
     List defined registers.

`mark-paragraph'
     Put point at beginning of this paragraph, mark at end.  The
     paragraph marked is the one that contains point or follows point.

`mark-sexp'
     Set mark argument sexps from point.  The place mark goes is the
     same place `C-M-f' would move to with the same argument.

`mark-whole-buffer'
     Put point at beginning and mark at end of buffer.

`mark-word'
     Set mark argument words away from point.

`name-last-kbd-macro'
     Assign a name to the last keyboard macro defined.  Argument SYMBOL
     is the name to define.  The symbol's function definition becomes
     the keyboard macro string.  Such a "function" cannot be called
     from Lisp, but it is a valid editor command.

`newline'
     Insert a newline at the current point position into the current
     buffer.

`newline-and-indent'
     Insert a newline, then indent.  Indentation is done using the
     indent-for-tab-command function.

`next-line'
     Move cursor vertically down one line.  If there is no character in
     the target line exactly in the current column, the cursor is
     positioned after the character in that line which spans this
     column, or at the end of the line if it is not long enough.

`open-line'
     Insert a newline and leave point before it.

`other-window'
     Select the first different window on the screen.  All windows are
     arranged in a cyclic order.  This command selects the window one
     step away in that order.

`overwrite-mode'
     In Overwrite Mode, printing characters typed in replace existing
     text on a one-for-one basis, rather than pushing it to the right.
     At the end of a line, such characters extend the line.  `C-q'
     still inserts characters in Overwrite Mode; this is supposed to
     make it easier to insert characters when necessary.

`previous-line'
     Move cursor vertically up one line.  If there is no character in
     the target line exactly over the current column, the cursor is
     positioned after the character in that line which spans this
     column, or at the end of the line if it is not long enough.

`query-replace'
     Replace occurrences of a string with other text.  As each match is
     found, the user must type a character saying what to do with it.

`quoted-insert'
     Read next input character and insert it.  This is useful for
     inserting control characters.  You may also type up to 3 octal
     digits, to insert a character with that code.

`recenter'
     Center point in window and redisplay screen.  The desired position
     of point is always relative to the current window.

`replace-string'
     Replace occurrences of a string with other text.

`save-buffer'
     Save current buffer in visited file if modified.  By default,
     makes the previous version into a backup file if this is the first
     save.

`save-buffers-kill-zile'
     Offer to save each buffer, then kill this Zile process.

`save-some-buffers'
     Save some modified file-visiting buffers.  Asks user about each
     one.

`scroll-down'
     Scroll text of current window downward near full screen.

`scroll-up'
     Scroll text of current window upward near full screen.

`search-backward'
     Search backward from point for the user specified text.

`search-backward-regexp'
     Search backward from point for match for regular expression REGEXP.

`search-forward'
     Search forward from point for the user specified text.

`search-forward-regexp'
     Search forward from point for regular expression REGEXP.

`self-insert-command'
     Insert the character you type.

`set-fill-column'
     Set the fill column.  If an argument value is passed, set the
     `fill-column' variable with that value, otherwise with the current
     column value.

`set-mark-command'
     Set mark at where point is.

`set-variable'
     Set a variable value to the user specified value.

`shell-command'
     Reads a line of text using the minibuffer and creates an inferior
     shell to execute the line as a command.

     Standard input from the command comes from the null device.  If the
     shell command produces any output, the output goes to a Zile buffer
     named `*Shell Command Output*', which is displayed in another
     window but not selected.

     If the output is one line, it is displayed in the echo area.  A
     numeric argument, as in `M-1 M-!' or `C-u M-!', directs this
     command to insert any output into the current buffer.

`shell-command-on-region'
     Reads a line of text using the minibuffer and creates an inferior
     shell to execute the line as a command; passes the contents of the
     region as input to the shell command.

     If the shell command produces any output, the output goes to a
     Zile buffer named `*Shell Command Output*', which is displayed in
     another window but not selected.

     If the output is one line, it is displayed in the echo area.  A
     numeric argument, as in `M-1 M-|' or `C-u M-|', directs output to
     the current buffer, then the old region is deleted first and the
     output replaces it as the contents of the region.

`shrink-window'
     Make current window one line smaller.

`split-window'
     Split current window into two windows, one above the other.  Both
     windows display the same buffer now current.

`start-kbd-macro'
     Record subsequent keyboard input, defining a keyboard macro.  The
     commands are recorded even as they are executed.  Use `C-x )' to
     finish recording and make the macro available.

`suspend-zile'
     Stop Zile and return to superior process.

`switch-to-buffer'
     Select to the user specified buffer in the current window.

`tab-to-tab-stop'
     Insert a tabulation at the current point position into the current
     buffer.

`tabify'
     Convert multiple spaces in region to tabs when possible.  A group
     of spaces is partially replaced by tabs when this can be done
     without changing the column they end at.  The variable `tab-width'
     controls the spacing of tab stops.

`toggle-read-only'
     Change whether this buffer is visiting its file read-only.

`transient-mark-mode'
     Toggle Transient Mark mode.  With arg, turn Transient Mark mode on
     if arg is positive, off otherwise.

`transpose-chars'
     Interchange characters around point, moving forward one character.
     If at end of line, the previous two chars are exchanged.

`transpose-lines'
     Exchange current line and previous line, leaving point after both.
     With argument ARG, takes previous line and moves it past ARG lines.
     With argument 0, interchanges line point is in with line mark is
     in.

`transpose-sexps'
     Like `M-t' but applies to sexps.

`transpose-words'
     Interchange words around point, leaving point at end of them.

`undo'
     Undo some previous changes.  Repeat this command to undo more
     changes.

`universal-argument'
     Begin a numeric argument for the following command.  Digits or
     minus sign following `C-u' make up the numeric argument.  `C-u'
     following the digits or minus sign ends the argument.  `C-u'
     without digits or minus sign provides 4 as argument.  Repeating
     `C-u' without digits or minus sign multiplies the argument by 4
     each time.

`untabify'
     Convert all tabs in region to multiple spaces, preserving columns.
     The variable `tab-width' controls the spacing of tab stops.

`upcase-region'
     Convert the region to upper case.

`upcase-word'
     Convert following word (or argument N words) to upper case, moving
     over.

`view-zile-FAQ'
     Show the Zile Frequently Asked Questions list (FAQ).

`where-is'
     Show the key or keys to which the given command is bound.

`write-file'
     Write current buffer into the user specified file.  Makes buffer
     visit that file, and marks it not modified.

`yank'
     Reinsert the last stretch of killed text.  More precisely,
     reinsert the stretch of killed text most recently killed or
     yanked.  Put point at end, and set mark at beginning.

`zile-version'
     Show the zile version.

8 Variables
***********

This table contains the full list of available variables, that can be
modified at run-time with the `set-variable' function or set at start-up
in the `.zile' initialization file.

`auto-fill-mode'
     If non-nil, Auto Fill Mode is automatically enabled.  Default
     value is `nil'.

`backup-directory'
     The directory for backup files, which must exist.  If this
     variable is `nil', the backup is made in the original file's
     directory.  Default value is `nil'.

`case-fold-search'
     Non-nil means searches ignore case.

`case-replace'
     Non-nil means `query-replace' should preserve case in replacements.

`fill-column'
     Column beyond which automatic line-wrapping should happen.
     Automatically becomes buffer-local when set in any fashion.
     Default value is `72'.

`highlight-nonselected-windows'
     If non-nil, highlight region even in nonselected windows.  Default
     value is `nil'.

`indent-tabs-mode'
     If non-nil, insert-tab inserts `real' tabs; otherwise, it always
     inserts spaces.  Default value is `nil'.

`inhibit-splash-screen'
     Non-nil inhibits the startup screen.  It also inhibits display of
     the initial message in the `*scratch*' buffer.  Default value is
     `nil'.

`kill-whole-line'
     If non-nil, `kill-line' with no arg at the beginning of a line
     kills the whole line.  Default value is `nil'.

`make-backup-files'
     Non-nil means make a backup of a file the first time it is saved.
     This is done by appending ``~'' to the file name.  Default value
     is `t'.

`ring-bell'
     Non-nil means ring the terminal bell on any error.  Default value
     is `t'.

`standard-indent'
     Default number of columns for margin-changing functions to indent.
     Default values is `4'.

`tab-always-indent'
     Controls the operation of the `TAB' key.  If `t', hitting `TAB'
     always just indents the current line.  If `nil', hitting `TAB'
     indents the current line if point is at the left margin or in the
     line's indentation, otherwise it inserts a "real" TAB character.
     Default value is `t'.

`tab-width'
     Distance between tab stops (for display of tab characters), in
     columns.  Automatically becomes buffer-local when set in any
     fashion.  Default value is `8'.

`transient-mark-mode'
     If non-nil, deactivates the mark when the buffer contents change.
     Also enables highlighting of the region whenever the mark is
     active.  The variable `highlight-nonselected-windows' controls
     whether to highlight all windows or just the selected window.
     Default value is `t'.

9 Bug reports
*************

Any questions, comments, or bug reports should be sent to the
developers at <zile-devel@lists.sourceforge.net>, or even better, filed
in the relevant tracker at `http://sourceforge.net/projects/zile/'.

