]> gitweb.factorcode.org Git - factor.git/commitdiff
Remove useless declarations
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Mon, 23 Mar 2009 06:18:24 +0000 (01:18 -0500)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Mon, 23 Mar 2009 06:18:24 +0000 (01:18 -0500)
basis/environment/environment-docs.factor
basis/farkup/farkup-docs.factor
basis/help/syntax/syntax.factor
basis/io/encodings/strict/strict-docs.factor
basis/io/files/unique/unique-docs.factor
basis/lists/lists-docs.factor

index b48a7a01add7b4cdf9774ca6966a90e6454fc84c..0f88181f28a3de964e32b14203f8f07eb1cbeb65 100644 (file)
@@ -17,7 +17,7 @@ HELP: (set-os-envs)
 { $notes "In most cases, use " { $link set-os-envs } " instead." } ;
 
 
-HELP: os-env ( key -- value )
+HELP: os-env
 { $values { "key" string } { "value" string } }
 { $description "Looks up the value of a shell environment variable." }
 { $examples
@@ -39,14 +39,14 @@ HELP: set-os-envs
     "Names and values of environment variables are operating system-specific. Windows NT allows values up to 32766 characters in length."
 } ;
 
-HELP: set-os-env ( value key -- )
+HELP: set-os-env
 { $values { "value" string } { "key" string } }
 { $description "Set an environment variable." }
 { $notes
     "Names and values of environment variables are operating system-specific."
 } ;
 
-HELP: unset-os-env ( key -- )
+HELP: unset-os-env
 { $values { "key" string } }
 { $description "Unset an environment variable." }
 { $notes
index 8c6b07a01c61a866a5b2405842d3b96abd5c958c..036f0d667a488c9139df673507ed7451cc1a705c 100644 (file)
@@ -9,7 +9,7 @@ HELP: write-farkup
 { $values { "string" string } }
 { $description "Parse a Farkup string and writes the resulting HTML to " { $link output-stream } "." } ;
 
-HELP: parse-farkup ( string -- farkup )
+HELP: parse-farkup
 { $values { "string" string } { "farkup" "a Farkup syntax tree node" } }
 { $description "Parses Farkup and outputs a tree of " { $link "farkup-ast" } "." } ;
 
index 044768aec2f8ad7712db0ed0ac785e675803f3a9..1844d18d944c9ba56dc24e9aa61431e1a88590a9 100644 (file)
@@ -1,4 +1,4 @@
-! Copyright (C) 2005, 2008 Slava Pestov.
+! Copyright (C) 2005, 2009 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors arrays kernel parser sequences words help
 help.topics namespaces vocabs definitions compiler.units
@@ -7,17 +7,13 @@ IN: help.syntax
 
 SYNTAX: HELP:
     scan-word bootstrap-word
-    dup set-word
-    dup >link save-location
-    \ ; parse-until >array swap set-word-help ;
+    [ >link save-location ] [ [ \ ; parse-until >array ] dip set-word-help ] bi ;
 
 SYNTAX: ARTICLE:
     location [
-        \ ; parse-until >array [ first2 ] keep 2 tail <article>
+        \ ; parse-until >array [ first2 ] [ 2 tail ] bi <article>
         over add-article >link
     ] dip remember-definition ;
 
 SYNTAX: ABOUT:
-    in get vocab
-    dup changed-definition
-    scan-object >>help drop ;
+    in get vocab scan-object >>help changed-definition ;
index b7edec2de7bb80517d5ad2d01e423e0bac6d328f..d93c5dd24edde37ed41bd970add584bda579603b 100644 (file)
@@ -3,6 +3,6 @@
 USING: help.syntax help.markup ;
 IN: io.encodings.strict
 
-HELP: strict ( encoding -- strict-encoding )
-{ $values { "encoding" "an encoding descriptor" } { "strict-encoding" "a strict encoding descriptor" } }
+HELP: strict ( code -- strict )
+{ $values { "code" "an encoding descriptor" } { "strict" "a strict encoding descriptor" } }
 { $description "Makes an encoding strict, that is, in the presence of a malformed code point, an error is thrown. Note that the existence of a replacement character in a file (U+FFFD) also throws an error." } ;
index b8a4431a73ba11724afbdd7171bb58964f863ef4..74fc0450329863eaa44f97d7f94d727b7e7d52e4 100644 (file)
@@ -23,7 +23,7 @@ HELP: unique-retries
 
 { unique-length unique-retries } related-words
 
-HELP: make-unique-file ( prefix suffix -- path )
+HELP: make-unique-file
 { $values { "prefix" "a string" } { "suffix" "a string" }
 { "path" "a pathname string" } }
 { $description "Creates a file that is guaranteed not to exist in the directory stored in " { $link current-temporary-directory } ". The file name is composed of a prefix, a number of random digits and letters, and the suffix. Returns the full pathname." }
@@ -31,18 +31,18 @@ HELP: make-unique-file ( prefix suffix -- path )
 
 { unique-file make-unique-file cleanup-unique-file } related-words
 
-HELP: cleanup-unique-file ( prefix suffix quot: ( path -- ) -- )
+HELP: cleanup-unique-file
 { $values { "prefix" "a string" } { "suffix" "a string" }
 { "quot" "a quotation" } }
 { $description "Creates a file with " { $link make-unique-file } " and calls the quotation with the path name on the stack." }
 { $notes "The unique file will be deleted after calling this word." } ;
 
-HELP: unique-directory ( -- path )
+HELP: unique-directory
 { $values { "path" "a pathname string" } }
 { $description "Creates a directory in the value in " { $link current-temporary-directory } " that is guaranteed not to exist in and returns the full pathname." }
 { $errors "Throws an error if the directory cannot be created after a number of tries. The most likely error is incorrect directory permissions on the temporary directory." } ;
 
-HELP: cleanup-unique-directory ( quot -- )
+HELP: cleanup-unique-directory
 { $values { "quot" "a quotation" } }
 { $description "Creates a directory with " { $link unique-directory } " and calls the quotation with the pathname on the stack using the " { $link with-temporary-directory } " combinator. The quotation can access the " { $link current-temporary-directory } " symbol for the name of the temporary directory. Subsequent unique files will be created in this unique directory until the combinator returns." }
 { $notes "The directory will be deleted after calling this word, even if an error is thrown in the quotation. This combinator is like " { $link with-unique-directory } " but does not delete the directory." } ;
index c03a869ebd13feebbcad0b5becbbb927aa6fb2b8..8782c3d9b4082d4026140a1a2128ce005eb2d115 100644 (file)
@@ -83,10 +83,6 @@ HELP: nil?
 
 { nil nil? } related-words
 
-HELP: list? ( object -- ? )
-{ $values { "object" "an object" } { "?" "a boolean" } }
-{ $description "Returns true if the object conforms to the list protocol." } ;
-
 { 1list 2list 3list } related-words
 
 HELP: 1list