From 29794b77ddf1dbecc953d547b15e29aa12374bc1 Mon Sep 17 00:00:00 2001 From: Dominik Honnef Date: Fri, 16 Aug 2013 13:03:40 -0400 Subject: [PATCH] misc/emacs: godef: print the entire description, not just the first line 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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/misc/emacs/go-mode.el b/misc/emacs/go-mode.el index 5a0048045e..88a66364fa 100644 --- a/misc/emacs/go-mode.el +++ b/misc/emacs/go-mode.el @@ -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) -- 2.48.1