Add symbol checks to translators for MCALL, MARRAYREF, and MARRAYSET
[maxima.git] / interfaces / xmaxima / Tkmaxima / EHref.tcl
blob2390849861d97406a77c41e223cf2642ef72a20d
1 # -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
3 # $Id: EHref.tcl,v 1.3 2004-10-13 12:08:57 vvzhy Exp $
5 ###### EHref.tcl ######
6 ############################################################
7 # Netmath Copyright (C) 1998 William F. Schelter #
8 # For distribution under GNU public License. See COPYING. #
9 ############################################################
13 #-----------------------------------------------------------------
15 # eval_href -- Follow a link to another om document
17 # Results:
19 # Side Effects:
21 #----------------------------------------------------------------
24 proc obsoleteeval_href { program w this nextResult} {
25 set arg ""
26 foreach v [$w tag names [lindex $this 0]] {
27 if { [string first "\{ThrefArg" $v] == 0 } {
28 set arg $v
29 break
32 set arglist [getTargTags $w $this]
33 if { [llength $arglist] != 1 } {
34 return -code error -errorinfo [concat "[llength $arglist]" [mc "args to href. Wanted 1, got:"] "$arglist"]
36 puts "arglist=$arglist"
38 set arg [lindex $arglist 0]
39 puts "arg=$arg"
40 set list [lrange $arg 1 end]
41 set doc [assoc -src $list ""]
43 set searchregexp [assoc -searchregexp $list ""]
44 set search [assoc -search $list ""]
46 puts "doc=$doc"
48 if { "$doc" != "" } {
49 puts " OpenMathOpenUrl $doc -commandpanel [omPanel $w]"
50 OpenMathOpenUrl $doc -commandpanel [omPanel $w]
52 makeLocal [omPanel $w] textwin
53 set ind ""
54 if { "$searchregexp" != "" } {
55 set ind [ $textwin search -regexp -- $searchregexp 1.0]
56 } elseif { "$search" != "" } {
57 set ind [ $textwin search -exact -- $search 1.0]
59 if { "$ind" != "" } {
60 $textwin yview $ind
62 return 0
67 ## endsource ehref.tcl