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, 10 insertions, 11 deletions
diff --git a/doc/namespace.n b/doc/namespace.n
index 09fa371..f1af905 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.22 2007/10/24 14:29:38 dkf Exp $
+'\" RCS: @(#) $Id: namespace.n,v 1.23 2007/10/26 20:11:53 dgp 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,10 +55,9 @@ 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
-.QW "\fBset script [namespace code {foo bar}]\fR"
+\fBset script [namespace code {foo bar}]\fR
is invoked in namespace \fB::a::b\fR.
-Then
-.QW \fBeval\0"$script\0x\0y"\fR
+Then \fBeval "$script x y"\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
@@ -73,8 +72,7 @@ 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
-.MT
+The actual name of the global namespace is ``''
(i.e., an empty string),
but this command returns \fB::\fR for the global namespace
as a convenience to programmers.
@@ -220,7 +218,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
@@ -361,9 +359,8 @@ 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
-.MT
-(i.e., an empty string), although \fB::\fR is a synonym.
+The topmost or global namespace has the name ``'' (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,
@@ -834,7 +831,9 @@ 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