# discoverRc
#
# Startup script for initializing Discover 95
#
# This script is sourced by the Discover 95 BTCL interpreter when the
# program begins.  The standard location for this script is:
# $BIOSYM/data/discover/discoverRc
# However, you can also add specific customizations of this file in
# your current working directory, or your home directory.  The
# standard discoverRc will always be sourced first, and then one of
# of ./discoverRc or ~/discoverRc will be sourced.  If ./discoverRc
# is found, it will be sourced in preference to ~/discoverRc.
#
# A discoverRc file can be used to set non-standard defaults for your
# calculations.

# This section creates a tclIndex for any .tcl files you have in the
# current directory.  By doing this, any procedures resident in local
# .tcl files will be known to Discover.

set files [glob -nocomplain *.tcl]
if {[llength $files]} {
    if {[catch {auto_mkindex . *.tcl} errNotes]} {
	echo "Warning:  there was a problem creating a tclIndex file"
	echo "in the current directory:"
	echo $errNotes
	echo "Proceeding without a tclIndex for .tcl files in current directory."
	unset errNotes
    }
}
unset files

# You may insert your own directories into the following list
# of directories stored in the auto_path list variable.  When a new
# BTCL command is executed, the interpreter searches each on of these
# directories in series looking for a "tclIndex" file.  If a tclIndex
# is found, and it contains a reference to the new command being
# executed, the corresponding file is sourced.

# Procedures in .tcl files in the current directory take precedence.

set auto_path .

# The directories $BIOSYM/gifts/discover/btcl and
# $BIOSYM/gifts/discover/tcl contain several
# unsupported but possibly useful BTCL scripts.  If you would
# like automatic access to the procedures found in these files,
# uncomment the following two lines:

# lappend auto_path $env(BIOSYM)/gifts/discover/btcl
# lappend auto_path $env(BIOSYM)/gifts/discover/tcl

lappend auto_path $env(BIOSYM)/data/discover/script
lappend auto_path $env(BIOSYM)/data/discover/utility

auto_reset
