code: function indenter(state,textAfter) {
      var t;
      var unit = cmCfg.indentUnit;
      var wordAfter = wordafter(textAfter);
      var currT = peekToken(state,1);
      var prevT = peekToken(state,2);
  
      if (state.in_string || state.in_atom) {
        return CodeMirror.Pass;
      }else if (!prevT) {
        return 0;
      }else if (currT.token == "when") {
        return currT.column+unit;
      }else if (wordAfter === "when" && prevT.type === "function") {
        return prevT.indent+unit;
      }else if (wordAfter === "(" && currT.token === "fun") {
        return  currT.column+3;
      }else if (wordAfter === "catch" && (t = getToken(state,["try"]))) {
        return t.column;
      }else if (is_member(wordAfter,["end","after","of"])) {
        t = getToken(state,["begin","case","fun","if","receive","try"]);
        return t ? t.column : CodeMirror.Pass;
      }else if (is_member(wordAfter,closeParenWords)) {
        t = getToken(state,openParenWords);
        return t ? t.column : CodeMirror.Pass;
      }else if (is_member(currT.token,[",","|","||"]) ||
                is_member(wordAfter,[",","|","||"])) {
        t = postcommaToken(state);
        return t ? t.column+t.token.length : unit;
      }else if (currT.token == "->") {
        if (is_member(prevT.token, ["receive","case","if","try"])) {
          return prevT.column+unit+unit;
        }else{
          return prevT.column+unit;
        }
      }else if (is_member(currT.token,openParenWords)) {
        return currT.column+currT.token.length;
      }else{
        t = defaultToken(state);
        return truthy(t) ? t.column+unit : 0;
      }
    }
docs: /////////////////////////////////////////////////////////////////////////// indenter