function makeKeywords(str) {
    var obj = {}, words = str.split(" ");
    for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
    return obj;
  }
Author: Gautam Mehta
Branched from CodeMirror's Scheme mode