[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: subword-mode
From: |
Miles Bader |
Subject: |
Re: subword-mode |
Date: |
Wed, 25 Nov 2009 18:31:56 +0900 |
Tassilo Horn <address@hidden> writes:
> and subword uses those more elaborated ones
>
> "\\W*\\(\\([[:upper:]]*\\W?\\)[[:lower:][:digit:]]*\\)" (forward)
> "\\(\\(\\W\\|[[:lower:][:digit:]]\\)\\([[:upper:]]+\\W*\\)\\|\\W\\w+\\)"
> (backward)
>
> Maybe just putting the subword regexps in cap-words.el achieves the
> desired behavior. If that's the case, then I agree with Miles that the
> cap-words approach is more elegant.
Just using the above regexps in cap-words.el doesn't work properly,
though perhaps it's closer.
With the new regexps, when moving forward with M-f, it stops one
character too early, and then the next M-f moves to the "proper" end of
the subword. E.g. (digits mark the stopping positions):
fooBarBAZ
12 34 5 (actual)
1 2 3 (desired)
Moving backward with M-b goes one character too far:
fooBarBAZ
3 2 1 (actual)
3 2 1 (desired)
Thanks,
-Miles
--
Monday, n. In Christian countries, the day after the baseball game.