]> gitweb.factorcode.org Git - factor.git/commitdiff
Use .factor-rc etc on Windows too, files can begin with dots just fine
authorErik Charlebois <erikcharlebois@gmail.com>
Sun, 15 May 2011 05:05:34 +0000 (01:05 -0400)
committerErik Charlebois <erikcharlebois@gmail.com>
Tue, 24 May 2011 03:36:13 +0000 (23:36 -0400)
basis/command-line/command-line-docs.factor
basis/command-line/command-line.factor
basis/editors/editors-docs.factor
basis/math/blas/config/config-docs.factor
basis/smtp/smtp-docs.factor
basis/tools/scaffold/scaffold.factor
core/vocabs/loader/loader-docs.factor

index 2ff7e7121c008fcb1901e8ecc96262cbe334978d..067360530d23b84f613e49ec6ab386a4ce011b94 100644 (file)
@@ -2,13 +2,13 @@ USING: help.markup help.syntax parser vocabs.loader strings ;
 IN: command-line
 
 HELP: run-bootstrap-init
-{ $description "Runs the bootstrap initialization file in the user's home directory, unless the " { $snippet "-no-user-init" } " command line switch was given. This file is named " { $snippet ".factor-boot-rc" } " on Unix and " { $snippet "factor-boot-rc" } " on Windows." } ;
+{ $description "Runs the bootstrap initialization file in the user's home directory, unless the " { $snippet "-no-user-init" } " command line switch was given. This file is named " { $snippet ".factor-boot-rc" } "." } ;
 
 HELP: run-user-init
-{ $description "Runs the startup initialization file in the user's home directory, unless the " { $snippet "-no-user-init" } " command line switch was given. This file is named " { $snippet ".factor-rc" } " on Unix and " { $snippet "factor-rc" } " on Windows." } ;
+{ $description "Runs the startup initialization file in the user's home directory, unless the " { $snippet "-no-user-init" } " command line switch was given. This file is named " { $snippet ".factor-rc" } "." } ;
 
 HELP: load-vocab-roots
-{ $description "Loads the newline-separated list of additional vocabulary roots from the file named " { $snippet ".factor-roots" } " on Unix and " { $snippet "factor-roots" } " on Windows." } ;
+{ $description "Loads the newline-separated list of additional vocabulary roots from the file named " { $snippet ".factor-roots" } "." } ;
 
 HELP: param
 { $values { "param" string } }
@@ -92,21 +92,21 @@ ARTICLE: "standard-cli-args" "Command line switches for general usage"
     { { $snippet "-quiet" } { "If set, " { $link run-file } " and " { $link require } " will not print load messages." } }
 } ;
 
-ARTICLE: "factor-boot-rc" "Bootstrap initialization file"
-"The bootstrap initialization file is named " { $snippet "factor-boot-rc" } " on Windows and " { $snippet ".factor-boot-rc" } " on Unix. This file can contain " { $link require } " calls for vocabularies you use frequently, and other such long-running tasks that you do not want to perform every time Factor starts."
+ARTICLE: ".factor-boot-rc" "Bootstrap initialization file"
+"The bootstrap initialization file is named " { $snippet ".factor-boot-rc" } ". This file can contain " { $link require } " calls for vocabularies you use frequently, and other such long-running tasks that you do not want to perform every time Factor starts."
 $nl
 "A word to run this file from an existing Factor session:"
 { $subsections run-bootstrap-init }
 "For example, if you changed " { $snippet ".factor-boot-rc" } " and do not want to bootstrap again, you can just invoke " { $link run-bootstrap-init } " in the listener." ;
 
-ARTICLE: "factor-rc" "Startup initialization file"
-"The startup initialization file is named " { $snippet "factor-rc" } " on Windows and " { $snippet ".factor-rc" } " on Unix. If it exists, it is run every time Factor starts."
+ARTICLE: ".factor-rc" "Startup initialization file"
+"The startup initialization file is named " { $snippet ".factor-rc" } ". If it exists, it is run every time Factor starts."
 $nl
 "A word to run this file from an existing Factor session:"
 { $subsections run-user-init } ;
 
