[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/go-mode eed4af3 415/495: autocompletion while seting guru
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/go-mode eed4af3 415/495: autocompletion while seting guru scope using `completing-read-multiple' |
Date: |
Sat, 7 Aug 2021 09:05:59 -0400 (EDT) |
branch: elpa/go-mode
commit eed4af3e3f7e51148ac466e14e4e30d566e63cf5
Author: John Shahid <jvshahid@gmail.com>
Commit: Dominik Honnef <dominik@honnef.co>
autocompletion while seting guru scope using `completing-read-multiple'
Closes: gh-249 [via git-merge-pr]
---
go-guru.el | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/go-guru.el b/go-guru.el
index 89e7e7d..e030168 100644
--- a/go-guru.el
+++ b/go-guru.el
@@ -138,6 +138,11 @@
"---"
["Set pointer analysis scope..." go-guru-set-scope t]))
+(defun go-guru--read-scope ()
+ "Read go-guru-scope from the minibuffer."
+ (completing-read-multiple "guru-scope (comma-separated): "
+ (go-packages) nil nil nil 'go-guru--scope-history))
+
;;;###autoload
(defun go-guru-set-scope ()
"Set the scope for the Go guru, prompting the user to edit the previous
scope.
@@ -152,14 +157,10 @@ A pattern preceded by '-' is negative, so the scope
encoding/...,-encoding/xml
matches all encoding packages except encoding/xml."
(interactive)
- (let ((scope (read-from-minibuffer "Go guru scope: "
- go-guru-scope
- nil
- nil
- 'go-guru--scope-history)))
- (if (string-equal "" scope)
- (error "You must specify a non-empty scope for the Go guru"))
- (setq go-guru-scope scope)))
+ (let ((scope (go-guru--read-scope)))
+ (unless scope
+ (error "You must specify a non-empty scope for the Go guru"))
+ (setq go-guru-scope (string-join scope ","))))
(defun go-guru--set-scope-if-empty ()
(if (string-equal "" go-guru-scope)
- [nongnu] elpa/go-mode 6bb38ea 387/495: refactor/rename: emacs: set up autoloading of go-rename function, (continued)
- [nongnu] elpa/go-mode 6bb38ea 387/495: refactor/rename: emacs: set up autoloading of go-rename function, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 221e967 390/495: Move go-rename.el to top level, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 12ef34c 391/495: Regenerate AUTHORS, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 965dcbc 393/495: Use file name, not directory, with -srcdir flag, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode e565a58 394/495: Use goto-char, not beginning-of-buffer, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 5737e59 401/495: Regenerate AUTHORS, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode d13feb2 397/495: Remove support for XEmacs, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode bfe7a14 405/495: Fix all compilation warnings in go-guru.el, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode ff87a1e 411/495: Remove Donations section from README, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode b234d71 412/495: Remove outdated autoloads instructions from README.md, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode eed4af3 415/495: autocompletion while seting guru scope using `completing-read-multiple',
ELPA Syncer <=
- [nongnu] elpa/go-mode 791dfa5 418/495: require subr-x when interpreting go-guru.el, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode b02c6f6 414/495: Fix local variables list., ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 120fb91 419/495: Use "guru -tags=xxx yyy", not "guru -tags=xxx, yyy", ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode ed5c2cf 421/495: Fixed compiler warnings, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 77c6aae 422/495: Fix quotation marks in the gofmt doc string, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 3f60838 424/495: Move testdata under test/ directory., ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 3ba1982 427/495: Handle indentation for nested dangling operators, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode f6b1398 429/495: Fix filename handling in godoc-gogetdoc, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 00e72cd 431/495: Update default for godoc-and-godef-command, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 6b67088 432/495: Support trailing commas as dangling operators., ELPA Syncer, 2021/08/07