Added directory to yas/root-directory automatically when loaded.

This commit is contained in:
Zhang Chiyuan 2008-05-22 05:39:56 +00:00
parent 31865ae984
commit 395e0a93e7

View File

@ -1039,8 +1039,7 @@ name. And under each subdirectory, each file is a definition
of a snippet. The file name is the trigger key and the of a snippet. The file name is the trigger key and the
content of the file is the template." content of the file is the template."
(interactive "DSelect the root directory: ") (interactive "DSelect the root directory: ")
(when (and (interactive-p) (when (file-directory-p directory)
(file-directory-p directory))
(add-to-list 'yas/root-directory directory)) (add-to-list 'yas/root-directory directory))
(dolist (dir (yas/directory-files directory nil)) (dolist (dir (yas/directory-files directory nil))
(yas/load-directory-1 dir)) (yas/load-directory-1 dir))