     @decorationsByMarkerId[marker.id] ?= []
     @decorationsByMarkerId[marker.id].push(decoration)
     @decorationsById[decoration.id] = decoration
-    @emit 'decoration-added', decoration
+    @emit 'decoration-added', decoration if Grim.includeDeprecations
     @emitter.emit 'did-add-decoration', decoration
     decoration
 

  onDidUpdateMarkers: (callback) ->
    @emitter.on 'did-update-markers', callback

  on: (eventName) ->
    switch eventName
      when 'changed'
        Grim.deprecate("Use DisplayBuffer::onDidChange instead")
      when 'grammar-changed'
        Grim.deprecate("Use DisplayBuffer::onDidChangeGrammar instead")
      when 'soft-wrap-changed'
        Grim.deprecate("Use DisplayBuffer::onDidChangeSoftWrap instead")
      when 'character-widths-changed'
        Grim.deprecate("Use DisplayBuffer::onDidChangeCharacterWidths instead")
      when 'decoration-added'
        Grim.deprecate("Use DisplayBuffer::onDidAddDecoration instead")
      when 'decoration-removed'
        Grim.deprecate("Use DisplayBuffer::onDidRemoveDecoration instead")
      when 'decoration-changed'
        Grim.deprecate("Use decoration.getMarker().onDidChange() instead")
      when 'decoration-updated'
        Grim.deprecate("Use Decoration::onDidChangeProperties instead")
      when 'marker-created'
        Grim.deprecate("Use Decoration::onDidCreateMarker instead")
      when 'markers-updated'
        Grim.deprecate("Use Decoration::onDidUpdateMarkers instead")
      else
        Grim.deprecate("DisplayBuffer::on is deprecated. Use event subscription methods instead.")

    EmitterMixin::on.apply(this, arguments)

  emitDidChange: (eventProperties, refreshMarkers=true) ->
    if refreshMarkers
      @pauseMarkerChangeEvents()
      @refreshMarkerScreenPositions()
    @emit 'changed', eventProperties
    @emitter.emit 'did-change', eventProperties
    @resumeMarkerChangeEvents()



  resumeMarkerChangeEvents: ->
    marker.resumeChangeEvents() for marker in @getMarkers()
    @emit 'markers-updated' if Grim.includeDeprecations
    @emitter.emit 'did-update-markers'

  refreshMarkerScreenPositions: ->
