From: Dmitry Gutov Date: Wed, 3 Apr 2013 07:16:33 +0000 (+0400) Subject: company-elisp--candidates-predicate: Consider backquote X-Git-Url: https://code.delx.au/gnu-emacs-elpa/commitdiff_plain/6422b3e7efb554bbfc8b9d9f051402d9097573b1?ds=sidebyside company-elisp--candidates-predicate: Consider backquote --- diff --git a/company-elisp.el b/company-elisp.el index faab0b0de..000f30c7f 100644 --- a/company-elisp.el +++ b/company-elisp.el @@ -159,7 +159,7 @@ first in the candidates list." (let* ((completion-ignore-case nil) (before (char-before (- (point) (length prefix))))) (if (and company-elisp-detect-function-context - (not (eq before ?'))) + (not (memq before '(?' ?`)))) (if (and (eq before ?\() (not (save-excursion diff --git a/company-tests.el b/company-tests.el index 33437d850..fdc218952 100644 --- a/company-tests.el +++ b/company-tests.el @@ -250,6 +250,13 @@ (company-elisp--candidates-predicate "b")) 'company-elisp--predicate)))) +(ert-deftest company-elisp-candidates-predicate-in-docstring () + (company-elisp-with-buffer + "(def foo () \"Doo be doo `ide|" + (should (eq 'company-elisp--predicate + (let ((company-elisp-detect-function-context t)) + (company-elisp--candidates-predicate "ide")))))) + ;; This one's also an integration test. (ert-deftest company-elisp-candidates-recognizes-binding-form () (let ((company-elisp-detect-function-context t)