From: Steven Elliot Harris Date: Wed, 20 Feb 2013 22:42:37 +0000 (-0800) Subject: misc/emacs: Present "godoc" documentation buffers using view-mode. X-Git-Tag: go1.1rc2~937 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=43da336b151993fa3b0d17dc443f5ba9d29d482f;p=gostls13.git misc/emacs: Present "godoc" documentation buffers using view-mode. Mimic the Emacs convention of presenting read-only files meant for browsing using view-mode, rather than Fundamental mode which mistakenly allows editing of the "godoc" content. Fixes #4322. R=golang-dev, bradfitz, sameer CC=golang-dev https://golang.org/cl/7231055 --- diff --git a/misc/emacs/go-mode.el b/misc/emacs/go-mode.el index a9d9ef5e00..6f680b24ad 100644 --- a/misc/emacs/go-mode.el +++ b/misc/emacs/go-mode.el @@ -875,7 +875,7 @@ Replace the current buffer on success; display errors on failure." (with-current-buffer (process-buffer proc) (cond ((string= event "finished\n") ;; Successful exit. (goto-char (point-min)) - (display-buffer (current-buffer) 'not-this-window)) + (view-buffer (current-buffer) 'kill-buffer)) ((not (= (process-exit-status proc) 0)) ;; Error exit. (let ((output (buffer-string))) (kill-buffer (current-buffer))