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

Definition of the History Module. More...

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

Go to the source code of this file.

Functions

static bool history_config_define_variables (struct NeoMutt *n, struct ConfigSet *cs)
 Define the Config Variables - Implements Module::config_define_variables()
 

Variables

struct ConfigDef HistoryVars []
 Config definitions for the command history.
 
const struct Module ModuleHistory
 Module for the History library.
 

Detailed Description

Definition of the History 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

◆ history_config_define_variables()

static bool history_config_define_variables ( struct NeoMutt * n,
struct ConfigSet * cs )
static

Define the Config Variables - Implements Module::config_define_variables()

Definition at line 40 of file module.c.

41{
43}
bool cs_register_variables(const struct ConfigSet *cs, struct ConfigDef vars[])
Register a set of config items.
Definition set.c:290
struct ConfigDef HistoryVars[]
Config definitions for the command history.
Definition config.c:56
+ Here is the call graph for this function:

Variable Documentation

◆ HistoryVars

struct ConfigDef HistoryVars[]
extern

Config definitions for the command history.

Definition at line 56 of file config.c.

56 {
57 // clang-format off
58 { "history", DT_NUMBER|D_INTEGER_NOT_NEGATIVE, 10, 0, NULL,
59 "Number of history entries to keep in memory per category"
60 },
61 { "history_file", DT_PATH|D_PATH_FILE, IP "~/.mutthistory", 0, NULL,
62 "File to save history in"
63 },
64 { "history_format", DT_EXPANDO, IP "%s", IP &HistoryFormatDef, NULL,
65 "printf-like format string for the history menu"
66 },
67 { "history_remove_dups", DT_BOOL, false, 0, NULL,
68 "Remove duplicate entries from the history"
69 },
70 { "save_history", DT_NUMBER|D_INTEGER_NOT_NEGATIVE, 0, 0, NULL,
71 "Number of history entries to save per category"
72 },
73 { NULL },
74 // clang-format on
75};
#define IP
Definition set.h:54
static const struct ExpandoDefinition HistoryFormatDef[]
Expando definitions.
Definition config.c:42
#define D_PATH_FILE
Path is a file.
Definition types.h:104
@ DT_NUMBER
a number
Definition types.h:38
@ DT_BOOL
boolean option
Definition types.h:32
@ DT_EXPANDO
an expando
Definition types.h:34
@ DT_PATH
a path to a file/directory
Definition types.h:39
#define D_INTEGER_NOT_NEGATIVE
Negative numbers are not allowed.
Definition types.h:101

◆ ModuleHistory

const struct Module ModuleHistory
Initial value:
= {
"history",
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
}
static bool history_config_define_variables(struct NeoMutt *n, struct ConfigSet *cs)
Define the Config Variables - Implements Module::config_define_variables()
Definition module.c:40
@ MODULE_ID_HISTORY
ModuleHistory, History
Definition module_api.h:69

Module for the History library.

Definition at line 48 of file module.c.

48 {
50 "history",
51 NULL, // init
52 NULL, // config_define_types
54 NULL, // commands_register
55 NULL, // gui_init
56 NULL, // gui_cleanup
57 NULL, // cleanup
58};