hvesalai/sbt-mode — pull request #4 by cinsk (2014-01-28 08:32:54+00:00)
Title: SBT submode awareness to several functions

Handling following problems:

- Currently, `sbt-send-region` will fail to insert Scala code if the sbt buffer is in _sbt_ submode.
- Likewise, `sbt-command` will fail to execute sbt command if the sbt buffer is not in _sbt_ submode.

This branch will updates above functions so that

- `sbt-send-region` will force sbt buffer to enter REPL mode before sending Scala code to the sbt buffer.
- `sbt-command` will exit the console or paste mode before executing sbt commands.

In addition to above:

- new function: `sbt-paste-region` will use ":paste" mode to send Scala code to the sbt buffer.
- new function: `run-scala` will create new sbt buffer, and enter Scala REPL mode. If sbt buffer already exists, it just call pop-to-buffer to raise it. (Other Emacs major-mode provides similar function like `run-ruby` or `run-python`, etc.)

Note that `run-scala` should be added to the one of autoload functions; `sbt-mode-autoloads.el` should be updated appropriately.

Thank you.