     @invalidateRow(0)
     @fullyTokenized = false
     event = {start: 0, end: lastRow, delta: 0}
-    @emit 'changed', event
+    @emit 'changed', event if Grim.includeDeprecations
     @emitter.emit 'did-change', event
 
   setVisible: (@visible) ->

  onDidTokenize: (callback) ->
    @emitter.on 'did-tokenize', callback

  on: (eventName) ->
    switch eventName
      when 'changed'
        Grim.deprecate("Use TokenizedBuffer::onDidChange instead")
      when 'grammar-changed'
        Grim.deprecate("Use TokenizedBuffer::onDidChangeGrammar instead")
      when 'tokenized'
        Grim.deprecate("Use TokenizedBuffer::onDidTokenize instead")
      else
        Grim.deprecate("TokenizedBuffer::on is deprecated. Use event subscription methods instead.")

    EmitterMixin::on.apply(this, arguments)

  grammarAddedOrUpdated: (grammar) =>
    if grammar.injectionSelector?
      @retokenizeLines() if @hasTokenForSelector(grammar.injectionSelector)


  markTokenizationComplete: ->
    unless @fullyTokenized
      @emit 'tokenized' if Grim.includeDeprecations
      @emitter.emit 'did-tokenize'
    @fullyTokenized = true

