aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2009-04-20 06:55:58 +0000
committerdos-reis <gdr@axiomatics.org>2009-04-20 06:55:58 +0000
commit107ad31254bf3de30516ce0f2563892bacf9cb60 (patch)
tree77862fdbee4770ccfb3dbffe035e3cc2f4cd72de
parentfe63e89c9e18017cddee98f0c6ceb2783c930e86 (diff)
downloadopen-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.
-rw-r--r--src/ChangeLog8
-rw-r--r--src/doc/msgs/s2-us.msgs3
-rw-r--r--src/interp/br-con.boot5
-rw-r--r--src/interp/br-saturn.boot2
-rw-r--r--src/interp/compat.boot7
-rw-r--r--src/interp/g-util.boot2
-rw-r--r--src/interp/i-util.boot7
7 files changed, 24 insertions, 10 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 223041eb..66c9136b 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,13 @@
2009-04-20 Gabriel Dos Reis <gdr@cs.tamu.edu>
+ * 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.
+
+2009-04-20 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
* interp/msgdb.boot (substituteSegmentedMsg): Handle %x specifier.
2009-04-19 Gabriel Dos Reis <gdr@cs.tamu.edu>
diff --git a/src/doc/msgs/s2-us.msgs b/src/doc/msgs/s2-us.msgs
index 6ded51c7..d3e2ca8c 100644
--- a/src/doc/msgs/s2-us.msgs
+++ b/src/doc/msgs/s2-us.msgs
@@ -1060,6 +1060,9 @@ S2IZ0089
Compiling Lisp source code from file %1
S2IZ0090
Issuing )library command for %1
+S2IZ0091
+ OpenAxiom could not find a suitable text editor. Please set and export
+ the environment variable %b EDITOR %d and start again.
S2GE0000
Internal Error
S2GE0001
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