     @measure 'loadTime', =>
       @metadata = Package.loadMetadata(@path, true)
 
-  activate: ({sync}={})->
-    if sync
+  activate: ({sync, immediate}={})->
+    if sync or immediate
       @loadGrammarsSync()
       @loadScopedPropertiesSync()
     else
-      TextMatePackage.getActivationQueue().push(this)
+      TextMatePackage.addPackageToActivationQueue(this)
 
   activateConfig: -> # noop
 

_ = require 'underscore-plus'
fs = require 'fs-plus'
async = require 'async'

### Internal ###


      completions: textMateSettings.completions
    )
    { editor: editorProperties } if _.size(editorProperties) > 0

  # Deprecated
  loadGrammarsSync: ->
    for grammarPath in fs.listSync(@getSyntaxesPath(), @legalGrammarExtensions)
      @addGrammar(atom.syntax.readGrammarSync(grammarPath))

  # Deprecated
  loadScopedPropertiesSync: ->
    for grammar in @getGrammars()
      if properties = @propertiesFromTextMateSettings(grammar)
        selector = atom.syntax.cssSelectorFromScopeSelector(grammar.scopeName)
        @scopedProperties.push({selector, properties})

    for preferencePath in fs.listSync(@getPreferencesPath())
      {scope, settings} = fs.readObjectSync(preferencePath)
      if properties = @propertiesFromTextMateSettings(settings)
        selector = atom.syntax.cssSelectorFromScopeSelector(scope) if scope?
        @scopedProperties.push({selector, properties})

    if @isActive()
      for {selector, properties} in @scopedProperties
        atom.syntax.addProperties(@path, selector, properties)
