[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: syntax-table for info
From: |
Nick Roberts |
Subject: |
Re: syntax-table for info |
Date: |
Thu, 8 Mar 2007 08:57:07 +1300 |
> 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.
Interesting. It might be a bit harder in this case though, because you can
have an apostrophe at the end of a word, e.g, "two mens' sons", meaning the
sons of two men. So you would also have to check for an apostrophe at the
start of the word.
--
Nick http://www.inet.net.nz/~nickrob
- syntax-table for info, Nick Roberts, 2007/03/06
- Re: syntax-table for info, Richard Stallman, 2007/03/06
- Re: syntax-table for info, Nick Roberts, 2007/03/06
- Re: syntax-table for info, Kim F. Storm, 2007/03/07
- Re: syntax-table for info, Richard Stallman, 2007/03/07
- Re: syntax-table for info, Stefan Monnier, 2007/03/07
- Re: syntax-table for info,
Nick Roberts <=
- Re: syntax-table for info, Kim F. Storm, 2007/03/08
- Re: syntax-table for info, martin rudalics, 2007/03/08
- Re: syntax-table for info, Richard Stallman, 2007/03/08