branch: master
commit 0f8c2ab4381449298d8bc8b8ee63524aaa8ba1ac
Author: Joao Tavora <[email protected]>
Commit: Joao Tavora <[email protected]>
Add `yas-after-reload-hook' and run it at the end of `yas-reload-all'
See https://github.com/pezra/rspec-mode/pull/75 for the discussion leading
up to
this change.
---
ChangeLog | 10 ++++++++++
yasnippet.el | 4 ++++
2 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 483f2ac..c735533 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-01-06 João Távora <[email protected]>
+
+ * yasnippet.el (yas-reload-all): run `yas-after-reload-hook'.
+ (yas-after-reload-hook): add it.
+
2013-12-31 João Távora <[email protected]>
* 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:
diff --git a/yasnippet.el b/yasnippet.el
index 98ace6a..269d008 100644
--- a/yasnippet.el
+++ b/yasnippet.el
@@ -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))))