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

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

[nongnu] elpa/go-mode 64be4a3 249/495: Merge branch 'godoc_mode'


From: ELPA Syncer
Subject: [nongnu] elpa/go-mode 64be4a3 249/495: Merge branch 'godoc_mode'
Date: Sat, 7 Aug 2021 09:05:25 -0400 (EDT)

branch: elpa/go-mode
commit 64be4a31390a62d248da5c0509aaa0de09b8e4f4
Merge: 7041a20 aa032d9
Author: Dominik Honnef <dominik@honnef.co>
Commit: Dominik Honnef <dominik@honnef.co>

    Merge branch 'godoc_mode'
---
 AUTHORS    | 1 +
 go-mode.el | 6 +++++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/AUTHORS b/AUTHORS
index 8c7e6df..4010f5f 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -26,5 +26,6 @@ RĂ¼diger Sonderfeld <ruediger@c-plusplus.net>
 Sameer Ajmani <sameer@golang.org>
 Scott Lawrence <bytbox@gmail.com>
 Steven Elliot Harris <seharris@gmail.com>
+Taiki Sugawara <buzz.taiki@gmail.com>
 Viacheslav Chimishuk <vchimishuk@yandex-team.ru>
 Yasuyuki Oka <yasuyk@gmail.com>
diff --git a/go-mode.el b/go-mode.el
index e519d60..71fe692 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -1069,13 +1069,17 @@ 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."
+  (view-mode-enter))
+
 ;;;###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]