Remove special method for language mode

This commit is contained in:
Ben Ogle
2014-10-02 13:56:27 -07:00
parent a8fad6a0fb
commit b1f8c6a6e8
2 changed files with 4 additions and 13 deletions

View File

@@ -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

View File

@@ -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