From df94b3c5b831e78a056f7b0b5334b1fb8d3c3bd5 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Tue, 23 Feb 2010 00:27:39 +0000 Subject: Some much needed housecleaning regarding system... Some much needed housecleaning regarding system properties. If you can possibly resist the temptation, it'd be great if people could try to go through the properties classes to get and set them, and also to set property values somewhere fixed rather than using strings directly. Review by community. --- src/compiler/scala/tools/nsc/CompilerCommand.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/compiler/scala/tools/nsc/CompilerCommand.scala') diff --git a/src/compiler/scala/tools/nsc/CompilerCommand.scala b/src/compiler/scala/tools/nsc/CompilerCommand.scala index a805da1fcc..dd581e0878 100644 --- a/src/compiler/scala/tools/nsc/CompilerCommand.scala +++ b/src/compiler/scala/tools/nsc/CompilerCommand.scala @@ -26,7 +26,8 @@ class CompilerCommand( lazy val fileEndings = Properties.fileEndings /** The name of the command */ - val cmdName = "scalac" + def cmdName = "scalac" + private def isFsc = cmdName == "fsc" private val helpSyntaxColumnWidth: Int = (settings.visibleSettings map (_.helpSyntax.length)) max @@ -53,8 +54,7 @@ class CompilerCommand( // an informative message of some sort should be printed instead. // (note: do not add "files.isEmpty" do this list) val stopSettings = List[(() => Boolean, (Global) => String)]( - ((() => (settings.help.value _)() && (cmdName == "fsc")), - fscUsageMsg + _.pluginOptionsHelp), + ((() => (settings.help.value _)() && isFsc), fscUsageMsg + _.pluginOptionsHelp), (settings.help.value _, usageMsg + _.pluginOptionsHelp), (settings.Xhelp.value _, _ => xusageMsg), (settings.Yhelp.value _, _ => yusageMsg), -- cgit v1.2.3