#include "alias.h"
#include "mutt_idna.h"
#include "sort.h"
-
-@type bool = {
- .kind = 'b';
- .ctype = unsigned : 1;
-};
-
-@type string_t = {
- .kind = 's';
- .ctype = char *;
- .dtor = p_delete($$);
- .ctor = m_strdup($$);
-};
-
-@type path_t = {
- .kind = 's';
- .ctype = char *;
- .dtor = p_delete($$);
- .ctor = luaM_pathnew($$);
-};
-
-@type quadopt_t = {
- .kind = 'i';
- .check = luaM_checkquadopt($L, $$);
- .ctype = unsigned : 2;
-};
-
-static @package MAlias {
+@import "lib-lua/base.cpkg"
+
+@static_package MAlias {
+ /*
+ ** .pp
+ ** Specifies the format of the data displayed for the ``alias'' menu. The
+ ** following \fTprintf(3)\fP-style sequences are available:
+ ** .pp
+ ** .dl
+ ** .dt %a .dd alias name
+ ** .dt %f .dd flags - currently, a "d" for an alias marked for deletion
+ ** .dt %n .dd index number
+ ** .dt %r .dd address which alias expands to
+ ** .dt %t .dd character which indicates if the alias is tagged for inclusion
+ ** .de
+ */
string_t alias_format = m_strdup("%4n %2f %t %-10a %r");
+ /*
+ ** .pp
+ ** The default file in which to save aliases created by the
+ ** ``$create-alias'' function.
+ ** .pp
+ ** \fBNote:\fP Madmutt will not automatically source this file; you must
+ ** explicitly use the ``$source'' command for it to be executed.
+ */
path_t alias_file = m_strdup("~/.madmutt/aliases");
-} MAlias;
+};
alias_t *Aliases;
last = address_list_append(last, pop);
}
- if (option(OPTUSEDOMAIN)) {
+ if (MCore.use_domain) {
/* now qualify all local addresses */
rfc822_qualify(head, mutt_fqdn(1));
}