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

Definition of the Pager 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 pager_config_define_variables (struct NeoMutt *n, struct ConfigSet *cs)
 Define the Config Variables - Implements Module::config_define_variables()
 

Variables

struct ConfigDef PagerVars []
 Config definitions for the Pager.
 
const struct Module ModulePager
 Module for the Pager library.
 

Detailed Description

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

◆ pager_config_define_variables()

static bool pager_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 PagerVars[]
Config definitions for the Pager.
Definition config.c:43
+ Here is the call graph for this function:

Variable Documentation

◆ PagerVars

struct ConfigDef PagerVars[]
extern

Config definitions for the Pager.

Definition at line 43 of file config.c.

43 {
44 // clang-format off
45 { "allow_ansi", DT_BOOL, false, 0, NULL,
46 "Allow ANSI color codes in rich text messages"
47 },
48 { "display_filter", DT_STRING|D_STRING_COMMAND, 0, 0, NULL,
49 "External command to pre-process an email before display"
50 },
51 { "header_color_partial", DT_BOOL, false, 0, NULL,
52 "Only color the part of the header matching the regex"
53 },
54 { "markers", DT_BOOL, true, 0, NULL,
55 "Display a '+' at the beginning of wrapped lines in the pager"
56 },
57 { "pager", DT_STRING|D_STRING_COMMAND, 0, 0, NULL,
58 "External command for viewing messages, or empty to use NeoMutt's"
59 },
60 { "pager_context", DT_NUMBER|D_INTEGER_NOT_NEGATIVE, 0, 0, NULL,
61 "Number of lines of overlap when changing pages in the pager"
62 },
63 { "pager_format", DT_EXPANDO, IP "-%Z- %C/%m: %-20.20n %s%* -- (%P)", IP &IndexFormatDef, NULL,
64 "printf-like format string for the pager's status bar"
65 },
66 { "pager_index_lines", DT_NUMBER|D_INTEGER_NOT_NEGATIVE, 0, 0, NULL,
67 "Number of index lines to display above the pager"
68 },
69 { "pager_read_delay", DT_NUMBER|D_INTEGER_NOT_NEGATIVE, 0, 0, NULL,
70 "Number of seconds to wait before marking a message read"
71 },
72 { "pager_skip_quoted_context", DT_NUMBER|D_INTEGER_NOT_NEGATIVE, 0, 0, NULL,
73 "Lines of context to show when skipping quoted text"
74 },
75 { "pager_stop", DT_BOOL, false, 0, NULL,
76 "Don't automatically open the next message when at the end of a message"
77 },
78 { "prompt_after", DT_BOOL, true, 0, NULL,
79 "Pause after running an external pager"
80 },
81 { "search_context", DT_NUMBER|D_INTEGER_NOT_NEGATIVE, 0, 0, NULL,
82 "Context to display around search matches"
83 },
84 { "smart_wrap", DT_BOOL, true, 0, NULL,
85 "Wrap text at word boundaries"
86 },
87 { "smileys", DT_REGEX, IP "(>From )|(:[-^]?[][)(><}{|/DP])", 0, NULL,
88 "Regex to match smileys to prevent mistakes when quoting text"
89 },
90 { "tilde", DT_BOOL, false, 0, NULL,
91 "Display '~' in the pager after the end of the email"
92 },
93 { "toggle_quoted_show_levels", DT_NUMBER|D_INTEGER_NOT_NEGATIVE, 0, 0, NULL,
94 "Number of quote levels to show with toggle-quoted"
95 },
96
97 { "skip_quoted_offset", DT_SYNONYM, IP "pager_skip_quoted_context", IP "2021-06-18" },
98
99 { NULL },
100 // clang-format on
101};
const struct ExpandoDefinition IndexFormatDef[]
Expando definitions.
#define IP
Definition set.h:54
#define D_STRING_COMMAND
A command.
Definition types.h:99
@ DT_NUMBER
a number
Definition types.h:38
@ DT_BOOL
boolean option
Definition types.h:32
@ DT_SYNONYM
synonym for another variable
Definition types.h:45
@ DT_STRING
a string
Definition types.h:44
@ DT_EXPANDO
an expando
Definition types.h:34
@ DT_REGEX
regular expressions
Definition types.h:41
#define D_INTEGER_NOT_NEGATIVE
Negative numbers are not allowed.
Definition types.h:101

◆ ModulePager

const struct Module ModulePager
Initial value:
= {
"pager",
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
}
@ MODULE_ID_PAGER
ModulePager, Pager
Definition module_api.h:83
static bool pager_config_define_variables(struct NeoMutt *n, struct ConfigSet *cs)
Define the Config Variables - Implements Module::config_define_variables()
Definition module.c:40

Module for the Pager library.

Definition at line 48 of file module.c.

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