]> code.delx.au - gnu-emacs-elpa/blobdiff - company-xcode.el
Do minor cleanup
[gnu-emacs-elpa] / company-xcode.el
index 7a985aaedc2e183bb419a1dc41b7391378738e61..c7a6f80a2e4f61dac48e661e1b4990f226187011 100644 (file)
@@ -1,6 +1,6 @@
 ;;; company-xcode.el --- company-mode completion back-end for Xcode projects
 
-;; Copyright (C) 2009-2011  Free Software Foundation, Inc.
+;; Copyright (C) 2009-2011, 2014  Free Software Foundation, Inc.
 
 ;; Author: Nikolaj Schumacher
 
@@ -62,8 +62,7 @@ valid in most contexts."
               (const "Structure") (const "Type") (const "Union")
               (const "Variable") (const "Function")))
 
-(defvar company-xcode-project 'unknown)
-(make-variable-buffer-local 'company-xcode-project)
+(defvar-local company-xcode-project 'unknown)
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
@@ -81,7 +80,7 @@ valid in most contexts."
                             "\t[^\t\n]*\t[^\t\n]*"))
             candidates)
         (while (re-search-forward regexp nil t)
-          (add-to-list 'candidates (match-string 1)))
+          (cl-pushnew (match-string 1) candidates :test #'equal))
         (message "Retrieving dump from %s...done" project-bundle)
         candidates))))