]> Cypherpunks repositories - gostls13.git/commit
misc/emacs: Use patch output of gofmt instead of replacing the buffer.
authorJean-Marc Eurin <jmeurin@google.com>
Wed, 30 May 2012 18:18:58 +0000 (14:18 -0400)
committerSameer Ajmani <sameer@golang.org>
Wed, 30 May 2012 18:18:58 +0000 (14:18 -0400)
commit7b6111a9ddf899235ef2eb9a3c139e8cc9d83391
treeb3d6a99071cc2baab79d15d13e3f7ead624a19e4
parentec4d213594c5948f930c9d46f9444e422e1670cd
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
https://golang.org/cl/6198047
misc/emacs/go-mode.el