From 8b3133a5015424ab3b0b90ecc0fb606be000aa2a Mon Sep 17 00:00:00 2001 From: dos-reis Date: Sat, 8 Dec 2007 10:07:01 +0000 Subject: Fix SF/1846477 * i-syscmd.boot (printSynonyms): Eval commands in suspension before printing. (processSynonyms): Fully eval commands in suspension. * setvars.boot ($InitialCommandSynonymAlist): Tidy. --- src/interp/ChangeLog | 9 +++++ src/interp/i-syscmd.boot | 3 +- src/interp/setvars.boot | 98 ++++++++++++++++++++++++------------------------ 3 files changed, 60 insertions(+), 50 deletions(-) diff --git a/src/interp/ChangeLog b/src/interp/ChangeLog index 16c1f943..a0b657db 100644 --- a/src/interp/ChangeLog +++ b/src/interp/ChangeLog @@ -1,3 +1,12 @@ +2007-12-08 Alfredo Portes + Gabriel Dos Reis + + Fix SF/1846477 + * i-syscmd.boot (printSynonyms): Eval commands in suspension + before printing. + (processSynonyms): Fully eval commands in suspension. + * setvars.boot ($InitialCommandSynonymAlist): Tidy. + 2007-12-08 Gabriel Dos Reis * bc-util.boot ($newConstructorList): Move from setq.lisp to here. diff --git a/src/interp/i-syscmd.boot b/src/interp/i-syscmd.boot index 21a1387f..e79f0529 100644 --- a/src/interp/i-syscmd.boot +++ b/src/interp/i-syscmd.boot @@ -2757,7 +2757,7 @@ apropos l == printSynonyms(patterns) == centerAndHighlight("System Command Synonyms",$LINELENGTH,specialChar 'hbar) - ls := filterListOfStringsWithFn(patterns, [[STRINGIMAGE a,:b] + ls := filterListOfStringsWithFn(patterns, [[STRINGIMAGE a,:eval b] for [a,:b] in synonymsForUserLevel $CommandSynonymAlist], function CAR) printLabelledList(ls,'"user",'"synonyms",'")",patterns) @@ -2929,6 +2929,7 @@ processSynonyms() == synstr := SUBSTRING (line, 1, to) syn := STRING2ID_-N (synstr, 1) null (fun := LASSOC (syn, $CommandSynonymAlist)) => NIL + fun := eval fun -- fun may have been a suspension to := STRPOS('")",fun,1,NIL) if to and to ^= SIZE(fun)-1 then opt := STRCONC('" ",SUBSTRING(fun,to,NIL)) diff --git a/src/interp/setvars.boot b/src/interp/setvars.boot index c1523218..37358ef0 100644 --- a/src/interp/setvars.boot +++ b/src/interp/setvars.boot @@ -58,55 +58,55 @@ import '"debug" )package "BOOT" -$InitialCommandSynonymAlist == '( - (? . "what commands") - (ap . "what things") - (apr . "what things") - (apropos . "what things") - (cache . "set functions cache") - (cl . "clear") - (cls . "zsystemdevelopment )cls") - (cms . "system") - (co . "compiler") - (d . "display") - (dep . "display dependents") - (dependents . "display dependents") - (e . "edit") - (expose . "set expose add constructor") - (fc . "zsystemdevelopment )c") - (fd . "zsystemdevelopment )d") - (fdt . "zsystemdevelopment )dt") - (fct . "zsystemdevelopment )ct") - (fctl . "zsystemdevelopment )ctl") - (fe . "zsystemdevelopment )e") - (fec . "zsystemdevelopment )ec") - (fect . "zsystemdevelopment )ect") - (fns . "exec spadfn") - (fortran . "set output fortran") - (h . "help") - (hd . "system hypertex &") - (kclam . "boot clearClams ( )") - (killcaches . "boot clearConstructorAndLisplibCaches ( )") - (patch . "zsystemdevelopment )patch") - (pause . "zsystemdevelopment )pause") - (prompt . "set message prompt") - (recurrence . "set functions recurrence") - (restore . "history )restore") - (save . "history )save") - (startGraphics . "system $AXIOM/lib/viewman &") - (stopGraphics . "lisp (|sockSendSignal| 2 15)") - (time . "set message time") - (type . "set message type") - (unexpose . "set expose drop constructor") - (up . "zsystemdevelopment )update") - (version . "lisp *yearweek*") - (w . "what") - (wc . "what categories") - (wd . "what domains") - (who . "lisp (pprint credits)") - (wp . "what packages") - (ws . "what synonyms") - ) +$InitialCommandSynonymAlist == [ + ["?" , :'"what commands"],_ + ["ap" , :'"what things"],_ + ["apr" , :'"what things"],_ + ["apropos" , :'"what things"],_ + ["cache" , :'"set functions cache"],_ + ["cl" , :'"clear"],_ + ["cls" , :'"zsystemdevelopment )cls"],_ + ["cms" , :'"system"],_ + ["co" , :'"compiler"],_ + ["d" , :'"display"],_ + ["dep" , :'"display dependents"],_ + ["dependents" , :'"display dependents"],_ + ["e" , :'"edit"],_ + ["expose" , :'"set expose add constructor"],_ + ["fc" , :'"zsystemdevelopment )c"],_ + ["fd" , :'"zsystemdevelopment )d"],_ + ["fdt" , :'"zsystemdevelopment )dt"],_ + ["fct" , :'"zsystemdevelopment )ct"],_ + ["fctl" , :'"zsystemdevelopment )ctl"],_ + ["fe" , :'"zsystemdevelopment )e"],_ + ["fec" , :'"zsystemdevelopment )ec"],_ + ["fect" , :'"zsystemdevelopment )ect"],_ + ["fns" , :'"exec spadfn"],_ + ["fortran" , :'"set output fortran"],_ + ["h" , :'"help"],_ + ["hd", :["CONCAT",'"system ",["systemRootDirectory"],'"lib/hypertex &"]],_ + ["kclam" , :'"boot clearClams ( )"],_ + ["killcaches" , :'"boot clearConstructorAndLisplibCaches ( )"],_ + ["patch" , :'"zsystemdevelopment )patch"],_ + ["pause" , :'"zsystemdevelopment )pause"],_ + ["prompt" , :'"set message prompt"],_ + ["recurrence" , :'"set functions recurrence"],_ + ["restore" , :'"history )restore"],_ + ["save" , :'"history )save"],_ + ["startGraphics",:["CONCAT",'"system ",["systemRootDirectory"],'"lib/viewman &"]],_ + ["stopGraphics", :'"lisp (|sockSendSignal| 2 15)"],_ + ["time" , :'"set message time"],_ + ["type" , :'"set message type"],_ + ["unexpose" , :'"set expose drop constructor"],_ + ["up" , :'"zsystemdevelopment )update"],_ + ["version" , :'"lisp *yearweek*"],_ + ["w" , :'"what"],_ + ["wc" , :'"what categories"],_ + ["wd" , :'"what domains"],_ + ["who" , :'"lisp (pprint credits)"],_ + ["wp" , :'"what packages"],_ + ["ws" , :'"what synonyms"]_ + ] $CommandSynonymAlist := COPY $InitialCommandSynonymAlist -- cgit v1.2.3