       length = (el) -> el.element.innerHTML?.length ? 0
       elements.sort (a,b) -> length(a) - length b
     hintMarkers = (@createMarkerFor(el) for el in elements)
-    @markerMatcher = if Settings.get("filterLinkHints") then filterHints else alphabetHints
-    @markerMatcher.fillInMarkers(hintMarkers)
+    @markerMatcher = new (if Settings.get "filterLinkHints" then FilterHints else AlphabetHints)
+    @markerMatcher.fillInMarkers hintMarkers
 
     @hintMode = new Mode
       name: "hint/#{mode.name}"

  #
  showMarker: (linkMarker, matchingCharCount) ->
    linkMarker.style.display = ""
    # TODO(philc):
    for j in [0...linkMarker.childNodes.length]
      if (j < matchingCharCount)
        linkMarker.childNodes[j].classList.add("matchingCharacter")

  # 'callback' is invoked (if it is provided).
  deactivateMode: (delay, callback) ->
    deactivate = =>
      DomUtils.removeElement @hintMarkerContainingDiv if @hintMarkerContainingDiv
      @hintMarkerContainingDiv = null
      @markerMatcher = null
      @isActive = false
      @hintMode?.exit()
      @hintMode = null
