dandavison/CodeMirror — pull request #1 by dandavison (2013-02-18 04:54:19+00:00)
Title: Emacs kill line handler

### What

With the emacs keymap active, Ctrl-K should kill to the end of the line (it does) and a subsequent Ctrl-Y should replace the killed text (this was not happening prior to this commit.)

In order to make this happen, this commit does two things:

1. Modify the `killLine` command so that the killed text is returned.
2. Add a Ctrl-K handler to the emacs keybindings. This behaves like the Ctrl-K handler in the `emacsy` keymap, but in addition to killing the text, it adds the text to the kill ring.

### Testing

The Travis CI build passes. However, `killLine` does not seem to be covered by the test suite currently.

### Caveats

In a real emacs, consecutive Ctrl-Ks append killed text to the same kill ring entry. No attempt is made to model that behavior here. This is consistent with the rest of the `CodeMirror` emacs emulation.