X-Git-Url: https://code.delx.au/gnu-emacs-elpa/blobdiff_plain/9e2de34d6c42dc54148303b334dea23e630be2ba..05cf170ddfce06d15b5d7793189dc4a841e41676:/packages/company/company-xcode.el diff --git a/packages/company/company-xcode.el b/packages/company/company-xcode.el index ac8d13345..c7a6f80a2 100644 --- a/packages/company/company-xcode.el +++ b/packages/company/company-xcode.el @@ -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 @@ -26,7 +26,7 @@ ;;; Code: (require 'company) -(eval-when-compile (require 'cl)) +(require 'cl-lib) (defgroup company-xcode nil "Completion back-end for Xcode projects." @@ -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)))) @@ -109,7 +108,7 @@ valid in most contexts." (defun company-xcode (command &optional arg &rest ignored) "`company-mode' completion back-end for Xcode projects." (interactive (list 'interactive)) - (case command + (cl-case command (interactive (company-begin-backend 'company-xcode)) (prefix (and company-xcode-xcodeindex-executable (company-xcode-tags)