*/
#include <lib-lib/lib-lib.h>
+#include <lib-lua/lib-lua.h>
#include <lib-ui/curses.h>
#include <lib-mx/mx.h>
#include <lib-mx/compress.h>
p_delete(&token.data);
current_hook_type = 0;
+
+ {
+ lua_State *L = luaM_getruntime();
+ lua_getfield(L, LUA_GLOBALSINDEX, "MCore");
+ lua_getfield(L, -1, "folder_hook");
+ lua_remove(L, -2);
+ if (lua_isfunction(L, -1)) {
+ lua_pushstring(L, LastFolder);
+ lua_pushstring(L, CurrentFolder);
+ lua_pcall(L, 2, 0, 0);
+ } else {
+ lua_pop(L, 1);
+ }
+ }
}
char *mutt_find_hook (int type, const char *pat)
p_delete(&token.data);
}
+
+/* vim:set ft=c: */
void luaM_initialize(void);
void luaM_shutdown(void);
+lua_State *luaM_getruntime(void);
+
int luaM_dofile(const char *filename);
int luaM_wrap(void (*errfun)(const char *fmt, ...)
__attribute__((format(printf, 1, 2))),