--- a/Smalltalk.st Sat Nov 05 12:20:43 2016 +0100
+++ b/Smalltalk.st Sat Nov 05 12:31:38 2016 +0100
@@ -20,12 +20,12 @@
StartupArguments CommandLine CommandName CommandLineArguments
CachedAbbreviations VerboseStartup VerboseLoading Verbose
SilentLoading Initializing StandAlone HeadlessOperation IsPlugin
- IsSharedLibraryComponent IsSTScript DebuggingStandAlone Debugging
- LogDoits LoadBinaries RealSystemPath ResourcePath SourcePath
- BinaryPath FileInPath PackagePath BinaryDirName ResourceDirName
- SourceDirName BitmapDirName PackageDirName FileInDirName
- ChangeFileName ImageStartTime ImageRestartTime DemoMode
- SaveEmergencyImage SpecialObjectArray CallbackSignal
+ IsSharedLibraryComponent IsSTScript IsRepl DebuggingStandAlone
+ Debugging LogDoits LoadBinaries RealSystemPath ResourcePath
+ SourcePath BinaryPath FileInPath PackagePath BinaryDirName
+ ResourceDirName SourceDirName BitmapDirName PackageDirName
+ FileInDirName ChangeFileName ImageStartTime ImageRestartTime
+ DemoMode SaveEmergencyImage SpecialObjectArray CallbackSignal
ClassesFailedToInitialize HasNoConsole IgnoreHalt
PackageToPathMapping IgnoreAssertions LanguageModifier
LanguageCodeset'
@@ -3813,7 +3813,9 @@
Smalltalk openDisplay.
Display notNil ifTrue:[
- Display exitOnLastClose:true.
+ IsRepl ifFalse:[
+ Display exitOnLastClose:true.
+ ].
"/ Processor exitWhenNoMoreUserProcesses:true.
].
!
@@ -4321,8 +4323,12 @@
!
start
- "main startup, if there is a Display, initialize it
- and start dispatching; otherwise go into a read-eval-print loop."
+ "low level entry from the VM's main.
+ After initializeSystem, this is the very first real entry into the Smalltalk world.
+ Analyzes the command line and checks what to do
+ (i.e. script/repl/eval or full blown IDE).
+ Also handles --load and various debug options.
+ Caveat: this has become too complicated and desperately needs a rewrite."
|idx graphicalMode arg didReadRCFile keepSplashWindow|
@@ -4350,7 +4356,7 @@
"/ read startup and patches file
"/
idx := CommandLineArguments indexOfAny:#('-R' '--repl').
- isRepl := (idx ~~ 0).
+ isRepl := IsRepl := (idx ~~ 0).
idx := CommandLineArguments indexOfAny:#('-q' '--silent').
idx ~~ 0 ifTrue:[