X-Git-Url: https://code.delx.au/gnu-emacs-elpa/blobdiff_plain/0be25795c6746f8f2a16e1381f7bfadb688e4b9e..9b2fd75a0fa983c4c0accd0eae42bbe8c9bebb6c:/company-dabbrev-code.el diff --git a/company-dabbrev-code.el b/company-dabbrev-code.el index f348a18af..31ffdd252 100644 --- a/company-dabbrev-code.el +++ b/company-dabbrev-code.el @@ -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)