diff options
author | dos-reis <gdr@axiomatics.org> | 2009-04-20 06:55:58 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2009-04-20 06:55:58 +0000 |
commit | 107ad31254bf3de30516ce0f2563892bacf9cb60 (patch) | |
tree | 77862fdbee4770ccfb3dbffe035e3cc2f4cd72de /src/interp | |
parent | fe63e89c9e18017cddee98f0c6ceb2783c930e86 (diff) | |
download | open-axiom-107ad31254bf3de30516ce0f2563892bacf9cb60.tar.gz |
* interp/br-con.boot: Use textEditor() to get editor program.
* interp/br-saturn.boot: Likewise.
* interp/compat.boot: Likewise.
* interp/i-util.boot (textEditor): Define here.
* interp/g-util.boot: Likewise.
Diffstat (limited to 'src/interp')
-rw-r--r-- | src/interp/br-con.boot | 5 | ||||
-rw-r--r-- | src/interp/br-saturn.boot | 2 | ||||
-rw-r--r-- | src/interp/compat.boot | 7 | ||||
-rw-r--r-- | src/interp/g-util.boot | 2 | ||||
-rw-r--r-- | src/interp/i-util.boot | 7 |
5 files changed, 13 insertions, 10 deletions
diff --git a/src/interp/br-con.boot b/src/interp/br-con.boot index bccb34df..423ea272 100644 --- a/src/interp/br-con.boot +++ b/src/interp/br-con.boot @@ -182,7 +182,7 @@ kdPageInfo(name,abbrev,nargs,conform,signature,file?) == if filename ^= '"" then htSayStandard '"\newline{}" htSay('"The source code for the constructor is found in ") - htMakePage [['text,'"\unixcommand{",filename,'"}{_\$AXIOM/lib/SPADEDIT ", + htMakePage [['text,'"\unixcommand{",filename,'"}{",textEditor(), '" ", sourceFileName, '" ", name, '"}"]] if nargs ^= 0 then htSay '"." htSaturnBreak() @@ -1145,7 +1145,8 @@ bcUnixTable(u) == isAsharpFileName? x => '("AS") '("SPAD") filename := NAMESTRING $FINDFILE(STRINGIMAGE x, ft) - htMakePage [['text, '"\unixcommand{",PATHNAME_-NAME x, '"}{$AXIOM/lib/SPADEDIT ", filename, '"} "]] + htMakePage [['text, '"\unixcommand{",PATHNAME_-NAME x, '"}{", + textEditor(), '" ", filename, '"} "]] htSay '"}" htEndTable() diff --git a/src/interp/br-saturn.boot b/src/interp/br-saturn.boot index e439d1ca..3880cebc 100644 --- a/src/interp/br-saturn.boot +++ b/src/interp/br-saturn.boot @@ -1401,7 +1401,7 @@ displayDomainOp(htPage,which,origin,op,sig,predicate, htSaySourceFile conname == sourceFileName := (getConstructorSourceFileFromDB conname or '"none") filename := extractFileNameFromPath sourceFileName - htMakePage [['text,'"\unixcommand{",filename,'"}{_\$AXIOM/lib/SPADEDIT ", + htMakePage [['text,'"\unixcommand{",filename,'"}{", textEditor(), '" ", sourceFileName, '" ", conname, '"}"]] htSayIndentRel(n,:options) == diff --git a/src/interp/compat.boot b/src/interp/compat.boot index b5082786..c5a77c23 100644 --- a/src/interp/compat.boot +++ b/src/interp/compat.boot @@ -57,12 +57,7 @@ system() == terminateSystemCommand() editFile file == - editProg := - %hasFeature KEYWORD::WIN32 => '"notepad" - prog := getEnv '"EDITOR" => prog - # $EditorProgram ^= 0 => $EditorProgram - return nil -- FIXME: Should we not notify user? - runCommand STRCONC(editProg,'" ",namestring pathname file) + runCommand strconc(textEditor(),'" ",namestring pathname file) makeBigFloat(mantissa,expon) == [$BFtag,mantissa,:expon] diff --git a/src/interp/g-util.boot b/src/interp/g-util.boot index 8826bd95..d51b72cc 100644 --- a/src/interp/g-util.boot +++ b/src/interp/g-util.boot @@ -533,7 +533,7 @@ isLetter c == update() == runCommand - STRCONC('"SPADEDIT ",STRINGIMAGE _/VERSION,'" ",STRINGIMAGE _/WSNAME,'" A") + STRCONC(textEditor(), '" ",STRINGIMAGE _/VERSION,'" ",STRINGIMAGE _/WSNAME,'" A") _/UPDATE() --% Inplace Merge Sort for Lists diff --git a/src/interp/i-util.boot b/src/interp/i-util.boot index b1ce6575..86060fed 100644 --- a/src/interp/i-util.boot +++ b/src/interp/i-util.boot @@ -82,6 +82,13 @@ printPrompt(flush? == false) == if flush? then FORCE_-OUTPUT $OutputStream +++ Return the name of a text editor, if possible. +textEditor() == + prog := getEnv '"EDITOR" => prog + # $EditorProgram ^= 0 => $EditorProgram + %hasFeature KEYWORD::WIN32 => '"notepad" + throwKeyedMsg("S2IZ0091",nil) + --% Miscellaneous $ZeroVecCache := nil |