summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2013-08-03 15:27:40 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2013-08-03 15:27:40 (GMT)
commit861b34625cd9a137d81f848b63c70e1f8318ba35 (patch)
tree092c491311483b05a7d98d3bf93fb1bf56e75e33
parent0958b92b37ecfab151eeda74295706cdb6351e77 (diff)
downloadtcl-861b34625cd9a137d81f848b63c70e1f8318ba35.zip
tcl-861b34625cd9a137d81f848b63c70e1f8318ba35.tar.gz
tcl-861b34625cd9a137d81f848b63c70e1f8318ba35.tar.bz2
[3611643fff]: Support TclOO in autoload mechanism.
-rw-r--r--ChangeLog5
-rw-r--r--library/auto.tcl14
2 files changed, 19 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index a82dbfd..ddde893 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-08-03 Donal Fellows <dkf@users.sf.net>
+
+ * library/auto.tcl: [Patch 3611643]: Allow TclOO classes to be found
+ by the autoloading mechanism.
+
2013-08-02 Donal Fellows <dkf@users.sf.net>
* generic/tclOODefineCmds.c (ClassSuperSet): Bug [9d61624b3d]: Stop
diff --git a/library/auto.tcl b/library/auto.tcl
index 0848bb1..78c219e 100644
--- a/library/auto.tcl
+++ b/library/auto.tcl
@@ -617,4 +617,18 @@ auto_mkindex_parser::command namespace {op args} {
}
}
+# AUTO MKINDEX: oo::class create name ?definition?
+# Adds an entry to the auto index list for the given class name.
+foreach cmd {oo::class class} {
+ auto_mkindex_parser::command $cmd {ecmd name {body ""}} {
+ if {$cmd eq "create"} {
+ variable index
+ variable scriptFile
+ append index [format "set %s \[list source \[%s]]\n" \
+ [list auto_index([fullname $name])] \
+ [list file join $dir {*}[file split $scriptFile]]]
+ }
+ }
+}
+
return