no need for a separate yas/compile-bundle-for-elpa function

This commit is contained in:
Zhang Chiyuan 2009-02-10 05:34:27 +00:00
parent 29d3991eb7
commit 51bd26520c

View File

@ -1040,17 +1040,6 @@ foo\"bar\\! -> \"foo\\\"bar\\\\!\""
t) t)
"\"")) "\""))
(defun yas/compile-bundle-for-elpa
(&optional yasnippet yasnippet-bundle snippet-roots code)
"Compile bundle for ELPA, add autoloads so that ELPA can
generate code to load and activate YASnippet."
(yas/compile-bundle
yasnippet yasnippet-bundle snippet-roots
(concat (or code "")
"\n(yas/initialize-bundle)"
"\n;;;###autoload" ; break through so that won't
"(require 'yasnippet-bundle)"))) ; be treated as magic comment
(defun yas/compile-bundle (defun yas/compile-bundle
(&optional yasnippet yasnippet-bundle snippet-roots code) (&optional yasnippet yasnippet-bundle snippet-roots code)
"Compile snippets in SNIPPET-ROOTS to a single bundle file. "Compile snippets in SNIPPET-ROOTS to a single bundle file.
@ -1071,7 +1060,9 @@ all the parameters:
(when (null snippet-roots) (when (null snippet-roots)
(setq snippet-roots '("snippets"))) (setq snippet-roots '("snippets")))
(when (null code) (when (null code)
(setq code "(yas/initialize-bundle)")) (setq code (concat "(yas/initialize-bundle)"
"\n;;;###autoload" ; break through so that won't
"(require 'yasnippet-bundle)"))) ; be treated as magic comment
(let ((dirs (or (and (listp snippet-roots) snippet-roots) (let ((dirs (or (and (listp snippet-roots) snippet-roots)
(list snippet-roots))) (list snippet-roots)))