*** empty log message ***
[m17n/m17n-db.git] / FORMATS / IM.txt
index 1027d15..4c5dc57 100644 (file)
@@ -27,20 +27,24 @@ INPUT-METHOD ::=
     IM-DECLARATION ? DESCRIPTION ? VARIABLE-LIST ? COMMAND-LIST ?
     TITLE MAP-LIST MACRO-LIST ? MODULE-LIST ? STATE-LIST
 
-IM-DECLARATION ::= '(' 'input-method' LANGUAGE NAME ')'
-DESCRIPTION ::= '(' 'description' MTEXT ')'
+IM-DECLARATION ::= '(' 'input-method' LANGUAGE NAME [ VERSION ] ')'
+DESCRIPTION ::= '(' 'description' [ MTEXT-OR-GETTEXT | nil] ')'
 VARIABLE-LIST ::= '(' 'variable' VARIABLE-DECLARATION * ')'
 COMMAND-LIST ::= '(' 'command' COMMAND-DECLARATION * ')'
 TITLE ::= '(' 'title' TITLE-TEXT ')'
 
 VARIABLE-DECLARATION ::=
-    '(' VAR-NAME [ VAR-DESCRIPTION | nil ] VALUE VALUE-CANDIDATE * ')'
+    '(' VAR-NAME [ MTEXT-OR-GETTEXT | nil ] VALUE VALUE-CANDIDATE * ')'
 
 COMMAND-DECLARATION ::=
-    '(' CMD-NAME [ CMD-DESCRIPTION | nil ] KEYSEQ * ')'
+    '(' CMD-NAME [ MTEXT-OR-GETTEXT | nil ] KEYSEQ * ')'
+
+MTEXT-OR-GETTEXT ::=
+    [ MTEXT | '(' '_' MTEXT ')']
 
 LANGUAGE ::= SYMBOL
 NAME ::= SYMBOL
+VERSION ::= MTEXT
 IM-DESCRIPTION ::= MTEXT
 VAR-NAME ::= SYMBOL
 VAR-DESCRIPTION ::= MTEXT
@@ -56,8 +60,14 @@ TITLE-TEXT ::= MTEXT
 @c IM-DECLARATION specifies the language and name of this input
 method.
 
-@c DESCRIPTION specifies @c MTEXT as the description text of this
-input method.
+@c VERSION specifies the required minimum version number of the m17n
+library.  The format is is "XX.YY.ZZ" where XX is a major version
+number, YY is a minor version number, and ZZ is a patch level.
+
+@c DESCRIPTION specifies the description text of this input method by
+MTEXT-OR-GETTEXT.  It it takes the second form, the text is translated
+according to the current locale by "gettext" (if the translation is
+provided).
 
 @c VARIABLE-DECLARATION declares a variable used in this input method.
 If a variable must be initialized to the default value, or is to be
@@ -92,7 +102,16 @@ used, for instance, with a West European keyboard, @c MTEXT may
 contain Latin-1 characters.
 
 @c SYMBOL in the definition of @c KEYSEQ must be the return value of
-the minput_event_to_key () function.
+the minput_event_to_key () function.  Under the X window system, you
+can quickly check the value using the @c xev command.  For example,
+the return key, the backspace key, and the 0 key on the keypad are
+represented as @c (Return) , @c (BackSpace) , and @c (KP_0)
+respectively.  If the shift, control, meta, alt, super, and hyper
+modifiers are used, they are represented by the S- , C- , M- , A- , s-
+, and H- prefixes respectively in this oreder.  Thus, "return with
+shift with meta with hyper" is @c (S-M-H-Return) .  Note that "a with
+shift" .. "z with shift" are represented simply as A .. Z . Thus "a
+with shift with meta with hyper" is @c (M-H-A) .
 
 @c INTEGER in the definition of @c KEYSEQ must be a valid character
 code.
@@ -101,15 +120,15 @@ code.
 MAP-ACTION ::= ACTION
 
 ACTION ::= INSERT | DELETE | SELECT | MOVE | MARK
-           | SHOW | HIDE | PUSHBACK | UNDO | UNHANDLE | SHIFT | CALL
+           | SHOW | HIDE | PUSHBACK | POP | UNDO | UNHANDLE | SHIFT | CALL
           | SET | IF | COND | '(' MACRO-NAME ')'
 
 PREDEFINED-SYMBOL ::=
     '@0' | '@1' | '@2' | '@3' | '@4'
     | '@5' | '@6' | '@7' | '@8' | '@9'
     | '@<' | '@=' | '@>' | '@-' | '@+' | '@[' | '@]'
-    | '@@
-    | '@-N | '@+N
+    | '@@'
+    | '@-N' | '@+N'
 @endverbatim
 @verbatim
 MACRO-LIST ::= '(' 'macro' MACRO * ')'
@@ -370,6 +389,13 @@ events if @c INTEGER is zero.
 The second form pushes back keys in @c KEYSEQ to the event queue.
 
 @verbatim
+POP ::= '(' 'pop' ')'
+@endverbatim
+
+This action pops the first key event that is not yet handled from the
+event queue.
+
+@verbatim
 UNDO :: = '(' 'undo' [ INTEGER | SYMBOL ] ')'
 @endverbatim
 
@@ -377,7 +403,7 @@ If there's no argument, this action cancels the last two key events
 (i.e. the one that invoked this command, and the previous one).
 
 If there's an integer argument NUM, it must be positive or negative
-(not zero).  If positive, the NUMth event to the last one are
+(not zero).  If positive, from the NUMth to the last events are
 canceled.  If negative the last (- NUM) events are canceled.
 
 If there's a symbol argument, it must be resolved to an integer number
@@ -534,7 +560,7 @@ quite straight forward to extend it to cover all Latin characters.
 @section im-example2 EXAMPLE 2
 
 This example is for inputting Unicode characters by typing C-u
-(Control-u) followed by four hexadecimal numbers.  For instance, when
+(Control-u) followed by four hexadecimal digits.  For instance, when
 you type ("^u" means Control-u):
 @verbatim
     ^u2190^u2191^u2192^u2193
@@ -665,8 +691,8 @@ Lesser General Public License for more details.
 
 You should have received a copy of the GNU Lesser General Public
 License along with the m17n library; if not, write to the Free
-Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307, USA.
+Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+Boston, MA 02110-1301, USA.
 */
 
 /* Local Variables: */