Some packages, like popwin.el, change display behaviour based on
the buffer's mode, so we should enable compilation-mode before
displaying the buffer.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
8155043
(insert "gofmt errors:\n")
(while (search-forward-regexp (concat "^\\(" (regexp-quote tmpfile) "\\):") nil t)
(replace-match (file-name-nondirectory filename) t t nil 1))
- (display-buffer errbuf)
- (compilation-mode)))
+ (compilation-mode)
+ (display-buffer errbuf)))
;;;###autoload
(defun gofmt-before-save ()