]> code.delx.au - gnu-emacs-elpa/commitdiff
company-dabbrev--search-buffer: Save match data
authorDmitry Gutov <dgutov@yandex.ru>
Thu, 2 Apr 2015 02:41:20 +0000 (05:41 +0300)
committerDmitry Gutov <dgutov@yandex.ru>
Thu, 2 Apr 2015 02:41:20 +0000 (05:41 +0300)
company-dabbrev.el

index 7dd874be4c74b8cc96ba3d01821d43951ed248b6..2ab4303e3e76f7bb375bd2b1c74caeca721b727f 100644 (file)
@@ -111,14 +111,14 @@ This variable affects both `company-dabbrev' and `company-dabbrev-code'."
       ;; search before pos
       (company-dabrev--time-limit-while (re-search-backward regexp nil t)
           start limit
-        (if (and ignore-comments (company-in-string-or-comment))
+        (if (and ignore-comments (save-match-data (company-in-string-or-comment)))
             (goto-char (nth 8 (syntax-ppss)))
           (maybe-collect-match)))
       (goto-char (or pos (point-min)))
       ;; search after pos
       (company-dabrev--time-limit-while (re-search-forward regexp nil t)
           start limit
-        (if (and ignore-comments (company-in-string-or-comment))
+        (if (and ignore-comments (save-match-data (company-in-string-or-comment)))
             (re-search-forward "\\s>\\|\\s!\\|\\s\"" nil t)
           (maybe-collect-match)))
       symbols)))