From bea8b7906f8771ee7b875112753f9726f0b921db Mon Sep 17 00:00:00 2001 From: "Matthew L. Fidler" Date: Sat, 30 Jun 2012 18:45:34 -0500 Subject: [PATCH] Bug Fix for loading snippets. Load snippet directory should load snippets/emacs-lisp-mode, but doesn't without this fix. It also makes compile snippet directory work correctly. Signed-off-by: Matthew L. Fidler --- yasnippet.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/yasnippet.el b/yasnippet.el index 57e95898..9b4a8796 100644 --- a/yasnippet.el +++ b/yasnippet.el @@ -1685,7 +1685,8 @@ Optional USE-JIT use jit-loading of snippets." (interactive "DSelect the root directory: ") (unless yas/snippet-dirs (setq yas/snippet-dirs top-level-dir)) - (dolist (dir (yas/subdirs top-level-dir)) + (dolist (dir (or (yas/subdirs top-level-dir) + (list (expand-file-name "." top-level-dir)))) (let* ((major-mode-and-parents (yas/compute-major-mode-and-parents (concat dir "/dummy"))) (mode-sym (car major-mode-and-parents))