diff --git a/books/bookvol5.pamphlet b/books/bookvol5.pamphlet index 21bee4a..9b319eb 100644 --- a/books/bookvol5.pamphlet +++ b/books/bookvol5.pamphlet @@ -25348,6 +25348,46 @@ o )show @ +\defun{whatCommands}{The )what commands implementation} +\calls{whatCommands}{stringimage} +\calls{whatCommands}{centerAndHighlight} +\calls{whatCommands}{strconc} +\calls{whatCommands}{specialChar} +\calls{whatCommands}{filterListOfStrings} +\calls{whatCommands}{commandsForUserLevel} +\calls{whatCommands}{sayMessage} +\calls{whatCommands}{blankList} +\calls{whatCommands}{sayAsManyPerLineAsPossible} +\calls{whatCommands}{say} +\calls{whatCommands}{sayKeyedMsg} +\usesdollar{whatCommands}{systemCommands} +\usesdollar{whatCommands}{linelength} +\usesdollar{whatCommands}{UserLevel} +<>= +(defun |whatCommands| (patterns) + (let (label ell) + (declare (special |$systemCommands| $linelength |$UserLevel|)) + (setq label + (strconc '|System Commands for User Level: | (stringimage |$UserLevel|))) + (|centerAndHighlight| label $linelength (|specialChar| '|hbar|)) + (setq ell + (|filterListOfStrings| patterns + (mapcar #'stringimage (|commandsForUserLevel| |$systemCommands|)))) + (when patterns + (if ell + (|sayMessage| + `("System commands at this level matching patterns:" |%l| " " |%b| + ,@(append (|blankList| patterns) (list '|%d|)))) + (|sayMessage| + `("No system commands at this level matching patterns:" |%l| " " |%b| + ,@(append (|blankList| patterns) (list '|%d|)))))) + (when ell + (|sayAsManyPerLineAsPossible| ell) + (say " ")) + (unless patterns (|sayKeyedMsg| 's2iz0046 nil)))) + +@ + \defun{filterAndFormatConstructors}{filterAndFormatConstructors} \calls{filterAndFormatConstructors}{sayMessage} \calls{filterAndFormatConstructors}{blankList} @@ -29875,6 +29915,7 @@ See Steele Common Lisp 1990 pp305-307 <> <> +<> <> <> <> diff --git a/changelog b/changelog index 66c5032..0c609a5 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,6 @@ +20091231 tpd src/axiom-website/patches.html 20091231.01.tpd.patch +20091231 tpd src/interp/i-syscmd.lisp treeshake +20091231 tpd books/bookvol5 treeshake 20091230 tpd src/axiom-website/patches.html 20091230.01.tpd.patch 20091230 tpd src/interp/i-syscmd.lisp treeshake 20091230 tpd books/bookvol5 treeshake diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html index 416619f..b170930 100644 --- a/src/axiom-website/patches.html +++ b/src/axiom-website/patches.html @@ -2342,5 +2342,7 @@ books/bookvol5 treeshake i-syscmd
books/bookvol5 treeshake i-syscmd
20091230.01.tpd.patch books/bookvol5 treeshake i-syscmd
+20091231.01.tpd.patch +books/bookvol5 treeshake i-syscmd
diff --git a/src/interp/i-syscmd.lisp.pamphlet b/src/interp/i-syscmd.lisp.pamphlet index d2dc033..60193b2 100644 --- a/src/interp/i-syscmd.lisp.pamphlet +++ b/src/interp/i-syscmd.lisp.pamphlet @@ -242,64 +242,65 @@ ; sayKeyedMsg("S2IZ0046",NIL) ; nil -(DEFUN |whatCommands| (|patterns|) - (PROG (|label| |l|) - (declare (special |$systemCommands| $LINELENGTH |$UserLevel|)) - (RETURN - (SEQ (PROGN - (SPADLET |label| - (STRCONC '|System Commands for User Level: | - (STRINGIMAGE |$UserLevel|))) - (|centerAndHighlight| |label| $LINELENGTH - (|specialChar| '|hbar|)) - (SPADLET |l| - (|filterListOfStrings| |patterns| - (PROG (G167084) - (SPADLET G167084 NIL) - (RETURN - (DO ((G167089 - (|commandsForUserLevel| - |$systemCommands|) - (CDR G167089)) - (|a| NIL)) - ((OR (ATOM G167089) - (PROGN - (SETQ |a| (CAR G167089)) - NIL)) - (NREVERSE0 G167084)) - (SEQ (EXIT - (SETQ G167084 - (CONS (STRINGIMAGE |a|) - G167084))))))))) - (COND - (|patterns| - (COND - ((NULL |l|) - (|sayMessage| - (CONS (MAKESTRING - "No system commands at this level matching patterns:") - (CONS '|%l| - (CONS (MAKESTRING " ") - (CONS '|%b| - (APPEND - (|blankList| |patterns|) - (CONS '|%d| NIL)))))))) - ('T - (|sayMessage| - (CONS (MAKESTRING - "System commands at this level matching patterns:") - (CONS '|%l| - (CONS (MAKESTRING " ") - (CONS '|%b| - (APPEND - (|blankList| |patterns|) - (CONS '|%d| NIL))))))))))) - (COND - (|l| (|sayAsManyPerLineAsPossible| |l|) - (SAY (MAKESTRING " ")))) - (COND - (|patterns| NIL) - ('T (|sayKeyedMsg| 'S2IZ0046 NIL) NIL))))))) +;; (DEFUN |whatCommands| (|patterns|) +;; (PROG (|label| |l|) +;; (declare (special |$systemCommands| $LINELENGTH |$UserLevel|)) +;; (RETURN +;; (SEQ (PROGN +;; (SPADLET |label| +;; (STRCONC '|System Commands for User Level: | +;; (STRINGIMAGE |$UserLevel|))) +;; (|centerAndHighlight| |label| $LINELENGTH +;; (|specialChar| '|hbar|)) +;; (SPADLET |l| +;; (|filterListOfStrings| |patterns| +;; (PROG (G167084) +;; (SPADLET G167084 NIL) +;; (RETURN +;; (DO ((G167089 +;; (|commandsForUserLevel| +;; |$systemCommands|) +;; (CDR G167089)) +;; (|a| NIL)) +;; ((OR (ATOM G167089) +;; (PROGN +;; (SETQ |a| (CAR G167089)) +;; NIL)) +;; (NREVERSE0 G167084)) +;; (SEQ (EXIT +;; (SETQ G167084 +;; (CONS (STRINGIMAGE |a|) +;; G167084))))))))) +;; (COND +;; (|patterns| +;; (COND +;; ((NULL |l|) +;; (|sayMessage| +;; (CONS (MAKESTRING +;; "No system commands at this level matching patterns:") +;; (CONS '|%l| +;; (CONS (MAKESTRING " ") +;; (CONS '|%b| +;; (APPEND +;; (|blankList| |patterns|) +;; (CONS '|%d| NIL)))))))) +;; ('T +;; (|sayMessage| +;; (CONS (MAKESTRING +;; "System commands at this level matching patterns:") +;; (CONS '|%l| +;; (CONS (MAKESTRING " ") +;; (CONS '|%b| +;; (APPEND +;; (|blankList| |patterns|) +;; (CONS '|%d| NIL))))))))))) +;; (COND +;; (|l| (|sayAsManyPerLineAsPossible| |l|) +;; (SAY (MAKESTRING " ")))) +;; (COND +;; (|patterns| NIL) +;; ('T (|sayKeyedMsg| 'S2IZ0046 NIL) NIL))))))) + ;reportWhatOptions() == ; optList1:= "append"/[['%l,'" ",x] for x in $whatOptions]