X-Git-Url: https://code.delx.au/gnu-emacs-elpa/blobdiff_plain/3c14efee3370a063cfd5b625e817aaadc394c443..3a2d33c03ac0213ab8ec4013e791d3b516f4e052:/packages/company/company-yasnippet.el diff --git a/packages/company/company-yasnippet.el b/packages/company/company-yasnippet.el index 741a16008..f0a7c380d 100644 --- a/packages/company/company-yasnippet.el +++ b/packages/company/company-yasnippet.el @@ -25,11 +25,17 @@ ;;; Code: +(require 'company) (require 'cl-lib) -(require 'yasnippet) + +(declare-function yas--table-hash "yasnippet") +(declare-function yas--get-snippet-tables "yasnippet") +(declare-function yas-expand-snippet "yasnippet") +(declare-function yas--template-content "yasnippet") +(declare-function yas--template-expand-env "yasnippet") (defun company-yasnippet--candidates (prefix) - (mapcan + (cl-mapcan (lambda (table) (let ((keyhash (yas--table-hash table)) res) @@ -80,7 +86,7 @@ shadow back-ends that come after it. Recommended usages: (prefix ;; Should probably use `yas--current-key', but that's bound to be slower. ;; How many trigger keys start with non-symbol characters anyway? - (and yas-minor-mode + (and (bound-and-true-p yas-minor-mode) (company-grab-symbol))) (annotation (concat