diff --git a/books/bookvol5.pamphlet b/books/bookvol5.pamphlet index 3ac4ccf..013162a 100644 --- a/books/bookvol5.pamphlet +++ b/books/bookvol5.pamphlet @@ -1074,7 +1074,6 @@ will end up as a recursive call to ourselves. \calls{processSynonyms}{substring} \calls{processSynonyms}{string2id-n} \calls{processSynonyms}{lassoc} -\calls{processSynonyms}{nequal} \calls{processSynonyms}{strconc} \calls{processSynonyms}{size} \calls{processSynonyms}{concat} @@ -1102,7 +1101,7 @@ will end up as a recursive call to ourselves. (when (setq fun (lassoc syn |$CommandSynonymAlist|)) (setq to (strpos ")" fun 1 nil)) (cond - ((and to (nequal to (1- (size fun)))) + ((and to (not (eql to (1- (size fun))))) (setq opt (strconc " " (substring fun to nil))) (setq fun (substring fun 0 (1- to )))) (t (setq opt " "))) @@ -1991,7 +1990,6 @@ Prints out the value x which is of type m, and records the changes in environment \verb|$e| into \verb|$InteractiveFrame| \verb|$printAnyIfTrue| is documented in setvart.boot. It is controlled with the {\tt )se me any} command. -\calls{recordAndPrint}{nequal} \calls{recordAndPrint}{output} \calls{recordAndPrint}{putHist} \calls{recordAndPrint}{objNewWrap} @@ -2038,7 +2036,7 @@ It is controlled with the {\tt )se me any} command. (if (equal md |$EmptyMode|) (setq mode (|quadSch|)) (setq mode md)) - (when (or (nequal md |$Void|) |$printVoidIfTrue|) + (when (or (not (equal md |$Void|)) |$printVoidIfTrue|) (unless |$collectOutput| (terpri |$algebraOutputStream|)) (unless |$QuietCommand| (|output| xp mdp))) (|putHist| '% '|value| (|objNewWrap| x md) |$e|) @@ -3791,90 +3789,6 @@ Note that incRgen recursively wraps this function in a delay list. \chapter{The Token Scanner} -\defvar{space} -\begin{chunk}{postvars} -(eval-when (eval load) -(defvar space (qenum " " 0))) - -\end{chunk} - -\defvar{escape} -\begin{chunk}{postvars} -(eval-when (eval load) -(defvar escape (qenum "_ " 0))) - -\end{chunk} - -\defvar{stringchar} -\begin{chunk}{postvars} -(eval-when (eval load) -(defvar stringchar (qenum "\" " 0))) - -\end{chunk} - -\defvar{pluscomment} -\begin{chunk}{postvars} -(eval-when (eval load) -(defvar pluscomment (qenum "+ " 0))) - -\end{chunk} - -\defvar{minuscomment} -\begin{chunk}{postvars} -(eval-when (eval load) -(defvar minuscomment (qenum "- " 0))) - -\end{chunk} - -\defvar{radixchar} -\begin{chunk}{postvars} -(eval-when (eval load) -(defvar radixchar (qenum "r " 0))) - -\end{chunk} - -\defvar{dot} -\begin{chunk}{postvars} -(eval-when (eval load) -(defvar dot (qenum ". " 0))) - -\end{chunk} - -\defvar{exponent1} -\begin{chunk}{postvars} -(eval-when (eval load) -(defvar exponent1 (qenum "E " 0))) - -\end{chunk} - -\defvar{exponent2} -\begin{chunk}{postvars} -(eval-when (eval load) -(defvar exponent2 (qenum "e " 0))) - -\end{chunk} - -\defvar{closeparen} -\begin{chunk}{postvars} -(eval-when (eval load) -(defvar closeparen (qenum ") " 0))) - -\end{chunk} - -\defvar{closeangle} -\begin{chunk}{postvars} -(eval-when (eval load) -(defvar closeangle (qenum "> " 0))) - -\end{chunk} - -\defvar{question} -\begin{chunk}{postvars} -(eval-when (eval load) -(defvar question (qenum "? " 0))) - -\end{chunk} - \defvar{scanKeyWords} \begin{chunk}{postvars} (eval-when (eval load) @@ -4132,17 +4046,15 @@ returning the token-dq and the rest of the line-stream \calls{scanIgnoreLine}{incPrefix?} \begin{chunk}{defun scanIgnoreLine} (defun |scanIgnoreLine| (ln n) - (let (fst) (cond ((null n) n) (t - (setq fst (qenum ln 0)) (cond - ((eq fst closeparen) + ((char= (char ln 0) #\)) (cond ((|incPrefix?| "command" 1 ln) t) (t nil))) - (t n)))))) + (t n))))) \end{chunk} @@ -4194,15 +4106,15 @@ returning the token-dq and the rest of the line-stream (cond ((|startsComment?|) (|scanComment|) nil) ((|startsNegComment?|) (|scanNegComment|) nil) - ((equal c question) + ((char= c #\?) (setq |$n| (+ |$n| 1)) (|lfid| "?")) ((|punctuation?| c) (|scanPunct|)) ((|startsId?| ch) (|scanWord| nil)) - ((equal c space) (|scanSpace|) nil) - ((equal c stringchar) (|scanString|)) + ((char= c #\space) (|scanSpace|) nil) + ((char= c #\") (|scanString|)) ((|digit?| ch) (|scanNumber|)) - ((equal c escape) (|scanEscape|)) + ((char= c #\_) (|scanEscape|)) (t (|scanError|)))) (cond ((null b) nil) @@ -4225,19 +4137,18 @@ To pair badge and badgee \usesdollar{startsComment?}{ln} \usesdollar{startsComment?}{sz} \usesdollar{startsComment?}{n} -\uses{startsComment?}{pluscomment} \begin{chunk}{defun startsComment?} (defun |startsComment?| () (let (www) - (declare (special |$ln| |$sz| |$n| pluscomment)) + (declare (special |$ln| |$sz| |$n|)) (cond ((< |$n| |$sz|) (cond - ((equal (qenum |$ln| |$n|) pluscomment) + ((char= (qenum |$ln| |$n|) #\+) (setq www (+ |$n| 1)) (cond ((not (< www |$sz|)) nil) - (t (equal (qenum |$ln| www) pluscomment)))) + (t (char= (qenum |$ln| www) #\+)))) (t nil))) (t nil)))) @@ -4278,11 +4189,11 @@ To pair badge and badgee (cond ((< |$n| |$sz|) (cond - ((equal (qenum |$ln| |$n|) minuscomment) + ((char= (qenum |$ln| |$n|) #\-) (setq www (+ |$n| 1)) (cond ((not (< www |$sz|)) nil) - (t (equal (qenum |$ln| www) minuscomment)))) + (t (char= (qenum |$ln| www) #\-)))) (t nil))) (t nil)))) @@ -4505,7 +4416,7 @@ To pair badge and badgee (t (setq |$n| (+ |$n| 1))))))) (cond - ((or (equal |$n| l) (not (equal (qenum |$ln| |$n|) escape))) + ((or (equal |$n| l) (not (char= (qenum |$ln| |$n|) #\_))) (cond ((and (equal n |$n|) zro) "0") (t (substring |$ln| n (- |$n| n))))) @@ -4594,7 +4505,7 @@ To pair badge and badgee nil) (t nil))) ((equal |$n| n1) t) - ((equal (qenum |$ln| n1) escape) + ((char= (qenum |$ln| n1) #\_) (setq |$n| (+ n1 1)) (|scanEsc|) nil) @@ -4669,7 +4580,7 @@ To pair badge and badgee (setq n |$n|) (setq c (qenum |$ln| |$n|)) (cond - ((or (equal c exponent1) (equal c exponent2)) + ((or (char= c #\E) (char= c #\e)) (setq |$n| (+ |$n| 1)) (cond ((not (< |$n| |$sz|)) @@ -4681,7 +4592,7 @@ To pair badge and badgee (t (setq c1 (qenum |$ln| |$n|)) (cond - ((or (equal c1 pluscomment) (equal c1 minuscomment)) + ((or (char= c1 #\+) (char= c1 #\-)) (setq |$n| (+ |$n| 1)) (cond ((not (< |$n| |$sz|)) @@ -4691,7 +4602,7 @@ To pair badge and badgee (setq e (|spleI| #'|digit?|)) (|lffloat| a w (cond - ((equal c1 minuscomment) + ((char= c1 #\-) (concat "-" e)) (t e)))) (t @@ -4736,7 +4647,7 @@ To pair badge and badgee (setq l |$sz|) (setq endid (|posend| |$ln| |$n|)) (cond - ((or (equal endid l) (not (equal (qenum |$ln| endid) escape))) + ((or (equal endid l) (not (char= (qenum |$ln| endid) #\_))) (setq |$n| endid) (list b (substring |$ln| n1 (- endid n1)))) (t @@ -4896,13 +4807,13 @@ NOTE: do not replace ``lyne'' with ``line'' (cond ((not (< |$n| |$sz|)) (|lfinteger| a)) - ((not (equal (qenum |$ln| |$n|) radixchar)) + ((not (char= (qenum |$ln| |$n|) #\r)) (cond - ((and |$floatok| (equal (qenum |$ln| |$n|) dot)) + ((and |$floatok| (char= (qenum |$ln| |$n|) #\.)) (setq n |$n|) (setq |$n| (+ |$n| 1)) (cond - ((and (< |$n| |$sz|) (equal (qenum |$ln| |$n|) dot)) + ((and (< |$n| |$sz|) (char= (qenum |$ln| |$n|) #\.)) (setq |$n| n) (|lfinteger| a)) (t @@ -4916,11 +4827,11 @@ NOTE: do not replace ``lyne'' with ``line'' (cond ((not (< |$n| |$sz|)) (|lfrinteger| a w)) - ((equal (qenum |$ln| |$n|) dot) + ((char= (qenum |$ln| |$n|) #\.) (setq n |$n|) (setq |$n| (+ |$n| 1)) (cond - ((and (< |$n| |$sz|) (equal (qenum |$ln| |$n|) dot)) + ((and (< |$n| |$sz|) (char= (qenum |$ln| |$n|) #\.)) (setq |$n| n) (|lfrinteger| a w)) (t @@ -13590,9 +13501,11 @@ makeLeaderMsg chPosList == \calls{posPointers}{IFCAR} \calls{posPointers}{getMsgPos2} \calls{posPointers}{insertPos} +\uses{posPointers}{getMsgFTTag} \begin{chunk}{defun posPointers} (defun |posPointers| (msgList) (let (posLetterList pos ftPosList posList increment pointers) + (declare (special |getMsgFTTag|)) (setq pointers "ABCDEFGHIJKLMONPQRS") (setq increment 0) (dolist (msg msgList) @@ -13609,7 +13522,7 @@ makeLeaderMsg chPosList == (setq posLetterList (cons (cons pos (elt pointers increment)) posLetterList)) (setq increment (+ increment 1))) - posLetterList)) + posLetterList))) \end{chunk} @@ -15217,7 +15130,6 @@ the following flags are used: \defun{ofCategory}{ofCategory} \calls{ofCategory}{identp} \calls{ofCategory}{ofCategory} -\calls{ofCategory}{nequal} \calls{ofCategory}{hasCaty} \defsdollar{ofCategory}{Subst} \defsdollar{ofCategory}{hope} @@ -15229,7 +15141,7 @@ the following flags are used: ((identp dom) nil) ((and (listp cat) (eq (car cat) '|Join|)) (every #'(lambda (c) (|ofCategory| dom c)) (cdr cat))) - (t (nequal (|hasCaty| dom cat nil) '|failed|))))) + (t (not (eq (|hasCaty| dom cat nil) '|failed|)))))) \end{chunk} @@ -15557,7 +15469,6 @@ The result is an augmented SL, if d has x, 'failed otherwise. \defun{hasCatExpression}{hasCatExpression} \calls{hasCatExpression}{hasCatExpression} -\calls{hasCatExpression}{nequal} \calls{hasCatExpression}{hasCate} \calls{hasCatExpression}{keyedSystemError} \begin{chunk}{defun hasCatExpression} @@ -15570,7 +15481,7 @@ The result is an augmented SL, if d has x, 'failed otherwise. (loop for x in (qcdr cond) do (setq result (or result - (nequal (setq y (|hasCatExpression| x sl)) '|failed|)))) + (not (eq (setq y (|hasCatExpression| x sl)) '|failed|))))) result) y)) ((and (consp cond) (eq (qcar cond) 'and)) @@ -15579,7 +15490,7 @@ The result is an augmented SL, if d has x, 'failed otherwise. (loop for x in (qcdr cond) do (setq result (and result - (nequal (setq sl (|hasCatExpression| x sl)) '|failed|)))) + (not (eq (setq sl (|hasCatExpression| x sl)) '|failed|))))) result) sl)) ((and (consp cond) (eq (qcar cond) '|has|) @@ -15636,7 +15547,6 @@ The first argument is a pattern variable, which is not substituted by sl \calls{unifyStructVar}{containsVars} \calls{unifyStructVar}{canCoerce} \calls{unifyStructVar}{resolveTT} -\calls{unifyStructVar}{nequal} \calls{unifyStructVar}{isPatternVar} \calls{unifyStructVar}{augmentSub} \refsdollar{unifyStructVar}{domPvar} @@ -15675,10 +15585,10 @@ The first argument is a pattern variable, which is not substituted by sl (cond (s3 (cond - ((nequal s3 s0) + ((not (equal s3 s0)) (setq sl (|augmentSub| v s3 sl)))) (cond - ((and (nequal s3 s1) (|isPatternVar| ss)) + ((and (not (equal s3 s1)) (|isPatternVar| ss)) (setq sl (|augmentSub| ss s3 sl)))) sl) (t '|failed|))))) @@ -15687,10 +15597,10 @@ The first argument is a pattern variable, which is not substituted by sl (cond (s3 (cond - ((nequal s3 s0) + ((not (equal s3 s0)) (setq sl (|augmentSub| v s3 sl)))) (cond - ((and (nequal s3 s1) (|isPatternVar| ss)) + ((and (not (equal s3 s1)) (|isPatternVar| ss)) (setq sl (|augmentSub| ss s3 sl)))) sl) (t '|failed|))) @@ -15738,7 +15648,7 @@ SL is augmented, if cond is true, otherwise the result is 'failed \defsdollar{hasCaty1}{domPvar} \begin{chunk}{defun hasCaty1} (defun |hasCaty1| (cond sl) - (let (|$domPvar| args tmp1 tmp2 a tmp3 b S) + (let (|$domPvar| a s) (declare (special |$domPvar|)) (setq |$domPvar| nil) (cond @@ -15803,7 +15713,6 @@ SL is augmented, if cond is true, otherwise the result is 'failed \calls{hasCate}{isPatternVar} \calls{hasCate}{hasCate1} \calls{hasCate}{hasCateSpecial} -\calls{hasCate}{nequal} \calls{hasCate}{containsVariables} \calls{hasCate}{subCopy} \calls{hasCate}{hasCaty} @@ -15812,14 +15721,14 @@ SL is augmented, if cond is true, otherwise the result is 'failed \defsdollar{hasCate}{hope} \begin{chunk}{defun hasCate} (defun |hasCate| (dom cat sl) - (let (nsl p s v d sl1) + (let (nsl p s sl1) (declare (special |$hope| |$Subst| |$EmptyMode|)) (cond ((equal dom |$EmptyMode|) nil) ((|isPatternVar| dom) (cond ((and (setq p (assq dom sl)) - (nequal (setq nsl (|hasCate| (cdr p) cat sl)) '|failed|)) + (not (eq (setq nsl (|hasCate| (cdr p) cat sl)) '|failed|))) nsl) ((or (setq p (assq dom |$Subst|)) (setq p (assq dom sl))) (setq s (|hasCate1| (cdr p) cat sl dom)) @@ -15827,7 +15736,7 @@ SL is augmented, if cond is true, otherwise the result is 'failed ((null (eq s '|failed|)) s) (t (|hasCateSpecial| dom (cdr p) cat sl)))) (t - (when (nequal sl '|failed|) (setq |$hope| t)) + (when (not (eq sl '|failed|)) (setq |$hope| t)) '|failed|))) (t (setq sl1 @@ -15870,7 +15779,7 @@ The result is a substitution list or 'failed. \refsdollar{hasCateSpecial}{QuotientField} \begin{chunk}{defun hasCateSpecial} (defun |hasCateSpecial| (v dom cat sl) - (let (arg tmp1 d domp nsl) + (let (arg d domp nsl) (declare (special |$Integer| |$QuotientField|)) (cond ((and (consp dom) (eq (qcar dom) '|FactoredForm|) @@ -15996,7 +15905,7 @@ The result is a substitution list or 'failed. \refsdollar{defaultTargetFE}{RationalNumber} \begin{chunk}{defun defaultTargetFE} (defun |defaultTargetFE| (&rest dom) - (let (a options d ud tmp1) + (let (a options) (declare (special |$FunctionalExpression| |$Integer| |$Symbol| |$RationalNumber|)) (setq a (car dom)) @@ -16032,7 +15941,6 @@ The result is a substitution list or 'failed. \calls{isEqualOrSubDomain}{isSubDomain} \begin{chunk}{defun isEqualOrSubDomain} (defun |isEqualOrSubDomain| (d1 d2) - (let (tmp1) (or (equal d1 d2) (|isSubDomain| d1 d2) (and (atom d1) @@ -16046,7 +15954,7 @@ The result is a substitution list or 'failed. (consp (qcdr d1)) (eq (qcddr d1) nil) (equal (qcadr d1) d2)) (and (consp d1) (eq (qcdr d1) nil) - (equal (qcar d1) d2))))))) + (equal (qcar d1) d2)))))) \end{chunk} @@ -16326,7 +16234,7 @@ You can type ``)? compile'' and see compiler related information (setq |$options| options) (setq |$e| |$CategoryFrame|) (setq fun (|selectOptionLC| op $syscommands '|commandError|)) - (if (and argl (eq (elt argl 0) '?) (nequal fun '|synonym|)) + (if (and argl (eq (elt argl 0) '?) (not (eq fun '|synonym|))) (|helpSpad2Cmd| (cons fun nil)) (progn (setq fun @@ -16583,7 +16491,6 @@ Thus: ; NMSORT [n for [n,:.] in CAAR $InteractiveFrame | ; (n ^= "--macros--" and n^= "--flags--")] \end{verbatim} -\calls{getWorkspaceNames}{nequal} \calls{getWorkspaceNames}{seq} \calls{getWorkspaceNames}{nmsort} \calls{getWorkspaceNames}{exit} @@ -16592,8 +16499,8 @@ Thus: (defun |getWorkspaceNames| () (PROG (n) (declare (special |$InteractiveFrame|)) - (RETURN - (SEQ (NMSORT (PROG (G166322) + (return + (seq (nmsort (PROG (G166322) (setq G166322 NIL) (RETURN (DO ((G166329 (CAAR |$InteractiveFrame|) @@ -16610,8 +16517,8 @@ Thus: NIL)) (NREVERSE0 G166322)) (SEQ (EXIT (COND - ((AND (NEQUAL n '|--macros--|) - (NEQUAL n '|--flags--|)) + ((AND (not (eq n '|--macros--|)) + (not (eq n '|--flags--|))) (SETQ G166322 (CONS n G166322)))))))))))))) @@ -20347,7 +20254,6 @@ this function will destructively change it to (2 3 1). \end{chunk} \defunsec{closeInterpreterFrame}{Close an Interpreter Frame} -\calls{closeInterpreterFrame}{nequal} \calls{closeInterpreterFrame}{framename} \calls{closeInterpreterFrame}{throwKeyedMsg} \callsdollar{closeInterpreterFrame}{erase} @@ -20361,7 +20267,7 @@ this function will destructively change it to (2 3 1). (declare (special |$interpreterFrameRing| |$interpreterFrameName|)) (let (ifr found) (if (null (cdr |$interpreterFrameRing|)) - (if (and name (nequal name |$interpreterFrameName|)) + (if (and name (not (equal name |$interpreterFrameName|))) (|throwKeyedMsg| 's2iz0020 ; 1 frame left. not the correct name. (cons |$interpreterFrameName| nil)) (|throwKeyedMsg| 's2iz0021 nil)) ; only 1 frame left, not closed @@ -20372,7 +20278,7 @@ this function will destructively change it to (2 3 1). (setq found nil) (setq ifr nil) (dolist (f |$interpreterFrameRing|) - (if (or found (nequal name (frameName f))) + (if (or found (not (equal name (frameName f)))) (setq ifr (cons f ifr))) (setq found t)) (if (null found) @@ -21240,7 +21146,6 @@ file and then write the in-memory history to a new file \end{list} \calls{setHistoryCore}{boot-equal} \calls{setHistoryCore}{sayKeyedMsg} -\calls{setHistoryCore}{nequal} \calls{setHistoryCore}{rkeyids} \calls{setHistoryCore}{histFileName} \calls{setHistoryCore}{readHiFi} @@ -21272,7 +21177,7 @@ file and then write the in-memory history to a new file (inCore (setq |$internalHistoryTable| nil) (cond - ((nequal |$IOindex| 0) + ((not (eql |$IOindex| 0)) (setq l (length (rkeyids (|histFileName|)))) (do ((i 1 (1+ i))) ((> i l) nil) @@ -21331,7 +21236,6 @@ Also used in the output routines. \calls{writeInputLines}{histInputFileName} \calls{writeInputLines}{histFileErase} \calls{writeInputLines}{defiostream} -\calls{writeInputLines}{nequal} \calls{writeInputLines}{namestring} \calls{writeInputLines}{shut} \uses{writeInputLines}{underbar} @@ -21378,7 +21282,7 @@ Also used in the output routines. (dolist (x (|removeUndoLines| (nreverse lineList))) (write-line x inp)) (cond - ((nequal fn '|redo|) + ((not (eq fn '|redo|)) (|sayKeyedMsg| 's2ih0014 ; edit this file to see input lines (list (|namestring| file))))) (shut inp) @@ -22337,7 +22241,6 @@ back. \calls{dewritify,dewritifyInner}{gensymmer} \calls{dewritify,dewritifyInner}{error} \calls{dewritify,dewritifyInner}{poundsign} -\calls{dewritify,dewritifyInner}{nequal} \calls{dewritify,dewritifyInner}{hput} \calls{dewritify,dewritifyInner}{dewritify,dewritifyInner} \calls{dewritify,dewritifyInner}{concat} @@ -22381,7 +22284,7 @@ back. (exit (symbol-function oname)))) (when (null (compiled-function-p f)) (exit (|error| "A required BPI does not exist."))) - (when (and (> (|#| ob) 3) (nequal (sxhash f) (elt ob 3))) + (when (and (> (|#| ob) 3) (not (equal (sxhash f) (elt ob 3)))) (exit (|error| "A required BPI has been redefined."))) (hput |$seen| ob f) (exit f)))) @@ -23278,12 +23181,11 @@ command "AXIOMsys" may be saved. \end{chunk} \defun{savesystem}{The )savesystem command} -\calls{savesystem}{nequal} \calls{savesystem}{helpSpad2Cmd} \calls{savesystem}{spad-save} \begin{chunk}{defun savesystem} (defun |savesystem| (arg) - (if (or (nequal (|#| arg) 1) (null (symbolp (car arg)))) + (if (or (not (eql (|#| arg) 1)) (null (symbolp (car arg)))) (|helpSpad2Cmd| '(|savesystem|)) (spad-save (symbol-name (car arg))))) @@ -25809,7 +25711,6 @@ recurrence specially compile recurrence relations on \calls{setFunctionsCache}{object2String} \calls{setFunctionsCache}{describeSetFunctionsCache} \calls{setFunctionsCache}{sayAllCacheCounts} -\calls{setFunctionsCache}{nequal} \calls{setFunctionsCache}{sayMessage} \calls{setFunctionsCache}{bright} \calls{setFunctionsCache}{terminateSystemCommand} @@ -25837,7 +25738,7 @@ recurrence specially compile recurrence relations on (t (setq n (car arg)) (cond - ((and (nequal n '|all|) (or (null (integerp n)) (minusp n))) + ((and (not (eq n '|all|)) (or (null (integerp n)) (minusp n))) (|sayMessage| `("Your value of" ,@(|bright| n) "is invalid because ...")) (|describeSetFunctionsCache|) @@ -25938,7 +25839,6 @@ recurrence specially compile recurrence relations on \defunsec{sayAllCacheCounts}{Display all cache counts} \calls{sayAllCacheCounts}{sayCacheCount} -\calls{sayAllCacheCounts}{nequal} \usesdollar{sayAllCacheCounts}{cacheCount} \usesdollar{sayAllCacheCounts}{cacheAlist} \begin{chunk}{defun sayAllCacheCounts} @@ -25955,7 +25855,7 @@ recurrence specially compile recurrence relations on (progn (setq x (car t1)) (setq n (cdr t1)) t1) nil)) nil) - (when (nequal n |$cacheCount|) (|sayCacheCount| x n)))))) + (when (not (equal n |$cacheCount|)) (|sayCacheCount| x n)))))) \end{chunk} @@ -29636,7 +29536,6 @@ showall display all stream elements computed off \defun{setStreamsCalculate}{setStreamsCalculate} \calls{setStreamsCalculate}{object2String} \calls{setStreamsCalculate}{describeSetStreamsCalculate} -\calls{setStreamsCalculate}{nequal} \calls{setStreamsCalculate}{sayMessage} \calls{setStreamsCalculate}{bright} \calls{setStreamsCalculate}{terminateSystemCommand} @@ -29653,7 +29552,7 @@ showall display all stream elements computed off (t (setq n (car arg)) (cond - ((and (nequal n '|all|) (or (null (integerp n)) (minusp n))) + ((and (not (eq n '|all|)) (or (null (integerp n)) (minusp n))) (|sayMessage| `("Your value of" ,@(|bright| n) "is invalid because ...")) (|describeSetStreamsCalculate|) @@ -30572,7 +30471,7 @@ where = ELT | CONST | Subsumed | (XLAM..) .. (defun |getOplistWithUniqueSignatures| (op pairlis signatureAlist) (let (sig slotNumber pred kind alist) (loop for item in signatureAlist - when (nequal (fourth item) '|Subsumed|) + when (not (eq (fourth item) '|Subsumed|)) do (setq sig (first item)) (setq slotNumber (second item)) @@ -31795,7 +31694,6 @@ This reports the traced functions \end{chunk} \defun{removeOption}{removeOption} -\calls{removeOption}{nequal} \begin{chunk}{defun removeOption} (defun |removeOption| (op options) (let (opt t0) @@ -31804,7 +31702,7 @@ This reports the traced functions (progn (setq optentry (car t1)) nil) (progn (progn (setq opt (car optentry)) optentry) nil)) (nreverse0 t0)) - (when (nequal opt op) (setq t0 (cons optentry t0)))))) + (when (not (equal opt op)) (setq t0 (cons optentry t0)))))) \end{chunk} @@ -34105,7 +34003,6 @@ Evaluates the arguments passed to a constructor \calls{evaluateType1}{getConstructorSignature} \calls{evaluateType1}{throwEvalTypeMsg} \calls{evaluateType1}{replaceSharps} -\calls{evaluateType1}{nequal} \calls{evaluateType1}{categoryForm?} \calls{evaluateType1}{evaluateType} \calls{evaluateType1}{evalCategory} @@ -34137,7 +34034,7 @@ Evaluates the arguments passed to a constructor (setq ml (cdr sig)) (setq ml (|replaceSharps| ml form)) (cond - ((nequal (|#| argl) (|#| ml)) + ((not (eql (|#| argl) (|#| ml))) (|throwEvalTypeMsg| 'S2IE0003 (list form form))) (t (loop for x in argl for m in ml @@ -34800,7 +34697,6 @@ Removing undo lines from \verb|)hist )write linelist| \calls{removeUndoLines}{exit} \calls{removeUndoLines}{trimString} \calls{removeUndoLines}{substring} -\calls{removeUndoLines}{nequal} \calls{removeUndoLines}{charPosition} \calls{removeUndoLines}{maxindex} \calls{removeUndoLines}{undoCount} @@ -34859,7 +34755,7 @@ Removing undo lines from \verb|)hist )write linelist| (setq s (|trimString| x))) (setq s1 (|trimString| (substring s 5 nil))) (cond - ((nequal s1 ")redo") + ((not (string= s1 ")redo")) (setq m (|charPosition| #\) s1 0)) (setq code (cond @@ -34870,9 +34766,9 @@ Removing undo lines from \verb|)hist )write linelist| (cond ((string= s1 ")redo") 0) - ((nequal s2 "") + ((not (string= s2 "")) (|undoCount| (parse-integer s2))) - (t (spaddifference 1)))) + (t -1))) (rplaca y (concat ">" code (princ-to-string n)))) (t nil))) @@ -34903,7 +34799,7 @@ Removing undo lines from \verb|)hist )write linelist| (setq n (spaddifference n 1)) (setq y (cdr y)))))))) (cond - ((and y (nequal code #\b)) + ((and y (not (eql code #\b))) (setq acc (cons c acc))))) (t (setq acc (cons x acc))))))) (setq |$IOindex| savedIOindex) @@ -38719,7 +38615,6 @@ filetype and filemode. We also UPCASE everything. \defun{mergePathnames}{mergePathnames} \calls{mergePathnames}{pathnameName} -\calls{mergePathnames}{nequal} \calls{mergePathnames}{pathnameType} \calls{mergePathnames}{pathnameDirectory} \begin{chunk}{defun mergePathnames} @@ -38727,9 +38622,9 @@ filetype and filemode. We also UPCASE everything. (let (fn ft fm) (cond ((string= (setq fn (|pathnameName| a)) "*") b) - ((nequal fn (|pathnameName| b)) a) + ((not (equal fn (|pathnameName| b))) a) ((string= (setq ft (|pathnameType| a)) "*") b) - ((nequal ft (|pathnameType| b)) a) + ((not (equal ft (|pathnameType| b))) a) ((equal (setq fm (|pathnameDirectory| a)) (list "*" )) b) (t a)))) @@ -39141,7 +39036,7 @@ semantics survive. (t (setq objectp (|retractUnderDomain| object type underDomain)) (cond - ((nequal objectp '|failed|) objectp) + ((not (eq objectp '|failed|)) objectp) ; see if we can use the retract functions ((setq objectp (|coerceRetract| object underDomain)) objectp) ; see if we have a special case here diff --git a/books/bookvol9.pamphlet b/books/bookvol9.pamphlet index f9fbace..83aad5a 100644 --- a/books/bookvol9.pamphlet +++ b/books/bookvol9.pamphlet @@ -3513,7 +3513,7 @@ Equation(S: Type): public == private where \defsdollar{string2BootTree}{boot} \defsdollar{string2BootTree}{spad} \begin{chunk}{defun string2BootTree} -(defun |string2BootTree| (s) +(defun string2BootTree (s) (init-boot/spad-reader) (let* ((boot-line-stack (list (cons 1 s))) ($boot t) @@ -3522,7 +3522,7 @@ Equation(S: Type): public == private where (line-handler 'next-boot-line) (parseout (progn (|PARSE-Expression|) (pop-stack-1)))) (declare (special boot-line-stack $boot $spad xtokenreader line-handler)) - (def-rename (|new2OldLisp| parseout)))) + (def-rename (new2OldLisp parseout)))) \end{chunk} @@ -3530,8 +3530,8 @@ Equation(S: Type): public == private where \calls{new2OldLisp}{new2OldTran} \calls{new2OldLisp}{postTransform} \begin{chunk}{defun new2OldLisp} -(defun |new2OldLisp| (x) - (|new2OldTran| (|postTransform| x))) +(defun new2OldLisp (x) + (new2OldTran (postTransform x))) \end{chunk} @@ -3543,7 +3543,7 @@ Equation(S: Type): public == private where \calls{new2OldTran}{newConstruct} \refsdollar{new2OldTran}{new2OldRenameAssoc} \begin{chunk}{defun new2OldTran} -(defun |new2OldTran| (x) +(defun new2OldTran (x) (prog (tmp1 tmp2 tmp3 tmp4 tmp5 tmp6 a b c d) (declare (special |$new2OldRenameAssoc|)) (return @@ -3561,50 +3561,54 @@ Equation(S: Type): public == private where (eq tmp3 'seq) (or (setq c (nreverse c)) t)) (return - `(|where| ,(|new2OldTran| a) ,@(|new2OldTran| c) - ,(|new2OldTran| d)))) + `(|where| ,(new2OldTran a) ,@(new2OldTran c) + ,(new2OldTran d)))) (return (case (car x) (quote x) - (def (|newDef2Def| x)) - (if (|newIf2Cond| x)) + (def (newDef2Def x)) + (if (newIf2Cond x)) ; construct === #'list (see patches.lisp) TPD 12/2011 - (|construct| (|newConstruct| (|new2OldTran| (cdr x)))) - (t `(,(|new2OldTran| (car x)) . ,(|new2OldTran| (cdr x)))))))))) + (|construct| (newConstruct (new2OldTran (cdr x)))) + (t `(,(new2OldTran (car x)) . ,(new2OldTran (cdr x)))))))))) \end{chunk} \defun{newIf2Cond}{newIf2Cond} -\calls{newIf2Cond}{let-error} +\calls{newIf2Cond}{letError} \calls{newIf2Cond}{new2OldTran} \begin{chunk}{defun newIf2Cond} -(defun |newIf2Cond| (cond-expr) +(defun newIf2Cond (cond-expr) (if (not (and (= (length cond-expr) 4) (eq (car cond-expr) 'if))) - (let_error "(IF,a,b,c)" cond-expr) + (letError "(IF,a,b,c)" cond-expr) (let ((a (second cond-expr)) (b (third cond-expr)) (c (fourth cond-expr))) - (setq a (|new2OldTran| a) b (|new2OldTran| b) c (|new2OldTran| c)) + (setq a (new2OldTran a) b (new2OldTran b) c (new2OldTran c)) (if (eq c '|noBranch|) `(if ,a ,b)) `(if ,a ,b ,c)))) \end{chunk} + +(defun letError (form val) + (|systemError| (format nil "~S is not matched by structure ~S~%" form val))) + \defun{newDef2Def}{newDef2Def} -\calls{newDef2Def}{let-error} +\calls{newDef2Def}{letError} \calls{newDef2Def}{new2OldDefForm} \calls{newDef2Def}{new2OldTran} \begin{chunk}{defun newDef2Def} -(defun |newDef2Def| (def-expr) +(defun newDef2Def (def-expr) (if (not (and (= (length def-expr) 5) (eq (car def-expr) 'def))) - (let_error "(DEF,form,a,b,c)" def-expr) + (letError "(DEF,form,a,b,c)" def-expr) (let ((form (second def-expr)) (a (third def-expr)) (b (fourth def-expr)) (c (fifth def-expr))) - `(def ,(|new2OldDefForm| form) ,(|new2OldTran| a) - ,(|new2OldTran| b) ,(|new2OldTran| c))))) + `(def ,(new2OldDefForm form) ,(new2OldTran a) + ,(new2OldTran b) ,(new2OldTran c))))) \end{chunk} @@ -3612,22 +3616,22 @@ Equation(S: Type): public == private where \calls{new2OldDefForm}{new2OldTran} \calls{new2OldDefForm}{new2OldDefForm} \begin{chunk}{defun new2OldDefForm} -(defun |new2OldDefForm| (x) +(defun new2OldDefForm (x) (cond - ((atom x) (|new2OldTran| x)) + ((atom x) (new2OldTran x)) ((and (listp x) (listp (car x)) (eq (caar x) '|is|) (= (length (car x)) 3)) (let ((a (second (car x))) (b (third (car x))) (y (cdr x))) - (|new2OldDefForm| `((spadlet ,a ,b) ,@y)))) - ((cons (|new2OldTran| (car x)) (|new2OldDefForm| (cdr x)))))) + (new2OldDefForm `((spadlet ,a ,b) ,@y)))) + ((cons (new2OldTran (car x)) (new2OldDefForm (cdr x)))))) \end{chunk} \defun{newConstruct}{newConstruct} \begin{chunk}{defun newConstruct} -(defun |newConstruct| (z) +(defun newConstruct (z) (if (atom z) z - `(cons ,(car z) ,(|newConstruct| (cdr z))))) + `(cons ,(car z) ,(newConstruct (cdr z))))) \end{chunk} @@ -4295,7 +4299,7 @@ leave it alone." ((char= (elt line 0) #\) ) (cond ((initial-substring ")if" line) - (if (eval (|string2BootTree| (storeblanks line 3))) + (if (eval (string2BootTree (storeblanks line 3))) (preparseReadLine x) (skip-ifblock x))) ((initial-substring ")elseif" line) (skip-to-endif x)) @@ -4329,12 +4333,12 @@ leave it alone." (cond ((initial-substring ")if" line) (cond - ((eval (|string2BootTree| (storeblanks line 3))) + ((eval (string2BootTree (storeblanks line 3))) (preparseReadLine X)) (t (skip-ifblock x)))) ((initial-substring ")elseif" line) (cond - ((eval (|string2BootTree| (storeblanks line 7))) + ((eval (string2BootTree (storeblanks line 7))) (preparseReadLine X)) (t (skip-ifblock x)))) ((initial-substring ")else" line) @@ -4386,6 +4390,28 @@ leave it alone." \end{chunk} +\defun{expand-tabs}{expand-tabs} +\calls{expand-tabs}{nonblankloc} +\calls{expand-tabs}{indent-pos} +\begin{chunk}{defun expand-tabs} +(defun expand-tabs (str) + (if (and (stringp str) (> (length str) 0)) + (let ((bpos (nonblankloc str)) + (tpos (indent-pos str))) + (setq str + (if (eql bpos tpos) + str + (concatenate 'string (make-string tpos :initial-element #\space) + (subseq str bpos)))) + ;; remove dos CR + (let ((lpos (maxindex str))) + (if (eq (char str lpos) #\Return) + (subseq str 0 lpos) + str))) + str)) + +\end{chunk} + \section{I/O Handling} \defun{preparse-echo}{preparse-echo} \uses{preparse-echo}{Echo-Meta} @@ -4865,7 +4891,7 @@ of the symbol being parsed. The original list read: (setq tList (second arg)) (setq specialList (third arg)) (setq body (fourth arg)) - (|setDefOp| |$lhs|) + (setDefOp |$lhs|) (list 'def (|parseLhs| |$lhs|) (|parseTranList| tList) (|parseTranList| specialList) @@ -5478,7 +5504,7 @@ of the symbol being parsed. The original list read: (consp (qsecond n)) (eq (qcaadr n) 'segment) (consp (qcdadr n)) (eq (qcddadr n) nil)) - (|postError| (list " You cannot reverse an infinite sequence." ))) + (postError (list " You cannot reverse an infinite sequence." ))) ((and (consp n) (eq (qfirst n) 'segment) (consp (qrest n)) (consp (qcddr n)) (eq (qcdddr n) nil)) @@ -5493,7 +5519,7 @@ of the symbol being parsed. The original list read: (eq (qrest (qcddadr n)) nil)) (if (third (second n)) (list 'step i (third (second n)) -1 (second (second n))) - (|postError| (list " You cannot reverse an infinite sequence.")))) + (postError (list " You cannot reverse an infinite sequence.")))) ((and (consp n) (eq (qfirst n) '|tails|) (consp (qrest n)) (eq (qcddr n) nil)) (list 'on i (second n))) @@ -5526,7 +5552,7 @@ of the symbol being parsed. The original list read: (consp (qrest u)) (consp (qcddr u)) (consp (qcdddr u)))) - (|postError| + (postError (cons '| You cannot use| (append (|bright| "by") (list "except for an explicitly indexed sequence."))))) @@ -5818,7 +5844,7 @@ of the symbol being parsed. The original list read: (setq b (|parseTran| (cdr arg))) (cond (b - (when (nequal a 1) (moan "multiple-level 'return' not allowed")) + (unless (eql a 1) (moan "multiple-level 'return' not allowed")) (cons '|return| (cons 1 b))) (t (list '|return| 1 a))))) @@ -5861,7 +5887,7 @@ of the symbol being parsed. The original list read: (when (consp arg) (setq tmp1 (reverse arg))) (if (null (and (consp arg) (consp tmp1) (consp (qfirst tmp1)) (eq (qcaar tmp1) '|exit|))) - (|postError| (list " Invalid ending to block: " (|last| arg))) + (postError (list " Invalid ending to block: " (|last| arg))) (|transSeq| (|mapInto| arg '|parseTran|))))) \end{chunk} @@ -6332,7 +6358,6 @@ $\rightarrow$ \calls{compDefineCategory2}{take} \calls{compDefineCategory2}{sublis} \calls{compDefineCategory2}{compMakeDeclaration} -\calls{compDefineCategory2}{nequal} \calls{compDefineCategory2}{opOf} \calls{compDefineCategory2}{optFunctorBody} \calls{compDefineCategory2}{compOrCroak} @@ -6433,8 +6458,8 @@ $\rightarrow$ do (setq env (third (|compMakeDeclaration| (list '|:| x r) mode env)))) ; 4. compile body in environment of %type declarations for arguments (setq opp |$op|) - (when (and (nequal (|opOf| formalBody) '|Join|) - (nequal (|opOf| formalBody) '|mkCategory|)) + (when (and (not (eq (|opOf| formalBody) '|Join|)) + (not (eq (|opOf| formalBody) '|mkCategory|))) (setq formalBody (list '|Join| formalBody))) (setq body (|optFunctorBody| (car (|compOrCroak| formalBody (car signaturep) env)))) @@ -6501,7 +6526,6 @@ $\rightarrow$ \calls{compile}{userError} \calls{compile}{encodeItem} \calls{compile}{strconc} -\calls{compile}{nequal} \calls{compile}{kar} \calls{compile}{encodeFunctionName} \calls{compile}{splitEncodedFunctionName} @@ -7147,7 +7171,6 @@ replaces all specific domains mentioned in the modemap with pattern variables, and predicates \calls{interactiveModemapForm}{qcar} \calls{interactiveModemapForm}{qcdr} -\calls{interactiveModemapForm}{nequal} \calls{interactiveModemapForm}{replaceVars} \calls{interactiveModemapForm}{modemapPattern} \calls{interactiveModemapForm}{substVars} @@ -7160,7 +7183,7 @@ variables, and predicates (fn (x) (if (and (consp x) (consp (qrest x)) (consp (qcddr x)) (eq (qcdddr x) nil) - (nequal (qfirst x) '|isFreeFunction|) + (not (eq (qfirst x) '|isFreeFunction|)) (atom (qthird x))) (list (first x) (second x) (list (third x))) x))) @@ -7221,7 +7244,7 @@ identifier in newvars in the expression x (cond ((eq (car predicate) 'and) (setq predicates (append domainPreds (cdr predicate)))) - ((nequal predicate (mkq t)) + ((not (equal predicate (mkq t))) (setq predicates (cons predicate domainPreds))) (t (setq predicates (or domainPreds (list predicate))))) @@ -8161,7 +8184,6 @@ where item has form \calls{compDefineFunctor1}{getParentsFor} \calls{compDefineFunctor1}{computeAncestorsOf} \calls{compDefineFunctor1}{constructor?} -\calls{compDefineFunctor1}{nequal} \calls{compDefineFunctor1}{NRTmakeSlot1Info} \calls{compDefineFunctor1}{isCategoryPackageName} \calls{compDefineFunctor1}{lisplibWrite} @@ -8420,7 +8442,7 @@ where item has form (if (and (consp |$functorTarget|) (eq (qfirst |$functorTarget|) 'category) (consp (qrest |$functorTarget|)) - (nequal (qsecond |$functorTarget|) '|domain|)) + (not (eq (qsecond |$functorTarget|) '|domain|))) '|package| '|domain|)) (setq |$lisplibForm| form) @@ -8679,7 +8701,7 @@ Compute the lookup function (complete or incomplete) \defun{disallowNilAttribute}{disallowNilAttribute} \begin{chunk}{defun disallowNilAttribute} (defun |disallowNilAttribute| (x) - (loop for y in x when (and (car y) (nequal (car y) '|nil|)) + (loop for y in x when (and (car y) (not (eq (car y) '|nil|))) collect y)) \end{chunk} @@ -10779,7 +10801,6 @@ add flag identifiers as literals in the environment \calls{mkNewModemapList}{qcar} \calls{mkNewModemapList}{qcdr} \calls{mkNewModemapList}{mergeModemap} -\calls{mkNewModemapList}{nequal} \calls{mkNewModemapList}{nreverse0} \calls{mkNewModemapList}{insertModemap} \refsdollar{mkNewModemapList}{InteractiveMode} @@ -10803,7 +10824,7 @@ add flag identifiers as literals in the environment (|$forceAdd| (|mergeModemap| entry curModemapList env)) ((eq opred t) curModemapList) (t - (when (and (nequal pred t) (nequal pred opred)) + (when (and (not (eq pred t)) (not (equal pred opred))) (setq pred (list 'or pred opred))) (dolist (x curModemapList (nreverse0 result)) (push @@ -11910,7 +11931,6 @@ An angry JHD - August 15th., 1984 \calls{mkExplicitCategoryFunction}{mustInstantiate} \calls{mkExplicitCategoryFunction}{remdup} \calls{mkExplicitCategoryFunction}{identp} -\calls{mkExplicitCategoryFunction}{nequal} \calls{mkExplicitCategoryFunction}{wrapDomainSub} \begin{chunk}{defun mkExplicitCategoryFunction} (defun |mkExplicitCategoryFunction| (domainOrPackage sigList atList) @@ -11940,7 +11960,7 @@ An angry JHD - August 15th., 1984 (setq result (append result (loop for x in sig - when (and (identp x) (nequal x '$)) + when (and (identp x) (not (eq x '$))) collect x)))) result))) (|wrapDomainSub| parameters body))) @@ -12461,7 +12481,6 @@ An angry JHD - August 15th., 1984 \calls{getSignatureFromMode}{opOf} \calls{getSignatureFromMode}{qcar} \calls{getSignatureFromMode}{qcdr} -\calls{getSignatureFromMode}{nequal} \calls{getSignatureFromMode}{length} \calls{getSignatureFromMode}{stackAndThrow} \calls{getSignatureFromMode}{eqsubstlist} @@ -12474,7 +12493,7 @@ An angry JHD - August 15th., 1984 (setq tmp1 (|getmode| (|opOf| form) env)) (when (and (consp tmp1) (eq (qfirst tmp1) '|Mapping|)) (setq signature (qrest tmp1)) - (if (nequal (|#| form) (|#| signature)) + (if (not (eql (|#| form) (|#| signature))) (|stackAndThrow| (list '|Wrong number of arguments: | form)) (eqsubstlist (cdr form) (take (|#| (cdr form)) |$FormalMapVariableList|) @@ -13050,7 +13069,6 @@ is still more than one complain else return the only signature. \calls{compElt}{convert} \calls{compElt}{opOf} \calls{compElt}{getDeltaEntry} -\calls{compElt}{nequal} \usesdollar{compElt}{One} \usesdollar{compElt}{Zero} \begin{chunk}{defun compElt} @@ -13092,7 +13110,7 @@ is still more than one complain else return the only signature. (setq sig (first modemap)) (setq pred (caadr modemap)) (setq val (cadadr modemap)) - (unless (and (nequal (|#| sig) 2) + (unless (and (not (eql (|#| sig) 2)) (null (and (consp val) (eq (qfirst val) '|elt|)))) (setq val (|genDeltaEntry| (cons (|opOf| anOp) modemap))) (|convert| (list (list '|call| val) (second sig) env) mode)))) @@ -13805,7 +13823,6 @@ is still more than one complain else return the only signature. \calls{compPretend}{addDomain} \calls{compPretend}{comp} \calls{compPretend}{opOf} -\calls{compPretend}{nequal} \calls{compPretend}{stackSemanticError} \calls{compPretend}{stackWarning} \usesdollar{compPretend}{newCompilerUnionFlag} @@ -13823,7 +13840,7 @@ is still more than one complain else return the only signature. (cond ((and |$newCompilerUnionFlag| (eq (|opOf| (second td)) '|Union|) - (nequal (|opOf| mode) '|Union|)) + (not (eq (|opOf| mode) '|Union|))) (|stackSemanticError| (list '|cannot pretend | x '| of mode | (second td) '| to mode | mode) nil)) @@ -14064,7 +14081,6 @@ is still more than one complain else return the only signature. \defun{compReturn}{compReturn} \calls{compReturn}{stackSemanticError} -\calls{compReturn}{nequal} \calls{compReturn}{userError} \calls{compReturn}{resolve} \calls{compReturn}{comp} @@ -14082,7 +14098,7 @@ is still more than one complain else return the only signature. (|stackSemanticError| (list '|the return before| '|%b| x '|%d| '|is unneccessary|) nil) nil) - ((nequal level 1) + ((not (eql level 1)) (|userError| "multi-level returns not supported")) (t (setq index (max 0 (1- (|#| |$exitModeStack|)))) @@ -14352,7 +14368,7 @@ is still more than one complain else return the only signature. (decompose m1 (|#| nameList) env)) (when selectorModePairs (cond - ((nequal (|#| nameList) (|#| selectorModePairs)) + ((not (eql (|#| nameList) (|#| selectorModePairs))) (|stackMessage| (list val '| must decompose into | (|#| nameList) '| components| ))) @@ -14376,7 +14392,6 @@ is still more than one complain else return the only signature. \end{chunk} \defun{setqMultipleExplicit}{setqMultipleExplicit} -\calls{setqMultipleExplicit}{nequal} \calls{setqMultipleExplicit}{stackMessage} \calls{setqMultipleExplicit}{genVariable} \calls{setqMultipleExplicit}{compSetq1} @@ -14389,7 +14404,7 @@ is still more than one complain else return the only signature. (let (gensymList assignList tmp1 reAssignList) (declare (special |$NoValueMode| |$EmptyMode|)) (cond - ((nequal (|#| nameList) (|#| valList)) + ((not (eql (|#| nameList) (|#| valList))) (|stackMessage| (list '|Multiple assignment error; # of items in: | nameList '|must = # in: | valList))) @@ -14441,7 +14456,6 @@ is still more than one complain else return the only signature. \seebook{setqSingle}{getProplist}{5} \calls{setqSingle}{getmode} \calls{setqSingle}{get} -\calls{setqSingle}{nequal} \calls{setqSingle}{maxSuperType} \calls{setqSingle}{comp} \calls{setqSingle}{getmode} @@ -14481,7 +14495,7 @@ is still more than one complain else return the only signature. ((setq td (|comp| val mpp env)) td) ((and (null (|get| form '|mode| env)) - (nequal mpp (setq maxmpp (|maxSuperType| mpp env))) + (not (equal mpp (setq maxmpp (|maxSuperType| mpp env)))) (setq td (|comp| val maxmpp env))) td) ((and (setq td (|comp| val |$EmptyMode| env)) @@ -15310,7 +15324,6 @@ of basic objects may not be the same. \end{chunk} \defun{resolve}{resolve} -\calls{resolve}{nequal} \calls{resolve}{modeEqual} \calls{resolve}{mkUnion} \refsdollar{resolve}{String} @@ -15322,7 +15335,7 @@ of basic objects may not be the same. (cond ((or (equal din |$NoValueMode|) (equal dout |$NoValueMode|)) |$NoValueMode|) ((equal dout |$EmptyMode|) din) - ((and (nequal din dout) (or (stringp din) (stringp dout))) + ((and (not (equal din dout)) (or (stringp din) (stringp dout))) (cond ((|modeEqual| dout |$String|) dout) ((|modeEqual| din |$String|) nil) @@ -15360,7 +15373,7 @@ This orders Unions (let (xl yl) (cond ((or (atom x) (atom y)) (equal x y)) - ((nequal (|#| x) (|#| y)) nil) + ((not (eql (|#| x) (|#| y))) nil) ((and (consp x) (eq (qfirst x) '|Union|) (consp y) (eq (qfirst y) '|Union|)) (setq xl (qrest x)) (setq yl (qrest y)) @@ -15435,7 +15448,7 @@ This orders Unions \calls{postTransform}{postTransformCheck} \calls{postTransform}{aplTran} \begin{chunk}{defun postTransform} -(defun |postTransform| (y) +(defun postTransform (y) (let (x tmp1 tmp2 tmp3 tmp4 tmp5 tt l u) (setq x y) (setq u (|postTran| x)) @@ -15463,8 +15476,8 @@ This orders Unions (progn (setq l (nreverse l)) t))) (dolist (x l t) (unless (identp x) (return nil)))) (setq u (list '|:| (cons 'listof (append l (list y))) tt))) - (|postTransformCheck| u) - (|aplTran| u))) + (postTransformCheck u) + (aplTran u))) \end{chunk} @@ -15480,7 +15493,7 @@ This orders Unions (defun |postTran| (x) (let (op f tmp1 a tmp2 tmp3 b y) (if (atom x) - (|postAtom| x) + (postAtom x) (progn (setq op (car x)) (cond @@ -15498,18 +15511,18 @@ This orders Unions (progn (setq b (qfirst tmp2)) t)))))) (cons (|postTran| op) (cdr (|postTran| (cons b (cdr x)))))) ((and (consp op) (eq (qfirst op) '|Scripts|)) - (|postScriptsForm| op + (postScriptsForm op (dolist (y (rest x) tmp3) (setq tmp3 (append tmp3 (|unTuple| (|postTran| y))))))) - ((nequal op (setq y (|postOp| op))) - (cons y (|postTranList| (cdr x)))) - (t (|postForm| x))))))) + ((not (equal op (setq y (postOp op)))) + (cons y (postTranList (cdr x)))) + (t (postForm x))))))) \end{chunk} \defun{postOp}{postOp} \begin{chunk}{defun postOp} -(defun |postOp| (x) +(defun postOp (x) (declare (special $boot)) (cond ((eq x '|:=|) (if $boot 'spadlet 'let)) @@ -15523,7 +15536,7 @@ This orders Unions \defun{postAtom}{postAtom} \refsdollar{postAtom}{boot} \begin{chunk}{defun postAtom} -(defun |postAtom| (x) +(defun postAtom (x) (declare (special $boot)) (cond ($boot x) @@ -15538,7 +15551,7 @@ This orders Unions \defun{postTranList}{postTranList} \calls{postTranList}{postTran} \begin{chunk}{defun postTranList} -(defun |postTranList| (x) +(defun postTranList (x) (loop for y in x collect (|postTran| y))) \end{chunk} @@ -15548,10 +15561,10 @@ This orders Unions \calls{postScriptsForm}{length} \calls{postScriptsForm}{postTranScripts} \begin{chunk}{defun postScriptsForm} -(defun |postScriptsForm| (form argl) +(defun postScriptsForm (form argl) (let ((op (second form)) (a (third form))) - (cons (|getScriptName| op a (|#| argl)) - (append (|postTranScripts| a) argl)))) + (cons (getScriptName op a (|#| argl)) + (append (postTranScripts a) argl)))) \end{chunk} @@ -15559,7 +15572,7 @@ This orders Unions \calls{postTranScripts}{postTranScripts} \calls{postTranScripts}{postTran} \begin{chunk}{defun postTranScripts} -(defun |postTranScripts| (a) +(defun postTranScripts (a) (labels ( (fn (x) (if (and (consp x) (eq (qfirst x) '|@Tuple|)) @@ -15571,10 +15584,10 @@ This orders Unions (progn (setq tmp1 (qrest a)) (and (consp tmp1) (eq (qrest tmp1) nil)))) - (|postTranScripts| (qfirst tmp1))) + (postTranScripts (qfirst tmp1))) ((and (consp a) (eq (qfirst a) '|;|)) (dolist (y (qrest a) tmp2) - (setq tmp2 (append tmp2 (|postTranScripts| y))))) + (setq tmp2 (append tmp2 (postTranScripts y))))) ((and (consp a) (eq (qfirst a) '|,|)) (dolist (y (qrest a) tmp3) (setq tmp3 (append tmp3 (fn (|postTran| y)))))) @@ -15586,11 +15599,11 @@ This orders Unions \calls{postTransformCheck}{postcheck} \usesdollar{postTransformCheck}{defOp} \begin{chunk}{defun postTransformCheck} -(defun |postTransformCheck| (x) +(defun postTransformCheck (x) (let (|$defOp|) (declare (special |$defOp|)) (setq |$defOp| nil) - (|postcheck| x))) + (postcheck x))) \end{chunk} @@ -15598,30 +15611,29 @@ This orders Unions \calls{postcheck}{setDefOp} \calls{postcheck}{postcheck} \begin{chunk}{defun postcheck} -(defun |postcheck| (x) +(defun postcheck (x) (cond ((atom x) nil) ((and (consp x) (eq (qfirst x) 'def) (consp (qrest x))) - (|setDefOp| (qsecond x)) - (|postcheck| (qcddr x))) + (setDefOp (qsecond x)) + (postcheck (qcddr x))) ((and (consp x) (eq (qfirst x) 'quote)) nil) - (t (|postcheck| (car x)) (|postcheck| (cdr x))))) + (t (postcheck (car x)) (postcheck (cdr x))))) \end{chunk} \defun{postError}{postError} -\calls{postError}{nequal} \calls{postError}{bumperrorcount} \usesdollar{postError}{defOp} \usesdollar{postError}{InteractiveMode} \usesdollar{postError}{postStack} \begin{chunk}{defun postError} -(defun |postError| (msg) +(defun postError (msg) (let (xmsg) (declare (special |$defOp| |$postStack| |$InteractiveMode|)) (bumperrorcount '|precompilation|) (setq xmsg - (if (and (nequal |$defOp| '|$defOp|) (null |$InteractiveMode|)) + (if (and (not (eq |$defOp| '|$defOp|)) (null |$InteractiveMode|)) (cons |$defOp| (cons ": " msg)) msg)) (push xmsg |$postStack|) @@ -15637,7 +15649,7 @@ This orders Unions \calls{postForm}{bright} \usesdollar{postForm}{boot} \begin{chunk}{defun postForm} -(defun |postForm| (u) +(defun postForm (u) (let (op argl arglp numOfArgs opp x) (declare (special $boot)) (seq @@ -15646,7 +15658,7 @@ This orders Unions (setq x (cond ((atom op) - (setq arglp (|postTranList| argl)) + (setq arglp (postTranList argl)) (setq opp (seq (exit op) @@ -15661,12 +15673,12 @@ This orders Unions (internl '* (princ-to-string numOfArgs) (pname op)))) (cons opp arglp)) ((and (consp op) (eq (qfirst op) '|Scripts|)) - (append (|postTran| op) (|postTranList| argl))) + (append (|postTran| op) (postTranList argl))) (t - (setq u (|postTranList| u)) + (setq u (postTranList u)) (cond ((and (consp u) (consp (qfirst u)) (eq (qcaar u) '|@Tuple|)) - (|postError| + (postError (cons " " (append (|bright| u) (list "is illegal because tuples cannot be applied!" '|%l| @@ -15946,7 +15958,7 @@ of the symbol being parsed. The original list read: ((dolist (x (qrest y) tmp5) (setq tmp5 (or tmp5 (and (consp x) (eq (qfirst x) 'segment))))) (|tuple2List| (qrest y))) - (t (cons '|construct| (|postTranList| (qrest y)))))) + (t (cons '|construct| (postTranList (qrest y)))))) (list 'reduce '|append| 0 (cons op (append itl (list newBody))))) (t (cons op (append itl (list y))))))) @@ -16076,7 +16088,7 @@ of the symbol being parsed. The original list read: (if (and $boot (consp u) (eq (qfirst u) '|::|) (consp (qrest u)) (consp (qcddr u)) (eq (qcdddr u) nil)) (intern (princ-to-string (third u)) (second u)) - (|postForm| u))) + (postForm u))) \end{chunk} @@ -16159,7 +16171,7 @@ of the symbol being parsed. The original list read: ((dolist (x (qrest a) tmp7) (setq tmp7 (or tmp7 (and (consp x) (eq (qfirst x) 'segment))))) (|tuple2List| (qrest a))) - (t (cons '|construct| (|postTranList| (qrest a)))))) + (t (cons '|construct| (postTranList (qrest a)))))) (t (list '|construct| (|postTran| a))))) (t u)))) @@ -16183,7 +16195,6 @@ of the symbol being parsed. The original list read: \defun{postDef}{postDef} \calls{postDef}{postMDef} \calls{postDef}{recordHeaderDocumentation} -\calls{postDef}{nequal} \calls{postDef}{postTran} \calls{postDef}{postDefArgs} \calls{postDef}{nreverse0} @@ -16206,7 +16217,7 @@ of the symbol being parsed. The original list read: (|postMDef| (list '==> (second lhs) rhs)) (progn (unless $boot (|recordHeaderDocumentation| nil)) - (when (nequal |$maxSignatureLineNumber| 0) + (when (not (eql |$maxSignatureLineNumber| 0)) (setq |$docList| (cons (cons '|constructor| |$headerDocumentation|) |$docList|)) (setq |$maxSignatureLineNumber| 0)) @@ -16259,12 +16270,12 @@ of the symbol being parsed. The original list read: (setq a (qcadar args)) (setq b (qrest args)) (cond - (b (|postError| + (b (postError (list " Argument" a "of indefinite length must be last"))) ((or (atom a) (and (consp a) (eq (qfirst a) 'quote))) a) (t - (|postError| + (postError (list " Argument" a "of indefinite length must be a name"))))) (t (cons (car args) (|postDefArgs| (cdr args))))))) @@ -16381,7 +16392,7 @@ of the symbol being parsed. The original list read: (defun |postJoin| (arg) (let (a l al) (setq a (|postTran| (cadr arg))) - (setq l (|postTranList| (cddr arg))) + (setq l (postTranList (cddr arg))) (when (and (consp l) (eq (qrest l) nil) (consp (qfirst l)) (member (qcaar l) '(attribute signature))) (setq l (list (list 'category (qfirst l))))) @@ -16549,8 +16560,8 @@ of the symbol being parsed. The original list read: \calls{postScripts}{postTranScripts} \begin{chunk}{defun postScripts} (defun |postScripts| (arg) - (cons (|getScriptName| (second arg) (third arg) 0) - (|postTranScripts| (third arg)))) + (cons (getScriptName (second arg) (third arg) 0) + (postTranScripts (third arg)))) \end{chunk} @@ -16604,7 +16615,7 @@ of the symbol being parsed. The original list read: (setq sig (third arg)) (when (and (consp sig) (eq (qfirst sig) '->)) (setq sig1 (|postType| sig)) - (setq op (|postAtom| (if (stringp op) (setq op (intern op)) op))) + (setq op (postAtom (if (stringp op) (setq op (intern op)) op))) (cons 'signature (cons op (|removeSuperfluousMapping| (|killColons| sig1))))))) @@ -16666,7 +16677,7 @@ of the symbol being parsed. The original list read: ((and (consp arg) (eq (qrest arg) nil) (eq (qfirst arg) '|@Tuple|)) arg) ((and (consp arg) (eq (qfirst arg) '|@Tuple|) (consp (qrest arg))) - (cons '|@Tuple| (|postTranList| (cdr arg)))))) + (cons '|@Tuple| (postTranList (cdr arg)))))) \end{chunk} @@ -16705,7 +16716,7 @@ of the symbol being parsed. The original list read: (let (b x) (setq b (third arg)) (setq x (if (and (consp b) (eq (qfirst b) '|Block|)) (qrest b) (list b))) - (cons '|where| (cons (|postTran| (second arg)) (|postTranList| x))))) + (cons '|where| (cons (|postTran| (second arg)) (postTranList x))))) \end{chunk} @@ -16740,7 +16751,7 @@ of the symbol being parsed. The original list read: \usesdollar{setDefOp}{defOp} \usesdollar{setDefOp}{topOp} \begin{chunk}{defun setDefOp} -(defun |setDefOp| (f) +(defun setDefOp (f) (let (tmp1) (declare (special |$defOp| |$topOp|)) (when (and (consp f) (eq (qfirst f) '|:|) @@ -16759,16 +16770,16 @@ of the symbol being parsed. The original list read: \defsdollar{aplTran}{genno} \usesdollar{aplTran}{boot} \begin{chunk}{defun aplTran} -(defun |aplTran| (x) +(defun aplTran (x) (let ($genno u) (declare (special $genno $boot)) (cond ($boot x) (t (setq $genno 0) - (setq u (|aplTran1| x)) + (setq u (aplTran1 x)) (cond - ((|containsBang| u) (|throwKeyedMsg| 's2ip0002 nil)) + ((containsBang u) (|throwKeyedMsg| 's2ip0002 nil)) (t u)))))) \end{chunk} @@ -16780,7 +16791,7 @@ of the symbol being parsed. The original list read: \calls{aplTran1}{nreverse0} \refsdollar{aplTran1}{boot} \begin{chunk}{defun aplTran1} -(defun |aplTran1| (x) +(defun aplTran1 (x) (let (op argl1 argl f y opprime yprime tmp1 arglAssoc futureArgl g) (declare (special $boot)) (if (atom x) @@ -16788,7 +16799,7 @@ of the symbol being parsed. The original list read: (progn (setq op (car x)) (setq argl1 (cdr x)) - (setq argl (|aplTranList| argl1)) + (setq argl (aplTranList argl1)) (cond ((eq op '!) (cond @@ -16808,17 +16819,17 @@ of the symbol being parsed. The original list read: (setq yprime (qrest y)) t) (eq opprime '!)) - (|aplTran1| (cons op (cons op (cons f yprime))))) + (aplTran1 (cons op (cons op (cons f yprime))))) ($boot (cons 'collect (cons - (list 'in (setq g (genvar)) (|aplTran1| y)) + (list 'in (setq g (genvar)) (aplTran1 y)) (list (list f g ) )))) (t - (list 'map f (|aplTran1| y) )))) + (list 'map f (aplTran1 y) )))) (t x))) ((progn - (setq tmp1 (|hasAplExtension| argl)) + (setq tmp1 (hasAplExtension argl)) (and (consp tmp1) (progn (setq arglAssoc (qfirst tmp1)) @@ -16837,7 +16848,7 @@ of the symbol being parsed. The original list read: nil)) (nreverse0 tmp2)) (push (list 'in g (list '|ravel| a))) tmp2)) - (list (|aplTran1| (cons op futureArgl))))) + (list (aplTran1 (cons op futureArgl))))) (list (cdar arglAssoc)))) (t (cons op argl))))))) @@ -16847,10 +16858,10 @@ of the symbol being parsed. The original list read: \calls{aplTranList}{aplTran1} \calls{aplTranList}{aplTranList} \begin{chunk}{defun aplTranList} -(defun |aplTranList| (x) +(defun aplTranList (x) (if (atom x) x - (cons (|aplTran1| (car x)) (|aplTranList| (cdr x))))) + (cons (aplTran1 (car x)) (aplTranList (cdr x))))) \end{chunk} @@ -16860,7 +16871,7 @@ of the symbol being parsed. The original list read: \calls{hasAplExtension}{genvar} \calls{hasAplExtension}{aplTran1} \begin{chunk}{defun hasAplExtension} -(defun |hasAplExtension| (argl) +(defun hasAplExtension (argl) (let (tmp2 tmp3 y z g arglAssoc u) (when (dolist (x argl tmp2) @@ -16872,9 +16883,9 @@ of the symbol being parsed. The original list read: (consp (qrest x)) (eq (qcddr x) nil)) (progn (setq y (qsecond x)) - (setq z (|deepestExpression| y)) + (setq z (deepestExpression y)) (setq arglAssoc - (cons (cons (setq g (genvar)) (|aplTran1| z)) arglAssoc)) + (cons (cons (setq g (genvar)) (aplTran1 z)) arglAssoc)) (subst g z y :test #'equal)) x) tmp3))) @@ -16885,10 +16896,10 @@ of the symbol being parsed. The original list read: \defun{deepestExpression}{deepestExpression} \calls{deepestExpression}{deepestExpression} \begin{chunk}{defun deepestExpression} -(defun |deepestExpression| (x) +(defun deepestExpression (x) (if (and (consp x) (eq (qfirst x) '!) (consp (qrest x)) (eq (qcddr x) nil)) - (|deepestExpression| (qsecond x)) + (deepestExpression (qsecond x)) x)) \end{chunk} @@ -16896,7 +16907,7 @@ of the symbol being parsed. The original list read: \defun{containsBang}{containsBang} \calls{containsBang}{containsBang} \begin{chunk}{defun containsBang} -(defun |containsBang| (u) +(defun containsBang (u) (let (tmp2) (cond ((atom u) (eq u '!)) @@ -16905,7 +16916,7 @@ of the symbol being parsed. The original list read: nil) (t (dolist (x u tmp2) - (setq tmp2 (or tmp2 (|containsBang| x)))))))) + (setq tmp2 (or tmp2 (containsBang x)))))))) \end{chunk} @@ -16916,11 +16927,11 @@ of the symbol being parsed. The original list read: \calls{getScriptName}{decodeScripts} \seebook{getScriptName}{pname}{5} \begin{chunk}{defun getScriptName} -(defun |getScriptName| (op a numberOfFunctionalArgs) +(defun getScriptName (op a numberOfFunctionalArgs) (when (null (identp op)) - (|postError| (list " " op " cannot have scripts" ))) + (postError (list " " op " cannot have scripts" ))) (internl '* (princ-to-string numberOfFunctionalArgs) - (|decodeScripts| a) (pname op))) + (decodeScripts a) (pname op))) \end{chunk} @@ -16928,7 +16939,7 @@ of the symbol being parsed. The original list read: \calls{decodeScripts}{strconc} \calls{decodeScripts}{decodeScripts} \begin{chunk}{defun decodeScripts} -(defun |decodeScripts| (a) +(defun decodeScripts (a) (labels ( (fn (a) (let ((tmp1 0)) @@ -16938,9 +16949,9 @@ of the symbol being parsed. The original list read: (cond ((and (consp a) (eq (qfirst a) '|PrefixSC|) (consp (qrest a)) (eq (qcddr a) nil)) - (strconc (princ-to-string 0) (|decodeScripts| (qsecond a)))) + (strconc (princ-to-string 0) (decodeScripts (qsecond a)))) ((and (consp a) (eq (qfirst a) '|;|)) - (apply 'strconc (loop for x in (qrest a) collect (|decodeScripts| x)))) + (apply 'strconc (loop for x in (qrest a) collect (decodeScripts x)))) ((and (consp a) (eq (qfirst a) '|,|)) (princ-to-string (fn a))) (t @@ -19296,7 +19307,7 @@ This function is called externally by PARSE-Category. \calls{recordSignatureDocumentation}{postTransform} \begin{chunk}{defun recordSignatureDocumentation} (defun |recordSignatureDocumentation| (opSig lineno) - (|recordDocumentation| (cdr (|postTransform| opSig)) lineno)) + (|recordDocumentation| (cdr (postTransform opSig)) lineno)) \end{chunk} @@ -19317,7 +19328,7 @@ This function is called externally by PARSE-Category. ((upper-case-p (elt (pname name) 0)) nil) (t (|recordDocumentation| - (list name (cons '|attribute| (ifcdr (|postTransform| att)))) lineno))))) + (list name (cons '|attribute| (ifcdr (postTransform att)))) lineno))))) \end{chunk} @@ -19916,7 +19927,6 @@ digraph hierarchy { \defun{checkComments}{checkComments} \calls{checkComments}{checkGetMargin} -\calls{checkComments}{nequal} \calls{checkComments}{checkTransformFirsts} \calls{checkComments}{checkIndentedLines} \calls{checkComments}{checkGetArgs} @@ -19943,7 +19953,7 @@ digraph hierarchy { (setq margin (|checkGetMargin| lines)) (cond ((and (or (null (boundp '|$attribute?|)) (null |$attribute?|)) - (nequal nameSig '|constructor|)) + (not (eq nameSig '|constructor|))) (setq lines (cons (|checkTransformFirsts| (car nameSig) (car lines) margin) @@ -20072,7 +20082,6 @@ digraph hierarchy { \calls{checkBalance}{checkBeginEnd} \calls{checkBalance}{assoc} \calls{checkBalance}{rassoc} -\calls{checkBalance}{nequal} \calls{checkBalance}{checkDocError} \calls{checkBalance}{checkSayBracket} \calls{checkBalance}{nreverse} @@ -20094,7 +20103,7 @@ digraph hierarchy { ((consp stack) (setq top (qcar stack)) (setq restStack (qcdr stack)) - (when (nequal open top) + (when (not (eq open top)) (|checkDocError| (list "Mismatch: left " (|checkSayBracket| top) " matches right " (|checkSayBracket| open)))) @@ -20362,7 +20371,6 @@ digraph hierarchy { \calls{checkFixCommonProblem}{member} \calls{checkFixCommonProblem}{ifcar} \calls{checkFixCommonProblem}{ifcdr} -\calls{checkFixCommonProblem}{nequal} \calls{checkFixCommonProblem}{checkDocError} \refsdollar{checkFixCommonProblem}{charLbrace} \refsdollar{checkFixCommonProblem}{HTspadmacros} @@ -20376,7 +20384,7 @@ digraph hierarchy { (cond ((and (equal x |$charLbrace|) (|member| (setq next (ifcar (cdr u))) |$HTspadmacros|) - (nequal (ifcar (ifcdr (cdr u))) |$charLbrace|)) + (not (equal (ifcar (ifcdr (cdr u))) |$charLbrace|))) (|checkDocError| (list "Reversing " next " and left brace")) (setq acc (cons |$charLbrace| (cons next acc))) (setq u (cddr u))) @@ -20562,7 +20570,6 @@ Note that {\tt u} should start with an open brace. \calls{checkTexht}{ifcdr} \calls{checkTexht}{ifcar} \calls{checkTexht}{checkDocError} -\calls{checkTexht}{nequal} \refsdollar{checkTexht}{charRbrace} \refsdollar{checkTexht}{charLbrace} \begin{chunk}{defun checkTexht} @@ -20578,8 +20585,9 @@ Note that {\tt u} should start with an open brace. (|checkDocError| "First left brace after \\texht missing")) ; drop first argument including braces of \texht (setq count 1) - (loop while (or (nequal (setq y (ifcar (setq u (cdr u)))) |$charRbrace|) - (> count 1)) + (loop while + (or (not (equal (setq y (ifcar (setq u (cdr u)))) |$charRbrace|)) + (> count 1)) do (when (equal y |$charLbrace|) (setq count (1+ count))) (when (equal y |$charRbrace|) (setq count (1- count)))) @@ -20590,13 +20598,14 @@ Note that {\tt u} should start with an open brace. (equal (ifcar u) |$charLbrace|)) ; left brace: add it (setq acc (cons (ifcar u) acc)) - (loop while (nequal (setq y (ifcar (setq u (cdr u)))) |$charRbrace|) + (loop while + (not (equal (setq y (ifcar (setq u (cdr u)))) |$charRbrace|)) do (setq acc (cons y acc))) ; right brace: add it (setq acc (cons (ifcar u) acc)) ; left brace: forget it (setq x (ifcar (setq u (cdr u)))) - (loop while (nequal (ifcar (setq u (cdr u))) |$charRbrace|) + (loop while (not (equal (ifcar (setq u (cdr u))) |$charRbrace|)) do '|skip|) ; forget right brace: move to next char (setq x (ifcar (setq u (cdr u))))) @@ -20615,7 +20624,6 @@ Note that {\tt u} should start with an open brace. \calls{checkTransformFirsts}{checkSkipToken} \calls{checkTransformFirsts}{checkSkipBlanks} \calls{checkTransformFirsts}{getMatchingRightPren} -\calls{checkTransformFirsts}{nequal} \calls{checkTransformFirsts}{checkDocError} \calls{checkTransformFirsts}{strconc} \calls{checkTransformFirsts}{getl} @@ -20653,7 +20661,7 @@ Note that {\tt u} should start with an open brace. (and (equal open #\() (setq close #\)))) (setq k (|getMatchingRightPren| u (1+ j) open close)) (cond - ((nequal namestring (setq firstWord (substring u 0 i))) + ((not (equal namestring (setq firstWord (substring u 0 i)))) (|checkDocError| (list "Improper first word in comments: " firstWord)) u) @@ -20676,7 +20684,7 @@ Note that {\tt u} should start with an open brace. ; case 3: form arg ((null (getl infixOp '|Led|)) (cond - ((nequal namestring (setq firstWord (substring u 0 i))) + ((not (equal namestring (setq firstWord (substring u 0 i)))) (|checkDocError| (list "Improper first word in comments: " firstWord)) u) @@ -20694,7 +20702,7 @@ Note that {\tt u} should start with an open brace. (setq z (or (|checkSkipBlanks| u k m) (return u))) (setq n (or (|checkSkipToken| u z m) (return u))) (cond - ((nequal namestring (pname infixOp)) + ((not (equal namestring (pname infixOp))) (|checkDocError| (list "Improper initial operator in comments: " infixOp)) u) @@ -20705,7 +20713,7 @@ Note that {\tt u} should start with an open brace. (t (setq i(or (|checkSkipToken| u 0 m) (return u))) (cond - ((nequal namestring (setq firstWord (substring u 0 i))) + ((not (equal namestring (setq firstWord (substring u 0 i)))) (|checkDocError| (list "Improper first word in comments: " firstWord)) u) @@ -20728,7 +20736,7 @@ Note that {\tt u} should start with an open brace. (t (setq k (or (|checkSkipToken| u j m) (return u))) (cond - ((nequal namestring (setq firstWord (substring u 0 i))) + ((not (equal namestring (setq firstWord (substring u 0 i)))) (|checkDocError| (list "Improper first word in comments: " firstWord)) u) @@ -20740,7 +20748,6 @@ Note that {\tt u} should start with an open brace. \defun{checkTrim}{checkTrim} \calls{checkTrim}{charPosition} -\calls{checkTrim}{nequal} \calls{checkTrim}{systemError} \calls{checkTrim}{checkDocError} \refsdollar{checkTrim}{charBlank} @@ -20760,7 +20767,7 @@ Note that {\tt u} should start with an open brace. (declare (special |$charPlus|)) (setq k (|charPosition| |$charPlus| u 0)) (if (or (eql k (|#| u)) - (nequal (|charPosition| |$charPlus| u (1+ k)) (1+ k))) + (not (eql (|charPosition| |$charPlus| u (1+ k)) (1+ k)))) (|systemError| " Improper comment found") k)))) (let (j s) @@ -20928,7 +20935,7 @@ Note that {\tt u} should start with an open brace. (setq j (|charPosition| #\: u k)) (setq margin k) (setq firstLines - (if (nequal (setq k (|firstNonBlankPosition| u (1+ j))) -1) + (if (not (eql (setq k (|firstNonBlankPosition| u (1+ j))) -1)) (cons (substring u (1+ j) nil) (cdr lines)) (cdr lines))) ; now look for another header; if found skip all rest of these lines @@ -20955,7 +20962,6 @@ Note that {\tt u} should start with an open brace. \calls{checkGetArgs}{stringPrefix?} \calls{checkGetArgs}{getMatchingRightPren} \calls{checkGetArgs}{charPosition} -\calls{checkGetArgs}{nequal} \calls{checkGetArgs}{trimString} \refsdollar{checkGetArgs}{charComma} \begin{chunk}{defun checkGetArgs} @@ -20975,7 +20981,7 @@ Note that {\tt u} should start with an open brace. (|checkGetArgs| (substring u 6 (- k 6)))) ((> (setq i (|charPosition| #\( u 0)) m) nil) - ((nequal (elt u m) #\)) + ((not (eql (elt u m) #\))) nil) (t (do () @@ -21163,7 +21169,6 @@ Note that {\tt u} should start with an open brace. \defun{checkTrimCommented}{checkTrimCommented} \calls{checkTrimCommented}{length} \calls{checkTrimCommented}{htcharPosition} -\calls{checkTrimCommented}{nequal} \begin{chunk}{defun checkTrimCommented} (defun |checkTrimCommented| (line) (let (n k) @@ -21171,7 +21176,7 @@ Note that {\tt u} should start with an open brace. (setq k (|htcharPosition| (|char| '%) line 0)) (cond ((eql k 0) "") - ((or (>= k (1- n)) (nequal (elt line (1+ k)) #\%)) line) + ((or (>= k (1- n)) (not (eql (elt line (1+ k)) #\%))) line) ((> (|#| line) k) (substring line 0 k)) (t line)))) @@ -21397,7 +21402,6 @@ Note that {\tt u} should start with an open brace. \defun{checkIsValidType}{checkIsValidType} This function returns ok if correct, form is wrong number of arguments, nil if unknown -\calls{checkIsValidType}{nequal} \calls{checkIsValidType}{length} \calls{checkIsValidType}{checkIsValidType} \calls{checkIsValidType}{constructor?} @@ -21408,7 +21412,7 @@ form is wrong number of arguments, nil if unknown (labels ( (fn (form coSig) (cond - ((nequal (|#| form) (|#| coSig)) form) + ((not (eql (|#| form) (|#| coSig))) form) ((let (result) (loop for x in (rest form) for flag in (rest coSig) @@ -21431,7 +21435,6 @@ form is wrong number of arguments, nil if unknown \end{chunk} \defun{checkLookForLeftBrace}{checkLookForLeftBrace} -\calls{checkLookForLeftBrace}{nequal} \refsdollar{checkLookForLeftBrace}{charBlank} \refsdollar{checkLookForLeftBrace}{charLbrace} \begin{chunk}{defun checkLookForLeftBrace} @@ -21441,7 +21444,7 @@ form is wrong number of arguments, nil if unknown do (cond ((equal (car u) |$charLbrace|) (return (car u))) - ((nequal (car u) |$charBlank|) (return nil)) + ((not (eql (car u) |$charBlank|)) (return nil)) (t (pop u)))) u) @@ -21652,7 +21655,6 @@ A nil return implies that the argument list length does not match \end{chunk} \defun{firstNonBlankPosition}{firstNonBlankPosition} -\calls{firstNonBlankPosition}{nequal} \calls{firstNonBlankPosition}{maxindex} \begin{chunk}{defun firstNonBlankPosition} (defun |firstNonBlankPosition| (&rest therest) @@ -21661,7 +21663,7 @@ A nil return implies that the argument list length does not match (setq start (or (ifcar options) 0)) (setq k -1) (loop for i from start to (maxindex x) - do (when (nequal (elt x i) |$charBlank|) (return (setq k i)))) + do (when (not (eql (elt x i) |$charBlank|)) (return (setq k i)))) k)) \end{chunk} @@ -21710,7 +21712,6 @@ A nil return implies that the argument list length does not match \defun{htcharPosition}{htcharPosition} \calls{htcharPosition}{length} \calls{htcharPosition}{charPosition} -\calls{htcharPosition}{nequal} \calls{htcharPosition}{htcharPosition} \refsdollar{htcharPosition}{charBack} \begin{chunk}{defun htcharPosition} @@ -21722,7 +21723,7 @@ A nil return implies that the argument list length does not match (cond ((eql k m) k) ((> k 0) - (if (nequal (elt line (1- k)) |$charBack|) + (if (not (eql (elt line (1- k)) |$charBack|)) k (|htcharPosition| char line (1+ k)))) (t 0)))) @@ -21845,7 +21846,6 @@ Since it has no side effects we define it to return nil. \calls{displayPreCompilationErrors}{length} \calls{displayPreCompilationErrors}{remdup} \calls{displayPreCompilationErrors}{sayBrightly} -\calls{displayPreCompilationErrors}{nequal} \calls{displayPreCompilationErrors}{sayMath} \refsdollar{displayPreCompilationErrors}{postStack} \refsdollar{displayPreCompilationErrors}{topOp} @@ -21862,7 +21862,7 @@ Since it has no side effects we define it to return nil. (|sayBrightly| (list " Semantic " errors " detected: "))) (t (setq heading - (if (nequal |$topOp| '|$topOp|) + (if (not (eq |$topOp| '|$topOp|)) (list " " |$topOp| " has") (list " You have"))) (|sayBrightly| @@ -21913,7 +21913,7 @@ Since it has no side effects we define it to return nil. ((null (and (consp y) (eq (qfirst y) '|:|) (consp (qrest y)) (consp (qcddr y)) (eq (qcdddr y) nil))) (setq tmp3 (or tmp3 y))))) - (|postError| (list " Constructor" x "has missing label" ))) + (postError (list " Constructor" x "has missing label" ))) (t x))) (t x)))) @@ -22044,7 +22044,7 @@ Since it has no side effects we define it to return nil. \calls{checkWarning}{concat} \begin{chunk}{defun checkWarning} (defun |checkWarning| (msg) - (|postError| (|concat| "Parsing error: " msg))) + (postError (|concat| "Parsing error: " msg))) \end{chunk} @@ -22230,6 +22230,7 @@ Return a pointer to the Nth cons of X, counting 0 as the first cons. \end{chunk} \defun{indent-pos}{indent-pos} +\calls{indent-pos}{next-tab-loc} \begin{chunk}{defun indent-pos} (defun indent-pos (str) (do ((i 0 (1+ i)) (pos 0)) @@ -22654,7 +22655,6 @@ Again we find a lot of redundant work. We finally end up calling \seebook{compileSpad2Cmd}{updateSourceFiles}{5} \seebook{compileSpad2Cmd}{selectOptionLC}{5} \seebook{compileSpad2Cmd}{terminateSystemCommand}{5} -\calls{compileSpad2Cmd}{nequal} \calls{compileSpad2Cmd}{throwKeyedMsg} \seebook{compileSpad2Cmd}{sayKeyedMsg}{5} \calls{compileSpad2Cmd}{error} @@ -22690,9 +22690,10 @@ Again we find a lot of redundant work. We finally end up calling |$newConlist|)) (setq path (|pathname| args)) (cond - ((nequal (|pathnameType| path) "spad") (|throwKeyedMsg| 's2iz0082 nil)) + ((not (string= (|pathnameType| path) "spad")) + (|throwKeyedMsg| 's2iz0082 nil)) ((null (probe-file path)) - (|throwKeyedMsg| 's2il0003 (cons (|namestring| args) nil))) + (|throwKeyedMsg| 's2il0003 (cons (|namestring| args) nil))) (t (setq /editfile path) (|updateSourceFiles| path) @@ -22712,8 +22713,8 @@ Again we find a lot of redundant work. We finally end up calling (|old| nil) (|library| (setelt fun 1 '|lib|)) (|nolibrary| (setelt fun 1 '|nolib|)) - (|quiet| (when (nequal (elt fun 0) '|c|) (setelt fun 0 '|rq|))) - (|noquiet| (when (nequal (elt fun 0) '|c|) (setelt fun 0 '|rf|))) + (|quiet| (when (not (eq (elt fun 0) '|c|)) (setelt fun 0 '|rq|))) + (|noquiet| (when (not (eq (elt fun 0) '|c|)) (setelt fun 0 '|rf|))) (|nobreak| (setq |$scanIfTrue| t)) (|break| (setq |$scanIfTrue| nil)) (|vartrace| (setq |$QuickLet| nil)) @@ -23444,8 +23445,8 @@ And the {\bf s-process} function which returns a parsed version of the input. (setq $traceflag t) (if (not x) (return nil)) (if $boot - (setq x (def-rename (|new2OldLisp| x))) - (setq x (|parseTransform| (|postTransform| x)))) + (setq x (def-rename (new2OldLisp x))) + (setq x (|parseTransform| (postTransform x)))) (when |$TranslateOnly| (return (setq |$Translation| x))) (when |$postStack| (|displayPreCompilationErrors|) (return nil)) (when |$PrintOnly| @@ -23481,24 +23482,16 @@ And the {\bf s-process} function which returns a parsed version of the input. \end{chunk} \defun{def-rename}{def-rename} -\calls{def-rename}{def-rename1} +\calls{def-rename}{def-rename} \begin{chunk}{defun def-rename} (defun def-rename (x) - (def-rename1 x)) - -\end{chunk} - -\defun{def-rename1}{def-rename1} -\calls{def-rename1}{def-rename1} -\begin{chunk}{defun def-rename1} -(defun def-rename1 (x) (cond ((symbolp x) (let ((y (get x 'rename))) (if y (first y) x))) ((and (listp x) x) (if (eqcar x 'quote) x - (cons (def-rename1 (first x)) (def-rename1 (cdr x))))) + (cons (def-rename (first x)) (def-rename (cdr x))))) (x))) \end{chunk} @@ -23721,7 +23714,6 @@ preferred to the underlying representation -- RDJ 9/12/83 \calls{comp2}{isFunctor} \calls{comp2}{insert} \calls{comp2}{opOf} -\calls{comp2}{nequal} \calls{comp2}{addDomain} \usesdollar{comp2}{bootStrapMode} \usesdollar{comp2}{packagesUsed} @@ -23736,7 +23728,7 @@ preferred to the underlying representation -- RDJ 9/12/83 (setq |$packagesUsed| (|insert| (list (|opOf| form)) |$packagesUsed|))) ; isDomainForm test needed to prevent error while compiling Ring ; $bootStrapMode-test necessary for compiling Ring in $bootStrapMode - (if (and (nequal mode mprime) + (if (and (not (equal mode mprime)) (or |$bootStrapMode| (|isDomainForm| mprime env))) (list y mprime (|addDomain| mprime env)) (list y mprime env)))))) @@ -23809,7 +23801,6 @@ preferred to the underlying representation -- RDJ 9/12/83 \end{chunk} \defun{applyMapping}{applyMapping} -\calls{applyMapping}{nequal} \calls{applyMapping}{isCategoryForm} \calls{applyMapping}{sublis} \calls{applyMapping}{comp} @@ -23833,7 +23824,7 @@ preferred to the underlying representation -- RDJ 9/12/83 (setq op (car t0)) (setq argl (cdr t0)) (cond - ((nequal (|#| argl) (1- (|#| ml))) nil) + ((not (eql (|#| argl) (1- (|#| ml)))) nil) ((|isCategoryForm| (car ml) e) (setq pairlis (loop for a in argl for v in |$FormalMapVariableList| @@ -24346,7 +24337,6 @@ preferred to the underlying representation -- RDJ 9/12/83 \calls{compApplication}{length} \calls{compApplication}{member} \calls{compApplication}{comp} -\calls{compApplication}{nequal} \calls{compApplication}{isCategoryForm} \refsdollar{compApplication}{Category} \refsdollar{compApplication}{formatArgList} @@ -24363,7 +24353,7 @@ preferred to the underlying representation -- RDJ 9/12/83 (setq retm (qcadr (cadr tt))) (setq argml (qcddr (cadr tt))) (cond - ((nequal (|#| argl) (|#| argml)) nil) + ((not (eql (|#| argl) (|#| argml))) nil) (t (setq retm (|resolve| m retm)) (cond @@ -24413,7 +24403,6 @@ preferred to the underlying representation -- RDJ 9/12/83 \calls{getFormModemaps}{getFormModemaps} \calls{getFormModemaps}{nreverse0} \calls{getFormModemaps}{get} -\calls{getFormModemaps}{nequal} \calls{getFormModemaps}{eltModemapFilter} \calls{getFormModemaps}{last} \calls{getFormModemaps}{length} @@ -24439,7 +24428,7 @@ preferred to the underlying representation -- RDJ 9/12/83 (when |$insideCategoryPackageIfTrue| (setq modemapList (loop for x in modemapList - when (and (consp x) (consp (qfirst x)) (nequal (qcaar x) '$)) + when (and (consp x) (consp (qfirst x)) (not (eq (qcaar x) '$))) collect x))))) (cond ((eq op '|elt|) @@ -24744,7 +24733,6 @@ preferred to the underlying representation -- RDJ 9/12/83 \end{chunk} \defun{substituteIntoFunctorModemap}{substituteIntoFunctorModemap} -\calls{substituteIntoFunctorModemap}{nequal} \calls{substituteIntoFunctorModemap}{keyedSystemError} \calls{substituteIntoFunctorModemap}{eqsubstlist} \calls{substituteIntoFunctorModemap}{compOrCroak} @@ -24755,7 +24743,7 @@ preferred to the underlying representation -- RDJ 9/12/83 (setq dc (caar modemap)) (setq sig (cdar modemap)) (cond - ((nequal (|#| dc) (|#| sig)) + ((not (eql (|#| dc) (|#| sig))) (|keyedSystemError| 'S2GE0016 (list "substituteIntoFunctorModemap" "Incompatible maps"))) ((equal (|#| argl) (|#| (cdr sig))) @@ -25901,7 +25889,6 @@ The current input line. \getchunk{defun decodeScripts} \getchunk{defun deepestExpression} \getchunk{defun def-rename} -\getchunk{defun def-rename1} \getchunk{defun disallowNilAttribute} \getchunk{defun displayMissingFunctions} \getchunk{defun displayPreCompilationErrors} @@ -25920,6 +25907,7 @@ The current input line. \getchunk{defun escaped} \getchunk{defun evalAndRwriteLispForm} \getchunk{defun evalAndSub} +\getchunk{defun expand-tabs} \getchunk{defun extractCodeAndConstructTriple} \getchunk{defun flattenSignatureList} diff --git a/changelog b/changelog index f1ddd3f..d0809d6 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,11 @@ +20111218 tpd src/axiom-website/patches.html 20111218.01.tpd.patch +20111218 tpd src/interp/vmlisp.lisp localize function names +20111218 tpd src/interp/patches.lisp localize function names +20111218 tpd src/interp/parsing.lisp localize function names +20111218 tpd src/interp/ht-util.lisp localize function names +20111218 tpd src/interp/br-con.lisp localize function names +20111218 tpd books/bookvol5 localize function names +20111218 tpd books/bookvol9 localize function names 20111217 tpd src/axiom-website/patches.html 20111217.01.tpd.patch 20111217 tpd src/axiom-website/axiomgraph/axiomgraph.tex literate form of js 20111217 tpd src/axiom-website/axiomgraph/maps/funsel.json function selection diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html index 617b4f9..97e2547 100644 --- a/src/axiom-website/patches.html +++ b/src/axiom-website/patches.html @@ -3741,5 +3741,7 @@ books/bookvol9 add comment graphs
books/bookvol9 treeshake compiler
20111217.01.tpd.patch src/axiom-website/axiomgraph/maps/parse.json add parse tree
+20111218.01.tpd.patch +books/bookvol9 localize function names
diff --git a/src/interp/br-con.lisp.pamphlet b/src/interp/br-con.lisp.pamphlet index 9ca91e7..73acdda 100644 --- a/src/interp/br-con.lisp.pamphlet +++ b/src/interp/br-con.lisp.pamphlet @@ -26942,7 +26942,7 @@ $dbKindAlist := (PROGN (SPADLET |sig1| (|postType| |sig|)) (SPADLET |op| - (|postAtom| + (postAtom (COND ((STRINGP |op|) (INTERN |op|)) ('T |op|)))) diff --git a/src/interp/ht-util.lisp.pamphlet b/src/interp/ht-util.lisp.pamphlet index d556f7b..c0411d2 100644 --- a/src/interp/ht-util.lisp.pamphlet +++ b/src/interp/ht-util.lisp.pamphlet @@ -2126,7 +2126,7 @@ (CONS |string| NIL))) (COND ((CAR |tree|) - (|parseTransform| (|postTransform| (CAR |tree|)))) + (|parseTransform| (postTransform (car |tree|)))) ('T (CDR |tree|))))))) ;makeSpadCommand(:l) == diff --git a/src/interp/parsing.lisp.pamphlet b/src/interp/parsing.lisp.pamphlet index 01ef4dc..1d724b8 100644 --- a/src/interp/parsing.lisp.pamphlet +++ b/src/interp/parsing.lisp.pamphlet @@ -373,7 +373,7 @@ bootlex (progn (|PARSE-Expression|) (let ((parseout (pop-stack-1)) ) - (setq parseout (|new2OldLisp| parseout)) + (setq parseout (new2OldLisp parseout)) (setq parseout (DEF-RENAME parseout)) (let ((*standard-output* out-stream)) (DEF-PROCESS parseout)) @@ -651,9 +651,6 @@ foo defined inside of fum gets renamed as fum,foo.") ((EQ (THIRD U) NIL) (MK_LEFORM (SECOND U))) ((STRCONC (MK_LEFORM (SECOND U)) "\," (MK_LEFORM-CONS (THIRD U)))))) -(defun LET_ERROR (FORM VAL) - (|systemError| (format nil "~S is not matched by structure ~S~%" FORM VAL))) - (defun IS-GENSYM () (if (NOT (CDR $IS-GENSYMLIST)) (RPLACD $IS-GENSYMLIST (LIST (GENSYM)))) (pop $IS-GENSYMLIST)) @@ -1497,7 +1494,7 @@ parse (CONS (|parseCases,casefn| |x| |c|) NIL)))))) - (EXIT (|postError| + (EXIT (postError (CONS " CASES format error: cases " (CONS |x| (CONS '| of | (CONS |ifExpr| NIL)))))))))) diff --git a/src/interp/patches.lisp.pamphlet b/src/interp/patches.lisp.pamphlet index c85f18a..a1f98c9 100644 --- a/src/interp/patches.lisp.pamphlet +++ b/src/interp/patches.lisp.pamphlet @@ -209,12 +209,12 @@ It used to read: (defun |normalizeArgFileName| (l) l) -(defun READSPADEXPR () +(defun readSpadExpr () (let* ((line (cdar (preparse in-stream)))) (cond ((or (not (stringp line)) (zerop (SIZE line))) (SAY " Scratchpad -- input") (READSPADEXPR)) - (t (|parseTransform| (|postTransform| (|string2SpadTree| line))))))) + (t (|parseTransform| (postTransform (|string2SpadTree| line))))))) (setq |$sourceFiles| ()) ;; set in readSpad2Cmd diff --git a/src/interp/vmlisp.lisp.pamphlet b/src/interp/vmlisp.lisp.pamphlet index 0b56c24..39c3057 100644 --- a/src/interp/vmlisp.lisp.pamphlet +++ b/src/interp/vmlisp.lisp.pamphlet @@ -2561,7 +2561,7 @@ for primitive domains. Also used by putInLocalDomainReferences and optCal (defmacro SPADLET (A B) (if (ATOM A) `(SETQ ,A ,B) - `(OR (IS ,B ,A) (LET_ERROR ,(MK_LEFORM A) ,(MKQ B) )))) + `(OR (IS ,B ,A) (letError ,(MK_LEFORM A) ,(MKQ B) )))) (defmacro RPLAC (&rest L) (if (EQCAR (CAR L) 'ELT) @@ -3856,28 +3856,6 @@ terminals and empty or at-end files. In Common Lisp, we must assume record size (print expr stream) (terpri stream) (finish-output stream))) - -;;(defun expand-tabs (str) -;; (let ((bpos (nonblankloc str)) -;; (tpos (indent-pos str))) -;; (if (eql bpos tpos) str -;; (concatenate 'string (make-string tpos :initial-element #\space) -;; (subseq str bpos))))) -(defun expand-tabs (str) - (if (and (stringp str) (> (length str) 0)) - (let ((bpos (nonblankloc str)) - (tpos (indent-pos str))) - (setq str - (if (eql bpos tpos) - str - (concatenate 'string - (make-string tpos :initial-element #\space) - (subseq str bpos)))) - ;; remove dos CR - (let ((lpos (maxindex str))) - (if (eq (char str lpos) #\Return) (subseq str 0 lpos) str))) - str)) - ;; stream handling for paste-in generation