summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorhobbs <hobbs>2000-02-10 10:09:18 (GMT)
committerhobbs <hobbs>2000-02-10 10:09:18 (GMT)
commit10c9b49cd1da10587df4af7114e208f3fa56ccde (patch)
tree4029f8e1fcd464ca81f13c1df769a285b5bf2a71 /doc
parentd277943d8c72ac92baf1c2ed6b0cb7c7f1339318 (diff)
downloadtcl-10c9b49cd1da10587df4af7114e208f3fa56ccde.zip
tcl-10c9b49cd1da10587df4af7114e208f3fa56ccde.tar.gz
tcl-10c9b49cd1da10587df4af7114e208f3fa56ccde.tar.bz2
cleaned up syntax, corrected package:: -> pkg::
Diffstat (limited to 'doc')
-rw-r--r--doc/packagens.n33
-rw-r--r--doc/pkgMkIndex.n34
2 files changed, 29 insertions, 38 deletions
diff --git a/doc/packagens.n b/doc/packagens.n
index d73b168..c02b705 100644
--- a/doc/packagens.n
+++ b/doc/packagens.n
@@ -2,28 +2,25 @@
'\" Copyright (c) 1998-2000 by Scriptics Corporation.
'\" All rights reserved.
'\"
-'\" RCS: @(#) $Id: packagens.n,v 1.1 2000/02/03 17:27:03 ericm Exp $
+'\" RCS: @(#) $Id: packagens.n,v 1.2 2000/02/10 10:09:18 hobbs Exp $
'\"
.so man.macros
-.TH package::create n 8.3 Tcl "Tcl Built-In Commands"
+.TH pkg::create n 8.3 Tcl "Tcl Built-In Commands"
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
-package::create \- Construct an appropriate \fBpackage ifneeded\fR
+pkg::create \- Construct an appropriate \fBpackage ifneeded\fR
command for a given package specification
.SH SYNOPSIS
-.nf
-.VS 8.3.0
-\fB::package::create \fI-name packageName\fR \fI-version
-packageVersion\fR ?\fI-load filespec\fR? ... ?\fI-source filespec\fR? ...
+\fB::pkg::create \fI\-name packageName\fR \fI\-version packageVersion\fR ?\fI\-load filespec\fR? ... ?\fI\-source filespec\fR? ...
+.BE
.SH DESCRIPTION
.PP
-\fB::package::create\fR is a utility procedure that is part of the standard
-Tcl library. It is used to create an appropriate \fBpackage
-ifneeded\fR command for a given package specification. It can be used
-to construct a \fBpkgIndex.tcl\fR file for use with the \fBpackage\fI
-mechanism.
+\fB::pkg::create\fR is a utility procedure that is part of the standard Tcl
+library. It is used to create an appropriate \fBpackage ifneeded\fR
+command for a given package specification. It can be used to construct a
+\fBpkgIndex.tcl\fR file for use with the \fBpackage\fR mechanism.
.SH OPTIONS
The parameters supported are:
@@ -39,19 +36,17 @@ This parameter specifies a binary library that must be loaded with the
\fBload\fR command. \fIfilespec\fR is a list with two elements. The
first element is the name of the file to load. The second, optional
element is a list of commands supplied by loading that file. If the
-list of procedures is empty or omitted, \fB::package::create\fR will
+list of procedures is empty or omitted, \fB::pkg::create\fR will
set up the library for direct loading (see \fBpkg_mkIndex\fR). Any
-number of \fB-load\fR parameters may be specified.
+number of \fB\-load\fR parameters may be specified.
.TP
\fB\-source\fR\0\fIfilespec\fR
-This parameter is similar to the \fB-load\fR parameter, except that it
+This parameter is similar to the \fB\-load\fR parameter, except that it
specifies a Tcl library that must be loaded with the
-\fBsource\fR command. Any number of \fB-source\fR parameters may be
+\fBsource\fR command. Any number of \fB\-source\fR parameters may be
specified.
.PP
-At least one \fB-load\fR or \fB-source\fR paramter must be given.
-
-
+At least one \fB\-load\fR or \fB\-source\fR paramter must be given.
.SH KEYWORDS
auto-load, index, package, version
diff --git a/doc/pkgMkIndex.n b/doc/pkgMkIndex.n
index f816436..95c8e8a 100644
--- a/doc/pkgMkIndex.n
+++ b/doc/pkgMkIndex.n
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: pkgMkIndex.n,v 1.8 2000/02/01 01:14:01 ericm Exp $
+'\" RCS: @(#) $Id: pkgMkIndex.n,v 1.9 2000/02/10 10:09:18 hobbs Exp $
'\"
.so man.macros
.TH pkg_mkIndex n 8.3 Tcl "Tcl Built-In Commands"
@@ -15,7 +15,7 @@ pkg_mkIndex \- Build an index for automatic loading of packages
.SH SYNOPSIS
.nf
.VS 8.3.0
-\fBpkg_mkIndex ?\fI-lazy\fR? ?\fI-load pkgPat\fR? ?\fI-verbose\fR? \fIdir\fR ?\fIpattern pattern ...\fR?
+\fBpkg_mkIndex ?\fI\-lazy\fR? ?\fI\-load pkgPat\fR? ?\fI\-verbose\fR? \fIdir\fR ?\fIpattern pattern ...\fR?
.VE
.fi
.BE
@@ -44,7 +44,7 @@ script or binary files in \fIdir\fR.
.VS 8.0.3
The default pattern is \fB*.tcl\fR and \fB*.[info sharedlibextension]\fR.
.VE
-.sp 1
+.br
\fBPkg_mkIndex\fR will create a file \fBpkgIndex.tcl\fR in \fIdir\fR
with package information about all the files given by the \fIpattern\fR
arguments.
@@ -55,7 +55,7 @@ and new commands appear (this is why it is essential to have
in the files, as described above).
If you have a package split among scripts and binary files,
or if you have dependencies among files,
-you may have to use the \fB-load\fP option
+you may have to use the \fB\-load\fP option
or adjust the order in which \fBpkg_mkIndex\fR processes
the files. See COMPLEX CASES below.
@@ -72,7 +72,7 @@ the package's script and/or binary files as well as the \fBpkgIndex.tcl\fR
file. As long as the package is installed as a subdirectory of a
directory in \fB$tcl_pkgPath\fR it will automatically be found during
\fBpackage require\fR commands.
-.sp 1
+.br
If you install the package anywhere else, then you must ensure that
the directory containing the package is in the \fBauto_path\fR global variable
or an immediate subdirectory of one of the directories in \fBauto_path\fR.
@@ -154,22 +154,18 @@ commands for each version of each available package; these commands
invoke \fBpackage provide\fR commands to announce the
availability of the package, and they setup auto-loader
information to load the files of the package.
-.VS 8.0.3
-If the \fI-lazy\fR flag was provided when the \fBpkgIndex.tcl\fR
+.VS 8.3
+If the \fI\-lazy\fR flag was provided when the \fBpkgIndex.tcl\fR
was generated,
.VE
a given file of a given version of a given package isn't
actually loaded until the first time one of its commands
is invoked.
-Thus, after invoking \fBpackage require\fR you
-.VS 8.0.3
-may
-.VE
-not see
-the package's commands in the interpreter, but you will be able
+Thus, after invoking \fBpackage require\fR you may
+not see the package's commands in the interpreter, but you will be able
to invoke the commands and they will be auto-loaded.
-.VS 8.3.0
+.VS 8.3
.SH "DIRECT LOADING"
.PP
Some packages, for instance packages which use namespaces and export
@@ -177,7 +173,7 @@ commands or those which require special initialization, might select
that their package files be loaded immediately upon \fBpackage require\fR
instead of delaying the actual loading to the first use of one of the
package's command. This is the default mode when generating the package
-index. It can be overridden by specifying the \fI-lazy\fR argument.
+index. It can be overridden by specifying the \fI\-lazy\fR argument.
.VE
.SH "COMPLEX CASES"
@@ -211,7 +207,7 @@ For example, suppose the BLT package requires Tk, and expresses
this with a call to \fBTcl_PkgRequire\fP in its \fBBlt_Init\fP routine.
To support this, you must run \fBpkg_mkIndex\fR in an interpreter that
has Tk loaded. You can achieve this with the
-\fB-load \fIpkgPat\fR option. If you specify this option,
+\fB\-load \fIpkgPat\fR option. If you specify this option,
\fBpkg_mkIndex\fR will load any packages listed by
\fBinfo loaded\fP and that match \fIpkgPat\fP
into the interpreter used to process files.
@@ -225,14 +221,14 @@ and then the package it provides
will be available when the second file is processed.
You may also need to load the first package into the
temporary interpreter used to create the index by using
-the \fB-load\fP flag;
+the \fB\-load\fP flag;
it won't hurt to specify package patterns that are not yet loaded.
.PP
If you have a package that is split across scripts and a binary file,
-then you should avoid the \fB-load\fP flag. The problem is that
+then you should avoid the \fB\-load\fP flag. The problem is that
if you load a package before computing the index it masks any
other files that provide part of the same package.
-If you must use \fB-load\fP,
+If you must use \fB\-load\fP,
then you must specify the scripts first; otherwise the package loaded from
the binary file may mask the package defined by the scripts.