-ARTICLE: "factor-roots" "Additional vocabulary roots file"
-"The vocabulary roots file is named " { $snippet "factor-roots" } " on Windows and " { $snippet ".factor-roots" } " on Unix. If it exists, it is loaded every time Factor starts. It contains a newline-separated list of " { $link "vocabs.roots" } "."
+ARTICLE: ".factor-roots" "Additional vocabulary roots file"
+"The vocabulary roots file is named " { $snippet ".factor-roots" } " on Windows and " { $snippet ".factor-roots" } " on Unix. If it exists, it is loaded every time Factor starts. It contains a newline-separated list of " { $link "vocabs.roots" } "."
 $nl
 "A word to run this file from an existing Factor session:"
 { $subsections load-vocab-roots } ;
@@ -114,17 +114,17 @@ $nl
 ARTICLE: "rc-files" "Running code on startup"
 "Factor looks for three optional files in your home directory."
 { $subsections
-    "factor-boot-rc"
-    "factor-rc"
-    "factor-roots"
+    ".factor-boot-rc"
+    ".factor-rc"
+    ".factor-roots"
 }
 "The " { $snippet "-no-user-init" } " command line switch will inhibit loading running of these files."
 $nl
 "If you are unsure where the files should be located, evaluate the following code:"
 { $code
     "USE: command-line"
-    "\"factor-rc\" rc-path print"
-    "\"factor-boot-rc\" rc-path print"
+    "\".factor-rc\" rc-path print"
+    "\".factor-boot-rc\" rc-path print"
 }
 "Here is an example " { $snippet ".factor-boot-rc" } " which sets up GVIM editor integration:"
 { $code
index f30182b93673e2f5fb74a13ea4cc53c9e495bc3c..88ade747d2b3cc5d0f5fb1120128f7a55e5cfedd 100644 (file)
@@ -12,22 +12,21 @@ SYMBOL: command-line
     10 special-object sift [ alien>native-string ] map ;
 
 : rc-path ( name -- path )
-    os windows? [ "." prepend ] unless
     home prepend-path ;
 
 : run-bootstrap-init ( -- )
     "user-init" get [
-        "factor-boot-rc" rc-path ?run-file
+        ".factor-boot-rc" rc-path ?run-file
     ] when ;
 
 : run-user-init ( -- )
     "user-init" get [
-        "factor-rc" rc-path ?run-file
+        ".factor-rc" rc-path ?run-file
     ] when ;
 
 : load-vocab-roots ( -- )
     "user-init" get [
-        "factor-roots" rc-path dup exists? [
+        ".factor-roots" rc-path dup exists? [
             utf8 file-lines harvest [ add-vocab-root ] each
         ] [ drop ] if
     ] when ;
index c561e7077bb3a4b55a1d1f64483ea04b1fbfa24b..c70cf3cf42db2841c6083fa69848e806c8aeb085 100644 (file)
@@ -7,7 +7,7 @@ ARTICLE: "editor" "Editor integration"
 { $subsections edit }
 "Depending on the editor you are using, you must load one of the child vocabularies of the " { $vocab-link "editors" } " vocabulary, for example " { $vocab-link "editors.emacs" } ":"
 { $code "USE: editors.emacs" }
-"If you intend to always use the same editor, it helps to have it load during stage 2 bootstrap. Place the code to load and possibly configure it in the " { $link "factor-boot-rc" } "."
+"If you intend to always use the same editor, it helps to have it load during stage 2 bootstrap. Place the code to load and possibly configure it in the " { $link ".factor-boot-rc" } "."
 $nl
 "Editor integration vocabularies store a quotation in a global variable when loaded:"
 { $subsections edit-hook }
index 826f26c64617d5ea0d662389a7a2cf63ee6bde15..25311cf7891fb1dd140e3ae4120232d3723a61ba 100644 (file)
@@ -8,7 +8,7 @@ ARTICLE: "math.blas.config" "Configuring the BLAS interface"
     blas-fortran-abi
     deploy-blas?
 }
-"The interface attempts to set default values based on the ones encountered on the Factor project's build machines. If these settings don't work with your system's BLAS, or you wish to use a commercial BLAS, you may change the global values of those variables in your " { $link "factor-rc" } ". For example, to use AMD's ACML library on Windows with " { $snippet "math.blas" } ", your " { $snippet "factor-rc" } " would look like this:"
+"The interface attempts to set default values based on the ones encountered on the Factor project's build machines. If these settings don't work with your system's BLAS, or you wish to use a commercial BLAS, you may change the global values of those variables in your " { $link ".factor-rc" } ". For example, to use AMD's ACML library on Windows with " { $snippet "math.blas" } ", your " { $snippet ".factor-rc" } " would look like this:"
 { $code """
 USING: math.blas.config namespaces ;
 "X:\\path\\to\\acml.dll" blas-library set-global
index d079b8aaf7ad6bc20385ac203d8cc32da66a01ad..b00ee6a856e29c188377951d794f437269b4c37e 100644 (file)
@@ -76,7 +76,7 @@ HELP: send-email
 } ;
 
 ARTICLE: "smtp-gmail" "Setting up SMTP with gmail"
-"If you plan to send all email from the same address, then setting variables in the global namespace is the best option. The code example below does this approach and is meant to go in your " { $link "factor-boot-rc" } "." $nl
+"If you plan to send all email from the same address, then setting variables in the global namespace is the best option. The code example below does this approach and is meant to go in your " { $link ".factor-boot-rc" } "." $nl
 "Several variables need to be set for sending outgoing mail through gmail. First, we set the login and password to a " { $link <plain-auth> } " tuple with our login. Next, we set the gmail server address with an " { $link <inet> } " object. Finally, we tell the SMTP library to use a secure connection."
 { $code
     "USING: smtp namespaces io.sockets ;"
index 3141f1d098848888dc448443cffae54658231d15..4f67c69d1854513ac854142eb220a89fb93f8082 100644 (file)
@@ -342,10 +342,10 @@ SYMBOL: examples-flag
     [ home ] dip append-path touch. ;
 
 : scaffold-factor-boot-rc ( -- )
-    os windows? "factor-boot-rc" ".factor-boot-rc" ? scaffold-rc ;
+    ".factor-boot-rc" scaffold-rc ;
 
 : scaffold-factor-rc ( -- )
-    os windows? "factor-rc" ".factor-rc" ? scaffold-rc ;
+    ".factor-rc" scaffold-rc ;
 
 
 HOOK: scaffold-emacs os ( -- )
index d3736db9bfce8c85b143df07f67bdbecb35de5a5..bcb4463e6ed114da41af9083930a2e7f053919db 100755 (executable)
@@ -10,8 +10,8 @@ $nl
 "The first way is to use an environment variable. Factor looks at the " { $snippet "FACTOR_ROOTS" } " environment variable for a list of " { $snippet ":" } "-separated paths (on Unix) or a list of " { $snippet ";" } "-separated paths (on Windows)."
 $nl
 "The second way is to create a configuration file. You can list additional vocabulary roots in a file that Factor reads at startup:"
-{ $subsections "factor-roots" }
-"Finally, you can add vocabulary roots by calling a word from your " { $snippet "factor-rc" } " file (see " { $link "factor-rc" } "):"
+{ $subsections ".factor-roots" }
+"Finally, you can add vocabulary roots by calling a word from your " { $snippet ".factor-rc" } " file (see " { $link ".factor-rc" } "):"
 { $subsections add-vocab-root } ;
 
 ARTICLE: "vocabs.roots" "Vocabulary roots"
@@ -81,7 +81,7 @@ HELP: vocab-roots
 HELP: add-vocab-root
 { $values { "root" "a pathname string" } }
 { $description "Adds a directory pathname to the list of vocabulary roots." }
-{ $see-also "factor-roots" } ;
+{ $see-also ".factor-roots" } ;
 
 HELP: find-vocab-root
 { $values { "vocab" "a vocabulary specifier" } { "path/f" "a pathname string" } }