From: João Távora Date: Wed, 15 Aug 2012 14:09:59 +0000 (+0100) Subject: Closes #281: jit-load in reverse order to maintain coherence with `yas-snippet-dirs` X-Git-Url: https://code.delx.au/gnu-emacs-elpa/commitdiff_plain/926876b1a2b08fbe326aa7d9c3eaef407a922857 Closes #281: jit-load in reverse order to maintain coherence with `yas-snippet-dirs` --- diff --git a/yasnippet-tests.el b/yasnippet-tests.el index eb1a2452f..91671b75a 100644 --- a/yasnippet-tests.el +++ b/yasnippet-tests.el @@ -247,11 +247,13 @@ TODO: correct this bug!" '((".emacs.d/snippets" ("c-mode" (".yas-parents" . "cc-mode") - ("printf" . "printf($1);")) + ("printf" . "printf($1);")) ;; notice the overriding for issue #281 ("emacs-lisp-mode" ("ert-deftest" . "(ert-deftest ${1:name} () $0)")) ("lisp-interaction-mode" (".yas-parents" . "emacs-lisp-mode"))) ("library/snippets" - ("c-mode" (".yas-parents" . "c++-mode")) + ("c-mode" + (".yas-parents" . "c++-mode") + ("printf" . "printf")) ("cc-mode" ("def" . "# define")) ("emacs-lisp-mode" ("dolist" . "(dolist)")) ("lisp-interaction-mode" ("sc" . "brother from another mother")))) diff --git a/yasnippet.el b/yasnippet.el index 603ac0230..03c532582 100644 --- a/yasnippet.el +++ b/yasnippet.el @@ -1812,6 +1812,7 @@ loading." (when yas-minor-mode (dolist (mode (yas--modes-to-activate)) (let ((forms (gethash mode yas--scheduled-jit-loads))) + ;; must reverse to maintain coherence with `yas-snippet-dirs' (dolist (form forms) (yas--message 3 "Loading for `%s', just-in-time: %s!" mode form) (eval form))