NeoMutt  2024-10-02-37-gfa9146
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
config.c
Go to the documentation of this file.
1
30#include "config.h"
31#include <stdbool.h>
32#include <stddef.h>
33#include "mutt/lib.h"
34#include "config/lib.h"
35#include "expando/lib.h"
36#include "shared_data.h"
37
38#ifndef ISPELL
39#define ISPELL "ispell"
40#endif
41
48static const struct ExpandoDefinition ComposeFormatDef[] = {
49 // clang-format off
53 { "a", "attach-count", ED_COMPOSE, ED_COM_ATTACH_COUNT, E_TYPE_STRING, NULL },
54 { "h", "hostname", ED_GLOBAL, ED_GLO_HOSTNAME, E_TYPE_STRING, NULL },
55 { "l", "attach-size", ED_COMPOSE, ED_COM_ATTACH_SIZE, E_TYPE_STRING, NULL },
56 { "v", "version", ED_GLOBAL, ED_GLO_VERSION, E_TYPE_STRING, NULL },
57 { NULL, NULL, 0, -1, -1, NULL }
58 // clang-format on
59};
60
64static struct ConfigDef ComposeVars[] = {
65 // clang-format off
66 { "compose_confirm_detach_first", DT_BOOL, true, 0, NULL,
67 "Prevent the accidental deletion of the composed message"
68 },
69 // L10N: $compose_format default format
70 { "compose_format", DT_EXPANDO|D_L10N_STRING, IP N_("-- NeoMutt: Compose [Approx. msg size: %l Atts: %a]%>-"), IP &ComposeFormatDef, NULL,
71 "printf-like format string for the Compose panel's status bar"
72 },
73 { "compose_show_user_headers", DT_BOOL, true, 0, NULL,
74 "Controls whether or not custom headers are shown in the compose envelope"
75 },
76 { "copy", DT_QUAD, MUTT_YES, 0, NULL,
77 "Save outgoing emails to $record"
78 },
79 { "edit_headers", DT_BOOL, false, 0, NULL,
80 "Let the user edit the email headers whilst editing an email"
81 },
82 { "ispell", DT_STRING|D_STRING_COMMAND, IP ISPELL, 0, NULL,
83 "External command to perform spell-checking"
84 },
85 { "postpone", DT_QUAD, MUTT_ASKYES, 0, NULL,
86 "Save messages to the `$postponed` folder"
87 },
88 { NULL },
89 // clang-format on
90};
91
96{
98}
static struct ConfigDef ComposeVars[]
Config definitions for compose.
Definition: config.c:64
#define ISPELL
Definition: config.c:39
static const struct ExpandoDefinition ComposeFormatDef[]
Expando definitions.
Definition: config.c:48
@ ED_COM_ATTACH_COUNT
ComposeAttachData, num_attachments()
Definition: shared_data.h:56
@ ED_COM_ATTACH_SIZE
ComposeAttachData, cum_attachs_size()
Definition: shared_data.h:57
Convenience wrapper for the config headers.
bool cs_register_variables(const struct ConfigSet *cs, struct ConfigDef vars[])
Register a set of config items.
Definition: set.c:281
#define IP
Definition: set.h:54
@ E_TYPE_STRING
Data is a string.
Definition: definition.h:37
@ ED_COMPOSE
Compose ED_COM_ ExpandoDataCompose.
Definition: domain.h:39
@ ED_GLOBAL
Global ED_GLO_ ExpandoDataGlobal.
Definition: domain.h:44
Parse Expando string.
bool config_init_compose(struct ConfigSet *cs)
Register compose config variables - Implements module_init_config_t -.
Definition: config.c:95
struct ExpandoNode * node_padding_parse(const char *str, int did, int uid, ExpandoParserFlags flags, const char **parsed_until, struct ExpandoParseError *err)
Parse a Padding Expando - Implements ExpandoDefinition::parse() -.
Definition: node_padding.c:234
Data shared between Index, Pager and Sidebar.
Convenience wrapper for the library headers.
#define N_(a)
Definition: message.h:32
@ MUTT_ASKYES
Ask the user, defaulting to 'Yes'.
Definition: quad.h:41
@ MUTT_YES
User answered 'Yes', or assume 'Yes'.
Definition: quad.h:39
Definition: set.h:64
Container for lots of config items.
Definition: set.h:252
Definition of a format string.
Definition: definition.h:52
#define D_STRING_COMMAND
A command.
Definition: types.h:99
#define D_L10N_STRING
String can be localised.
Definition: types.h:82
@ DT_BOOL
boolean option
Definition: types.h:32
@ DT_QUAD
quad-option (no/yes/ask-no/ask-yes)
Definition: types.h:41
@ DT_STRING
a string
Definition: types.h:45
@ DT_EXPANDO
an expando
Definition: types.h:34
@ ED_GLO_PADDING_EOL
Padding to end-of-line.
Definition: uid.h:36
@ ED_GLO_VERSION
NeoMutt version.
Definition: uid.h:43
@ ED_GLO_PADDING_HARD
Hard Padding.
Definition: uid.h:37
@ ED_GLO_PADDING_SOFT
Soft Padding.
Definition: uid.h:38
@ ED_GLO_HOSTNAME
Local hostname.
Definition: uid.h:35