]> code.delx.au - gnu-emacs-elpa/blobdiff - company-dabbrev-code.el
Sped up dabbrev-code by skipping comment chunks.
[gnu-emacs-elpa] / company-dabbrev-code.el
index f348a18af0c7eee020c76fd98cc8708d29922a5f..31ffdd252d00ec93ae00ecedf4b18a9f02616a1b 100644 (file)
@@ -56,9 +56,10 @@ search other buffers for that many seconds and then return."
           match)
       (while (re-search-forward regexp nil t)
         (setq match (match-string-no-properties 0))
-        (unless (or (eq (match-end 0) pos) ;; ignore match before point
-                    (company-in-string-or-comment))
-          (push match symbols))
+        (if (company-in-string-or-comment)
+            (re-search-forward "\\s>\\|\\s!\\|\\s\"" nil t)
+          (unless (eq (match-end 0) pos) ;; ignore match before point
+            (push match symbols)))
         (and limit
              (eq (incf i) 25)
              (setq i 0)