]> gitweb.factorcode.org Git - factor.git/commitdiff
vocabs: only notify vocab-observers if we are creating a new vocab.
authorJohn Benediktsson <mrjbq7@gmail.com>
Wed, 6 Mar 2013 05:13:45 +0000 (21:13 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Wed, 6 Mar 2013 05:13:45 +0000 (21:13 -0800)
core/vocabs/vocabs.factor

index 256b15601f2ae4cfe0383ad104896446cd8cba3f..e197dff51000458492e5eb0292cb25cb411dd7c2 100644 (file)
@@ -91,9 +91,8 @@ GENERIC: vocab-changed ( vocab obj -- )
     vocab-observers get [ vocab-changed ] with each ;
 
 : create-vocab ( name -- vocab )
-    check-vocab-name
-    dictionary get [ <vocab> ] cache
-    dup notify-vocab-observers ;
+    check-vocab-name dictionary get
+    [ <vocab> dup notify-vocab-observers ] cache ;
 
 ERROR: no-vocab name ;