Commit 0104cea6 authored by Dominik Honnef's avatar Dominik Honnef Committed by Brad Fitzpatrick

misc/emacs: Enable compilation-mode for gofmt error buffer before displaying it.

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
parent c2e06e01
......@@ -565,8 +565,8 @@ buffer."
(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 ()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment