def rl_backward_word(count, key)
if (count < 0)
return (rl_forward_word(-count, key))
end
while (count>0)
return 0 if (@rl_point == 0)
_p = !@rl_byte_oriented ? _rl_find_prev_mbchar(@rl_line_buffer, @rl_point, MB_FIND_NONZERO):(@rl_point-1)
c = _rl_char_value(@rl_line_buffer, _p)
if (!_rl_walphabetic(c))
@rl_point = _p
while (@rl_point > 0)
_p = !@rl_byte_oriented ? _rl_find_prev_mbchar(@rl_line_buffer, @rl_point, MB_FIND_NONZERO):(@rl_point-1)
c = _rl_char_value(@rl_line_buffer, _p)
if (_rl_walphabetic(c))
break
end
@rl_point = _p
end
end
while (@rl_point>0)
_p = !@rl_byte_oriented ? _rl_find_prev_mbchar(@rl_line_buffer, @rl_point, MB_FIND_NONZERO):(@rl_point-1)
c = _rl_char_value(@rl_line_buffer, _p)
if (!_rl_walphabetic(c))
break
else
@rl_point = _p
end
end
count -= 1
end
0
end