summaryrefslogtreecommitdiffstats
path: root/doc/namespace.n
diff options
context:
space:
mode:
Diffstat (limited to 'doc/namespace.n')
-rw-r--r--doc/namespace.n21
1 files changed, 11 insertions, 10 deletions
diff --git a/doc/namespace.n b/doc/namespace.n
index 99d885c..09fa371 100644
--- a/doc/namespace.n
+++ b/doc/namespace.n
@@ -7,12 +7,12 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: namespace.n,v 1.21 2006/08/26 13:00:38 msofer Exp $
+'\" RCS: @(#) $Id: namespace.n,v 1.22 2007/10/24 14:29:38 dkf Exp $
'\"
.so man.macros
.TH namespace n 8.5 Tcl "Tcl Built-In Commands"
.BS
-'\" Note: do not modify the .SH NAME line immediately below!
+.\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
namespace \- create and manipulate contexts for commands and variables
.SH SYNOPSIS
@@ -55,9 +55,10 @@ First, it can be evaluated in any namespace and will cause
Second, additional arguments can be appended to the resulting script
and they will be passed to \fIscript\fR as additional arguments.
For example, suppose the command
-\fBset script [namespace code {foo bar}]\fR
+.QW "\fBset script [namespace code {foo bar}]\fR"
is invoked in namespace \fB::a::b\fR.
-Then \fBeval "$script x y"\fR
+Then
+.QW \fBeval\0"$script\0x\0y"\fR
can be executed in any namespace (assuming the value of
\fBscript\fR has been passed in properly)
and will have the same effect as the command
@@ -72,7 +73,8 @@ of how this is used to create callback scripts.
.TP
\fBnamespace current\fR
Returns the fully-qualified name for the current namespace.
-The actual name of the global namespace is ``''
+The actual name of the global namespace is
+.MT
(i.e., an empty string),
but this command returns \fB::\fR for the global namespace
as a convenience to programmers.
@@ -218,7 +220,7 @@ If \fInamespace\fR is not specified,
the fully-qualified name of the current namespace's parent is returned.
.TP
\fBnamespace path\fR ?\fInamespaceList\fR?
-'\" Should really have the .TP inside the .VS, but that triggers a groff bug
+.\" Should really have the .TP inside the .VS, but that triggers a groff bug
.VS 8.5
Returns the command resolution path of the current namespace. If
\fInamespaceList\fR is specified as a list of named namespaces, the
@@ -359,8 +361,9 @@ Qualified names are similar to the hierarchical path names for
Unix files or Tk widgets,
except that \fB::\fR is used as the separator
instead of \fB/\fR or \fB.\fR.
-The topmost or global namespace has the name ``'' (i.e., an empty string),
-although \fB::\fR is a synonym.
+The topmost or global namespace has the name
+.MT
+(i.e., an empty string), although \fB::\fR is a synonym.
As an example, the name \fB::safe::interp::create\fR
refers to the command \fBcreate\fR in the namespace \fBinterp\fR
that is a child of namespace \fB::safe\fR,
@@ -831,9 +834,7 @@ Look up where the command imported in the previous example came from:
.CS
puts "grill came from [\fBnamespace origin\fR grill]"
.CE
-
.SH "SEE ALSO"
interp(n), upvar(n), variable(n)
-
.SH KEYWORDS
command, ensemble, exported, internal, variable