]> code.delx.au - gnu-emacs-elpa/commitdiff
company-dabbrev--search-buffer: Use `syntax-ppss' to get to the beg of str-or-cmt
authorDmitry Gutov <dgutov@yandex.ru>
Thu, 31 Jul 2014 14:15:00 +0000 (17:15 +0300)
committerDmitry Gutov <dgutov@yandex.ru>
Thu, 31 Jul 2014 14:16:28 +0000 (17:16 +0300)
Fixes #158

company-dabbrev.el

index ef63d90780ec317950961ddfb3159e713f868c9e..3d57bb5c2eb53405ab2436eb48b9f7b75860b16e 100644 (file)
@@ -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)))