mirror of
https://github.com/golang/go
synced 2024-11-25 18:17:56 -07:00
misc/emacs: Add tab completion for godoc command, completing from known installed packages
R=golang-dev, adonovan, bradfitz, cw, patrick.allen.higgins, sameer, ugorji CC=golang-dev https://golang.org/cl/7373051
This commit is contained in:
parent
13075ed416
commit
a969f3c247
@ -35,6 +35,7 @@
|
||||
(defconst go-type-name-regexp (concat "\\(?:[*(]\\)*\\(?:" go-identifier-regexp "\\.\\)?\\(" go-identifier-regexp "\\)"))
|
||||
|
||||
(defvar go-dangling-cache)
|
||||
(defvar go-godoc-history nil)
|
||||
|
||||
(defgroup go nil
|
||||
"Major mode for editing Go code"
|
||||
@ -476,10 +477,10 @@ you save any file, kind of defeating the point of autoloading."
|
||||
(symbol (if bounds
|
||||
(buffer-substring-no-properties (car bounds)
|
||||
(cdr bounds)))))
|
||||
(read-string (if symbol
|
||||
(completing-read (if symbol
|
||||
(format "godoc (default %s): " symbol)
|
||||
"godoc: ")
|
||||
nil nil symbol)))
|
||||
(go-packages) nil nil nil 'go-godoc-history symbol)))
|
||||
|
||||
(defun godoc--get-buffer (query)
|
||||
"Get an empty buffer for a godoc query."
|
||||
|
Loading…
Reference in New Issue
Block a user