branch: elpa/go-mode
commit bbaba91ffff253bfd9f8628c00052220f3efad02
Author: Taiki Sugawara <[email protected]>
Commit: Dominik Honnef <[email protected]>

    Add godoc-mode
---
 go-mode.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/go-mode.el b/go-mode.el
index e519d60..f97a10b 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -1069,13 +1069,16 @@ you save any file, kind of defeating the point of 
autoloading."
   (with-current-buffer (process-buffer proc)
     (cond ((string= event "finished\n")  ;; Successful exit.
            (goto-char (point-min))
-           (view-mode 1)
+           (godoc-mode)
            (display-buffer (current-buffer) t))
           ((/= (process-exit-status proc) 0)  ;; Error exit.
            (let ((output (buffer-string)))
              (kill-buffer (current-buffer))
              (message (concat "godoc: " output)))))))
 
+(define-derived-mode godoc-mode special-mode "Godoc"
+  "Major mode for showing Go documentation.")
+
 ;;;###autoload
 (defun godoc (query)
   "Show Go documentation for QUERY, much like M-x man."

Reply via email to