Remove useless declarations

db4
Slava Pestov 2009-03-23 01:18:24 -05:00
parent 723bfab030
commit 5a9dbc2c0f
6 changed files with 14 additions and 22 deletions

View File

@ -17,7 +17,7 @@ HELP: (set-os-envs)
{ $notes "In most cases, use " { $link set-os-envs } " instead." } ; { $notes "In most cases, use " { $link set-os-envs } " instead." } ;
HELP: os-env ( key -- value ) HELP: os-env
{ $values { "key" string } { "value" string } } { $values { "key" string } { "value" string } }
{ $description "Looks up the value of a shell environment variable." } { $description "Looks up the value of a shell environment variable." }
{ $examples { $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." "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 } } { $values { "value" string } { "key" string } }
{ $description "Set an environment variable." } { $description "Set an environment variable." }
{ $notes { $notes
"Names and values of environment variables are operating system-specific." "Names and values of environment variables are operating system-specific."
} ; } ;
HELP: unset-os-env ( key -- ) HELP: unset-os-env
{ $values { "key" string } } { $values { "key" string } }
{ $description "Unset an environment variable." } { $description "Unset an environment variable." }
{ $notes { $notes

View File

@ -9,7 +9,7 @@ HELP: write-farkup
{ $values { "string" string } } { $values { "string" string } }
{ $description "Parse a Farkup string and writes the resulting HTML to " { $link output-stream } "." } ; { $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" } } { $values { "string" string } { "farkup" "a Farkup syntax tree node" } }
{ $description "Parses Farkup and outputs a tree of " { $link "farkup-ast" } "." } ; { $description "Parses Farkup and outputs a tree of " { $link "farkup-ast" } "." } ;

View 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. ! See http://factorcode.org/license.txt for BSD license.
USING: accessors arrays kernel parser sequences words help USING: accessors arrays kernel parser sequences words help
help.topics namespaces vocabs definitions compiler.units help.topics namespaces vocabs definitions compiler.units
@ -7,17 +7,13 @@ IN: help.syntax
SYNTAX: HELP: SYNTAX: HELP:
scan-word bootstrap-word scan-word bootstrap-word
dup set-word [ >link save-location ] [ [ \ ; parse-until >array ] dip set-word-help ] bi ;
dup >link save-location
\ ; parse-until >array swap set-word-help ;
SYNTAX: ARTICLE: SYNTAX: ARTICLE:
location [ location [
\ ; parse-until >array [ first2 ] keep 2 tail <article> \ ; parse-until >array [ first2 ] [ 2 tail ] bi <article>
over add-article >link over add-article >link
] dip remember-definition ; ] dip remember-definition ;
SYNTAX: ABOUT: SYNTAX: ABOUT:
in get vocab in get vocab scan-object >>help changed-definition ;
dup changed-definition
scan-object >>help drop ;

View File

@ -3,6 +3,6 @@
USING: help.syntax help.markup ; USING: help.syntax help.markup ;
IN: io.encodings.strict IN: io.encodings.strict
HELP: strict ( encoding -- strict-encoding ) HELP: strict ( code -- strict )
{ $values { "encoding" "an encoding descriptor" } { "strict-encoding" "a strict encoding descriptor" } } { $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." } ; { $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." } ;

View File

@ -23,7 +23,7 @@ HELP: unique-retries
{ unique-length unique-retries } related-words { unique-length unique-retries } related-words
HELP: make-unique-file ( prefix suffix -- path ) HELP: make-unique-file
{ $values { "prefix" "a string" } { "suffix" "a string" } { $values { "prefix" "a string" } { "suffix" "a string" }
{ "path" "a pathname 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." } { $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 { 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" } { $values { "prefix" "a string" } { "suffix" "a string" }
{ "quot" "a quotation" } } { "quot" "a quotation" } }
{ $description "Creates a file with " { $link make-unique-file } " and calls the quotation with the path name on the stack." } { $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." } ; { $notes "The unique file will be deleted after calling this word." } ;
HELP: unique-directory ( -- path ) HELP: unique-directory
{ $values { "path" "a pathname string" } } { $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." } { $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." } ; { $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" } } { $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." } { $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." } ; { $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." } ;

View File

@ -83,10 +83,6 @@ HELP: nil?
{ nil nil? } related-words { 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 { 1list 2list 3list } related-words
HELP: 1list HELP: 1list