       /^entity\.name\.function/.test(scope)
     else
       /^meta\.function\./.test(scope)
-
-isIncludeFunctionScopeForRow = (editor, row) ->
-  scopes = getScopesForBufferRow(editor, row)
-  scopes.some (scope) ->
-    isFunctionScope(editor, scope)
 
 # Debugging purpose
 # -------------------------

  getBufferRangeForRowRange
  getFirstCharacterColumForBufferRow
  cursorIsAtFirstCharacter
  getScopesForBufferRow
  isFunctionScope
  isIncludeFunctionScopeForRow


    editor.bufferRangeForBufferRow(row, includeNewline: true)
  rangeStart.union(rangeEnd)

getTokenizedLines = (editor) ->
  editor.displayBuffer.getTokenizedLines()

getScopesForTokenizedLine = (line) ->
  for tag in line.tags when tag < 0 and (tag % 2 is -1)
    atom.grammars.scopeForId(tag)

isIncludeFunctionScopeForRow = (editor, row) ->
  # [FIXME] Bug of upstream?
  # Sometime tokenizedLines length is less than last buffer row.
  # So tokenizedLine is not accessible even if valid row.
  # In that case I simply return empty Array.
  if tokenizedLine = getTokenizedLines(editor)[row]
    getScopesForTokenizedLine(tokenizedLine).some (scope) ->
      isFunctionScope(editor, scope)
  else
    false

# [FIXME] very rough state, need improvement.
isFunctionScope = (editor, scope) ->
