Implement new emacs command M-x gofmt
Implement new emacs command M-x gofmt

Define a new interactive function in go-mode.el called gofmt.
This function passes the current buffer through the external `gofmt`
tool and replaces the buffer with the result.

R=agl, rsc
http://codereview.appspot.com/154044

Committer: Russ Cox <5ad239cb8a44f659eaaee0aa1ea5b94947abe557@golang.org>

rflanagan/reginaldflanagan-project1,rflanagan/reginaldflanagan-project1,rdp/rogerpack2005-golang,rflanagan/reginaldflanagan-project1,Triskite/willstone-goclone,rflanagan/reginaldflanagan-project1,webfd/go-zh,rdp/rogerpack2005-golang,webfd/go-zh,d0f/go-zh,d0f/go-zh,mhennings/marcohennings-go,webfd/go-zh,scirelli/scirelli-go,sanjosh/sanjos100-tipc,bryanxu/go-zh,sanjosh/sanjos100-tipc,glycerine/jeaten-go-arrayof-structof,glycerine/jeaten-go-arrayof-structof,sanjosh/sanjos100-tipc,rflanagan/reginaldflanagan-project1,webfd/go-zh,scirelli/scirelli-go,bryanxu/go-zh,rdp/rogerpack2005-golang,rflanagan/reginaldflanagan-project1,mhennings/marcohennings-go,d0f/go-zh,sanjosh/sanjos100-tipc,npe9/noahevans-go9,rflanagan/reginaldflanagan-project1,mhennings/marcohennings-go,Triskite/willstone-goclone,scirelli/scirelli-go,npe9/noahevans-go9,glycerine/jeaten-go-arrayof-structof,glycerine/jeaten-go-arrayof-structof,bryanxu/go-zh,mhennings/marcohennings-go,d0f/go-zh,glycerine/jeaten-go-arrayof-structof,rdp/rogerpack2005-golang,Triskite/willstone-goclone,mhennings/marcohennings-go,npe9/noahevans-go9,scirelli/scirelli-go,bryanxu/go-zh,d0f/go-zh,scirelli/scirelli-go,Triskite/willstone-goclone,webfd/go-zh,bryanxu/go-zh,Triskite/willstone-goclone,npe9/noahevans-go9,scirelli/scirelli-go,npe9/noahevans-go9,bryanxu/go-zh,d0f/go-zh,rdp/rogerpack2005-golang,webfd/go-zh,glycerine/jeaten-go-arrayof-structof,sanjosh/sanjos100-tipc,bryanxu/go-zh,sanjosh/sanjos100-tipc,scirelli/scirelli-go,npe9/noahevans-go9,bryanxu/go-zh,scirelli/scirelli-go,mhennings/marcohennings-go,mhennings/marcohennings-go,webfd/go-zh,rdp/rogerpack2005-golang,rflanagan/reginaldflanagan-project1,Triskite/willstone-goclone,rdp/rogerpack2005-golang,npe9/noahevans-go9,d0f/go-zh,glycerine/jeaten-go-arrayof-structof,npe9/noahevans-go9,Triskite/willstone-goclone,sanjosh/sanjos100-tipc,mhennings/marcohennings-go,glycerine/jeaten-go-arrayof-structof,sanjosh/sanjos100-tipc,rdp/rogerpack2005-golang,d0f/go-zh,Triskite/willstone-goclone,webfd/go-zh