]> Cypherpunks repositories - gostls13.git/commitdiff
misc/emacs: godef: print the entire description, not just the first line
authorDominik Honnef <dominik.honnef@gmail.com>
Fri, 16 Aug 2013 17:03:40 +0000 (13:03 -0400)
committerAlan Donovan <adonovan@google.com>
Fri, 16 Aug 2013 17:03:40 +0000 (13:03 -0400)
When identifying structs or interfaces we really want to know
their makeup, not just their name.

R=adonovan
CC=golang-dev
https://golang.org/cl/13042043

misc/emacs/go-mode.el

index 5a0048045e56bf1caa153ddfa1e17be10ae9de3a..88a66364fa0817b8e28e8cbf807247d2440c5206 100644 (file)
@@ -973,10 +973,10 @@ description at POINT."
   "Describe the expression at POINT."
   (interactive "d")
   (condition-case nil
-      (let ((description (nth 1 (godef--call point))))
-        (if (string= "" description)
+      (let ((description (cdr (butlast (godef--call point) 1))))
+        (if (not description)
             (message "No description found for expression at point")
-          (message "%s" description)))
+          (message "%s" (mapconcat 'identity description "\n"))))
     (file-error (message "Could not run godef binary"))))
 
 (defun godef-jump (point &optional other-window)