X-Git-Url: https://code.delx.au/gnu-emacs-elpa/blobdiff_plain/8f2c03248b5517d82588a05f357805cbb0f384ed..c6d53302b114ba50a8e48ce98b906849fded86f4:/company-xcode.el diff --git a/company-xcode.el b/company-xcode.el index 7a985aaed..56da19890 100644 --- a/company-xcode.el +++ b/company-xcode.el @@ -1,6 +1,6 @@ -;;; company-xcode.el --- company-mode completion back-end for Xcode projects +;;; company-xcode.el --- company-mode completion backend for Xcode projects -;; Copyright (C) 2009-2011 Free Software Foundation, Inc. +;; Copyright (C) 2009-2011, 2014 Free Software Foundation, Inc. ;; Author: Nikolaj Schumacher @@ -29,7 +29,7 @@ (require 'cl-lib) (defgroup company-xcode nil - "Completion back-end for Xcode projects." + "Completion backend for Xcode projects." :group 'company) (defcustom company-xcode-xcodeindex-executable (executable-find "xcodeindex") @@ -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)))) @@ -107,7 +106,7 @@ valid in most contexts." company-xcode-tags)))))) ;;;###autoload (defun company-xcode (command &optional arg &rest ignored) - "`company-mode' completion back-end for Xcode projects." + "`company-mode' completion backend for Xcode projects." (interactive (list 'interactive)) (cl-case command (interactive (company-begin-backend 'company-xcode))