 _ = require 'underscore-plus'
 {Model} = require 'theorist'
-EmitterMixin = require('emissary').Emitter
 {Emitter} = require 'event-kit'
 {Point, Range} = require 'text-buffer'
 Serializable = require 'serializable'

      [startRow, endRow] = @updateFoldableStatus(startRow, endRow)

      event = {start: startRow, end: endRow, delta: 0}
      @emit 'changed', event
      @emitter.emit 'did-change', event

    if @firstInvalidRow()?


    @retokenizeLines()

    @emit 'grammar-changed', grammar if Grim.includeDeprecations
    @emitter.emit 'did-change-grammar', grammar

  reloadGrammar: ->
