    misc/emacs: Use patch output of gofmt instead of replacing the buffer.
    misc/emacs: Use patch output of gofmt instead of replacing the buffer.

This uses the patch output of gofmt (-d option) and applies each
chunk to the buffer, instead of replacing the whole buffer.  The
main advantage is that the undo history is kept across gofmt'ings,
so it can really be used as a before-save-hook.

R=sameer, sameer
CC=golang-dev
http://codereview.appspot.com/6198047

Committer: Sameer Ajmani <da4a4efb907a17fabb3e092841511e7f24e226cf@golang.org>

apparentlymart/golang,pombredanne/go-deleteme,dsriram/golang,apparentlymart/golang,tv42/old-go,pombredanne/go-deleteme,apparentlymart/golang,gnanderson/go,tv42/old-go,apparentlymart/golang,gnanderson/go,tv42/old-go,pombredanne/go-deleteme,gnanderson/go,dsriram/golang,gnanderson/go,tv42/old-go,tv42/old-go,dsriram/golang,dsriram/golang,pombredanne/go-deleteme,tv42/old-go,apparentlymart/golang,pombredanne/go-deleteme,gnanderson/go,dsriram/golang,pombredanne/go-deleteme,dsriram/golang,pombredanne/go-deleteme,dsriram/golang,apparentlymart/golang,gnanderson/go,apparentlymart/golang,tv42/old-go,gnanderson/go