emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master ce11fd6 13/51: * yasnippet.el (yas-reload-all): Mention if


From: Noam Postavsky
Subject: [elpa] master ce11fd6 13/51: * yasnippet.el (yas-reload-all): Mention if no snippets were found.
Date: Sun, 13 May 2018 13:11:41 -0400 (EDT)

branch: master
commit ce11fd66900eb9f871af03dc945c85a8ac980821
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>

    * yasnippet.el (yas-reload-all): Mention if no snippets were found.
---
 yasnippet.el | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)

diff --git a/yasnippet.el b/yasnippet.el
index 8b71083..52001ed 100644
--- a/yasnippet.el
+++ b/yasnippet.el
@@ -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'.")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]