Warning: this is an htmlized version!
The original is across this link,
and the conversion rules are here.
patch -p0 src/lua/lua.c <<'%%%'
307a308,337
> 
>     /* This block by Edrx.
>      * «lua.c-argpatch» (find-es "lua5" "argpatch")
>      */
>     i=1;
>     while (argv[i]) {
>       if (argv[i][0]=='-') {
> 	switch (argv[i][1]) {
>         case '\0': case '-':
>           i++; goto makeargarray; /* this was the last lua arg */
>         case 'e': case 'l':
>           i += (argv[i][1]=='\0')?2:1; break; /* keep skipping */
>         case 'i': case 'v': case 'c': case 's':
>           i++; break; /* keep skipping */
>         default:
>           goto dontmakeargarray; /* bad args, lua is going to puke */
> 	}
>       } else {
> 	goto makeargarray;
>       }
>     }
>   makeargarray:
>     if (argv[i]) {
>       getargs(argv, i);  /* build the array `arg' BEFORE doing the options */
>       lua_setglobal(L, "arg");
>     }
>   dontmakeargarray:
>     /* End of the edrxisms.
>      */
> 
365,366c395,401
<       getargs(argv, i);  /* collect arguments */
<       lua_setglobal(L, "arg");
---
> 
>       /* This block commented out by Edrx: the call to getargs was moved up.
>        * «lua.c-argpatch2» (find-angg "lua5" "argpatch")
>        * getargs(argv, i);  /:* collect arguments *:/
>        * lua_setglobal(L, "arg");
>        */
> 
%%%