NeoMutt  2025-12-11-435-g4ac674
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
module.c File Reference

Definition of the Lua Module. More...

#include "config.h"
#include <stdbool.h>
#include <stddef.h>
#include "core/lib.h"
+ Include dependency graph for module.c:

Go to the source code of this file.

Functions

static bool lua_commands_register (struct NeoMutt *n, struct CommandArray *ca)
 Register NeoMutt Commands - Implements Module::commands_register()
 

Variables

const struct Command LuaCommands []
 List of NeoMutt commands to register.
 
const struct Module ModuleLua
 Module for the Lua library.
 

Detailed Description

Definition of the Lua Module.

Authors
  • Richard Russon

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file module.c.

Function Documentation

◆ lua_commands_register()

static bool lua_commands_register ( struct NeoMutt * n,
struct CommandArray * ca )
static

Register NeoMutt Commands - Implements Module::commands_register()

Definition at line 39 of file module.c.

40{
42}
bool commands_register(struct CommandArray *ca, const struct Command *cmds)
Add commands to Commands array.
Definition command.c:51
const struct Command LuaCommands[]
List of NeoMutt commands to register.
Definition commands.c:149
+ Here is the call graph for this function:

Variable Documentation

◆ LuaCommands

const struct Command LuaCommands[]
extern

List of NeoMutt commands to register.

Definition at line 149 of file commands.c.

149 {
150 // clang-format off
151 { "lua", CMD_LUA, parse_lua,
152 N_("Run a Lua expression or call a Lua function"),
153 N_("lua <lua-command>"),
154 "optionalfeatures.html#lua" },
155 { "lua-source", CMD_LUA_SOURCE, parse_lua_source,
156 N_("Execute a Lua script file"),
157 N_("lua-source <filename>"),
158 "optionalfeatures.html#lua" },
159
160 { NULL, CMD_NONE, NULL, NULL, NULL, NULL, CF_NO_FLAGS },
161 // clang-format on
162};
#define CF_NO_FLAGS
No flags are set.
Definition command.h:48
@ CMD_LUA_SOURCE
:lua-source
Definition command.h:89
@ CMD_LUA
:lua
Definition command.h:88
@ CMD_NONE
No Command.
Definition command.h:59
enum CommandResult parse_lua_source(const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe)
Parse the 'lua-source' command - Implements Command::parse() -.
Definition commands.c:100
enum CommandResult parse_lua(const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe)
Parse the 'lua' command - Implements Command::parse() -.
Definition commands.c:57
#define N_(a)
Definition message.h:32

◆ ModuleLua

const struct Module ModuleLua
Initial value:
= {
"lua",
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
}
static bool lua_commands_register(struct NeoMutt *n, struct CommandArray *ca)
Register NeoMutt Commands - Implements Module::commands_register()
Definition module.c:39
@ MODULE_ID_LUA
ModuleLua, Integrated Lua scripting
Definition module_api.h:74

Module for the Lua library.

Definition at line 47 of file module.c.

47 {
49 "lua",
50 NULL, // init
51 NULL, // config_define_types
52 NULL, // config_define_variables
54 NULL, // gui_init
55 NULL, // gui_cleanup
56 NULL, // cleanup
57};