     #CodeMirror.defineExtension 'setLine', (n, value) ->
     #    @replaceRange()
 
-FONT_FACES = buttonbar.FONT_FACES
-
 cm_start_end = (selection) ->
     {head, anchor} = selection
     start = head

                    return src.slice(0,i) + src.slice(i+left.length,j) + src.slice(j+right.length)

        selections = cm.listSelections()
        #selections.reverse()
        for selection in selections
            mode = canonical_mode(cm.getModeAt(selection.head).name)

        CodeMirror.registerHelper("hint", "stex", tex_hint)


    CodeMirror.defineExtension 'get_edit_mode', (opts) ->
        opts = defaults opts, {}
        cm = @
