From 4956024f0d540c5dd689444113307fa7f9dd4067 Mon Sep 17 00:00:00 2001 From: Pierre Habouzit Date: Mon, 2 Apr 2007 00:41:21 +0200 Subject: [PATCH] Make MAlias public. migrate $signature, so that I can test the new MCore.folder_hook properly \o/ Signed-off-by: Pierre Habouzit --- alias.cpkg | 11 ++++++++++- alias.h | 3 +-- globals.h | 1 - init.h | 8 -------- lib-lua/lua-token.sh | 1 + send.c | 2 +- tools/Makefile | 6 ++++-- 7 files changed, 17 insertions(+), 15 deletions(-) diff --git a/alias.cpkg b/alias.cpkg index d1b536c..8823875 100644 --- a/alias.cpkg +++ b/alias.cpkg @@ -42,7 +42,7 @@ static rx_t *Alternates = NULL, *UnAlternates = NULL; rx_t *MailLists = NULL, *UnMailLists = NULL; rx_t *SubscribedLists = NULL, *UnSubscribedLists = NULL; -@static_package MAlias { +@package MAlias { /* ** .pp ** Specifies the format of the data displayed for the ``alias'' menu. The @@ -67,6 +67,15 @@ rx_t *SubscribedLists = NULL, *UnSubscribedLists = NULL; */ path_t alias_file = m_strdup("~/.madmutt/aliases"); + /* + ** .pp + ** Specifies the filename of your signature, which is appended to all + ** outgoing messages. If the filename ends with a pipe (``\fT|\fP''), it is + ** assumed that filename is a shell command and input should be read from + ** its stdout. + */ + path_t signature = m_strdup("~/.signature"); + void alternates(rx_t rx) { rx_list_remove(&UnAlternates, rx); rx_list_add(&Alternates, rx); diff --git a/alias.h b/alias.h index f785022..de39368 100644 --- a/alias.h +++ b/alias.h @@ -29,11 +29,10 @@ #include #include +#include "alias.li" #include -int luaopen_MAlias(lua_State *L); - typedef struct alias_t { struct alias_t *next; char *name; diff --git a/globals.h b/globals.h index 7f6cf96..f015651 100644 --- a/globals.h +++ b/globals.h @@ -105,7 +105,6 @@ WHERE char *Realname; WHERE char *SidebarDelim; WHERE char *SidebarNumberFormat; WHERE char *SidebarBoundary; -WHERE char *Signature; WHERE char *SignOffString; WHERE char *SimpleSearch; diff --git a/init.h b/init.h index 9617d21..c74c94d 100644 --- a/init.h +++ b/init.h @@ -2760,14 +2760,6 @@ struct option_t MuttVars[] = { ** For example, Madmutt has the ability to highlight ** the signature in a different color in the builtin pager. */ - {"signature", DT_PATH, R_NONE, UL &Signature, "~/.signature"}, - /* - ** .pp - ** Specifies the filename of your signature, which is appended to all - ** outgoing messages. If the filename ends with a pipe (``\fT|\fP''), it is - ** assumed that filename is a shell command and input should be read from - ** its stdout. - */ {"signoff_string", DT_STR, R_NONE, UL &SignOffString, "" }, /* ** .pp diff --git a/lib-lua/lua-token.sh b/lib-lua/lua-token.sh index a5606e6..1692d05 100644 --- a/lib-lua/lua-token.sh +++ b/lib-lua/lua-token.sh @@ -141,6 +141,7 @@ exit 0 ## sendmail_wait ## shell ## shorthost +## signature ## spam_separator ## sysconfdir ## tmpdir diff --git a/send.c b/send.c index 4d5cd09..1c442a0 100644 --- a/send.c +++ b/send.c @@ -97,7 +97,7 @@ static void append_signature (FILE * f) fprintf (f, "\n%s", SignOffString); } - if (Signature && (tmpfp = mutt_open_read (Signature, &thepid))) { + if (tmpfp = mutt_open_read(NONULL(MAlias.signature), &thepid)) { if (option (OPTSIGDASHES)) fputs ("\n-- \n", f); else if (SignOffString) diff --git a/tools/Makefile b/tools/Makefile index 2a279aa..038ee1e 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -3,8 +3,10 @@ all: ../lib-mime/mime-token.h \ ../lib-mime/mime.li \ ../lib-lua/lua-token.h \ ../lib-lua/madmutt.li \ - ../charset.li \ - ../buffy.li + ../alias.li \ + ../buffy.li \ + ../charset.li + ../%: ; $(MAKE) -C $(@D) $(@F) -- 2.20.1