--- ray/src/util/do_file.tcl 1994/12/06 15:54:45 2.3 +++ ray/src/util/do_file.tcl 1995/03/21 16:19:26 2.7 @@ -167,7 +167,7 @@ proc load_vars {f {vl all}} { # load RIF variables set curmess {Project loaded.} } else { foreach n $vl { - set radvar($n) {} + catch {unset radvar($n)} } while {[gets $fi curli] != -1} { if [regexp {^[a-zA-Z][a-zA-Z0-9]* *=} $curli] { @@ -242,6 +242,11 @@ proc newsave f { # save a RIF return 0 } } + if {[file exists $f] && ! [file writable $f] && + [catch {exec chmod u+w $f} curmess]} { + beep + return 0 + } if [save_vars $f] { set rifname [pwd]/$f set readonly 0 @@ -282,8 +287,8 @@ proc do_file w { pack $w.left -side left button $w.left.load -text LOAD -width 5 \ -relief raised -command {newload $curfile} - button $w.left.save -text SAVE -width 5 \ - -relief raised -command {newsave $curfile} + button $w.left.save -text SAVE -width 5 -relief raised \ + -command "newsave \$curfile; update_dir $w.right" button $w.left.new -text NEW -width 5 \ -relief raised -command {newnew $curfile} pack $w.left.load $w.left.save $w.left.new -side top -pady 15 -padx 20