]> rtime.felk.cvut.cz Git - sojka/company-mode.git/commitdiff
Enable semantic back-end only in suitable buffers.
authorNikolaj Schumacher <git@nschum.de>
Sat, 11 Apr 2009 20:05:09 +0000 (22:05 +0200)
committerNikolaj Schumacher <git@nschum.de>
Mon, 13 Apr 2009 08:52:19 +0000 (10:52 +0200)
company-semantic.el

index 8ddcc199f1407923352d2d837dbe15a76a18e248..c6d5229d0109be769185fc503a98a06b28c05498 100644 (file)
@@ -68,6 +68,7 @@
   (case command
     ('interactive (company-begin-backend 'company-semantic))
     ('prefix (and (memq major-mode '(c-mode c++-mode jde-mode java-mode))
+                  (semantic-active-p)
                   (not (company-in-string-or-comment))
                   (or (company-grab company-semantic-context-regexp 2) "")))
     ('candidates (or (company-semantic-completions arg)