Macro get_word()?

Bert Wesarg wesarg at informatik.uni-halle.de
Mon Jan 22 20:43:16 CET 2007


Yes,

this is my actual code, to check if $cursor is on a right word boundary:

define is_right {
    rwb = -1
    if ($cursor > 0) {
        rwb = search(">", $cursor - 1, "forward", "regex")
    } else if ($cursor < $text_length) {
        rwb = search(">", $cursor + 1, "backward", "regex")
    }
    if ($cursor != rwb) {
        return 0
    }
    return 1
}

Bert

Thorsten Haude wrote:
> Hi,
> 
> * Bert Wesarg wrote (2007-01-22 20:25):
>> btw, is ther a simple method to determine if a given position is either an
>> "<" or ">" anchor?
> 
> Apart from searching for it?
> 
> 
> Thorsten
> 


More information about the Discuss mailing list