[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master b188c49 07/66: Inline company-cmake--find-match
From: |
Dmitry Gutov |
Subject: |
[elpa] master b188c49 07/66: Inline company-cmake--find-match |
Date: |
Tue, 13 Jan 2015 02:44:44 +0000 |
branch: master
commit b188c49d2cceb03fcfd2d4ae29da8347ad3c2aca
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>
Inline company-cmake--find-match
---
company-cmake.el | 15 +++++----------
1 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/company-cmake.el b/company-cmake.el
index 7f29b2d..7170f71 100644
--- a/company-cmake.el
+++ b/company-cmake.el
@@ -88,14 +88,6 @@ They affect which types of symbols we get completion
candidates for.")
(puthash arg rlt company-cmake--candidates-cache))
))
-(defun company-cmake--find-match (pattern line cmd)
- (let (match)
- ;; General Flags
- (if (string-match pattern line)
- (if (setq match (match-string 1 line))
- (puthash match cmd company-cmake--meta-command-cache)))
- match))
-
(defun company-cmake--parse (prefix content cmd)
(let ((start 0)
(pattern (format company-cmake--completion-pattern
@@ -105,8 +97,11 @@ They affect which types of symbols we get completion
candidates for.")
match
rlt)
(dolist (line lines)
- (if (setq match (company-cmake--find-match pattern line cmd))
- (push match rlt)))
+ (when (string-match pattern line)
+ (let ((match (match-string 1 line)))
+ (when match
+ (puthash match cmd company-cmake--meta-command-cache)
+ (push match rlt)))))
rlt))
(defun company-cmake--candidates (prefix)
- [elpa] master eb03746 09/66: company-cmake--unexpand-candidate: Remove extra underscore, (continued)
- [elpa] master eb03746 09/66: company-cmake--unexpand-candidate: Remove extra underscore, Dmitry Gutov, 2015/01/12
- [elpa] master 28f8dc6 11/66: Update NEWS, Dmitry Gutov, 2015/01/12
- [elpa] master e5627dd 12/66: company-etags-file-table: Check that TAGS is not a directory, Dmitry Gutov, 2015/01/12
- [elpa] master e66f2c3 13/66: company-bbdb: Use the whole line content after `: ' as prefix, Dmitry Gutov, 2015/01/12
- [elpa] master 79d4b0d 10/66: company-cmake: Support G77/Fortran distinction, Dmitry Gutov, 2015/01/12
- [elpa] master 4375685 14/66: company-complete-number: Handle keypad events, Dmitry Gutov, 2015/01/12
- [elpa] master e692260 15/66: Show numbers in tooltip irrespective of scrolling, Dmitry Gutov, 2015/01/12
- [elpa] master c97666c 18/66: company-files--complete: Ignore case on appropriate systems, Dmitry Gutov, 2015/01/12
- [elpa] master 4d8ac8c 17/66: Support multiple-width chars in annotations, Dmitry Gutov, 2015/01/12
- [elpa] master ea5c4fd 05/66: More cleanup, Dmitry Gutov, 2015/01/12
- [elpa] master b188c49 07/66: Inline company-cmake--find-match,
Dmitry Gutov <=
- [elpa] master 556ee69 16/66: Bump the version for development, Dmitry Gutov, 2015/01/12
- [elpa] master ccc08c9 08/66: Eliminate one `setq', Dmitry Gutov, 2015/01/12
- [elpa] master ed86ad5 20/66: company-update-candidates: Fix WRT ignore-case, Dmitry Gutov, 2015/01/12
- [elpa] master abf95f7 19/66: company-update-candidates: Don't be fooled by a few prefix completions, Dmitry Gutov, 2015/01/12
- [elpa] master 98477e7 21/66: Reword comment, Dmitry Gutov, 2015/01/12
- [elpa] master 660cafc 22/66: company-input-noop: Use a symbol for the dummy event binding, Dmitry Gutov, 2015/01/12
- [elpa] master 7d3c5d4 23/66: company-backends: Clarify that responding to `match' is never mandatory, Dmitry Gutov, 2015/01/12
- [elpa] master bb0badd 25/66: Edit NEWS, Dmitry Gutov, 2015/01/12
- [elpa] master 67e74ce 26/66: company-backends: Add "to this command", Dmitry Gutov, 2015/01/12
- [elpa] master 0cdcd07 27/66: company-capf: Pass `sole' or 'finished' to exit-function, not `exact', Dmitry Gutov, 2015/01/12