]> code.delx.au - gnu-emacs-elpa/blobdiff - company-semantic.el
Added interactive form for back-ends.
[gnu-emacs-elpa] / company-semantic.el
index a30d97ea3b8f2718cd374ec3d7ffa2bbe941c41b..8ddcc199f1407923352d2d837dbe15a76a18e248 100644 (file)
@@ -2,7 +2,7 @@
 ;;
 ;; Copyright (C) 2009 Nikolaj Schumacher
 ;;
-;; This file is part of company.
+;; This file is part of company 0.2.1.
 ;;
 ;; This program is free software; you can redistribute it and/or
 ;; modify it under the terms of the GNU General Public License
           (context (semantic-analyze-current-context)))
       (all-completions prefix (semantic-ia-get-completions context (point))))))
 
+;;;###autoload
 (defun company-semantic (command &optional arg &rest ignored)
   "A `company-mode' completion back-end using CEDET Semantic."
+  (interactive (list 'interactive))
   (case command
+    ('interactive (company-begin-backend 'company-semantic))
     ('prefix (and (memq major-mode '(c-mode c++-mode jde-mode java-mode))
                   (not (company-in-string-or-comment))
                   (or (company-grab company-semantic-context-regexp 2) "")))