]> code.delx.au - gnu-emacs-elpa/commitdiff
Add `yas-after-reload-hook' and run it at the end of `yas-reload-all'
authorJoao Tavora <joaotavora@gmail.com>
Mon, 6 Jan 2014 18:03:11 +0000 (18:03 +0000)
committerJoao Tavora <joaotavora@gmail.com>
Mon, 6 Jan 2014 18:09:51 +0000 (18:09 +0000)
See https://github.com/pezra/rspec-mode/pull/75 for the discussion leading up to
this change.

ChangeLog
yasnippet.el

index 483f2ac3dfb70d7d1f6050545fec3fbb6bceb21c..c7355338ffef9823c6d521528497130d5f68c138 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-01-06  João Távora  <joaotavora@gmail.com>
+
+       * yasnippet.el (yas-reload-all): run `yas-after-reload-hook'.
+       (yas-after-reload-hook): add it.
+
 2013-12-31  João Távora  <joaotavora@gmail.com>
 
        * yasnippet.el (require): require cl-lib during byte-compilation
@@ -16,3 +21,8 @@
        * README.mdown: Add Travis CI badge.
 
        * .travis.yml: new file
+
+
+;; Local Variables:
+;; coding: utf-8
+;; End:
index 98ace6a7cca73b8e3bbc342cf111d50a7b661fd1..269d0080d9f1d6fa8e1f463fe4441619f7d8b3af 100644 (file)
@@ -1931,10 +1931,14 @@ loading."
       ;;
       (yas-direct-keymaps-reload)
 
+      (run-hooks 'yas-after-reload-hook)
       (yas--message 3 "Reloaded everything%s...%s."
                    (if interactive "" " (snippets will load just-in-time)")
                    (if errors " (some errors, check *Messages*)" "")))))
 
+(defvar yas-after-reload-hook nil
+  "Hooks run after `yas-reload-all'.")
+
 (defun yas--load-pending-jits ()
   (dolist (mode (yas--modes-to-activate))
     (let ((funs (reverse (gethash mode yas--scheduled-jit-loads))))