diff --git a/books/bookvol5.pamphlet b/books/bookvol5.pamphlet
index 397a321..cef4206 100644
--- a/books/bookvol5.pamphlet
+++ b/books/bookvol5.pamphlet
@@ -2533,7 +2533,7 @@ carrier[lines,messages,..]-> carrier[lines,messages,..]
      ((> i Var3) (return nil))
      (t
       (cond
-       ((not (equal (elt str i) (|char| '| |)))
+       ((not (equal (elt str i) #\Space))
          (identity (progn (setq value t) (return value)))))))
     (setq i (+ i 1))))
    (maxindex str) 0)
@@ -3575,7 +3575,7 @@ b ==> 7
 \begin{chunk}{defun incCommand? 0}
 (defun |incCommand?| (s)
   "does this start with a close paren?"
-  (and (< 0 (length s)) (equal (elt s 0) (|char| '|)|))))
+  (and (< 0 (length s)) (equal (elt s 0) #\) )))
 
 \end{chunk}
 
@@ -13491,7 +13491,7 @@ makeLeaderMsg chPosList ==
             t)
            (progn
             (setq st 
-             (strconc st (|rep| (|char| '|.|) (- posNum oldPos 1)) posLetter))
+             (strconc st (|rep| #\. (- posNum oldPos 1)) posLetter))
             (setq oldPos posNum)))))
     (setq Var15 (cdr Var15))))
    (reverse chPosList) nil)
@@ -46605,6 +46605,3822 @@ Given \verb|("one" "two" "three")| generate \verb|"(one,two,three)"|
 
 \end{chunk}
 
+;;; ht-util merge
+
+\defdollar{bcParseOnly}
+\begin{chunk}{initvars}
+(defvar |$bcParseOnly| t)
+
+\end{chunk}
+
+\defdollar{htLineList}
+\begin{chunk}{initvars}
+(defvar |$htLineList| nil) 
+
+\end{chunk}
+
+\defdollar{curpage}
+\begin{chunk}{initvars}
+(defvar |$curPage| nil) 
+
+\end{chunk}
+
+\defdollar{activePageList}
+\begin{chunk}{initvars}
+(defvar |$activePageList| nil) 
+
+\end{chunk}
+
+\defun{htpDestroyPage}{htpDestroyPage}
+\begin{chunk}{defun htpDestroyPage}
+(defun |htpDestroyPage| (pageName)
+  (declare (special |$activePageList|))
+  (SEQ (cond
+         ((|member| pageName |$activePageList|)
+          (EXIT (progn
+                  (set pageName nil)
+                  (setq |$activePageList|
+                           (NREMOVE |$activePageList| pageName))))))))
+
+\end{chunk}
+
+\defun{htpName}{htpName}
+\begin{chunk}{defun htpName}
+(defun |htpName| (htPage) (elt htPage 0)) 
+
+\end{chunk}
+
+\defun{htpSetName}{htpSetName}
+\begin{chunk}{defun htpSetName}
+(defun |htpSetName| (htPage val) (setelt htPage 0 val)) 
+
+\end{chunk}
+
+\defun{htpDomainConditions}{htpDomainConditions}
+\begin{chunk}{defun htpDomainConditions}
+(defun |htpDomainConditions| (htPage) (elt htPage 1)) 
+
+\end{chunk}
+
+\defun{htpSetDomainConditions}{htpSetDomainConditions}
+\begin{chunk}{defun htpSetDomainConditions}
+(defun |htpSetDomainConditions| (htPage val)
+  (setelt htPage 1 val))
+
+\end{chunk}
+
+\defun{htpDomainVariableAlist}{htpDomainVariableAlist}
+\begin{chunk}{defun htpDomainVariableAlist}
+(defun |htpDomainVariableAlist| (htPage) (elt htPage 2)) 
+
+\end{chunk}
+
+\defun{htpSetDomainVariableAlist}{htpSetDomainVariableAlist}
+\begin{chunk}{defun htpSetDomainVariableAlist}
+(defun |htpSetDomainVariableAlist| (htPage val)
+  (setelt htPage 2 val))
+
+\end{chunk}
+
+\defun{htpDomainPvarSubstList}{htpDomainPvarSubstList}
+\begin{chunk}{defun htpDomainPvarSubstList}
+(defun |htpDomainPvarSubstList| (htPage) (elt htPage 3)) 
+
+\end{chunk}
+
+\defun{htpSetDomainPvarSubstList}{htpSetDomainPvarSubstList}
+\begin{chunk}{defun htpSetDomainPvarSubstList}
+(defun |htpSetDomainPvarSubstList| (htPage val)
+  (setelt htPage 3 val))
+
+\end{chunk}
+
+\defun{htpRadioButtonAlist}{htpRadioButtonAlist}
+\begin{chunk}{defun htpRadioButtonAlist}
+(defun |htpRadioButtonAlist| (htPage) (elt htPage 4)) 
+
+\end{chunk}
+
+\defun{htpButtonValue}{htpButtonValue}
+\begin{chunk}{defun htpButtonValue}
+(defun |htpButtonValue| (htPage groupName)
+  (prog ()
+    (return
+      (SEQ (DO ((G166092
+                    (LASSOC groupName
+                            (|htpRadioButtonAlist| htPage))
+                    (CDR G166092))
+                (|buttonName| nil))
+               ((OR (ATOM G166092)
+                    (progn (setq |buttonName| (car G166092)) nil))
+                NIL)
+             (SEQ (EXIT (COND
+                          ((BOOT-EQUAL
+                               (|stripSpaces|
+                                   (|htpLabelInputString| htPage
+                                    |buttonName|))
+                               "t")
+                           (EXIT (RETURN |buttonName|)))))))))))
+
+\end{chunk}
+
+\defun{htpSetRadioButtonAlist}{htpSetRadioButtonAlist}
+\begin{chunk}{defun htpSetRadioButtonAlist}
+(defun |htpSetRadioButtonAlist| (htPage val)
+  (setelt htPage 4 val))
+
+\end{chunk}
+
+\defun{htpInputAreaAlist}{htpInputAreaAlist}
+\begin{chunk}{defun htpInputAreaAlist}
+(defun |htpInputAreaAlist| (htPage) (elt htPage 5))
+
+\end{chunk}
+
+\defun{htpSetInputAreaAlist}{htpSetInputAreaAlist}
+\begin{chunk}{defun htpSetInputAreaAlist}
+(defun |htpSetInputAreaAlist| (htPage val)
+  (setelt htPage 5 val))
+
+\end{chunk}
+
+\defun{htpAddInputAreaProp}{htpAddInputAreaProp}
+\begin{chunk}{defun htpAddInputAreaProp}
+(defun |htpAddInputAreaProp| (htPage label prop)
+  (setelt htPage 5
+          (cons (cons label (cons nil (cons nil (cons nil prop))))
+                (elt htPage 5))))
+
+\end{chunk}
+
+\defun{htpPropertyList}{htpPropertyList}
+\begin{chunk}{defun htpPropertyList}
+(defun |htpPropertyList| (htPage) (elt htPage 6))
+
+\end{chunk}
+
+\defun{htpProperty}{htpProperty}
+\begin{chunk}{defun htpProperty}
+(defun |htpProperty| (htPage propName)
+  (LASSOC propName (elt htPage 6)))
+\end{chunk}
+
+\defun{htpSetProperty}{htpSetProperty}
+\begin{chunk}{defun htpSetProperty}
+(defun |htpSetProperty| (htPage propName val)
+  (prog (pair)
+    (return
+      (progn
+        (setq pair (|assoc| propName (elt htPage 6)))
+        (cond
+          (pair (rplacd pair val))
+          (t
+           (setelt htPage 6
+                   (cons (cons propName val) (elt htPage 6)))))))))
+
+\end{chunk}
+
+\defun{htpLabelInputString}{htpLabelInputString}
+\begin{chunk}{defun htpLabelInputString}
+(defun |htpLabelInputString| (htPage label)
+  (prog (props s)
+    (return
+      (progn
+        (setq props
+                 (LASSOC label (|htpInputAreaAlist| htPage)))
+        (cond
+          ((and props (stringp (setq s (elt props 0))))
+           (cond
+             ((equal s "") s)
+             (t (|trimString| s))))
+          (t nil))))))
+
+\end{chunk}
+
+\defun{htpLabelFilteredInputString}{htpLabelFilteredInputString}
+\begin{chunk}{defun htpLabelFilteredInputString}
+(defun |htpLabelFilteredInputString| (htPage label)
+  (prog (props)
+    (return
+      (progn
+        (setq props
+                 (LASSOC label (|htpInputAreaAlist| htPage)))
+        (cond
+          (props (cond
+                     ((and (> (|#| props) 5) (elt props 6))
+                      (funcall (symbol-function (elt props 6))
+                               (elt props 0)))
+                     (t (|replacePercentByDollar| (elt props 0)))))
+          (t nil))))))
+
+\end{chunk}
+
+\defun{replacePercentByDollar,fn}{replacePercentByDollar,fn}
+\begin{chunk}{defun replacePercentByDollar,fn}
+(defun |replacePercentByDollar,fn| (s i n)
+  (prog (m)
+    (return
+      (SEQ (if (> i n) (EXIT ""))
+           (if (> (setq m (|charPosition| #\% s i))
+                  n)
+               (EXIT (SUBSTRING s i nil)))
+           (EXIT (STRCONC (SUBSTRING s i (- m i))
+                          "$"
+                          (|replacePercentByDollar,fn| s (1+ m)
+                              n)))))))
+
+\end{chunk}
+
+\defun{replacePercentByDollar}{replacePercentByDollar}
+\begin{chunk}{defun replacePercentByDollar}
+(defun |replacePercentByDollar| (s)
+  (|replacePercentByDollar,fn| s 0 (maxindex s)))
+
+\end{chunk}
+
+\defun{htpSetLabelInputString}{htpSetLabelInputString}
+\begin{chunk}{defun htpSetLabelInputString}
+(defun |htpSetLabelInputString| (htPage label val)
+  (prog (props)
+    (return
+      (progn
+        (setq props
+                 (LASSOC label (|htpInputAreaAlist| htPage)))
+        (cond
+          (props (setelt props 0 (stringimage val)))
+          (t nil))))))
+
+\end{chunk}
+
+\defun{htpLabelSpadValue}{htpLabelSpadValue}
+\begin{chunk}{defun htpLabelSpadValue}
+(defun |htpLabelSpadValue| (htPage label)
+  (prog (props)
+    (return
+      (progn
+        (setq props
+                 (LASSOC label (|htpInputAreaAlist| htPage)))
+        (cond (props (elt props 1)) (t nil))))))
+
+\end{chunk}
+
+\defun{htpSetLabelSpadValue}{htpSetLabelSpadValue}
+\begin{chunk}{defun htpSetLabelSpadValue}
+(defun |htpSetLabelSpadValue| (htPage label val)
+  (prog (props)
+    (return
+      (progn
+        (setq props
+                 (LASSOC label (|htpInputAreaAlist| htPage)))
+        (cond (props (setelt props 1 |val|)) (t nil))))))
+
+\end{chunk}
+
+\defun{htpLabelErrorMsg}{htpLabelErrorMsg}
+\begin{chunk}{defun htpLabelErrorMsg}
+(defun |htpLabelErrorMsg| (htPage label)
+  (prog (props)
+    (return
+      (progn
+        (setq props
+                 (LASSOC label (|htpInputAreaAlist| htPage)))
+        (cond (props (elt props 2)) (t nil))))))
+
+\end{chunk}
+
+\defun{htpSetLabelErrorMsg}{htpSetLabelErrorMsg}
+\begin{chunk}{defun htpSetLabelErrorMsg}
+(defun |htpSetLabelErrorMsg| (htPage label val)
+  (prog (props)
+    (return
+      (progn
+        (setq props
+                 (LASSOC label (|htpInputAreaAlist| htPage)))
+        (cond (props (setelt props 2 val)) (t nil))))))
+
+\end{chunk}
+
+\defun{htpLabelType}{htpLabelType}
+\begin{chunk}{defun htpLabelType}
+(defun |htpLabelType| (htPage label)
+  (prog (props)
+    (return
+      (progn
+        (setq props
+                 (LASSOC label (|htpInputAreaAlist| htPage)))
+        (cond (props (elt props 3)) (t nil))))))
+
+\end{chunk}
+
+\defun{htpLabelDefault}{htpLabelDefault}
+\begin{chunk}{defun htpLabelDefault}
+(defun |htpLabelDefault| (htPage label)
+  (prog (msg props)
+    (return
+      (cond
+        ((setq msg (|htpLabelInputString| htPage label))
+         (cond
+           ((equal msg "t") 1)
+           ((equal msg "nil") 0)
+           (t msg)))
+        (t
+         (setq props
+                  (LASSOC label (|htpInputAreaAlist| htPage)))
+         (cond (props (elt props 4)) (t nil)))))))
+
+\end{chunk}
+
+\defun{htpLabelSpadType}{htpLabelSpadType}
+\begin{chunk}{defun htpLabelSpadType}
+(defun |htpLabelSpadType| (htPage label)
+  (prog (props)
+    (return
+      (progn
+        (setq props
+                 (LASSOC label (|htpInputAreaAlist| htPage)))
+        (cond (props (elt props 5)) (t nil))))))
+
+\end{chunk}
+
+\defun{htpLabelFilter}{htpLabelFilter}
+\begin{chunk}{defun htpLabelFilter}
+(defun |htpLabelFilter| (htPage label)
+  (prog (props)
+    (return
+      (progn
+        (setq props
+                 (LASSOC label (|htpInputAreaAlist| htPage)))
+        (cond (props (elt props 6)) (t nil))))))
+
+\end{chunk}
+
+\defun{htpPageDescription}{htpPageDescription}
+\begin{chunk}{defun htpPageDescription}
+(defun |htpPageDescription| (htPage) (elt htPage 7)) 
+
+\end{chunk}
+
+\defun{htpSetPageDescription}{htpSetPageDescription}
+\begin{chunk}{defun htpSetPageDescription}
+(defun |htpSetPageDescription| (htPage pageDescription)
+  (setelt htPage 7 pageDescription))
+
+\end{chunk}
+
+\defun{htpAddToPageDescription}{htpAddToPageDescription}
+\begin{chunk}{defun htpAddToPageDescription}
+(defun |htpAddToPageDescription| (htPage pageDescrip)
+  (setelt htPage 7
+          (NCONC (NREVERSE (COPY-LIST pageDescrip)) (elt htPage 7))))
+
+\end{chunk}
+
+\defun{iht}{issue a single hypertex line or group of lines}
+\begin{chunk}{defun iht}
+(defun |iht| (line)
+  (declare (special |$htLineList| |$newPage|))
+  (cond
+    (|$newPage| nil)
+    ((consp line)
+     (setq |$htLineList|
+              (NCONC (NREVERSE (|mapStringize| (COPY-LIST line)))
+                     |$htLineList|)))
+    (t
+     (setq |$htLineList|
+              (cons (|basicStringize| line) |$htLineList|)))))
+
+\end{chunk}
+
+\defun{bcHt}{bcHt}
+\begin{chunk}{defun bcHt}
+(defun |bcHt| (line)
+  (declare (special |$curPage| |$newPage|))
+  (progn
+    (|iht| line)
+    (cond
+      ((consp line)
+       (cond
+         (|$newPage|
+             (|htpAddToPageDescription| |$curPage|
+                 (cons (cons '|text| line) nil)))
+         (t nil)))
+      (|$newPage|
+          (|htpAddToPageDescription| |$curPage|
+              (cons (cons '|text| (cons line nil)) nil)))
+      (t nil))))
+
+\end{chunk}
+
+\defun{bcIssueHt}{bcIssueHt}
+\begin{chunk}{defun bcIssueHt}
+(defun |bcIssueHt| (line)
+  (cond ((consp line) (|htMakePage1| line)) (t (|iht| line))))
+
+\end{chunk}
+
+\defun{mapStringize}{mapStringize}
+\begin{chunk}{defun mapStringize}
+(defun |mapStringize| (z)
+  (cond
+    ((atom z) z)
+    (t (rplaca z (|basicStringize| (car z)))
+       (rplacd z (|mapStringize| (cdr z))) z)))
+
+\end{chunk}
+
+\defun{basicStringize}{basicStringize}
+\begin{chunk}{defun basicStringize}
+(defun |basicStringize| (s)
+  (cond
+    ((stringp s)
+     (cond
+       ((equal s "\\$") "\\%")
+       ((equal s "{\\em $}") "{\\em \\%}")
+       (t s)))
+    ((eq s '$) "\\%")
+    (t (princ-to-string s))))
+
+\end{chunk}
+
+\defun{stringize}{stringize}
+\begin{chunk}{defun stringize}
+(defun |stringize| (s)
+  (cond ((stringp s) s) (t (princ-to-string s))))
+
+\end{chunk}
+
+\defun{htInitPage}{htInitPage}
+\begin{chunk}{defun htInitPage}
+(defun |htInitPage| (title propList)
+  (declare (special |$curPage|))
+  (progn
+    (|htInitPageNoScroll| propList title)
+    (|htSayStandard| "\\beginscroll ")
+    |$curPage|))
+
+\end{chunk}
+
+\defun{htAddHeading}{htAddHeading}
+\begin{chunk}{defun htAddHeading}
+(defun |htAddHeading| (title)
+ (declare (special |$curPage|))
+ (|htNewPage| title)
+ |$curPage|)
+
+\end{chunk}
+
+\defun{htShowPage}{htShowPage}
+\begin{chunk}{defun htShowPage}
+(defun |htShowPage| ()
+  (|htSayStandard| "\\endscroll")
+  (|htShowPageNoScroll|))
+
+\end{chunk}
+
+\defun{htShowPageNoScroll}{show the page which has been computed}
+\begin{chunk}{defun htShowPageNoScroll}
+(defun |htShowPageNoScroll| ()
+  (prog (line)
+  (declare (special |$htLineList| |$curPage| |$newPage|))
+    (return
+      (progn
+        (|htSayStandard| "\\autobuttons")
+        (|htpSetPageDescription| |$curPage|
+            (NREVERSE (|htpPageDescription| |$curPage|)))
+        (setq |$newPage| nil)
+        (setq |$htLineList| nil)
+        (|htMakePage| (|htpPageDescription| |$curPage|))
+        (setq line (apply (|function| CONCAT) (NREVERSE |$htLineList|)))
+        (|issueHT| line)
+        (|endHTPage|)))))
+
+\end{chunk}
+
+\defun{htMakePage}{make a page given the description in itemList}
+\begin{chunk}{defun htMakePage}
+(defun |htMakePage| (itemList)
+  (declare (special |$curPage| |$newPage|))
+  (progn
+    (cond
+      (|$newPage| (|htpAddToPageDescription| |$curPage| itemList)))
+    (|htMakePage1| itemList)))
+
+\end{chunk}
+
+\defun{htMakePage1}{htMakePage1}
+\begin{chunk}{defun htMakePage1}
+(defun |htMakePage1| (itemList)
+  (prog (itemType items)
+    (return
+      (SEQ (DO ((G166261 itemList (CDR G166261)) (G166253 NIL))
+               ((OR (ATOM G166261)
+                    (PROGN (SETQ G166253 (CAR G166261)) NIL)
+                    (PROGN
+                      (PROGN
+                        (setq itemType (CAR G166253))
+                        (setq items (CDR G166253))
+                        G166253)
+                      NIL))
+                NIL)
+             (SEQ (EXIT (COND
+                          ((eq itemType '|text|)
+                           (|iht| items))
+                          ((eq itemType '|lispLinks|)
+                           (|htLispLinks| items))
+                          ((eq itemType '|lispmemoLinks|)
+                           (|htLispMemoLinks| items))
+                          ((eq itemType '|bcLinks|)
+                           (|htBcLinks| items))
+                          ((eq itemType '|bcLinksNS|)
+                           (|htBcLinks| items t))
+                          ((eq itemType '|bcLispLinks|)
+                           (|htBcLispLinks| items))
+                          ((eq itemType '|radioButtons|)
+                           (|htRadioButtons| items))
+                          ((eq itemType '|bcRadioButtons|)
+                           (|htBcRadioButtons| items))
+                          ((eq itemType '|inputStrings|)
+                           (|htInputStrings| items))
+                          ((eq itemType '|domainConditions|)
+                           (|htProcessDomainConditions| items))
+                          ((eq itemType '|bcStrings|)
+                           (|htProcessBcStrings| items))
+                          ((eq itemType '|toggleButtons|)
+                           (|htProcessToggleButtons| items))
+                          ((eq itemType '|bcButtons|)
+                           (|htProcessBcButtons| items))
+                          ((eq itemType '|doneButton|)
+                           (|htProcessDoneButton| items))
+                          ((eq itemType '|doitButton|)
+                           (|htProcessDoitButton| items))
+                          (t
+                           (|systemError|
+                               (cons "unknown itemType"
+                                     (cons itemType nil))))))))))))
+
+\end{chunk}
+
+\defun{htMakeErrorPage}{htMakeErrorPage}
+\begin{chunk}{defun htMakeErrorPage}
+(defun |htMakeErrorPage| (htPage)
+  (prog (line)
+  (declare (special |$curPage| |$htLineList| |$newPage|))
+    (return
+      (progn
+        (setq |$newPage| nil)
+        (setq |$htLineList| nil)
+        (setq |$curPage| htPage)
+        (|htMakePage| (|htpPageDescription| htPage))
+        (setq line (apply (|function| CONCAT) (NREVERSE |$htLineList|)))
+        (|issueHT| line)
+        (|endHTPage|)))))
+
+\end{chunk}
+
+\defun{htQuote}{htQuote}
+\begin{chunk}{defun htQuote}
+(defun |htQuote| (s)
+  (progn
+    (|iht| "\"")
+    (|iht| s)
+    (|iht| "\"")))
+
+\end{chunk}
+
+\defun{htProcessToggleButtons}{htProcessToggleButtons}
+\begin{chunk}{defun htProcessToggleButtons}
+(defun |htProcessToggleButtons| (buttons)
+  (prog (message info defaultValue buttonName)
+  (declare (special |$curPage|))
+    (return
+      (SEQ (progn
+             (|iht| "\\newline\\indent{5}\\beginitems ")
+             (DO ((G166302 buttons (CDR G166302))
+                  (G166286 nil))
+                 ((OR (ATOM G166302)
+                      (progn (setq G166286 (car G166302)) nil)
+                      (progn
+                        (progn
+                          (setq message (car G166286))
+                          (setq info (CADR G166286))
+                          (setq defaultValue (CADDR G166286))
+                          (setq buttonName (CADDDR G166286))
+                          G166286)
+                        nil))
+                  nil)
+               (SEQ (EXIT (progn
+                            (cond
+                              ((NULL (LASSOC buttonName
+                                      (|htpInputAreaAlist| |$curPage|)))
+                               (|setUpDefault| buttonName
+                                   (cons '|button|
+                                    (cons defaultValue nil)))))
+                            (|iht| (cons
+                                                                         "\\item{\\em\\inputbox["
+                                    (cons
+                                     (|htpLabelDefault| |$curPage|
+                                      buttonName)
+                                     (cons "]{"
+                                      (cons buttonName
+                                       (cons
+                                                                    "}{\\htbmfile{pick}}{\\htbmfile{unpick}}\\space{}"
+                                        nil))))))
+                            (|bcIssueHt| message)
+                            (|iht| "\\space{}}")
+                            (|bcIssueHt| info)))))
+             (|iht| "\\enditems\\indent{0} "))))))
+
+\end{chunk}
+
+\defun{htProcessBcButtons}{htProcessBcButtons}
+\begin{chunk}{defun htProcessBcButtons}
+(defun |htProcessBcButtons| (buttons)
+  (prog (defaultValue buttonName k)
+  (declare (special |$curPage|))
+    (return
+      (SEQ (DO ((G166328 buttons (CDR G166328)) (G166317 nil))
+               ((OR (ATOM G166328)
+                    (progn (setq G166317 (car G166328)) nil)
+                    (progn
+                      (progn
+                        (setq defaultValue (car G166317))
+                        (setq buttonName (CADR G166317))
+                        G166317)
+                      nil))
+                nil)
+             (SEQ (EXIT (progn
+                          (cond
+                            ((NULL (LASSOC buttonName
+                                    (|htpInputAreaAlist| |$curPage|)))
+                             (|setUpDefault| buttonName
+                                 (cons '|button|
+                                       (cons defaultValue nil)))))
+                          (setq k
+                                   (|htpLabelDefault| |$curPage|
+                                    buttonName))
+                          (cond
+                            ((EQL k 0)
+                             (|iht| (cons "\\off{"
+                                     (cons buttonName
+                                      (cons "}" nil)))))
+                            ((EQL k 1)
+                             (|iht| (cons "\\on{"
+                                     (cons buttonName
+                                      (cons "}" nil)))))
+                            (t
+                             (|iht| (cons "\\inputbox["
+                                     (cons
+                                      (|htpLabelDefault| |$curPage|
+                                       buttonName)
+                                      (cons "]{"
+                                       (cons buttonName
+                                        (cons
+                                                                              "}{\\htbmfile{pick}}{\\htbmfile{unpick}}"
+                                         nil))))))))))))))))
+
+\end{chunk}
+
+\defun{htProcessBcStrings}{htProcessBcStrings}
+\begin{chunk}{defun htProcessBcStrings}
+(defun |htProcessBcStrings| (strings)
+  (PROG (numChars default stringName spadType filter mess2)
+  (declare (special |$curPage|))
+    (return
+      (SEQ (DO ((G166358 strings (CDR G166358)) (G166343 nil))
+               ((or (atom G166358)
+                    (progn (setq G166343 (CAR G166358)) nil)
+                    (progn
+                      (progn
+                        (setq numChars (car G166343))
+                        (setq default (cadr G166343))
+                        (setq stringName (caddr G166343))
+                        (setq spadType (cadddr G166343))
+                        (setq filter (cddddr G166343))
+                        G166343)
+                      nil))
+                nil)
+             (SEQ (EXIT (progn
+                          (setq mess2 "")
+                          (cond
+                            ((null (LASSOC stringName
+                                    (|htpInputAreaAlist| |$curPage|)))
+                             (|setUpDefault| stringName
+                                 (cons '|string|
+                                       (cons default
+                                        (cons spadType
+                                         (cons filter nil)))))))
+                          (cond
+                            ((|htpLabelErrorMsg| |$curPage|
+                                 stringName)
+                             (|iht| (cons
+                                     "\\centerline{{\\em "
+                                     (cons
+                                      (|htpLabelErrorMsg| |$curPage|
+                                       stringName)
+                                      (cons "}}" nil))))
+                             (setq mess2
+                                      (concat mess2 (|bcSadFaces|)))
+                             (|htpSetLabelErrorMsg| |$curPage|
+                                 stringName nil)))
+                          (|iht| (cons "\\inputstring{"
+                                       (cons stringName
+                                        (cons "}{"
+                                         (cons numChars
+                                          (cons "}{"
+                                           (cons
+                                            (|htpLabelDefault|
+                                             |$curPage| stringName)
+                                            (cons "} "
+                                             (cons mess2 nil)))))))))))))))))
+
+\end{chunk}
+
+\defun{bcSadFaces}{bcSadFaces}
+\begin{chunk}{defun bcSadFaces}
+(defun |bcSadFaces| ()
+        "\\space{1}{\\em\\htbitmap{error}\\htbitmap{error}\\htbitmap{error}}")
+
+\end{chunk}
+
+\defun{htLispLinks}{htLispLinks}
+\begin{chunk}{defun htLispLinks}
+(defun |htLispLinks| (&REST G166422 &AUX option links)
+  (setq links (car G166422))
+  (setq option (cdr G166422))
+  (prog (t1 options indent message info func value call)
+    (return
+      (SEQ (progn
+             (setq t1 (|beforeAfter| '|options| links))
+             (setq links (car t1))
+             (setq options (cadr t1))
+             (setq indent (or (LASSOC '|indent| options) 5))
+             (|iht| "\\newline\\indent{")
+             (|iht| (|stringize| indent))
+             (|iht| "}\\beginitems")
+             (DO ((G166403 links (CDR G166403)) (G166387 nil))
+                 ((or (atom G166403)
+                      (progn (setq G166387 (car G166403)) nil)
+                      (progn
+                        (progn
+                          (setq message (car G166387))
+                          (setq info (cadr G166387))
+                          (setq func (caddr G166387))
+                          (setq value (cdddr G166387))
+                          G166387)
+                        nil))
+                  nil)
+               (SEQ (EXIT (progn
+                            (|iht| "\\item[")
+                            (setq call
+                                     (cond
+                                       ((IFCAR option)
+                                        "\\lispmemolink")
+                                       (t
+                                        "\\lispdownlink")))
+                            (|htMakeButton| call message
+                                (|mkCurryFun| func value))
+                            (|iht| (cons "]\\space{}" nil))
+                            (|bcIssueHt| info)))))
+             (|iht| "\\enditems\\indent{0} "))))))
+
+\end{chunk}
+
+\defun{htLispMemoLinks}{htLispMemoLinks}
+\begin{chunk}{defun htLispMemoLinks}
+(defun |htLispMemoLinks| (links) (|htLispLinks| links t))
+
+\end{chunk}
+
+\defun{htBcLinks}{htBcLinks}
+\begin{chunk}{defun htBcLinks}
+(defun |htBcLinks| (&REST G166465 &AUX options links)
+ (setq links (car G166465))
+ (setq options (cdr G166465))
+ (prog (skipStateInfo? t1 message info func value)
+    (return
+      (SEQ (progn
+             (setq |skipStateInfo?| (IFCAR options))
+             (setq t1 (|beforeAfter| '|options| links))
+             (setq links (car t1))
+             (setq options (cadr t1))
+             (DO ((G166447 links (CDR G166447)) (G166434 nil))
+                 ((or (atom G166447)
+                      (progn (setq G166434 (car G166447)) nil)
+                      (progn
+                        (progn
+                          (setq message (car G166434))
+                          (setq info (cadr G166434))
+                          (setq func (caddr G166434))
+                          (setq value (cdddr G166434))
+                          G166434)
+                        nil))
+                  nil)
+               (SEQ (EXIT (progn
+                            (|htMakeButton|
+                                "\\lispdownlink" message
+                                (|mkCurryFun| func value)
+                                skipStateInfo?)
+                            (|bcIssueHt| info))))))))))
+
+\end{chunk}
+
+\defun{htBcLispLinks}{htBcLispLinks}
+\begin{chunk}{defun htBcLispLinks}
+(defun |htBcLispLinks| (links)
+  (prog (t1 options message info func value)
+    (return
+      (SEQ (progn
+             (setq t1 (|beforeAfter| '|options| links))
+             (setq links (car t1))
+             (setq options (cadr t1))
+             (DO ((G166487 links (cdr G166487)) (G166474 nil))
+                 ((or (atom G166487)
+                      (progn (setq G166474 (car G166487)) nil)
+                      (progn
+                        (progn
+                          (setq message (car G166474))
+                          (setq info (cadr G166474))
+                          (setq func (caddr G166474))
+                          (setq value (cdddr G166474))
+                          G166474)
+                        nil))
+                  nil)
+               (SEQ (EXIT (progn
+                            (|htMakeButton| "\\lisplink"
+                                message
+                                (|mkCurryFun| func value))
+                            (|bcIssueHt| info))))))))))
+
+\end{chunk}
+
+\defun{beforeAfter}{beforeAfter}
+\begin{chunk}{defun beforeAfter}
+(defun |beforeAfter| (x u)
+  (prog (y r)
+    (return
+      (SEQ (cons (prog (G166514)
+                   (setq G166514 nil)
+                   (return
+                     (DO ((G166504 u (CDR G166504)))
+                         ((or (atom G166504)
+                              (progn
+                                (progn
+                                  (setq y (car G166504))
+                                  (setq r (cdr G166504))
+                                  G166504)
+                                nil)
+                              (null (NEQUAL x y)))
+                          (NREVERSE0 G166514))
+                       (SEQ (EXIT (setq G166514 (cons y G166514)))))))
+                 (cons r nil))))))
+
+\end{chunk}
+
+\defun{mkCurryFun}{mkCurryFun}
+\begin{chunk}{defun mkCurryFun}
+(defun |mkCurryFun| (fun val)
+  (prog (name code)
+    (return
+      (progn
+        (setq name (gentemp))
+        (setq code
+                 (cons 'defun
+                       (cons name
+                             (cons '(arg)
+                                   (cons
+                                    (cons 'apply
+                                     (cons (mkq fun)
+                                      (cons
+                                       (cons 'cons
+                                        (cons 'arg
+                                         (cons (mkq val) nil)))
+                                       nil)))
+                                    nil)))))
+        (eval code)
+        name))))
+
+\end{chunk}
+
+\defun{htRadioButtons}{htRadioButtons}
+\begin{chunk}{defun htRadioButtons}
+(defun |htRadioButtons| (G166546)
+  (prog (groupName buttons boxesName message info buttonName defaultValue)
+  (declare (special |$curPage|))
+    (return
+      (SEQ (progn
+             (setq groupName (car G166546))
+             (setq buttons (cdr G166546))
+             (|htpSetRadioButtonAlist| |$curPage|
+                 (cons (cons groupName (|buttonNames| buttons))
+                       (|htpRadioButtonAlist| |$curPage|)))
+             (setq boxesName (gentemp))
+             (|iht| (cons "\\newline\\indent{5}\\radioboxes{"
+                     (cons boxesName
+                      (cons
+                        "}{\\htbmfile{pick}}{\\htbmfile{unpick}}\\beginitems "
+                                      nil))))
+             (setq defaultValue "1")
+             (DO ((G166568 buttons (cdr G166568))
+                  (G166540 nil))
+                 ((or (atom G166568)
+                      (progn (setq G166540 (car G166568)) nil)
+                      (progn
+                        (progn
+                          (setq message (car G166540))
+                          (setq info (cadr G166540))
+                          (setq buttonName (caddr G166540))
+                          G166540)
+                        nil))
+                  nil)
+               (SEQ (EXIT (progn
+                            (cond
+                              ((null (LASSOC buttonName
+                                      (|htpInputAreaAlist| |$curPage|)))
+                               (|setUpDefault| buttonName
+                                   (cons '|button|
+                                    (cons defaultValue nil)))
+                               (setq defaultValue
+                                        "0")))
+                            (|iht| (cons "\\item{\\em\\radiobox["
+                                    (cons
+                                     (|htpLabelDefault| |$curPage|
+                                      buttonName)
+                                     (cons "]{"
+                                      (cons buttonName
+                                       (cons "}{"
+                                        (cons boxesName
+                                         (cons
+                                          "}\\space{}"
+                                          nil))))))))
+                            (|bcIssueHt| message)
+                            (|iht| "\\space{}}")
+                            (|bcIssueHt| info)))))
+             (|iht| "\\enditems\\indent{0} "))))))
+
+\end{chunk}
+
+\defun{htBcRadioButtons}{htBcRadioButtons}
+\begin{chunk}{defun htBcRadioButtons}
+(defun |htBcRadioButtons| (G166594)
+  (prog (groupName buttons boxesName message info buttonName defaultValue)
+  (declare (special |$curPage|))
+    (return
+      (SEQ (progn
+             (setq groupName (car G166594))
+             (setq buttons (cdr G166594))
+             (|htpSetRadioButtonAlist| |$curPage|
+                 (cons (cons groupName (|buttonNames| buttons))
+                       (|htpRadioButtonAlist| |$curPage|)))
+             (setq boxesName (gentemp))
+             (|iht| (cons "\\radioboxes{"
+                     (cons boxesName
+                      (cons "}{\\htbmfile{pick}}{\\htbmfile{unpick}} "
+                                      nil))))
+             (setq defaultValue "1")
+             (DO ((G166616 buttons (cdr G166616))
+                  (G166588 nil))
+                 ((or (atom G166616)
+                      (progn (setq G166588 (car G166616)) nil)
+                      (progn
+                        (progn
+                          (setq message (car G166588))
+                          (setq info (cadr G166588))
+                          (setq buttonName (caddr G166588))
+                          G166588)
+                        nil))
+                  nil)
+               (SEQ (EXIT (progn
+                            (cond
+                              ((null (LASSOC buttonName
+                                      (|htpInputAreaAlist| |$curPage|)))
+                               (|setUpDefault| buttonName
+                                   (cons '|button|
+                                    (cons defaultValue nil)))
+                               (setq defaultValue
+                                        "0")))
+                            (|iht| (cons
+                                    "{\\em\\radiobox["
+                                    (cons
+                                     (|htpLabelDefault| |$curPage|
+                                      buttonName)
+                                     (cons "]{"
+                                      (cons buttonName
+                                       (cons "}{"
+                                        (cons boxesName
+                                         (cons "}" nil))))))))
+                            (|bcIssueHt| message)
+                            (|iht| "\\space{}}")
+                            (|bcIssueHt| info))))))))))
+
+\end{chunk}
+
+\defun{setUpDefault}{setUpDefault}
+\begin{chunk}{defun setUpDefault}
+(defun |setUpDefault| (name props)
+  (declare (special |$curPage|))
+  (|htpAddInputAreaProp| |$curPage| name props))
+
+\end{chunk}
+
+\defun{buttonNames}{buttonNames}
+\begin{chunk}{defun buttonNames}
+(defun |buttonNames| (buttons)
+  (prog (buttonName)
+    (return
+      (SEQ (prog (G166645)
+             (setq G166645 nil)
+             (return
+               (DO ((G166651 buttons (cdr G166651))
+                    (G166637 nil))
+                   ((or (atom G166651)
+                        (progn (setq G166637 (car G166651)) nil)
+                        (progn
+                          (progn
+                            (setq buttonName (caddr G166637))
+                            G166637)
+                          nil))
+                    (NREVERSE0 G166645))
+                 (SEQ (EXIT (setq G166645
+                                  (cons buttonName G166645)))))))))))
+
+\end{chunk}
+
+\defun{htInputStrings}{htInputStrings}
+\begin{chunk}{defun htInputStrings}
+(defun |htInputStrings| (strings)
+  (prog (mess1 numChars default stringName spadType filter mess2)
+  (declare (special |$curPage|))
+    (return
+      (SEQ (progn
+             (|iht| "\\newline\\indent{5}\\beginitems ")
+             (DO ((G166685 strings (cdr G166685))
+                  (G166665 nil))
+                 ((or (atom G166685)
+                      (progn (setq G166665 (car G166685)) nil)
+                      (progn
+                        (progn
+                          (setq mess1 (car G166665))
+                          (setq mess2 (cadr G166665))
+                          (setq numChars (caddr G166665))
+                          (setq default (cadddr G166665))
+                          (setq stringName
+                                   (car (cddddr G166665)))
+                          (setq spadType
+                                   (cadr (cddddr G166665)))
+                          (setq filter (cddr (cddddr G166665)))
+                          G166665)
+                        nil))
+                  nil)
+               (SEQ (EXIT (progn
+                            (cond
+                              ((null (LASSOC stringName
+                                      (|htpInputAreaAlist| |$curPage|)))
+                               (|setUpDefault| stringName
+                                   (cons '|string|
+                                    (cons default
+                                     (cons spadType
+                                      (cons filter nil)))))))
+                            (cond
+                              ((|htpLabelErrorMsg| |$curPage|
+                                   stringName)
+                               (|iht| (cons "\\centerline{{\\em "
+                                       (cons
+                                        (|htpLabelErrorMsg| |$curPage|
+                                         stringName)
+                                        (cons "}}" nil))))
+                               (setq mess2
+                                        (CONCAT mess2 (|bcSadFaces|)))
+                               (|htpSetLabelErrorMsg| |$curPage|
+                                   stringName nil)))
+                            (|iht| "\\item ")
+                            (|bcIssueHt| mess1)
+                            (|iht| (cons "\\inputstring{"
+                                    (cons stringName
+                                     (cons "}{"
+                                      (cons numChars
+                                       (cons "}{"
+                                        (cons
+                                         (|htpLabelDefault| |$curPage|
+                                          stringName)
+                                         (cons "} " nil))))))))
+                            (|bcIssueHt| mess2)))))
+             (|iht| "\\enditems\\indent{0}\\newline "))))))
+
+\end{chunk}
+
+\defun{htProcessDomainConditions}{htProcessDomainConditions}
+\begin{chunk}{defun htProcessDomainConditions}
+(defun |htProcessDomainConditions| (condList)
+  (declare (special |$curPage|))
+  (progn
+    (|htpSetDomainConditions| |$curPage|
+        (|renamePatternVariables| condList))
+    (|htpSetDomainVariableAlist| |$curPage|
+        (|computeDomainVariableAlist|))))
+
+\end{chunk}
+
+\defun{renamePatternVariables}{renamePatternVariables}
+\begin{chunk}{defun renamePatternVariables}
+(defun |renamePatternVariables| (condList)
+  (declare (special |$curPage| |$PatternVariableList|))
+  (progn
+    (|htpSetDomainPvarSubstList| |$curPage|
+        (|renamePatternVariables1| condList nil
+            |$PatternVariableList|))
+    (|substFromAlist| condList (|htpDomainPvarSubstList| |$curPage|))))
+
+\end{chunk}
+
+\defun{renamePatternVariables1}{renamePatternVariables1}
+\begin{chunk}{defun renamePatternVariables1}
+(defun |renamePatternVariables1| (condList substList patVars)
+  (prog (restConds pattern t2 pv t3 cond nsubst)
+  (declare (special |$EmptyMode|))
+    (return
+      (cond
+        ((null condList) substList)
+        (t (setq cond (car condList))
+         (setq restConds (cdr condList))
+         (cond
+           ((or (and (consp cond) (eq (qcar cond) '|isDomain|)
+                     (progn
+                       (setq t2 (qcdr cond))
+                       (and (consp t2)
+                            (progn
+                              (setq pv (qcar t2))
+                              (setq t3 (qcdr t2))
+                              (and (consp t3)
+                                   (eq (qcdr t3) nil)
+                                   (progn
+                                     (setq pattern
+                                      (qcar t3))
+                                     t))))))
+                (and (consp cond) (eq (qcar cond) '|ofCategory|)
+                     (progn
+                       (setq t2 (qcdr cond))
+                       (and (consp t2)
+                            (progn
+                              (setq pv (qcar t2))
+                              (setq t3 (qcdr t2))
+                              (and (consp t3)
+                                   (eq (qcdr t3) nil)
+                                   (progn
+                                     (setq pattern
+                                      (qcar t3))
+                                     t))))))
+                (and (consp cond) (eq (qcar cond) '|Satisfies|)
+                     (progn
+                       (setq t2 (qcdr cond))
+                       (and (consp t2)
+                            (progn
+                              (setq pv (qcar t2))
+                              (setq t3 (qcdr t2))
+                              (and (consp t3)
+                                   (eq (qcdr t3) nil)
+                                   (progn
+                                     (setq cond (qcar t3))
+                                     t)))))))
+            (cond
+              ((equal pv |$EmptyMode|)
+               (setq nsubst substList))
+              (t
+               (setq nsubst
+                        (cons (cons pv (car patVars)) substList))))
+            (|renamePatternVariables1| restConds nsubst
+                (cdr patVars)))
+           (t substList)))))))
+
+\end{chunk}
+
+\defun{substFromAlist}{substFromAlist}
+\begin{chunk}{defun substFromAlist}
+(defun |substFromAlist| (z substAlist)
+  (prog (pvar replace)
+    (return
+      (SEQ (progn
+             (DO ((G166792 substAlist (cdr G166792))
+                  (G166783 nil))
+                 ((or (atom G166792)
+                      (progn (setq G166783 (car G166792)) nil)
+                      (progn
+                        (progn
+                          (setq pvar (car G166783))
+                          (setq replace (cdr G166783))
+                          G166783)
+                        nil))
+                  nil)
+               (SEQ (EXIT (setq z (MSUBST replace pvar z)))))
+             z)))))
+
+\end{chunk}
+
+\defun{computeDomainVariableAlist}{computeDomainVariableAlist}
+\begin{chunk}{defun computeDomainVariableAlist}
+(defun |computeDomainVariableAlist| ()
+  (prog (pvar)
+  (declare (special |$curPage|))
+    (return
+      (SEQ (prog (G166813)
+             (setq G166813 nil)
+             (return
+               (DO ((G166819 (|htpDomainPvarSubstList| |$curPage|)
+                        (cdr G166819))
+                    (G166805 NIL))
+                   ((or (atom G166819)
+                        (progn (setq G166805 (car G166819)) nil)
+                        (progn
+                          (progn
+                            (setq pvar (cdr G166805))
+                            G166805)
+                          NIL))
+                    (NREVERSE0 G166813))
+                 (SEQ (EXIT (setq G166813
+                                  (cons (cons pvar
+                                         (|pvarCondList| pvar))
+                                        G166813)))))))))))
+
+\end{chunk}
+
+\defun{pvarCondList}{pvarCondList}
+\begin{chunk}{defun pvarCondList}
+(defun |pvarCondList| (pvar)
+  (declare (special |$curPage|))
+  (NREVERSE
+      (|pvarCondList1| (cons pvar nil) nil
+          (|htpDomainConditions| |$curPage|))))
+
+\end{chunk}
+
+\defun{pvarCondList1}{pvarCondList1}
+\begin{chunk}{defun pvarCondList1}
+(defun |pvarCondList1| (pvarList activeConds condList)
+  (prog (cond restConds t2 pv t3 pattern)
+    (return
+      (cond
+        ((null condList) activeConds)
+        (t (setq cond (car condList))
+         (setq restConds (cdr condList))
+         (cond
+           ((and (consp cond)
+                 (progn
+                   (setq t2 (qcdr cond))
+                   (and (consp t2)
+                        (progn
+                          (setq pv (qcar t2))
+                          (setq t3 (qcdr t2))
+                          (and (consp t3)
+                               (eq (qcdr t3) nil)
+                               (progn
+                                 (setq pattern (qcar t3))
+                                 t)))))
+                 (|member| pv pvarList))
+            (|pvarCondList1|
+                (NCONC pvarList (|pvarsOfPattern| pattern))
+                (cons cond activeConds) restConds))
+           (t (|pvarCondList1| pvarList activeConds restConds))))))))
+
+\end{chunk}
+
+\defun{pvarsOfPattern}{pvarsOfPattern}
+\begin{chunk}{defun pvarsOfPattern}
+(defun |pvarsOfPattern| (pattern)
+  (prog ()
+  (declare (special |$PatternVariableList|))
+    (return
+      (SEQ (cond
+             ((null (listp pattern)) nil)
+             (t
+              (prog (G166869)
+                (setq G166869 nil)
+                (return
+                  (DO ((G166875 (cdr pattern) (cdr G166875))
+                       (pvar nil))
+                      ((or (atom G166875)
+                           (progn (setq pvar (car G166875)) nil))
+                       (NREVERSE0 G166869))
+                    (SEQ (EXIT (cond
+                                 ((|member| pvar
+                                      |$PatternVariableList|)
+                                  (setq G166869
+                                        (cons pvar G166869)))))))))))))))
+
+\end{chunk}
+
+\defun{htMakeTemplates,substLabel}{htMakeTemplates,substLabel}
+\begin{chunk}{defun htMakeTemplates,substLabel}
+(defun |htMakeTemplates,substLabel| (i template)
+  (SEQ (if (consp template)
+           (EXIT (intern (CONCAT (car template) (princ-to-string i)
+                                 (cdr template)))))
+       (EXIT template)))
+
+\end{chunk}
+
+\defun{htMakeTemplates}{htMakeTemplates}
+\begin{chunk}{defun htMakeTemplates}
+(defun |htMakeTemplates| (templateList numLabels)
+  (prog ()
+    (return
+      (SEQ (progn
+             (setq templateList
+                      (prog (G166895)
+                        (setq G166895 nil)
+                        (return
+                          (DO ((G166900 templateList
+                                   (CDR G166900))
+                               (template nil))
+                              ((or (atom G166900)
+                                   (progn
+                                     (setq template (car G166900))
+                                     nil))
+                               (NREVERSE0 G166895))
+                            (SEQ (EXIT (setq G166895
+                                        (cons
+                                         (|templateParts| template)
+                                         G166895))))))))
+             (prog (G166910)
+               (setq G166910 nil)
+               (return
+                 (DO ((i 1 (1+ i)))
+                     ((qsgreaterp i numLabels)
+                      (NREVERSE0 G166910))
+                   (SEQ (EXIT (setq G166910
+                                    (cons
+                                     (prog (G166922)
+                                       (setq G166922 nil)
+                                       (return
+                                         (DO
+                                          ((G166927 templateList
+                                            (CDR G166927))
+                                           (template nil))
+                                          ((or (atom G166927)
+                                            (progn
+                                              (setq template
+                                               (car G166927))
+                                              nil))
+                                           (NREVERSE0 G166922))
+                                           (SEQ
+                                            (EXIT
+                                             (setq G166922
+                                              (cons
+                                               (|htMakeTemplates,substLabel|
+                                                i template)
+                                               G166922)))))))
+                                     G166910))))))))))))
+
+\end{chunk}
+
+\defun{templateParts}{templateParts}
+\begin{chunk}{defun templateParts}
+(defun |templateParts| (template)
+  (prog (i)
+    (return
+      (cond
+        ((null (stringp template)) template)
+        (t (setq i (SEARCH "%l" template))
+         (cond
+           ((null i) template)
+           (t
+            (cons (SUBSEQ template 0 i)
+                  (SUBSEQ template (+ i 2))))))))))
+
+\end{chunk}
+
+\defun{htMakeDoneButton}{htMakeDoneButton}
+\begin{chunk}{defun htMakeDoneButton}
+(defun |htMakeDoneButton| (message func)
+  (progn
+    (|bcHt| "\\newline\\vspace{1}\\centerline{")
+    (cond
+      ((equal message "Continue")
+       (|bchtMakeButton| "\\lispdownlink"
+           '|\\ContinueBitmap| func))
+      (t
+       (|bchtMakeButton| "\\lispdownlink"
+           (CONCAT "\\box{" message "}")
+           func)))
+    (|bcHt| "} ")))
+
+\end{chunk}
+
+\defun{htProcessDoneButton}{htProcessDoneButton}
+\begin{chunk}{defun htProcessDoneButton}
+(defun |htProcessDoneButton| (G166950)
+  (prog (label func)
+    (return
+      (progn
+        (setq label (car G166950))
+        (setq func (cadr G166950))
+        (|iht| "\\newline\\vspace{1}\\centerline{")
+        (cond
+          ((equal label "Continue")
+           (|htMakeButton| "\\lispdownlink"
+               '|\\ContinueBitmap| func))
+          ((equal label "Push to enter names")
+           (|htMakeButton| "\\lispdownlink"
+               "\\ControlBitmap{clicktoset}" func))
+          (t
+           (|htMakeButton| "\\lispdownlink"
+               (CONCAT "\\box{" label "}")
+               func)))
+        (|iht| "} ")))))
+
+\end{chunk}
+
+\defun{htMakeButton}{htMakeButton}
+\begin{chunk}{defun htMakeButton}
+(defun |htMakeButton|
+       (&REST G166990 &AUX options func message htCommand)
+  (DSETQ (htCommand message func . options) G166990)
+  (prog (skipStateInfo? id type)
+  (declare (special |$curPage|))
+    (return
+      (SEQ (progn
+             (setq skipStateInfo? (IFCAR options))
+             (|iht| (cons htCommand (cons "{" nil)))
+             (|bcIssueHt| message)
+             (cond
+               (skipStateInfo?
+                   (|iht| (cons "}{(|htDoneButton| '|"
+                                (cons func
+                                      (cons "| "
+                                       (cons (|htpName| |$curPage|)
+                                        (cons ")}" nil)))))))
+               (t
+                (|iht| (cons "}{(|htDoneButton| '|"
+                             (cons func
+                                   (cons "| (progn " nil))))
+                (DO ((G166977 (|htpInputAreaAlist| |$curPage|)
+                         (CDR G166977))
+                     (G166965 nil))
+                    ((OR (ATOM G166977)
+                         (progn (setq G166965 (car G166977)) nil)
+                         (progn
+                           (progn
+                             (setq id (car G166965))
+                             (setq type (car (cddddr G166965)))
+                             G166965)
+                           nil))
+                     nil)
+                  (SEQ (EXIT (progn
+                               (|iht| (cons "(|htpSetLabelInputString| "
+                                       (cons (|htpName| |$curPage|)
+                                        (cons "'|"
+                                         (cons id
+                                          (cons "| " nil))))))
+                               (cond
+                                 ((eq type '|string|)
+                                  (|iht| (cons "\"\\stringvalue{"
+                                          (cons id
+                                           (cons "}\""
+                                            nil)))))
+                                 (t
+                                  (|iht| (cons
+                                          "\"\\boxvalue{"
+                                          (cons id
+                                           (cons "}\""
+                                            nil))))))
+                               (|iht| ") ")))))
+                (|iht| (cons (|htpName| |$curPage|)
+                             (cons "))}" nil))))))))))
+
+\end{chunk}
+
+\defun{bchtMakeButton}{bchtMakeButton}
+\begin{chunk}{defun bchtMakeButton}
+(defun |bchtMakeButton| (htCommand message func)
+  (prog (id type)
+  (declare (special |$curPage|))
+    (return
+      (SEQ (progn
+             (|bcHt| (cons htCommand
+                           (cons "{"
+                                 (cons message
+                                       (cons "}{(|htDoneButton| '|"
+                                        (cons func
+                                         (cons "| (progn "
+                                          nil)))))))
+             (DO ((G167004 (|htpInputAreaAlist| |$curPage|)
+                      (cdr G167004))
+                  (G166992 nil))
+                 ((or (atom G167004)
+                      (progn (setq G166992 (car G167004)) nil)
+                      (progn
+                        (progn
+                          (setq id (car G166992))
+                          (setq type (car (cddddr G166992)))
+                          G166992)
+                        nil))
+                  nil)
+               (SEQ (EXIT (progn
+                            (|bcHt| (cons "(|htpSetLabelInputString| "
+                                     (cons (|htpName| |$curPage|)
+                                      (cons "'|"
+                                       (cons id
+                                        (cons "| " nil))))))
+                            (cond
+                              ((eq type '|string|)
+                               (|bcHt| (cons
+                                        "\"\\stringvalue{"
+                                        (cons id
+                                         (cons "}\"" nil)))))
+                              (t
+                               (|bcHt| (cons
+                                        "\"\\boxvalue{"
+                                        (cons id
+                                         (cons "}\"" nil))))))
+                            (|bcHt| ") ")))))
+             (|bcHt| (cons (|htpName| |$curPage|)
+                           (cons "))} " nil))))))))
+
+\end{chunk}
+
+\defun{htProcessDoitButton}{htProcessDoitButton}
+\begin{chunk}{defun htProcessDoitButton}
+(defun |htProcessDoitButton| (G167017)
+  (prog (label command func fun)
+    (return
+      (progn
+        (setq label (car G167017))
+        (setq command (cadr G167017))
+        (setq func (caddr G167017))
+        (setq fun (|mkCurryFun| func (cons command nil)))
+        (|iht| "\\newline\\vspace{1}\\centerline{")
+        (|htMakeButton| "\\lispcommand"
+            (CONCAT "\\box{" label "}")
+            fun)
+        (|iht| "} ")
+        (|iht| "\\vspace{2}{Select \\  \\UpButton{} \\  to go back one page.}")
+        (|iht| "\\newline{Select \\  \\ExitButton{QuitPage} \\  to remove this window.}")))))
+
+\end{chunk}
+
+\defun{htMakeDoitButton}{htMakeDoitButton}
+\begin{chunk}{defun htMakeDoitButton}
+(defun |htMakeDoitButton| (label command)
+  (declare (special |$curPage|))
+  (progn
+    (cond
+      ((equal label "Do It")
+       (|bcHt| "\\newline\\vspace{1}\\centerline{\\lispcommand{\\DoItBitmap}{(|doDoitButton| "))
+      (t
+       (|bcHt| (cons "\\newline\\vspace{1}\\centerline{\\lispcommand{\\box{"
+                     (cons label
+                           (cons "}}{(|doDoitButton| "
+                                 nil))))))
+    (|bcHt| (|htpName| |$curPage|))
+    (|bcHt| (cons " \""
+                  (cons (|htEscapeString| command)
+                        (cons "\"" nil))))
+    (|bcHt| ")}}")
+    (|bcHt| "\\vspace{2}{Select \\  \\UpButton{} \\  to go back one page.}")
+    (|bcHt| "\\newline{Select \\  \\ExitButton{QuitPage} \\  to remove this window.}")))
+
+\end{chunk}
+
+\defun{doDoitButton}{doDoitButton}
+\begin{chunk}{defun doDoitButton}
+(defun |doDoitButton| (htPage command)
+ (declare (ignore htPage))
+ (|executeInterpreterCommand| command))
+
+\end{chunk}
+
+\defun{executeInterpreterCommand}{executeInterpreterCommand}
+\begin{chunk}{defun executeInterpreterCommand}
+(defun |executeInterpreterCommand| (command)
+  (progn
+    (princ command)
+    (terpri)
+    (|setCurrentLine| command)
+    (catch 'spad_reader (|parseAndInterpret| command))
+    (princ (mkprompt))
+    (finish-output)))
+
+\end{chunk}
+
+\defun{htDoneButton}{htDoneButton}
+\begin{chunk}{defun htDoneButton}
+(defun |htDoneButton| (func htPage)
+  (cond
+    ((|typeCheckInputAreas| htPage) (|htMakeErrorPage| htPage))
+    ((null (fboundp func))
+     (|systemError| (cons "unknown function" (cons func nil))))
+    (t (funcall (symbol-function func) htPage))))
+
+\end{chunk}
+
+\defun{typeCheckInputAreas}{typeCheckInputAreas}
+\begin{chunk}{defun typeCheckInputAreas}
+(defun |typeCheckInputAreas| (htPage)
+ (prog (inputAlist stringName t2 t3 t4 t5 t6 t7 spadType t8 filter
+        condList string val errorCondition)
+  (declare (special |$bcParseOnly|))
+    (return
+      (SEQ (progn
+             (setq inputAlist nil)
+             (setq errorCondition nil)
+             (DO ((G167160 (|htpInputAreaAlist| htPage)
+                      (cdr G167160))
+                  (entry nil))
+                 ((or (atom G167160)
+                      (progn (setq entry (car G167160)) nil))
+                  nil)
+               (SEQ (EXIT (cond
+                            ((and (consp entry)
+                                  (progn
+                                    (setq stringName
+                                     (QCAR entry))
+                                    (setq t2 (QCDR entry))
+                                    (and (consp t2)
+                                     (progn
+                                       (setq t3
+                                        (QCDR t2))
+                                       (and (consp t3)
+                                        (progn
+                                          (setq t4
+                                           (QCDR t3))
+                                          (and (consp t4)
+                                           (progn
+                                             (setq t5
+                                              (QCDR t4))
+                                             (and (consp t5)
+                                              (eq (QCAR t5)
+                                               '|string|)
+                                              (progn
+                                                (setq t6
+                                                 (QCDR t5))
+                                                (and (consp t6)
+                                                 (progn
+                                                   (setq t7
+                                                    (QCDR t6))
+                                                   (and
+                                                    (consp t7)
+                                                    (progn
+                                                      (setq
+                                                       spadType
+                                                       (QCAR t7))
+                                                      (setq
+                                                       t8
+                                                       (QCDR t7))
+                                                      (and
+                                                       (consp
+                                                        t8)
+                                                       (eq
+                                                        (QCDR
+                                                         t8)
+                                                        nil)
+                                                       (progn
+                                                         (setq
+                                                          filter
+                                                          (QCAR
+                                                           t8))
+                                                         t))))))))))))))))
+                             (progn
+                               (setq condList
+                                        (LASSOC
+                                         (LASSOC spadType
+                                          (|htpDomainPvarSubstList|
+                                           htPage))
+                                         (|htpDomainVariableAlist|
+                                          htPage)))
+                               (setq string
+                                        (|htpLabelFilteredInputString|
+                                         htPage stringName))
+                               (cond
+                                 (|$bcParseOnly|
+                                     (cond
+                                       ((null
+                                         (|ncParseFromString| string))
+                                        (|htpSetLabelErrorMsg| htPage
+                                         "Syntax Error"
+                                         "Syntax Error"))
+                                       (t nil)))
+                                 (t
+                                  (setq val
+                                           (|checkCondition|
+                                            (|htpLabelInputString|
+                                             htPage stringName)
+                                            string condList))
+                                  (cond
+                                    ((stringp val)
+                                     (setq errorCondition t)
+                                     (|htpSetLabelErrorMsg| htPage
+                                      stringName val))
+                                    (t
+                                     (|htpSetLabelSpadValue| htPage
+                                      stringName val)))))))))))
+             errorCondition)))))
+
+\end{chunk}
+
+\defun{checkCondition}{checkCondition}
+\begin{chunk}{defun checkCondition}
+(defun |checkCondition| (s1 string condList)
+  (prog (pred t2 t3 pvar t4 pattern val type data newType)
+    (return
+      (cond
+        ((and (consp condList) (eq (QCDR condList) nil)
+              (progn
+                (setq t2 (QCAR |condList|))
+                (and (consp t2)
+                     (eq (QCAR t2) '|Satisfies|)
+                     (progn
+                       (setq t3 (QCDR t2))
+                       (and (consp t3)
+                            (progn
+                              (setq pvar (QCAR t3))
+                              (setq t4 (QCDR t3))
+                              (AND (consp t4)
+                                   (eq (QCDR t4) nil)
+                                   (progn
+                                     (setq pred (QCAR t4))
+                                     t))))))))
+         (setq val (funcall pred string))
+         (cond
+           ((stringp val) val)
+           (t (cons '(|String|) (|wrap| s1)))))
+        ((null (and (consp condList) (eq (QCDR condList) nil)
+                    (progn
+                      (setq t2 (QCAR condList))
+                      (and (consp t2)
+                           (eq (QCAR t2) '|isDomain|)
+                           (progn
+                             (setq t3 (QCDR t2))
+                             (and (consp t3)
+                                  (progn
+                                    (setq pvar (QCAR t3))
+                                    (setq t4
+                                     (QCDR t3))
+                                    (and (consp t4)
+                                     (eq (QCDR t4) nil)
+                                     (progn
+                                       (setq pattern
+                                        (QCAR t4))
+                                       t)))))))))
+         (|systemError|
+             "currently invalid domain condition"))
+        ((equal |pattern| '(|String|))
+         (cons '(|String|) (|wrap| s1)))
+        (t (setq val (|parseAndEval| string))
+         (cond
+           ((stringp val)
+            (cond
+              ((equal val "Syntax Error ")
+               "Error: Syntax Error ")
+              (t (|condErrorMsg| pattern))))
+           (t (setq type (car val))
+            (setq data (cdr val))
+            (setq newType
+                     (catch 'spad_reader
+                       (|resolveTM| type pattern)))
+            (cond
+              ((null newType) (|condErrorMsg| pattern))
+              (t (|coerceInt| val newType))))))))))
+
+\end{chunk}
+
+\defun{condErrorMsg}{condErrorMsg}
+\begin{chunk}{defun condErrorMsg}
+(defun |condErrorMsg| (type)
+  (prog (typeString)
+    (return
+      (progn
+        (setq typeString (|form2String| type))
+        (cond
+          ((consp typeString)
+           (setq typeString
+                    (apply (|function| CONCAT) typeString))))
+        (CONCAT "Error: Could not make your input into a "
+                typeString)))))
+
+\end{chunk}
+
+\defun{parseAndEval}{parseAndEval}
+\begin{chunk}{defun parseAndEval}
+(defun |parseAndEval| (string)
+  (prog (|$InteractiveMode| $boot $spad |$e| |$QuietCommand|)
+    (declare (special |$InteractiveMode| $boot $spad |$e|
+                      |$QuietCommand|))
+    (return
+      (progn
+        (setq |$InteractiveMode| t)
+        (setq $boot nil)
+        (setq $spad t)
+        (setq |$e| |$InteractiveFrame|)
+        (setq |$QuietCommand| t)
+        (|parseAndEval1| string)))))
+
+\end{chunk}
+
+\defun{parseAndEval1}{parseAndEval1}
+\begin{chunk}{defun parseAndEval1}
+(defun |parseAndEval1| (string)
+ (let (v syntaxError pform val)
+  (setq syntaxError nil)
+  (setq pform
+   (progn
+    (setq v
+     (|applyWithOutputToString| '|ncParseFromString| (cons string nil)))
+    (cond
+     ((car v) (car v))
+     (t (setq syntaxError t) (cdr v)))))
+  (cond
+   (syntaxError "Syntax Error ")
+   (pform 
+    (setq val
+     (|applyWithOutputToString| '|processInteractive|
+      (cons pform (list nil))))
+    (cond
+     ((car val) (car val))
+     (t "Type Analysis Error")))
+   (t nil))))
+
+\end{chunk}
+
+\defun{oldParseString}{oldParseString}
+\begin{chunk}{defun oldParseString}
+(defun |oldParseString| (string)
+  (prog (tree)
+    (return
+      (progn
+        (setq tree
+                 (|applyWithOutputToString| '|string2SpadTree|
+                     (cons string nil)))
+        (cond
+          ((car tree)
+           (|parseTransform| (postTransform (car tree))))
+          (t (cdr tree)))))))
+
+\end{chunk}
+
+\defun{makeSpadCommand}{makeSpadCommand}
+\begin{chunk}{defun makeSpadCommand}
+(defun |makeSpadCommand| (&REST G167322 &AUX z)
+  (setq z G167322)
+  (prog (opForm lastArg argList)
+    (return
+      (SEQ (progn
+             (setq opForm (CONCAT (car z) "("))
+             (setq lastArg (|last| z))
+             (setq z (cdr z))
+             (setq argList nil)
+             (DO ((G167306 l (cdr G167306)) (arg nil))
+                 ((or (atom G167306)
+                      (progn (setq arg (car G167306)) nil)
+                      (null (NEQUAL arg lastArg)))
+                  nil)
+               (SEQ (EXIT (setq argList
+                                   (cons
+                                    (CONCAT arg ", ")
+                                    argList)))))
+             (setq argList (NREVERSE (cons lastArg argList)))
+             (CONCAT opForm (apply (|function| CONCAT) argList)
+                     ")"))))))
+
+\end{chunk}
+
+\defun{htMakeInputList}{htMakeInputList}
+\begin{chunk}{defun htMakeInputList}
+(defun |htMakeInputList| (stringList)
+  (prog (lastArg argList)
+    (return
+      (SEQ (progn
+             (setq lastArg (|last| stringList))
+             (setq argList nil)
+             (DO ((G167328 stringList (cdr G167328)) (arg nil))
+                 ((or (atom G167328)
+                      (progn (setq arg (car G167328)) nil)
+                      (null (NEQUAL arg lastArg)))
+                  nil)
+               (SEQ (EXIT (setq argList
+                                   (cons
+                                    (CONCAT arg ", ")
+                                    argList)))))
+             (setq argList (NREVERSE (cons lastArg argList)))
+             (|bracketString| (apply (|function| CONCAT) argList)))))))
+
+\end{chunk}
+
+\defun{bracketString}{bracketString}
+\begin{chunk}{defun bracketString}
+(defun |bracketString| (string)
+  (CONCAT "[" string "]"))
+
+\end{chunk}
+
+\defun{quoteString}{quoteString}
+\begin{chunk}{defun quoteString}
+(defun |quoteString| (string)
+  (CONCAT "\"" string "\""))
+
+\end{chunk}
+
+\defdollar{funnyQuote}
+\begin{chunk}{initvars}
+(defvar |$funnyQuote| #\Rubout) 
+
+\end{chunk}
+
+\defdollar{funnyBacks}
+\begin{chunk}{initvars}
+(defvar |$funnyBacks| #\\200) 
+
+\end{chunk}
+
+\defun{htEscapeString}{htEscapeString}
+\begin{chunk}{defun htEscapeString}
+(defun |htEscapeString| (str)
+  (declare (special |$funnyBacks| |$funnyQuote|))
+  (progn
+    (setq str (SUBSTITUTE |$funnyQuote| #\" str))
+    (SUBSTITUTE |$funnyBacks| #\\ str)))
+
+\end{chunk}
+
+\defun{htsv}{htsv}
+\begin{chunk}{defun htsv}
+(defun |htsv| ()
+ (|startHTPage| 50)
+ (|htSetVars|)))
+
+\end{chunk}
+
+\defun{htSetVars}{htSetVars}
+\begin{chunk}{defun htSetVars}
+(defun |htSetVars| ()
+  (declare (special |$setOptions| |$lastTree| |$path|))
+  (progn
+    (setq |$path| nil)
+    (setq |$lastTree| nil)
+    (cond
+      ((NEQUAL 0 (LASTATOM |$setOptions|))
+       (|htMarkTree| |$setOptions| 0)))
+    (|htShowSetTree| |$setOptions|)))
+
+\end{chunk}
+
+\defun{htShowSetTree}{htShowSetTree}
+\begin{chunk}{defun htShowSetTree}
+(defun |htShowSetTree| (setTree)
+  (prog (page okList maxWidth1 maxWidth2 tabset1 tabset2 label links)
+  (declare (special |$path|))
+    (return
+      (SEQ (progn
+             (setq |$path|
+                      (TAKE (SPADDIFFERENCE (LASTATOM setTree))
+                            |$path|))
+             (setq page (|htInitPage| (|mkSetTitle|) nil))
+             (|htpSetProperty| page '|setTree| setTree)
+             (setq links nil)
+             (setq maxWidth1 (setq maxWidth2 0))
+             (SEQ (DO ((G167379 setTree (cdr G167379))
+                       (setData nil))
+                      ((or (atom G167379)
+                           (progn
+                             (setq setData (car G167379))
+                             nil))
+                       nil)
+                    (SEQ (EXIT (cond
+                                 ((|satisfiesUserLevel|
+                                      (elt setData 2))
+                                  (EXIT (progn
+                                          (setq okList
+                                           (cons setData okList))
+                                          (setq maxWidth1
+                                           (max
+                                            (|#|
+                                             (PNAME (elt setData 0)))
+                                            maxWidth1))
+                                          (setq maxWidth2
+                                           (max
+                                            (|htShowCount|
+                                             (STRINGIMAGE
+                                              (elt setData 1)))
+                                            |maxWidth2|)))))))))
+                  (setq maxWidth1 (max 9 maxWidth1))
+                  (setq maxWidth2 (max 41 maxWidth2))
+                  (setq tabset1 (STRINGIMAGE maxWidth1))
+                  (setq tabset2
+                           (STRINGIMAGE
+                               (SPADDIFFERENCE
+                                   (+ maxWidth2 maxWidth1) 1)))
+                  (|htSay| "\\tab{2}\\newline Variable\\tab{"
+                           (STRINGIMAGE
+                               (+ maxWidth1
+                                     (quotient maxWidth2 3)))
+                           "}Description\\tab{"
+                           (STRINGIMAGE
+                               (+ (+ maxWidth2 maxWidth1) 2))
+                           "}Value\\newline\\beginitems ")
+                  (DO ((G167392 (reverse okList) (CDR G167392))
+                       (setData nil))
+                      ((or (atom G167392)
+                           (progn
+                             (setq setData (car G167392))
+                             nil))
+                       nil)
+                    (SEQ (EXIT (progn
+                                 (|htSay| "\\item")
+                                 (setq label
+                                          (STRCONC "\\menuitemstyle{"
+                                           (elt setData 0)
+                                           "}"))
+                                 (setq links
+                                          (cons label
+                                           (cons
+                                            (cons
+                                             (cons '|text|
+                                              (cons
+                                               "\\tab{"
+                                               (cons tabset1
+                                                (cons "}"
+                                                 (cons
+                                                  (elt setData 1)
+                                                  (cons "\\tab{"
+                                                   (cons tabset2
+                                                    (cons "}{\\em "
+                                                     (cons
+                                                      (|htShowSetTreeValue|
+                                                       setData)
+                                                      (cons
+                                                       "}"
+                                                       nil))))))))))
+                                             nil)
+                                            (cons '|htShowSetPage|
+                                             (cons (elt setData 0)
+                                              nil)))))
+                                 (|htMakePage|
+                                     (cons
+                                      (cons '|bcLispLinks|
+                                       (cons links
+                                        (cons '|options|
+                                         (cons '(|indent| . 0) nil))))
+                                      nil))))))
+                  (|htSay| "\\enditems") (|htShowPage|)))))))
+
+\end{chunk}
+
+\defun{htShowCount}{htShowCount}
+\begin{chunk}{defun htShowCount}
+(defun |htShowCount| (s)
+  (prog (m i count)
+    (return
+      (SEQ (progn
+             (setq m (|#| s))
+             (cond
+               ((> 8 m) (- m 1))
+               (t (setq i 0) (setq count 0)
+                (DO () ((NULL (> (- m 7) i)) nil)
+                  (SEQ (EXIT (cond
+                               ((and (equal (elt s i) #\{)
+                                     (equal (elt s (1+ i)) #\\)
+                                     (equal (elt s (+ i 2)) #\e)
+                                     (equal (elt s (+ i 3)) #\m))
+                                (setq i (+ i 6)))
+                               (t (setq i (1+ i))
+                                (setq count (1+ count)))))))
+                (+ count (- m i)))))))))
+
+\end{chunk}
+
+\defun{htShowSetTreeValue}{htShowSetTreeValue}
+\begin{chunk}{defun htShowSetTreeValue}
+(defun |htShowSetTreeValue| (setData)
+  (prog (st)
+    (return
+      (progn
+        (setq st (elt setData 3))
+        (cond
+          ((eq st 'function)
+           (|object2String| (FUNCALL (elt setData 4) '|%display%|)))
+          ((eq st 'integer)
+           (|object2String| (|eval| (elt setData 4))))
+          ((eq st 'string)
+           (|object2String| (|eval| (elt setData 4))))
+          ((eq st 'literals)
+           (|object2String|
+               (|translateTrueFalse2YesNo| (|eval| (elt setData 4)))))
+          ((eq st 'tree) "...")
+          (t (|systemError|)))))))
+
+\end{chunk}
+
+\defun{mkSetTitle}{mkSetTitle}
+\begin{chunk}{defun mkSetTitle}
+(defun |mkSetTitle| ()
+  (declare (special |$path|))
+  (STRCONC "Command {\\em )set "
+           (|listOfStrings2String| |$path|) "}"))
+
+\end{chunk}
+
+\defun{listOfStrings2String}{listOfStrings2String}
+\begin{chunk}{defun listOfStrings2String}
+(defun |listOfStrings2String| (u)
+  (cond
+    ((null u) "")
+    (t
+     (STRCONC (|listOfStrings2String| (cdr u)) " "
+              (|stringize| (car u))))))
+
+\end{chunk}
+
+\defun{htShowSetPage}{htShowSetPage}
+\begin{chunk}{defun htShowSetPage}
+(defun |htShowSetPage| (htPage branch)
+  (prog (setTree setData st)
+  (declare (special |$path|))
+    (return
+      (progn
+        (setq setTree (|htpProperty| htPage '|setTree|))
+        (setq |$path|
+                 (cons branch
+                       (TAKE (- (LASTATOM setTree))
+                             |$path|)))
+        (setq setData (|assoc| branch setTree))
+        (cond
+          ((null setData) (|systemError| "No Set Data"))
+          (t (setq st (elt setData 3))
+           (cond
+             ((eq st 'function)
+              (|htShowFunctionPage| htPage setData))
+             ((eq st 'integer)
+              (|htShowIntegerPage| htPage setData))
+             ((eq st 'literals)
+              (|htShowLiteralsPage| htPage setData))
+             ((eq st 'tree)
+              (|htShowSetTree| (elt setData 5)))
+             ((eq st 'string)
+              (|htSetNotAvailable| htPage
+                  ")set compiler"))
+             (t (|systemError| "Unknown data type")))))))))
+
+\end{chunk}
+
+\defun{htShowLiteralsPage}{htShowLiteralsPage}
+\begin{chunk}{defun htShowLiteralsPage}
+(defun |htShowLiteralsPage| (htPage setData)
+  (|htSetLiterals| htPage (elt setData 0) (elt setData 1)
+      (elt setData 4) (elt setData 5) '|htSetLiteral|))
+
+\end{chunk}
+
+\defun{htSetLiterals}{htSetLiterals}
+\begin{chunk}{defun htSetLiterals}
+(defun |htSetLiterals| (htPage name message variable values functionToCall)
+  (prog (page links)
+    (return
+      (SEQ (progn
+             (setq page
+                      (|htInitPage| "Set Command"
+                          (|htpPropertyList| htPage)))
+             (|htpSetProperty| page '|variable| variable)
+             (|bcHt| (cons "\\centerline{Set {\\em "
+                           (cons name
+                                 (cons "}}\\newline" nil))))
+             (|bcHt| (cons "{\\em Description: } "
+                           (cons message
+                                 (cons "\\newline\\vspace{1} "
+                                       nil))))
+             (|bcHt| "Select one of the following: \\newline\\tab{3} ")
+             (setq links
+                      (prog (G167460)
+                        (setq G167460 nil)
+                        (return
+                          (DO ((G167465 values (cdr G167465))
+                               (opt nil))
+                              ((or (atom G167465)
+                                   (progn
+                                     (setq opt (car G167465))
+                                     nil))
+                               (NREVERSE0 G167460))
+                            (SEQ (EXIT (setq G167460
+                                        (cons
+                                         (cons
+                                          (STRCONC ""
+                                           (STRINGIMAGE opt))
+                                          (cons "\\newline\\tab{3}"
+                                           (cons functionToCall
+                                            (cons opt nil))))
+                                         G167460))))))))
+             (|htMakePage| (cons (cons '|bcLispLinks| links) nil))
+             (|bcHt| 
+              (cons 
+              '|\\indent{0}\\newline\\vspace{1} The current setting is: {\\em |
+                           (cons (|translateTrueFalse2YesNo|
+                                     (eval variable))
+                                 (cons "} " nil))))
+             (|htShowPage|))))))
+
+\end{chunk}
+
+\defun{htSetLiteral}{htSetLiteral}
+\begin{chunk}{defun htSetLiteral}
+(defun |htSetLiteral| (htPage val)
+  (progn
+    (|htInitPage| "Set Command" nil)
+    (set (|htpProperty| htPage '|variable|)
+         (|translateYesNo2TrueFalse| val))
+    (|htKill| htPage val)))
+
+\end{chunk}
+
+\defun{htShowIntegerPage}{htShowIntegerPage}
+\begin{chunk}{defun htShowIntegerPage}
+(defun |htShowIntegerPage| (htPage setData)
+  (prog (page message t1)
+  (declare (special |$htFinal| |$htInitial|))
+    (return
+      (progn
+        (setq page
+                 (|htInitPage| (|mkSetTitle|)
+                     (|htpPropertyList| htPage)))
+        (|htpSetProperty| page '|variable| (elt setData 4))
+        (|bcHt| (cons "\\centerline{Set {\\em "
+                      (cons (elt setData 0)
+                            (cons "}}\\newline" nil))))
+        (setq message (elt setData 1))
+        (|bcHt| (cons "{\\em Description: } "
+                      (cons message
+                            (cons "\\newline\\vspace{1} "
+                                  nil))))
+        (setq t1 (elt setData 5))
+        (setq |$htInitial| (car t1))
+        (setq |$htFinal| (cadr t1))
+        (cond
+          ((equal |$htFinal| (+ |$htInitial| 1))
+           (|bcHt| "Enter the integer {\\em ")
+           (|bcHt| (|stringize| |$htInitial|))
+           (|bcHt| "} or {\\em ")
+           (|bcHt| (|stringize| |$htFinal|))
+           (|bcHt| "}:"))
+          ((null |$htFinal|)
+           (|bcHt| "Enter an integer greater than {\\em ")
+           (|bcHt| (|stringize| (- |$htInitial| 1)))
+           (|bcHt| "}:"))
+          (t (|bcHt| "Enter an integer between {\\em ")
+           (|bcHt| (|stringize| |$htInitial|))
+           (|bcHt| "} and {\\em ")
+           (|bcHt| (|stringize| |$htFinal|))
+           (|bcHt| "}:")))
+        (|htMakePage|
+            (cons '(|domainConditions| (|Satisfies| S chkRange))
+                  (cons (cons '|bcStrings|
+                              (cons (cons 5
+                                     (cons (|eval| (elt setData 4))
+                                      (cons '|value| (cons 'S nil))))
+                                    nil))
+                        nil)))
+        (|htSetvarDoneButton| "Select to Set Value"
+            '|htSetInteger|)
+        (|htShowPage|)))))
+
+\end{chunk}
+
+\defun{htSetInteger}{htSetInteger}
+\begin{chunk}{defun htSetInteger}
+(defun |htSetInteger| (htPage)
+  (prog (val)
+    (return
+      (progn
+        (|htInitPage| (|mkSetTitle|) nil)
+        (setq val
+                 (|chkRange| (|htpLabelInputString| htPage '|value|)))
+        (cond
+          ((null (integerp val))
+           (|errorPage| htPage
+               (cons "Value Error"
+                     (cons nil
+                           (cons "\\vspace{3}\\centerline{{\\em "
+                                 (cons val
+                                       (cons
+ "}}\\vspace{2}\\newline\\centerline{Click on \\UpBitmap{} to re-enter value}"
+                                        nil)))))))
+          (t (set (|htpProperty| htPage '|variable|) val)
+           (|htKill| htPage val)))))))
+
+\end{chunk}
+
+\defun{htShowFunctionPage}{htShowFunctionPage}
+\begin{chunk}{defun htShowFunctionPage}
+(defun |htShowFunctionPage| (htPage setData)
+  (prog (fn)
+    (return
+      (cond
+        ((setq fn (elt setData 6)) (funcall fn htPage))
+        (t (|htpSetProperty| htPage '|setData| setData)
+         (|htpSetProperty| htPage '|parts| (elt setData 5))
+         (|htShowFunctionPageContinued| htPage))))))
+
+\end{chunk}
+
+\defun{htShowFunctionPageContinued}{htShowFunctionPageContinued}
+\begin{chunk}{defun htShowFunctionPageContinued}
+(defun |htShowFunctionPageContinued| (htPage)
+  (prog (parts setData phrase kind variable checker
+         initValue restParts page currentValue)
+    (return
+      (progn
+        (setq parts (|htpProperty| htPage '|parts|))
+        (setq setData (|htpProperty| htPage '|setData|))
+        (setq phrase (caar parts))
+        (setq kind (cadar parts))
+        (setq variable (caddar parts))
+        (setq checker (car (cdddar parts)))
+        (setq initValue (cadr (cdddar parts)))
+        (setq restParts (cdr parts))
+        (|htpSetProperty| htPage '|variable| variable)
+        (|htpSetProperty| htPage '|checker| checker)
+        (|htpSetProperty| htPage '|parts| restParts)
+        (cond
+          ((eq kind 'literals)
+           (|htSetLiterals| htPage (elt setData 0) phrase
+               variable checker '|htFunctionSetLiteral|))
+          (t
+           (setq page
+                    (|htInitPage| (|mkSetTitle|)
+                        (|htpPropertyList| htPage)))
+           (|bcHt| (cons "\\centerline{Set {\\em "
+                         (cons (elt setData 0)
+                               (cons "}}\\newline" nil))))
+           (|bcHt| (cons "{\\em Description: } "
+                         (cons (elt setData 1)
+                               (cons "\\newline\\vspace{1} "
+                                     nil))))
+           (setq currentValue (eval variable))
+           (|htMakePage|
+               (cons (cons '|domainConditions|
+                           (cons (cons '|Satisfies|
+                                       (cons 'S (cons checker nil)))
+                                 nil))
+                     (cons (cons '|text| phrase)
+                           (cons (cons '|inputStrings|
+                                       (cons
+                                        (cons ""
+                                         (cons ""
+                                          (cons 60
+                                           (cons currentValue
+                                            (cons '|value|
+                                             (cons 'S nil))))))
+                                        nil))
+                                 nil))))
+           (|htSetvarDoneButton| "Select To Set Value" '|htSetFunCommand|)
+           (|htShowPage|)))))))
+
+\end{chunk}
+
+\defun{htSetvarDoneButton}{htSetvarDoneButton}
+\begin{chunk}{defun htSetvarDoneButton}
+(defun |htSetvarDoneButton| (message func)
+  (progn
+    (|bcHt| "\\newline\\vspace{1}\\centerline{")
+    (cond
+      ((OR (equal message "Select to Set Value")
+           (equal message "Select to Set Values"))
+       (|bchtMakeButton| "\\lisplink"
+           "\\ControlBitmap{clicktoset}" func))
+      (t
+       (|bchtMakeButton| "\\lisplink"
+           (CONCAT "\\fbox{" message "}")
+           func)))
+    (|bcHt| "} ")))
+
+\end{chunk}
+
+\defun{htFunctionSetLiteral}{htFunctionSetLiteral}
+\begin{chunk}{defun htFunctionSetLiteral}
+(defun |htFunctionSetLiteral| (htPage val)
+  (progn
+    (|htInitPage| "Set Command" nil)
+    (set (|htpProperty| htPage '|variable|)
+         (|translateYesNo2TrueFalse| val))
+    (|htSetFunCommandContinue| htPage val)))
+
+\end{chunk}
+
+\defun{htSetFunCommand}{htSetFunCommand}
+\begin{chunk}{defun htSetFunCommand}
+(defun |htSetFunCommand| (htPage)
+  (prog (variable checker value)
+    (return
+      (progn
+        (setq variable (|htpProperty| htPage '|variable|))
+        (setq checker (|htpProperty| htPage '|checker|))
+        (setq value
+                 (|htCheck| checker
+                     (|htpLabelInputString| htPage '|value|)))
+        (set variable value)
+        (|htSetFunCommandContinue| htPage value)))))
+
+\end{chunk}
+
+\defun{htSetFunCommandContinue}{htSetFunCommandContinue}
+\begin{chunk}{defun htSetFunCommandContinue}
+(defun |htSetFunCommandContinue| (htPage value)
+  (prog (parts t2 t3 predicate restParts continue)
+    (return
+      (progn
+        (setq parts (|htpProperty| htPage '|parts|))
+        (setq continue
+                 (cond
+                   ((null parts) nil)
+                   ((and (consp parts)
+                         (progn
+                           (setq t2 (QCAR parts))
+                           (and (consp t2)
+                                (eq (QCAR t2) '|break|)
+                                (progn
+                                  (setq t3 (QCDR t2))
+                                  (AND (consp t3)
+                                       (eq (QCDR t3) nil)
+                                       (progn
+                                         (setq predicate
+                                          (QCAR t3))
+                                         t)))))
+                         (progn
+                           (setq restParts (QCDR parts))
+                           t))
+                    (|eval| predicate))
+                   (t t)))
+        (cond
+          (|continue| (|htpSetProperty| htPage '|parts| restParts)
+              (|htShowFunctionPageContinued| htPage))
+          (t (|htKill| htPage value)))))))
+
+\end{chunk}
+
+\defun{htKill}{htKill}
+\begin{chunk}{defun htKill}
+(defun |htKill| (htPage value)
+  (declare (ignore htPage))
+  (prog (string)
+  (declare (special |$path|))
+    (return
+      (progn
+        (|htInitPage| "System Command" nil)
+        (setq string
+                 (STRCONC "{\\em )set "
+                          (|listOfStrings2String|
+                              (cons value |$path|))
+                          "}"))
+        (|htMakePage|
+     (cons '(|text| "{Here is the AXIOM system command you could have issued:}"
+                           "\\vspace{2}\\newline\\centerline{\\tt")
+                  (cons (cons '|text| string) nil)))
+        (|htMakePage| '((|text| . "}\\vspace{1}\\newline\\rm")))
+        (|htSay| "\\vspace{2}{Select \\  \\UpButton{} \\  to go back.}")
+        (|htSay| "\\newline{Select \\  \\ExitButton{QuitPage} \\  to remove this window.}")
+        (|htProcessDoitButton|
+            (cons "Press to Remove Page"
+                  (cons "" (cons '|htDoNothing| nil))))
+        (|htShowPage|)))))
+
+\end{chunk}
+
+\defun{htSetNotAvailable}{htSetNotAvailable}
+\begin{chunk}{defun htSetNotAvailable}
+(defun |htSetNotAvailable| (htPage whatToType)
+  (prog (page string)
+    (return
+      (progn
+        (setq page
+                 (|htInitPage| "Unavailable Set Command"
+                     (|htpPropertyList| htPage)))
+        (|htInitPage| "Unavailable System Command" nil)
+        (setq |string|
+                 (STRCONC "{\\em " whatToType
+                          "}"))
+        (|htMakePage|
+            (cons '(|text| "\\vspace{1}\\newline"
+ "{Sorry, but this system command is not available through HyperDoc. Please directly issue this command in an AXIOM window for more information:}"
+                           "\\vspace{2}\\newline\\centerline{\\tt")
+                  (cons (cons '|text| string) nil)))
+        (|htMakePage| '((|text| . "}\\vspace{1}\\newline")))
+        (|htProcessDoitButton|
+            (cons "Press to Remove Page"
+                  (cons "" (cons '|htDoNothing| nil))))
+        (|htShowPage|)))))
+
+\end{chunk}
+
+\defun{htDoNothing}{htDoNothing}
+\begin{chunk}{defun htDoNothing}
+(defun |htDoNothing| (htPage command)
+ (declare (ignore htPage command))
+ nil) 
+
+\end{chunk}
+
+\defun{htCheck}{htCheck}
+\begin{chunk}{defun htCheck}
+(defun |htCheck| (checker value)
+  (cond
+    ((consp checker) (|htCheckList| checker (|parseWord| value)))
+    (t (funcall checker value))))
+
+\end{chunk}
+
+\defun{parseWord}{parseWord}
+\begin{chunk}{defun parseWord}
+(defun |parseWord| (x)
+  (prog ()
+    (return
+      (SEQ (cond
+             ((stringp x)
+              (cond
+                ((prog (G167588)
+                   (setq G167588 t)
+                   (return
+                     (DO ((G167594 nil (null G167588))
+                          (G167595 (maxindex x))
+                          (i 0 (1+ i)))
+                         ((OR G167594 (QSGREATERP i G167595))
+                          G167588)
+                       (SEQ (EXIT (setq G167588
+                                        (AND G167588
+                                         (digitp (elt x i)))))))))
+                 (parse-integer x))
+                (t (intern x))))
+             (t x))))))
+
+\end{chunk}
+
+\defun{htCheckList}{htCheckList}
+\begin{chunk}{defun htCheckList}
+(defun |htCheckList| (checker value)
+  (prog (n t2 m)
+    (return
+      (progn
+        (cond
+          ((|member| value '(|y| |ye| |yes| Y YE YES))
+           (setq value '|yes|)))
+        (cond
+          ((|member| value '(|n| |no| N NO)) (setq value '|no|)))
+        (cond
+          ((and (consp checker)
+                (progn
+                  (setq n (qcar checker))
+                  (setq t2 (qcdr checker))
+                  (and (consp t2) (eq (QCDR t2) nil)
+                       (progn (setq m (QCAR t2)) t)))
+                (integerp n))
+           (cond
+             ((eql m (1+ n))
+              (cond ((|member| value checker) value) (t n)))
+             ((null m)
+              (cond
+                ((and (integerp value) (>= value n)) value)
+                (t n)))
+             ((integerp m)
+              (cond
+                ((and (integerp value) (>= value n)
+                      (<= value m))
+                 value)
+                (t n)))))
+          ((|member| value checker) value)
+          (t (car checker)))))))
+
+\end{chunk}
+
+\defun{translateYesNoToTrueFalse}{translateYesNoToTrueFalse}
+\begin{chunk}{defun translateYesNoToTrueFalse}
+(defun |translateYesNoToTrueFalse| (x)
+  (cond
+    ((eq x '|yes|) t)
+    ((eq x '|no|) nil)
+    (t x)))
+
+\end{chunk}
+
+\defun{chkNameList}{chkNameList}
+\begin{chunk}{defun chkNameList}
+(defun |chkNameList| (x)
+  (prog (u parsedNames)
+    (return
+      (SEQ (progn
+             (setq u (|bcString2ListWords| x))
+             (setq parsedNames
+                      (prog (G167635)
+                        (setq G167635 nil)
+                        (return
+                          (DO ((G167640 u (CDR G167640))
+                               (x nil))
+                              ((or (atom G167640)
+                                   (progn
+                                     (setq x (car G167640))
+                                     nil))
+                               (NREVERSE0 G167635))
+                            (SEQ (EXIT (setq G167635
+                                        (cons (|ncParseFromString| x)
+                                         G167635))))))))
+             (cond
+               ((prog (G167646)
+                  (setq G167646 t)
+                  (return
+                    (DO ((G167652 nil (NULL G167646))
+                         (G167653 parsedNames (CDR G167653))
+                         (x nil))
+                        ((OR G167652 (ATOM G167653)
+                             (progn (setq x (car G167653)) nil))
+                         G167646)
+                      (SEQ (EXIT (setq G167646
+                                       (AND G167646 (identp x))))))))
+                parsedNames)
+               (t
+                "Please enter a list of identifiers separated by blanks")))))))
+
+\end{chunk}
+
+\defun{chkPosInteger}{chkPosInteger}
+\begin{chunk}{defun chkPosInteger}
+(defun |chkPosInteger| (s)
+  (prog (u)
+    (return
+      (cond
+        ((and (setq u (|parseOnly| s)) (integerp u) (> u 0))
+         u)
+        (t "Please enter a positive integer")))))
+
+\end{chunk}
+
+\defun{chkOutputFileName}{chkOutputFileName}
+\begin{chunk}{defun chkOutputFileName}
+(defun |chkOutputFileName| (s)
+  (cond
+    ((|member| (|bcString2WordList| s) '(CONSOLE |console|))
+     '|console|)
+    (t (|chkDirectory| s))))
+
+\end{chunk}
+
+\defun{chkDirectory}{chkDirectory}
+\begin{chunk}{defun chkDirectory}
+(defun |chkDirectory| (s) s) 
+
+\end{chunk}
+
+\defun{chkNonNegativeInteger}{chkNonNegativeInteger}
+\begin{chunk}{defun chkNonNegativeInteger}
+(defun |chkNonNegativeInteger| (s)
+  (prog (u)
+    (return
+      (cond
+        ((and (setq u (|ncParseFromString| s)) (integerp u)
+              (>= u 0))
+         u)
+        (t "Please enter a non-negative integer")))))
+
+\end{chunk}
+
+\defun{chkRange}{chkRange}
+\begin{chunk}{defun chkRange}
+(defun |chkRange| (s)
+  (prog (u)
+  (declare (special |$htFinal| |$htInitial|))
+    (return
+      (cond
+        ((and (setq u (|ncParseFromString| s)) (integerp u)
+              (>= u |$htInitial|)
+              (or (null |$htFinal|) (<= u |$htFinal|)))
+         u)
+        ((null |$htFinal|)
+         (STRCONC "Please enter an integer greater than "
+                  (|stringize| (- |$htInitial| 1))))
+        (t
+         (STRCONC "Please enter an integer between "
+                  (|stringize| |$htInitial|) " and "
+                  (|stringize| |$htFinal|)))))))
+
+\end{chunk}
+
+\defun{chkAllNonNegativeInteger}{chkAllNonNegativeInteger}
+\begin{chunk}{defun chkAllNonNegativeInteger}
+(defun |chkAllNonNegativeInteger| (s)
+  (prog (u)
+    (return
+      (or (and (setq u (|ncParseFromString| s))
+               (|member| u '(|a| |al| |all| A AL ALL)) 'ALL)
+          (|chkNonNegativeInteger| s)
+                        "Please enter {\\em all} or a non-negative integer"))))
+
+\end{chunk}
+
+\defun{htMakePathKey,fn}{htMakePathKey,fn}
+\begin{chunk}{defun htMakePathKey,fn}
+(defun |htMakePathKey,fn| (a b)
+  (SEQ (if (null b) (EXIT a))
+       (EXIT (|htMakePathKey,fn|
+                 (STRCONC a "." (PNAME (car b)))
+                 (cdr b)))))
+
+\end{chunk}
+
+\defun{htMakePathKey}{htMakePathKey}
+\begin{chunk}{defun htMakePathKey}
+(defun |htMakePathKey| (path)
+  (cond
+    ((null path) (|systemError| "path is not set"))
+    (t
+     (intern (|htMakePathKey,fn| (PNAME (car path)) (cdr path))))))
+
+\end{chunk}
+
+\defun{htMarkTree}{htMarkTree}
+\begin{chunk}{defun htMarkTree}
+(defun |htMarkTree| (tree n)
+  (SEQ (progn
+         (rplacd (LASTTAIL tree) n)
+         (SEQ (DO ((G167706 tree (cdr G167706)) (branch nil))
+                  ((OR (ATOM G167706)
+                       (progn (setq branch (car G167706)) nil))
+                   nil)
+                (SEQ (EXIT (cond
+                             ((eq (elt branch 3) 'tree)
+                              (EXIT (|htMarkTree| (elt branch 5)
+                                     (1+ n))))))))))))
+
+\end{chunk}
+
+\defun{htSetHistory}{htSetHistory}
+\begin{chunk}{defun htSetHistory}
+(defun |htSetHistory| (htPage)
+  (prog (msg data)
+    (return
+      (progn
+        (setq msg
+ '|when the history facility is on (yes), results of computations are saved in memory|)
+        (setq data
+                 (cons '|history|
+                       (cons msg
+                             (cons '|history|
+                                   (cons 'literals
+                                    (cons '|$HiFiAccess|
+                                     (cons '(|on| |off| |yes| |no|)
+                                      nil)))))))
+        (|htShowLiteralsPage| htPage data)))))
+
+\end{chunk}
+
+\defun{htSetOutputLibrary}{htSetOutputLibrary}
+\begin{chunk}{defun htSetOutputLibrary}
+(defun |htSetOutputLibrary| (htPage)
+  (|htSetNotAvailable| htPage ")set compiler output"))
+
+\end{chunk}
+
+\defun{htSetInputLibrary}{htSetInputLibrary}
+\begin{chunk}{defun htSetInputLibrary}
+(defun |htSetInputLibrary| (htPage)
+  (|htSetNotAvailable| htPage ")set compiler input"))
+
+\end{chunk}
+
+\defun{htSetExpose}{htSetExpose}
+\begin{chunk}{defun htSetExpose}
+(defun |htSetExpose| (htPage)
+  (|htSetNotAvailable| htPage ")set expose"))
+
+\end{chunk}
+
+\defun{htSetOutputCharacters}{htSetOutputCharacters}
+\begin{chunk}{defun htSetOutputCharacters}
+(defun |htSetOutputCharacters| (htPage)
+  (|htSetNotAvailable| htPage ")set output characters"))
+
+\end{chunk}
+
+\defun{htSetLinkerArgs}{htSetLinkerArgs}
+\begin{chunk}{defun htSetLinkerArgs}
+(defun |htSetLinkerArgs| (htPage)
+  (|htSetNotAvailable| htPage ")set fortran calling linker"))
+
+\end{chunk}
+
+\defun{htSetCache}{htSetCache}
+\begin{chunk}{defun htSetCache}
+(defun |htSetCache| (&REST G167749 &AUX options htPage)
+  (declare (special |$valueList| |$path|))
+  (setq htPage (car G167749))
+  (setq options (cdr G167749))
+  (progn
+    (setq |$path| '(|functions| |cache|))
+    (setq |htPage| (|htInitPage| (|mkSetTitle|) nil))
+    (setq |$valueList| nil)
+    (|htMakePage|
+        '((|text| 
+        "Use this system command to cause the AXIOM interpreter to `remember' "
+                  "past values of interpreter functions. "
+                  "To remember a past value of a function, the interpreter "
+          "sets up a {\\em cache} for that function based on argument values. "
+      "When a value is cached for a given argument value, its value is gotten "
+              "from the cache and not recomputed. Caching can often save much "
+     "computing time, particularly with recursive functions or functions that "
+                  "are expensive to compute and that are called repeatedly "
+                  "with the same argument." "\\vspace{1}\\newline ")
+          (|domainConditions| (|Satisfies| S chkNameList))
+  (|text| 
+"Enter below a list of interpreter functions you would like specially cached. "
+                  "Use the name {\\em all} to give a default setting for all "
+                  "interpreter functions. " "\\vspace{1}\\newline "
+             "Enter {\\em all} or a list of names (separate names by blanks):")
+          (|inputStrings| ("" "" 60 "all" names S))
+          (|doneButton| "Push to enter names" |htCacheAddChoice|)))
+    (|htShowPage|)))
+
+\end{chunk}
+
+\defun{htCacheAddChoice}{htCacheAddChoice}
+\begin{chunk}{defun htCacheAddChoice}
+(defun |htCacheAddChoice| (htPage)
+  (prog (names page)
+  (declare (special |$valueList|))
+    (return
+      (SEQ (progn
+             (setq names
+                      (|bcString2WordList|
+                          (|htpLabelInputString| htPage '|names|)))
+             (setq |$valueList|
+                      (cons (|listOfStrings2String| names)
+                            |$valueList|))
+             (cond
+               ((null names) (|htCacheAddQuery|))
+               ((null (cdr names)) (|htCacheOne| names))
+               (t (setq page (|htInitPage| (|mkSetTitle|) nil))
+                (|htpSetProperty| page '|names| names)
+                (|htMakePage|
+                    '((|domainConditions|
+                          (|Satisfies| ALLPI chkAllPositiveInteger))
+                      (|text|
+  "For each function, enter below a {\\em cache length}, a positive integer. "
+  "This number tells how many past values will "
+  "be cached. "
+  "A cache length of {\\em 0} means the function won't be cached. "
+  "To cache all past values, "
+  "enter {\\em all}."
+  "\\vspace{1}\\newline "
+  "For each function name, enter {\\em all} or a positive integer:")))
+                (DO ((i 1 (QSADD1 i))
+                     (G167755 names (CDR G167755)) (name nil))
+                    ((or (atom G167755)
+                         (progn (setq name (car G167755)) nil))
+                     nil)
+                  (SEQ (EXIT (|htMakePage|
+                                 (cons (cons '|inputStrings|
+                                        (cons
+                                         (cons
+                                          (STRCONC "Function {\\em "
+                                           name
+                                           "} will cache")
+                                          (cons "values"
+                                           (cons 5
+                                            (cons 10
+                                             (cons
+                                              (|htMakeLabel|
+                                               "c" i)
+                                              (cons 'ALLPI nil))))))
+                                         nil))
+                                       nil)))))
+                (|htSetvarDoneButton| "Select to Set Values" '|htCacheSet|)
+                (|htShowPage|))))))))
+
+\end{chunk}
+
+\defun{htMakeLabel}{htMakeLabel}
+\begin{chunk}{defun htMakeLabel}
+(defun |htMakeLabel| (prefix i)
+  (intern (strconc prefix (|stringize| i))))
+
+\end{chunk}
+
+\defun{htCacheSet}{htCacheSet}
+\begin{chunk}{defun htCacheSet}
+(defun |htCacheSet| (htPage)
+  (prog (names num n name val)
+  (declare (special |$cacheCount| |$cacheAlist|))
+    (return
+      (SEQ (progn
+             (setq names (|htpProperty| htPage '|names|))
+             (DO ((i 1 (QSADD1 i))
+                  (G167785 names (CDR G167785)) (name nil))
+                 ((or (atom G167785)
+                      (progn (setq name (car G167785)) nil))
+                  nil)
+               (SEQ (EXIT (progn
+                            (setq num
+                                     (|chkAllNonNegativeInteger|
+                                      (|htpLabelInputString| htPage
+                                       (|htMakeLabel| "c"
+                                        i))))
+                            (setq |$cacheAlist|
+                                     (ADDASSOC (intern name) num
+                                      |$cacheAlist|))))))
+             (cond
+               ((setq n (LASSOC '|all| |$cacheAlist|))
+                (setq |$cacheCount| n)
+                (setq |$cacheAlist|
+                         (|deleteAssoc| '|all| |$cacheAlist|))))
+             (|htInitPage| "Cache Summary" nil)
+             (|bcHt| "In general, interpreter functions ")
+             (|bcHt| (cond
+                       ((EQL |$cacheCount| 0)
+                        '|will {\\em not} be cached.|)
+                       (t (|bcHt| "cache ")
+                        (|htAllOrNum| |$cacheCount|)
+                        "} values.")))
+             (|bcHt| "\\vspace{1}\\newline ")
+             (cond
+               (|$cacheAlist|
+                   (DO ((G167801 |$cacheAlist| (cdr G167801))
+                        (G167774 nil))
+                       ((or (atom G167801)
+                            (progn
+                              (setq G167774 (car G167801))
+                              nil)
+                            (progn
+                              (progn
+                                (setq name (car G167774))
+                                (setq val (CDR G167774))
+                                G167774)
+                              nil))
+                        nil)
+                     (SEQ (EXIT (cond
+                                  ((NEQUAL val |$cacheCount|)
+                                   (progn
+                                     (|bcHt| "\\newline function {\\em ")
+                                     (|bcHt| (|stringize| name))
+                                     (|bcHt| "} will cache ")
+                                     (|htAllOrNum| val)
+                                     (|bcHt| "} values")))))))))
+             (|htProcessDoitButton|
+                 (cons "Press to Remove Page"
+                       (cons "" (cons '|htDoNothing| nil))))
+             (|htShowPage|))))))
+
+\end{chunk}
+
+\defun{htAllOrNum}{htAllOrNum}
+\begin{chunk}{defun htAllOrNum}
+(defun |htAllOrNum| (val)
+  (|bcHt| (cond
+            ((eq val '|all|) "{\\em all")
+            ((eql val 0) "{\\em no")
+            (t
+             (STRCONC "the last {\\em "
+                      (|stringize| val))))))
+
+\end{chunk}
+
+\defun{htCacheOne}{htCacheOne}
+\begin{chunk}{defun htCacheOne}
+(defun |htCacheOne| (names)
+  (prog (page)
+    (return
+      (progn
+        (setq page (|htInitPage| (|mkSetTitle|) nil))
+        (|htpSetProperty| page '|names| names)
+        (|htMakePage|
+            '((|domainConditions|
+                  (|Satisfies| ALLPI |chkAllPositiveInteger|))
+              (|text| "Enter below a {\\em cache length}, a positive integer. "
+                      "This number tells how many past values will "
+                      "be cached. To cache all past values, "
+                      "enter {\\em all}." "\\vspace{1}\\newline ")
+              (|inputStrings|
+                  ("Enter {\\em all} or a positive integer:" "" 5 10
+                   |c1| ALLPI))))
+        (|htSetvarDoneButton| "Select to Set Value"
+            '|htCacheSet|)
+        (|htShowPage|)))))
+
+\end{chunk}
+
+\defdollar{historyDisplayWidth}
+\begin{chunk}{initvars}
+(defvar |$historyDisplayWidth| 120) 
+
+\end{chunk}
+
+\defdollar{newline}
+\begin{chunk}{initvars}
+(defvar |$newline| #\Newline)
+
+\end{chunk}
+
+\defun{downlink}{downlink}
+\begin{chunk}{defun downlink}
+(defun |downlink| (page)
+  (declare (special |$saturn|))
+  (cond
+    (|$saturn| (|downlinkSaturn| page))
+    (t (|htInitPage| "Bridge" nil)
+     (|htSay| "\\replacepage{" page "}")
+     (|htShowPage|))))
+
+\end{chunk}
+
+\defun{downlinkSaturn}{downlinkSaturn}
+\begin{chunk}{defun downlinkSaturn}
+(defun |downlinkSaturn| (fn)
+  (prog (line u n lines)
+    (return
+      (SEQ (progn
+             (setq u (|dbReadLines| fn))
+             (setq lines "")
+             (DO ()
+                 ((null (and (consp u)
+                             (progn
+                               (setq line (QCAR u))
+                               (setq u (QCDR u))
+                               t)))
+                  nil)
+               (SEQ (EXIT (progn
+                            (setq n (MAXINDEX line))
+                            (cond
+                              ((> 1 n) nil)
+                              ((equal (elt line 0) #\%)
+                               nil)
+                              (t
+                               (setq lines
+                                        (STRCONC lines line))))))))
+             (|issueHTSaturn| lines))))))
+
+\end{chunk}
+
+\defun{dbNonEmptyPattern}{dbNonEmptyPattern}
+\begin{chunk}{defun dbNonEmptyPattern}
+(defun |dbNonEmptyPattern| (pattern)
+  (cond
+    ((null pattern) "*")
+    (t (setq pattern (STRINGIMAGE pattern))
+     (cond ((> (|#| pattern) 0) pattern) (t "*")))))
+
+\end{chunk}
+
+\defun{htSystemVariables,gn}{htSystemVariables,gn}
+\begin{chunk}{defun htSystemVariables,gn}
+(defun |htSystemVariables,gn| (t1 al)
+  (prog (class key options)
+  (declare (special |$heading| |$levels|))
+    (return
+      (SEQ (progn
+             (setq class (caddr t1))
+             (setq key (cadddr t1))
+             (setq options (cadr (cddddr t1)))
+             t1)
+           (if (null (member class |$levels|)) (EXIT al))
+           (if (or (or (eq key 'literals)
+                       (eq key 'integer))
+                   (eq key 'string))
+               (EXIT (cons (cons |$heading| t1) al)))
+           (if (eq key 'tree)
+               (EXIT (|htSystemVariables,fn| options al nil)))
+           (if (eq key 'function)
+               (EXIT (cons (cons |$heading| t1) al)))
+           (EXIT (|systemError| key))))))
+
+\end{chunk}
+
+\defun{htSystemVariables,fn}{htSystemVariables,fn}
+\begin{chunk}{defun htSystemVariables,fn}
+(defun |htSystemVariables,fn| (t1 al firstTime)
+  (declare (special |$heading|))
+  (SEQ (if (atom t1) (EXIT al))
+       (if firstTime (setq |$heading| (|opOf| (car t1))) nil)
+       (EXIT (|htSystemVariables,fn| (cdr t1)
+                 (|htSystemVariables,gn| (car t1) al) firstTime))))
+
+\end{chunk}
+
+\defun{htSystemVariables,displayOptions}{htSystemVariables,displayOptions}
+\begin{chunk}{defun htSystemVariables,displayOptions}
+(defun |htSystemVariables,displayOptions| (name class variable val options)
+  (SEQ (if (eq class 'integer)
+           (EXIT (SEQ (|htMakePage|
+                          (cons (cons '|bcLispLinks|
+                                      (cons
+                                       (cons
+                                        (cons
+                                         (cons '|text|
+                                          (cons (elt options 0)
+                                           (cons "-"
+                                            (cons
+                                             (or (elt options 1)
+                                              "")
+                                             nil))))
+                                         nil)
+                                        (cons ""
+                                         (cons
+                                          '|htSetSystemVariableKind|
+                                          (cons
+                                           (cons variable
+                                            (cons name
+                                             (cons 'parse-integer nil)))
+                                           nil))))
+                                       nil))
+                                nil))
+                      (|htMakePage|
+                          '((|domainConditions|
+                                (|isDomain| INT (|Integer|)))))
+                      (EXIT (|htMakePage|
+                                (cons (cons '|bcStrings|
+                                       (cons
+                                        (cons 5
+                                         (cons (STRINGIMAGE val)
+                                          (cons name (cons 'INT nil))))
+                                        nil))
+                                      nil))))))
+       (if (eq class 'string)
+           (EXIT (|htSay| "{\\em " val
+                          "}\\space{1}")))
+       (EXIT (DO ((G167913 options (cdr G167913)) (x nil))
+                 ((or (atom G167913)
+                      (progn (setq x (car G167913)) nil))
+                  nil)
+               (SEQ (if (or (or (equal val x)
+                                (and (eq val t)
+                                     (eq x '|on|)))
+                            (and (null val) (eq x '|off|)))
+                        (EXIT (|htSay| "{\\em " x
+                                       "}\\space{1}")))
+                    (EXIT (|htMakePage|
+                              (cons (cons '|bcLispLinks|
+                                     (cons
+                                      (cons x
+                                       (cons " "
+                                        (cons '|htSetSystemVariable|
+                                         (cons
+                                          (cons variable
+                                           (cons x nil))
+                                          nil))))
+                                      nil))
+                                    nil))))))))
+
+\end{chunk}
+
+\defun{htSystemVariables,functionTail}{htSystemVariables,functionTail}
+\begin{chunk}{defun htSystemVariables,functionTail}
+(defun |htSystemVariables,functionTail| (name class var valuesOrFunction)
+  (prog (val)
+    (return
+      (SEQ (setq val (|eval| var))
+           (if (atom valuesOrFunction)
+               (EXIT (SEQ (|htMakePage|
+                              '((|domainConditions|
+                                    (|isDomain| STR (|String|)))))
+                          (|htMakePage|
+                              (cons (cons '|bcLinks|
+                                     (cons
+                                      (cons "reset"
+                                       (cons ""
+                                        (cons
+                                         '|htSetSystemVariableKind|
+                                         (cons
+                                          (cons var
+                                           (cons name (cons nil nil)))
+                                          nil))))
+                                      nil))
+                                    nil))
+                          (EXIT (|htMakePage|
+                                    (cons
+                                     (cons '|bcStrings|
+                                      (cons
+                                       (cons 30
+                                        (cons (STRINGIMAGE val)
+                                         (cons name
+                                          (cons valuesOrFunction nil))))
+                                       nil))
+                                     nil))))))
+           (EXIT (|htSystemVariables,displayOptions| name class
+                     var val valuesOrFunction))))))
+
+\end{chunk}
+
+\defun{htSystemVariables}{htSystemVariables}
+\begin{chunk}{defun htSystemVariables}
+(defun |htSystemVariables| ()
+  (prog (|$levels| |$heading| classlevel table heading name
+         message key variable options func lastHeading
+         t1 msg class var valuesOrFunction val)
+    (DECLARE (SPECIAL |$levels| |$heading| |$setOptions| |$UserLevel|
+                      |$fullScreenSysVars|))
+    (return
+      (SEQ (cond
+             ((null |$fullScreenSysVars|) (|htSetVars|))
+             (t (setq classlevel |$UserLevel|)
+              (setq |$levels| '(|compiler| |development| |interpreter|))
+              (setq |$heading| nil)
+              (DO () ((NULL (NEQUAL classlevel (car |$levels|))) nil)
+                (SEQ (EXIT (setq |$levels| (cdr |$levels|)))))
+              (setq table
+                       (NREVERSE
+                           (|htSystemVariables,fn| |$setOptions| nil
+                               t)))
+              (|htInitPage| "System Variables" nil)
+              (|htSay| "\\beginmenu")
+              (setq lastHeading nil)
+              (DO ((G167961 table (cdr G167961)) (G167879 nil))
+                  ((or (atom G167961)
+                       (progn (setq G167879 (car G167961)) nil)
+                       (progn
+                         (progn
+                           (setq heading (car G167879))
+                           (setq name (cadr G167879))
+                           (setq message (caddr G167879))
+                           (setq key (car (cddddr G167879)))
+                           (setq variable (cadr (cddddr G167879)))
+                           (setq options (caddr (cddddr G167879)))
+                           (setq func (cadddr (cddddr G167879)))
+                           G167879)
+                         nil))
+                   nil)
+                (SEQ (EXIT (progn
+                             (|htSay| "\\newline\\item ")
+                             (cond
+                               ((equal heading lastHeading)
+                                (|htSay| "\\tab{8}"))
+                               (t
+                                (|htSay| heading
+                                         "\\tab{8}")
+                                (setq lastHeading heading)))
+                             (|htSay| "{\\em " name
+                                      '|}\\tab{22}| message)
+                             (|htSay| "\\tab{80}")
+                             (cond
+                               ((eq key 'function)
+                                (cond
+                                  ((null options)
+                                   (|htMakePage|
+                                    (cons
+                                     (cons '|bcLinks|
+                                      (cons
+                                       (cons "reset"
+                                        (cons ""
+                                         (cons func (cons nil nil))))
+                                       nil))
+                                     nil)))
+                                  (t
+                                   (setq t1 (car options))
+                                   (setq msg (car t1))
+                                   (setq class (cadr t1))
+                                   (setq var (caddr t1))
+                                   (setq valuesOrFunction (cadddr t1))
+                                   (|htSystemVariables,functionTail|
+                                    name class var valuesOrFunction)
+                                   (DO
+                                    ((G167971 (cdr options)
+                                      (cdr G167971))
+                                     (option nil))
+                                    ((or (atom G167971)
+                                      (progn
+                                        (setq option (car G167971))
+                                        nil))
+                                     nil)
+                                     (SEQ
+                                      (EXIT
+                                       (cond
+                                         ((and (consp option)
+                                           (eq (QCAR option)
+                                            '|break|))
+                                          '|skip|)
+                                         (t
+                                          (setq msg (car option))
+                                          (setq class (cadr option))
+                                          (setq var (caddr option))
+                                          (setq valuesOrFunction 
+                                            (cadddr option))
+                                          (|htSay| "\\newline\\tab{22}"
+                                           msg
+                                           "\\tab{80}")
+                                          (|htSystemVariables,functionTail|
+                                           name class var
+                                           valuesOrFunction)))))))))
+                               (t (setq val (|eval| variable))
+                                (|htSystemVariables,displayOptions|
+                                    name key variable val options)))))))
+              (|htSay| "\\endmenu") (|htShowPage|)))))))
+
+\end{chunk}
+
+\defun{htSetSystemVariableKind}{htSetSystemVariableKind}
+\begin{chunk}{defun htSetSystemVariableKind}
+(defun |htSetSystemVariableKind| (htPage G168009)
+  (prog (variable name fun value)
+    (return
+      (progn
+        (setq variable (car G168009))
+        (setq name (cadr G168009))
+        (setq fun (caddr G168009))
+        (setq value (|htpLabelInputString| htPage name))
+        (cond
+          ((and (stringp value) fun)
+           (setq value (funcall fun value))))
+        (set variable value)
+        (|htSystemVariables|)))))
+
+\end{chunk}
+
+\defun{htSetSystemVariable}{htSetSystemVariable}
+\begin{chunk}{defun htSetSystemVariable}
+(defun |htSetSystemVariable| (htPage G168030)
+  (declare (ignore htPage))
+  (prog (name value)
+    (return
+      (progn
+        (setq name (car G168030))
+        (setq value (cadr G168030))
+        (setq value
+                 (cond
+                   ((eq value '|on|) t)
+                   ((eq value '|off|) nil)
+                   (t value)))
+        (set name value)
+        (|htSystemVariables|)))))
+
+\end{chunk}
+
+\defun{htGloss}{htGloss}
+\begin{chunk}{defun htGloss}
+(defun |htGloss| (pattern)
+  (|htGlossPage| nil
+      (or (|dbNonEmptyPattern| pattern) "*") t))
+
+\end{chunk}
+
+\defun{htGlossPage}{htGlossPage}
+\begin{chunk}{defun htGlossPage}
+(defun |htGlossPage| (htPage pattern tryAgain?)
+  (prog (|$wildCard| |$key| filter grepForm results defstream
+         lines heading k tick)
+    (declare (special |$wildCard| |$key| |$tick|))
+    (return
+      (SEQ (progn
+             (setq |$wildCard| #\*)
+             (cond
+               ((equal pattern "*")
+                (|downlink| '|GlossaryPage|))
+               (t (setq filter (|pmTransFilter| pattern))
+                (setq grepForm (|mkGrepPattern| filter '|none|))
+                (setq |$key| '|none|)
+                (setq results (|applyGrep| grepForm '|gloss|))
+                (setq defstream
+                         (make-instream
+                             (STRCONC (|getEnv| "AXIOM")
+                              "/algebra/glossdef.text")))
+                (setq lines
+                         (|gatherGlossLines| results defstream))
+                (setq heading
+                         (cond
+                           ((equal pattern "")
+                            "Glossary")
+                           ((null lines)
+                            (cons "No glossary items match {\\em "
+                                  (cons pattern
+                                        (cons "}" nil))))
+                           (t
+                            (cons "Glossary items matching {\\em "
+                                  (cons pattern
+                                        (cons "}" nil))))))
+                (cond
+                  ((null lines)
+                   (cond
+                     ((and tryAgain? (> (|#| pattern) 0))
+                      (cond
+                        ((equal
+                             (elt pattern
+                                  (setq k (MAXINDEX pattern)))
+                             #\s)
+                         (|htGlossPage| htPage
+                             (SUBSTRING pattern 0 k) t))
+                        ((upper-case-p (elt pattern 0))
+                         (|htGlossPage| htPage (downcase pattern)
+                             nil))
+                        (t
+                         (|errorPage| htPage
+                             (cons "Sorry"
+                                   (cons nil
+                                    (cons
+                                     (cons "\\centerline{"
+                                      (append heading
+                                       (cons "}" nil)))
+                                     nil)))))))
+                     (t
+                      (|errorPage| htPage
+                          (cons "Sorry"
+                                (cons nil
+                                      (cons
+                                       (cons
+                                        "\\centerline{"
+                                        (append heading
+                                         (cons "}" nil)))
+                                       nil)))))))
+                  (t (|htInitPageNoScroll| nil heading)
+                   (|htSay| "\\beginscroll\\beginmenu")
+                   (DO ((G168058 lines (cdr G168058))
+                        (line nil))
+                       ((or (atom G168058)
+                            (progn (setq line (car G168058)) nil))
+                        nil)
+                     (SEQ (EXIT (progn
+                                  (setq tick
+                                           (|charPosition| |$tick|
+                                            line 1))
+                                  (|htSay|
+                                 "\\item{\\em \\menuitemstyle{}}\\tab{0}{\\em "
+                                           (|escapeString|
+                                            (SUBSTRING line 0 tick))
+                                           "} "
+                                           (SUBSTRING line
+                                            (1+ tick) nil))))))
+                   (|htSay| "\\endmenu ")
+                   (|htSay| "\\endscroll\\newline ")
+                   (|htMakePage|
+                       (cons (cons '|bcLinks|
+                                   (cons
+                                    (cons "Search"
+                                     (cons ""
+                                      (cons '|htGlossSearch|
+                                       (cons nil nil))))
+                                    nil))
+                             nil))
+                   (|htSay| " for glossary entry matching ")
+                   (|htMakePage|
+                       (cons (cons '|bcStrings|
+                                   (cons
+                                    (cons 24
+                                     (cons "*"
+                                      (cons '|filter| (cons 'em nil))))
+                                    nil))
+                             nil))
+                   (|htShowPageNoScroll|))))))))))
+
+\end{chunk}
+
+\defun{gatherGlossLines}{gatherGlossLines}
+\begin{chunk}{defun gatherGlossLines}
+(defun |gatherGlossLines| (results defstream)
+  (prog (n keyAndTick byteAddress line k pointer def x
+         j nextPointer xtralines acc)
+  (declare (special |$tick|))
+    (return
+      (SEQ (progn
+             (setq acc nil)
+             (DO ((G168098 results (cdr G168098))
+                  (keyline nil))
+                 ((or (atom G168098)
+                      (progn (setq keyline (car G168098)) nil))
+                  nil)
+               (SEQ (EXIT (progn
+                            (setq n
+                                     (|charPosition| |$tick| keyline
+                                      0))
+                            (setq keyAndTick
+                                     (SUBSTRING keyline 0
+                                      (1+ n)))
+                            (setq byteAddress
+                                     (|string2Integer|
+                                      (SUBSTRING keyline (1+ n)
+                                       nil)))
+                            (file-position defstream byteAddress)
+                            (setq line (readline defstream))
+                            (setq k
+                                     (|charPosition| |$tick| line 1))
+                            (setq pointer
+                                     (SUBSTRING line 0 k))
+                            (setq def
+                                     (SUBSTRING line (1+ k)
+                                      nil))
+                            (setq xtralines nil)
+                            (DO ()
+                                ((null (and (null (eofp defstream))
+                                        (setq x
+                                         (readline defstream))
+                                        (setq j
+                                         (|charPosition| |$tick| x 1))
+                                        (setq nextPointer
+                                         (SUBSTRING x 0 j))
+                                        (equal nextPointer
+                                         pointer)))
+                                 nil)
+                              (SEQ (EXIT
+                                    (setq xtralines
+                                     (cons
+                                      (SUBSTRING x (1+ j) nil)
+                                      xtralines)))))
+                            (setq acc
+                                     (cons
+                                      (STRCONC keyAndTick def
+                                       (prog (G168110)
+                                         (setq G168110 "")
+                                         (return
+                                           (DO
+                                            ((G168115
+                                              (NREVERSE xtralines)
+                                              (CDR G168115))
+                                             (G168081 nil))
+                                            ((OR (ATOM G168115)
+                                              (progn
+                                                (setq G168081
+                                                 (car G168115))
+                                                nil))
+                                             G168110)
+                                             (SEQ
+                                              (EXIT
+                                               (setq G168110
+                                                (STRCONC G168110
+                                                 G168081))))))))
+                                      acc))))))
+             (reverse acc))))))
+
+\end{chunk}
+
+\defun{htGlossSearch}{htGlossSearch}
+\begin{chunk}{defun htGlossSearch}
+(defun |htGlossSearch| (htPage junk)
+  (declare (ignore junk))
+  (|htGloss| (|htpLabelInputString| htPage '|filter|)))
+
+\end{chunk}
+
+\defun{htGreekSearch}{htGreekSearch}
+\begin{chunk}{defun htGreekSearch}
+(defun |htGreekSearch| (filter)
+  (prog (ss s names matches nonmatches)
+    (return
+      (SEQ (progn
+             (setq ss (|dbNonEmptyPattern| filter))
+             (setq s (|pmTransFilter| ss))
+             (cond
+               ((and (consp s) (eq (QCAR s) '|error|))
+                (|bcErrorPage| s))
+               ((null s)
+                (|errorPage| nil
+                    (cons (cons "Missing search string"
+                                nil)
+                          (cons nil
+                                (cons
+       "\\vspace{2}\\centerline{To select one of the greek letters:}\\newline "
+                                      (cons
+ "\\centerline{{\\em first} enter a search key into the input area}\\newline "
+                                       (cons
+ "\\centerline{{\\em then } move the mouse cursor to the work {\\em search} and click}"
+                                        nil)))))))
+               (t (setq filter (|patternCheck| s))
+                (setq names
+                         '(|alpha| |beta| |gamma| |delta| |epsilon|
+                                   |zeta| |eta| |theta| |iota| |kappa|
+                                   |lambda| |mu| |nu| |pi|))
+                (DO ((G168149 names (CDR G168149)) (x nil))
+                    ((or (atom G168149)
+                         (progn (setq x (car G168149)) nil))
+                     nil)
+                  (SEQ (EXIT (cond
+                               ((|superMatch?| filter (PNAME x))
+                                (setq matches
+                                         (cons x matches)))
+                               (t
+                                (setq nonmatches
+                                         (cons x nonmatches)))))))
+                (setq matches (NREVERSE matches))
+                (setq nonmatches (NREVERSE nonmatches))
+                (|htInitPage| "Greek Names" nil)
+                (cond
+                  ((null matches)
+                   (|htInitPage|
+                       (cons  "Greek names matching search string {\\em "
+                             (cons ss (cons "}" nil)))
+                       nil)
+ (|htSay| '|\\vspace{2}\\centerline{Sorry, but no greek letters match your search string}\\centerline{{\\em |
+                            ss
+                         '|}}\\centerline{Click on the up-arrow to try again}|)
+                   (|htShowPage|))
+                  (t
+                   (|htInitPage|
+                       (cons  "Greek letters matching search string {\\em "
+                             (cons ss (cons "}" nil)))
+                       nil)
+                   (cond
+                     (|nonmatches|
+                         (|htSay|
+                "The greek letters that {\\em match} your search string {\\em "
+                                  ss "}:"))
+                     (t
+                      (|htSay| "Your search string {\\em "
+                               ss
+                               '|} matches all of the greek letters:|)))
+                   (|htSay| "{\\em \\table{")
+                   (DO ((G168158 matches (CDR G168158))
+                        (x nil))
+                       ((or (atom G168158)
+                            (progn (setq x (car G168158)) nil))
+                        nil)
+                     (SEQ (EXIT (|htSay| "{" x
+                                         "}"))))
+                   (|htSay| "}}\\vspace{1}")
+                   (cond
+                     (|nonmatches|
+                         (|htSay|   
+"The greek letters that {\\em do not match} your search string:{\\em \\table{")
+                         (DO ((G168167 nonmatches (CDR G168167))
+                              (x nil))
+                             ((or (atom G168167)
+                                  (progn
+                                    (setq x (car G168167))
+                                    nil))
+                              nil)
+                           (SEQ (EXIT (|htSay| "{" x
+                                       "}"))))
+                         (|htSay| "}}")))
+                   (|htShowPage|))))))))))
+
+\end{chunk}
+
+\defun{htTextSearch}{htTextSearch}
+\begin{chunk}{defun htTextSearch}
+(defun |htTextSearch| (filter)
+  (prog (s lines matches nonmatches)
+    (return
+      (SEQ (progn
+             (setq s
+                      (|pmTransFilter| (|dbNonEmptyPattern| filter)))
+             (cond
+               ((and (consp s) (eq (QCAR s) '|error|))
+                (|bcErrorPage| s))
+               ((null s)
+                (|errorPage| nil
+                    (cons (cons "Missing search string"
+                                nil)
+                          (cons nil
+                                (cons
+       "\\vspace{2}\\centerline{To select one of the lines of text:}\\newline "
+                                      (cons
+  "\\centerline{{\\em first} enter a search key into the input area}\\newline "
+                                       (cons
+  "\\centerline{{\\em then } move the mouse cursor to the work {\\em search} and click}"
+                                        nil)))))))
+               (t (setq filter s)
+                (setq lines
+                         (cons
+             "{{\\em Fruit flies} *like* a {\\em banana and califlower ears.}}"
+                               (cons
+                               "{{\\em Sneak Sears Silas with Savings Snatch}}"
+                                     nil)))
+                (DO ((G168191 lines (cdr G168191)) (x nil))
+                    ((or (atom G168191)
+                         (progn (setq x (car G168191)) nil))
+                     nil)
+                  (SEQ (EXIT (cond
+                               ((|superMatch?| filter x)
+                                (setq matches
+                                         (cons x matches)))
+                               (t
+                                (setq nonmatches
+                                         (cons x nonmatches)))))))
+                (setq matches (NREVERSE matches))
+                (setq nonmatches (NREVERSE nonmatches))
+                (|htInitPage| "Text Matches" nil)
+                (cond
+                  ((null matches)
+                   (|htInitPage|
+                       (cons "Lines matching search string {\\em "
+                             (cons s (cons "}" nil)))
+                       nil)
+                   (|htSay| 
+'|\\vspace{2}\\centerline{Sorry, but no lines match your search string}\\centerline{{\\em |
+                            s
+                         '|}}\\centerline{Click on the up-arrow to try again}|)
+                   (|htShowPage|))
+                  (t
+                   (|htInitPage|
+                       (cons "Lines matching search string {\\em "
+                             (cons s (cons "}" nil)))
+                       nil)
+                   (cond
+                     (nonmatches
+                         (|htSay| "The lines that {\\em match} your search string {\\em "
+                                  s "}:"))
+                     (t
+                      (|htSay| "Your search string {\\em "
+                               s '|} matches both lines:|)))
+                   (|htSay| "{\\em \\table{")
+                   (DO ((G168200 matches (CDR G168200))
+                        (x nil))
+                       ((or (atom G168200)
+                            (progn (setq x (car G168200)) nil))
+                        nil)
+                     (SEQ (EXIT (|htSay| "{" x
+                                         "}"))))
+                   (|htSay| "}}\\vspace{1}")
+                   (cond
+                     (nonmatches
+                         (|htSay|
+       "The line that {\\em does not match} your search string:{\\em \\table{")
+                         (DO ((G168209 nonmatches (cdr G168209))
+                              (x nil))
+                             ((or (atom G168209)
+                                  (progn
+                                    (setq x (car G168209))
+                                    nil))
+                              nil)
+                           (SEQ (EXIT (|htSay| "{" x
+                                       "}"))))
+                         (|htSay| "}}")))
+                   (|htShowPage|))))))))))
+
+\end{chunk}
+
+\defun{htTutorialSearch}{htTutorialSearch}
+\begin{chunk}{defun htTutorialSearch}
+(defun |htTutorialSearch| (pattern)
+  (prog (s source target lines t1 name title)
+    (return
+      (SEQ (progn
+             (setq s
+                      (or (|dbNonEmptyPattern| pattern)
+                          (return
+                            (|errorPage| nil
+                                (cons "Empty search key"
+                                      (cons nil
+                                       (cons
+ "\\vspace{3}\\centerline{You must enter some search string"
+                                        nil)))))))
+             (setq s (|mkUnixPattern| s))
+             (setq source "$AXIOM/doc/hypertex/pages/ht.db")
+             (setq target "/tmp/temp.text.$SPADNUM")
+             (OBEY (STRCONC "$AXIOM/lib/hthits"
+                            " \"" s "\" "
+                            source " > " target))
+             (setq lines (|dbReadLines| '|temp|))
+             (|htInitPageNoScroll| nil
+                 (cons "Tutorial Pages mentioning {\\em "
+                       (cons pattern (cons "}" nil))))
+             (|htSay| "\\beginscroll\\table{")
+             (DO ((G168241 lines (cdr G168241)) (line nil))
+                 ((or (atom G168241)
+                      (progn (setq line (car G168241)) nil))
+                  nil)
+               (SEQ (EXIT (progn
+                            (setq t1 (|dbParts| line 3 0))
+                            (setq name (car t1))
+                            (setq title (cadr t1))
+                            (|htSay| (cons "{\\downlink{"
+                                      (cons title
+                                       (cons "}{"
+                                        (cons name
+                                         (cons "}}" nil))))))))))
+             (|htSay| "}")
+             (|htShowPage|))))))
+
+\end{chunk}
+
+\defun{mkUnixPattern}{mkUnixPattern}
+\begin{chunk}{defun mkUnixPattern}
+(defun |mkUnixPattern| (s)
+  (prog (starPositions k u)
+  (declare (special |$wild|))
+    (return
+      (SEQ (progn
+             (setq u (|mkUpDownPattern| s))
+             (setq starPositions
+                      (reverse (prog (G168264)
+                                 (setq G168264 nil)
+                                 (return
+                                   (DO
+                                    ((G168270
+                                      (+ (- 1)
+                                       (MAXINDEX u)))
+                                     (i 1 (QSADD1 i)))
+                                    ((QSGREATERP i G168270)
+                                     (NREVERSE0 G168264))
+                                     (SEQ
+                                      (EXIT
+                                       (cond
+                                         ((equal (elt u i)
+                                           |$wild|)
+                                          (setq G168264
+                                           (cons i G168264)))))))))))
+             (DO ((G168277 starPositions (cdr G168277))
+                  (i nil))
+                 ((or (atom G168277)
+                      (progn (setq i (car G168277)) nil))
+                  nil)
+               (SEQ (EXIT (setq u
+                                   (STRCONC (SUBSTRING u 0 i)
+                                    ".*"
+                                    (SUBSTRING u (1+ i) nil))))))
+             (cond
+               ((NEQUAL (elt u 0) |$wild|)
+                (setq u (STRCONC "[^a-zA-Z]" u)))
+               (t (setq u (SUBSTRING u 1 nil))))
+             (cond
+               ((NEQUAL (elt u (setq k (MAXINDEX u))) |$wild|)
+                (setq u (STRCONC u "[^a-zA-Z]")))
+               (t (setq u (SUBSTRING u 0 k))))
+             u)))))
+
+\end{chunk}
+
 \chapter{The Interpreter}
 \begin{chunk}{Interpreter}
 (setq *print-array* nil)
@@ -47042,6 +50858,7 @@ Given \verb|("one" "two" "three")| generate \verb|"(one,two,three)"|
 
 \getchunk{defun basicLookup}
 \getchunk{defun basicLookupCheckDefaults}
+\getchunk{defun basicStringize}
 \getchunk{defun bcComplexLimit}
 \getchunk{defun bcComplexLimitGen}
 \getchunk{defun bcCreateVariableString}
@@ -47070,6 +50887,8 @@ Given \verb|("one" "two" "three")| generate \verb|"(one,two,three)"|
 \getchunk{defun bcGen}
 \getchunk{defun bcGenEquations}
 \getchunk{defun bcGenExplicitMatrix}
+\getchunk{defun bcHt}
+\getchunk{defun bchtMakeButton}
 \getchunk{defun bcIndefiniteIntegrate}
 \getchunk{defun bcIndefiniteIntegrateGen}
 \getchunk{defun bcInputEquations}
@@ -47078,6 +50897,7 @@ Given \verb|("one" "two" "three")| generate \verb|"(one,two,three)"|
 \getchunk{defun bcInputMatrixByFormula}
 \getchunk{defun bcInputMatrixByFormulaGen}
 \getchunk{defun bcInputSolveInfo}
+\getchunk{defun bcIssueHt}
 \getchunk{defun bcLaurentSeries}
 \getchunk{defun bcLaurentSeriesGen}
 \getchunk{defun bcLimit}
@@ -47108,6 +50928,7 @@ Given \verb|("one" "two" "three")| generate \verb|"(one,two,three)"|
 \getchunk{defun bcRealLimit}
 \getchunk{defun bcRealLimitGen}
 \getchunk{defun bcRealLimitGen1}
+\getchunk{defun bcSadFaces}
 \getchunk{defun bcSeries}
 \getchunk{defun bcSeriesByFormula}
 \getchunk{defun bcSeriesByFormulaGen}
@@ -47131,18 +50952,29 @@ Given \verb|("one" "two" "three")| generate \verb|"(one,two,three)"|
 \getchunk{defun bcVectorGen}
 \getchunk{defun bcvspace}
 \getchunk{defun bcwords2liststring}
+\getchunk{defun beforeAfter}
+\getchunk{defun bracketString}
 \getchunk{defun break}
 \getchunk{defun breaklet}
 \getchunk{defun brightprint}
 \getchunk{defun brightprint-0}
 \getchunk{defun browse}
 \getchunk{defun browseOpen}
+\getchunk{defun buttonNames}
 
 \getchunk{defun cacheKeyedMsg}
 \getchunk{defun categoryOpen}
 \getchunk{defun changeHistListLen}
 \getchunk{defun changeToNamedInterpreterFrame}
 \getchunk{defun charDigitVal}
+\getchunk{defun checkCondition}
+\getchunk{defun chkAllNonNegativeInteger}
+\getchunk{defun chkDirectory}
+\getchunk{defun chkNameList}
+\getchunk{defun chkNonNegativeInteger}
+\getchunk{defun chkOutputFileName}
+\getchunk{defun chkPosInteger}
+\getchunk{defun chkRange}
 \getchunk{defun cleanline}
 \getchunk{defun clear}
 \getchunk{defun clearCmdAll}
@@ -47171,6 +51003,8 @@ Given \verb|("one" "two" "three")| generate \verb|"(one,two,three)"|
 \getchunk{defun compiledLookup}
 \getchunk{defun compiledLookupCheck}
 \getchunk{defun compressOpen}
+\getchunk{defun computeDomainVariableAlist}
+\getchunk{defun condErrorMsg}
 \getchunk{defun constoken}
 \getchunk{defun constructSubst}
 \getchunk{defun containsVars}
@@ -47179,6 +51013,7 @@ Given \verb|("one" "two" "three")| generate \verb|"(one,two,three)"|
 \getchunk{defun countCache}
 
 \getchunk{defun DaaseName}
+\getchunk{defun dbNonEmptyPattern}
 \getchunk{defun decideHowMuch}
 \getchunk{defun defaultTargetFE}
 \getchunk{defun defiostream}
@@ -47229,10 +51064,13 @@ Given \verb|("one" "two" "three")| generate \verb|"(one,two,three)"|
 \getchunk{defun displayType}
 \getchunk{defun displayValue}
 \getchunk{defun displayWorkspaceNames}
+\getchunk{defun doDoitButton}
 \getchunk{defun domainToGenvar}
 \getchunk{defun domArg}
 \getchunk{defun domArg2}
 \getchunk{defun doSystemCommand}
+\getchunk{defun downlink}
+\getchunk{defun downlinkSaturn}
 \getchunk{defun dqConcat}
 \getchunk{defun dropInputLibrary}
 \getchunk{defun dumbTokenize}
@@ -47253,6 +51091,7 @@ Given \verb|("one" "two" "three")| generate \verb|"(one,two,three)"|
 \getchunk{defun evaluateSignature}
 \getchunk{defun evaluateType}
 \getchunk{defun evaluateType1}
+\getchunk{defun executeInterpreterCommand}
 \getchunk{defun ExecuteInterpSystemCommand}
 \getchunk{defun executeQuietCommand}
 \getchunk{defun explainLinear}
@@ -47278,6 +51117,7 @@ Given \verb|("one" "two" "three")| generate \verb|"(one,two,three)"|
 \getchunk{defun functionp}
 \getchunk{defun funfind,LAM}
 
+\getchunk{defun gatherGlossLines}
 \getchunk{defun genDomainTraceName}
 \getchunk{defun gensymInt}
 \getchunk{defun getAliasIfTracedMapParameter}
@@ -47304,6 +51144,9 @@ Given \verb|("one" "two" "three")| generate \verb|"(one,two,three)"|
 \getchunk{defun getPosStL}
 \getchunk{defun getPreviousMapSubNames}
 \getchunk{defun getProplist}
+\getchunk{defun getRefvU8}
+\getchunk{defun getRefvU16}
+\getchunk{defun getRefvU32}
 \getchunk{defun getStFromMsg}
 \getchunk{defun getSystemCommandLine}
 \getchunk{defun getTraceOption}
@@ -47338,11 +51181,122 @@ Given \verb|("one" "two" "three")| generate \verb|"(one,two,three)"|
 \getchunk{defun historySpad2Cmd}
 \getchunk{defun hkeys}
 \getchunk{defun hput}
+\getchunk{defun htAddHeading}
+\getchunk{defun htAllOrNum}
+\getchunk{defun htBcLinks}
+\getchunk{defun htBcLispLinks}
+\getchunk{defun htBcRadioButtons}
+\getchunk{defun htCacheAddChoice}
+\getchunk{defun htCacheOne}
+\getchunk{defun htCacheSet}
+\getchunk{defun htCheckList}
+\getchunk{defun htCheck}
+\getchunk{defun htDoneButton}
+\getchunk{defun htDoNothing}
+\getchunk{defun htEscapeString}
+\getchunk{defun htFunctionSetLiteral}
+\getchunk{defun htGlossPage}
+\getchunk{defun htGlossSearch}
+\getchunk{defun htGloss}
+\getchunk{defun htGreekSearch}
+\getchunk{defun htInitPage}
+\getchunk{defun htInputStrings}
+\getchunk{defun htKill}
+\getchunk{defun htLispLinks}
+\getchunk{defun htLispMemoLinks}
+\getchunk{defun htMakeButton}
+\getchunk{defun htMakeDoitButton}
+\getchunk{defun htMakeDoneButton}
+\getchunk{defun htMakeErrorPage}
+\getchunk{defun htMakeInputList}
+\getchunk{defun htMakeLabel}
+\getchunk{defun htMakePage}
+\getchunk{defun htMakePage1}
+\getchunk{defun htMakePathKey,fn}
+\getchunk{defun htMakePathKey}
+\getchunk{defun htMakeTemplates,substLabel}
+\getchunk{defun htMakeTemplates}
+\getchunk{defun htMarkTree}
 \getchunk{defun htMkName}
+\getchunk{defun htpAddInputAreaProp}
+\getchunk{defun htpAddToPageDescription}
+\getchunk{defun htpButtonValue}
+\getchunk{defun htpDestroyPage}
+\getchunk{defun htpDomainConditions}
+\getchunk{defun htpDomainPvarSubstList}
+\getchunk{defun htpDomainVariableAlist}
+\getchunk{defun htpInputAreaAlist}
+\getchunk{defun htpLabelDefault}
+\getchunk{defun htpLabelErrorMsg}
+\getchunk{defun htpLabelFilteredInputString}
+\getchunk{defun htpLabelFilter}
+\getchunk{defun htpLabelInputString}
+\getchunk{defun htpLabelSpadType}
+\getchunk{defun htpLabelSpadValue}
+\getchunk{defun htpLabelType}
+\getchunk{defun htpName}
+\getchunk{defun htpPageDescription}
+\getchunk{defun htpProperty}
+\getchunk{defun htpPropertyList}
+\getchunk{defun htProcessBcButtons}
+\getchunk{defun htProcessBcStrings}
+\getchunk{defun htProcessDoitButton}
+\getchunk{defun htProcessDomainConditions}
+\getchunk{defun htProcessDoneButton}
+\getchunk{defun htProcessToggleButtons}
+\getchunk{defun htpSetDomainConditions}
+\getchunk{defun htpSetDomainPvarSubstList}
+\getchunk{defun htpSetDomainVariableAlist}
+\getchunk{defun htpSetInputAreaAlist}
+\getchunk{defun htpSetLabelErrorMsg}
+\getchunk{defun htpSetLabelInputString}
+\getchunk{defun htpSetLabelSpadValue}
+\getchunk{defun htpSetName}
+\getchunk{defun htpSetPageDescription}
+\getchunk{defun htpSetProperty}
+\getchunk{defun htpSetRadioButtonAlist}
+\getchunk{defun htQuote}
+\getchunk{defun htRadioButtons}
+\getchunk{defun htSetCache}
+\getchunk{defun htSetExpose}
+\getchunk{defun htSetFunCommandContinue}
+\getchunk{defun htSetFunCommand}
+\getchunk{defun htSetHistory}
+\getchunk{defun htSetInputLibrary}
+\getchunk{defun htSetInteger}
+\getchunk{defun htSetLinkerArgs}
+\getchunk{defun htSetLiterals}
+\getchunk{defun htSetLiteral}
+\getchunk{defun htSetNotAvailable}
+\getchunk{defun htSetOutputCharacters}
+\getchunk{defun htSetOutputLibrary}
+\getchunk{defun htSetSystemVariableKind}
+\getchunk{defun htSetSystemVariable}
+\getchunk{defun htSetVars}
+\getchunk{defun htSetvarDoneButton}
+\getchunk{defun htShowCount}
+\getchunk{defun htShowFunctionPageContinued}
+\getchunk{defun htShowFunctionPage}
+\getchunk{defun htShowIntegerPage}
+\getchunk{defun htShowLiteralsPage}
+\getchunk{defun htShowPage}
+\getchunk{defun htShowPageNoScroll}
+\getchunk{defun htShowSetPage}
+\getchunk{defun htShowSetTreeValue}
+\getchunk{defun htShowSetTree}
 \getchunk{defun htStringPad}
+\getchunk{defun htsv}
+\getchunk{defun htSystemVariables,displayOptions}
+\getchunk{defun htSystemVariables,fn}
+\getchunk{defun htSystemVariables,functionTail}
+\getchunk{defun htSystemVariables,gn}
+\getchunk{defun htSystemVariables}
+\getchunk{defun htTextSearch}
+\getchunk{defun htTutorialSearch}
 
 \getchunk{defun If?}
 \getchunk{defun ifCond}
+\getchunk{defun iht}
 \getchunk{defun importFromFrame}
 \getchunk{defun incAppend}
 \getchunk{defun incAppend1}
@@ -47445,6 +51399,7 @@ Given \verb|("one" "two" "three")| generate \verb|"(one,two,three)"|
 \getchunk{defun linkGen}
 \getchunk{defun listConstructorAbbreviations}
 \getchunk{defun listDecideHowMuch}
+\getchunk{defun listOfStrings2String}
 \getchunk{defun listOutputter}
 \getchunk{defun lnFileName}
 \getchunk{defun load}
@@ -47478,9 +51433,6 @@ Given \verb|("one" "two" "three")| generate \verb|"(one,two,three)"|
 \getchunk{defun mac0SubstituteOuter}
 \getchunk{defun make-appendstream}
 \getchunk{defun make-databases}
-\getchunk{defun getRefvU8}
-\getchunk{defun getRefvU16}
-\getchunk{defun getRefvU32}
 \getchunk{defun makeFullNamestring}
 \getchunk{defun makeHistFileName}
 \getchunk{defun makeInputFilename}
@@ -47490,12 +51442,15 @@ Given \verb|("one" "two" "three")| generate \verb|"(one,two,three)"|
 \getchunk{defun makeOrdinal}
 \getchunk{defun make-outstream}
 \getchunk{defun makePathname}
+\getchunk{defun makeSpadCommand}
 \getchunk{defun makeStream}
 \getchunk{defun mapLetPrint}
+\getchunk{defun mapStringize}
 \getchunk{defun mergePathnames}
 \getchunk{defun messageprint}
 \getchunk{defun messageprint-1}
 \getchunk{defun messageprint-2}
+\getchunk{defun mkCurryFun}
 \getchunk{defun mkDomPvar}
 \getchunk{defun mkEvalable}
 \getchunk{defun mkEvalableMapping}
@@ -47503,6 +51458,8 @@ Given \verb|("one" "two" "three")| generate \verb|"(one,two,three)"|
 \getchunk{defun mkEvalableUnion}
 \getchunk{defun mkLineList}
 \getchunk{defun mkprompt}
+\getchunk{defun mkSetTitle}
+\getchunk{defun mkUnixPattern}
 \getchunk{defun msgCreate}
 \getchunk{defun msgImPr?}
 \getchunk{defun msgNoRep?}
@@ -47726,6 +51683,7 @@ Given \verb|("one" "two" "three")| generate \verb|"(one,two,three)"|
 \getchunk{defun ofCategory}
 \getchunk{defun oldCompLookup}
 \getchunk{defun oldHistFileName}
+\getchunk{defun oldParseString}
 \getchunk{defun om-bindTCP}
 \getchunk{defun om-closeConn}
 \getchunk{defun om-closeDev}
@@ -47790,9 +51748,12 @@ Given \verb|("one" "two" "three")| generate \verb|"(one,two,three)"|
 \getchunk{defun optionUserLevelError}
 \getchunk{defun orderBySlotNumber}
 
+\getchunk{defun parseAndEval}
+\getchunk{defun parseAndEval1}
 \getchunk{defun parseAndInterpret}
 \getchunk{defun parseFromString}
 \getchunk{defun parseSystemCmd}
+\getchunk{defun parseWord}
 \getchunk{defun pathname}
 \getchunk{defun pathnameDirectory}
 \getchunk{defun pathnameName}
@@ -48025,12 +51986,16 @@ Given \verb|("one" "two" "three")| generate \verb|"(one,two,three)"|
 \getchunk{defun punctuation?}
 \getchunk{defun putDatabaseStuff}
 \getchunk{defun putHist}
+\getchunk{defun pvarCondList1}
+\getchunk{defun pvarCondList}
 \getchunk{defun pvarPredTran}
+\getchunk{defun pvarsOfPattern}
 
 \getchunk{defun queryClients}
 \getchunk{defun queueUpErrors}
 \getchunk{defun quit}
 \getchunk{defun quitSpad2Cmd}
+\getchunk{defun quoteString}
 
 \getchunk{defun rassocSub}
 \getchunk{defun rdefinstream}
@@ -48053,7 +52018,11 @@ Given \verb|("one" "two" "three")| generate \verb|"(one,two,three)"|
 \getchunk{defun remover}
 \getchunk{defun removeTracedMapSigs}
 \getchunk{defun removeUndoLines}
+\getchunk{defun renamePatternVariables1}
+\getchunk{defun renamePatternVariables}
 \getchunk{defun replaceFile}
+\getchunk{defun replacePercentByDollar,fn}
+\getchunk{defun replacePercentByDollar}
 \getchunk{defun replaceSharps}
 \getchunk{defun reportOperations}
 \getchunk{defun reportOpsFromLisplib}
@@ -48166,6 +52135,7 @@ Given \verb|("one" "two" "three")| generate \verb|"(one,two,three)"|
 \getchunk{defun setOutputOpenMath}
 \getchunk{defun setOutputTex}
 \getchunk{defun setStreamsCalculate}
+\getchunk{defun setUpDefault}
 \getchunk{defun shortenForPrinting}
 \getchunk{defun show}
 \getchunk{defun showdatabase}
@@ -48207,6 +52177,7 @@ Given \verb|("one" "two" "three")| generate \verb|"(one,two,three)"|
 \getchunk{defun startsNegComment?}
 \getchunk{defun statisticsInitialization}
 \getchunk{defun streamChop}
+\getchunk{defun stringize}
 \getchunk{defun stringList2String}
 \getchunk{defun stringMatches?}
 \getchunk{defun StringToDir}
@@ -48214,6 +52185,7 @@ Given \verb|("one" "two" "three")| generate \verb|"(one,two,three)"|
 \getchunk{defun strposl}
 \getchunk{defun stupidIsSpadFunction}
 \getchunk{defun subMatch}
+\getchunk{defun substFromAlist}
 \getchunk{defun substringMatch}
 \getchunk{defun subTypes}
 \getchunk{defun summary}
@@ -48228,6 +52200,7 @@ Given \verb|("one" "two" "three")| generate \verb|"(one,two,three)"|
 
 \getchunk{defun ?t}
 \getchunk{defun tabbing}
+\getchunk{defun templateParts}
 \getchunk{defun tangle}
 \getchunk{defun terminateSystemCommand}
 \getchunk{defun tersyscommand}
@@ -48252,8 +52225,10 @@ Given \verb|("one" "two" "three")| generate \verb|"(one,two,three)"|
 \getchunk{defun traceSpad2Cmd}
 \getchunk{defun translateTrueFalse2YesNo}
 \getchunk{defun translateYesNo2TrueFalse}
+\getchunk{defun translateYesNoToTrueFalse}
 \getchunk{defun transOnlyOption}
 \getchunk{defun transTraceItem}
+\getchunk{defun typeCheckInputAreas}
 
 \getchunk{defun unAbbreviateKeyword}
 \getchunk{defun undo}
diff --git a/changelog b/changelog
index 2982a44..988824a 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,8 @@
+20130513 tpd src/axiom-website/patches.html 20130513.01.tpd.patch
+20130513 tpd src/interp/util.lisp remove autoload of ht-util
+20130513 tpd src/interp/Makefile remove autoload of ht-util
+20130513 tpd books/bookvol5 merge ht-util.lisp
+20130513 tpd src/interp/ht-util.lisp deleted, merged with bookvol5
 20130512 tpd src/axiom-website/patches.html 20130512.01.tpd.patch
 20130512 tpd src/share/doc/hypertex/pages/util.ht deleted, unused
 20130511 tpd src/axiom-website/patches.html 20130511.02.tpd.patch
diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html
index 45ad0a6..dc9e20f 100644
--- a/src/axiom-website/patches.html
+++ b/src/axiom-website/patches.html
@@ -4173,6 +4173,8 @@ src/doc/axiom.bib removed
 buglist remove dead items
 <a href="patches/20130512.01.tpd.patch">20130512.01.tpd.patch</a>
 src/share/doc/hypertex/pages/util.ht deleted, unused
+<a href="patches/20130513.01.tpd.patch">20130513.01.tpd.patch</a>
+books/bookvol5 merge ht-util.lisp
  </body>
 </html>
 
diff --git a/src/interp/Makefile.pamphlet b/src/interp/Makefile.pamphlet
index c848557..c54e88c 100644
--- a/src/interp/Makefile.pamphlet
+++ b/src/interp/Makefile.pamphlet
@@ -228,8 +228,7 @@ OCOBJS=
 The {\bf BROBJS} list contains files only used by the hypertex
 browser. These files should probably be autoloaded.
 <<environment>>=
-BROBJS=	${AUTO}/ht-util.${O}	\
-	${AUTO}/br-con.${O}	\
+BROBJS=	${AUTO}/br-con.${O}	\
 	${AUTO}/topics.${O}     
 
 @
@@ -2651,38 +2650,6 @@ ${MID}/termrw.lisp: ${IN}/termrw.lisp.pamphlet
 
 @
 
-\subsection{ht-util.lisp}
-<<ht-util.o (AUTO from OUT)>>=
-${AUTO}/ht-util.${O}: ${OUT}/ht-util.${O}
-	@ echo 422 making ${AUTO}/ht-util.${O} from ${OUT}/ht-util.${O}
-	@ cp ${OUT}/ht-util.${O} ${AUTO}
-
-@
-\subsection{ht-util.lisp}
-<<ht-util.o (OUT from MID)>>=
-${OUT}/ht-util.${O}: ${MID}/ht-util.lisp
-	@ echo 136 making ${OUT}/ht-util.${O} from ${MID}/ht-util.lisp
-	@ ( cd ${MID} ; \
-	  if [ -z "${NOISE}" ] ; then \
-	   echo '(progn  (compile-file "${MID}/ht-util.lisp"' \
-             ':output-file "${OUT}/ht-util.${O}") (${BYE}))' | ${DEPSYS} ; \
-	  else \
-	   echo '(progn  (compile-file "${MID}/ht-util.lisp"' \
-             ':output-file "${OUT}/ht-util.${O}") (${BYE}))' | ${DEPSYS} \
-             >${TMP}/trace ; \
-	  fi )
-
-@
-<<ht-util.lisp (MID from IN)>>=
-${MID}/ht-util.lisp: ${IN}/ht-util.lisp.pamphlet
-	@ echo 137 making ${MID}/ht-util.lisp from \
-           ${IN}/ht-util.lisp.pamphlet
-	@ (cd ${MID} ; \
-          echo '(tangle "${IN}/ht-util.lisp.pamphlet" "*" "ht-util.lisp")' \
-        | ${OBJ}/${SYS}/bin/lisp )
-
-@
-
 \subsection{record.lisp}
 <<record.o (OUT from MID)>>=
 ${OUT}/record.${O}: ${MID}/record.lisp
@@ -3027,10 +2994,6 @@ clean:
 <<htcheck.o (OUT from MID)>>
 <<htcheck.lisp (MID from IN)>>
 
-<<ht-util.o (AUTO from OUT)>>
-<<ht-util.o (OUT from MID)>>
-<<ht-util.lisp (MID from IN)>>
-
 <<hypertex.o (OUT from MID)>>
 <<hypertex.lisp (MID from IN)>>
 
diff --git a/src/interp/ht-util.lisp.pamphlet b/src/interp/ht-util.lisp.pamphlet
deleted file mode 100644
index c0411d2..0000000
--- a/src/interp/ht-util.lisp.pamphlet
+++ /dev/null
@@ -1,4547 +0,0 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/interp ht-util.lisp}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{License}
-\begin{chunk}{*}
-(IN-PACKAGE "BOOT" )
-
-;-- HyperTeX Utilities for generating basic Command pages
-;--)package "BOOT"
-;$bcParseOnly := true
-
-(SPADLET |$bcParseOnly| 'T)
-
-;-- List of issued hypertex lines
-;$htLineList := nil
-
-(SPADLET |$htLineList| NIL) 
-
-;-- pointer to the page we are currently defining
-;$curPage := nil
-
-(SPADLET |$curPage| NIL) 
-
-;-- List of currently active window named
-;$activePageList := nil
-
-(SPADLET |$activePageList| NIL) 
-
-;htpDestroyPage(pageName) ==
-;  pageName in $activePageList =>
-;    SET(pageName, nil)
-;    $activePageList := NREMOVE($activePageList, pageName)
-
-(DEFUN |htpDestroyPage| (|pageName|)
-  (declare (special |$activePageList|))
-  (SEQ (COND
-         ((|member| |pageName| |$activePageList|)
-          (EXIT (PROGN
-                  (SET |pageName| NIL)
-                  (SPADLET |$activePageList|
-                           (NREMOVE |$activePageList| |pageName|))))))))
-
-;htpName htPage ==
-;-- GENSYM whose value is the page
-;  ELT(htPage, 0)
-
-(DEFUN |htpName| (|htPage|) (ELT |htPage| 0)) 
-
-;htpSetName(htPage, val) ==
-;  SETELT(htPage, 0, val)
-
-(DEFUN |htpSetName| (|htPage| |val|) (SETELT |htPage| 0 |val|)) 
-
-;htpDomainConditions htPage ==
-;-- List of Domain conditions
-;  ELT(htPage, 1)
-
-(DEFUN |htpDomainConditions| (|htPage|) (ELT |htPage| 1)) 
-
-;htpSetDomainConditions(htPage, val) ==
-;  SETELT(htPage, 1, val)
-
-(DEFUN |htpSetDomainConditions| (|htPage| |val|)
-  (SETELT |htPage| 1 |val|))
-
-;htpDomainVariableAlist htPage ==
-;-- alist of pattern variables and conditions
-;  ELT(htPage, 2)
-
-(DEFUN |htpDomainVariableAlist| (|htPage|) (ELT |htPage| 2)) 
-
-;htpSetDomainVariableAlist(htPage, val) ==
-;  SETELT(htPage, 2, val)
-
-(DEFUN |htpSetDomainVariableAlist| (|htPage| |val|)
-  (SETELT |htPage| 2 |val|))
-
-;htpDomainPvarSubstList htPage ==
-;-- alist of user pattern variables to system vars
-;  ELT(htPage, 3)
-
-(DEFUN |htpDomainPvarSubstList| (|htPage|) (ELT |htPage| 3)) 
-
-;htpSetDomainPvarSubstList(htPage, val) ==
-;  SETELT(htPage, 3, val)
-
-(DEFUN |htpSetDomainPvarSubstList| (|htPage| |val|)
-  (SETELT |htPage| 3 |val|))
-
-;htpRadioButtonAlist htPage ==
-;-- alist of radio button group names and labels
-;  ELT(htPage, 4)
-
-(DEFUN |htpRadioButtonAlist| (|htPage|) (ELT |htPage| 4)) 
-
-;htpButtonValue(htPage, groupName) ==
-;  for buttonName in LASSOC(groupName, htpRadioButtonAlist htPage) repeat
-;    (stripSpaces htpLabelInputString(htPage, buttonName)) = '"t" =>
-;      return buttonName
-
-(DEFUN |htpButtonValue| (|htPage| |groupName|)
-  (PROG ()
-    (RETURN
-      (SEQ (DO ((G166092
-                    (LASSOC |groupName|
-                            (|htpRadioButtonAlist| |htPage|))
-                    (CDR G166092))
-                (|buttonName| NIL))
-               ((OR (ATOM G166092)
-                    (PROGN (SETQ |buttonName| (CAR G166092)) NIL))
-                NIL)
-             (SEQ (EXIT (COND
-                          ((BOOT-EQUAL
-                               (|stripSpaces|
-                                   (|htpLabelInputString| |htPage|
-                                    |buttonName|))
-                               "t")
-                           (EXIT (RETURN |buttonName|)))))))))))
-
-;htpSetRadioButtonAlist(htPage, val) ==
-;  SETELT(htPage, 4, val)
-
-(DEFUN |htpSetRadioButtonAlist| (|htPage| |val|)
-  (SETELT |htPage| 4 |val|))
-
-;htpInputAreaAlist htPage ==
-;-- Alist of input-area labels, and default values
-;  ELT(htPage, 5)
-
-(DEFUN |htpInputAreaAlist| (|htPage|) (ELT |htPage| 5))
-
-;htpSetInputAreaAlist(htPage, val) ==
-;  SETELT(htPage, 5, val)
-
-(DEFUN |htpSetInputAreaAlist| (|htPage| |val|)
-  (SETELT |htPage| 5 |val|))
-
-;htpAddInputAreaProp(htPage, label, prop) ==
-;  SETELT(htPage, 5, [[label, nil, nil, nil, :prop], :ELT(htPage, 5)])
-
-(DEFUN |htpAddInputAreaProp| (|htPage| |label| |prop|)
-  (SETELT |htPage| 5
-          (CONS (CONS |label| (CONS NIL (CONS NIL (CONS NIL |prop|))))
-                (ELT |htPage| 5))))
-
-;htpPropertyList htPage ==
-;-- Association list of user-defined properties
-;  ELT(htPage, 6)
-
-(DEFUN |htpPropertyList| (|htPage|) (ELT |htPage| 6))
-
-;htpProperty(htPage, propName) ==
-;  LASSOC(propName, ELT(htPage, 6))
-
-(DEFUN |htpProperty| (|htPage| |propName|)
-  (LASSOC |propName| (ELT |htPage| 6)))
-
-;htpSetProperty(htPage, propName, val) ==
-;  pair := ASSOC(propName, ELT(htPage, 6))
-;  pair => RPLACD(pair, val)
-;  SETELT(htPage, 6, [[propName, :val], :ELT(htPage, 6)])
-
-(DEFUN |htpSetProperty| (|htPage| |propName| |val|)
-  (PROG (|pair|)
-    (RETURN
-      (PROGN
-        (SPADLET |pair| (|assoc| |propName| (ELT |htPage| 6)))
-        (COND
-          (|pair| (RPLACD |pair| |val|))
-          ('T
-           (SETELT |htPage| 6
-                   (CONS (CONS |propName| |val|) (ELT |htPage| 6)))))))))
-
-;htpLabelInputString(htPage, label) ==
-;-- value user typed as input string on page
-;  props := LASSOC(label, htpInputAreaAlist htPage)
-;  props and STRINGP (s := ELT(props,0)) =>
-;    s = '"" => s
-;    trimString s
-;  nil
-
-(DEFUN |htpLabelInputString| (|htPage| |label|)
-  (PROG (|props| |s|)
-    (RETURN
-      (PROGN
-        (SPADLET |props|
-                 (LASSOC |label| (|htpInputAreaAlist| |htPage|)))
-        (COND
-          ((AND |props| (STRINGP (SPADLET |s| (ELT |props| 0))))
-           (COND
-             ((BOOT-EQUAL |s| "") |s|)
-             ('T (|trimString| |s|))))
-          ('T NIL))))))
-
-;htpLabelFilteredInputString(htPage, label) ==
-;-- value user typed as input string on page
-;  props := LASSOC(label, htpInputAreaAlist htPage)
-;  props =>
-;    #props > 5 and ELT(props, 6) =>
-;      FUNCALL(SYMBOL_-FUNCTION ELT(props, 6), ELT(props, 0))
-;    replacePercentByDollar ELT(props, 0)
-;  nil
-
-(DEFUN |htpLabelFilteredInputString| (|htPage| |label|)
-  (PROG (|props|)
-    (RETURN
-      (PROGN
-        (SPADLET |props|
-                 (LASSOC |label| (|htpInputAreaAlist| |htPage|)))
-        (COND
-          (|props| (COND
-                     ((AND (> (|#| |props|) 5) (ELT |props| 6))
-                      (FUNCALL (SYMBOL-FUNCTION (ELT |props| 6))
-                               (ELT |props| 0)))
-                     ('T (|replacePercentByDollar| (ELT |props| 0)))))
-          ('T NIL))))))
-
-;replacePercentByDollar s == fn(s,0,MAXINDEX s) where
-;  fn(s,i,n) ==
-;    i > n => '""
-;    (m := charPosition(char "%",s,i)) > n => SUBSTRING(s,i,nil)
-;    STRCONC(SUBSTRING(s,i,m - i),'"$",fn(s,m + 1,n))
-
-(DEFUN |replacePercentByDollar,fn| (|s| |i| |n|)
-  (PROG (|m|)
-    (RETURN
-      (SEQ (IF (> |i| |n|) (EXIT ""))
-           (IF (> (SPADLET |m| (|charPosition| (|char| '%) |s| |i|))
-                  |n|)
-               (EXIT (SUBSTRING |s| |i| NIL)))
-           (EXIT (STRCONC (SUBSTRING |s| |i| (SPADDIFFERENCE |m| |i|))
-                          "$"
-                          (|replacePercentByDollar,fn| |s| (PLUS |m| 1)
-                              |n|)))))))
-
-
-(DEFUN |replacePercentByDollar| (|s|)
-  (|replacePercentByDollar,fn| |s| 0 (MAXINDEX |s|)))
-
-;htpSetLabelInputString(htPage, label, val) ==
-;------------------> OBSELETE
-;-- value user typed as input string on page
-;  props := LASSOC(label, htpInputAreaAlist htPage)
-;  props => SETELT(props, 0, STRINGIMAGE val)
-;  nil
-
-(DEFUN |htpSetLabelInputString| (|htPage| |label| |val|)
-  (PROG (|props|)
-    (RETURN
-      (PROGN
-        (SPADLET |props|
-                 (LASSOC |label| (|htpInputAreaAlist| |htPage|)))
-        (COND
-          (|props| (SETELT |props| 0 (STRINGIMAGE |val|)))
-          ('T NIL))))))
-
-;htpLabelSpadValue(htPage, label) ==
-;-- Scratchpad value of parsed and evaled inputString, as (type . value)
-;  props := LASSOC(label, htpInputAreaAlist htPage)
-;  props => ELT(props, 1)
-;  nil
-
-(DEFUN |htpLabelSpadValue| (|htPage| |label|)
-  (PROG (|props|)
-    (RETURN
-      (PROGN
-        (SPADLET |props|
-                 (LASSOC |label| (|htpInputAreaAlist| |htPage|)))
-        (COND (|props| (ELT |props| 1)) ('T NIL))))))
-
-;htpSetLabelSpadValue(htPage, label, val) ==
-;-- value user typed as input string on page
-;  props := LASSOC(label, htpInputAreaAlist htPage)
-;  props => SETELT(props, 1, val)
-;  nil
-
-(DEFUN |htpSetLabelSpadValue| (|htPage| |label| |val|)
-  (PROG (|props|)
-    (RETURN
-      (PROGN
-        (SPADLET |props|
-                 (LASSOC |label| (|htpInputAreaAlist| |htPage|)))
-        (COND (|props| (SETELT |props| 1 |val|)) ('T NIL))))))
-
-;htpLabelErrorMsg(htPage, label) ==
-;-- error message associated with input area
-;  props := LASSOC(label, htpInputAreaAlist htPage)
-;  props => ELT(props, 2)
-;  nil
-
-(DEFUN |htpLabelErrorMsg| (|htPage| |label|)
-  (PROG (|props|)
-    (RETURN
-      (PROGN
-        (SPADLET |props|
-                 (LASSOC |label| (|htpInputAreaAlist| |htPage|)))
-        (COND (|props| (ELT |props| 2)) ('T NIL))))))
-
-;htpSetLabelErrorMsg(htPage, label, val) ==
-;-- error message associated with input area
-;  props := LASSOC(label, htpInputAreaAlist htPage)
-;  props => SETELT(props, 2, val)
-;  nil
-
-(DEFUN |htpSetLabelErrorMsg| (|htPage| |label| |val|)
-  (PROG (|props|)
-    (RETURN
-      (PROGN
-        (SPADLET |props|
-                 (LASSOC |label| (|htpInputAreaAlist| |htPage|)))
-        (COND (|props| (SETELT |props| 2 |val|)) ('T NIL))))))
-
-;htpLabelType(htPage, label) ==
-;-- either 'string or 'button
-;  props := LASSOC(label, htpInputAreaAlist htPage)
-;  props => ELT(props, 3)
-;  nil
-
-(DEFUN |htpLabelType| (|htPage| |label|)
-  (PROG (|props|)
-    (RETURN
-      (PROGN
-        (SPADLET |props|
-                 (LASSOC |label| (|htpInputAreaAlist| |htPage|)))
-        (COND (|props| (ELT |props| 3)) ('T NIL))))))
-
-;htpLabelDefault(htPage, label) ==
-;-- default value for the input area
-;  msg := htpLabelInputString(htPage, label) =>
-;    msg = '"t" => 1
-;    msg = '"nil" => 0
-;    msg
-;  props := LASSOC(label, htpInputAreaAlist htPage)
-;  props =>
-;    ELT(props, 4)
-;  nil
-
-(DEFUN |htpLabelDefault| (|htPage| |label|)
-  (PROG (|msg| |props|)
-    (RETURN
-      (COND
-        ((SPADLET |msg| (|htpLabelInputString| |htPage| |label|))
-         (COND
-           ((BOOT-EQUAL |msg| "t") 1)
-           ((BOOT-EQUAL |msg| "nil") 0)
-           ('T |msg|)))
-        ('T
-         (SPADLET |props|
-                  (LASSOC |label| (|htpInputAreaAlist| |htPage|)))
-         (COND (|props| (ELT |props| 4)) ('T NIL)))))))
-
-;htpLabelSpadType(htPage, label) ==
-;-- pattern variable for target domain for input area
-;  props := LASSOC(label, htpInputAreaAlist htPage)
-;  props => ELT(props, 5)
-;  nil
-
-(DEFUN |htpLabelSpadType| (|htPage| |label|)
-  (PROG (|props|)
-    (RETURN
-      (PROGN
-        (SPADLET |props|
-                 (LASSOC |label| (|htpInputAreaAlist| |htPage|)))
-        (COND (|props| (ELT |props| 5)) ('T NIL))))))
-
-;htpLabelFilter(htPage, label) ==
-;-- string to string mapping applied to input area strings before parsing
-;  props := LASSOC(label, htpInputAreaAlist htPage)
-;  props => ELT(props, 6)
-;  nil
-
-(DEFUN |htpLabelFilter| (|htPage| |label|)
-  (PROG (|props|)
-    (RETURN
-      (PROGN
-        (SPADLET |props|
-                 (LASSOC |label| (|htpInputAreaAlist| |htPage|)))
-        (COND (|props| (ELT |props| 6)) ('T NIL))))))
-
-;htpPageDescription htPage ==
-;-- a list of all the commands issued to create the basic-command page
-;  ELT(htPage, 7)
-
-(DEFUN |htpPageDescription| (|htPage|) (ELT |htPage| 7)) 
-
-;htpSetPageDescription(htPage, pageDescription) ==
-;  SETELT(htPage, 7, pageDescription)
-
-(DEFUN |htpSetPageDescription| (|htPage| |pageDescription|)
-  (SETELT |htPage| 7 |pageDescription|))
-
-;htpAddToPageDescription(htPage, pageDescrip) ==
-;-------------> OBSELETE <-----------
-;  SETELT(htPage, 7, nconc(nreverse COPY_-LIST pageDescrip, ELT(htPage, 7)))
-
-(DEFUN |htpAddToPageDescription| (|htPage| |pageDescrip|)
-  (SETELT |htPage| 7
-          (NCONC (NREVERSE (COPY-LIST |pageDescrip|)) (ELT |htPage| 7))))
-
-;iht line ==
-;-- issue a single hyperteTeX line, or a group of lines
-;  $newPage => nil
-;  CONSP line =>
-;    $htLineList := NCONC(nreverse mapStringize COPY_-LIST line, $htLineList)
-;  $htLineList := [basicStringize line, :$htLineList]
-
-(DEFUN |iht| (|line|)
-  (declare (special |$htLineList| |$newPage|))
-  (COND
-    (|$newPage| NIL)
-    ((CONSP |line|)
-     (SPADLET |$htLineList|
-              (NCONC (NREVERSE (|mapStringize| (COPY-LIST |line|)))
-                     |$htLineList|)))
-    ('T
-     (SPADLET |$htLineList|
-              (CONS (|basicStringize| |line|) |$htLineList|)))))
-
-;bcHt line ==
-;--line = '"\##1" => harharhar()
-;  iht line
-;  CONSP line =>
-;    if $newPage then htpAddToPageDescription($curPage, [['text, :line]])
-;  if $newPage then htpAddToPageDescription($curPage, [['text, line]])
-
-(DEFUN |bcHt| (|line|)
-  (declare (special |$curPage| |$newPage|))
-  (PROGN
-    (|iht| |line|)
-    (COND
-      ((CONSP |line|)
-       (COND
-         (|$newPage|
-             (|htpAddToPageDescription| |$curPage|
-                 (CONS (CONS '|text| |line|) NIL)))
-         ('T NIL)))
-      (|$newPage|
-          (|htpAddToPageDescription| |$curPage|
-              (CONS (CONS '|text| (CONS |line| NIL)) NIL)))
-      ('T NIL))))
-
-;bcIssueHt line ==
-;  CONSP line => htMakePage1 line
-;  iht line
-
-(DEFUN |bcIssueHt| (|line|)
-  (COND ((CONSP |line|) (|htMakePage1| |line|)) ('T (|iht| |line|))))
-
-;mapStringize l ==
-;  ATOM l => l
-;  RPLACA(l, basicStringize CAR l)
-;  RPLACD(l, mapStringize CDR l)
-;  l
-
-(DEFUN |mapStringize| (|l|)
-  (COND
-    ((ATOM |l|) |l|)
-    ('T (RPLACA |l| (|basicStringize| (CAR |l|)))
-     (RPLACD |l| (|mapStringize| (CDR |l|))) |l|)))
-
-;basicStringize s ==
-;  STRINGP s =>
-;    s = '"\$"      => '"\%"
-;    s = '"{\em $}" => '"{\em \%}"
-;    s
-;  s = '_$ => '"\%"
-;  PRINC_-TO_-STRING s
-
-(DEFUN |basicStringize| (|s|)
-  (COND
-    ((STRINGP |s|)
-     (COND
-       ((BOOT-EQUAL |s| "\\$") "\\%")
-       ((BOOT-EQUAL |s| "{\\em $}")
-        "{\\em \\%}")
-       ('T |s|)))
-    ((BOOT-EQUAL |s| '$) "\\%")
-    ('T (PRINC-TO-STRING |s|))))
-
-;stringize s ==
-;  STRINGP s => s
-;  PRINC_-TO_-STRING s
-
-(DEFUN |stringize| (|s|)
-  (COND ((STRINGP |s|) |s|) ('T (PRINC-TO-STRING |s|))))
-
-;htInitPage(title, propList) ==
-;----------------------------> OBSELETE---cannot return $curPage
-;-- start defining a hyperTeX page
-;  htInitPageNoScroll(propList, title)
-;  htSayStandard '"\beginscroll "
-;  $curPage
-
-(DEFUN |htInitPage| (|title| |propList|)
-  (declare (special |$curPage|))
-  (PROGN
-    (|htInitPageNoScroll| |propList| |title|)
-    (|htSayStandard| "\\beginscroll ")
-    |$curPage|))
-
-;--htInitPageNoHeading(propList) ==
-;-----------------------> replaced by htInitPageNoScroll
-;-- start defining a hyperTeX page
-;--  $curPage := htpMakeEmptyPage(propList)
-;--  if $saturn then $saturnPage := htpMakeEmptyPage(propList)
-;--  $newPage := true
-;--  $htLineList := nil
-;--  $curPage
-;htAddHeading(title) ==
-;------------------------> OBSELETE
-;  htNewPage title
-;  $curPage
-
-(DEFUN |htAddHeading| (|title|)
-  (declare (special |$curPage|))
-  (PROGN (|htNewPage| |title|) |$curPage|))
-
-;htShowPage() ==
-;-- show the page which has been computed
-;  htSayStandard '"\endscroll"
-;  htShowPageNoScroll()
-
-(DEFUN |htShowPage| ()
-  (PROGN
-    (|htSayStandard| "\\endscroll")
-    (|htShowPageNoScroll|)))
-
-;htShowPageNoScroll() ==
-;------------------------> OBSELETE
-;-- show the page which has been computed
-;  htSayStandard '"\autobuttons"
-;  htpSetPageDescription($curPage, nreverse htpPageDescription $curPage)
-;  $newPage := false
-;  $htLineList := nil
-;  htMakePage htpPageDescription $curPage
-;  line := APPLY(function CONCAT, nreverse $htLineList)
-;  issueHT line
-;  endHTPage()
-
-(DEFUN |htShowPageNoScroll| ()
-  (PROG (|line|)
-  (declare (special |$htLineList| |$curPage| |$newPage|))
-    (RETURN
-      (PROGN
-        (|htSayStandard| "\\autobuttons")
-        (|htpSetPageDescription| |$curPage|
-            (NREVERSE (|htpPageDescription| |$curPage|)))
-        (SPADLET |$newPage| NIL)
-        (SPADLET |$htLineList| NIL)
-        (|htMakePage| (|htpPageDescription| |$curPage|))
-        (SPADLET |line| (APPLY (|function| CONCAT) (NREVERSE |$htLineList|)))
-        (|issueHT| |line|)
-        (|endHTPage|)))))
-
-;htMakePage itemList ==
-;------------------------> OBSELETE
-;-- make a page given the description in itemList
-;  if $newPage then htpAddToPageDescription($curPage, itemList)
-;  htMakePage1 itemList
-
-(DEFUN |htMakePage| (|itemList|)
-  (declare (special |$curPage| |$newPage|))
-  (PROGN
-    (COND
-      (|$newPage| (|htpAddToPageDescription| |$curPage| |itemList|)))
-    (|htMakePage1| |itemList|)))
-
-;htMakePage1 itemList ==
-;-- make a page given the description in itemList
-;  for [itemType, :items] in itemList repeat
-;    itemType = 'text              => iht items
-;    itemType = 'lispLinks         => htLispLinks items
-;    itemType = 'lispmemoLinks     => htLispMemoLinks items
-;    itemType = 'bcLinks           => htBcLinks items               --->
-;    itemType = 'bcLinksNS         => htBcLinks(items,true)
-;    itemType = 'bcLispLinks       => htBcLispLinks items           --->
-;    itemType = 'radioButtons      => htRadioButtons items
-;    itemType = 'bcRadioButtons    => htBcRadioButtons items
-;    itemType = 'inputStrings      => htInputStrings items
-;    itemType = 'domainConditions  => htProcessDomainConditions items
-;    itemType = 'bcStrings         => htProcessBcStrings items
-;    itemType = 'toggleButtons     => htProcessToggleButtons items
-;    itemType = 'bcButtons         => htProcessBcButtons items
-;    itemType = 'doneButton        => htProcessDoneButton items
-;    itemType = 'doitButton        => htProcessDoitButton items
-;    systemError ['"unknown itemType", itemType]
-
-(DEFUN |htMakePage1| (|itemList|)
-  (PROG (|itemType| |items|)
-    (RETURN
-      (SEQ (DO ((G166261 |itemList| (CDR G166261)) (G166253 NIL))
-               ((OR (ATOM G166261)
-                    (PROGN (SETQ G166253 (CAR G166261)) NIL)
-                    (PROGN
-                      (PROGN
-                        (SPADLET |itemType| (CAR G166253))
-                        (SPADLET |items| (CDR G166253))
-                        G166253)
-                      NIL))
-                NIL)
-             (SEQ (EXIT (COND
-                          ((BOOT-EQUAL |itemType| '|text|)
-                           (|iht| |items|))
-                          ((BOOT-EQUAL |itemType| '|lispLinks|)
-                           (|htLispLinks| |items|))
-                          ((BOOT-EQUAL |itemType| '|lispmemoLinks|)
-                           (|htLispMemoLinks| |items|))
-                          ((BOOT-EQUAL |itemType| '|bcLinks|)
-                           (|htBcLinks| |items|))
-                          ((BOOT-EQUAL |itemType| '|bcLinksNS|)
-                           (|htBcLinks| |items| 'T))
-                          ((BOOT-EQUAL |itemType| '|bcLispLinks|)
-                           (|htBcLispLinks| |items|))
-                          ((BOOT-EQUAL |itemType| '|radioButtons|)
-                           (|htRadioButtons| |items|))
-                          ((BOOT-EQUAL |itemType| '|bcRadioButtons|)
-                           (|htBcRadioButtons| |items|))
-                          ((BOOT-EQUAL |itemType| '|inputStrings|)
-                           (|htInputStrings| |items|))
-                          ((BOOT-EQUAL |itemType| '|domainConditions|)
-                           (|htProcessDomainConditions| |items|))
-                          ((BOOT-EQUAL |itemType| '|bcStrings|)
-                           (|htProcessBcStrings| |items|))
-                          ((BOOT-EQUAL |itemType| '|toggleButtons|)
-                           (|htProcessToggleButtons| |items|))
-                          ((BOOT-EQUAL |itemType| '|bcButtons|)
-                           (|htProcessBcButtons| |items|))
-                          ((BOOT-EQUAL |itemType| '|doneButton|)
-                           (|htProcessDoneButton| |items|))
-                          ((BOOT-EQUAL |itemType| '|doitButton|)
-                           (|htProcessDoitButton| |items|))
-                          ('T
-                           (|systemError|
-                               (CONS "unknown itemType"
-                                     (CONS |itemType| NIL))))))))))))
-
-;htMakeErrorPage htPage ==
-;------------------> OBSELETE
-;  $newPage := false
-;  $htLineList := nil
-;  $curPage := htPage
-;  htMakePage htpPageDescription htPage
-;  line := APPLY(function CONCAT, nreverse $htLineList)
-;  issueHT line
-;  endHTPage()
-
-(DEFUN |htMakeErrorPage| (|htPage|)
-  (PROG (|line|)
-  (declare (special |$curPage| |$htLineList| |$newPage|))
-    (RETURN
-      (PROGN
-        (SPADLET |$newPage| NIL)
-        (SPADLET |$htLineList| NIL)
-        (SPADLET |$curPage| |htPage|)
-        (|htMakePage| (|htpPageDescription| |htPage|))
-        (SPADLET |line| (APPLY (|function| CONCAT) (NREVERSE |$htLineList|)))
-        (|issueHT| |line|)
-        (|endHTPage|)))))
-
-;htQuote s ==
-;-- wrap quotes around a piece of hyperTeX
-;  iht '"_""
-;  iht s
-;  iht '"_""
-
-(DEFUN |htQuote| (|s|)
-  (PROGN
-    (|iht| "\"")
-    (|iht| |s|)
-    (|iht| "\"")))
-
-;htProcessToggleButtons buttons ==
-;  iht '"\newline\indent{5}\beginitems "
-;  for [message, info, defaultValue, buttonName] in buttons repeat
-;    if NULL LASSOC(buttonName, htpInputAreaAlist $curPage) then
-;      setUpDefault(buttonName, ['button, defaultValue])
-;    iht ['"\item{\em\inputbox[", htpLabelDefault($curPage, buttonName), '"]{",
-;         buttonName, '"}{\htbmfile{pick}}{\htbmfile{unpick}}\space{}"]
-;    bcIssueHt message
-;    iht '"\space{}}"
-;    bcIssueHt info
-;  iht '"\enditems\indent{0} "
-
-(DEFUN |htProcessToggleButtons| (|buttons|)
-  (PROG (|message| |info| |defaultValue| |buttonName|)
-  (declare (special |$curPage|))
-    (RETURN
-      (SEQ (PROGN
-             (|iht| "\\newline\\indent{5}\\beginitems ")
-             (DO ((G166302 |buttons| (CDR G166302))
-                  (G166286 NIL))
-                 ((OR (ATOM G166302)
-                      (PROGN (SETQ G166286 (CAR G166302)) NIL)
-                      (PROGN
-                        (PROGN
-                          (SPADLET |message| (CAR G166286))
-                          (SPADLET |info| (CADR G166286))
-                          (SPADLET |defaultValue| (CADDR G166286))
-                          (SPADLET |buttonName| (CADDDR G166286))
-                          G166286)
-                        NIL))
-                  NIL)
-               (SEQ (EXIT (PROGN
-                            (COND
-                              ((NULL (LASSOC |buttonName|
-                                      (|htpInputAreaAlist| |$curPage|)))
-                               (|setUpDefault| |buttonName|
-                                   (CONS '|button|
-                                    (CONS |defaultValue| NIL)))))
-                            (|iht| (CONS
-                                                                         "\\item{\\em\\inputbox["
-                                    (CONS
-                                     (|htpLabelDefault| |$curPage|
-                                      |buttonName|)
-                                     (CONS "]{"
-                                      (CONS |buttonName|
-                                       (CONS
-                                                                    "}{\\htbmfile{pick}}{\\htbmfile{unpick}}\\space{}"
-                                        NIL))))))
-                            (|bcIssueHt| |message|)
-                            (|iht| "\\space{}}")
-                            (|bcIssueHt| |info|)))))
-             (|iht| "\\enditems\\indent{0} "))))))
-
-;htProcessBcButtons buttons ==
-;  for [defaultValue, buttonName] in buttons repeat
-;    if NULL LASSOC(buttonName, htpInputAreaAlist $curPage) then
-;      setUpDefault(buttonName, ['button, defaultValue])
-;    k := htpLabelDefault($curPage,buttonName)
-;    k = 0 => iht ['"\off{",buttonName,'"}"]
-;    k = 1 => iht ['"\on{", buttonName,'"}"]
-;    iht ['"\inputbox[", htpLabelDefault($curPage, buttonName), '"]{",
-;         buttonName, '"}{\htbmfile{pick}}{\htbmfile{unpick}}"]
-
-(DEFUN |htProcessBcButtons| (|buttons|)
-  (PROG (|defaultValue| |buttonName| |k|)
-  (declare (special |$curPage|))
-    (RETURN
-      (SEQ (DO ((G166328 |buttons| (CDR G166328)) (G166317 NIL))
-               ((OR (ATOM G166328)
-                    (PROGN (SETQ G166317 (CAR G166328)) NIL)
-                    (PROGN
-                      (PROGN
-                        (SPADLET |defaultValue| (CAR G166317))
-                        (SPADLET |buttonName| (CADR G166317))
-                        G166317)
-                      NIL))
-                NIL)
-             (SEQ (EXIT (PROGN
-                          (COND
-                            ((NULL (LASSOC |buttonName|
-                                    (|htpInputAreaAlist| |$curPage|)))
-                             (|setUpDefault| |buttonName|
-                                 (CONS '|button|
-                                       (CONS |defaultValue| NIL)))))
-                          (SPADLET |k|
-                                   (|htpLabelDefault| |$curPage|
-                                    |buttonName|))
-                          (COND
-                            ((EQL |k| 0)
-                             (|iht| (CONS "\\off{"
-                                     (CONS |buttonName|
-                                      (CONS "}" NIL)))))
-                            ((EQL |k| 1)
-                             (|iht| (CONS "\\on{"
-                                     (CONS |buttonName|
-                                      (CONS "}" NIL)))))
-                            ('T
-                             (|iht| (CONS "\\inputbox["
-                                     (CONS
-                                      (|htpLabelDefault| |$curPage|
-                                       |buttonName|)
-                                      (CONS "]{"
-                                       (CONS |buttonName|
-                                        (CONS
-                                                                              "}{\\htbmfile{pick}}{\\htbmfile{unpick}}"
-                                         NIL))))))))))))))))
-
-;htProcessBcStrings strings ==
-;---------------------> OBSELETE <------------------------
-;  for [numChars, default, stringName, spadType, :filter] in strings repeat
-;    mess2 := '""
-;    if NULL LASSOC(stringName, htpInputAreaAlist $curPage) then
-;      setUpDefault(stringName, ['string, default, spadType, filter])
-;    if htpLabelErrorMsg($curPage, stringName) then
-;      iht ['"\centerline{{\em ", htpLabelErrorMsg($curPage, stringName), '"}}"]
-;      mess2 := CONCAT(mess2, bcSadFaces())
-;      htpSetLabelErrorMsg($curPage, stringName, nil)
-;    iht ['"\inputstring{", stringName, '"}{",
-;         numChars, '"}{", htpLabelDefault($curPage,stringName), '"} ", mess2]
-
-(DEFUN |htProcessBcStrings| (|strings|)
-  (PROG (|numChars| |default| |stringName| |spadType| |filter| |mess2|)
-  (declare (special |$curPage|))
-    (RETURN
-      (SEQ (DO ((G166358 |strings| (CDR G166358)) (G166343 NIL))
-               ((OR (ATOM G166358)
-                    (PROGN (SETQ G166343 (CAR G166358)) NIL)
-                    (PROGN
-                      (PROGN
-                        (SPADLET |numChars| (CAR G166343))
-                        (SPADLET |default| (CADR G166343))
-                        (SPADLET |stringName| (CADDR G166343))
-                        (SPADLET |spadType| (CADDDR G166343))
-                        (SPADLET |filter| (CDDDDR G166343))
-                        G166343)
-                      NIL))
-                NIL)
-             (SEQ (EXIT (PROGN
-                          (SPADLET |mess2| "")
-                          (COND
-                            ((NULL (LASSOC |stringName|
-                                    (|htpInputAreaAlist| |$curPage|)))
-                             (|setUpDefault| |stringName|
-                                 (CONS '|string|
-                                       (CONS |default|
-                                        (CONS |spadType|
-                                         (CONS |filter| NIL)))))))
-                          (COND
-                            ((|htpLabelErrorMsg| |$curPage|
-                                 |stringName|)
-                             (|iht| (CONS
-                                     "\\centerline{{\\em "
-                                     (CONS
-                                      (|htpLabelErrorMsg| |$curPage|
-                                       |stringName|)
-                                      (CONS "}}" NIL))))
-                             (SPADLET |mess2|
-                                      (CONCAT |mess2| (|bcSadFaces|)))
-                             (|htpSetLabelErrorMsg| |$curPage|
-                                 |stringName| NIL)))
-                          (|iht| (CONS "\\inputstring{"
-                                       (CONS |stringName|
-                                        (CONS "}{"
-                                         (CONS |numChars|
-                                          (CONS "}{"
-                                           (CONS
-                                            (|htpLabelDefault|
-                                             |$curPage| |stringName|)
-                                            (CONS "} "
-                                             (CONS |mess2| NIL)))))))))))))))))
-
-;bcSadFaces() ==
-;  '"\space{1}{\em\htbitmap{error}\htbitmap{error}\htbitmap{error}}"
-
-(DEFUN |bcSadFaces| ()
-        "\\space{1}{\\em\\htbitmap{error}\\htbitmap{error}\\htbitmap{error}}")
-
-;htLispLinks(links,:option) ==
-;  [links,options] := beforeAfter('options,links)
-;  indent := LASSOC('indent,options) or 5
-;  iht '"\newline\indent{"
-;  iht stringize indent
-;  iht '"}\beginitems"
-;  for [message, info, func, :value] in links repeat
-;    iht '"\item["
-;    call := (IFCAR option => '"\lispmemolink"; '"\lispdownlink")
-;    htMakeButton(call,message, mkCurryFun(func, value))
-;    iht ['"]\space{}"]
-;    bcIssueHt info
-;  iht '"\enditems\indent{0} "
-
-(DEFUN |htLispLinks| (&REST G166422 &AUX |option| |links|)
-  (DSETQ (|links| . |option|) G166422)
-  (PROG (|LETTMP#1| |options| |indent| |message| |info| |func| |value|
-            |call|)
-    (RETURN
-      (SEQ (PROGN
-             (SPADLET |LETTMP#1| (|beforeAfter| '|options| |links|))
-             (SPADLET |links| (CAR |LETTMP#1|))
-             (SPADLET |options| (CADR |LETTMP#1|))
-             (SPADLET |indent| (OR (LASSOC '|indent| |options|) 5))
-             (|iht| "\\newline\\indent{")
-             (|iht| (|stringize| |indent|))
-             (|iht| "}\\beginitems")
-             (DO ((G166403 |links| (CDR G166403)) (G166387 NIL))
-                 ((OR (ATOM G166403)
-                      (PROGN (SETQ G166387 (CAR G166403)) NIL)
-                      (PROGN
-                        (PROGN
-                          (SPADLET |message| (CAR G166387))
-                          (SPADLET |info| (CADR G166387))
-                          (SPADLET |func| (CADDR G166387))
-                          (SPADLET |value| (CDDDR G166387))
-                          G166387)
-                        NIL))
-                  NIL)
-               (SEQ (EXIT (PROGN
-                            (|iht| "\\item[")
-                            (SPADLET |call|
-                                     (COND
-                                       ((IFCAR |option|)
-                                        "\\lispmemolink")
-                                       ('T
-                                        "\\lispdownlink")))
-                            (|htMakeButton| |call| |message|
-                                (|mkCurryFun| |func| |value|))
-                            (|iht| (CONS "]\\space{}" NIL))
-                            (|bcIssueHt| |info|)))))
-             (|iht| "\\enditems\\indent{0} "))))))
-
-;htLispMemoLinks(links) == htLispLinks(links,true)
-
-(DEFUN |htLispMemoLinks| (|links|) (|htLispLinks| |links| 'T))
-
-;htBcLinks(links,:options) ==
-;-------------------------> OBSELETE
-;  skipStateInfo? := IFCAR options
-;  [links,options] := beforeAfter('options,links)
-;  for [message, info, func, :value] in links repeat
-;    htMakeButton('"\lispdownlink",message,
-;                   mkCurryFun(func, value),skipStateInfo?)
-;    bcIssueHt info
-
-(DEFUN |htBcLinks| (&REST G166465 &AUX |options| |links|)
-  (DSETQ (|links| . |options|) G166465)
-  (PROG (|skipStateInfo?| |LETTMP#1| |message| |info| |func| |value|)
-    (RETURN
-      (SEQ (PROGN
-             (SPADLET |skipStateInfo?| (IFCAR |options|))
-             (SPADLET |LETTMP#1| (|beforeAfter| '|options| |links|))
-             (SPADLET |links| (CAR |LETTMP#1|))
-             (SPADLET |options| (CADR |LETTMP#1|))
-             (DO ((G166447 |links| (CDR G166447)) (G166434 NIL))
-                 ((OR (ATOM G166447)
-                      (PROGN (SETQ G166434 (CAR G166447)) NIL)
-                      (PROGN
-                        (PROGN
-                          (SPADLET |message| (CAR G166434))
-                          (SPADLET |info| (CADR G166434))
-                          (SPADLET |func| (CADDR G166434))
-                          (SPADLET |value| (CDDDR G166434))
-                          G166434)
-                        NIL))
-                  NIL)
-               (SEQ (EXIT (PROGN
-                            (|htMakeButton|
-                                "\\lispdownlink" |message|
-                                (|mkCurryFun| |func| |value|)
-                                |skipStateInfo?|)
-                            (|bcIssueHt| |info|))))))))))
-
-;htBcLispLinks links ==
-;-------------------------> OBSELETE
-;  [links,options] := beforeAfter('options,links)
-;  for [message, info, func, :value] in links repeat
-;    htMakeButton('"\lisplink",message, mkCurryFun(func, value))
-;    bcIssueHt info
-
-(DEFUN |htBcLispLinks| (|links|)
-  (PROG (|LETTMP#1| |options| |message| |info| |func| |value|)
-    (RETURN
-      (SEQ (PROGN
-             (SPADLET |LETTMP#1| (|beforeAfter| '|options| |links|))
-             (SPADLET |links| (CAR |LETTMP#1|))
-             (SPADLET |options| (CADR |LETTMP#1|))
-             (DO ((G166487 |links| (CDR G166487)) (G166474 NIL))
-                 ((OR (ATOM G166487)
-                      (PROGN (SETQ G166474 (CAR G166487)) NIL)
-                      (PROGN
-                        (PROGN
-                          (SPADLET |message| (CAR G166474))
-                          (SPADLET |info| (CADR G166474))
-                          (SPADLET |func| (CADDR G166474))
-                          (SPADLET |value| (CDDDR G166474))
-                          G166474)
-                        NIL))
-                  NIL)
-               (SEQ (EXIT (PROGN
-                            (|htMakeButton| "\\lisplink"
-                                |message|
-                                (|mkCurryFun| |func| |value|))
-                            (|bcIssueHt| |info|))))))))))
-
-;beforeAfter(x,u) == [[y for [y,:r] in tails u while x ^= y],r]
-
-(DEFUN |beforeAfter| (|x| |u|)
-  (PROG (|y| |r|)
-    (RETURN
-      (SEQ (CONS (PROG (G166514)
-                   (SPADLET G166514 NIL)
-                   (RETURN
-                     (DO ((G166504 |u| (CDR G166504)))
-                         ((OR (ATOM G166504)
-                              (PROGN
-                                (PROGN
-                                  (SPADLET |y| (CAR G166504))
-                                  (SPADLET |r| (CDR G166504))
-                                  G166504)
-                                NIL)
-                              (NULL (NEQUAL |x| |y|)))
-                          (NREVERSE0 G166514))
-                       (SEQ (EXIT (SETQ G166514 (CONS |y| G166514)))))))
-                 (CONS |r| NIL))))))
-
-;mkCurryFun(fun, val) ==
-;  name := GENTEMP()
-;  code :=
-;    ['DEFUN, name, '(arg), ['APPLY, MKQ fun, ['CONS, 'arg, MKQ val]]]
-;  EVAL code
-;  name
-
-(DEFUN |mkCurryFun| (|fun| |val|)
-  (PROG (|name| |code|)
-    (RETURN
-      (PROGN
-        (SPADLET |name| (GENTEMP))
-        (SPADLET |code|
-                 (CONS 'DEFUN
-                       (CONS |name|
-                             (CONS '(|arg|)
-                                   (CONS
-                                    (CONS 'APPLY
-                                     (CONS (MKQ |fun|)
-                                      (CONS
-                                       (CONS 'CONS
-                                        (CONS '|arg|
-                                         (CONS (MKQ |val|) NIL)))
-                                       NIL)))
-                                    NIL)))))
-        (EVAL |code|)
-        |name|))))
-
-;htRadioButtons [groupName, :buttons] ==
-;  htpSetRadioButtonAlist($curPage, [[groupName, :buttonNames buttons],
-;                                    : htpRadioButtonAlist $curPage])
-;  boxesName := GENTEMP()
-;  iht ['"\newline\indent{5}\radioboxes{", boxesName,
-;     '"}{\htbmfile{pick}}{\htbmfile{unpick}}\beginitems "]
-;  defaultValue := '"1"
-;  for [message, info, buttonName] in buttons repeat
-;    if NULL LASSOC(buttonName, htpInputAreaAlist $curPage) then
-;      setUpDefault(buttonName, ['button, defaultValue])
-;      defaultValue := '"0"
-;    iht ['"\item{\em\radiobox[", htpLabelDefault($curPage, buttonName), '"]{",
-;         buttonName, '"}{",boxesName, '"}\space{}"]
-;    bcIssueHt message
-;    iht '"\space{}}"
-;    bcIssueHt info
-;  iht '"\enditems\indent{0} "
-
-(DEFUN |htRadioButtons| (G166546)
-  (PROG (|groupName| |buttons| |boxesName| |message| |info|
-            |buttonName| |defaultValue|)
-  (declare (special |$curPage|))
-    (RETURN
-      (SEQ (PROGN
-             (SPADLET |groupName| (CAR G166546))
-             (SPADLET |buttons| (CDR G166546))
-             (|htpSetRadioButtonAlist| |$curPage|
-                 (CONS (CONS |groupName| (|buttonNames| |buttons|))
-                       (|htpRadioButtonAlist| |$curPage|)))
-             (SPADLET |boxesName| (GENTEMP))
-             (|iht| (CONS                               "\\newline\\indent{5}\\radioboxes{"
-                          (CONS |boxesName|
-                                (CONS                         "}{\\htbmfile{pick}}{\\htbmfile{unpick}}\\beginitems "
-                                      NIL))))
-             (SPADLET |defaultValue| "1")
-             (DO ((G166568 |buttons| (CDR G166568))
-                  (G166540 NIL))
-                 ((OR (ATOM G166568)
-                      (PROGN (SETQ G166540 (CAR G166568)) NIL)
-                      (PROGN
-                        (PROGN
-                          (SPADLET |message| (CAR G166540))
-                          (SPADLET |info| (CADR G166540))
-                          (SPADLET |buttonName| (CADDR G166540))
-                          G166540)
-                        NIL))
-                  NIL)
-               (SEQ (EXIT (PROGN
-                            (COND
-                              ((NULL (LASSOC |buttonName|
-                                      (|htpInputAreaAlist| |$curPage|)))
-                               (|setUpDefault| |buttonName|
-                                   (CONS '|button|
-                                    (CONS |defaultValue| NIL)))
-                               (SPADLET |defaultValue|
-                                        "0")))
-                            (|iht| (CONS
-                                                                         "\\item{\\em\\radiobox["
-                                    (CONS
-                                     (|htpLabelDefault| |$curPage|
-                                      |buttonName|)
-                                     (CONS "]{"
-                                      (CONS |buttonName|
-                                       (CONS "}{"
-                                        (CONS |boxesName|
-                                         (CONS
-                                          "}\\space{}"
-                                          NIL))))))))
-                            (|bcIssueHt| |message|)
-                            (|iht| "\\space{}}")
-                            (|bcIssueHt| |info|)))))
-             (|iht| "\\enditems\\indent{0} "))))))
-
-;htBcRadioButtons [groupName, :buttons] ==
-;  htpSetRadioButtonAlist($curPage, [[groupName, :buttonNames buttons],
-;                                    : htpRadioButtonAlist $curPage])
-;  boxesName := GENTEMP()
-;  iht ['"\radioboxes{", boxesName,
-;     '"}{\htbmfile{pick}}{\htbmfile{unpick}} "]
-;  defaultValue := '"1"
-;  for [message, info, buttonName] in buttons repeat
-;    if NULL LASSOC(buttonName, htpInputAreaAlist $curPage) then
-;      setUpDefault(buttonName, ['button, defaultValue])
-;      defaultValue := '"0"
-;    iht ['"{\em\radiobox[", htpLabelDefault($curPage, buttonName), '"]{",
-;         buttonName, '"}{",boxesName, '"}"]
-;    bcIssueHt message
-;    iht '"\space{}}"
-;    bcIssueHt info
-
-(DEFUN |htBcRadioButtons| (G166594)
-  (PROG (|groupName| |buttons| |boxesName| |message| |info|
-            |buttonName| |defaultValue|)
-  (declare (special |$curPage|))
-    (RETURN
-      (SEQ (PROGN
-             (SPADLET |groupName| (CAR G166594))
-             (SPADLET |buttons| (CDR G166594))
-             (|htpSetRadioButtonAlist| |$curPage|
-                 (CONS (CONS |groupName| (|buttonNames| |buttons|))
-                       (|htpRadioButtonAlist| |$curPage|)))
-             (SPADLET |boxesName| (GENTEMP))
-             (|iht| (CONS "\\radioboxes{"
-                          (CONS |boxesName|
-                                (CONS                                     "}{\\htbmfile{pick}}{\\htbmfile{unpick}} "
-                                      NIL))))
-             (SPADLET |defaultValue| "1")
-             (DO ((G166616 |buttons| (CDR G166616))
-                  (G166588 NIL))
-                 ((OR (ATOM G166616)
-                      (PROGN (SETQ G166588 (CAR G166616)) NIL)
-                      (PROGN
-                        (PROGN
-                          (SPADLET |message| (CAR G166588))
-                          (SPADLET |info| (CADR G166588))
-                          (SPADLET |buttonName| (CADDR G166588))
-                          G166588)
-                        NIL))
-                  NIL)
-               (SEQ (EXIT (PROGN
-                            (COND
-                              ((NULL (LASSOC |buttonName|
-                                      (|htpInputAreaAlist| |$curPage|)))
-                               (|setUpDefault| |buttonName|
-                                   (CONS '|button|
-                                    (CONS |defaultValue| NIL)))
-                               (SPADLET |defaultValue|
-                                        "0")))
-                            (|iht| (CONS
-                                    "{\\em\\radiobox["
-                                    (CONS
-                                     (|htpLabelDefault| |$curPage|
-                                      |buttonName|)
-                                     (CONS "]{"
-                                      (CONS |buttonName|
-                                       (CONS "}{"
-                                        (CONS |boxesName|
-                                         (CONS "}" NIL))))))))
-                            (|bcIssueHt| |message|)
-                            (|iht| "\\space{}}")
-                            (|bcIssueHt| |info|))))))))))
-
-;setUpDefault(name, props) ==
-;---------------> OBSELETE <----------------
-;  htpAddInputAreaProp($curPage, name, props)
-
-(DEFUN |setUpDefault| (|name| |props|)
-  (declare (special |$curPage|))
-  (|htpAddInputAreaProp| |$curPage| |name| |props|))
-
-;buttonNames buttons ==
-;  [buttonName for [.,., buttonName] in buttons]
-
-(DEFUN |buttonNames| (|buttons|)
-  (PROG (|buttonName|)
-    (RETURN
-      (SEQ (PROG (G166645)
-             (SPADLET G166645 NIL)
-             (RETURN
-               (DO ((G166651 |buttons| (CDR G166651))
-                    (G166637 NIL))
-                   ((OR (ATOM G166651)
-                        (PROGN (SETQ G166637 (CAR G166651)) NIL)
-                        (PROGN
-                          (PROGN
-                            (SPADLET |buttonName| (CADDR G166637))
-                            G166637)
-                          NIL))
-                    (NREVERSE0 G166645))
-                 (SEQ (EXIT (SETQ G166645
-                                  (CONS |buttonName| G166645)))))))))))
-
-;htInputStrings strings ==
-;  iht '"\newline\indent{5}\beginitems "
-;  for [mess1, mess2, numChars, default, stringName, spadType, :filter]
-;   in strings repeat
-;    if NULL LASSOC(stringName, htpInputAreaAlist $curPage) then
-;      setUpDefault(stringName, ['string, default, spadType, filter])
-;    if htpLabelErrorMsg($curPage, stringName) then
-;      iht ['"\centerline{{\em ", htpLabelErrorMsg($curPage, stringName), '"}}"]
-;      mess2 := CONCAT(mess2, bcSadFaces())
-;      htpSetLabelErrorMsg($curPage, stringName, nil)
-;    iht '"\item "
-;    bcIssueHt mess1
-;    iht ['"\inputstring{", stringName, '"}{",
-;         numChars, '"}{", htpLabelDefault($curPage,stringName), '"} "]
-;    bcIssueHt mess2
-;  iht '"\enditems\indent{0}\newline "
-
-(DEFUN |htInputStrings| (|strings|)
-  (PROG (|mess1| |numChars| |default| |stringName| |spadType| |filter| |mess2|)
-  (declare (special |$curPage|))
-    (RETURN
-      (SEQ (PROGN
-             (|iht| "\\newline\\indent{5}\\beginitems ")
-             (DO ((G166685 |strings| (CDR G166685))
-                  (G166665 NIL))
-                 ((OR (ATOM G166685)
-                      (PROGN (SETQ G166665 (CAR G166685)) NIL)
-                      (PROGN
-                        (PROGN
-                          (SPADLET |mess1| (CAR G166665))
-                          (SPADLET |mess2| (CADR G166665))
-                          (SPADLET |numChars| (CADDR G166665))
-                          (SPADLET |default| (CADDDR G166665))
-                          (SPADLET |stringName|
-                                   (CAR (CDDDDR G166665)))
-                          (SPADLET |spadType|
-                                   (CADR (CDDDDR G166665)))
-                          (SPADLET |filter| (CDDR (CDDDDR G166665)))
-                          G166665)
-                        NIL))
-                  NIL)
-               (SEQ (EXIT (PROGN
-                            (COND
-                              ((NULL (LASSOC |stringName|
-                                      (|htpInputAreaAlist| |$curPage|)))
-                               (|setUpDefault| |stringName|
-                                   (CONS '|string|
-                                    (CONS |default|
-                                     (CONS |spadType|
-                                      (CONS |filter| NIL)))))))
-                            (COND
-                              ((|htpLabelErrorMsg| |$curPage|
-                                   |stringName|)
-                               (|iht| (CONS
-                                                                               "\\centerline{{\\em "
-                                       (CONS
-                                        (|htpLabelErrorMsg| |$curPage|
-                                         |stringName|)
-                                        (CONS "}}" NIL))))
-                               (SPADLET |mess2|
-                                        (CONCAT |mess2| (|bcSadFaces|)))
-                               (|htpSetLabelErrorMsg| |$curPage|
-                                   |stringName| NIL)))
-                            (|iht| "\\item ")
-                            (|bcIssueHt| |mess1|)
-                            (|iht| (CONS "\\inputstring{"
-                                    (CONS |stringName|
-                                     (CONS "}{"
-                                      (CONS |numChars|
-                                       (CONS "}{"
-                                        (CONS
-                                         (|htpLabelDefault| |$curPage|
-                                          |stringName|)
-                                         (CONS "} " NIL))))))))
-                            (|bcIssueHt| |mess2|)))))
-             (|iht| "\\enditems\\indent{0}\\newline "))))))
-
-;htProcessDomainConditions condList ==
-;  htpSetDomainConditions($curPage, renamePatternVariables condList)
-;  htpSetDomainVariableAlist($curPage, computeDomainVariableAlist())
-
-(DEFUN |htProcessDomainConditions| (|condList|)
-  (declare (special |$curPage|))
-  (PROGN
-    (|htpSetDomainConditions| |$curPage|
-        (|renamePatternVariables| |condList|))
-    (|htpSetDomainVariableAlist| |$curPage|
-        (|computeDomainVariableAlist|))))
-
-;renamePatternVariables condList ==
-;  htpSetDomainPvarSubstList($curPage,
-;    renamePatternVariables1(condList, nil, $PatternVariableList))
-;  substFromAlist(condList, htpDomainPvarSubstList $curPage)
-
-(DEFUN |renamePatternVariables| (|condList|)
-  (declare (special |$curPage| |$PatternVariableList|))
-  (PROGN
-    (|htpSetDomainPvarSubstList| |$curPage|
-        (|renamePatternVariables1| |condList| NIL
-            |$PatternVariableList|))
-    (|substFromAlist| |condList| (|htpDomainPvarSubstList| |$curPage|))))
-
-;renamePatternVariables1(condList, substList, patVars) ==
-;  null condList => substList
-;  [cond, :restConds] := condList
-;  cond is ['isDomain, pv, pattern] or cond is ['ofCategory, pv, pattern]
-;    or cond is ['Satisfies, pv, cond] =>
-;      if pv = $EmptyMode then nsubst := substList
-;      else nsubst := [[pv, :car patVars], :substList]
-;      renamePatternVariables1(restConds, nsubst, rest patVars)
-;  substList
-
-(DEFUN |renamePatternVariables1| (|condList| |substList| |patVars|)
-  (PROG (|restConds| |pattern| |ISTMP#1| |pv| |ISTMP#2| |cond| |nsubst|)
-  (declare (special |$EmptyMode|))
-    (RETURN
-      (COND
-        ((NULL |condList|) |substList|)
-        ('T (SPADLET |cond| (CAR |condList|))
-         (SPADLET |restConds| (CDR |condList|))
-         (COND
-           ((OR (AND (CONSP |cond|) (EQ (QCAR |cond|) '|isDomain|)
-                     (PROGN
-                       (SPADLET |ISTMP#1| (QCDR |cond|))
-                       (AND (CONSP |ISTMP#1|)
-                            (PROGN
-                              (SPADLET |pv| (QCAR |ISTMP#1|))
-                              (SPADLET |ISTMP#2| (QCDR |ISTMP#1|))
-                              (AND (CONSP |ISTMP#2|)
-                                   (EQ (QCDR |ISTMP#2|) NIL)
-                                   (PROGN
-                                     (SPADLET |pattern|
-                                      (QCAR |ISTMP#2|))
-                                     'T))))))
-                (AND (CONSP |cond|) (EQ (QCAR |cond|) '|ofCategory|)
-                     (PROGN
-                       (SPADLET |ISTMP#1| (QCDR |cond|))
-                       (AND (CONSP |ISTMP#1|)
-                            (PROGN
-                              (SPADLET |pv| (QCAR |ISTMP#1|))
-                              (SPADLET |ISTMP#2| (QCDR |ISTMP#1|))
-                              (AND (CONSP |ISTMP#2|)
-                                   (EQ (QCDR |ISTMP#2|) NIL)
-                                   (PROGN
-                                     (SPADLET |pattern|
-                                      (QCAR |ISTMP#2|))
-                                     'T))))))
-                (AND (CONSP |cond|) (EQ (QCAR |cond|) '|Satisfies|)
-                     (PROGN
-                       (SPADLET |ISTMP#1| (QCDR |cond|))
-                       (AND (CONSP |ISTMP#1|)
-                            (PROGN
-                              (SPADLET |pv| (QCAR |ISTMP#1|))
-                              (SPADLET |ISTMP#2| (QCDR |ISTMP#1|))
-                              (AND (CONSP |ISTMP#2|)
-                                   (EQ (QCDR |ISTMP#2|) NIL)
-                                   (PROGN
-                                     (SPADLET |cond| (QCAR |ISTMP#2|))
-                                     'T)))))))
-            (COND
-              ((BOOT-EQUAL |pv| |$EmptyMode|)
-               (SPADLET |nsubst| |substList|))
-              ('T
-               (SPADLET |nsubst|
-                        (CONS (CONS |pv| (CAR |patVars|)) |substList|))))
-            (|renamePatternVariables1| |restConds| |nsubst|
-                (CDR |patVars|)))
-           ('T |substList|)))))))
-
-;substFromAlist(l, substAlist) ==
-;  for [pvar, :replace] in substAlist repeat
-;    l := SUBST(replace, pvar, l)
-;  l
-
-(DEFUN |substFromAlist| (|l| |substAlist|)
-  (PROG (|pvar| |replace|)
-    (RETURN
-      (SEQ (PROGN
-             (DO ((G166792 |substAlist| (CDR G166792))
-                  (G166783 NIL))
-                 ((OR (ATOM G166792)
-                      (PROGN (SETQ G166783 (CAR G166792)) NIL)
-                      (PROGN
-                        (PROGN
-                          (SPADLET |pvar| (CAR G166783))
-                          (SPADLET |replace| (CDR G166783))
-                          G166783)
-                        NIL))
-                  NIL)
-               (SEQ (EXIT (SPADLET |l| (MSUBST |replace| |pvar| |l|)))))
-             |l|)))))
-
-;computeDomainVariableAlist() ==
-;  [[pvar, :pvarCondList pvar] for [., :pvar] in
-;    htpDomainPvarSubstList $curPage]
-
-(DEFUN |computeDomainVariableAlist| ()
-  (PROG (|pvar|)
-  (declare (special |$curPage|))
-    (RETURN
-      (SEQ (PROG (G166813)
-             (SPADLET G166813 NIL)
-             (RETURN
-               (DO ((G166819 (|htpDomainPvarSubstList| |$curPage|)
-                        (CDR G166819))
-                    (G166805 NIL))
-                   ((OR (ATOM G166819)
-                        (PROGN (SETQ G166805 (CAR G166819)) NIL)
-                        (PROGN
-                          (PROGN
-                            (SPADLET |pvar| (CDR G166805))
-                            G166805)
-                          NIL))
-                    (NREVERSE0 G166813))
-                 (SEQ (EXIT (SETQ G166813
-                                  (CONS (CONS |pvar|
-                                         (|pvarCondList| |pvar|))
-                                        G166813)))))))))))
-
-;pvarCondList pvar ==
-;  nreverse pvarCondList1([pvar], nil, htpDomainConditions $curPage)
-
-(DEFUN |pvarCondList| (|pvar|)
-  (declare (special |$curPage|))
-  (NREVERSE
-      (|pvarCondList1| (CONS |pvar| NIL) NIL
-          (|htpDomainConditions| |$curPage|))))
-
-;pvarCondList1(pvarList, activeConds, condList) ==
-;  null condList => activeConds
-;  [cond, : restConds] := condList
-;  cond is [., pv, pattern] and pv in pvarList =>
-;    pvarCondList1(nconc(pvarList, pvarsOfPattern pattern),
-;                  [cond, :activeConds], restConds)
-;  pvarCondList1(pvarList, activeConds, restConds)
-
-(DEFUN |pvarCondList1| (|pvarList| |activeConds| |condList|)
-  (PROG (|cond| |restConds| |ISTMP#1| |pv| |ISTMP#2| |pattern|)
-    (RETURN
-      (COND
-        ((NULL |condList|) |activeConds|)
-        ('T (SPADLET |cond| (CAR |condList|))
-         (SPADLET |restConds| (CDR |condList|))
-         (COND
-           ((AND (CONSP |cond|)
-                 (PROGN
-                   (SPADLET |ISTMP#1| (QCDR |cond|))
-                   (AND (CONSP |ISTMP#1|)
-                        (PROGN
-                          (SPADLET |pv| (QCAR |ISTMP#1|))
-                          (SPADLET |ISTMP#2| (QCDR |ISTMP#1|))
-                          (AND (CONSP |ISTMP#2|)
-                               (EQ (QCDR |ISTMP#2|) NIL)
-                               (PROGN
-                                 (SPADLET |pattern| (QCAR |ISTMP#2|))
-                                 'T)))))
-                 (|member| |pv| |pvarList|))
-            (|pvarCondList1|
-                (NCONC |pvarList| (|pvarsOfPattern| |pattern|))
-                (CONS |cond| |activeConds|) |restConds|))
-           ('T (|pvarCondList1| |pvarList| |activeConds| |restConds|))))))))
-
-;pvarsOfPattern pattern ==
-;  NULL LISTP pattern => nil
-;  [pvar for pvar in rest pattern | pvar in $PatternVariableList]
-
-(DEFUN |pvarsOfPattern| (|pattern|)
-  (PROG ()
-  (declare (special |$PatternVariableList|))
-    (RETURN
-      (SEQ (COND
-             ((NULL (LISTP |pattern|)) NIL)
-             ('T
-              (PROG (G166869)
-                (SPADLET G166869 NIL)
-                (RETURN
-                  (DO ((G166875 (CDR |pattern|) (CDR G166875))
-                       (|pvar| NIL))
-                      ((OR (ATOM G166875)
-                           (PROGN (SETQ |pvar| (CAR G166875)) NIL))
-                       (NREVERSE0 G166869))
-                    (SEQ (EXIT (COND
-                                 ((|member| |pvar|
-                                      |$PatternVariableList|)
-                                  (SETQ G166869
-                                        (CONS |pvar| G166869)))))))))))))))
-
-;htMakeTemplates(templateList, numLabels) ==
-;  templateList := [templateParts template for template in templateList]
-;  [[substLabel(i, template) for template in templateList]
-;    for i in 1..numLabels] where substLabel(i, template) ==
-;      CONSP template =>
-;        INTERN CONCAT(first template, PRINC_-TO_-STRING i, rest template)
-;      template
-
-(DEFUN |htMakeTemplates,substLabel| (|i| |template|)
-  (SEQ (IF (CONSP |template|)
-           (EXIT (INTERN (CONCAT (CAR |template|) (PRINC-TO-STRING |i|)
-                                 (CDR |template|)))))
-       (EXIT |template|)))
-
-(DEFUN |htMakeTemplates| (|templateList| |numLabels|)
-  (PROG ()
-    (RETURN
-      (SEQ (PROGN
-             (SPADLET |templateList|
-                      (PROG (G166895)
-                        (SPADLET G166895 NIL)
-                        (RETURN
-                          (DO ((G166900 |templateList|
-                                   (CDR G166900))
-                               (|template| NIL))
-                              ((OR (ATOM G166900)
-                                   (PROGN
-                                     (SETQ |template| (CAR G166900))
-                                     NIL))
-                               (NREVERSE0 G166895))
-                            (SEQ (EXIT (SETQ G166895
-                                        (CONS
-                                         (|templateParts| |template|)
-                                         G166895))))))))
-             (PROG (G166910)
-               (SPADLET G166910 NIL)
-               (RETURN
-                 (DO ((|i| 1 (QSADD1 |i|)))
-                     ((QSGREATERP |i| |numLabels|)
-                      (NREVERSE0 G166910))
-                   (SEQ (EXIT (SETQ G166910
-                                    (CONS
-                                     (PROG (G166922)
-                                       (SPADLET G166922 NIL)
-                                       (RETURN
-                                         (DO
-                                          ((G166927 |templateList|
-                                            (CDR G166927))
-                                           (|template| NIL))
-                                          ((OR (ATOM G166927)
-                                            (PROGN
-                                              (SETQ |template|
-                                               (CAR G166927))
-                                              NIL))
-                                           (NREVERSE0 G166922))
-                                           (SEQ
-                                            (EXIT
-                                             (SETQ G166922
-                                              (CONS
-                                               (|htMakeTemplates,substLabel|
-                                                |i| |template|)
-                                               G166922)))))))
-                                     G166910))))))))))))
-
-;templateParts template ==
-;  NULL STRINGP template => template
-;  i := SEARCH('"%l", template)
-;  null i => template
-;  [SUBSEQ(template, 0, i), : SUBSEQ(template, i+2)]
-
-(DEFUN |templateParts| (|template|)
-  (PROG (|i|)
-    (RETURN
-      (COND
-        ((NULL (STRINGP |template|)) |template|)
-        ('T (SPADLET |i| (SEARCH "%l" |template|))
-         (COND
-           ((NULL |i|) |template|)
-           ('T
-            (CONS (SUBSEQ |template| 0 |i|)
-                  (SUBSEQ |template| (PLUS |i| 2))))))))))
-
-;htMakeDoneButton(message, func) ==
-;  bcHt '"\newline\vspace{1}\centerline{"
-;  if message = '"Continue" then
-;    bchtMakeButton('"\lispdownlink", "\ContinueBitmap", func)
-;  else
-;    bchtMakeButton('"\lispdownlink",CONCAT('"\box{", message, '"}"), func)
-;  bcHt '"} "
-
-(DEFUN |htMakeDoneButton| (|message| |func|)
-  (PROGN
-    (|bcHt| "\\newline\\vspace{1}\\centerline{")
-    (COND
-      ((BOOT-EQUAL |message| "Continue")
-       (|bchtMakeButton| "\\lispdownlink"
-           '|\\ContinueBitmap| |func|))
-      ('T
-       (|bchtMakeButton| "\\lispdownlink"
-           (CONCAT "\\box{" |message| "}")
-           |func|)))
-    (|bcHt| "} ")))
-
-;htProcessDoneButton [label , func] ==
-;  iht '"\newline\vspace{1}\centerline{"
-;  if label = '"Continue" then
-;    htMakeButton('"\lispdownlink", "\ContinueBitmap", func)
-;  else if label = '"Push to enter names" then
-;    htMakeButton('"\lispdownlink",'"\ControlBitmap{clicktoset}", func)
-;  else
-;    htMakeButton('"\lispdownlink", CONCAT('"\box{", label, '"}"), func)
-;  iht '"} "
-
-(DEFUN |htProcessDoneButton| (G166950)
-  (PROG (|label| |func|)
-    (RETURN
-      (PROGN
-        (SPADLET |label| (CAR G166950))
-        (SPADLET |func| (CADR G166950))
-        (|iht| "\\newline\\vspace{1}\\centerline{")
-        (COND
-          ((BOOT-EQUAL |label| "Continue")
-           (|htMakeButton| "\\lispdownlink"
-               '|\\ContinueBitmap| |func|))
-          ((BOOT-EQUAL |label| "Push to enter names")
-           (|htMakeButton| "\\lispdownlink"
-               "\\ControlBitmap{clicktoset}" |func|))
-          ('T
-           (|htMakeButton| "\\lispdownlink"
-               (CONCAT "\\box{" |label| "}")
-               |func|)))
-        (|iht| "} ")))))
-
-;htMakeButton(htCommand, message, func,:options) ==
-;----------> OBSELETE <----------------------------------
-;  skipStateInfo? := IFCAR options
-;  iht [htCommand, '"{"]
-;  bcIssueHt message
-;  skipStateInfo? =>
-;    iht ['"}{(|htDoneButton| '|", func, '"| ",htpName $curPage, '")}"]
-;  iht ['"}{(|htDoneButton| '|", func, '"| (PROGN "]
-;  for [id, ., ., ., type, :.] in htpInputAreaAlist $curPage repeat
-;    iht ['"(|htpSetLabelInputString| ", htpName $curPage, '"'|", id, '"| "]
-;    if type = 'string then
-;      iht ['"_"\stringvalue{", id, '"}_""]
-;    else
-;      iht ['"_"\boxvalue{", id, '"}_""]
-;    iht '") "
-;  iht [htpName $curPage, '"))}"]
-
-(DEFUN |htMakeButton|
-       (&REST G166990 &AUX |options| |func| |message| |htCommand|)
-  (DSETQ (|htCommand| |message| |func| . |options|) G166990)
-  (PROG (|skipStateInfo?| |id| |type|)
-  (declare (special |$curPage|))
-    (RETURN
-      (SEQ (PROGN
-             (SPADLET |skipStateInfo?| (IFCAR |options|))
-             (|iht| (CONS |htCommand| (CONS "{" NIL)))
-             (|bcIssueHt| |message|)
-             (COND
-               (|skipStateInfo?|
-                   (|iht| (CONS "}{(|htDoneButton| '|"
-                                (CONS |func|
-                                      (CONS "| "
-                                       (CONS (|htpName| |$curPage|)
-                                        (CONS ")}" NIL)))))))
-               ('T
-                (|iht| (CONS "}{(|htDoneButton| '|"
-                             (CONS |func|
-                                   (CONS "| (PROGN " NIL))))
-                (DO ((G166977 (|htpInputAreaAlist| |$curPage|)
-                         (CDR G166977))
-                     (G166965 NIL))
-                    ((OR (ATOM G166977)
-                         (PROGN (SETQ G166965 (CAR G166977)) NIL)
-                         (PROGN
-                           (PROGN
-                             (SPADLET |id| (CAR G166965))
-                             (SPADLET |type| (CAR (CDDDDR G166965)))
-                             G166965)
-                           NIL))
-                     NIL)
-                  (SEQ (EXIT (PROGN
-                               (|iht| (CONS
-                                                                               "(|htpSetLabelInputString| "
-                                       (CONS (|htpName| |$curPage|)
-                                        (CONS "'|"
-                                         (CONS |id|
-                                          (CONS "| " NIL))))))
-                               (COND
-                                 ((BOOT-EQUAL |type| '|string|)
-                                  (|iht| (CONS
-                                                                                     "\"\\stringvalue{"
-                                          (CONS |id|
-                                           (CONS "}\""
-                                            NIL)))))
-                                 ('T
-                                  (|iht| (CONS
-                                          "\"\\boxvalue{"
-                                          (CONS |id|
-                                           (CONS "}\""
-                                            NIL))))))
-                               (|iht| ") ")))))
-                (|iht| (CONS (|htpName| |$curPage|)
-                             (CONS "))}" NIL))))))))))
-
-;bchtMakeButton(htCommand, message, func) ==
-;  bcHt [htCommand, '"{", message,
-;       '"}{(|htDoneButton| '|", func, '"| (PROGN "]
-;  for [id, ., ., ., type, :.] in htpInputAreaAlist $curPage repeat
-;    bcHt ['"(|htpSetLabelInputString| ", htpName $curPage, '"'|", id, '"| "]
-;    if type = 'string then
-;      bcHt ['"_"\stringvalue{", id, '"}_""]
-;    else
-;      bcHt ['"_"\boxvalue{", id, '"}_""]
-;    bcHt '") "
-;  bcHt [htpName $curPage, '"))} "]
-
-(DEFUN |bchtMakeButton| (|htCommand| |message| |func|)
-  (PROG (|id| |type|)
-  (declare (special |$curPage|))
-    (RETURN
-      (SEQ (PROGN
-             (|bcHt| (CONS |htCommand|
-                           (CONS "{"
-                                 (CONS |message|
-                                       (CONS
-                                                                                 "}{(|htDoneButton| '|"
-                                        (CONS |func|
-                                         (CONS "| (PROGN "
-                                          NIL)))))))
-             (DO ((G167004 (|htpInputAreaAlist| |$curPage|)
-                      (CDR G167004))
-                  (G166992 NIL))
-                 ((OR (ATOM G167004)
-                      (PROGN (SETQ G166992 (CAR G167004)) NIL)
-                      (PROGN
-                        (PROGN
-                          (SPADLET |id| (CAR G166992))
-                          (SPADLET |type| (CAR (CDDDDR G166992)))
-                          G166992)
-                        NIL))
-                  NIL)
-               (SEQ (EXIT (PROGN
-                            (|bcHt| (CONS
-                                                                           "(|htpSetLabelInputString| "
-                                     (CONS (|htpName| |$curPage|)
-                                      (CONS "'|"
-                                       (CONS |id|
-                                        (CONS "| " NIL))))))
-                            (COND
-                              ((BOOT-EQUAL |type| '|string|)
-                               (|bcHt| (CONS
-                                        "\"\\stringvalue{"
-                                        (CONS |id|
-                                         (CONS "}\"" NIL)))))
-                              ('T
-                               (|bcHt| (CONS
-                                        "\"\\boxvalue{"
-                                        (CONS |id|
-                                         (CONS "}\"" NIL))))))
-                            (|bcHt| ") ")))))
-             (|bcHt| (CONS (|htpName| |$curPage|)
-                           (CONS "))} " NIL))))))))
-
-;htProcessDoitButton [label, command, func] ==
-;  fun := mkCurryFun(func, [command])
-;  iht '"\newline\vspace{1}\centerline{"
-;  htMakeButton('"\lispcommand", CONCAT('"\box{", label, '"}"), fun)
-;  iht '"} "
-;  iht '"\vspace{2}{Select \  \UpButton{} \  to go back one page.}"
-;  iht '"\newline{Select \  \ExitButton{QuitPage} \  to remove this window.}"
-
-(DEFUN |htProcessDoitButton| (G167017)
-  (PROG (|label| |command| |func| |fun|)
-    (RETURN
-      (PROGN
-        (SPADLET |label| (CAR G167017))
-        (SPADLET |command| (CADR G167017))
-        (SPADLET |func| (CADDR G167017))
-        (SPADLET |fun| (|mkCurryFun| |func| (CONS |command| NIL)))
-        (|iht| "\\newline\\vspace{1}\\centerline{")
-        (|htMakeButton| "\\lispcommand"
-            (CONCAT "\\box{" |label| "}")
-            |fun|)
-        (|iht| "} ")
-        (|iht|               "\\vspace{2}{Select \\  \\UpButton{} \\  to go back one page.}")
-        (|iht| "\\newline{Select \\  \\ExitButton{QuitPage} \\  to remove this window.}")))))
-
-;htMakeDoitButton(label, command) ==
-;  -- use bitmap button if just plain old "Do It"
-;  if label = '"Do It" then
-;    bcHt '"\newline\vspace{1}\centerline{\lispcommand{\DoItBitmap}{(|doDoitButton| "
-;  else
-;    bcHt ['"\newline\vspace{1}\centerline{\lispcommand{\box{", label,
-;       '"}}{(|doDoitButton| "]
-;  bcHt htpName $curPage
-;  bcHt ['" _"", htEscapeString command, '"_""]
-;  bcHt '")}}"
-;  bcHt '"\vspace{2}{Select \  \UpButton{} \  to go back one page.}"
-;  bcHt '"\newline{Select \  \ExitButton{QuitPage} \  to remove this window.}"
-
-(DEFUN |htMakeDoitButton| (|label| |command|)
-  (declare (special |$curPage|))
-  (PROGN
-    (COND
-      ((BOOT-EQUAL |label| "Do It")
-       (|bcHt| "\\newline\\vspace{1}\\centerline{\\lispcommand{\\DoItBitmap}{(|doDoitButton| "))
-      ('T
-       (|bcHt| (CONS                        "\\newline\\vspace{1}\\centerline{\\lispcommand{\\box{"
-                     (CONS |label|
-                           (CONS "}}{(|doDoitButton| "
-                                 NIL))))))
-    (|bcHt| (|htpName| |$curPage|))
-    (|bcHt| (CONS " \""
-                  (CONS (|htEscapeString| |command|)
-                        (CONS "\"" NIL))))
-    (|bcHt| ")}}")
-    (|bcHt|               "\\vspace{2}{Select \\  \\UpButton{} \\  to go back one page.}")
-    (|bcHt|   "\\newline{Select \\  \\ExitButton{QuitPage} \\  to remove this window.}")))
-
-;doDoitButton(htPage, command) ==
-;  executeInterpreterCommand command
-
-(DEFUN |doDoitButton| (|htPage| |command|)
-  (declare (ignore |htPage|))
-  (|executeInterpreterCommand| |command|))
-
-;executeInterpreterCommand command ==
-;  PRINC command
-;  TERPRI()
-;  ncSetCurrentLine(command)
-;  CATCH('SPAD__READER, parseAndInterpret command)
-;  PRINC MKPROMPT()
-;  FINISH_-OUTPUT()
-
-(DEFUN |executeInterpreterCommand| (|command|)
-  (PROGN
-    (PRINC |command|)
-    (TERPRI)
-    (|setCurrentLine| |command|)
-    (CATCH 'SPAD_READER (|parseAndInterpret| |command|))
-    (PRINC (MKPROMPT))
-    (FINISH-OUTPUT)))
-
-;htDoneButton(func, htPage) ==
-;  typeCheckInputAreas htPage =>
-;    htMakeErrorPage htPage
-;  NULL FBOUNDP func =>
-;    systemError ['"unknown function", func]
-;  FUNCALL(SYMBOL_-FUNCTION func, htPage)
-
-(DEFUN |htDoneButton| (|func| |htPage|)
-  (COND
-    ((|typeCheckInputAreas| |htPage|) (|htMakeErrorPage| |htPage|))
-    ((NULL (FBOUNDP |func|))
-     (|systemError|
-         (CONS "unknown function" (CONS |func| NIL))))
-    ('T (FUNCALL (SYMBOL-FUNCTION |func|) |htPage|))))
-
-;typeCheckInputAreas htPage ==
-;  -- This needs to be severly beefed up
-;  inputAlist := nil
-;  errorCondition := false
-;  for entry in htpInputAreaAlist htPage
-;   | entry is [stringName, ., ., ., 'string, ., spadType, filter] repeat
-;    condList :=
-;      LASSOC(LASSOC(spadType,htpDomainPvarSubstList htPage),
-;             htpDomainVariableAlist htPage)
-;    string := htpLabelFilteredInputString(htPage, stringName)
-;    $bcParseOnly =>
-;      null ncParseFromString string =>
-;        htpSetLabelErrorMsg(htPage, '"Syntax Error", '"Syntax Error")
-;      nil
-;    val := checkCondition(htpLabelInputString(htPage, stringName),
-;                          string, condList)
-;    STRINGP val =>
-;      errorCondition := true
-;      htpSetLabelErrorMsg(htPage, stringName, val)
-;    htpSetLabelSpadValue(htPage, stringName, val)
-;  errorCondition
-
-(DEFUN |typeCheckInputAreas| (|htPage|)
-  (PROG (|inputAlist| |stringName| |ISTMP#1| |ISTMP#2| |ISTMP#3|
-            |ISTMP#4| |ISTMP#5| |ISTMP#6| |spadType| |ISTMP#7| |filter|
-            |condList| |string| |val| |errorCondition|)
-  (declare (special |$bcParseOnly|))
-    (RETURN
-      (SEQ (PROGN
-             (SPADLET |inputAlist| NIL)
-             (SPADLET |errorCondition| NIL)
-             (DO ((G167160 (|htpInputAreaAlist| |htPage|)
-                      (CDR G167160))
-                  (|entry| NIL))
-                 ((OR (ATOM G167160)
-                      (PROGN (SETQ |entry| (CAR G167160)) NIL))
-                  NIL)
-               (SEQ (EXIT (COND
-                            ((AND (CONSP |entry|)
-                                  (PROGN
-                                    (SPADLET |stringName|
-                                     (QCAR |entry|))
-                                    (SPADLET |ISTMP#1| (QCDR |entry|))
-                                    (AND (CONSP |ISTMP#1|)
-                                     (PROGN
-                                       (SPADLET |ISTMP#2|
-                                        (QCDR |ISTMP#1|))
-                                       (AND (CONSP |ISTMP#2|)
-                                        (PROGN
-                                          (SPADLET |ISTMP#3|
-                                           (QCDR |ISTMP#2|))
-                                          (AND (CONSP |ISTMP#3|)
-                                           (PROGN
-                                             (SPADLET |ISTMP#4|
-                                              (QCDR |ISTMP#3|))
-                                             (AND (CONSP |ISTMP#4|)
-                                              (EQ (QCAR |ISTMP#4|)
-                                               '|string|)
-                                              (PROGN
-                                                (SPADLET |ISTMP#5|
-                                                 (QCDR |ISTMP#4|))
-                                                (AND (CONSP |ISTMP#5|)
-                                                 (PROGN
-                                                   (SPADLET |ISTMP#6|
-                                                    (QCDR |ISTMP#5|))
-                                                   (AND
-                                                    (CONSP |ISTMP#6|)
-                                                    (PROGN
-                                                      (SPADLET
-                                                       |spadType|
-                                                       (QCAR |ISTMP#6|))
-                                                      (SPADLET
-                                                       |ISTMP#7|
-                                                       (QCDR |ISTMP#6|))
-                                                      (AND
-                                                       (CONSP
-                                                        |ISTMP#7|)
-                                                       (EQ
-                                                        (QCDR
-                                                         |ISTMP#7|)
-                                                        NIL)
-                                                       (PROGN
-                                                         (SPADLET
-                                                          |filter|
-                                                          (QCAR
-                                                           |ISTMP#7|))
-                                                         'T))))))))))))))))
-                             (PROGN
-                               (SPADLET |condList|
-                                        (LASSOC
-                                         (LASSOC |spadType|
-                                          (|htpDomainPvarSubstList|
-                                           |htPage|))
-                                         (|htpDomainVariableAlist|
-                                          |htPage|)))
-                               (SPADLET |string|
-                                        (|htpLabelFilteredInputString|
-                                         |htPage| |stringName|))
-                               (COND
-                                 (|$bcParseOnly|
-                                     (COND
-                                       ((NULL
-                                         (|ncParseFromString| |string|))
-                                        (|htpSetLabelErrorMsg| |htPage|
-                                         "Syntax Error"
-                                         "Syntax Error"))
-                                       ('T NIL)))
-                                 ('T
-                                  (SPADLET |val|
-                                           (|checkCondition|
-                                            (|htpLabelInputString|
-                                             |htPage| |stringName|)
-                                            |string| |condList|))
-                                  (COND
-                                    ((STRINGP |val|)
-                                     (SPADLET |errorCondition| 'T)
-                                     (|htpSetLabelErrorMsg| |htPage|
-                                      |stringName| |val|))
-                                    ('T
-                                     (|htpSetLabelSpadValue| |htPage|
-                                      |stringName| |val|)))))))))))
-             |errorCondition|)))))
-
-;checkCondition(s1, string, condList) ==
-;  condList is [['Satisfies, pvar, pred]] =>
-;    val := FUNCALL(pred, string)
-;    STRINGP val => val
-;    ['(String), :wrap s1]
-;  condList isnt [['isDomain, pvar, pattern]] =>
-;    systemError '"currently invalid domain condition"
-;  pattern is '(String) => ['(String), :wrap s1]
-;  val := parseAndEval string
-;  STRINGP val =>
-;    val = '"Syntax Error " => '"Error: Syntax Error "
-;    condErrorMsg pattern
-;  [type, : data] := val
-;  newType := CATCH('SPAD__READER, resolveTM(type, pattern))
-;  null newType =>
-;    condErrorMsg pattern
-;  coerceInt(val, newType)
-
-(DEFUN |checkCondition| (|s1| |string| |condList|)
-  (PROG (|pred| |ISTMP#1| |ISTMP#2| |pvar| |ISTMP#3| |pattern| |val|
-                |type| |data| |newType|)
-    (RETURN
-      (COND
-        ((AND (CONSP |condList|) (EQ (QCDR |condList|) NIL)
-              (PROGN
-                (SPADLET |ISTMP#1| (QCAR |condList|))
-                (AND (CONSP |ISTMP#1|)
-                     (EQ (QCAR |ISTMP#1|) '|Satisfies|)
-                     (PROGN
-                       (SPADLET |ISTMP#2| (QCDR |ISTMP#1|))
-                       (AND (CONSP |ISTMP#2|)
-                            (PROGN
-                              (SPADLET |pvar| (QCAR |ISTMP#2|))
-                              (SPADLET |ISTMP#3| (QCDR |ISTMP#2|))
-                              (AND (CONSP |ISTMP#3|)
-                                   (EQ (QCDR |ISTMP#3|) NIL)
-                                   (PROGN
-                                     (SPADLET |pred| (QCAR |ISTMP#3|))
-                                     'T))))))))
-         (SPADLET |val| (FUNCALL |pred| |string|))
-         (COND
-           ((STRINGP |val|) |val|)
-           ('T (CONS '(|String|) (|wrap| |s1|)))))
-        ((NULL (AND (CONSP |condList|) (EQ (QCDR |condList|) NIL)
-                    (PROGN
-                      (SPADLET |ISTMP#1| (QCAR |condList|))
-                      (AND (CONSP |ISTMP#1|)
-                           (EQ (QCAR |ISTMP#1|) '|isDomain|)
-                           (PROGN
-                             (SPADLET |ISTMP#2| (QCDR |ISTMP#1|))
-                             (AND (CONSP |ISTMP#2|)
-                                  (PROGN
-                                    (SPADLET |pvar| (QCAR |ISTMP#2|))
-                                    (SPADLET |ISTMP#3|
-                                     (QCDR |ISTMP#2|))
-                                    (AND (CONSP |ISTMP#3|)
-                                     (EQ (QCDR |ISTMP#3|) NIL)
-                                     (PROGN
-                                       (SPADLET |pattern|
-                                        (QCAR |ISTMP#3|))
-                                       'T)))))))))
-         (|systemError|
-             "currently invalid domain condition"))
-        ((EQUAL |pattern| '(|String|))
-         (CONS '(|String|) (|wrap| |s1|)))
-        ('T (SPADLET |val| (|parseAndEval| |string|))
-         (COND
-           ((STRINGP |val|)
-            (COND
-              ((BOOT-EQUAL |val| "Syntax Error ")
-               "Error: Syntax Error ")
-              ('T (|condErrorMsg| |pattern|))))
-           ('T (SPADLET |type| (CAR |val|))
-            (SPADLET |data| (CDR |val|))
-            (SPADLET |newType|
-                     (CATCH 'SPAD_READER
-                       (|resolveTM| |type| |pattern|)))
-            (COND
-              ((NULL |newType|) (|condErrorMsg| |pattern|))
-              ('T (|coerceInt| |val| |newType|))))))))))
-
-;condErrorMsg type ==
-;  typeString := form2String type
-;  if CONSP typeString then typeString := APPLY(function CONCAT, typeString)
-;  CONCAT('"Error: Could not make your input into a ", typeString)
-
-(DEFUN |condErrorMsg| (|type|)
-  (PROG (|typeString|)
-    (RETURN
-      (PROGN
-        (SPADLET |typeString| (|form2String| |type|))
-        (COND
-          ((CONSP |typeString|)
-           (SPADLET |typeString|
-                    (APPLY (|function| CONCAT) |typeString|))))
-        (CONCAT "Error: Could not make your input into a "
-                |typeString|)))))
-
-;parseAndEval string ==
-;  $InteractiveMode :fluid := true
-;  $BOOT: fluid := NIL
-;  $SPAD: fluid := true
-;  $e:fluid := $InteractiveFrame
-;  $QuietCommand:local := true
-;  parseAndEval1 string
-
-(DEFUN |parseAndEval| (|string|)
-  (PROG (|$InteractiveMode| $BOOT $SPAD |$e| |$QuietCommand|)
-    (DECLARE (SPECIAL |$InteractiveMode| $BOOT $SPAD |$e|
-                      |$QuietCommand|))
-    (RETURN
-      (PROGN
-        (SPADLET |$InteractiveMode| 'T)
-        (SPADLET $BOOT NIL)
-        (SPADLET $SPAD 'T)
-        (SPADLET |$e| |$InteractiveFrame|)
-        (SPADLET |$QuietCommand| 'T)
-        (|parseAndEval1| |string|)))))
-
-(defun |parseAndEval1| (|string|)
- (let (|v| |syntaxError| |pform| |val|)
-  (setq |syntaxError| nil)
-  (setq |pform|
-   (progn
-    (setq |v|
-     (|applyWithOutputToString| '|ncParseFromString| (cons |string| nil)))
-    (cond
-     ((car |v|) (car |v|))
-     (t (setq |syntaxError| t) (cdr |v|)))))
-  (cond
-   (|syntaxError| "Syntax Error ")
-   (|pform| 
-    (setq |val|
-     (|applyWithOutputToString| '|processInteractive|
-      (cons |pform| (list nil))))
-    (cond
-     ((car |val|) (car |val|))
-     (t "Type Analysis Error")))
-   (t nil))))
-
-;oldParseString string ==
-;  tree := applyWithOutputToString('string2SpadTree, [string])
-;  CAR tree => parseTransform postTransform CAR tree
-;  CDR tree
-
-(DEFUN |oldParseString| (|string|)
-  (PROG (|tree|)
-    (RETURN
-      (PROGN
-        (SPADLET |tree|
-                 (|applyWithOutputToString| '|string2SpadTree|
-                     (CONS |string| NIL)))
-        (COND
-          ((CAR |tree|)
-           (|parseTransform| (postTransform (car |tree|))))
-          ('T (CDR |tree|)))))))
-
-;makeSpadCommand(:l) ==
-;  opForm := CONCAT(first l, '"(")
-;  lastArg := last l
-;  l := rest l
-;  argList := nil
-;  for arg in l while arg ^= lastArg repeat
-;    argList := [CONCAT(arg, '", "), :argList]
-;  argList := nreverse [lastArg, :argList]
-;  CONCAT(opForm, APPLY(function CONCAT, argList), '")")
-
-(DEFUN |makeSpadCommand| (&REST G167322 &AUX |l|)
-  (DSETQ |l| G167322)
-  (PROG (|opForm| |lastArg| |argList|)
-    (RETURN
-      (SEQ (PROGN
-             (SPADLET |opForm| (CONCAT (CAR |l|) "("))
-             (SPADLET |lastArg| (|last| |l|))
-             (SPADLET |l| (CDR |l|))
-             (SPADLET |argList| NIL)
-             (DO ((G167306 |l| (CDR G167306)) (|arg| NIL))
-                 ((OR (ATOM G167306)
-                      (PROGN (SETQ |arg| (CAR G167306)) NIL)
-                      (NULL (NEQUAL |arg| |lastArg|)))
-                  NIL)
-               (SEQ (EXIT (SPADLET |argList|
-                                   (CONS
-                                    (CONCAT |arg| ", ")
-                                    |argList|)))))
-             (SPADLET |argList| (NREVERSE (CONS |lastArg| |argList|)))
-             (CONCAT |opForm| (APPLY (|function| CONCAT) |argList|)
-                     ")"))))))
-
-;htMakeInputList stringList ==
-;-- makes an input form for constructing a list
-;  lastArg := last stringList
-;  argList := nil
-;  for arg in stringList while arg ^= lastArg repeat
-;    argList := [CONCAT(arg, '", "), :argList]
-;  argList := nreverse [lastArg, :argList]
-;  bracketString APPLY(function CONCAT, argList)
-
-(DEFUN |htMakeInputList| (|stringList|)
-  (PROG (|lastArg| |argList|)
-    (RETURN
-      (SEQ (PROGN
-             (SPADLET |lastArg| (|last| |stringList|))
-             (SPADLET |argList| NIL)
-             (DO ((G167328 |stringList| (CDR G167328)) (|arg| NIL))
-                 ((OR (ATOM G167328)
-                      (PROGN (SETQ |arg| (CAR G167328)) NIL)
-                      (NULL (NEQUAL |arg| |lastArg|)))
-                  NIL)
-               (SEQ (EXIT (SPADLET |argList|
-                                   (CONS
-                                    (CONCAT |arg| ", ")
-                                    |argList|)))))
-             (SPADLET |argList| (NREVERSE (CONS |lastArg| |argList|)))
-             (|bracketString| (APPLY (|function| CONCAT) |argList|)))))))
-
-;-- predefined filter strings
-;bracketString string == CONCAT('"[",string,'"]")
-
-(DEFUN |bracketString| (|string|)
-  (CONCAT "[" |string| "]"))
-
-;quoteString string == CONCAT('"_"", string, '"_"")
-
-(DEFUN |quoteString| (|string|)
-  (CONCAT "\"" |string| "\""))
-
-;$funnyQuote := char 127
-
-(SPADLET |$funnyQuote| (|char| 127)) 
-
-;$funnyBacks := char 128
-
-(SPADLET |$funnyBacks| (|char| 128)) 
-
-;htEscapeString str ==
-;  str := SUBSTITUTE($funnyQuote, char '_", str)
-;  SUBSTITUTE($funnyBacks, char '_\, str)
-
-(DEFUN |htEscapeString| (|str|)
-  (declare (special |$funnyBacks| |$funnyQuote|))
-  (PROGN
-    (SPADLET |str| (SUBSTITUTE |$funnyQuote| (|char| '|"|) |str|))
-    (SUBSTITUTE |$funnyBacks| (|char| '|\\|) |str|)))
-
-;unescapeStringsInForm form ==
-;  STRINGP form =>
-;    str := NSUBSTITUTE(char '_", $funnyQuote, form)
-;    NSUBSTITUTE(char '_\, $funnyBacks, str)
-;  CONSP form =>
-;    unescapeStringsInForm CAR form
-;    unescapeStringsInForm CDR form
-;    form
-;  form
-
-;htsv() ==
-;  startHTPage(50)
-;  htSetVars()
-
-(DEFUN |htsv| () (PROGN (|startHTPage| 50) (|htSetVars|)))
-
-;htSetVars() ==
-;  $path := nil
-;  $lastTree := nil
-;  if 0 ^= LASTATOM $setOptions then htMarkTree($setOptions,0)
-;  htShowSetTree($setOptions)
-
-(DEFUN |htSetVars| ()
-  (declare (special |$setOptions| |$lastTree| |$path|))
-  (PROGN
-    (SPADLET |$path| NIL)
-    (SPADLET |$lastTree| NIL)
-    (COND
-      ((NEQUAL 0 (LASTATOM |$setOptions|))
-       (|htMarkTree| |$setOptions| 0)))
-    (|htShowSetTree| |$setOptions|)))
-
-;htShowSetTree(setTree) ==
-;  $path := TAKE(- LASTATOM setTree,$path)
-;  page := htInitPage(mkSetTitle(),nil)
-;  htpSetProperty(page, 'setTree, setTree)
-;  links := nil
-;  maxWidth1 := maxWidth2 := 0
-;  for setData in setTree repeat
-;    satisfiesUserLevel setData.setLevel =>
-;      okList := [setData,:okList]
-;      maxWidth1 := MAX(# PNAME setData.setName,maxWidth1)
-;      maxWidth2 := MAX(htShowCount STRINGIMAGE setData.setLabel,maxWidth2)
-;  maxWidth1 := MAX(9,maxWidth1)
-;  maxWidth2 := MAX(41,maxWidth2)
-;  tabset1 := STRINGIMAGE (maxWidth1)
-;  tabset2 := STRINGIMAGE (maxWidth2 + maxWidth1 - 1)
-;  htSay('"\tab{2}\newline Variable\tab{",STRINGIMAGE (maxWidth1 + (maxWidth2/3)),'"}Description\tab{",STRINGIMAGE(maxWidth2 + maxWidth1 + 2),'"}Value\newline\beginitems ")
-;  for setData in REVERSE okList repeat
-;      htSay '"\item"
-;      label := STRCONC('"\menuitemstyle{",setData.setName,'"}")
-;      links := [label,[['text,'"\tab{",tabset1,'"}",setData.setLabel,'"\tab{",tabset2,'"}{\em ",htShowSetTreeValue setData,'"}"]],
-;                'htShowSetPage, setData.setName]
-;      htMakePage [['bcLispLinks, links,'options,'(indent . 0)]]
-;  htSay '"\enditems"
-;  htShowPage()
-
-(DEFUN |htShowSetTree| (|setTree|)
-  (PROG (|page| |okList| |maxWidth1| |maxWidth2| |tabset1| |tabset2|
-                |label| |links|)
-  (declare (special |$path|))
-    (RETURN
-      (SEQ (PROGN
-             (SPADLET |$path|
-                      (TAKE (SPADDIFFERENCE (LASTATOM |setTree|))
-                            |$path|))
-             (SPADLET |page| (|htInitPage| (|mkSetTitle|) NIL))
-             (|htpSetProperty| |page| '|setTree| |setTree|)
-             (SPADLET |links| NIL)
-             (SPADLET |maxWidth1| (SPADLET |maxWidth2| 0))
-             (SEQ (DO ((G167379 |setTree| (CDR G167379))
-                       (|setData| NIL))
-                      ((OR (ATOM G167379)
-                           (PROGN
-                             (SETQ |setData| (CAR G167379))
-                             NIL))
-                       NIL)
-                    (SEQ (EXIT (COND
-                                 ((|satisfiesUserLevel|
-                                      (ELT |setData| 2))
-                                  (EXIT (PROGN
-                                          (SPADLET |okList|
-                                           (CONS |setData| |okList|))
-                                          (SPADLET |maxWidth1|
-                                           (MAX
-                                            (|#|
-                                             (PNAME (ELT |setData| 0)))
-                                            |maxWidth1|))
-                                          (SPADLET |maxWidth2|
-                                           (MAX
-                                            (|htShowCount|
-                                             (STRINGIMAGE
-                                              (ELT |setData| 1)))
-                                            |maxWidth2|)))))))))
-                  (SPADLET |maxWidth1| (MAX 9 |maxWidth1|))
-                  (SPADLET |maxWidth2| (MAX 41 |maxWidth2|))
-                  (SPADLET |tabset1| (STRINGIMAGE |maxWidth1|))
-                  (SPADLET |tabset2|
-                           (STRINGIMAGE
-                               (SPADDIFFERENCE
-                                   (PLUS |maxWidth2| |maxWidth1|) 1)))
-                  (|htSay|                                "\\tab{2}\\newline Variable\\tab{"
-                           (STRINGIMAGE
-                               (PLUS |maxWidth1|
-                                     (QUOTIENT |maxWidth2| 3)))
-                           "}Description\\tab{"
-                           (STRINGIMAGE
-                               (PLUS (PLUS |maxWidth2| |maxWidth1|) 2))
-                           "}Value\\newline\\beginitems ")
-                  (DO ((G167392 (REVERSE |okList|) (CDR G167392))
-                       (|setData| NIL))
-                      ((OR (ATOM G167392)
-                           (PROGN
-                             (SETQ |setData| (CAR G167392))
-                             NIL))
-                       NIL)
-                    (SEQ (EXIT (PROGN
-                                 (|htSay| "\\item")
-                                 (SPADLET |label|
-                                          (STRCONC
-                                                                                       "\\menuitemstyle{"
-                                           (ELT |setData| 0)
-                                           "}"))
-                                 (SPADLET |links|
-                                          (CONS |label|
-                                           (CONS
-                                            (CONS
-                                             (CONS '|text|
-                                              (CONS
-                                               "\\tab{"
-                                               (CONS |tabset1|
-                                                (CONS "}"
-                                                 (CONS
-                                                  (ELT |setData| 1)
-                                                  (CONS
-                                                                                                       "\\tab{"
-                                                   (CONS |tabset2|
-                                                    (CONS
-                                                                                                           "}{\\em "
-                                                     (CONS
-                                                      (|htShowSetTreeValue|
-                                                       |setData|)
-                                                      (CONS
-                                                       "}"
-                                                       NIL))))))))))
-                                             NIL)
-                                            (CONS '|htShowSetPage|
-                                             (CONS (ELT |setData| 0)
-                                              NIL)))))
-                                 (|htMakePage|
-                                     (CONS
-                                      (CONS '|bcLispLinks|
-                                       (CONS |links|
-                                        (CONS '|options|
-                                         (CONS '(|indent| . 0) NIL))))
-                                      NIL))))))
-                  (|htSay| "\\enditems") (|htShowPage|)))))))
-
-;htShowCount s == --# discounting {\em .. }
-;  m := #s
-;  m < 8 => m - 1
-;  i := 0
-;  count := 0
-;  while i < m - 7 repeat
-;    s.i = char '_{ and  s.(i+1) = char '_\ and s.(i+2) = char 'e
-;      and s.(i+3) = char 'm => i := i + 6     --discount {\em }
-;    i := i + 1
-;    count := count + 1
-;  count + (m - i)
-
-(DEFUN |htShowCount| (|s|)
-  (PROG (|m| |i| |count|)
-    (RETURN
-      (SEQ (PROGN
-             (SPADLET |m| (|#| |s|))
-             (COND
-               ((> 8 |m|) (SPADDIFFERENCE |m| 1))
-               ('T (SPADLET |i| 0) (SPADLET |count| 0)
-                (DO () ((NULL (> (SPADDIFFERENCE |m| 7) |i|)) NIL)
-                  (SEQ (EXIT (COND
-                               ((AND (BOOT-EQUAL (ELT |s| |i|)
-                                      (|char| '{))
-                                     (BOOT-EQUAL (ELT |s| (PLUS |i| 1))
-                                      (|char| '|\\|))
-                                     (BOOT-EQUAL (ELT |s| (PLUS |i| 2))
-                                      (|char| '|e|))
-                                     (BOOT-EQUAL (ELT |s| (PLUS |i| 3))
-                                      (|char| '|m|)))
-                                (SPADLET |i| (PLUS |i| 6)))
-                               ('T (SPADLET |i| (PLUS |i| 1))
-                                (SPADLET |count| (PLUS |count| 1)))))))
-                (PLUS |count| (SPADDIFFERENCE |m| |i|)))))))))
-
-;htShowSetTreeValue(setData) ==
-;  st := setData.setType
-;  st = 'FUNCTION => object2String FUNCALL(setData.setVar,"%display%")
-;  st = 'INTEGER  => object2String eval setData.setVar
-;  st = 'STRING  => object2String eval setData.setVar
-;  st = 'LITERALS =>
-;    object2String translateTrueFalse2YesNo eval setData.setVar
-;  st = 'TREE     => '"..."
-;  systemError()
-
-(DEFUN |htShowSetTreeValue| (|setData|)
-  (PROG (|st|)
-    (RETURN
-      (PROGN
-        (SPADLET |st| (ELT |setData| 3))
-        (COND
-          ((BOOT-EQUAL |st| 'FUNCTION)
-           (|object2String| (FUNCALL (ELT |setData| 4) '|%display%|)))
-          ((BOOT-EQUAL |st| 'INTEGER)
-           (|object2String| (|eval| (ELT |setData| 4))))
-          ((BOOT-EQUAL |st| 'STRING)
-           (|object2String| (|eval| (ELT |setData| 4))))
-          ((BOOT-EQUAL |st| 'LITERALS)
-           (|object2String|
-               (|translateTrueFalse2YesNo| (|eval| (ELT |setData| 4)))))
-          ((BOOT-EQUAL |st| 'TREE) "...")
-          ('T (|systemError|)))))))
-
-;mkSetTitle() == STRCONC('"Command {\em )set ",listOfStrings2String $path,'"}")
-
-(DEFUN |mkSetTitle| ()
-  (declare (special |$path|))
-  (STRCONC "Command {\\em )set "
-           (|listOfStrings2String| |$path|) "}"))
-
-;listOfStrings2String u ==
-;  null u => '""
-;  STRCONC(listOfStrings2String rest u,'" ",stringize first u)
-
-(DEFUN |listOfStrings2String| (|u|)
-  (COND
-    ((NULL |u|) "")
-    ('T
-     (STRCONC (|listOfStrings2String| (CDR |u|)) " "
-              (|stringize| (CAR |u|))))))
-
-;htShowSetPage(htPage, branch) ==
-;  setTree := htpProperty(htPage, 'setTree)
-;  $path := [branch,:TAKE(- LASTATOM setTree,$path)]
-;  setData := ASSOC(branch, setTree)
-;  null setData =>
-;    systemError('"No Set Data")
-;  st := setData.setType
-;  st = 'FUNCTION => htShowFunctionPage(htPage, setData)
-;  st = 'INTEGER  =>  htShowIntegerPage(htPage,setData)
-;  st = 'LITERALS => htShowLiteralsPage(htPage, setData)
-;  st = 'TREE     => htShowSetTree(setData.setLeaf)
-;  st = 'STRING   =>  -- have to add this
-;     htSetNotAvailable(htPage,'")set compiler")
-;  systemError '"Unknown data type"
-
-(DEFUN |htShowSetPage| (|htPage| |branch|)
-  (PROG (|setTree| |setData| |st|)
-  (declare (special |$path|))
-    (RETURN
-      (PROGN
-        (SPADLET |setTree| (|htpProperty| |htPage| '|setTree|))
-        (SPADLET |$path|
-                 (CONS |branch|
-                       (TAKE (SPADDIFFERENCE (LASTATOM |setTree|))
-                             |$path|)))
-        (SPADLET |setData| (|assoc| |branch| |setTree|))
-        (COND
-          ((NULL |setData|) (|systemError| "No Set Data"))
-          ('T (SPADLET |st| (ELT |setData| 3))
-           (COND
-             ((BOOT-EQUAL |st| 'FUNCTION)
-              (|htShowFunctionPage| |htPage| |setData|))
-             ((BOOT-EQUAL |st| 'INTEGER)
-              (|htShowIntegerPage| |htPage| |setData|))
-             ((BOOT-EQUAL |st| 'LITERALS)
-              (|htShowLiteralsPage| |htPage| |setData|))
-             ((BOOT-EQUAL |st| 'TREE)
-              (|htShowSetTree| (ELT |setData| 5)))
-             ((BOOT-EQUAL |st| 'STRING)
-              (|htSetNotAvailable| |htPage|
-                  ")set compiler"))
-             ('T (|systemError| "Unknown data type")))))))))
-
-;htShowLiteralsPage(htPage, setData) ==
-;  htSetLiterals(htPage,setData.setName,setData.setLabel,
-;                setData.setVar,setData.setLeaf,'htSetLiteral)
-
-(DEFUN |htShowLiteralsPage| (|htPage| |setData|)
-  (|htSetLiterals| |htPage| (ELT |setData| 0) (ELT |setData| 1)
-      (ELT |setData| 4) (ELT |setData| 5) '|htSetLiteral|))
-
-;htSetLiterals(htPage,name,message,variable,values,functionToCall) ==
-;  page := htInitPage('"Set Command", htpPropertyList htPage)
-;  htpSetProperty(page, 'variable, variable)
-;  bcHt ['"\centerline{Set {\em ", name, '"}}\newline"]
-;  bcHt ['"{\em Description: } ", message, '"\newline\vspace{1} "]
-;  bcHt '"Select one of the following: \newline\tab{3} "
-;  links := [[STRCONC('"",STRINGIMAGE opt), '"\newline\tab{3}", functionToCall, opt] for opt in values]
-;  htMakePage [['bcLispLinks, :links]]
-;  bcHt ["\indent{0}\newline\vspace{1} The current setting is: {\em ",
-;        translateTrueFalse2YesNo EVAL variable, '"} "]
-;  htShowPage()
-
-(DEFUN |htSetLiterals|
-       (|htPage| |name| |message| |variable| |values| |functionToCall|)
-  (PROG (|page| |links|)
-    (RETURN
-      (SEQ (PROGN
-             (SPADLET |page|
-                      (|htInitPage| "Set Command"
-                          (|htpPropertyList| |htPage|)))
-             (|htpSetProperty| |page| '|variable| |variable|)
-             (|bcHt| (CONS "\\centerline{Set {\\em "
-                           (CONS |name|
-                                 (CONS "}}\\newline" NIL))))
-             (|bcHt| (CONS "{\\em Description: } "
-                           (CONS |message|
-                                 (CONS                                         "\\newline\\vspace{1} "
-                                       NIL))))
-             (|bcHt|                          "Select one of the following: \\newline\\tab{3} ")
-             (SPADLET |links|
-                      (PROG (G167460)
-                        (SPADLET G167460 NIL)
-                        (RETURN
-                          (DO ((G167465 |values| (CDR G167465))
-                               (|opt| NIL))
-                              ((OR (ATOM G167465)
-                                   (PROGN
-                                     (SETQ |opt| (CAR G167465))
-                                     NIL))
-                               (NREVERSE0 G167460))
-                            (SEQ (EXIT (SETQ G167460
-                                        (CONS
-                                         (CONS
-                                          (STRCONC ""
-                                           (STRINGIMAGE |opt|))
-                                          (CONS
-                                                                                       "\\newline\\tab{3}"
-                                           (CONS |functionToCall|
-                                            (CONS |opt| NIL))))
-                                         G167460))))))))
-             (|htMakePage| (CONS (CONS '|bcLispLinks| |links|) NIL))
-             (|bcHt| 
-              (CONS 
-              '|\\indent{0}\\newline\\vspace{1} The current setting is: {\\em |
-                           (CONS (|translateTrueFalse2YesNo|
-                                     (EVAL |variable|))
-                                 (CONS "} " NIL))))
-             (|htShowPage|))))))
-
-;htSetLiteral(htPage, val) ==
-;  htInitPage('"Set Command", nil)
-;  SET(htpProperty(htPage, 'variable), translateYesNo2TrueFalse val)
-;  htKill(htPage,val)
-
-(DEFUN |htSetLiteral| (|htPage| |val|)
-  (PROGN
-    (|htInitPage| "Set Command" NIL)
-    (SET (|htpProperty| |htPage| '|variable|)
-         (|translateYesNo2TrueFalse| |val|))
-    (|htKill| |htPage| |val|)))
-
-;htShowIntegerPage(htPage, setData) ==
-;  page := htInitPage(mkSetTitle(), htpPropertyList htPage)
-;  htpSetProperty(page, 'variable, setData.setVar)
-;  bcHt ['"\centerline{Set {\em ", setData.setName, '"}}\newline"]
-;--  message := isKeyedMsgInDb($path,'(setvar text A)) or setData.setLabel
-;  message := setData.setLabel
-;  bcHt ['"{\em Description: } ", message, '"\newline\vspace{1} "]
-;  [$htInitial,$htFinal] := setData.setLeaf
-;  if $htFinal = $htInitial + 1
-;    then
-;      bcHt '"Enter the integer {\em "
-;      bcHt stringize $htInitial
-;      bcHt '"} or {\em "
-;      bcHt stringize $htFinal
-;      bcHt '"}:"
-;    else if null $htFinal then
-;      bcHt '"Enter an integer greater than {\em "
-;      bcHt stringize ($htInitial - 1)
-;      bcHt '"}:"
-;    else
-;      bcHt '"Enter an integer between {\em "
-;      bcHt stringize $htInitial
-;      bcHt '"} and {\em "
-;      bcHt stringize $htFinal
-;      bcHt '"}:"
-;  htMakePage [
-;    '(domainConditions (Satisfies S chkRange)),
-;      ['bcStrings,[5,eval setData.setVar,'value,'S]]]
-;  htSetvarDoneButton('"Select to Set Value",'htSetInteger)
-;  htShowPage()
-
-(DEFUN |htShowIntegerPage| (|htPage| |setData|)
-  (PROG (|page| |message| |LETTMP#1|)
-  (declare (special |$htFinal| |$htInitial|))
-    (RETURN
-      (PROGN
-        (SPADLET |page|
-                 (|htInitPage| (|mkSetTitle|)
-                     (|htpPropertyList| |htPage|)))
-        (|htpSetProperty| |page| '|variable| (ELT |setData| 4))
-        (|bcHt| (CONS "\\centerline{Set {\\em "
-                      (CONS (ELT |setData| 0)
-                            (CONS "}}\\newline" NIL))))
-        (SPADLET |message| (ELT |setData| 1))
-        (|bcHt| (CONS "{\\em Description: } "
-                      (CONS |message|
-                            (CONS "\\newline\\vspace{1} "
-                                  NIL))))
-        (SPADLET |LETTMP#1| (ELT |setData| 5))
-        (SPADLET |$htInitial| (CAR |LETTMP#1|))
-        (SPADLET |$htFinal| (CADR |LETTMP#1|))
-        (COND
-          ((BOOT-EQUAL |$htFinal| (PLUS |$htInitial| 1))
-           (|bcHt| "Enter the integer {\\em ")
-           (|bcHt| (|stringize| |$htInitial|))
-           (|bcHt| "} or {\\em ")
-           (|bcHt| (|stringize| |$htFinal|))
-           (|bcHt| "}:"))
-          ((NULL |$htFinal|)
-           (|bcHt| "Enter an integer greater than {\\em ")
-           (|bcHt| (|stringize| (SPADDIFFERENCE |$htInitial| 1)))
-           (|bcHt| "}:"))
-          ('T (|bcHt| "Enter an integer between {\\em ")
-           (|bcHt| (|stringize| |$htInitial|))
-           (|bcHt| "} and {\\em ")
-           (|bcHt| (|stringize| |$htFinal|))
-           (|bcHt| "}:")))
-        (|htMakePage|
-            (CONS '(|domainConditions| (|Satisfies| S |chkRange|))
-                  (CONS (CONS '|bcStrings|
-                              (CONS (CONS 5
-                                     (CONS (|eval| (ELT |setData| 4))
-                                      (CONS '|value| (CONS 'S NIL))))
-                                    NIL))
-                        NIL)))
-        (|htSetvarDoneButton| "Select to Set Value"
-            '|htSetInteger|)
-        (|htShowPage|)))))
-
-;htSetInteger(htPage) ==
-;  htInitPage(mkSetTitle(), nil)
-;  val := chkRange htpLabelInputString(htPage,'value)
-;  not INTEGERP val =>
-;    errorPage(htPage,['"Value Error",nil,'"\vspace{3}\centerline{{\em ",val,'"}}\vspace{2}\newline\centerline{Click on \UpBitmap{} to re-enter value}"])
-;  SET(htpProperty(htPage, 'variable), val)
-;  htKill(htPage,val)
-
-(DEFUN |htSetInteger| (|htPage|)
-  (PROG (|val|)
-    (RETURN
-      (PROGN
-        (|htInitPage| (|mkSetTitle|) NIL)
-        (SPADLET |val|
-                 (|chkRange| (|htpLabelInputString| |htPage| '|value|)))
-        (COND
-          ((NULL (INTEGERP |val|))
-           (|errorPage| |htPage|
-               (CONS "Value Error"
-                     (CONS NIL
-                           (CONS                                      "\\vspace{3}\\centerline{{\\em "
-                                 (CONS |val|
-                                       (CONS
-                                         "}}\\vspace{2}\\newline\\centerline{Click on \\UpBitmap{} to re-enter value}"
-                                        NIL)))))))
-          ('T (SET (|htpProperty| |htPage| '|variable|) |val|)
-           (|htKill| |htPage| |val|)))))))
-
-;htShowFunctionPage(htPage,setData) ==
-;  fn := setData.setDef => FUNCALL(fn,htPage)
-;  htpSetProperty(htPage,'setData,setData)
-;  htpSetProperty(htPage,'parts, setData.setLeaf)
-;  htShowFunctionPageContinued(htPage)
-
-(DEFUN |htShowFunctionPage| (|htPage| |setData|)
-  (PROG (|fn|)
-    (RETURN
-      (COND
-        ((SPADLET |fn| (ELT |setData| 6)) (FUNCALL |fn| |htPage|))
-        ('T (|htpSetProperty| |htPage| '|setData| |setData|)
-         (|htpSetProperty| |htPage| '|parts| (ELT |setData| 5))
-         (|htShowFunctionPageContinued| |htPage|))))))
-
-;htShowFunctionPageContinued(htPage) ==
-;  parts := htpProperty(htPage,'parts)
-;  setData := htpProperty(htPage,'setData)
-;  [[phrase,kind,variable,checker,initValue,:.],:restParts] := parts
-;  htpSetProperty(htPage, 'variable, variable)
-;  htpSetProperty(htPage, 'checker, checker)
-;  htpSetProperty(htPage, 'parts, restParts)
-;  kind = 'LITERALS => htSetLiterals(htPage,setData.setName,
-;                               phrase,variable,checker,'htFunctionSetLiteral)
-;  page := htInitPage(mkSetTitle(), htpPropertyList htPage)
-;  bcHt ['"\centerline{Set {\em ", setData.setName, '"}}\newline"]
-;  bcHt ['"{\em Description: } ", setData.setLabel, '"\newline\vspace{1} "]
-;  currentValue := EVAL variable
-;  htMakePage
-;    [ ['domainConditions, ['Satisfies,'S,checker]],
-;      ['text,:phrase],
-;        ['inputStrings,
-;          [ '"", '"", 60, currentValue, 'value, 'S]]]
-;  htSetvarDoneButton('"Select To Set Value",'htSetFunCommand)
-;  htShowPage()
-
-(DEFUN |htShowFunctionPageContinued| (|htPage|)
-  (PROG (|parts| |setData| |phrase| |kind| |variable| |checker|
-                 |initValue| |restParts| |page| |currentValue|)
-    (RETURN
-      (PROGN
-        (SPADLET |parts| (|htpProperty| |htPage| '|parts|))
-        (SPADLET |setData| (|htpProperty| |htPage| '|setData|))
-        (SPADLET |phrase| (CAAR |parts|))
-        (SPADLET |kind| (CADAR |parts|))
-        (SPADLET |variable| (CADDAR |parts|))
-        (SPADLET |checker| (CAR (CDDDAR |parts|)))
-        (SPADLET |initValue| (CADR (CDDDAR |parts|)))
-        (SPADLET |restParts| (CDR |parts|))
-        (|htpSetProperty| |htPage| '|variable| |variable|)
-        (|htpSetProperty| |htPage| '|checker| |checker|)
-        (|htpSetProperty| |htPage| '|parts| |restParts|)
-        (COND
-          ((BOOT-EQUAL |kind| 'LITERALS)
-           (|htSetLiterals| |htPage| (ELT |setData| 0) |phrase|
-               |variable| |checker| '|htFunctionSetLiteral|))
-          ('T
-           (SPADLET |page|
-                    (|htInitPage| (|mkSetTitle|)
-                        (|htpPropertyList| |htPage|)))
-           (|bcHt| (CONS "\\centerline{Set {\\em "
-                         (CONS (ELT |setData| 0)
-                               (CONS "}}\\newline" NIL))))
-           (|bcHt| (CONS "{\\em Description: } "
-                         (CONS (ELT |setData| 1)
-                               (CONS                                       "\\newline\\vspace{1} "
-                                     NIL))))
-           (SPADLET |currentValue| (EVAL |variable|))
-           (|htMakePage|
-               (CONS (CONS '|domainConditions|
-                           (CONS (CONS '|Satisfies|
-                                       (CONS 'S (CONS |checker| NIL)))
-                                 NIL))
-                     (CONS (CONS '|text| |phrase|)
-                           (CONS (CONS '|inputStrings|
-                                       (CONS
-                                        (CONS ""
-                                         (CONS ""
-                                          (CONS 60
-                                           (CONS |currentValue|
-                                            (CONS '|value|
-                                             (CONS 'S NIL))))))
-                                        NIL))
-                                 NIL))))
-           (|htSetvarDoneButton| "Select To Set Value"
-               '|htSetFunCommand|)
-           (|htShowPage|)))))))
-
-;htSetvarDoneButton(message, func) ==
-;  bcHt '"\newline\vspace{1}\centerline{"
-;  if message = '"Select to Set Value" or message = '"Select to Set Values"  then
-;    bchtMakeButton('"\lisplink",'"\ControlBitmap{clicktoset}", func)
-;  else
-;    bchtMakeButton('"\lisplink",CONCAT('"\fbox{", message, '"}"), func)
-;  bcHt '"} "
-
-(DEFUN |htSetvarDoneButton| (|message| |func|)
-  (PROGN
-    (|bcHt| "\\newline\\vspace{1}\\centerline{")
-    (COND
-      ((OR (BOOT-EQUAL |message| "Select to Set Value")
-           (BOOT-EQUAL |message| "Select to Set Values"))
-       (|bchtMakeButton| "\\lisplink"
-           "\\ControlBitmap{clicktoset}" |func|))
-      ('T
-       (|bchtMakeButton| "\\lisplink"
-           (CONCAT "\\fbox{" |message| "}")
-           |func|)))
-    (|bcHt| "} ")))
-
-;htFunctionSetLiteral(htPage, val) ==
-;  htInitPage('"Set Command", nil)
-;  SET(htpProperty(htPage, 'variable), translateYesNo2TrueFalse val)
-;  htSetFunCommandContinue(htPage,val)
-
-(DEFUN |htFunctionSetLiteral| (|htPage| |val|)
-  (PROGN
-    (|htInitPage| "Set Command" NIL)
-    (SET (|htpProperty| |htPage| '|variable|)
-         (|translateYesNo2TrueFalse| |val|))
-    (|htSetFunCommandContinue| |htPage| |val|)))
-
-;htSetFunCommand(htPage) ==
-;  variable := htpProperty(htPage,'variable)
-;  checker := htpProperty(htPage,'checker)
-;  value := htCheck(checker,htpLabelInputString(htPage,'value))
-;  SET(variable,value) --kill this later
-;  htSetFunCommandContinue(htPage,value)
-
-(DEFUN |htSetFunCommand| (|htPage|)
-  (PROG (|variable| |checker| |value|)
-    (RETURN
-      (PROGN
-        (SPADLET |variable| (|htpProperty| |htPage| '|variable|))
-        (SPADLET |checker| (|htpProperty| |htPage| '|checker|))
-        (SPADLET |value|
-                 (|htCheck| |checker|
-                     (|htpLabelInputString| |htPage| '|value|)))
-        (SET |variable| |value|)
-        (|htSetFunCommandContinue| |htPage| |value|)))))
-
-;htSetFunCommandContinue(htPage,value) ==
-;  parts := htpProperty(htPage,'parts)
-;  continue :=
-;    null parts => false
-;    parts is [['break,predicate],:restParts] => eval predicate
-;    true
-;  continue =>
-;    htpSetProperty(htPage,'parts,restParts)
-;    htShowFunctionPageContinued(htPage)
-;  htKill(htPage,value)
-
-(DEFUN |htSetFunCommandContinue| (|htPage| |value|)
-  (PROG (|parts| |ISTMP#1| |ISTMP#2| |predicate| |restParts|
-                 |continue|)
-    (RETURN
-      (PROGN
-        (SPADLET |parts| (|htpProperty| |htPage| '|parts|))
-        (SPADLET |continue|
-                 (COND
-                   ((NULL |parts|) NIL)
-                   ((AND (CONSP |parts|)
-                         (PROGN
-                           (SPADLET |ISTMP#1| (QCAR |parts|))
-                           (AND (CONSP |ISTMP#1|)
-                                (EQ (QCAR |ISTMP#1|) '|break|)
-                                (PROGN
-                                  (SPADLET |ISTMP#2| (QCDR |ISTMP#1|))
-                                  (AND (CONSP |ISTMP#2|)
-                                       (EQ (QCDR |ISTMP#2|) NIL)
-                                       (PROGN
-                                         (SPADLET |predicate|
-                                          (QCAR |ISTMP#2|))
-                                         'T)))))
-                         (PROGN
-                           (SPADLET |restParts| (QCDR |parts|))
-                           'T))
-                    (|eval| |predicate|))
-                   ('T 'T)))
-        (COND
-          (|continue| (|htpSetProperty| |htPage| '|parts| |restParts|)
-              (|htShowFunctionPageContinued| |htPage|))
-          ('T (|htKill| |htPage| |value|)))))))
-
-;htKill(htPage,value) ==
-;  htInitPage('"System Command", nil)
-;  string := STRCONC('"{\em )set ",listOfStrings2String [value,:$path],'"}")
-;  htMakePage [
-;     '(text
-;        "{Here is the AXIOM system command you could have issued:}"
-;            "\vspace{2}\newline\centerline{\tt"),
-;      ['text,:string]]
-;  htMakePage '((text . "}\vspace{1}\newline\rm"))
-;  htSay '"\vspace{2}{Select \  \UpButton{} \  to go back.}"
-;  htSay '"\newline{Select \  \ExitButton{QuitPage} \  to remove this window.}"
-;  htProcessDoitButton ['"Press to Remove Page",'"",'htDoNothing]
-;  htShowPage()
-
-(DEFUN |htKill| (|htPage| |value|)
-  (declare (ignore |htPage|))
-  (PROG (|string|)
-  (declare (special |$path|))
-    (RETURN
-      (PROGN
-        (|htInitPage| "System Command" NIL)
-        (SPADLET |string|
-                 (STRCONC "{\\em )set "
-                          (|listOfStrings2String|
-                              (CONS |value| |$path|))
-                          "}"))
-        (|htMakePage|
-     (CONS '(|text| "{Here is the AXIOM system command you could have issued:}"
-                           "\\vspace{2}\\newline\\centerline{\\tt")
-                  (CONS (CONS '|text| |string|) NIL)))
-        (|htMakePage| '((|text| . "}\\vspace{1}\\newline\\rm")))
-        (|htSay|                      "\\vspace{2}{Select \\  \\UpButton{} \\  to go back.}")
-        (|htSay|     "\\newline{Select \\  \\ExitButton{QuitPage} \\  to remove this window.}")
-        (|htProcessDoitButton|
-            (CONS "Press to Remove Page"
-                  (CONS "" (CONS '|htDoNothing| NIL))))
-        (|htShowPage|)))))
-
-;htSetNotAvailable(htPage,whatToType) ==
-;  page := htInitPage('"Unavailable Set Command", htpPropertyList htPage)
-;  htInitPage('"Unavailable System Command", nil)
-;  string := STRCONC('"{\em ",whatToType,'"}")
-;  htMakePage [
-;     '(text "\vspace{1}\newline"
-;        "{Sorry, but this system command is not available through HyperDoc. Please directly issue this command in an AXIOM window for more information:}"
-;            "\vspace{2}\newline\centerline{\tt"),
-;      ['text,:string]]
-;  htMakePage '((text . "}\vspace{1}\newline"))
-;  htProcessDoitButton ['"Press to Remove Page",'"",'htDoNothing]
-;  htShowPage()
-
-(DEFUN |htSetNotAvailable| (|htPage| |whatToType|)
-  (PROG (|page| |string|)
-    (RETURN
-      (PROGN
-        (SPADLET |page|
-                 (|htInitPage| "Unavailable Set Command"
-                     (|htpPropertyList| |htPage|)))
-        (|htInitPage| "Unavailable System Command" NIL)
-        (SPADLET |string|
-                 (STRCONC "{\\em " |whatToType|
-                          "}"))
-        (|htMakePage|
-            (CONS '(|text| "\\vspace{1}\\newline"
- "{Sorry, but this system command is not available through HyperDoc. Please directly issue this command in an AXIOM window for more information:}"
-                           "\\vspace{2}\\newline\\centerline{\\tt")
-                  (CONS (CONS '|text| |string|) NIL)))
-        (|htMakePage| '((|text| . "}\\vspace{1}\\newline")))
-        (|htProcessDoitButton|
-            (CONS "Press to Remove Page"
-                  (CONS "" (CONS '|htDoNothing| NIL))))
-        (|htShowPage|)))))
-
-;htDoNothing(htPage,command) == nil
-
-(DEFUN |htDoNothing| (|htPage| |command|)
- (declare (ignore |htPage| |command|))
- NIL) 
-
-;htCheck(checker,value) ==
-;  CONSP checker => htCheckList(checker,parseWord value)
-;  FUNCALL(checker,value)
-
-(DEFUN |htCheck| (|checker| |value|)
-  (COND
-    ((CONSP |checker|) (|htCheckList| |checker| (|parseWord| |value|)))
-    ('T (FUNCALL |checker| |value|))))
-
-;parseWord x ==
-;  STRINGP x =>
-;    and/[DIGITP x.i for i in 0..MAXINDEX x] => PARSE_-INTEGER x
-;    INTERN x
-;  x
-
-(DEFUN |parseWord| (|x|)
-  (PROG ()
-    (RETURN
-      (SEQ (COND
-             ((STRINGP |x|)
-              (COND
-                ((PROG (G167588)
-                   (SPADLET G167588 'T)
-                   (RETURN
-                     (DO ((G167594 NIL (NULL G167588))
-                          (G167595 (MAXINDEX |x|))
-                          (|i| 0 (QSADD1 |i|)))
-                         ((OR G167594 (QSGREATERP |i| G167595))
-                          G167588)
-                       (SEQ (EXIT (SETQ G167588
-                                        (AND G167588
-                                         (DIGITP (ELT |x| |i|)))))))))
-                 (PARSE-INTEGER |x|))
-                ('T (INTERN |x|))))
-             ('T |x|))))))
-
-;htCheckList(checker,value) ==
-;  if value in '(y ye yes Y YE YES) then value := 'yes
-;  if value in '(n no N NO) then value := 'no
-;  checker is [n,m] and INTEGERP n =>
-;    m = n + 1 =>
-;      value in checker => value
-;      n
-;    null m =>
-;      INTEGERP value and value >= n => value
-;      n
-;    INTEGERP m =>
-;      INTEGERP value and value >= n and value <= m => value
-;      n
-;  value in checker => value
-;  first checker
-
-(DEFUN |htCheckList| (|checker| |value|)
-  (PROG (|n| |ISTMP#1| |m|)
-    (RETURN
-      (PROGN
-        (COND
-          ((|member| |value| '(|y| |ye| |yes| Y YE YES))
-           (SPADLET |value| '|yes|)))
-        (COND
-          ((|member| |value| '(|n| |no| N NO)) (SPADLET |value| '|no|)))
-        (COND
-          ((AND (CONSP |checker|)
-                (PROGN
-                  (SPADLET |n| (QCAR |checker|))
-                  (SPADLET |ISTMP#1| (QCDR |checker|))
-                  (AND (CONSP |ISTMP#1|) (EQ (QCDR |ISTMP#1|) NIL)
-                       (PROGN (SPADLET |m| (QCAR |ISTMP#1|)) 'T)))
-                (INTEGERP |n|))
-           (COND
-             ((BOOT-EQUAL |m| (PLUS |n| 1))
-              (COND ((|member| |value| |checker|) |value|) ('T |n|)))
-             ((NULL |m|)
-              (COND
-                ((AND (INTEGERP |value|) (>= |value| |n|)) |value|)
-                ('T |n|)))
-             ((INTEGERP |m|)
-              (COND
-                ((AND (INTEGERP |value|) (>= |value| |n|)
-                      (<= |value| |m|))
-                 |value|)
-                ('T |n|)))))
-          ((|member| |value| |checker|) |value|)
-          ('T (CAR |checker|)))))))
-
-;--  emlist := "STRCONC"/[STRCONC('" {\em ",PNAME x,'"} ") for x in checker]
-;--  STRCONC('"Please enter one of: ",emlist)
-;translateYesNoToTrueFalse x ==
-;  x = 'yes => true
-;  x = 'no => false
-;  x
-
-(DEFUN |translateYesNoToTrueFalse| (|x|)
-  (COND
-    ((BOOT-EQUAL |x| '|yes|) 'T)
-    ((BOOT-EQUAL |x| '|no|) NIL)
-    ('T |x|)))
-
-;chkNameList x ==
-;  u := bcString2ListWords x
-;  parsedNames := [ncParseFromString x for x in u]
-;  and/[IDENTP x for x in parsedNames] => parsedNames
-;  '"Please enter a list of identifiers separated by blanks"
-
-(DEFUN |chkNameList| (|x|)
-  (PROG (|u| |parsedNames|)
-    (RETURN
-      (SEQ (PROGN
-             (SPADLET |u| (|bcString2ListWords| |x|))
-             (SPADLET |parsedNames|
-                      (PROG (G167635)
-                        (SPADLET G167635 NIL)
-                        (RETURN
-                          (DO ((G167640 |u| (CDR G167640))
-                               (|x| NIL))
-                              ((OR (ATOM G167640)
-                                   (PROGN
-                                     (SETQ |x| (CAR G167640))
-                                     NIL))
-                               (NREVERSE0 G167635))
-                            (SEQ (EXIT (SETQ G167635
-                                        (CONS (|ncParseFromString| |x|)
-                                         G167635))))))))
-             (COND
-               ((PROG (G167646)
-                  (SPADLET G167646 'T)
-                  (RETURN
-                    (DO ((G167652 NIL (NULL G167646))
-                         (G167653 |parsedNames| (CDR G167653))
-                         (|x| NIL))
-                        ((OR G167652 (ATOM G167653)
-                             (PROGN (SETQ |x| (CAR G167653)) NIL))
-                         G167646)
-                      (SEQ (EXIT (SETQ G167646
-                                       (AND G167646 (IDENTP |x|))))))))
-                |parsedNames|)
-               ('T
-                               "Please enter a list of identifiers separated by blanks")))))))
-
-;chkPosInteger s ==
-;  (u := parseOnly s) and INTEGERP u and u > 0 => u
-;  '"Please enter a positive integer"
-
-(DEFUN |chkPosInteger| (|s|)
-  (PROG (|u|)
-    (RETURN
-      (COND
-        ((AND (SPADLET |u| (|parseOnly| |s|)) (INTEGERP |u|) (> |u| 0))
-         |u|)
-        ('T "Please enter a positive integer")))))
-
-;chkOutputFileName s ==
-;  bcString2WordList s in '(CONSOLE console) => 'console
-;  chkDirectory s
-
-(DEFUN |chkOutputFileName| (|s|)
-  (COND
-    ((|member| (|bcString2WordList| |s|) '(CONSOLE |console|))
-     '|console|)
-    ('T (|chkDirectory| |s|))))
-
-;chkDirectory s == s
-
-(DEFUN |chkDirectory| (|s|) |s|) 
-
-;chkNonNegativeInteger s ==
-;  (u := ncParseFromString s) and INTEGERP u and u >= 0 => u
-;  '"Please enter a non-negative integer"
-
-(DEFUN |chkNonNegativeInteger| (|s|)
-  (PROG (|u|)
-    (RETURN
-      (COND
-        ((AND (SPADLET |u| (|ncParseFromString| |s|)) (INTEGERP |u|)
-              (>= |u| 0))
-         |u|)
-        ('T "Please enter a non-negative integer")))))
-
-;chkRange s ==
-;  (u := ncParseFromString s) and INTEGERP u
-;    and u >= $htInitial and (NULL $htFinal or u <= $htFinal)
-;      => u
-;  null $htFinal =>
-;    STRCONC('"Please enter an integer greater than ",stringize ($htInitial - 1))
-;  STRCONC('"Please enter an integer between ",stringize $htInitial,'" and ",
-;            stringize $htFinal)
-
-(DEFUN |chkRange| (|s|)
-  (PROG (|u|)
-  (declare (special |$htFinal| |$htInitial|))
-    (RETURN
-      (COND
-        ((AND (SPADLET |u| (|ncParseFromString| |s|)) (INTEGERP |u|)
-              (>= |u| |$htInitial|)
-              (OR (NULL |$htFinal|) (<= |u| |$htFinal|)))
-         |u|)
-        ((NULL |$htFinal|)
-         (STRCONC "Please enter an integer greater than "
-                  (|stringize| (SPADDIFFERENCE |$htInitial| 1))))
-        ('T
-         (STRCONC "Please enter an integer between "
-                  (|stringize| |$htInitial|) " and "
-                  (|stringize| |$htFinal|)))))))
-
-;chkAllNonNegativeInteger s ==
-;  (u := ncParseFromString s) and u in '(a al all A AL ALL) and 'ALL
-;    or chkNonNegativeInteger s
-;       or '"Please enter {\em all} or a non-negative integer"
-
-(DEFUN |chkAllNonNegativeInteger| (|s|)
-  (PROG (|u|)
-    (RETURN
-      (OR (AND (SPADLET |u| (|ncParseFromString| |s|))
-               (|member| |u| '(|a| |al| |all| A AL ALL)) 'ALL)
-          (|chkNonNegativeInteger| |s|)
-                        "Please enter {\\em all} or a non-negative integer"))))
-
-;htMakePathKey path ==
-;  null path => systemError '"path is not set"
-;  INTERN fn(PNAME first path,rest path) where
-;    fn(a,b) ==
-;      null b => a
-;      fn(STRCONC(a,'".",PNAME first b),rest b)
-
-(DEFUN |htMakePathKey,fn| (|a| |b|)
-  (SEQ (IF (NULL |b|) (EXIT |a|))
-       (EXIT (|htMakePathKey,fn|
-                 (STRCONC |a| "." (PNAME (CAR |b|)))
-                 (CDR |b|)))))
-
-(DEFUN |htMakePathKey| (|path|)
-  (COND
-    ((NULL |path|) (|systemError| "path is not set"))
-    ('T
-     (INTERN (|htMakePathKey,fn| (PNAME (CAR |path|)) (CDR |path|))))))
-
-;htMarkTree(tree,n) ==
-;  RPLACD(LASTTAIL tree,n)
-;  for branch in tree repeat
-;    branch.3 = 'TREE => htMarkTree(branch.5,n + 1)
-
-(DEFUN |htMarkTree| (|tree| |n|)
-  (SEQ (PROGN
-         (RPLACD (LASTTAIL |tree|) |n|)
-         (SEQ (DO ((G167706 |tree| (CDR G167706)) (|branch| NIL))
-                  ((OR (ATOM G167706)
-                       (PROGN (SETQ |branch| (CAR G167706)) NIL))
-                   NIL)
-                (SEQ (EXIT (COND
-                             ((BOOT-EQUAL (ELT |branch| 3) 'TREE)
-                              (EXIT (|htMarkTree| (ELT |branch| 5)
-                                     (PLUS |n| 1))))))))))))
-
-;htSetHistory htPage ==
-;  msg := "when the history facility is on (yes), results of computations are saved in memory"
-;  data := ['history,msg,'history,'LITERALS,'$HiFiAccess,'(on off yes no)]
-;  htShowLiteralsPage(htPage,data)
-
-(DEFUN |htSetHistory| (|htPage|)
-  (PROG (|msg| |data|)
-    (RETURN
-      (PROGN
-        (SPADLET |msg|
- '|when the history facility is on (yes), results of computations are saved in memory|)
-        (SPADLET |data|
-                 (CONS '|history|
-                       (CONS |msg|
-                             (CONS '|history|
-                                   (CONS 'LITERALS
-                                    (CONS '|$HiFiAccess|
-                                     (CONS '(|on| |off| |yes| |no|)
-                                      NIL)))))))
-        (|htShowLiteralsPage| |htPage| |data|)))))
-
-;htSetOutputLibrary htPage ==
-;  htSetNotAvailable(htPage,'")set compiler output")
-
-(DEFUN |htSetOutputLibrary| (|htPage|)
-  (|htSetNotAvailable| |htPage| ")set compiler output"))
-
-;htSetInputLibrary htPage ==
-;  htSetNotAvailable(htPage,'")set compiler input")
-
-(DEFUN |htSetInputLibrary| (|htPage|)
-  (|htSetNotAvailable| |htPage| ")set compiler input"))
-
-;htSetExpose htPage ==
-;  htSetNotAvailable(htPage,'")set expose")
-
-(DEFUN |htSetExpose| (|htPage|)
-  (|htSetNotAvailable| |htPage| ")set expose"))
-
-
-;htSetOutputCharacters htPage ==
-;  htSetNotAvailable(htPage,'")set output characters")
-
-(DEFUN |htSetOutputCharacters| (|htPage|)
-  (|htSetNotAvailable| |htPage| ")set output characters"))
-
-;htSetLinkerArgs htPage ==
-;  htSetNotAvailable(htPage,'")set fortran calling linker")
-
-(DEFUN |htSetLinkerArgs| (|htPage|)
-  (|htSetNotAvailable| |htPage|
-      ")set fortran calling linker"))
-
-;htSetCache(htPage,:options) ==
-;  $path := '(functions cache)
-;  htPage := htInitPage(mkSetTitle(),nil)
-;  $valueList := nil
-;  htMakePage '(
-;   (text
-;    "Use this system command to cause the AXIOM interpreter to `remember' "
-;    "past values of interpreter functions. "
-;    "To remember a past value of a function, the interpreter "
-;    "sets up a {\em cache} for that function based on argument values. "
-;    "When a value is cached for a given argument value, its value is gotten "
-;    "from the cache and not recomputed. Caching can often save much "
-;    "computing time, particularly with recursive functions or functions that "
-;    "are expensive to compute and that are called repeatedly "
-;    "with the same argument."
-;    "\vspace{1}\newline ")
-;   (domainConditions (Satisfies S chkNameList))
-;   (text
-;"Enter below a list of interpreter functions you would like specially cached."
-;      "Use the name {\em all} to give a default setting for all "
-;      "interpreter functions. "
-;      "\vspace{1}\newline "
-;      "Enter {\em all} or a list of names (separate names by blanks):")
-;   (inputStrings ("" "" 60 "all" names S))
-;   (doneButton "Push to enter names" htCacheAddChoice))
-;  htShowPage()
-
-(DEFUN |htSetCache| (&REST G167749 &AUX |options| |htPage|)
-  (declare (special |$valueList| |$path|))
-  (DSETQ (|htPage| . |options|) G167749)
-  (PROGN
-    (SPADLET |$path| '(|functions| |cache|))
-    (SPADLET |htPage| (|htInitPage| (|mkSetTitle|) NIL))
-    (SPADLET |$valueList| NIL)
-    (|htMakePage|
-        '((|text| 
-        "Use this system command to cause the AXIOM interpreter to `remember' "
-                  "past values of interpreter functions. "
-                  "To remember a past value of a function, the interpreter "
-          "sets up a {\\em cache} for that function based on argument values. "
-      "When a value is cached for a given argument value, its value is gotten "
-              "from the cache and not recomputed. Caching can often save much "
-     "computing time, particularly with recursive functions or functions that "
-                  "are expensive to compute and that are called repeatedly "
-                  "with the same argument." "\\vspace{1}\\newline ")
-          (|domainConditions| (|Satisfies| S |chkNameList|))
-  (|text| 
-"Enter below a list of interpreter functions you would like specially cached. "
-                  "Use the name {\\em all} to give a default setting for all "
-                  "interpreter functions. " "\\vspace{1}\\newline "
-             "Enter {\\em all} or a list of names (separate names by blanks):")
-          (|inputStrings| ("" "" 60 "all" |names| S))
-          (|doneButton| "Push to enter names" |htCacheAddChoice|)))
-    (|htShowPage|)))
-
-;htCacheAddChoice htPage ==
-;  names := bcString2WordList htpLabelInputString(htPage,'names)
-;  $valueList := [listOfStrings2String names,:$valueList]
-;  null names => htCacheAddQuery()
-;  null rest names => htCacheOne names
-;  page := htInitPage(mkSetTitle(),nil)
-;  htpSetProperty(page,'names,names)
-;  htMakePage '(
-;    (domainConditions (Satisfies ALLPI chkAllPositiveInteger))
-;    (text
-;      "For each function, enter below a {\em cache length}, a positive integer. "
-;      "This number tells how many past values will "
-;      "be cached. "
-;      "A cache length of {\em 0} means the function won't be cached. "
-;      "To cache all past values, "
-;      "enter {\em all}."
-;      "\vspace{1}\newline "
-;      "For each function name, enter {\em all} or a positive integer:"))
-;  for i in 1.. for name in names repeat htMakePage [
-;      ['inputStrings,
-;        [STRCONC('"Function {\em ",name,'"} will cache"),
-;          '"values",5,10,htMakeLabel('"c",i),'ALLPI]]]
-;  htSetvarDoneButton('"Select to Set Values",'htCacheSet)
-;  htShowPage()
-
-(DEFUN |htCacheAddChoice| (|htPage|)
-  (PROG (|names| |page|)
-  (declare (special |$valueList|))
-    (RETURN
-      (SEQ (PROGN
-             (SPADLET |names|
-                      (|bcString2WordList|
-                          (|htpLabelInputString| |htPage| '|names|)))
-             (SPADLET |$valueList|
-                      (CONS (|listOfStrings2String| |names|)
-                            |$valueList|))
-             (COND
-               ((NULL |names|) (|htCacheAddQuery|))
-               ((NULL (CDR |names|)) (|htCacheOne| |names|))
-               ('T (SPADLET |page| (|htInitPage| (|mkSetTitle|) NIL))
-                (|htpSetProperty| |page| '|names| |names|)
-                (|htMakePage|
-                    '((|domainConditions|
-                          (|Satisfies| ALLPI |chkAllPositiveInteger|))
-                      (|text| "For each function, enter below a {\\em cache length}, a positive integer. "
-                              "This number tells how many past values will "
-                              "be cached. "
-                              "A cache length of {\\em 0} means the function won't be cached. "
-                              "To cache all past values, "
-                              "enter {\\em all}."
-                              "\\vspace{1}\\newline "
-                              "For each function name, enter {\\em all} or a positive integer:")))
-                (DO ((|i| 1 (QSADD1 |i|))
-                     (G167755 |names| (CDR G167755)) (|name| NIL))
-                    ((OR (ATOM G167755)
-                         (PROGN (SETQ |name| (CAR G167755)) NIL))
-                     NIL)
-                  (SEQ (EXIT (|htMakePage|
-                                 (CONS (CONS '|inputStrings|
-                                        (CONS
-                                         (CONS
-                                          (STRCONC
-                                                                                       "Function {\\em "
-                                           |name|
-                                           "} will cache")
-                                          (CONS "values"
-                                           (CONS 5
-                                            (CONS 10
-                                             (CONS
-                                              (|htMakeLabel|
-                                               "c" |i|)
-                                              (CONS 'ALLPI NIL))))))
-                                         NIL))
-                                       NIL)))))
-                (|htSetvarDoneButton|
-                    "Select to Set Values" '|htCacheSet|)
-                (|htShowPage|))))))))
-
-;htMakeLabel(prefix,i) == INTERN STRCONC(prefix,stringize i)
-
-(DEFUN |htMakeLabel| (|prefix| |i|)
-  (INTERN (STRCONC |prefix| (|stringize| |i|))))
-
-;htCacheSet htPage ==
-;  names := htpProperty(htPage,'names)
-;  for i in 1.. for name in names repeat
-;    num := chkAllNonNegativeInteger
-;             htpLabelInputString(htPage,htMakeLabel('"c",i))
-;    $cacheAlist := ADDASSOC(INTERN name,num,$cacheAlist)
-;  if (n := LASSOC('all,$cacheAlist)) then
-;    $cacheCount := n
-;    $cacheAlist := deleteAssoc('all,$cacheAlist)
-;  htInitPage('"Cache Summary",nil)
-;  bcHt '"In general, interpreter functions "
-;  bcHt
-;    $cacheCount = 0 => "will {\em not} be cached."
-;    bcHt '"cache "
-;    htAllOrNum $cacheCount
-;    '"} values."
-;  bcHt '"\vspace{1}\newline "
-;  if $cacheAlist then
-;--    bcHt '" However, \indent{3}"
-;    for [name,:val] in $cacheAlist | val ^= $cacheCount repeat
-;      bcHt '"\newline function {\em "
-;      bcHt stringize name
-;      bcHt '"} will cache "
-;      htAllOrNum val
-;      bcHt '"} values"
-;  htProcessDoitButton ['"Press to Remove Page",'"",'htDoNothing]
-;  htShowPage()
-
-(DEFUN |htCacheSet| (|htPage|)
-  (PROG (|names| |num| |n| |name| |val|)
-  (declare (special |$cacheCount| |$cacheAlist|))
-    (RETURN
-      (SEQ (PROGN
-             (SPADLET |names| (|htpProperty| |htPage| '|names|))
-             (DO ((|i| 1 (QSADD1 |i|))
-                  (G167785 |names| (CDR G167785)) (|name| NIL))
-                 ((OR (ATOM G167785)
-                      (PROGN (SETQ |name| (CAR G167785)) NIL))
-                  NIL)
-               (SEQ (EXIT (PROGN
-                            (SPADLET |num|
-                                     (|chkAllNonNegativeInteger|
-                                      (|htpLabelInputString| |htPage|
-                                       (|htMakeLabel| "c"
-                                        |i|))))
-                            (SPADLET |$cacheAlist|
-                                     (ADDASSOC (INTERN |name|) |num|
-                                      |$cacheAlist|))))))
-             (COND
-               ((SPADLET |n| (LASSOC '|all| |$cacheAlist|))
-                (SPADLET |$cacheCount| |n|)
-                (SPADLET |$cacheAlist|
-                         (|deleteAssoc| '|all| |$cacheAlist|))))
-             (|htInitPage| "Cache Summary" NIL)
-             (|bcHt| "In general, interpreter functions ")
-             (|bcHt| (COND
-                       ((EQL |$cacheCount| 0)
-                        '|will {\\em not} be cached.|)
-                       ('T (|bcHt| "cache ")
-                        (|htAllOrNum| |$cacheCount|)
-                        "} values.")))
-             (|bcHt| "\\vspace{1}\\newline ")
-             (COND
-               (|$cacheAlist|
-                   (DO ((G167801 |$cacheAlist| (CDR G167801))
-                        (G167774 NIL))
-                       ((OR (ATOM G167801)
-                            (PROGN
-                              (SETQ G167774 (CAR G167801))
-                              NIL)
-                            (PROGN
-                              (PROGN
-                                (SPADLET |name| (CAR G167774))
-                                (SPADLET |val| (CDR G167774))
-                                G167774)
-                              NIL))
-                        NIL)
-                     (SEQ (EXIT (COND
-                                  ((NEQUAL |val| |$cacheCount|)
-                                   (PROGN
-                                     (|bcHt|
-                                                                             "\\newline function {\\em ")
-                                     (|bcHt| (|stringize| |name|))
-                                     (|bcHt|
-                                      "} will cache ")
-                                     (|htAllOrNum| |val|)
-                                     (|bcHt| "} values")))))))))
-             (|htProcessDoitButton|
-                 (CONS "Press to Remove Page"
-                       (CONS "" (CONS '|htDoNothing| NIL))))
-             (|htShowPage|))))))
-
-;htAllOrNum val == bcHt
-;  val = 'all => '"{\em all"
-;  val = 0 => '"{\em no"
-;  STRCONC('"the last {\em ",stringize val)
-
-(DEFUN |htAllOrNum| (|val|)
-  (|bcHt| (COND
-            ((BOOT-EQUAL |val| '|all|) "{\\em all")
-            ((EQL |val| 0) "{\\em no")
-            ('T
-             (STRCONC "the last {\\em "
-                      (|stringize| |val|))))))
-
-;htCacheOne names ==
-;  page := htInitPage(mkSetTitle(),nil)
-;  htpSetProperty(page,'names,names)
-;  htMakePage '(
-;    (domainConditions (Satisfies ALLPI chkAllPositiveInteger))
-;    (text
-;      "Enter below a {\em cache length}, a positive integer. "
-;      "This number tells how many past values will "
-;      "be cached. To cache all past values, "
-;      "enter {\em all}."
-;      "\vspace{1}\newline ")
-;    (inputStrings
-;      ("Enter {\em all} or a positive integer:"
-;       "" 5 10 c1 ALLPI)))
-;  htSetvarDoneButton('"Select to Set Value",'htCacheSet)
-;  htShowPage()
-
-(DEFUN |htCacheOne| (|names|)
-  (PROG (|page|)
-    (RETURN
-      (PROGN
-        (SPADLET |page| (|htInitPage| (|mkSetTitle|) NIL))
-        (|htpSetProperty| |page| '|names| |names|)
-        (|htMakePage|
-            '((|domainConditions|
-                  (|Satisfies| ALLPI |chkAllPositiveInteger|))
-              (|text| "Enter below a {\\em cache length}, a positive integer. "
-                      "This number tells how many past values will "
-                      "be cached. To cache all past values, "
-                      "enter {\\em all}." "\\vspace{1}\\newline ")
-              (|inputStrings|
-                  ("Enter {\\em all} or a positive integer:" "" 5 10
-                   |c1| ALLPI))))
-        (|htSetvarDoneButton| "Select to Set Value"
-            '|htCacheSet|)
-        (|htShowPage|)))))
-
-;$historyDisplayWidth := 120
-
-(SPADLET |$historyDisplayWidth| 120) 
-
-;$newline := char 10
-
-(SPADLET |$newline| (|char| 10)) 
-
-;downlink page ==
-;  $saturn => downlinkSaturn page
-;  htInitPage('"Bridge",nil)
-;  htSay('"\replacepage{", page, '"}")
-;  htShowPage()
-
-(DEFUN |downlink| (|page|)
-  (declare (special |$saturn|))
-  (COND
-    (|$saturn| (|downlinkSaturn| |page|))
-    ('T (|htInitPage| "Bridge" NIL)
-     (|htSay| "\\replacepage{" |page| "}")
-     (|htShowPage|))))
-
-;downlinkSaturn fn ==
-;  u := dbReadLines(fn)
-;  lines := '""
-;  while u is [line,:u] repeat
-;    n := MAXINDEX line
-;    n < 1 => nil
-;    line.0 = (char '_%) => nil
-;    lines := STRCONC(lines,line)
-;  issueHTSaturn lines
-
-(DEFUN |downlinkSaturn| (|fn|)
-  (PROG (|line| |u| |n| |lines|)
-    (RETURN
-      (SEQ (PROGN
-             (SPADLET |u| (|dbReadLines| |fn|))
-             (SPADLET |lines| "")
-             (DO ()
-                 ((NULL (AND (CONSP |u|)
-                             (PROGN
-                               (SPADLET |line| (QCAR |u|))
-                               (SPADLET |u| (QCDR |u|))
-                               'T)))
-                  NIL)
-               (SEQ (EXIT (PROGN
-                            (SPADLET |n| (MAXINDEX |line|))
-                            (COND
-                              ((> 1 |n|) NIL)
-                              ((BOOT-EQUAL (ELT |line| 0) (|char| '%))
-                               NIL)
-                              ('T
-                               (SPADLET |lines|
-                                        (STRCONC |lines| |line|))))))))
-             (|issueHTSaturn| |lines|))))))
-
-;dbNonEmptyPattern pattern ==
-;  null pattern => '"*"
-;  pattern := STRINGIMAGE pattern
-;  #pattern > 0 => pattern
-;  '"*"
-
-(DEFUN |dbNonEmptyPattern| (|pattern|)
-  (COND
-    ((NULL |pattern|) "*")
-    ('T (SPADLET |pattern| (STRINGIMAGE |pattern|))
-     (COND ((> (|#| |pattern|) 0) |pattern|) ('T "*")))))
-
-;htSystemVariables() == main where
-;  main ==
-;    not $fullScreenSysVars => htSetVars()
-;    classlevel := $UserLevel
-;    $levels : local := '(compiler development interpreter)
-;    $heading  : local := nil
-;    while classlevel ^= first $levels repeat $levels := rest $levels
-;    table := NREVERSE fn($setOptions,nil,true)
-;    htInitPage('"System Variables",nil)
-;    htSay '"\beginmenu"
-;    lastHeading := nil
-;    for [heading,name,message,.,key,variable,options,func] in table repeat
-;      htSay('"\newline\item ")
-;      if heading = lastHeading then htSay '"\tab{8}" else
-;        htSay(heading,'"\tab{8}")
-;        lastHeading := heading
-;      htSay('"{\em ",name,"}\tab{22}",message)
-;      htSay('"\tab{80}")
-;      key = 'FUNCTION =>
-;         null options => htMakePage [['bcLinks,['"reset",'"",func,nil]]]
-;    [msg,class,var,valuesOrFunction,:.] := first options  --skip first message
-;         functionTail(name,class,var,valuesOrFunction)
-;         for option in rest options repeat
-;           option is ['break,:.] => 'skip
-;           [msg,class,var,valuesOrFunction,:.] := option
-;           htSay('"\newline\tab{22}", msg,'"\tab{80}")
-;           functionTail(name,class,var,valuesOrFunction)
-;      val := eval variable
-;      displayOptions(name,key,variable,val,options)
-;    htSay '"\endmenu"
-;    htShowPage()
-;  functionTail(name,class,var,valuesOrFunction) ==
-;    val := eval var
-;    atom valuesOrFunction =>
-;      htMakePage '((domainConditions (isDomain STR (String))))
-;htMakePage [['bcLinks,['"reset",'"",'htSetSystemVariableKind,[var,name,nil]]]]
-;      htMakePage [['bcStrings,[30,STRINGIMAGE val,name,valuesOrFunction]]]
-;    displayOptions(name,class,var,val,valuesOrFunction)
-;  displayOptions(name,class,variable,val,options) ==
-;    class = 'INTEGER =>
-;      htMakePage [['bcLispLinks,[[['text,options.0,'"-",options.1 or '""]],'"",'htSetSystemVariableKind,[variable,name,'PARSE_-INTEGER]]]]
-;      htMakePage '((domainConditions (isDomain INT (Integer))))
-;      htMakePage  [['bcStrings,[5,STRINGIMAGE val,name,'INT]]]
-;    class = 'STRING =>
-;      htSay('"{\em ",val,'"}\space{1}")
-;    for x in options repeat
-;      val = x or val = true and x = 'on or null val and x = 'off =>
-;        htSay('"{\em ",x,'"}\space{1}")
-;      htMakePage [['bcLispLinks,[x,'" ",'htSetSystemVariable,[variable,x]]]]
-;  fn(t,al,firstTime) ==
-;    atom t => al
-;    if firstTime then $heading := opOf first t
-;    fn(rest t,gn(first t,al),firstTime)
-;  gn(t,al) ==
-;    [.,.,class,key,.,options,:.] := t
-;    not MEMQ(class,$levels) => al
-;    key = 'LITERALS or key = 'INTEGER or key = 'STRING => [[$heading,:t],:al]
-;    key = 'TREE => fn(options,al,false)
-;    key = 'FUNCTION => [[$heading,:t],:al]
-;    systemError key
-
-(DEFUN |htSystemVariables,gn| (|t| |al|)
-  (PROG (|class| |key| |options|)
-  (declare (special |$heading| |$levels|))
-    (RETURN
-      (SEQ (PROGN
-             (SPADLET |class| (CADDR |t|))
-             (SPADLET |key| (CADDDR |t|))
-             (SPADLET |options| (CADR (CDDDDR |t|)))
-             |t|)
-           (IF (NULL (member |class| |$levels|)) (EXIT |al|))
-           (IF (OR (OR (BOOT-EQUAL |key| 'LITERALS)
-                       (BOOT-EQUAL |key| 'INTEGER))
-                   (BOOT-EQUAL |key| 'STRING))
-               (EXIT (CONS (CONS |$heading| |t|) |al|)))
-           (IF (BOOT-EQUAL |key| 'TREE)
-               (EXIT (|htSystemVariables,fn| |options| |al| NIL)))
-           (IF (BOOT-EQUAL |key| 'FUNCTION)
-               (EXIT (CONS (CONS |$heading| |t|) |al|)))
-           (EXIT (|systemError| |key|))))))
-
-(DEFUN |htSystemVariables,fn| (|t| |al| |firstTime|)
-  (declare (special |$heading|))
-  (SEQ (IF (ATOM |t|) (EXIT |al|))
-       (IF |firstTime| (SPADLET |$heading| (|opOf| (CAR |t|))) NIL)
-       (EXIT (|htSystemVariables,fn| (CDR |t|)
-                 (|htSystemVariables,gn| (CAR |t|) |al|) |firstTime|))))
-
-(DEFUN |htSystemVariables,displayOptions|
-       (|name| |class| |variable| |val| |options|)
-  (SEQ (IF (BOOT-EQUAL |class| 'INTEGER)
-           (EXIT (SEQ (|htMakePage|
-                          (CONS (CONS '|bcLispLinks|
-                                      (CONS
-                                       (CONS
-                                        (CONS
-                                         (CONS '|text|
-                                          (CONS (ELT |options| 0)
-                                           (CONS "-"
-                                            (CONS
-                                             (OR (ELT |options| 1)
-                                              "")
-                                             NIL))))
-                                         NIL)
-                                        (CONS ""
-                                         (CONS
-                                          '|htSetSystemVariableKind|
-                                          (CONS
-                                           (CONS |variable|
-                                            (CONS |name|
-                                             (CONS 'PARSE-INTEGER NIL)))
-                                           NIL))))
-                                       NIL))
-                                NIL))
-                      (|htMakePage|
-                          '((|domainConditions|
-                                (|isDomain| INT (|Integer|)))))
-                      (EXIT (|htMakePage|
-                                (CONS (CONS '|bcStrings|
-                                       (CONS
-                                        (CONS 5
-                                         (CONS (STRINGIMAGE |val|)
-                                          (CONS |name| (CONS 'INT NIL))))
-                                        NIL))
-                                      NIL))))))
-       (IF (BOOT-EQUAL |class| 'STRING)
-           (EXIT (|htSay| "{\\em " |val|
-                          "}\\space{1}")))
-       (EXIT (DO ((G167913 |options| (CDR G167913)) (|x| NIL))
-                 ((OR (ATOM G167913)
-                      (PROGN (SETQ |x| (CAR G167913)) NIL))
-                  NIL)
-               (SEQ (IF (OR (OR (BOOT-EQUAL |val| |x|)
-                                (AND (BOOT-EQUAL |val| 'T)
-                                     (BOOT-EQUAL |x| '|on|)))
-                            (AND (NULL |val|) (BOOT-EQUAL |x| '|off|)))
-                        (EXIT (|htSay| "{\\em " |x|
-                                       "}\\space{1}")))
-                    (EXIT (|htMakePage|
-                              (CONS (CONS '|bcLispLinks|
-                                     (CONS
-                                      (CONS |x|
-                                       (CONS " "
-                                        (CONS '|htSetSystemVariable|
-                                         (CONS
-                                          (CONS |variable|
-                                           (CONS |x| NIL))
-                                          NIL))))
-                                      NIL))
-                                    NIL))))))))
-
-(DEFUN |htSystemVariables,functionTail|
-       (|name| |class| |var| |valuesOrFunction|)
-  (PROG (|val|)
-    (RETURN
-      (SEQ (SPADLET |val| (|eval| |var|))
-           (IF (ATOM |valuesOrFunction|)
-               (EXIT (SEQ (|htMakePage|
-                              '((|domainConditions|
-                                    (|isDomain| STR (|String|)))))
-                          (|htMakePage|
-                              (CONS (CONS '|bcLinks|
-                                     (CONS
-                                      (CONS "reset"
-                                       (CONS ""
-                                        (CONS
-                                         '|htSetSystemVariableKind|
-                                         (CONS
-                                          (CONS |var|
-                                           (CONS |name| (CONS NIL NIL)))
-                                          NIL))))
-                                      NIL))
-                                    NIL))
-                          (EXIT (|htMakePage|
-                                    (CONS
-                                     (CONS '|bcStrings|
-                                      (CONS
-                                       (CONS 30
-                                        (CONS (STRINGIMAGE |val|)
-                                         (CONS |name|
-                                          (CONS |valuesOrFunction| NIL))))
-                                       NIL))
-                                     NIL))))))
-           (EXIT (|htSystemVariables,displayOptions| |name| |class|
-                     |var| |val| |valuesOrFunction|))))))
-
-(DEFUN |htSystemVariables| ()
-  (PROG (|$levels| |$heading| |classlevel| |table| |heading| |name|
-            |message| |key| |variable| |options| |func| |lastHeading|
-            |LETTMP#1| |msg| |class| |var| |valuesOrFunction| |val|)
-    (DECLARE (SPECIAL |$levels| |$heading| |$setOptions| |$UserLevel|
-                      |$fullScreenSysVars|))
-    (RETURN
-      (SEQ (COND
-             ((NULL |$fullScreenSysVars|) (|htSetVars|))
-             ('T (SPADLET |classlevel| |$UserLevel|)
-              (SPADLET |$levels| '(|compiler| |development| |interpreter|))
-              (SPADLET |$heading| NIL)
-              (DO () ((NULL (NEQUAL |classlevel| (CAR |$levels|))) NIL)
-                (SEQ (EXIT (SPADLET |$levels| (CDR |$levels|)))))
-              (SPADLET |table|
-                       (NREVERSE
-                           (|htSystemVariables,fn| |$setOptions| NIL
-                               'T)))
-              (|htInitPage| "System Variables" NIL)
-              (|htSay| "\\beginmenu")
-              (SPADLET |lastHeading| NIL)
-              (DO ((G167961 |table| (CDR G167961)) (G167879 NIL))
-                  ((OR (ATOM G167961)
-                       (PROGN (SETQ G167879 (CAR G167961)) NIL)
-                       (PROGN
-                         (PROGN
-                           (SPADLET |heading| (CAR G167879))
-                           (SPADLET |name| (CADR G167879))
-                           (SPADLET |message| (CADDR G167879))
-                           (SPADLET |key| (CAR (CDDDDR G167879)))
-                           (SPADLET |variable|
-                                    (CADR (CDDDDR G167879)))
-                           (SPADLET |options|
-                                    (CADDR (CDDDDR G167879)))
-                           (SPADLET |func| (CADDDR (CDDDDR G167879)))
-                           G167879)
-                         NIL))
-                   NIL)
-                (SEQ (EXIT (PROGN
-                             (|htSay| "\\newline\\item ")
-                             (COND
-                               ((BOOT-EQUAL |heading| |lastHeading|)
-                                (|htSay| "\\tab{8}"))
-                               ('T
-                                (|htSay| |heading|
-                                         "\\tab{8}")
-                                (SPADLET |lastHeading| |heading|)))
-                             (|htSay| "{\\em " |name|
-                                      '|}\\tab{22}| |message|)
-                             (|htSay| "\\tab{80}")
-                             (COND
-                               ((BOOT-EQUAL |key| 'FUNCTION)
-                                (COND
-                                  ((NULL |options|)
-                                   (|htMakePage|
-                                    (CONS
-                                     (CONS '|bcLinks|
-                                      (CONS
-                                       (CONS "reset"
-                                        (CONS ""
-                                         (CONS |func| (CONS NIL NIL))))
-                                       NIL))
-                                     NIL)))
-                                  ('T
-                                   (SPADLET |LETTMP#1| (CAR |options|))
-                                   (SPADLET |msg| (CAR |LETTMP#1|))
-                                   (SPADLET |class| (CADR |LETTMP#1|))
-                                   (SPADLET |var| (CADDR |LETTMP#1|))
-                                   (SPADLET |valuesOrFunction|
-                                    (CADDDR |LETTMP#1|))
-                                   (|htSystemVariables,functionTail|
-                                    |name| |class| |var|
-                                    |valuesOrFunction|)
-                                   (DO
-                                    ((G167971 (CDR |options|)
-                                      (CDR G167971))
-                                     (|option| NIL))
-                                    ((OR (ATOM G167971)
-                                      (PROGN
-                                        (SETQ |option| (CAR G167971))
-                                        NIL))
-                                     NIL)
-                                     (SEQ
-                                      (EXIT
-                                       (COND
-                                         ((AND (CONSP |option|)
-                                           (EQ (QCAR |option|)
-                                            '|break|))
-                                          '|skip|)
-                                         ('T
-                                          (SPADLET |msg|
-                                           (CAR |option|))
-                                          (SPADLET |class|
-                                           (CADR |option|))
-                                          (SPADLET |var|
-                                           (CADDR |option|))
-                                          (SPADLET |valuesOrFunction|
-                                           (CADDDR |option|))
-                                          (|htSay|
-                                                                                       "\\newline\\tab{22}"
-                                           |msg|
-                                           "\\tab{80}")
-                                          (|htSystemVariables,functionTail|
-                                           |name| |class| |var|
-                                           |valuesOrFunction|)))))))))
-                               ('T (SPADLET |val| (|eval| |variable|))
-                                (|htSystemVariables,displayOptions|
-                                    |name| |key| |variable| |val|
-                                    |options|)))))))
-              (|htSay| "\\endmenu") (|htShowPage|)))))))
-
-;htSetSystemVariableKind(htPage,[variable,name,fun]) ==
-;  value := htpLabelInputString(htPage,name)
-;  if STRINGP value and fun then value := FUNCALL(fun,value)
-;--SCM::what to do???  if not FIXP value then userError ???
-;  SET(variable,value)
-;  htSystemVariables ()
-
-(DEFUN |htSetSystemVariableKind| (|htPage| G168009)
-  (PROG (|variable| |name| |fun| |value|)
-    (RETURN
-      (PROGN
-        (SPADLET |variable| (CAR G168009))
-        (SPADLET |name| (CADR G168009))
-        (SPADLET |fun| (CADDR G168009))
-        (SPADLET |value| (|htpLabelInputString| |htPage| |name|))
-        (COND
-          ((AND (STRINGP |value|) |fun|)
-           (SPADLET |value| (FUNCALL |fun| |value|))))
-        (SET |variable| |value|)
-        (|htSystemVariables|)))))
-
-;htSetSystemVariable(htPage,[name,value]) ==
-;  value :=
-;    value = 'on => true
-;    value = 'off => nil
-;    value
-;  SET(name,value)
-;  htSystemVariables ()
-
-(DEFUN |htSetSystemVariable| (|htPage| G168030)
-  (declare (ignore |htPage|))
-  (PROG (|name| |value|)
-    (RETURN
-      (PROGN
-        (SPADLET |name| (CAR G168030))
-        (SPADLET |value| (CADR G168030))
-        (SPADLET |value|
-                 (COND
-                   ((BOOT-EQUAL |value| '|on|) 'T)
-                   ((BOOT-EQUAL |value| '|off|) NIL)
-                   ('T |value|)))
-        (SET |name| |value|)
-        (|htSystemVariables|)))))
-
-;htGloss(pattern) == htGlossPage(nil,dbNonEmptyPattern pattern or '"*",true)
-
-(DEFUN |htGloss| (|pattern|)
-  (|htGlossPage| NIL
-      (OR (|dbNonEmptyPattern| |pattern|) "*") 'T))
-
-;htGlossPage(htPage,pattern,tryAgain?) ==
-;  $wildCard: local := char '_*
-;  pattern = '"*" => downlink 'GlossaryPage
-;  filter := pmTransFilter pattern
-;  grepForm := mkGrepPattern(filter,'none)
-;  $key: local := 'none
-;  results := applyGrep(grepForm,'gloss)
-;  --pathname := STRCONC('"/tmp/",PNAME resultFile,'".text.", getEnv '"SPADNUM")
-;  --instream := MAKE_-INSTREAM pathname
-;  defstream := MAKE_-INSTREAM STRCONC(getEnv '"AXIOM",'"/algebra/glossdef.text")
-;  lines := gatherGlossLines(results,defstream)
-;  -- OBEY STRCONC('"rm -f ", pathname)
-;  --PROBE_-FILE(pathname) and DELETE_-FILE(pathname)
-;  --SHUT instream
-;  heading :=
-;    pattern = '"" => '"Glossary"
-;    null lines => ['"No glossary items match {\em ",pattern,'"}"]
-;    ['"Glossary items matching {\em ",pattern,'"}"]
-;  null lines =>
-;    tryAgain? and #pattern > 0 =>
-;      (pattern.(k := MAXINDEX(pattern))) = char 's =>
-;        htGlossPage(htPage,SUBSTRING(pattern,0,k),true)
-;      UPPER_-CASE_-P pattern.0 =>
-;        htGlossPage(htPage,DOWNCASE pattern,false)
-;      errorPage(htPage,['"Sorry",nil,['"\centerline{",:heading,'"}"]])
-;    errorPage(htPage,['"Sorry",nil,['"\centerline{",:heading,'"}"]])
-;  htInitPageNoScroll(nil,heading)
-;  htSay('"\beginscroll\beginmenu")
-;  for line in lines repeat
-;    tick := charPosition($tick,line,1)
-;    htSay('"\item{\em \menuitemstyle{}}\tab{0}{\em ",escapeString SUBSTRING(line,0,tick),'"} ",SUBSTRING(line,tick + 1,nil))
-;  htSay '"\endmenu "
-;  htSay '"\endscroll\newline "
-;  htMakePage [['bcLinks,['"Search",'"",'htGlossSearch,nil]]]
-;  htSay '" for glossary entry matching "
-;  htMakePage [['bcStrings, [24,'"*",'filter,'EM]]]
-;  htShowPageNoScroll()
-
-(DEFUN |htGlossPage| (|htPage| |pattern| |tryAgain?|)
-  (PROG (|$wildCard| |$key| |filter| |grepForm| |results| |defstream|
-            |lines| |heading| |k| |tick|)
-    (DECLARE (SPECIAL |$wildCard| |$key| |$tick|))
-    (RETURN
-      (SEQ (PROGN
-             (SPADLET |$wildCard| (|char| '*))
-             (COND
-               ((BOOT-EQUAL |pattern| "*")
-                (|downlink| '|GlossaryPage|))
-               ('T (SPADLET |filter| (|pmTransFilter| |pattern|))
-                (SPADLET |grepForm| (|mkGrepPattern| |filter| '|none|))
-                (SPADLET |$key| '|none|)
-                (SPADLET |results| (|applyGrep| |grepForm| '|gloss|))
-                (SPADLET |defstream|
-                         (MAKE-INSTREAM
-                             (STRCONC (|getEnv| "AXIOM")
-                                                                             "/algebra/glossdef.text")))
-                (SPADLET |lines|
-                         (|gatherGlossLines| |results| |defstream|))
-                (SPADLET |heading|
-                         (COND
-                           ((BOOT-EQUAL |pattern| "")
-                            "Glossary")
-                           ((NULL |lines|)
-                            (CONS                                       "No glossary items match {\\em "
-                                  (CONS |pattern|
-                                        (CONS "}" NIL))))
-                           ('T
-                            (CONS                                       "Glossary items matching {\\em "
-                                  (CONS |pattern|
-                                        (CONS "}" NIL))))))
-                (COND
-                  ((NULL |lines|)
-                   (COND
-                     ((AND |tryAgain?| (> (|#| |pattern|) 0))
-                      (COND
-                        ((BOOT-EQUAL
-                             (ELT |pattern|
-                                  (SPADLET |k| (MAXINDEX |pattern|)))
-                             (|char| '|s|))
-                         (|htGlossPage| |htPage|
-                             (SUBSTRING |pattern| 0 |k|) 'T))
-                        ((UPPER-CASE-P (ELT |pattern| 0))
-                         (|htGlossPage| |htPage| (DOWNCASE |pattern|)
-                             NIL))
-                        ('T
-                         (|errorPage| |htPage|
-                             (CONS "Sorry"
-                                   (CONS NIL
-                                    (CONS
-                                     (CONS "\\centerline{"
-                                      (APPEND |heading|
-                                       (CONS "}" NIL)))
-                                     NIL)))))))
-                     ('T
-                      (|errorPage| |htPage|
-                          (CONS "Sorry"
-                                (CONS NIL
-                                      (CONS
-                                       (CONS
-                                        "\\centerline{"
-                                        (APPEND |heading|
-                                         (CONS "}" NIL)))
-                                       NIL)))))))
-                  ('T (|htInitPageNoScroll| NIL |heading|)
-                   (|htSay| "\\beginscroll\\beginmenu")
-                   (DO ((G168058 |lines| (CDR G168058))
-                        (|line| NIL))
-                       ((OR (ATOM G168058)
-                            (PROGN (SETQ |line| (CAR G168058)) NIL))
-                        NIL)
-                     (SEQ (EXIT (PROGN
-                                  (SPADLET |tick|
-                                           (|charPosition| |$tick|
-                                            |line| 1))
-                                  (|htSay|                                 "\\item{\\em \\menuitemstyle{}}\\tab{0}{\\em "
-                                           (|escapeString|
-                                            (SUBSTRING |line| 0 |tick|))
-                                           "} "
-                                           (SUBSTRING |line|
-                                            (PLUS |tick| 1) NIL))))))
-                   (|htSay| "\\endmenu ")
-                   (|htSay| "\\endscroll\\newline ")
-                   (|htMakePage|
-                       (CONS (CONS '|bcLinks|
-                                   (CONS
-                                    (CONS "Search"
-                                     (CONS ""
-                                      (CONS '|htGlossSearch|
-                                       (CONS NIL NIL))))
-                                    NIL))
-                             NIL))
-                   (|htSay|                                 " for glossary entry matching ")
-                   (|htMakePage|
-                       (CONS (CONS '|bcStrings|
-                                   (CONS
-                                    (CONS 24
-                                     (CONS "*"
-                                      (CONS '|filter| (CONS 'EM NIL))))
-                                    NIL))
-                             NIL))
-                   (|htShowPageNoScroll|))))))))))
-
-;gatherGlossLines(results,defstream) ==
-;  acc := nil
-;  for keyline in results repeat
-;    --keyline := READLINE instream
-;    n := charPosition($tick,keyline,0)
-;    keyAndTick := SUBSTRING(keyline,0,n + 1)
-;    byteAddress := string2Integer SUBSTRING(keyline,n + 1,nil)
-;    FILE_-POSITION(defstream,byteAddress)
-;    line := READLINE defstream
-;    k := charPosition($tick,line,1)
-;    pointer := SUBSTRING(line,0,k)
-;    def := SUBSTRING(line,k + 1,nil)
-;    xtralines := nil
-;    while not EOFP defstream and (x := READLINE defstream) and
-;      (j := charPosition($tick,x,1)) and (nextPointer := SUBSTRING(x,0,j))
-;        and (nextPointer = pointer) repeat
-;          xtralines := [SUBSTRING(x,j + 1,nil),:xtralines]
-;    acc := [STRCONC(keyAndTick,def, "STRCONC"/NREVERSE xtralines),:acc]
-;  REVERSE acc
-
-(DEFUN |gatherGlossLines| (|results| |defstream|)
-  (PROG (|n| |keyAndTick| |byteAddress| |line| |k| |pointer| |def| |x|
-             |j| |nextPointer| |xtralines| |acc|)
-  (declare (special |$tick|))
-    (RETURN
-      (SEQ (PROGN
-             (SPADLET |acc| NIL)
-             (DO ((G168098 |results| (CDR G168098))
-                  (|keyline| NIL))
-                 ((OR (ATOM G168098)
-                      (PROGN (SETQ |keyline| (CAR G168098)) NIL))
-                  NIL)
-               (SEQ (EXIT (PROGN
-                            (SPADLET |n|
-                                     (|charPosition| |$tick| |keyline|
-                                      0))
-                            (SPADLET |keyAndTick|
-                                     (SUBSTRING |keyline| 0
-                                      (PLUS |n| 1)))
-                            (SPADLET |byteAddress|
-                                     (|string2Integer|
-                                      (SUBSTRING |keyline| (PLUS |n| 1)
-                                       NIL)))
-                            (FILE-POSITION |defstream| |byteAddress|)
-                            (SPADLET |line| (READLINE |defstream|))
-                            (SPADLET |k|
-                                     (|charPosition| |$tick| |line| 1))
-                            (SPADLET |pointer|
-                                     (SUBSTRING |line| 0 |k|))
-                            (SPADLET |def|
-                                     (SUBSTRING |line| (PLUS |k| 1)
-                                      NIL))
-                            (SPADLET |xtralines| NIL)
-                            (DO ()
-                                ((NULL (AND (NULL (EOFP |defstream|))
-                                        (SPADLET |x|
-                                         (READLINE |defstream|))
-                                        (SPADLET |j|
-                                         (|charPosition| |$tick| |x| 1))
-                                        (SPADLET |nextPointer|
-                                         (SUBSTRING |x| 0 |j|))
-                                        (BOOT-EQUAL |nextPointer|
-                                         |pointer|)))
-                                 NIL)
-                              (SEQ (EXIT
-                                    (SPADLET |xtralines|
-                                     (CONS
-                                      (SUBSTRING |x| (PLUS |j| 1) NIL)
-                                      |xtralines|)))))
-                            (SPADLET |acc|
-                                     (CONS
-                                      (STRCONC |keyAndTick| |def|
-                                       (PROG (G168110)
-                                         (SPADLET G168110 "")
-                                         (RETURN
-                                           (DO
-                                            ((G168115
-                                              (NREVERSE |xtralines|)
-                                              (CDR G168115))
-                                             (G168081 NIL))
-                                            ((OR (ATOM G168115)
-                                              (PROGN
-                                                (SETQ G168081
-                                                 (CAR G168115))
-                                                NIL))
-                                             G168110)
-                                             (SEQ
-                                              (EXIT
-                                               (SETQ G168110
-                                                (STRCONC G168110
-                                                 G168081))))))))
-                                      |acc|))))))
-             (REVERSE |acc|))))))
-
-;htGlossSearch(htPage,junk) ==  htGloss htpLabelInputString(htPage,'filter)
-
-(DEFUN |htGlossSearch| (|htPage| |junk|)
-  (declare (ignore |junk|))
-  (|htGloss| (|htpLabelInputString| |htPage| '|filter|)))
-
-;htGreekSearch(filter) ==
-;  ss := dbNonEmptyPattern filter
-;  s := pmTransFilter ss
-;  s is ['error,:.] => bcErrorPage s
-;  not s => errorPage(nil,[['"Missing search string"],nil,
-;    '"\vspace{2}\centerline{To select one of the greek letters:}\newline ",
-;      '"\centerline{{\em first} enter a search key into the input area}\newline ",
-;        '"\centerline{{\em then } move the mouse cursor to the work {\em search} and click}"])
-;  filter := patternCheck s
-;  names := '(alpha beta gamma delta epsilon zeta eta theta iota kappa lambda mu nu pi)
-;  for x in names repeat
-;    superMatch?(filter,PNAME x) => matches := [x,:matches]
-;    nonmatches := [x,:nonmatches]
-;  matches    := NREVERSE matches
-;  nonmatches := NREVERSE nonmatches
-;  htInitPage('"Greek Names",nil)
-;  null matches =>
-;    htInitPage(['"Greek names matching search string {\em ",ss,'"}"],nil)
-;    htSay("\vspace{2}\centerline{Sorry, but no greek letters match your search string}\centerline{{\em ",ss,"}}\centerline{Click on the up-arrow to try again}")
-;    htShowPage()
-;  htInitPage(['"Greek letters matching search string {\em ",ss,'"}"],nil)
-;  if nonmatches
-;    then htSay('"The greek letters that {\em match} your search string {\em ",ss,'"}:")
-;    else htSay('"Your search string {\em ",ss,"} matches all of the greek letters:")
-;  htSay('"{\em \table{")
-;  for x in matches repeat htSay('"{",x,'"}")
-;  htSay('"}}\vspace{1}")
-;  if nonmatches then
-;    htSay('"The greek letters that {\em do not match} your search string:{\em \table{")
-;    for x in nonmatches repeat htSay('"{",x,'"}")
-;    htSay('"}}")
-;  htShowPage()
-
-(DEFUN |htGreekSearch| (|filter|)
-  (PROG (|ss| |s| |names| |matches| |nonmatches|)
-    (RETURN
-      (SEQ (PROGN
-             (SPADLET |ss| (|dbNonEmptyPattern| |filter|))
-             (SPADLET |s| (|pmTransFilter| |ss|))
-             (COND
-               ((AND (CONSP |s|) (EQ (QCAR |s|) '|error|))
-                (|bcErrorPage| |s|))
-               ((NULL |s|)
-                (|errorPage| NIL
-                    (CONS (CONS "Missing search string"
-                                NIL)
-                          (CONS NIL
-                                (CONS       "\\vspace{2}\\centerline{To select one of the greek letters:}\\newline "
-                                      (CONS
-                                        "\\centerline{{\\em first} enter a search key into the input area}\\newline "
-                                       (CONS
-                                         "\\centerline{{\\em then } move the mouse cursor to the work {\\em search} and click}"
-                                        NIL)))))))
-               ('T (SPADLET |filter| (|patternCheck| |s|))
-                (SPADLET |names|
-                         '(|alpha| |beta| |gamma| |delta| |epsilon|
-                                   |zeta| |eta| |theta| |iota| |kappa|
-                                   |lambda| |mu| |nu| |pi|))
-                (DO ((G168149 |names| (CDR G168149)) (|x| NIL))
-                    ((OR (ATOM G168149)
-                         (PROGN (SETQ |x| (CAR G168149)) NIL))
-                     NIL)
-                  (SEQ (EXIT (COND
-                               ((|superMatch?| |filter| (PNAME |x|))
-                                (SPADLET |matches|
-                                         (CONS |x| |matches|)))
-                               ('T
-                                (SPADLET |nonmatches|
-                                         (CONS |x| |nonmatches|)))))))
-                (SPADLET |matches| (NREVERSE |matches|))
-                (SPADLET |nonmatches| (NREVERSE |nonmatches|))
-                (|htInitPage| "Greek Names" NIL)
-                (COND
-                  ((NULL |matches|)
-                   (|htInitPage|
-                       (CONS                                  "Greek names matching search string {\\em "
-                             (CONS |ss| (CONS "}" NIL)))
-                       NIL)
- (|htSay| '|\\vspace{2}\\centerline{Sorry, but no greek letters match your search string}\\centerline{{\\em |
-                            |ss|
-                         '|}}\\centerline{Click on the up-arrow to try again}|)
-                   (|htShowPage|))
-                  ('T
-                   (|htInitPage|
-                       (CONS                                  "Greek letters matching search string {\\em "
-                             (CONS |ss| (CONS "}" NIL)))
-                       NIL)
-                   (COND
-                     (|nonmatches|
-                         (|htSay|                "The greek letters that {\\em match} your search string {\\em "
-                                  |ss| "}:"))
-                     ('T
-                      (|htSay| "Your search string {\\em "
-                               |ss|
-                               '|} matches all of the greek letters:|)))
-                   (|htSay| "{\\em \\table{")
-                   (DO ((G168158 |matches| (CDR G168158))
-                        (|x| NIL))
-                       ((OR (ATOM G168158)
-                            (PROGN (SETQ |x| (CAR G168158)) NIL))
-                        NIL)
-                     (SEQ (EXIT (|htSay| "{" |x|
-                                         "}"))))
-                   (|htSay| "}}\\vspace{1}")
-                   (COND
-                     (|nonmatches|
-                         (|htSay|   "The greek letters that {\\em do not match} your search string:{\\em \\table{")
-                         (DO ((G168167 |nonmatches| (CDR G168167))
-                              (|x| NIL))
-                             ((OR (ATOM G168167)
-                                  (PROGN
-                                    (SETQ |x| (CAR G168167))
-                                    NIL))
-                              NIL)
-                           (SEQ (EXIT (|htSay| "{" |x|
-                                       "}"))))
-                         (|htSay| "}}")))
-                   (|htShowPage|))))))))))
-
-;htTextSearch(filter) ==
-;  s := pmTransFilter dbNonEmptyPattern filter
-;  s is ['error,:.] => bcErrorPage s
-;  not s => errorPage(nil,[['"Missing search string"],nil,
-;    '"\vspace{2}\centerline{To select one of the lines of text:}\newline ",
-;      '"\centerline{{\em first} enter a search key into the input area}\newline ",
-;        '"\centerline{{\em then } move the mouse cursor to the work {\em search} and click}"])
-;  filter := s
-;  lines := ['"{{\em Fruit flies} *like* a {\em banana and califlower ears.}}",
-;            '"{{\em Sneak Sears Silas with Savings Snatch}}"]
-;  for x in lines repeat
-;    superMatch?(filter,x) => matches := [x,:matches]
-;    nonmatches := [x,:nonmatches]
-;  matches    := NREVERSE matches
-;  nonmatches := NREVERSE nonmatches
-;  htInitPage('"Text Matches",nil)
-;  null matches =>
-;    htInitPage(['"Lines matching search string {\em ",s,'"}"],nil)
-;    htSay("\vspace{2}\centerline{Sorry, but no lines match your search string}\centerline{{\em ",s,"}}\centerline{Click on the up-arrow to try again}")
-;    htShowPage()
-;  htInitPage(['"Lines matching search string {\em ",s,'"}"],nil)
-;  if nonmatches
-;    then htSay('"The lines that {\em match} your search string {\em ",s,'"}:")
-;    else htSay('"Your search string {\em ",s,"} matches both lines:")
-;  htSay('"{\em \table{")
-;  for x in matches repeat htSay('"{",x,'"}")
-;  htSay('"}}\vspace{1}")
-;  if nonmatches then
-;    htSay('"The line that {\em does not match} your search string:{\em \table{")
-;    for x in nonmatches repeat htSay('"{",x,'"}")
-;    htSay('"}}")
-;  htShowPage()
-
-(DEFUN |htTextSearch| (|filter|)
-  (PROG (|s| |lines| |matches| |nonmatches|)
-    (RETURN
-      (SEQ (PROGN
-             (SPADLET |s|
-                      (|pmTransFilter| (|dbNonEmptyPattern| |filter|)))
-             (COND
-               ((AND (CONSP |s|) (EQ (QCAR |s|) '|error|))
-                (|bcErrorPage| |s|))
-               ((NULL |s|)
-                (|errorPage| NIL
-                    (CONS (CONS "Missing search string"
-                                NIL)
-                          (CONS NIL
-                                (CONS       "\\vspace{2}\\centerline{To select one of the lines of text:}\\newline "
-                                      (CONS
-                                        "\\centerline{{\\em first} enter a search key into the input area}\\newline "
-                                       (CONS
-                                         "\\centerline{{\\em then } move the mouse cursor to the work {\\em search} and click}"
-                                        NIL)))))))
-               ('T (SPADLET |filter| |s|)
-                (SPADLET |lines|
-                         (CONS             "{{\\em Fruit flies} *like* a {\\em banana and califlower ears.}}"
-                               (CONS                               "{{\\em Sneak Sears Silas with Savings Snatch}}"
-                                     NIL)))
-                (DO ((G168191 |lines| (CDR G168191)) (|x| NIL))
-                    ((OR (ATOM G168191)
-                         (PROGN (SETQ |x| (CAR G168191)) NIL))
-                     NIL)
-                  (SEQ (EXIT (COND
-                               ((|superMatch?| |filter| |x|)
-                                (SPADLET |matches|
-                                         (CONS |x| |matches|)))
-                               ('T
-                                (SPADLET |nonmatches|
-                                         (CONS |x| |nonmatches|)))))))
-                (SPADLET |matches| (NREVERSE |matches|))
-                (SPADLET |nonmatches| (NREVERSE |nonmatches|))
-                (|htInitPage| "Text Matches" NIL)
-                (COND
-                  ((NULL |matches|)
-                   (|htInitPage|
-                       (CONS                                  "Lines matching search string {\\em "
-                             (CONS |s| (CONS "}" NIL)))
-                       NIL)
-                   (|htSay| '|\\vspace{2}\\centerline{Sorry, but no lines match your search string}\\centerline{{\\em |
-                            |s|
-                         '|}}\\centerline{Click on the up-arrow to try again}|)
-                   (|htShowPage|))
-                  ('T
-                   (|htInitPage|
-                       (CONS                                  "Lines matching search string {\\em "
-                             (CONS |s| (CONS "}" NIL)))
-                       NIL)
-                   (COND
-                     (|nonmatches|
-                         (|htSay|                        "The lines that {\\em match} your search string {\\em "
-                                  |s| "}:"))
-                     ('T
-                      (|htSay| "Your search string {\\em "
-                               |s| '|} matches both lines:|)))
-                   (|htSay| "{\\em \\table{")
-                   (DO ((G168200 |matches| (CDR G168200))
-                        (|x| NIL))
-                       ((OR (ATOM G168200)
-                            (PROGN (SETQ |x| (CAR G168200)) NIL))
-                        NIL)
-                     (SEQ (EXIT (|htSay| "{" |x|
-                                         "}"))))
-                   (|htSay| "}}\\vspace{1}")
-                   (COND
-                     (|nonmatches|
-                         (|htSay|       "The line that {\\em does not match} your search string:{\\em \\table{")
-                         (DO ((G168209 |nonmatches| (CDR G168209))
-                              (|x| NIL))
-                             ((OR (ATOM G168209)
-                                  (PROGN
-                                    (SETQ |x| (CAR G168209))
-                                    NIL))
-                              NIL)
-                           (SEQ (EXIT (|htSay| "{" |x|
-                                       "}"))))
-                         (|htSay| "}}")))
-                   (|htShowPage|))))))))))
-
-;htTutorialSearch pattern ==
-;  s := dbNonEmptyPattern pattern or return
-;    errorPage(nil,['"Empty search key",nil,'"\vspace{3}\centerline{You must enter some search string"])
-;  s := mkUnixPattern s
-;  source := '"$AXIOM/doc/hypertex/pages/ht.db"
-;  target :='"/tmp/temp.text.$SPADNUM"
-;  OBEY STRCONC('"$AXIOM/lib/hthits",'" _"",s,'"_" ",source,'" > ",target)
-;  lines := dbReadLines 'temp
-;  htInitPageNoScroll(nil,['"Tutorial Pages mentioning {\em ",pattern,'"}"])
-;  htSay('"\beginscroll\table{")
-;  for line in lines repeat
-;    [name,title,.] := dbParts(line,3,0)
-;    htSay ['"{\downlink{",title,'"}{",name,'"}}"]
-;  htSay '"}"
-;  htShowPage()
-
-(DEFUN |htTutorialSearch| (|pattern|)
-  (PROG (|s| |source| |target| |lines| |LETTMP#1| |name| |title|)
-    (RETURN
-      (SEQ (PROGN
-             (SPADLET |s|
-                      (OR (|dbNonEmptyPattern| |pattern|)
-                          (RETURN
-                            (|errorPage| NIL
-                                (CONS "Empty search key"
-                                      (CONS NIL
-                                       (CONS
-                                                                                 "\\vspace{3}\\centerline{You must enter some search string"
-                                        NIL)))))))
-             (SPADLET |s| (|mkUnixPattern| |s|))
-             (SPADLET |source|
-                      "$AXIOM/doc/hypertex/pages/ht.db")
-             (SPADLET |target| "/tmp/temp.text.$SPADNUM")
-             (OBEY (STRCONC "$AXIOM/lib/hthits"
-                            " \"" |s| "\" "
-                            |source| " > " |target|))
-             (SPADLET |lines| (|dbReadLines| '|temp|))
-             (|htInitPageNoScroll| NIL
-                 (CONS "Tutorial Pages mentioning {\\em "
-                       (CONS |pattern| (CONS "}" NIL))))
-             (|htSay| "\\beginscroll\\table{")
-             (DO ((G168241 |lines| (CDR G168241)) (|line| NIL))
-                 ((OR (ATOM G168241)
-                      (PROGN (SETQ |line| (CAR G168241)) NIL))
-                  NIL)
-               (SEQ (EXIT (PROGN
-                            (SPADLET |LETTMP#1| (|dbParts| |line| 3 0))
-                            (SPADLET |name| (CAR |LETTMP#1|))
-                            (SPADLET |title| (CADR |LETTMP#1|))
-                            (|htSay| (CONS "{\\downlink{"
-                                      (CONS |title|
-                                       (CONS "}{"
-                                        (CONS |name|
-                                         (CONS "}}" NIL))))))))))
-             (|htSay| "}")
-             (|htShowPage|))))))
-
-;mkUnixPattern s ==
-;  u := mkUpDownPattern s
-;  starPositions := REVERSE [i for i in 1..(-1 + MAXINDEX u) | u.i = $wild]
-;  for i in starPositions repeat
-;    u := STRCONC(SUBSTRING(u,0,i),'".*",SUBSTRING(u,i + 1,nil))
-;  if u.0 ^= $wild then u := STRCONC('"[^a-zA-Z]",u)
-;                  else u := SUBSTRING(u,1,nil)
-;  if u.(k := MAXINDEX u) ^= $wild then u := STRCONC(u,'"[^a-zA-Z]")
-;                                  else u := SUBSTRING(u,0,k)
-;  u
-
-(DEFUN |mkUnixPattern| (|s|)
-  (PROG (|starPositions| |k| |u|)
-  (declare (special |$wild|))
-    (RETURN
-      (SEQ (PROGN
-             (SPADLET |u| (|mkUpDownPattern| |s|))
-             (SPADLET |starPositions|
-                      (REVERSE (PROG (G168264)
-                                 (SPADLET G168264 NIL)
-                                 (RETURN
-                                   (DO
-                                    ((G168270
-                                      (PLUS (SPADDIFFERENCE 1)
-                                       (MAXINDEX |u|)))
-                                     (|i| 1 (QSADD1 |i|)))
-                                    ((QSGREATERP |i| G168270)
-                                     (NREVERSE0 G168264))
-                                     (SEQ
-                                      (EXIT
-                                       (COND
-                                         ((BOOT-EQUAL (ELT |u| |i|)
-                                           |$wild|)
-                                          (SETQ G168264
-                                           (CONS |i| G168264)))))))))))
-             (DO ((G168277 |starPositions| (CDR G168277))
-                  (|i| NIL))
-                 ((OR (ATOM G168277)
-                      (PROGN (SETQ |i| (CAR G168277)) NIL))
-                  NIL)
-               (SEQ (EXIT (SPADLET |u|
-                                   (STRCONC (SUBSTRING |u| 0 |i|)
-                                    ".*"
-                                    (SUBSTRING |u| (PLUS |i| 1) NIL))))))
-             (COND
-               ((NEQUAL (ELT |u| 0) |$wild|)
-                (SPADLET |u| (STRCONC "[^a-zA-Z]" |u|)))
-               ('T (SPADLET |u| (SUBSTRING |u| 1 NIL))))
-             (COND
-               ((NEQUAL (ELT |u| (SPADLET |k| (MAXINDEX |u|))) |$wild|)
-                (SPADLET |u| (STRCONC |u| "[^a-zA-Z]")))
-               ('T (SPADLET |u| (SUBSTRING |u| 0 |k|))))
-             |u|)))))
-
-\end{chunk}
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/interp/util.lisp.pamphlet b/src/interp/util.lisp.pamphlet
index a58cd1c..5190b7f 100644
--- a/src/interp/util.lisp.pamphlet
+++ b/src/interp/util.lisp.pamphlet
@@ -502,10 +502,10 @@ if you use the browse function of the {\bf hypertex} system.
       '(
         |browserAutoloadOnceTrigger|
         |htInitPage|
-        |parentsOf|              ;interop.boot
-        |getParentsFor|              ;old compiler
-        |folks|                      ;for astran
-        |oSearch|
+        |parentsOf|              ; br-con
+        |getParentsFor|          ; br-con
+        |folks|                  ; br-con
+        |oSearch|                ; br-con
         |aokSearch|
         |kSearch|
         |aSearch|
@@ -517,26 +517,14 @@ if you use the browse function of the {\bf hypertex} system.
         |domainsOf|
         |aPage|
         |dbGetOrigin|
-        |dbGetParams|
-        |dbGetKindString|
-        |dbGetOrigin|
         |dbComments|
         |grepConstruct|
-        |bcExpand|
         |cSearch|
         |conPage|
         |dbName|
         |dbPart|
         |form2HtString|
-        |htGloss|
-        |htGreekSearch|
-        |htHistory|
         |htSystemCommands|
-        |htSystemVariables|
-        |htTextSearch|
-        |htTutorialSearch|
-        |htUserVariables|
-        |htsv|
         |oPage|
         |oPageFrom|
         |spadSys|
