emacs-elpa-diffs
[Top][All Lists]
Advanced

[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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]