X-Git-Url: https://code.delx.au/gnu-emacs-elpa/blobdiff_plain/2c0f29abb2928f672043cf97d689770bd2265064..2d44e7fef7e7388759518cba1a424495119679d1:/packages/company/company-xcode.el diff --git a/packages/company/company-xcode.el b/packages/company/company-xcode.el index b558fe806..91ae60b85 100644 --- a/packages/company/company-xcode.el +++ b/packages/company/company-xcode.el @@ -1,4 +1,4 @@ -;;; company-xcode.el --- A company-mode completion back-end for Xcode projects +;;; company-xcode.el --- company-mode completion back-end for Xcode projects ;; Copyright (C) 2009-2011 Free Software Foundation, Inc. @@ -26,11 +26,14 @@ ;;; Code: (require 'company) -(eval-when-compile (require 'cl)) +(require 'cl-lib) + +(defgroup company-xcode nil + "Completion back-end for Xcode projects." + :group 'company) (defcustom company-xcode-xcodeindex-executable (executable-find "xcodeindex") "Location of xcodeindex executable." - :group 'company-xcode :type 'file) (defvar company-xcode-tags nil) @@ -50,7 +53,6 @@ valid in most contexts." :set (lambda (variable value) (set variable value) (company-xcode-reset)) - :group 'company-xcode :type '(set (const "Category") (const "Class") (const "Class Method") (const "Class Variable") (const "Constant") (const "Enum") (const "Field") (const "Instance Method") @@ -60,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) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -105,9 +106,9 @@ valid in most contexts." company-xcode-tags)))))) ;;;###autoload (defun company-xcode (command &optional arg &rest ignored) - "A `company-mode' completion back-end for Xcode projects." + "`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)