This commit is contained in:
Ben Ogle 2014-10-03 10:45:37 -07:00
parent 27da0669f3
commit a711e908d5
3 changed files with 3 additions and 5 deletions

View File

@ -883,10 +883,8 @@ describe "Config", ->
expect(atom.config.get([".source.coffee", ".string.quoted.single.double"], "foo.bar.baz")).toBe 22
describe 'when there are global defaults', ->
beforeEach ->
atom.config.setDefaults("foo", hasDefault: 'ok')
it 'falls back to the global when there is no scoped property specified', ->
atom.config.setDefaults("foo", hasDefault: 'ok')
expect(atom.config.get([".source.coffee", ".string.quoted.single"], "foo.hasDefault")).toBe 'ok'
describe ".set(scope, keyPath, value)", ->

View File

@ -357,7 +357,7 @@ class Config
message = "`callNow` was set to false. Use ::onDidChange instead. Note that ::onDidChange calls back with different arguments." if options.callNow == false
deprecate "Config::observe no longer supports options; see https://atom.io/docs/api/latest/Config. #{message}"
else
console.warn 'An unsupported form of Config::observe is being used. See https://atom.io/docs/api/latest/Config for details'
console.error 'An unsupported form of Config::observe is being used. See https://atom.io/docs/api/latest/Config for details'
return
if scopeDescriptor?

View File

@ -30,7 +30,7 @@ class LanguageMode
# Returns an {Array} of the commented {Ranges}.
toggleLineCommentsForBufferRows: (start, end) ->
scopes = @editor.scopesForBufferPosition([start, 0])
properties = atom.config.settingsForScopeDescriptor(scopes, "editor.commentStart")[0]
properties = atom.config.settingsForScopeDescriptor(scopes, 'editor.commentStart')[0]
return unless properties
commentStartString = _.valueForKeyPath(properties, 'editor.commentStart')