On 23 June 2010 10:02, Gary
<help-gnu-emacs@garydjones.name> wrote:
Paul Drummond writes:
> ** Example 2
>
> When editing C++ files I often need to delete the "ClassName::" part when
> declaring functions in the header:
>
> void ClassName::function();
> ^
>
> With point at the start of ClassName I want to press M-d twice to delete
> ClassName and :: but "::" isn't recognised as a word. In Vim I just
Twice? Three times, shirley? Class and Name are both words...
Yeah, I agree about CamelCase but I wanted to keep the example simple ;)
Because it needs to be defined somewhat differently for natural
languages and different programming languages, at a guess. What a word
is depends entirely on the context you (and I) decide, and they may well
be different (see two versus three key presses above).
But each context I use has a major mode and I would expect each major
mode to have sensible default word boundaries but they don't.