]> code.delx.au - gnu-emacs-elpa/blobdiff - packages/company/company-semantic.el
* packages/company/company-xcode.el (company-xcode-fetch): Avoid add-to-list
[gnu-emacs-elpa] / packages / company / company-semantic.el
index 372a6f6c9e60ba93f007043568a3489b4d87a433..6c020a30f70ba4eaed2730b0d1c1ea4549ca716e 100644 (file)
@@ -26,7 +26,7 @@
 ;;; Code:
 
 (require 'company)
-(eval-when-compile (require 'cl))
+(require 'cl-lib)
 
 (defvar semantic-idle-summary-function)
 (declare-function semantic-documentation-for-tag "semantic/doc" )
@@ -49,9 +49,8 @@
 
 (defvar company-semantic-modes '(c-mode c++-mode jde-mode java-mode))
 
-(defvar company-semantic--current-tags nil
+(defvar-local company-semantic--current-tags nil
   "Tags for the current context.")
-(make-variable-buffer-local 'company-semantic--current-tags)
 
 (defun company-semantic-documentation-for-tag (tag)
   (when (semantic-tag-buffer tag)
@@ -121,7 +120,7 @@ Symbols are chained by \".\" or \"->\"."
 (defun company-semantic (command &optional arg &rest ignored)
   "`company-mode' completion back-end using CEDET Semantic."
   (interactive (list 'interactive))
-  (case command
+  (cl-case command
     (interactive (company-begin-backend 'company-semantic))
     (prefix (and (featurep 'semantic)
                  (semantic-active-p)