spell is a low level command which provides spell checking capabilities for MicroEmacs '06, it is not designed to be used directly. The action of spell depends on the argument given, which is a bitwise flag defined as follows:-
If set then gets the input word from the user, i.e. "word" must be supplied. Otherwise the word input is taken from the current buffer.
If set then keeps getting words from the current buffer until either the end of the buffer is reached or an error is found. If the end of the buffer is reached then the command succeeds setting
$result(5) to the value "F". This bit is ignored if bit 0x001 is set. spell sets the current show-region to enclose the problematical word and the command
show-region(2) can be used to move around the word.
Adds the given word to a dictionary determined by the state of bit 0x008. If the word is flagged as erroneous (see bit 0x010) then a "correction" word must be supplied, otherwise a list of "rules" which can be applied to the word must be given, this list can be empty. Note that if the word is not flagged as erroneous and it already exists in the dictionary, the word is not removed, instead a combined rule list is created.
When set flags that word additions (bit 0x004) and deletions (bit 0x200) should be made to the ignore dictionary. Otherwise word additions are made the last added dictionary and deletions are made to all main dictionaries.
When set flags that the given word is erroneous, used solely by word additions to create auto-corrections.
Returns a '|' separated guess list for the given word in $result.
If bit 0x100 is also set a complete list of valid words derivable from the given word are inserted into the current buffer. Otherwise spell returns
$result(5) set to the derivative word created when the given "rule" is applied to "word". The rule applied is the first found of the given rule letter with a matching base ending (see
add-spell-rule(2)). The word need not exist as not tests for the legality of the resultant word is used, for example in American, executing
65 spell "spelling" "V"
Used with bit 0x002 to enable double word checking.
Return information in $result about the given word, or the word which is used to derive the given word. The information consists of the spell status, the word as stored in the dictionary, and either the list of valid rules, or the correction word. See also bit 0x040.
Delete the given word from a dictionary determined by bit 0x008
If none of the main functions are used (bits 0x004, 0x020, 0x040 & 0x200) then the status flag is returned in the first column of $result. These are defined as follows:-
Auto-replace. The word was found and flagged as erroneous. The correction word is given in $result, either next to the flag, or if bit 0x100 is set then after the '>' character.
Double word. Indicates that the first problem found is a double occurrence of the same word one after the other.
Erroneous. The word was not found, so is Erroneous
Not a word. The current word found contains no alphabetic characters so is not deemed to be a word, e.g. 3.141593.
Okay. The word was found and is not an erroneous word.
Copyright (c) 1998-2006 JASSPA
Last Modified: 2004/02/04
Generated On: 2006/10/07