dgutov pushed a commit to branch master in repository elpa. commit a5a6eeecf0ac9bda696091ab2a88a573f2fe3fd4 Author: Dmitry Gutov <dgu...@yandex.ru> Date: Thu Jul 31 17:15:00 2014 +0300
company-dabbrev--search-buffer: Use `syntax-ppss' to get to the beg of str-or-cmt Fixes #158 --- company-dabbrev.el | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/company-dabbrev.el b/company-dabbrev.el index ef63d90..3d57bb5 100644 --- a/company-dabbrev.el +++ b/company-dabbrev.el @@ -95,7 +95,7 @@ If you set this value to nil, you may also want to set start limit (setq match (match-string-no-properties 0)) (if (and ignore-comments (company-in-string-or-comment)) - (re-search-backward "\\s<\\|\\s!\\|\\s\"\\|\\s|" nil t) + (goto-char (nth 8 (syntax-ppss))) (when (>= (length match) company-dabbrev-minimum-length) (push match symbols)))) (goto-char (or pos (point-min)))