1
0
mirror of https://github.com/golang/go synced 2024-11-11 23:10:23 -07:00

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
This commit is contained in:
Dominik Honnef 2013-03-30 09:54:08 -07:00 committed by Brad Fitzpatrick
parent c2e06e0188
commit 0104cea6c8

View File

@ -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 ()