Index: openacs-4/packages/acs-templating/tcl/spellcheck-init.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/spellcheck-init.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/acs-templating/tcl/spellcheck-init.tcl	5 Oct 2003 17:55:55 -0000	1.2
+++ openacs-4/packages/acs-templating/tcl/spellcheck-init.tcl	6 Oct 2003 01:20:15 -0000	1.3
@@ -11,12 +11,19 @@
 # Find the aspell or, second best, the ispell binary.
 # In case neither one is found, spell-checking will be disabled.
 
-set bin [ad_decode [catch {exec which aspell}] \
-	     0 [exec which aspell] \
-	     [ad_decode [catch {exec which ispell}] \
-		  0 [exec which ispell] \
-		  ""]]
+# DRB: The original code here apparently was written under the delusion
+# that using "catch" to guard calls to "exec" would allow one to safely use
+# the same "exec" elsewhere in the same command, as though Tcl does short-circuit
+# evaluation of exprs.  I only mention this in case someone sees the clever (but wrong)
+# code and decides they want to replace my fix with the clever (but wrong) version ...
 
+if { ![catch {exec which aspell}] } {
+    set bin [exec which aspell]
+} elseif { ![catch {exec which ispell}] } {
+    set bin [exec which ispell]
+} else {
+    set bin ""
+}
 
 # Do we want dialect dictionaries (if available) or not?
 # Note that if you change this param it won't take effect