emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/go-mode bbaba91 246/495: Add godoc-mode


From: ELPA Syncer
Subject: [nongnu] elpa/go-mode bbaba91 246/495: Add godoc-mode
Date: Sat, 7 Aug 2021 09:05:24 -0400 (EDT)

branch: elpa/go-mode
commit bbaba91ffff253bfd9f8628c00052220f3efad02
Author: Taiki Sugawara <buzz.taiki@gmail.com>
Commit: Dominik Honnef <dominik@honnef.co>

    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

[Prev in Thread] Current Thread [Next in Thread]