emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: syntax-table for info


From: Stefan Monnier
Subject: Re: syntax-table for info
Date: Wed, 07 Mar 2007 13:28:13 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.93 (gnu/linux)

> I see what you mean.  On the other hand, it is right that M-f skips
> over "can't" as one word.  Each choice is right in some cases and
> wrong in others.  Changing from one to the other would be a mistake.

> Maybe someday someone will figure out a solution to DTRT in all the cases.

We already solved this kind of problem once for capitalize-region:

      if ((int) flag >= (int) CASE_CAPITALIZE)
        inword = SYNTAX (c) == Sword && (inword || !SYNTAX_PREFIX (c));

Since ' in text-mode has syntax "w p", it means that a ' after a word char
is considered by capitalize-region as being a word-char, whereas a ' after
a non-word char is considered as a non-word char.  This way
capitalize-region  applied to

    'can't'
gives
    'Can't'

I guess the same idea should be applied to word movement.


        Stefan


PS: I just notice that this is not implemented for `capitalize'.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]