]> rtime.felk.cvut.cz Git - sojka/company-mode.git/commitdiff
Extracted company-semantic-modes variable.
authorNikolaj Schumacher <git@nschum.de>
Sat, 25 Apr 2009 07:11:33 +0000 (09:11 +0200)
committerNikolaj Schumacher <git@nschum.de>
Sat, 25 Apr 2009 07:11:33 +0000 (09:11 +0200)
company-semantic.el

index 25b73f506746196752f2d341949de8fe3a814104..13b9133440abc212599c6e19320128906bcace27 100644 (file)
@@ -26,6 +26,8 @@
   :group 'company
   :type 'function)
 
+(defvar company-semantic-modes '(c-mode c++-mode jde-mode java-mode))
+
 (defun company-semantic-doc-or-summary (tag)
   (or (semantic-documentation-for-tag tag)
       (funcall semantic-idle-summary-function tag nil t)))
@@ -88,7 +90,7 @@ Symbols are chained by \".\" or \"->\"."
   (interactive (list 'interactive))
   (case command
     ('interactive (company-begin-backend 'company-semantic))
-    ('prefix (and (memq major-mode '(c-mode c++-mode jde-mode java-mode))
+    ('prefix (and (memq major-mode company-semantic-modes)
                   (semantic-active-p)
                   (not (company-in-string-or-comment))
                   (or (company-semantic--grab) 'stop)))