>>>>> "Andre" == Andre Poenitz <[EMAIL PROTECTED]> writes:

Andre> When you are at it you could check whether all of these IsKomma
Andre> etc methods are still used after applying your patch.

Andre> [The name alone suggests that this is _really_ ancient code.
Andre> Maybe even some artifacts of Matthias' original code...]

Paragraph::isKomma is not used and could be removed. IsKommaChar is
still used:

bool Paragraph::isWord(pos_type pos) const
{
        if (isInset(pos))
                return getInset(pos)->isLetter();
        value_type const c = getChar(pos);
        return !(IsSeparatorChar(c)
                  || IsKommaChar(c)
                  || IsInsetChar(c));
}


However, what is interesting is that we also have:

/// Used by the spellchecker
bool Paragraph::isLetter(pos_type pos) const
{
        value_type const c = getChar(pos);
        if (IsLetterChar(c))
                return true;
        if (isInset(pos))
                return getInset(pos)->isLetter();
        // We want to pass the ' and escape chars to ispell
        string const extra = lyxrc.isp_esc_chars + '\'';
        return contains(extra, c);
}

So, we have two different definitions of what a word is, one being by
inclusion and the other by exclusion. I am not sure what is the best
way to define a word. Note that the isp_esc_char stuff should move to
ControlSpellchecker. Then we would be in postion to unify these two
definitions of a word. But how should we do it?

JMarc

Reply via email to