--- lparser.c	(lua 5.2.2)
+++ lparser.c	(8/18/2013)
@@ -895,12 +895,15 @@
   }
 }
 
+static void throw_newline_error(LexState *ls) {
+  luaX_syntaxerror(ls, "dangerous formatting: '(' starts a new line inside a multi-call statement.");
+}
 
 static void suffixedexp (LexState *ls, expdesc *v) {
   /* suffixedexp ->
        primaryexp { '.' NAME | '[' exp ']' | ':' NAME funcargs | funcargs } */
   FuncState *fs = ls->fs;
-  int line = ls->linenumber;
+  int line = ls->linenumber, funcall=0, danger=0;;
   primaryexp(ls, v);
   for (;;) {
     switch (ls->t.token) {
@@ -918,12 +921,18 @@
       case ':': {  /* `:' NAME funcargs */
         expdesc key;
         luaX_next(ls);
+        if(danger && funcall) throw_newline_error(ls);
+        funcall=1;
         checkname(ls, &key);
         luaK_self(fs, v, &key);
         funcargs(ls, v, line);
         break;
       }
-      case '(': case TK_STRING: case '{': {  /* funcargs */
+      case '(': 
+        if(ls->linenumber != ls->lastline) danger=1; 
+      case TK_STRING: case '{': {  /* funcargs */
+        if(danger && funcall) throw_newline_error(ls);
+        funcall=1;
         luaK_exp2nextreg(fs, v);
         funcargs(ls, v, line);
         break;
@@ -1240,7 +1249,7 @@
   whileinit = luaK_getlabel(fs);
   condexit = cond(ls);
   enterblock(fs, &bl, 1);
-  checknext(ls, TK_DO);
+  testnext(ls, TK_DO);
   block(ls);
   luaK_jumpto(fs, whileinit);
   check_match(ls, TK_END, TK_WHILE, line);
@@ -1286,7 +1295,7 @@
   FuncState *fs = ls->fs;
   int prep, endfor;
   adjustlocalvars(ls, 3);  /* control variables */
-  checknext(ls, TK_DO);
+  testnext(ls, TK_DO);
   prep = isnum ? luaK_codeAsBx(fs, OP_FORPREP, base, NO_JUMP) : luaK_jump(fs);
   enterblock(fs, &bl, 0);  /* scope for declared variables */
   adjustlocalvars(ls, nvars);
@@ -1379,7 +1388,7 @@
   int jf;  /* instruction to skip 'then' code (if condition is false) */
   luaX_next(ls);  /* skip IF or ELSEIF */
   expr(ls, &v);  /* read condition */
-  checknext(ls, TK_THEN);
+  testnext(ls, TK_THEN);
   if (ls->t.token == TK_GOTO || ls->t.token == TK_BREAK) {
     luaK_goiffalse(ls->fs, &v);  /* will jump to label if condition is true */
     enterblock(fs, &bl, 0);  /* must enter block before 'goto' */
