* yasnippet.el (yas-reload-all): Mention if no snippets were found.

This commit is contained in:
Noam Postavsky 2017-09-24 19:11:55 -04:00
parent b1ca219706
commit ce11fd6690

View File

@ -1936,12 +1936,19 @@ prefix argument."
(yas-direct-keymaps-reload)
(run-hooks 'yas-after-reload-hook)
(yas--message (if errors 2 3)
(if no-jit "Snippets loaded %s."
"Prepared just-in-time loading of snippets %s.")
(if errors
"with some errors. Check *Messages*"
"successfully")))))
(let ((no-snippets
(cl-every (lambda (table) (= (hash-table-count table) 0))
(list yas--scheduled-jit-loads
yas--parents yas--tables))))
(yas--message (if (or no-snippets errors) 2 3)
(if no-jit "Snippets loaded %s."
"Prepared just-in-time loading of snippets %s.")
(cond (errors
"with some errors. Check *Messages*")
(no-snippets
"(but no snippets found)")
(t
"successfully")))))))
(defvar yas-after-reload-hook nil
"Hooks run after `yas-reload-all'.")