-
-/* Deletes all hooks of type ``type'', or all defined hooks if ``type'' is 0 */
-void mutt_folder_hook (char *path)
-{
- lua_State *L = luaM_getruntime();
- lua_getglobal(L, "mod_core"); /* push mod_core 1 */
- lua_getfield(L, -1, "folder_hook"); /* push folder_hook() 2 */
- if (lua_isfunction(L, -1)) {
- lua_pushstring(L, LastFolder);
- lua_pushstring(L, CurrentFolder);
- if (lua_pcall(L, 2, 0, 0)) {
- lua_pop(L, 3);
- return;
- }
- }
- lua_pop(L, 2);
-}