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.
This commit is contained in:
Joao Tavora 2014-01-06 18:03:11 +00:00
parent 3002043496
commit 0f8c2ab438
2 changed files with 14 additions and 0 deletions

View File

@ -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:

View 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))))