X-Git-Url: https://code.delx.au/gnu-emacs-elpa/blobdiff_plain/1acf9ec859d39ee5c1a04cbb4d4bcf51fcb41788..79dbe65384654386166aa2c10d2ee56469aa3474:/packages/company/company-xcode.el diff --git a/packages/company/company-xcode.el b/packages/company/company-xcode.el index 1c6576453..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. @@ -21,16 +21,19 @@ ;;; Commentary: -;; +;; ;;; 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 + "Location of xcodeindex executable." :type 'file) (defvar company-xcode-tags nil) @@ -43,14 +46,13 @@ (defcustom company-xcode-types '("Class" "Constant" "Enum" "Macro" "Modeled Class" "Structure" "Type" "Union" "Function") - "*The types of symbols offered by `company-xcode'. + "The types of symbols offered by `company-xcode'. No context-enabled completion is available. Types like methods will be offered regardless of whether the class supports them. The defaults should be 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)