[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 250ca1c 088/173: Add company-etags-everywhere
From: |
Dmitry Gutov |
Subject: |
[elpa] master 250ca1c 088/173: Add company-etags-everywhere |
Date: |
Thu, 23 Jun 2016 00:28:40 +0000 (UTC) |
branch: master
commit 250ca1c395c6f05b733abce69a2d928b6cd31618
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>
Add company-etags-everywhere
https://github.com/redguardtoo/emacs.d/commit/2ff305c1ddd7faff6dc9fa0869e39f1e9ed1182d#commitcomment-14837584
---
NEWS.md | 1 +
company-etags.el | 15 +++++++++++++--
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/NEWS.md b/NEWS.md
index 6e92cce..b3ab123 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -2,6 +2,7 @@
## Next
+* New user option `company-etags-everywhere`.
* `company-yasnippet` supports `yas-key-syntaxes` better. But we use them in
the
reverse order, preferring the longest key prefix that matches anything. And
we
only consider trigger key prefixes that are at least as long as the symbol at
diff --git a/company-etags.el b/company-etags.el
index d1f6aaa..ef53213 100644
--- a/company-etags.el
+++ b/company-etags.el
@@ -45,6 +45,15 @@ buffer automatically."
:type 'boolean
:package-version '(company . "0.7.3"))
+(defcustom company-etags-everywhere nil
+ "Non-nil to offer completions in comments and strings.
+Set it to t or to a list of major modes."
+ :type '(choice (const :tag "Off" nil)
+ (const :tag "Any supported mode" t)
+ (repeat :tag "Some major modes"
+ (symbol :tag "Major mode")))
+ :package-version '(company . "0.9.0"))
+
(defvar company-etags-modes '(prog-mode c-mode objc-mode c++-mode java-mode
jde-mode pascal-mode perl-mode python-mode))
@@ -80,8 +89,10 @@ buffer automatically."
(interactive (list 'interactive))
(cl-case command
(interactive (company-begin-backend 'company-etags))
- (prefix (and (apply 'derived-mode-p company-etags-modes)
- (not (company-in-string-or-comment))
+ (prefix (and (apply #'derived-mode-p company-etags-modes)
+ (or (eq t company-etags-everywhere)
+ (apply #'derived-mode-p company-etags-everywhere)
+ (not (company-in-string-or-comment)))
(company-etags-buffer-table)
(or (company-grab-symbol) 'stop)))
(candidates (company-etags--candidates arg))
- [elpa] master 33f7bbc 077/173: Fix some compilation warnings, (continued)
- [elpa] master 33f7bbc 077/173: Fix some compilation warnings, Dmitry Gutov, 2016/06/22
- [elpa] master d39b956 059/173: Introduce company-indent-or-complete-common, Dmitry Gutov, 2016/06/22
- [elpa] master 478f124 087/173: company-dabbrev-code-modes: Improve Customize labels, Dmitry Gutov, 2016/06/22
- [elpa] master 4a6eea9 089/173: Use company-dabbrev-char-regexp more consistently (#433), Dmitry Gutov, 2016/06/22
- [elpa] master a3858be 086/173: Ignore trigger key prefixes that are shorter than symbol-at-point, Dmitry Gutov, 2016/06/22
- [elpa] master 3726fe2 093/173: [ci skip] Use the "generic" language, Dmitry Gutov, 2016/06/22
- [elpa] master 946c798 095/173: Handle empty list of candidates, Dmitry Gutov, 2016/06/22
- [elpa] master c656b25 079/173: Merge pull request #418 from PythonNut/master, Dmitry Gutov, 2016/06/22
- [elpa] master 931e758 101/173: Fix the workaround, Dmitry Gutov, 2016/06/22
- [elpa] master 049b0e6 048/173: company--begin-new: Check the value of c, Dmitry Gutov, 2016/06/22
- [elpa] master 250ca1c 088/173: Add company-etags-everywhere,
Dmitry Gutov <=
- [elpa] master 21da29b 082/173: Update copyright, Dmitry Gutov, 2016/06/22
- [elpa] master cec8779 075/173: Introduce company-search-regexp-function, Dmitry Gutov, 2016/06/22
- [elpa] master 6165cb2 083/173: Don't "adjust key" (#422), Dmitry Gutov, 2016/06/22
- [elpa] master e5177c9 105/173: Add company-tooltip-annotation-selection face, Dmitry Gutov, 2016/06/22
- [elpa] master 75e21f6 045/173: company-css: Support web-mode, Dmitry Gutov, 2016/06/22
- [elpa] master e6ea779 004/173: Add `company-diag', Dmitry Gutov, 2016/06/22
- [elpa] master 0b37d17 044/173: company-mode: Mention the sorting order, Dmitry Gutov, 2016/06/22
- [elpa] master c6af7d2 061/173: Mention the previous change in NEWS [ci skip], Dmitry Gutov, 2016/06/22
- [elpa] master 5d68a50 069/173: [Fix #317] Allow :sorted keyword in grouped backends, Dmitry Gutov, 2016/06/22
- [elpa] master 87351aa 073/173: Double space, Dmitry Gutov, 2016/06/22