chiark / gitweb /
src/pset-impl.lisp: Improve boolean literal handling.
[sod] / src / pset-impl.lisp
index e6986a5b91bccf384890ac66d61646534b16505e..f938ad371ac000b0a4fbe1e6200e7a3a93b96a36 100644 (file)
@@ -74,12 +74,12 @@ (defun string-to-symbol
                 (error "Symbol `~A' not external in package `~A'"
                        name (package-name package)))))))))
 
-(let ((truish '("true" "t" "yes" "verily"))
-      (falsish '("false" "nil" "no" "nowise")))
+(let ((truish '("true" "t" "yes" "on" "verily"))
+      (falsish '("false" "nil" "no" "off" "nowise")))
   (defun truishp (string)
     "Convert STRING to a boolean."
-    (cond ((member string truish :test #'string=) t)
-         ((member string falsish :test #'string=) nil)
+    (cond ((member string truish :test #'string-equal) t)
+         ((member string falsish :test #'string-equal) nil)
          (t (error "Unrecognized boolean value `~A'" string)))))
 
 ;;;--------------------------------------------------------------------------