Lugaru's Epsilon
Programmer's
Editor 14.04

Context:
Epsilon User's Manual and Reference
   Commands by Topic
      Simple Customizing
         . . .
         Saving Customizations
         Command Files
            Command File Syntax
            Command File Examples
            Building Command Files

Previous   Up    Next
Command Files  Commands by Topic   Command File Examples


Epsilon User's Manual and Reference > Commands by Topic > Simple Customizing > Command Files >

Command File Syntax

Epsilon's command files appear in a human-readable format, so you can easily modify them. Parentheses surround each command. Inside the parentheses appear a command name, and optionally one or more arguments. The command can be one of several special commands described in the next section, or most any EEL subroutine. See the next section for details.

Each argument can be either a number, a string, or a key list (a special type of string). Spaces separate one argument from the next. Thus, each command looks something like this:

(command-name "first-string" "second-string") 

You can include comments in a command file by putting a semicolon or hash sign ("#") anywhere an opening parenthesis may appear. Such a comment extends to the end of the line. You cannot put a comment inside a string.

For numbers, you can include bases using a prefix of "0x" for hexadecimal, "0o" for octal, or "0b" for binary, or use an EEL-style character constant like 'X' or '\n'. For strings, quote each " or \ character with a \, as in EEL or C.

A few commands such as define-macro take a list of one or more keys; these use the syntax of strings, but with some additional rules. Most characters represent themselves, control characters have a "C-" before them, alt characters have an "A-", and function keys have an "F-" followed by the number of the function key. Cursor keys appear in a notation like <Home>. See Keys and their Representation for details.

Put a \ before any of these sequences to quote them. For instance, if a macro should contain a Ctrl-f key, write "C-F". If a macro should contain the three characters C hyphen F, write "\C-F". The characters you have to quote are <, ", and \, plus some letter- sequences. Thus, the DOS file name \job\letter.txt in a string looks like \\job\\letter.txt. Do not put extra spaces in command file strings that represent keys. For example, the string "C-X F" represents "C-X <Space> F", not "C-X F" with no <Space>.

You can also use the special key syntax <!cmdname> in a keyboard macro to run a command cmdname without knowing which key it's bound to. For example, <!find-file> runs the find-file command. When you define a keyboard macro interactively and invoke commands from the menu bar or tool bar, Epsilon will use this syntax to define them, since there may be no key sequence that invokes the specified command.

In addition to the above command syntax with commands inside parentheses, command files may contain lines that define variables, macros, key tables, bindings and color schemes. Epsilon understands all the different types of lines generated by list-all, list-customizations, import-customizations, list-colors and similar commands. When Epsilon records customizations in your einit.ecm file, it uses this line-by-line syntax for many types of customizations.

Besides listing variables, macros, key tables, and bindings, commands like list-all also create lines that report that a particular command or subroutine written in Epsilon's EEL extension language exists. These lines give the name, but not the definition, since these are normally defined in a separate .e file. Typically, an earlier line in the file will have loaded the .e file that defined the command. When Epsilon reads a command line and encounters a line giving the name of a command or EEL subroutine, it simply checks to make sure that a command or subroutine with the given name exists. If not, it reports an error. Epsilon does the same thing with variables that have complicated types (pointers or structures, for example). These also should be defined in .e files.



Previous   Up    Next
Command Files  Commands by Topic   Command File Examples


Lugaru Epsilon Programmer's Editor 14.04 manual. Copyright (C) 1984, 2021 by Lugaru Software Ltd. All rights reserved.