title: Codemirror adding keywords on the fly for syntax highlight
body: <p>I am currently adding a new language mode in CodeMirror for my current project. This is a proprietary language in which user can create a new keyword. Basically I am trying to update existing keyword list at the runtime and my syntax highlighter can pick this new keyword.</p>
  
  <pre><code>var mode = editor.doc.modeOption;
          if(mode === "dmsrl") mode = "text/dmsrl";
          var keyWords = CodeMirror.resolveMode(mode).keywords;
          keyWords[x]=true;
  </code></pre>
  
  <p>I am currently trying to add new keyword like above, but somehow the list is not getting updated and new keyword is unavailable in my tokebase() method.</p>
  
  <p>Any help would be appreciated. </p>