From: Dominik Honnef Date: Sat, 30 Mar 2013 16:54:08 +0000 (-0700) Subject: misc/emacs: Enable compilation-mode for gofmt error buffer before displaying it. X-Git-Tag: go1.1rc2~255 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=0104cea6c8f25ced6f5944a810ccaadab1cbf4e6;p=gostls13.git 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 --- diff --git a/misc/emacs/go-mode.el b/misc/emacs/go-mode.el index 76dad67613..6f0442aff0 100644 --- a/misc/emacs/go-mode.el +++ b/misc/emacs/go-mode.el @@ -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 ()