From: markus schnalke Date: Tue, 1 May 2012 12:38:44 +0000 (+0200) Subject: Bring in all of the mh-e support that is actually used X-Git-Tag: mmh-thesis-end~58 X-Git-Url: http://git.marmaro.de/?p=mmh;a=commitdiff_plain;h=a7ce7b4a580d77b6c2c4d980812beb589aa4c643;ds=sidebyside Bring in all of the mh-e support that is actually used to be compiled by default, and garbage collect the stuff that is not used. Pulled in from nmh. Thanks to Ken Hornstein. Concerning mmh only: - The FIXME comments about the missing checks for existing drafts. - mh-e support of mmh is not much more than providing the -build switches. It might get dropped in the future. --- diff --git a/INSTALL b/INSTALL index 7b375cf..14ae90f 100644 --- a/INSTALL +++ b/INSTALL @@ -131,9 +131,6 @@ Options for configure --enable-debug Enable debugging support. ---enable-mhe (DEFAULT) - Add support for the Emacs front-end `mhe'. - --with-locking=LOCKTYPE (DEFAULT is dot) Specify the locking mechanism when attempting to "inc" or "msgchk" a local mail spool. Valid options are "dot", diff --git a/configure.ac b/configure.ac index 04f23d1..3df3d8b 100644 --- a/configure.ac +++ b/configure.ac @@ -46,17 +46,6 @@ if test x"$enable_nmh_debug" = x"yes"; then enable_debug=yes fi -dnl Do you want mhe support? -AC_ARG_ENABLE(mhe, - AS_HELP_STRING([--disable-mhe],[disable mhe support])) - -dnl mhe support is on by default, so define it unless --disable-mhe or the -dnl deprecated, undocumented --disable-nmh-mhe are specified. -if test x"$enable_mhe" != x"no" -a x"$enable_nmh_mhe" != x"no"; then - AC_DEFINE(MHE, 1, - [Define to compile in support for the Emacs front-end mh-e.])dnl -fi - dnl Do you want to disable use of locale functions AH_TEMPLATE([LOCALE], [Undefine if you don't want locale features. By default this is defined.]) diff --git a/man/forw.man1 b/man/forw.man1 index 378ce70..2a2a8f3 100644 --- a/man/forw.man1 +++ b/man/forw.man1 @@ -120,20 +120,14 @@ available options. The .B \-build switch is intended to be used by the Emacs mh-e interface to -.BR nmh , -and is only present if -.B nmh -was compiled with support for mh-e. +.BR nmh . It causes a file `draft' in the mail storage root to be created, containing the draft message that would normally be presented to the user for editing. No .B whatnow program is invoked. -No mail is actually sent. Note that this switch is not guaranteed to -be present or to have the same effects in future versions of -.BR nmh : -it is documented here only for completeness. +No mail is actually sent. .PP The .B \-digest diff --git a/man/mh-profile.man5 b/man/mh-profile.man5 index df825fb..7768f7a 100644 --- a/man/mh-profile.man5 +++ b/man/mh-profile.man5 @@ -277,21 +277,6 @@ command. (context, no default) .RE .PP -.BR mhe : -.RS 5 -If present, tells -.B inc -to compose an -.I MHE -auditfile in addition to its other tasks. -.I MHE -is Brian Reid's -.B emacs -front-end for -.BR mmh . -(profile, no default) -.RE -.PP .BR Alternate\-Mailboxes : mh@uci\-750a, bug-mh* .RS 5 diff --git a/man/repl.man1 b/man/repl.man1 index 6b7c485..286ee9c 100644 --- a/man/repl.man1 +++ b/man/repl.man1 @@ -324,11 +324,7 @@ The .B \-build switch is intended to be used by the Emacs mh-e interface to -.BR nmh , -and is only present if -.B nmh -was compiled with support -for mh-e. +.BR nmh . It causes a file .I reply (in the mail storage root) to be created, containing the draft message that would normally be presented @@ -336,10 +332,7 @@ to the user for editing. No .B whatnow programm is invoked. -No mail is actually sent. Note that this switch is not guaranteed to -be present or to have the same effects in future versions of -.BR nmh : -it is documented here only for completeness. +No mail is actually sent. .PP The .B \-file diff --git a/sbr/folder_read.c b/sbr/folder_read.c index e4c1b7f..53ee8a4 100644 --- a/sbr/folder_read.c +++ b/sbr/folder_read.c @@ -102,9 +102,6 @@ folder_read(char *name) switch (dp->d_name[0]) { case '.': case ',': -#ifdef MHE - case '+': -#endif /* MHE */ continue; default: diff --git a/uip/forw.c b/uip/forw.c index fe056f4..adf0faa 100644 --- a/uip/forw.c +++ b/uip/forw.c @@ -37,12 +37,8 @@ static struct swit switches[] = { { "version", 0 }, #define HELPSW 9 { "help", 0 }, - -#ifdef MHE #define BILDSW 12 { "build", 5 }, /* interface from mhe */ -#endif /* MHE */ - { NULL, 0 } }; @@ -70,10 +66,7 @@ main(int argc, char **argv) char *form = NULL, buf[BUFSIZ], value[10]; char **argp, **arguments, *msgs[MAXARGS]; char *fmtstr; - -#ifdef MHE int buildsw = 0; -#endif /* MHE */ #ifdef LOCALE setlocale(LC_ALL, ""); @@ -122,11 +115,10 @@ main(int argc, char **argv) adios(NULL, "missing argument to %s", argp[-2]); continue; -#ifdef MHE + case BILDSW: - buildsw++; /* fall... */ + buildsw++; continue; -#endif /* MHE */ case FORMSW: if (!(form = *argp++) || *form == '-') @@ -169,13 +161,14 @@ main(int argc, char **argv) } cwd = getcpy(pwd()); - -#ifdef MHE - strncpy(drft, buildsw ? toabsdir("draft") - : m_draft(seq_beyond), sizeof(drft)); -#else - strncpy(drft, m_draft(seq_beyond), sizeof(drft)); -#endif /* MHE */ + strncpy(drft, buildsw ? toabsdir("draft") : m_draft(seq_beyond), + sizeof(drft)); + /* + ** FIXME: (concerning MHE support (buildsw) only) + ** There's no check if the draft already exists. mmh has removed + ** this case by having the draft folder. I won't add code only to + ** handle this legacy issue for MHE. -- meillo@marmaro.de 2012-05 + */ /* ** Forwarding a message. diff --git a/uip/inc.c b/uip/inc.c index 2fbb9b6..2bdb927 100644 --- a/uip/inc.c +++ b/uip/inc.c @@ -143,10 +143,6 @@ main(int argc, char **argv) /* copy of mail directory because the static gets overwritten */ char *maildir_copy = NULL; -#ifdef MHE - FILE *mhe = NULL; -#endif - done=inc_done; /* @@ -341,20 +337,6 @@ main(int argc, char **argv) dtimenow(), from); } -#ifdef MHE - if (context_find("mhe")) { - int i; - cp = concat(maildir, "/++", NULL); - i = stat(cp, &st); - if ((mhe = fopen(cp, "a")) == NULL) - admonish(cp, "unable to append to"); - else - if (i == NOTOK) - chmod(cp, m_gmprot()); - free(cp); - } -#endif /* MHE */ - /* Get new format string */ fmtstr = new_fs(form, FORMAT); @@ -415,10 +397,6 @@ main(int argc, char **argv) if (aud) fputs(scanl, aud); -#ifdef MHE - if (mhe) - fputs(scanl, mhe); -#endif /* MHE */ if (noisy) fflush(stdout); msgnum++; @@ -457,11 +435,6 @@ main(int argc, char **argv) if (aud) fclose(aud); -#ifdef MHE - if (mhe) - fclose(mhe); -#endif /* MHE */ - if (noisy) fflush(stdout); diff --git a/uip/repl.c b/uip/repl.c index 4523365..b29ae9f 100644 --- a/uip/repl.c +++ b/uip/repl.c @@ -51,10 +51,8 @@ static struct swit switches[] = { { "help", 0 }, #define FILESW 17 { "file file", 4 }, /* interface from msh */ -#ifdef MHE # define BILDSW 18 { "build", 5 }, /* interface from mhe */ -#endif { NULL, 0 } }; @@ -141,10 +139,7 @@ main(int argc, char **argv) char **argp, **arguments; struct msgs *mp = NULL; FILE *in; - -#ifdef MHE int buildsw = 0; -#endif /* MHE */ filter = getcpy(etcpath(mhlreply)); @@ -215,11 +210,10 @@ main(int argc, char **argv) adios(NULL, "missing argument to %s", argp[-2]); continue; -#ifdef MHE + case BILDSW: - buildsw++; /* fall... */ + buildsw++; continue; -#endif /* MHE */ case FILESW: if (file) @@ -286,12 +280,14 @@ main(int argc, char **argv) if (file && (msg || folder)) adios(NULL, "can't mix files and folders/msgs"); -#ifdef MHE - strncpy(drft, buildsw ? toabsdir("reply") - : m_draft(seq_beyond), sizeof(drft)); -#else - strncpy(drft, m_draft(seq_beyond), sizeof(drft)); -#endif /* MHE */ + strncpy(drft, buildsw ? toabsdir("reply") : m_draft(seq_beyond), + sizeof(drft)); + /* + ** FIXME: (concerning MHE support (buildsw) only) + ** There's no check if the draft already exists. mmh has removed + ** this case by having the draft folder. I won't add code only to + ** handle this legacy issue for MHE. -- meillo@marmaro.de 2012-05 + */ if (file) { /* diff --git a/uip/rmf.c b/uip/rmf.c index 043ecd6..77e0583 100644 --- a/uip/rmf.c +++ b/uip/rmf.c @@ -170,9 +170,6 @@ rmf(char *folder) continue; /* else fall */ case ',': -#ifdef MHE - case '+': -#endif /* MHE */ break; default: