NeoMutt  2022-04-29-323-g5fcc6c
Teaching an old dog new tricks
DOXYGEN
config.c
Go to the documentation of this file.
1
29#include "config.h"
30#include <stddef.h>
31#include <config/lib.h>
32#include <stdbool.h>
33
34static struct ConfigDef PagerVars[] = {
35 // clang-format off
36 { "allow_ansi", DT_BOOL, false, 0, NULL,
37 "Allow ANSI colour codes in rich text messages"
38 },
39 { "header_color_partial", DT_BOOL|R_PAGER_FLOW, false, 0, NULL,
40 "Only colour the part of the header matching the regex"
41 },
42 { "pager_context", DT_NUMBER|DT_NOT_NEGATIVE, 0, 0, NULL,
43 "Number of lines of overlap when changing pages in the pager"
44 },
45 { "pager_index_lines", DT_NUMBER|DT_NOT_NEGATIVE|R_PAGER, 0, 0, NULL,
46 "Number of index lines to display above the pager"
47 },
48 { "pager_read_delay", DT_NUMBER|DT_NOT_NEGATIVE, 0, 0, NULL,
49 "Number of seconds to wait before marking a message read"
50 },
51 { "pager_skip_quoted_context", DT_NUMBER|DT_NOT_NEGATIVE, 0, 0, NULL,
52 "Lines of context to show when skipping quoted text"
53 },
54 { "pager_stop", DT_BOOL, false, 0, NULL,
55 "Don't automatically open the next message when at the end of a message"
56 },
57 { "search_context", DT_NUMBER|DT_NOT_NEGATIVE, 0, 0, NULL,
58 "Context to display around search matches"
59 },
60 { "smart_wrap", DT_BOOL|R_PAGER_FLOW, true, 0, NULL,
61 "Wrap text at word boundaries"
62 },
63 { "smileys", DT_REGEX|R_PAGER, IP "(>From )|(:[-^]?[][)(><}{|/DP])", 0, NULL,
64 "Regex to match smileys to prevent mistakes when quoting text"
65 },
66 { "tilde", DT_BOOL|R_PAGER, false, 0, NULL,
67 "Display '~' in the pager after the end of the email"
68 },
69
70 { "skip_quoted_offset", DT_SYNONYM, IP "pager_skip_quoted_context", IP "2021-06-18" },
71
72 { NULL },
73 // clang-format on
74};
75
80{
81 return cs_register_variables(cs, PagerVars, 0);
82}
Convenience wrapper for the config headers.
bool config_init_pager(struct ConfigSet *cs)
Register pager config variables - Implements module_init_config_t -.
Definition: config.c:79
static struct ConfigDef PagerVars[]
Definition: config.c:34
bool cs_register_variables(const struct ConfigSet *cs, struct ConfigDef vars[], uint32_t flags)
Register a set of config items.
Definition: set.c:276
#define IP
Definition: set.h:54
Definition: set.h:64
Container for lots of config items.
Definition: set.h:260
#define DT_BOOL
boolean option
Definition: types.h:30
#define R_PAGER
Redraw the pager menu.
Definition: types.h:66
#define R_PAGER_FLOW
Reflow lines and redraw the pager menu.
Definition: types.h:67
#define DT_SYNONYM
synonym for another variable
Definition: types.h:42
#define DT_NOT_NEGATIVE
Negative numbers are not allowed.
Definition: types.h:47
#define DT_REGEX
regular expressions
Definition: types.h:38
#define DT_NUMBER
a number
Definition: types.h:35