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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master ea5c4fd 05/66: More cleanup


From: Dmitry Gutov
Subject: [elpa] master ea5c4fd 05/66: More cleanup
Date: Tue, 13 Jan 2015 02:44:43 +0000

branch: master
commit ea5c4fde97706cd680b01324fe8638e8b183af77
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    More cleanup
---
 company-cmake.el |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/company-cmake.el b/company-cmake.el
index 377c005..5e3b003 100644
--- a/company-cmake.el
+++ b/company-cmake.el
@@ -79,15 +79,16 @@ They affect which types of symbols we get completion 
candidates for.")
     ;; If hash is empty, fill it.
     (unless (gethash arg company-cmake--candidates-cache)
       (with-temp-buffer
-        (setq res (call-process company-cmake-executable nil t nil arg))
-        (unless (eq 0 res)
-          (message "cmake executable exited with error=%d" res))
+        (let ((res 0))
+          (setq res (call-process company-cmake-executable nil t nil arg))
+          (unless (eq 0 res)
+            (message "cmake executable exited with error=%d" res)))
         (setq rlt (buffer-string)))
       (setq rlt (company-cmake--replace-tags rlt))
       (puthash arg rlt company-cmake--candidates-cache))
     ))
 
-(defun company-cmake-find-match (pattern line)
+(defun company-cmake--find-match (pattern line cmd)
   (let (match)
      ;; General Flags
      (if (string-match pattern line)
@@ -101,17 +102,15 @@ They affect which types of symbols we get completion 
candidates for.")
                          (regexp-quote prefix)
                          (if (zerop (length prefix)) "+" "*")))
         (lines (split-string content "\n"))
-        (lang-patterns ())
         match
         rlt)
     (dolist (line lines)
-      (if (setq match (company-cmake-find-match pattern line))
+      (if (setq match (company-cmake--find-match pattern line cmd))
           (push match rlt)))
     rlt))
 
 (defun company-cmake--candidates (prefix)
-  (let ((res 0)
-        results
+  (let (results
         cmd-opts
         str)
 



reply via email to

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