Finds wordbreaks in the editor using the current wordbreak procedure. See also set-wordbreak-func.
The contents of the start argument specifies a location to start searching backwards to the next word start; its will be filled with the starting position of the word that is found. If start is #f, no backward search is performed.
The contents of the end argument specifies a location to start searching forwards to the next word end; its will be filled with the ending position of the word that is found. If end is #f, no forward search is performed.
The reason argument specifies more information about what the wordbreak is used for. For example, the wordbreaks used to move the caret may be different from the wordbreaks used to break lines. The possible values of reason are:
The actual handling of reason is controlled by the current wordbreak procedure; see set-wordbreak-funcfor details. The default handler and default wordbreak map treats alphanumeric charatecters the same for 'caret, 'line, and 'selection. Non-alphanumeric, non-space, non-hypen charaters do not break lines, but do break caret and selection words. For example a comma should not be counted as part of the preceding word for moving the caret past the word or double-clicking the word, but the comma should stay on the same line as the word (and thus counts in the same ``line word'').