     haveFindNearestEnemy = false
     haveFindNearest = false
     autocompleteReplacement = level.get("autocompleteReplacement") ? []
+    usedAutocompleteReplacement = []
     for group, props of e.propGroups
       for prop in props
         if _.isString prop  # organizePalette

    if haveFindNearest and not haveFindNearestEnemy
      spellView.translateFindNearest()

    # window.AutocompleteInstance = @Autocomplete  # For debugging. Make sure to not leave active when committing.
    # window.snippetEntries = snippetEntries
    lang = aceUtils.aceEditModes[e.language].substr 'ace/mode/'.length

        if doc?.snippets?[e.language]
          name = doc.name
          replacement = _.find(autocompleteReplacement, (el) -> el.name is name)
          if replacement
            usedAutocompleteReplacement.push(replacement.name)
          content = replacement?.snippets?[e.language]?.code or doc.snippets[e.language].code
          if /loop/.test(content) and level.get 'moveRightLoopSnippet'
            # Replace default loop snippet with an embedded moveRight()
