Make MAlias public. migrate $signature, so that I can test the new MCore.folder_hook...
authorPierre Habouzit <madcoder@debian.org>
Sun, 1 Apr 2007 22:41:21 +0000 (00:41 +0200)
committerPierre Habouzit <madcoder@debian.org>
Sun, 1 Apr 2007 22:41:21 +0000 (00:41 +0200)
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
alias.cpkg
alias.h
globals.h
init.h
lib-lua/lua-token.sh
send.c
tools/Makefile

index d1b536c..8823875 100644 (file)
@@ -42,7 +42,7 @@ static rx_t *Alternates = NULL, *UnAlternates = NULL;
 rx_t *MailLists = NULL, *UnMailLists = NULL;
 rx_t *SubscribedLists = NULL, *UnSubscribedLists = 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
     /*
      ** .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");
 
      */
     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);
     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 (file)
--- a/alias.h
+++ b/alias.h
 
 #include <lib-lib/lib-lib.h>
 #include <lib-lua/lib-lua.h>
 
 #include <lib-lib/lib-lib.h>
 #include <lib-lua/lib-lua.h>
+#include "alias.li"
 
 #include <lib-mime/mime.h>
 
 
 #include <lib-mime/mime.h>
 
-int luaopen_MAlias(lua_State *L);
-
 typedef struct alias_t {
     struct alias_t *next;
     char *name;
 typedef struct alias_t {
     struct alias_t *next;
     char *name;
index 7f6cf96..f015651 100644 (file)
--- a/globals.h
+++ b/globals.h
@@ -105,7 +105,6 @@ WHERE char *Realname;
 WHERE char *SidebarDelim;
 WHERE char *SidebarNumberFormat;
 WHERE char *SidebarBoundary;
 WHERE char *SidebarDelim;
 WHERE char *SidebarNumberFormat;
 WHERE char *SidebarBoundary;
-WHERE char *Signature;
 WHERE char *SignOffString;
 WHERE char *SimpleSearch;
 
 WHERE char *SignOffString;
 WHERE char *SimpleSearch;
 
diff --git a/init.h b/init.h
index 9617d21..c74c94d 100644 (file)
--- 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.
    */
    ** 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
   {"signoff_string", DT_STR, R_NONE, UL &SignOffString, "" },
   /*
    ** .pp
index a5606e6..1692d05 100644 (file)
@@ -141,6 +141,7 @@ exit 0
 ## sendmail_wait
 ## shell
 ## shorthost
 ## sendmail_wait
 ## shell
 ## shorthost
+## signature
 ## spam_separator
 ## sysconfdir
 ## tmpdir
 ## spam_separator
 ## sysconfdir
 ## tmpdir
diff --git a/send.c b/send.c
index 4d5cd09..1c442a0 100644 (file)
--- a/send.c
+++ b/send.c
@@ -97,7 +97,7 @@ static void append_signature (FILE * f)
     fprintf (f, "\n%s", SignOffString);
   }
 
     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)
     if (option (OPTSIGDASHES))
       fputs ("\n-- \n", f);
     else if (SignOffString)
index 2a279aa..038ee1e 100644 (file)
@@ -3,8 +3,10 @@ all: ../lib-mime/mime-token.h \
      ../lib-mime/mime.li      \
      ../lib-lua/lua-token.h   \
      ../lib-lua/madmutt.li    \
      ../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)
 
 
 ../%: ; $(MAKE) -C $(@D) $(@F)