Gentoo Archives: gentoo-commits

From: "Maciej Barć" <xgqt@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/company-ebuild:master commit in: /
Date: Tue, 16 Aug 2022 23:50:44
Message-Id: 1660688193.f40b7d38a472395dac81808ab3ff57a0119c5ebc.xgqt@gentoo
1 commit: f40b7d38a472395dac81808ab3ff57a0119c5ebc
2 Author: Maciej Barć <xgqt <AT> gentoo <DOT> org>
3 AuthorDate: Tue Aug 16 22:16:33 2022 +0000
4 Commit: Maciej Barć <xgqt <AT> gentoo <DOT> org>
5 CommitDate: Tue Aug 16 22:16:33 2022 +0000
6 URL: https://gitweb.gentoo.org/proj/company-ebuild.git/commit/?id=f40b7d38
7
8 company-ebuild.el: do not require a match
9
10 Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org>
11
12 company-ebuild.el | 15 +++++++++------
13 1 file changed, 9 insertions(+), 6 deletions(-)
14
15 diff --git a/company-ebuild.el b/company-ebuild.el
16 index 8ef299d..65c5aef 100644
17 --- a/company-ebuild.el
18 +++ b/company-ebuild.el
19 @@ -228,10 +228,6 @@ COMMAND is matched with `cl-case'.
20 ARG is the completion argument for annotation and candidates."
21 (interactive (list 'interactive))
22 (cl-case command
23 - (interactive
24 - (company-begin-backend 'company-ebuild))
25 - (prefix
26 - (and (eq major-mode 'ebuild-mode) (company-grab-symbol)))
27 (annotation
28 (company-ebuild--annotation arg))
29 (candidates
30 @@ -240,7 +236,13 @@ ARG is the completion argument for annotation and candidates."
31 (string-prefix-p arg candidate t))
32 (append company-ebuild--constant-keywords
33 (company-ebuild--dynamic-keywords)
34 - (company-ebuild--executables arg))))))
35 + (company-ebuild--executables arg))))
36 + (interactive
37 + (company-begin-backend 'company-ebuild))
38 + (prefix
39 + (and (eq major-mode 'ebuild-mode) (company-grab-symbol)))
40 + (require-match
41 + nil)))
42
43 ;;;###autoload
44 (defun company-ebuild-setup ()
45 @@ -266,7 +268,8 @@ or `require' Company-Ebuild:
46 (t
47 (add-to-list 'company-backends 'company-ebuild)))
48 ;; Because some completions have length 1:
49 - (setq-local company-minimum-prefix-length 1))
50 + (setq-local company-minimum-prefix-length 1)
51 + (setq-local company-require-match nil))
52
53 ;;;###autoload
54 (add-hook 'ebuild-mode-hook 'company-ebuild-setup)