Created
May 3, 2012 20:57
-
-
Save shishi/2589410 to your computer and use it in GitHub Desktop.
fix cooprate with yasnippet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun ac-yasnippet-candidates () | |
(with-no-warnings | |
(if (>= (string-to-number yas/version) 0.7) | |
(apply 'append (mapcar 'ac-yasnippet-candidate-1 (yas/get-snippet-tables))) | |
(if (fboundp 'yas/get-snippet-tables) | |
;; >0.6.0 | |
(apply 'append (mapcar 'ac-yasnippet-candidate-1 (yas/get-snippet-tables major-mode))) | |
(let ((table | |
(if (fboundp 'yas/snippet-table) | |
;; <0.6.0 | |
(yas/snippet-table major-mode) | |
;; 0.6.0 | |
(yas/current-snippet-table)))) | |
(if table | |
(ac-yasnippet-candidate-1 table))))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment