]> code.delx.au - gnu-emacs-elpa/commitdiff
Closes #281: jit-load in reverse order to maintain coherence with `yas-snippet-dirs`
authorJoão Távora <joaotavora@gmail.com>
Wed, 15 Aug 2012 14:09:59 +0000 (15:09 +0100)
committerJoão Távora <joaotavora@gmail.com>
Wed, 15 Aug 2012 14:09:59 +0000 (15:09 +0100)
yasnippet-tests.el
yasnippet.el

index eb1a2452fbdc223e10754d11af92996645652992..91671b75a1c365e0a2d98fc978e118a3d0898b4f 100644 (file)
@@ -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"))))
index 603ac0230d6e953b531d831a6644b1c7d187c7e5..03c532582c3e0a6ad7bd8d727300ad35152dd1f5 100644 (file)
@@ -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))