mirror of https://github.com/golang/go.git
misc/emacs: Kill gofmt error buffer if the buffer was formatted correctly already.
R=adonovan, cw, patrick.allen.higgins, bradfitz CC=golang-dev https://golang.org/cl/7844045
This commit is contained in:
parent
985b0992cd
commit
c7ad7a1af4
|
|
@ -537,7 +537,9 @@ buffer."
|
|||
;; output in case of success.
|
||||
(if (zerop (call-process "gofmt" nil errbuf nil "-w" tmpfile))
|
||||
(if (zerop (call-process-region (point-min) (point-max) "diff" nil patchbuf nil "-n" "-" tmpfile))
|
||||
(message "Buffer is already gofmted")
|
||||
(progn
|
||||
(kill-buffer errbuf)
|
||||
(message "Buffer is already gofmted"))
|
||||
(go--apply-rcs-patch patchbuf)
|
||||
(kill-buffer errbuf)
|
||||
(message "Applied gofmt"))
|
||||
|
|
|
|||
Loading…
Reference in New Issue