Closes #281: jit-load in reverse order to maintain coherence with yas-snippet-dirs

This commit is contained in:
João Távora 2012-08-15 15:09:59 +01:00
parent 145448b815
commit 926876b1a2
2 changed files with 5 additions and 2 deletions

View File

@ -247,11 +247,13 @@ TODO: correct this bug!"
'((".emacs.d/snippets" '((".emacs.d/snippets"
("c-mode" ("c-mode"
(".yas-parents" . "cc-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)")) ("emacs-lisp-mode" ("ert-deftest" . "(ert-deftest ${1:name} () $0)"))
("lisp-interaction-mode" (".yas-parents" . "emacs-lisp-mode"))) ("lisp-interaction-mode" (".yas-parents" . "emacs-lisp-mode")))
("library/snippets" ("library/snippets"
("c-mode" (".yas-parents" . "c++-mode")) ("c-mode"
(".yas-parents" . "c++-mode")
("printf" . "printf"))
("cc-mode" ("def" . "# define")) ("cc-mode" ("def" . "# define"))
("emacs-lisp-mode" ("dolist" . "(dolist)")) ("emacs-lisp-mode" ("dolist" . "(dolist)"))
("lisp-interaction-mode" ("sc" . "brother from another mother")))) ("lisp-interaction-mode" ("sc" . "brother from another mother"))))

View File

@ -1812,6 +1812,7 @@ loading."
(when yas-minor-mode (when yas-minor-mode
(dolist (mode (yas--modes-to-activate)) (dolist (mode (yas--modes-to-activate))
(let ((forms (gethash mode yas--scheduled-jit-loads))) (let ((forms (gethash mode yas--scheduled-jit-loads)))
;; must reverse to maintain coherence with `yas-snippet-dirs'
(dolist (form forms) (dolist (form forms)
(yas--message 3 "Loading for `%s', just-in-time: %s!" mode form) (yas--message 3 "Loading for `%s', just-in-time: %s!" mode form)
(eval form)) (eval form))