Workspace.st
changeset 5595 925147560958
parent 5579 028c351dfc0d
child 5618 6caed94c3cef
--- a/Workspace.st	Mon Feb 08 10:06:20 2016 +0100
+++ b/Workspace.st	Mon Feb 08 10:13:03 2016 +0100
@@ -18,7 +18,7 @@
 		commentStrings autoDefineWorkspaceVariables simulatedSelf
 		autoDefineVariables compilerClass allowValueDrop
 		poolsConsideredInDoIts namespaceForDoits editedMethodOrClass
-		editedClass editedMethod editedLanguage'
+		editedLanguage'
 	classVariableNames:'DefaultViewBackground DefaultErrorForegroundColor
 		DefaultErrorBackgroundColor DefaultWarningBackgroundColor
 		DefaultWarningForegroundColor WorkspaceVariables DoItHistory
@@ -551,7 +551,7 @@
 
 allowValueDrop:aBoolean
     "if on (the default), any smalltalk value can be dropped and leads to a workspace variable
-     holding on to that being defined. Can be turned off, if youdont like this (for standAlone apps)"
+     holding on to that being defined. Can be turned off, if you don't like this (for standAlone apps)"
 
     allowValueDrop := aBoolean.
 
@@ -618,14 +618,16 @@
 !
 
 editedLanguage
+    |mthd cls|
+    
     editedLanguage notNil ifTrue:[
-	^ editedLanguage
+        ^ editedLanguage
     ].
-    editedMethod notNil ifTrue:[
-	^ editedMethod programmingLanguage.
+    (mthd := self editedMethod )notNil ifTrue:[
+        ^ mthd programmingLanguage.
     ].
-    editedClass notNil ifTrue:[
-	editedClass programmingLanguage.
+    (cls := self editedClass) notNil ifTrue:[
+        ^ cls programmingLanguage.
     ].
     ^ nil