Signed-off-by: Pierre Habouzit <madcoder@debian.org>
WHERE char *FileCharset;
WHERE char *FolderFormat;
WHERE char *ForwFmt;
WHERE char *FileCharset;
WHERE char *FolderFormat;
WHERE char *ForwFmt;
WHERE char *HdrFmt;
WHERE char *ImapAuthenticators INITVAL (NULL);
WHERE char *HdrFmt;
WHERE char *ImapAuthenticators INITVAL (NULL);
*/
#include <lib-lib/lib-lib.h>
*/
#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>
#include <lib-ui/curses.h>
#include <lib-mx/mx.h>
#include <lib-mx/compress.h>
p_delete(&token.data);
current_hook_type = 0;
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)
}
char *mutt_find_hook (int type, const char *pat)
void luaM_initialize(void);
void luaM_shutdown(void);
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))),
int luaM_dofile(const char *filename);
int luaM_wrap(void (*errfun)(const char *fmt, ...)
__attribute__((format(printf, 1, 2))),
+lua_State *luaM_getruntime(void)
+{
+ return L;
+}
int luaM_dofile(const char *filename)
{
int luaM_dofile(const char *filename)
{