From 503fa30c28c276f169643afcca11157bfa38cacb Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Tue, 16 Dec 2014 14:21:40 -0800 Subject: [PATCH] Flesh out deprecation messages for Config::{is,set}Default Also, simplify the shim in ::isDefault --- src/config.coffee | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/config.coffee b/src/config.coffee index b2468a412..b98cbd3e9 100644 --- a/src/config.coffee +++ b/src/config.coffee @@ -623,7 +623,7 @@ class Config # # Returns the default value. getDefault: -> - Grim.deprecate("Use the `excludeSources` to ::get instead") + Grim.deprecate("Use `::get(keyPath, {scope, excludeSources: [atom.config.getUserConfigPath()]})` instead") if arguments.length is 1 [keyPath] = arguments else @@ -639,13 +639,13 @@ class Config # Returns a {Boolean}, `true` if the current value is the default, `false` # otherwise. isDefault: -> - Grim.deprecate("Use the `excludeSources` to ::get instead") + Grim.deprecate("Use `not ::get(keyPath, {scope, sources: [atom.config.getUserConfigPath()]})?` instead") if arguments.length is 1 [keyPath] = arguments else [scopeSelector, keyPath] = arguments scope = [scopeSelector] - @get(keyPath, {scope}) is @get(keyPath, {scope, excludeSources: [@getUserConfigPath()]}) + not @get(keyPath, {scope, sources: [@getUserConfigPath()]})? # Extended: Retrieve the schema for a specific key path. The schema will tell # you what type the keyPath expects, and other metadata about the config