summaryrefslogtreecommitdiffstats
path: root/tools/tcltk-man2html-utils.tcl
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2011-07-18 15:24:59 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2011-07-18 15:24:59 (GMT)
commit1862ab1259270b5a83e955528dccc4b63c652648 (patch)
tree4d18c911874a2e9361fb90be4902c287fe5e5392 /tools/tcltk-man2html-utils.tcl
parent9f51e32c984e0ad2e812d241e588c492c4179cf8 (diff)
downloadtcl-1862ab1259270b5a83e955528dccc4b63c652648.zip
tcl-1862ab1259270b5a83e955528dccc4b63c652648.tar.gz
tcl-1862ab1259270b5a83e955528dccc4b63c652648.tar.bz2
More small documentation improvements.
Diffstat (limited to 'tools/tcltk-man2html-utils.tcl')
-rw-r--r--tools/tcltk-man2html-utils.tcl19
1 files changed, 16 insertions, 3 deletions
diff --git a/tools/tcltk-man2html-utils.tcl b/tools/tcltk-man2html-utils.tcl
index 16e9a93..a7270a1 100644
--- a/tools/tcltk-man2html-utils.tcl
+++ b/tools/tcltk-man2html-utils.tcl
@@ -623,7 +623,7 @@ proc cross-reference {ref} {
global ensemble_commands exclude_refs_map exclude_when_followed_by_map
set manname $manual(name)
set mantail $manual(tail)
- if {[string match "Tcl_*" $ref] || [string match "Tk_*" $ref]} {
+ if {[string match "Tcl_*" $ref] || [string match "Tk_*" $ref] || [string match "Ttk_*" $ref]} {
set lref $ref
##
## apply a link remapping if available
@@ -758,6 +758,7 @@ proc insert-cross-references {text} {
bold {<B>} end-bold {</B>}
tcl {Tcl_}
tk {Tk_}
+ ttk {Ttk_}
Tcl1 {Tcl manual entry}
Tcl2 {Tcl overview manual entry}
url {http://}
@@ -795,7 +796,7 @@ proc insert-cross-references {text} {
if {$offset(end-quote) < 0} {
return [reference-error "Missing end quote" $text]
}
- if {$invert([lindex $offsets 1]) in {tcl tk}} {
+ if {$invert([lindex $offsets 1]) in {tcl tk ttk}} {
set offsets [lreplace $offsets 1 1]
}
switch -exact -- $invert([lindex $offsets 1]) {
@@ -824,7 +825,7 @@ proc insert-cross-references {text} {
if {$offset(end-bold) < 0} {
return [append result $text]
}
- if {$invert([lindex $offsets 1]) in {tcl tk}} {
+ if {$invert([lindex $offsets 1]) in {tcl tk ttk}} {
set offsets [lreplace $offsets 1 1]
}
switch -exact -- $invert([lindex $offsets 1]) {
@@ -864,6 +865,18 @@ proc insert-cross-references {text} {
append result [cross-reference $body]
continue
}
+ ttk {
+ append result [string range $text 0 [expr {$offset(ttk)-1}]]
+ if {![regexp -indices -start $offset(ttk) {Ttk_\w+} $text range]} {
+ return [reference-error "Ttk regexp failed" $text]
+ }
+ set body [string range $text {*}$range]
+ set text [string range $text[set text ""] \
+ [expr {[lindex $range 1]+1}] end]
+ set tail $text
+ append result [cross-reference $body]
+ continue
+ }
tcl {
append result [string range $text 0 [expr {$offset(tcl)-1}]]
if {![regexp -indices -start $offset(tcl) {Tcl_\w+} $text range]} {