From 6df84617d69bce8b2f108e93300d572069d2f6b8 Mon Sep 17 00:00:00 2001
From: Slava Pestov <slava@factorcode.org>
Date: Wed, 9 Jan 2008 17:53:55 -0500
Subject: [PATCH] Rename reload-vocab to reload

---
 core/vocabs/loader/loader-docs.factor |  6 +++---
 core/vocabs/loader/loader.factor      | 16 +++++++++-------
 2 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/core/vocabs/loader/loader-docs.factor b/core/vocabs/loader/loader-docs.factor
index ec56cc8645..899d50407f 100755
--- a/core/vocabs/loader/loader-docs.factor
+++ b/core/vocabs/loader/loader-docs.factor
@@ -19,7 +19,7 @@ $nl
 "While " { $link POSTPONE: USE: } " and " { $link POSTPONE: USING: } " load vocabularies which have not been loaded before adding them to the search path, it is also possible to load a vocabulary without adding it to the search path:"
 { $subsection require }
 "Forcing a reload of a vocabulary, even if it has already been loaded:"
-{ $subsection reload-vocab }
+{ $subsection reload }
 "Application vocabularies can define a main entry point, giving the user a convenient way to run the application:"
 { $subsection POSTPONE: MAIN: }
 { $subsection run }
@@ -94,7 +94,7 @@ HELP: load-vocab-from-root
 { $values { "root" "a pathname string" } { "name" "a vocabulary name" } }
 { $description "Loads a vocabulary's source code and documentation." } ;
 
-HELP: reload-vocab
+HELP: reload
 { $values { "name" "a vocabulary name" } }
 { $description "Loads it's source code and documentation." }
 { $errors "Throws a " { $link no-vocab } " error if the vocabulary does not exist on disk." } ;
@@ -102,7 +102,7 @@ HELP: reload-vocab
 HELP: require
 { $values { "vocab" "a vocabulary specifier" } }
 { $description "Loads a vocabulary if it has not already been loaded." }
-{ $notes "To unconditionally reload a vocabulary, use " { $link reload-vocab } ". To reload changed source files, use " { $link refresh } " or " { $link refresh-all } "." } ;
+{ $notes "To unconditionally reload a vocabulary, use " { $link reload } ". To reload changed source files, use " { $link refresh } " or " { $link refresh-all } "." } ;
 
 HELP: run
 { $values { "vocab" "a vocabulary specifier" } }
diff --git a/core/vocabs/loader/loader.factor b/core/vocabs/loader/loader.factor
index f8049de4cd..20dbe7594f 100755
--- a/core/vocabs/loader/loader.factor
+++ b/core/vocabs/loader/loader.factor
@@ -96,12 +96,14 @@ SYMBOL: load-help?
         nip no-vocab
     ] if ;
 
-: reload-vocab ( name -- )
-    dup find-vocab-root dup [
-        swap load-vocab-from-root
-    ] [
-        drop no-vocab
-    ] if ;
+: reload ( name -- )
+    [
+        dup find-vocab-root dup [
+            swap load-vocab-from-root
+        ] [
+            drop no-vocab
+        ] if
+    ] with-compiler-errors ;
 
 : require ( vocab -- )
     load-vocab drop ;
@@ -166,7 +168,7 @@ M: vocab (load-vocab)
     [ swap vocab-name amend-vocab-from-root ] when* ;
 
 M: string (load-vocab)
-    [ ".private" ?tail drop reload-vocab ] keep vocab ;
+    [ ".private" ?tail drop reload ] keep vocab ;
 
 M: vocab-link (load-vocab)
     vocab-name (load-vocab) ;