   setAttributes: (args...) ->
     @setProperties(args...)
 
+  # Public: Returns an {Object} containing any custom properties associated with
+  # the marker.
   getProperties: ->
     @properties
 
+  # Public: Merges an {Object} containing new properties into the marker's
+  # existing properties.
   setProperties: (properties) ->
     @update(properties: extend({}, @getProperties(), properties))
 
+  # Public: Creates and returns a new {Marker} with the same properties as this
+  # marker.
   copy: (params) ->
     @manager.createMarker(extend(@toParams(), @extractParams(params)))
 
+  # Public: Destroys the marker, causing it to emit the 'destroyed' event. Once
+  # destroyed, a marker cannot be restored by undo/redo operations.
   destroy: ->
     @destroyed = true
     @manager.removeMarker(@id)
     @emit 'destroyed'
 
+  # Private:
   extractParams: (params) ->
     params = @constructor.extractParams(params)
     params.properties = extend({}, @properties, params.properties) if params.properties?
     params
 
+  # Public: Compares this marker to another based on their ranges.
   compare: (other) ->
     @range.compare(other.range)
 

    Object.freeze(@properties)
    @updateIntervals()

  serializeParams: ->
    range = @range.serialize()
    {@id, range, @tailed, @reversed, @valid, @invalidate, @persistent, @properties}

  deserializeParams: (state) ->
    state.range = Range.deserialize(state.range)
    state

  getRange: ->
    @range

  setRange: (range, params) ->
    params = @extractParams(params)
    params.tailed = true
    params.range = @clipRange(Range.fromObject(range, true))
    @update(params)

  getHeadPosition: ->
    if @reversed
      @range.start
    else
      @range.end

  setHeadPosition: (position, params) ->
    position = @clipPosition(Point.fromObject(position, true))
    params = @extractParams(params)

    if @hasTail()
      if @isReversed()

    else
      false

  # Private: Adjusts the marker's start and end positions and possibly its
  # validity based on the given {BufferPatch}.
  handleBufferChange: (patch) ->
    {oldRange, newRange} = patch
    rowDelta = newRange.end.row - oldRange.end.row
