1
0
mirror of https://github.com/golang/go synced 2024-11-13 17:50:23 -07:00

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
This commit is contained in:
Dominik Honnef 2013-08-16 13:03:40 -04:00 committed by Alan Donovan
parent fbf5fd5f1e
commit 29794b77dd

View File

@ -973,10 +973,10 @@ description at POINT."
"Describe the expression at POINT." "Describe the expression at POINT."
(interactive "d") (interactive "d")
(condition-case nil (condition-case nil
(let ((description (nth 1 (godef--call point)))) (let ((description (cdr (butlast (godef--call point) 1))))
(if (string= "" description) (if (not description)
(message "No description found for expression at point") (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")))) (file-error (message "Could not run godef binary"))))
(defun godef-jump (point &optional other-window) (defun godef-jump (point &optional other-window)