this is basically a copy of the necessary parts from go-mode version 20131222, so all credit goes to The Go Authors See also `jsfmt': https://rdio.github.io/jsfmt