]> code.delx.au - gnu-emacs-elpa/commitdiff
company-elisp--candidates-predicate: Consider backquote
authorDmitry Gutov <dgutov@yandex.ru>
Wed, 3 Apr 2013 07:16:33 +0000 (11:16 +0400)
committerDmitry Gutov <dgutov@yandex.ru>
Wed, 3 Apr 2013 07:16:33 +0000 (11:16 +0400)
company-elisp.el
company-tests.el

index faab0b0decd848819210361d7fe40bed914cbe62..000f30c7f43a9bd48e7b4be8966550e290b61d3d 100644 (file)
@@ -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
index 33437d8505a7209e6682da8a35924c5dac7f95c2..fdc218952d4808a193fdc62169d5479bb45f7c2c 100644 (file)
                   (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)