summaryrefslogtreecommitdiffstats
path: root/doc/tm.n
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2008-10-17 10:22:24 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2008-10-17 10:22:24 (GMT)
commit842e3ff91428c72a2ce0d4df4889778af82f4b12 (patch)
tree5a94240e321022019f593f6bd712833ab12138c6 /doc/tm.n
parent8b464633a0f2df93912ad25af65a5724cd643da2 (diff)
downloadtcl-842e3ff91428c72a2ce0d4df4889778af82f4b12.zip
tcl-842e3ff91428c72a2ce0d4df4889778af82f4b12.tar.gz
tcl-842e3ff91428c72a2ce0d4df4889778af82f4b12.tar.bz2
Improve clarity of formatting.
Diffstat (limited to 'doc/tm.n')
-rw-r--r--doc/tm.n16
1 files changed, 14 insertions, 2 deletions
diff --git a/doc/tm.n b/doc/tm.n
index 3deca0f..59980f0 100644
--- a/doc/tm.n
+++ b/doc/tm.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: tm.n,v 1.17 2008/09/26 19:54:56 dgp Exp $
+'\" RCS: @(#) $Id: tm.n,v 1.18 2008/10/17 10:22:25 dkf Exp $
'\"
.so man.macros
.TH tm n 8.5 Tcl "Tcl Built-In Commands"
@@ -79,6 +79,7 @@ additional root paths beyond those described by this document.
A Tcl Module is a Tcl Package contained in a single file, and no other
files required by it. This file has to be \fBsource\fRable. In other
words, a Tcl Module is always imported via:
+.PP
.CS
source module_file
.CE
@@ -92,6 +93,7 @@ attached data in any it chooses to fully import and activate the
package.
.PP
The name of a module file has to match the regular expression:
+.PP
.CS
([[:alpha:]][:[:alnum:]]*)-([[:digit:]].*)\e.tm
.CE
@@ -100,11 +102,12 @@ The first capturing parentheses provides the name of the package, the
second clause its version. In addition to matching the pattern, the
extracted version number must not raise an error when used in the
command:
+.PP
.CS
package vcompare $version 0
.CE
-.PP
.SH "FINDING MODULES"
+.PP
The directory tree for storing Tcl modules is separate from other
parts of the filesystem and independent of \fBauto_path\fR.
.PP
@@ -165,10 +168,13 @@ Note that packages in module form have \fIno\fR control over the
\fIindex\fR and \fIprovide script\fRs entered into the package
database for them.
For a module file \fBMF\fR the \fIindex script\fR is always:
+.PP
.CS
package ifneeded \fBPNAME PVERSION\fR [list source \fBMF\fR]
.CE
+.PP
and the \fIprovide script\fR embedded in the above is:
+.PP
.CS
source \fBMF\fR
.CE
@@ -176,6 +182,7 @@ source \fBMF\fR
Both package name \fBPNAME\fR and package version \fBPVERSION\fR are
extracted from the filename \fBMF\fR according to the definition
below:
+.PP
.CS
\fBMF\fR = /module_path/\fBPNAME\(fm\fR-\fBPVERSION\fR.tm
.CE
@@ -224,6 +231,7 @@ to the minor version of the interpreter.
.RS
.PP
For example for Tcl 8.4 the paths searched are:
+.PP
.CS
\fB[info library]/../tcl8/8.4\fR
\fB[info library]/../tcl8/8.3\fR
@@ -277,6 +285,7 @@ These paths are seen and therefore shared by all Tcl shells in the
Note that \fIX\fR and \fIy\fR follow the general rules set out
above. In other words, Tcl 8.4, for example, will look at these 5
environment variables:
+.PP
.CS
\fB$::env(TCL8.4_TM_PATH)\fR \fB$::env(TCL8_4_TM_PATH)\fR
\fB$::env(TCL8.3_TM_PATH)\fR \fB$::env(TCL8_3_TM_PATH)\fR
@@ -292,3 +301,6 @@ package(n), Tcl Improvement Proposal #189
(online at http://tip.tcl.tk/190.html)
.SH "KEYWORDS"
modules, package
+.\" Local Variables:
+.\" mode: nroff
+.\" End: