diff --git a/src/config.coffee b/src/config.coffee index 685a354f0..d0db72711 100644 --- a/src/config.coffee +++ b/src/config.coffee @@ -708,15 +708,6 @@ class Config .join(' ') @scopedSettingsStore.getPropertyValue(scopeChain, keyPath) - # TODO: figure out how to remove this. Only language mode uses it for one thing. - scopedSettingsForScopeDescriptor: (scopeDescriptor, keyPath) -> - scopeChain = scopeDescriptor - .map (scope) -> - scope = ".#{scope}" unless scope[0] is '.' - scope - .join(' ') - @scopedSettingsStore.getProperties(scopeChain, keyPath) - clearScopedSettings: -> @scopedSettingsStore = new ScopedPropertyStore diff --git a/src/language-mode.coffee b/src/language-mode.coffee index 6e1e79d2f..89d9130c8 100644 --- a/src/language-mode.coffee +++ b/src/language-mode.coffee @@ -30,11 +30,11 @@ class LanguageMode # Returns an {Array} of the commented {Ranges}. toggleLineCommentsForBufferRows: (start, end) -> scopes = @editor.scopesForBufferPosition([start, 0]) - properties = atom.syntax.propertiesForScope(scopes, "editor.commentStart")[0] - return unless properties + properties = atom.config.get(scopes, "editor") + return unless properties.commentStart - commentStartString = _.valueForKeyPath(properties, "editor.commentStart") - commentEndString = _.valueForKeyPath(properties, "editor.commentEnd") + commentStartString = properties.commentStart + commentEndString = properties.commentEnd return unless commentStartString