summaryrefslogtreecommitdiffstats
path: root/doc/namespace.n
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2006-02-01 18:27:42 (GMT)
committerdgp <dgp@users.sourceforge.net>2006-02-01 18:27:42 (GMT)
commitbf2e20ec8703a3c6e725e464bb4e7fca8af0834c (patch)
treec00a6c3b557759767b41407974391d1117ad0c25 /doc/namespace.n
parent2e9bf45bc4d2510a07a538c48f8103957ede3aaf (diff)
downloadtcl-bf2e20ec8703a3c6e725e464bb4e7fca8af0834c.zip
tcl-bf2e20ec8703a3c6e725e464bb4e7fca8af0834c.tar.gz
tcl-bf2e20ec8703a3c6e725e464bb4e7fca8af0834c.tar.bz2
TIP#181 IMPLEMENTATION
* doc/Namespace.3: New command [namespace unknown]. New public * doc/namespace.n: C routines Tcl_(Get|Set)NamespaceUnknownHandler. * doc/unknown.n: [Patch 958222]. * generic/tcl.decls: * generic/tclBasic.c: * generic/tclInt.h: * generic/tclNamesp.c: * tests/namespace.test: * generic/tclDecls.h: make genstubs * generic/tclStubInit.c:
Diffstat (limited to 'doc/namespace.n')
-rw-r--r--doc/namespace.n13
1 files changed, 12 insertions, 1 deletions
diff --git a/doc/namespace.n b/doc/namespace.n
index f2327a4..150e7ee 100644
--- a/doc/namespace.n
+++ b/doc/namespace.n
@@ -7,7 +7,7 @@
'\" 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.19 2006/02/01 17:48:10 dgp Exp $
+'\" RCS: @(#) $Id: namespace.n,v 1.20 2006/02/01 18:27:43 dgp Exp $
'\"
.so man.macros
.TH namespace n 8.5 Tcl "Tcl Built-In Commands"
@@ -256,6 +256,17 @@ procedure to refer to variables in \fInamespace\fR. The command
\fBupvar 0 $ns::a b\fR.
\fBnamespace upvar\fR returns an empty string.
.TP
+\fBnamespace unknown\fR ?\fIscript\fR?
+Sets or returns the unknown command handler for the current namespace.
+The handler is invoked when a command called from within the namespace
+cannot be found (in either the current namespace or the global namespace).
+The \fIscript\fR argument, if given, should be a well
+formed list representing a command name and optional arguments. When
+the handler is invoked, the full invocation line will be appended to the
+script and the result evaluated in the context of the namespace. The
+default handler for all namespaces is \fB::unknown\fR. If no argument
+is given, it returns the handler for the current namespace.
+.TP
\fBnamespace which\fR ?\-\fBcommand\fR? ?\-\fBvariable\fR? \fIname\fR
Looks up \fIname\fR as either a command or variable
and returns its fully-qualified name.