Hi,
I have a small problem with the way the commands "backward-word" and "backward-kill-word" work. When I hit "backward-kill-word" on a line that is only white-spaces (for example, the first char of an indented line), the command will kill all the white-space, as well as the last word of the previous line.
This behavior is completely unintuitive for me. I much prefer the way it works in Eclipse, for example, which will kill the white-space characters up to the beginning of the line on the first press of "backward-kill-word", will move to the end of the previous line on the next hit, and only then will start killing words off the end of the line.
I'm pretty sure this behavior is the default in most applications (since it does seem to be more intuitive, which is probably because I'm used to it, but I'm not sure), so I'm wondering if there is a way to configure Emacs to have this behavior also. A few searches on Google unfortunately turned up nothing.
Thanks
EDIT:
Thanks all for the answers (including the elisp code which does what I asked for).
The same problem comes up, obviously, with forward-kill-word and the movement commands, and I was hoping that there was just some configurable flag in emacs to change the behavior, but it looks I'm just going to take these elisp functions and rebind the default movement and killing commands for these ones.