   Section: Syntatic Queries
   ###
 
-  # Public: Get the syntactic scopes for the given position in buffer
+  # Essential: Get the syntactic scopes for the given position in buffer
   # coordinates.
   #
   # For example, if called with a position inside the parameter list of an

  # Returns an {Array} of {String}s.
  scopesForBufferPosition: (bufferPosition) -> @displayBuffer.scopesForBufferPosition(bufferPosition)

  # Public: Get the range in buffer coordinates of all tokens surrounding the
  # cursor that match the given scope selector.
  #
  # For example, if you wanted to find the string surrounding the cursor, you

  bufferRangeForScopeAtCursor: (selector) ->
    @displayBuffer.bufferRangeForScopeAtPosition(selector, @getCursorBufferPosition())

  # Public: Get the syntactic scopes for the most recently added cursor's
  # position. See {::scopesForBufferPosition} for more information.
  #
  # Returns an {Array} of {String}s.
  scopesAtCursor: -> @getLastCursor().getScopes()
  getCursorScopes: ->
    deprecate 'Use Editor::scopesAtCursor() instead'
    @scopesAtCursor()

  logCursorScope: ->
    console.log @getCursorScopes()

  # {Delegates to: DisplayBuffer.tokenForBufferPosition}
  tokenForBufferPosition: (bufferPosition) -> @displayBuffer.tokenForBufferPosition(bufferPosition)

  # Extended: Determine if the given row is entirely a comment
  isBufferRowCommented: (bufferRow) ->
    if match = @lineTextForBufferRow(bufferRow).match(/\S/)
      scopes = @tokenForBufferPosition([bufferRow, match.index]).scopes
      @commentScopeSelector ?= new TextMateScopeSelector('comment.*')
      @commentScopeSelector.matches(scopes)

  ###
  Section: Clipboard Operations
