From 6422b3e7efb554bbfc8b9d9f051402d9097573b1 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Wed, 3 Apr 2013 11:16:33 +0400 Subject: [PATCH] company-elisp--candidates-predicate: Consider backquote --- company-elisp.el | 2 +- company-tests.el | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) 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) -- 2.39.2