lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


>- Would it be hard to get a better function history, like say in bash or ocaml,
>ie getting back the whole function instead of the last line?

This is easy. In function load_string do the following:
- remove "save_line(buffer);"
- add "save_line(lua_tostring(L, 3));" before "lua_remove(L, 3);".

>- Is there a way to load a default file with interactive lua (kind of a ".lua")
>where one could put all the std library?

Make a script mylua as follows:

	#!/bin/sh
	exec lua mylib.lua $*

or hack lua.c to do this in main or openstdlibs.
--lhf