[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 01/30: Fix company-yasnippet compilation without yasnippet
From: |
Dmitry Gutov |
Subject: |
[elpa] 01/30: Fix company-yasnippet compilation without yasnippet |
Date: |
Tue, 14 Oct 2014 22:22:43 +0000 |
dgutov pushed a commit to branch master
in repository elpa.
commit c861728594efec7f3bd4f3bd374ba6115edbf323
Author: Dmitry Gutov <address@hidden>
Date: Fri Sep 19 06:39:48 2014 +0400
Fix company-yasnippet compilation without yasnippet
Closes #187
---
company-yasnippet.el | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/company-yasnippet.el b/company-yasnippet.el
index 741a160..f0a7c38 100644
--- a/company-yasnippet.el
+++ b/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
- [elpa] branch master updated (a7fe5bb -> 0750e13), Dmitry Gutov, 2014/10/14
- [elpa] 01/30: Fix company-yasnippet compilation without yasnippet,
Dmitry Gutov <=
- [elpa] 04/30: company-gtags: Don't try to complete in non-file buffers, Dmitry Gutov, 2014/10/14
- [elpa] 03/30: Merge pull request #191 from jorgenschaefer/master, Dmitry Gutov, 2014/10/14
- [elpa] 02/30: Use read-kbd-macro instead of kbd as a function., Dmitry Gutov, 2014/10/14
- [elpa] 06/30: company-search-printing-char: Don't update company-search-string when no match, Dmitry Gutov, 2014/10/14
- [elpa] 05/30: company--insert-candidate: Don't use `insert-before-markers', Dmitry Gutov, 2014/10/14
- [elpa] 07/30: company-create-match-predicate: Just replace the predicate, Dmitry Gutov, 2014/10/14
- [elpa] 08/30: company-post-command: Handle being called after quitting, Dmitry Gutov, 2014/10/14
- [elpa] 09/30: company-files.el: Change regexp prefix, Dmitry Gutov, 2014/10/14
- [elpa] 10/30: Update docstring, change words, bump copyright year, Dmitry Gutov, 2014/10/14
- [elpa] 13/30: Update a comment, Dmitry Gutov, 2014/10/14