proc cellCommit t {

	global CellValues CellFormulae curCell curVal AutoRecompute

	set ind $curCell

	if {$ind != $curCell} {
		puts stderr "Current cell $curCell does not match sel $ind"
		return
	}

	set res 1
	if {[cindex $curVal 0] == "="} {
		set CellFormulae($ind) "[crange $curVal 1 end]"
		set res [cellEval $t $ind]
	} else {
		set CellValues($ind) $curVal
	}

	if {$AutoRecompute} {
		compSheet $t
	}

	addCell2Form N $t

	return $res

}

