src/language/LanguageManager.js
function _setLanguageForMode(mode, language) {
        if (_modeToLanguageMap[mode]) {
            console.warn("CodeMirror mode \"" + mode + "\" is already used by language " + _modeToLanguageMap[mode]._name + " - cannot fully register language " + language._name +
                         " using the same mode. Some features will treat all content with this mode as language " + _modeToLanguageMap[mode]._name);
            return;
        }

        _modeToLanguageMap[mode] = language;
    }
function _setLanguageForMode(mode, language) {
        if (_modeToLanguageMap[mode]) {
            console.warn("CodeMirror mode \"" + mode + "\" is already used by language " + _modeToLanguageMap[mode]._name + " - cannot fully register language " + language._name +
                         " using the same mode. Some features will treat all content with this mode as language " + _modeToLanguageMap[mode]._name);
            return;
        }

        _modeToLanguageMap[mode] = language;
    }
function _setLanguageForMode ( mode , language ) { if ( _modeToLanguageMap [ mode ] ) { console . warn ( "CodeMirror mode \"" + mode + "\" is already used by language " + _modeToLanguageMap [ mode ] . _name + " - cannot fully register language " + language . _name + " using the same mode. Some features will treat all content with this mode as language " + _modeToLanguageMap [ mode ] . _name ) ; return ; } _modeToLanguageMap [ mode ] = language ; }
Adds a global mode-to-language association.
@param {!string} mode The mode to associate the language with
@param {!Language} language The language to associate with the mode
Adds a global mode - to - language association .