*/
#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)
mutt_safe_path (buf, sizeof (buf), adr);
mutt_concat_path(path, pathlen, NONULL(Maildir), buf);
if (!option (OPTFORCENAME) && mx_access (path, W_OK) != 0)
- m_strcpy(path, pathlen, NONULL(Outbox));
+ m_strcpy(path, pathlen, NONULL(MAlias.record));
}
else
- m_strcpy(path, pathlen, NONULL(Outbox));
+ m_strcpy(path, pathlen, NONULL(MAlias.record));
}
mutt_pretty_mailbox (path);
}