Index: openacs-4/packages/xotcl-core/tcl/03-doc-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/03-doc-procs.tcl,v diff -u -r1.7.2.8 -r1.7.2.9 --- openacs-4/packages/xotcl-core/tcl/03-doc-procs.tcl 5 Jan 2016 19:54:30 -0000 1.7.2.8 +++ openacs-4/packages/xotcl-core/tcl/03-doc-procs.tcl 8 Jan 2016 12:30:30 -0000 1.7.2.9 @@ -505,8 +505,14 @@ if {[string match ::nx::* $o]} continue ::xo::api update_object_doc "" $o "" } - } + + :public object method get_proc_definition_flags {debug deprecated} { + if {$::nsf::version < 2.1} { + return "" + } + return [list -debug=$debug -deprecated=$deprecated] + } } ::nx::Class public method init {} { @@ -533,11 +539,12 @@ doc body } { - uplevel [list [self] proc $proc_name $arguments $body] + set flags [::xo::api get_proc_definition_flags $debug $deprecated] + uplevel [list [self] proc {*}$flags $proc_name $arguments $body] ::xo::api update_method_doc \ -protection [expr {$private ? "private" : "public"}] \ -deprecated=$deprecated \ - -debug=$private \ + -debug=$debug \ [::xo::api scope] [self] \ "" $proc_name $doc } @@ -552,11 +559,12 @@ doc body } { - uplevel [list [self] instproc $proc_name $arguments $body] + set flags [::xo::api get_proc_definition_flags $debug $deprecated] + uplevel [list [self] instproc {*}$flags $proc_name $arguments $body] ::xo::api update_method_doc \ -protection [expr {$private ? "private" : "public"}] \ -deprecated=$deprecated \ - -debug=$private \ + -debug=$debug \ [::xo::api scope] [self] \ inst $proc_name $doc } @@ -567,11 +575,12 @@ {-warn:switch false} {-debug:switch false} method_name doc args} { - uplevel [self] forward $method_name $args + set flags [::xo::api get_proc_definition_flags $debug $deprecated] + uplevel [self] forward {*}$flags $method_name $args ::xo::api update_method_doc \ -protection [expr {$private ? "private" : "public"}] \ -deprecated=$deprecated \ - -debug=$private \ + -debug=$debug \ [::xo::api scope] [self] \ "" $method_name $doc } @@ -582,11 +591,12 @@ {-warn:switch false} {-debug:switch false} method_name doc args} { - uplevel [self] instforward $method_name $args + set flags [::xo::api get_proc_definition_flags $debug $deprecated] + uplevel [self] instforward {*}$flags $method_name $args ::xo::api update_method_doc \ -protection [expr {$private ? "private" : "public"}] \ -deprecated=$deprecated \ - -debug=$private \ + -debug=$debug \ [::xo::api scope] [self] \ "inst" $method_name $doc }