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

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

[nongnu] elpa/yasnippet-snippets 98571357aa 07/13: *yasnippet-snippets.e


From: ELPA Syncer
Subject: [nongnu] elpa/yasnippet-snippets 98571357aa 07/13: *yasnippet-snippets.el: avoid duplicate loading the snippets (#468)
Date: Fri, 5 Jan 2024 07:00:46 -0500 (EST)

branch: elpa/yasnippet-snippets
commit 98571357aadb432d83ee167696c93244e386afe6
Author: lin.sun <sunlin7@hotmail.com>
Commit: GitHub <noreply@github.com>

    *yasnippet-snippets.el: avoid duplicate loading the snippets (#468)
---
 yasnippet-snippets.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/yasnippet-snippets.el b/yasnippet-snippets.el
index 3378be8f09..d50b895b3a 100644
--- a/yasnippet-snippets.el
+++ b/yasnippet-snippets.el
@@ -49,8 +49,9 @@
   ;; NOTE: we add the symbol `yasnippet-snippets-dir' rather than its
   ;; value, so that yasnippet will automatically find the directory
   ;; after this package is updated (i.e., moves directory).
-  (add-to-list 'yas-snippet-dirs 'yasnippet-snippets-dir t)
-  (yas--load-snippet-dirs))
+  (unless (member 'yasnippet-snippets-dir yas-snippet-dirs)
+    (add-to-list 'yas-snippet-dirs 'yasnippet-snippets-dir t)
+    (yas--load-snippet-dirs)))
 
 (defgroup yasnippet-snippets nil
   "Options for yasnippet setups.



reply via email to

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