diff --git a/books/bookvol5.pamphlet b/books/bookvol5.pamphlet index fd5bb63..2f3aff1 100644 --- a/books/bookvol5.pamphlet +++ b/books/bookvol5.pamphlet @@ -23498,7 +23498,7 @@ explanations see the list structure section \ref{Theliststructure}. (dolist (setdata settree) (case (fourth setdata) (function - (if (functionp (fifth setdata)) + (if (canFuncall? (fifth setdata)) (funcall (fifth setdata) '|%initialize%|) (|sayMSG| (concatenate 'string " Function not implemented. " (package-name *package*) ":" (string (fifth setdata)))))) @@ -23609,7 +23609,7 @@ explanations see the list structure section \ref{Theliststructure}. (case (fourth setdata) (function (terpri) - (if (functionp (fifth setdata)) + (if (canFuncall? (fifth setdata)) (funcall (fifth setdata) '|%describe%|) (|sayMSG| " Function not implemented."))) (integer @@ -23686,7 +23686,7 @@ explanations see the list structure section \ref{Theliststructure}. (case (fourth setdata) (function (setq opt - (if (functionp (fifth setdata)) + (if (canFuncall? (fifth setdata)) (funcall (fifth setdata) '|%display%|) "unimplemented")) (cond @@ -30093,7 +30093,7 @@ printLoadMessages, which gets called with \verb|%describe%| (if (eq (elt l 1) 'default) '|%initialize%| (kdr l))) - (if (functionp (fifth setdata)) + (if (canFuncall? (fifth setdata)) (funcall (fifth setdata) setfunarg) (|sayMSG| (concatenate 'string " Function not implemented. " (string (fifth setdata))))) @@ -39082,10 +39082,13 @@ Note that this assumes ``table'' is a string. \end{chunk} -\defun{functionp}{functionp} -\calls{functionp}{identp} -\begin{chunk}{defun functionp} -(defun |functionp| (fn) +This function was called \verb?|functionp|? which is a lower-case +version of the common lisp function called functionp. Camm Maguire +found a bug related to this ambiguity so this was renamed. + +\defun{canFuncall?}{canFuncall?} +\begin{chunk}{defun canFuncall?} +(defun canFuncall? (fn) (if (identp fn) (and (fboundp fn) (not (macro-function fn))) (functionp fn))) @@ -53683,6 +53686,7 @@ digits in TechExplorer. Since Saturn is gone we can remove it. \getchunk{defun buttonNames} \getchunk{defun cacheKeyedMsg} +\getchunk{defun canFuncall?} \getchunk{defun categoryOpen} \getchunk{defun changeHistListLen} \getchunk{defun changeToNamedInterpreterFrame} @@ -53871,7 +53875,6 @@ digits in TechExplorer. Since Saturn is gone we can remove it. \getchunk{defun frame} \getchunk{defun frameEnvironment} \getchunk{defun frameSpad2Cmd} -\getchunk{defun functionp} \getchunk{defun funfind,LAM} \getchunk{defun gatherGlossLines} diff --git a/books/bookvol9.pamphlet b/books/bookvol9.pamphlet index 919a824..e7f754a 100644 --- a/books/bookvol9.pamphlet +++ b/books/bookvol9.pamphlet @@ -5033,7 +5033,7 @@ of the symbol being parsed. The original list read: \defun{loadLibIfNecessary}{loadLibIfNecessary} \calls{loadLibIfNecessary}{loadLibIfNecessary} -\calls{loadLibIfNecessary}{functionp} +\calls{loadLibIfNecessary}{canFuncall?} \calls{loadLibIfNecessary}{macrop} \calls{loadLibIfNecessary}{getl} \calls{loadLibIfNecessary}{loadLib} @@ -5055,7 +5055,7 @@ of the symbol being parsed. The original list read: (t (setq value (cond - ((or (|functionp| u) (|macrop| u)) u) + ((or (canFuncall? u) (|macrop| u)) u) ((getl u 'loaded) u) ((|loadLib| u) u))) (cond diff --git a/changelog b/changelog index f6eef17..5b98fe5 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,11 @@ +20140629 c1m src/axiom-website/patches.html 20140629.01.c1m.patch +20140629 c1m books/bookvol5 functionp -> canFuncall? +20140629 c1m books/bookvol9 functionp -> canFuncall? +20140629 c1m src/interp/g-util.lisp functionp -> canFuncall? +20140629 c1m src/interp/i-coerce.lisp functionp -> canFuncall? +20140629 c1m src/interp/i-spec2.lisp. functionp -> canFuncall? +20140629 c1m src/interp/interp-proclaims.lisp functionp -> canFuncall? +20140629 c1m src/interp/util.lisp functionp -> canFuncall? 20140628 tpd src/axiom-website/patches.html 20140628.02.tpd.patch 20140628 tpd src/input/dbtest.input remove failing input file 20140628 tpd src/axiom-website/patches.html 20140628.01.tpd.patch diff --git a/patch b/patch index c8de758..97ef407 100644 --- a/patch +++ b/patch @@ -1,4 +1,8 @@ -src/input/dbtest.input.pamphlet remove failing input file +books/bookvol5, books/bookvol9, src/interp/* functionp -> canFuncall? -This input file mixes hypertex and latex syntax in complex ways. -As a result it fails to be properly formatted. It has been removed. +Axiom has a function, originally in BOOT, called functionp. +BOOT is case sensitive so this function is called |functionp| in lisp. +Lisp uppercases symbols so functionp becomes FUNCTIONP. + +This led to a subtle failing change, found by Camm Maguire. +The BOOT-derived function is now called canFuncall? diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html index 987e7d9..f7aadb7 100644 --- a/src/axiom-website/patches.html +++ b/src/axiom-website/patches.html @@ -4502,6 +4502,8 @@ Makefile.pamphlet src/Makefile.pamphlet use chunk syntax zips/noweb-2.10a.tgz deleted, noweb removed 20140628.02.tpd.patch src/input/dbtest.input remove failing input file +20140629.01.c1m.patch +functionp -> canFuncall? diff --git a/src/interp/g-util.lisp.pamphlet b/src/interp/g-util.lisp.pamphlet index e542b8f..7b4fe16 100644 --- a/src/interp/g-util.lisp.pamphlet +++ b/src/interp/g-util.lisp.pamphlet @@ -572,7 +572,7 @@ (PROG (|key|) (RETURN (COND - ((NULL (|functionp| |pred|)) + ((NULL (canFuncall? |pred|)) (|error| '|listSort: first arg must be a function|)) ((NULL (LISTP LIST)) (|error| '|listSort: second argument must be a list|)) @@ -581,7 +581,7 @@ (LENGTH LIST))) ('T (SPADLET |key| (CAR |optional|)) (COND - ((NULL (|functionp| |key|)) + ((NULL (canFuncall? |key|)) (|error| '|listSort: last arg must be a function|)) ('T (|mergeSort| |pred| |key| LIST (LENGTH LIST))))))))) diff --git a/src/interp/i-coerce.lisp.pamphlet b/src/interp/i-coerce.lisp.pamphlet index 13070a0..3f07c6b 100644 --- a/src/interp/i-coerce.lisp.pamphlet +++ b/src/interp/i-coerce.lisp.pamphlet @@ -669,7 +669,7 @@ The special routines that do the coercions typically involve a "2" (INTERN (STRCONC "retract" (STRINGIMAGE D))))) (COND - ((|functionp| |fun|) (PUT D '|retract| |fun|) + ((canFuncall? |fun|) (PUT D '|retract| |fun|) (SPADLET |c| (CATCH '|coerceFailure| (FUNCALL |fun| |object| |t2|))) @@ -1749,7 +1749,7 @@ Interpreter Coercion Query Functions ((BOOT-EQUAL |tag| '|partial|) NIL) ((BOOT-EQUAL |tag| '|total|) 'T) ('T - (OR (AND (|functionp| |fun|) + (OR (AND (canFuncall? |fun|) (SPADLET |v| (CATCH '|coerceFailure| (FUNCALL |fun| '|$fromCoerceable$| @@ -3827,7 +3827,7 @@ Interpreter Coercion Query Functions (INTERN (STRCONC "commute" (STRINGIMAGE D))))) (COND - ((|functionp| |fun|) (PUT D '|coerceCommute| |fun|) + ((canFuncall? |fun|) (PUT D '|coerceCommute| |fun|) (SPADLET |u| (|objValUnwrap| |obj|)) (SPADLET |c| (CATCH '|coerceFailure| diff --git a/src/interp/i-spec2.lisp.pamphlet b/src/interp/i-spec2.lisp.pamphlet index 6aacd87..6933b4e 100644 --- a/src/interp/i-spec2.lisp.pamphlet +++ b/src/interp/i-spec2.lisp.pamphlet @@ -394,7 +394,7 @@ There are several special modes used in these functions: ('T (SPADLET |lispOp| (CAR |t|)) (SPADLET |argl| (CDR |t|)) (COND - ((NULL (|functionp| (ELT |lispOp| 0))) + ((NULL (canFuncall? (ELT |lispOp| 0))) (|throwKeyedMsg| 'S2IS0024 (CONS (ELT |lispOp| 0) NIL))) ('T diff --git a/src/interp/interp-proclaims.lisp b/src/interp/interp-proclaims.lisp index c0b9294..2264e82 100644 --- a/src/interp/interp-proclaims.lisp +++ b/src/interp/interp-proclaims.lisp @@ -2492,7 +2492,7 @@ BOOT::|bool| BOOT::|e04mbfSolve,fd| BOOT::|orderList| BOOT::|e04mbfSolve,fc| BOOT::|upLoopIters| BOOT::NMSORT BOOT::|pr| BOOT::|e04fdfSolve,fb| BOOT::|interpIter| - BOOT::|functionp| BOOT::|quoteCatOp| BOOT::|e04fdfSolve,fa| + BOOT::canFuncall? BOOT::|quoteCatOp| BOOT::|e04fdfSolve,fa| BOOT::|isLetter| BOOT::|mkNestedElts| BOOT::|charRangeTest| BOOT::|instantiate| BOOT::|isUpperCaseLetter| BOOT::|e04gcfSolve,fb| BOOT::|flattenSexpr| diff --git a/src/interp/util.lisp.pamphlet b/src/interp/util.lisp.pamphlet index 69a3900..959193d 100644 --- a/src/interp/util.lisp.pamphlet +++ b/src/interp/util.lisp.pamphlet @@ -244,7 +244,7 @@ After this function is called the image is clean and can be saved. (CONS "history" NIL)))) (|initHist|) (COND - ((|functionp| '|addtopath|) + ((canFuncall? '|addtopath|) (|addtopath| (CONCAT $SPADROOT "bin")))) (SETQ $CURRENT-DIRECTORY *DEFAULT-PATHNAME-DEFAULTS*) (COND