mirror of https://github.com/golang/go.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
This commit is contained in:
parent
93ae46eae9
commit
43da336b15
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Reference in New Issue