after executing hooks.lua, luaL_dofile leaves an eventual error message on the 
stack,
but this error is not printed by elinks; this patch fixes the problem

whitout this, an error in hooks.lua only causes "sleep(3)" to give the user the
time to read the error message, but the error message itself is not printed

diff -Naur elinks-0.13-20170505/src/scripting/lua/core.c 
elinks-0.13-modified/src/scripting/lua/core.c
--- elinks-0.13-20170505/src/scripting/lua/core.c    2017-03-06 
21:47:40.000000000 +0100
+++ elinks-0.13-modified/src/scripting/lua/core.c    2017-05-05 
11:46:49.148864299 +0200
@@ -660,8 +660,10 @@
     if (file_can_read(file)) {
         int oldtop = lua_gettop(S);
 
-        if (luaL_dofile(S, file) != 0)
+        if (luaL_dofile(S, file) != 0) {
+            printf("%s: %s\n", file, lua_tostring(L, -1));
             sleep(3); /* Let some time to see error messages. */
+        }
         lua_settop(S, oldtop);
     }
 

-- 
http://lists.linuxfromscratch.org/listinfo/elinks-dev
Unsubscribe: See the above information page

Reply via email to