From ee4f43cf2ef0084ec698e4e87159a94c01940622 Mon Sep 17 00:00:00 2001 From: markus schnalke Date: Mon, 30 Apr 2012 20:38:46 +0200 Subject: [PATCH] Removed -nowhatnowproc switch as it does nothing useful. The result of using it is the same as using `-whatnowproc /bin/true': The draft gets created and left in the draft folder. As a replacement exists, we surely don't need keep -nowhatnowproc. --- docs/COMPLETION-BASH | 7 +++---- docs/COMPLETION-ZSH | 4 ++-- man/comp.man1 | 11 +---------- man/dist.man1 | 10 +--------- man/forw.man1 | 17 +++++------------ man/repl.man1 | 16 +++++----------- uip/comp.c | 16 +++------------- uip/dist.c | 14 +++----------- uip/forw.c | 15 +++++---------- uip/repl.c | 21 +++++++-------------- 10 files changed, 35 insertions(+), 96 deletions(-) diff --git a/docs/COMPLETION-BASH b/docs/COMPLETION-BASH index 70ac3b2..c26783a 100644 --- a/docs/COMPLETION-BASH +++ b/docs/COMPLETION-BASH @@ -45,7 +45,7 @@ _nmh() ;; comp ) options=(-form -use -nouse - -editor -noedit -whatnowproc -nowhatnowproc + -editor -noedit -whatnowproc -version -help ) ;; flist* ) @@ -61,8 +61,7 @@ _nmh() ;; forw ) options=(-annotate -noannotate -form - -editor -noedit -whatnowproc - -nowhatnowproc -build + -editor -noedit -whatnowproc -build -version -help) ;; inc ) @@ -90,7 +89,7 @@ _nmh() options=(-annotate -noannotate -group -nogroup -cc -nocc -query -noquery -form -filter -nofilter -mime -nomime -editor -noedit -whatnowproc - -nowhatnowproc -build -file -version -help) + -build -file -version -help) ;; rmf ) options=(-interactive -nointeractive -version -help) diff --git a/docs/COMPLETION-ZSH b/docs/COMPLETION-ZSH index 70cc287..4d67d92 100644 --- a/docs/COMPLETION-ZSH +++ b/docs/COMPLETION-ZSH @@ -123,14 +123,14 @@ compctl -K mhfseq -x 's[+][@],c[-1] s[+][@]' \ -K mhcomp -S / -q - 'c[-1]' -K mhfseq - \ 'C[-1,-(editor|whatnowproc)]' -c - \ 's[-]' -k "(editor noedit \ - form use nouse whatnowproc nowhatnowproc help)" - \ + form use nouse whatnowproc help)" - \ 'c[-1,-form]' -K mhfile -- comp compctl -K mhfseq -x 's[+][@]' \ -K mhcomp -S / -q - 'c[-1]' -K mhfseq -\ 's[-]' -k "(annotate noannotate cc nocc \ editor noedit filter nofilter form group nogroup \ - query noquery width whatnowproc nowhatnowproc help)" - 'c[-1,(cc|nocc)]' \ + query noquery width whatnowproc help)" - 'c[-1,(cc|nocc)]' \ -k "(all to cc me)" - 'C[-1,-(filter|form)]' -K mhfile - \ 'C[-1,-(editor|whatnowproc)]' -c -- repl diff --git a/man/comp.man1 b/man/comp.man1 index 6258d20..f9b59db 100644 --- a/man/comp.man1 +++ b/man/comp.man1 @@ -18,7 +18,6 @@ comp \- compose a message .RB [ \-noedit ] .RB [ \-whatnowproc .IR program ] -.RB [ \-nowhatnowproc ] .RB [ \-version ] .RB [ \-help ] .ad @@ -132,15 +131,7 @@ will invoke the program. See .BR whatnow (1) for a discussion of -available options. The invocation of this program can be inhibited -by using the -.B \-nowhatnowproc -switch. (In truth of fact, it is -the -.I whatnow -program which starts the initial edit. Hence, -.B \-nowhatnowproc -will prevent any edit from occurring.) +available options. .SH FILES .fc ^ ~ diff --git a/man/dist.man1 b/man/dist.man1 index e48525f..aaaa612 100644 --- a/man/dist.man1 +++ b/man/dist.man1 @@ -18,7 +18,6 @@ dist \- redistribute a message to additional addresses .RB [ \-noedit ] .RB [ \-whatnowproc .IR program ] -.RB [ \-nowhatnowproc ] .RB [ \-version ] .RB [ \-help ] .ad @@ -107,14 +106,7 @@ will invoke the .B whatnow program. See .BR whatnow (1) -for a discussion of available options. The invocation of this -program can be inhibited by using the -.B \-nowhatnowproc -switch. (In truth of fact, it is the -.B whatnow -program which starts the initial edit. Hence, -.B \-nowhatnowproc -will prevent any edit from occurring.) +for a discussion of available options. .SH FILES .fc ^ ~ diff --git a/man/forw.man1 b/man/forw.man1 index 628942d..a970a3e 100644 --- a/man/forw.man1 +++ b/man/forw.man1 @@ -18,7 +18,6 @@ forw \- forward messages .RB [ \-noedit ] .RB [ \-whatnowproc .IR program ] -.RB [ \-nowhatnowproc ] .RB [ \-build ] .RB [ \-version ] .RB [ \-help ] @@ -119,15 +118,7 @@ will invoke the program. See .BR whatnow (1) for a discussion of -available options. The invocation of this program can be inhibited -by using the -.B \-nowhatnowproc -switch. (In truth of fact, it is -the -.I whatnow -program which starts the initial edit. Hence, -.B \-nowhatnowproc -will prevent any edit from occurring.) +available options. .PP The .B \-build @@ -135,11 +126,13 @@ 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. It implies -.BR \-nowhatnowproc . +was compiled with support for mh-e. 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 : diff --git a/man/repl.man1 b/man/repl.man1 index 26a2cdd..f8f6eb1 100644 --- a/man/repl.man1 +++ b/man/repl.man1 @@ -28,7 +28,6 @@ all/to/cc/me] .RB [ \-noedit ] .RB [ \-whatnowproc .IR program ] -.RB [ \-nowhatnowproc ] .RB [ \-build ] .RB [ \-file .IR msgfile ] @@ -322,14 +321,7 @@ will invoke the program. See .BR whatnow (1) for a discussion of available -options. The invocation of this program can be inhibited by using the -.B \-nowhatnowproc -switch. (In truth of fact, it is the -.B whatnow -program which starts the initial edit. Hence, -.B \-nowhatnowproc -will -prevent any edit from occurring.) +options. .PP The .B \-build @@ -339,12 +331,14 @@ to and is only present if .B nmh was compiled with support -for mh-e. It implies -.BR \-nowhatnowproc . +for mh-e. It causes a file .I reply (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 +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 : diff --git a/uip/comp.c b/uip/comp.c index 87953ad..cbe24d8 100644 --- a/uip/comp.c +++ b/uip/comp.c @@ -23,11 +23,9 @@ static struct swit switches[] = { { "nouse", 0 }, #define WHATSW 5 { "whatnowproc program", 0 }, -#define NWHATSW 6 - { "nowhatnowproc", 0 }, -#define VERSIONSW 7 +#define VERSIONSW 6 { "version", 0 }, -#define HELPSW 8 +#define HELPSW 7 { "help", 0 }, { NULL, 0 } }; @@ -36,7 +34,7 @@ static struct swit switches[] = { int main(int argc, char **argv) { - int use = NOUSE, nedit = 0, nwhat = 0; + int use = NOUSE, nedit = 0; int in, out; char *cp, *cwd, *maildir; char *ed = NULL, *form = NULL; @@ -86,10 +84,6 @@ main(int argc, char **argv) case WHATSW: if (!(whatnowproc = *argp++) || *whatnowproc == '-') adios(NULL, "missing argument to %s", argp[-2]); - nwhat = 0; - continue; - case NWHATSW: - nwhat++; continue; case FORMSW: @@ -176,10 +170,6 @@ main(int argc, char **argv) } context_save(); - - if (nwhat) { - done(0); - } what_now(ed, nedit, use, drft, NULL, 0, NULLMP, NULL, cwd); done(1); return 1; diff --git a/uip/dist.c b/uip/dist.c index dabfec7..b169352 100644 --- a/uip/dist.c +++ b/uip/dist.c @@ -23,11 +23,9 @@ static struct swit switches[] = { { "form formfile", 0 }, #define WHATSW 5 { "whatnowproc program", 0 }, -#define NWHATSW 6 - { "nowhatnowproc", 0 }, -#define VERSIONSW 7 +#define VERSIONSW 6 { "version", 0 }, -#define HELPSW 8 +#define HELPSW 7 { "help", 0 }, { NULL, 0 } }; @@ -37,7 +35,7 @@ int main(int argc, char **argv) { int anot = 0, nedit = 0; - int nwhat = 0, in, out; + int in, out; char *cp, *cwd, *maildir, *msgnam; char *ed = NULL, *folder = NULL; char *form = NULL, *msg = NULL, buf[BUFSIZ], drft[BUFSIZ]; @@ -94,10 +92,6 @@ main(int argc, char **argv) if (!(whatnowproc = *argp++) || *whatnowproc == '-') adios(NULL, "missing argument to %s", argp[-2]); - nwhat = 0; - continue; - case NWHATSW: - nwhat++; continue; case FORMSW: @@ -165,8 +159,6 @@ main(int argc, char **argv) seq_save(mp); /* synchronize sequences */ context_save(); - if (nwhat) - done(0); what_now(ed, nedit, NOUSE, drft, msgnam, 1, mp, anot ? "Resent" : NULL, cwd); done(1); diff --git a/uip/forw.c b/uip/forw.c index 140136a..4fbd45f 100644 --- a/uip/forw.c +++ b/uip/forw.c @@ -35,11 +35,9 @@ static struct swit switches[] = { { "volume number", 0 }, #define WHATSW 8 { "whatnowproc program", 0 }, -#define NWHATSW 9 - { "nowhatnowproc", 0 }, -#define VERSIONSW 10 +#define VERSIONSW 9 { "version", 0 }, -#define HELPSW 11 +#define HELPSW 10 { "help", 0 }, #ifdef MHE @@ -66,7 +64,7 @@ main(int argc, char **argv) { int msgp = 0, anot = 0; int issue = 0, volume = 0; - int nedit = 0, nwhat = 0, in; + int nedit = 0, in; int out, msgnum; char *cp, *cwd, *maildir; char *digest = NULL, *ed = NULL; @@ -129,15 +127,12 @@ main(int argc, char **argv) *whatnowproc == '-') adios(NULL, "missing argument to %s", argp[-2]); - nwhat = 0; continue; #ifdef MHE case BILDSW: buildsw++; /* fall... */ -#endif /* MHE */ - case NWHATSW: - nwhat++; continue; +#endif /* MHE */ case FORMSW: if (!(form = *argp++) || *form == '-') @@ -261,7 +256,7 @@ main(int argc, char **argv) seq_save(mp); /* synchronize sequences */ context_save(); /* save the context file */ - if (nwhat) + if (buildsw) done(0); what_now(ed, nedit, NOUSE, drft, NULL, 0, mp, anot ? "Forwarded" : NULL, cwd); diff --git a/uip/repl.c b/uip/repl.c index af147a1..b0956fc 100644 --- a/uip/repl.c +++ b/uip/repl.c @@ -47,20 +47,16 @@ static struct swit switches[] = { { "noquery", 0 }, #define WHATSW 15 { "whatnowproc program", 0 }, -#define NWHATSW 16 - { "nowhatnowproc", 0 }, -#define VERSIONSW 17 +#define VERSIONSW 16 { "version", 0 }, -#define HELPSW 18 +#define HELPSW 17 { "help", 0 }, -#define FILESW 19 +#define FILESW 18 { "file file", 4 }, /* interface from msh */ - #ifdef MHE -#define BILDSW 20 +# define BILDSW 19 { "build", 5 }, /* interface from mhe */ #endif - { NULL, 0 } }; @@ -141,7 +137,7 @@ int main(int argc, char **argv) { int anot = 0; - int nedit = 0, nwhat = 0; + int nedit = 0; char *cp, *cwd, *maildir, *file = NULL; char *folder = NULL, *msg = NULL; char *ed = NULL, drft[BUFSIZ], buf[BUFSIZ]; @@ -225,15 +221,12 @@ main(int argc, char **argv) *whatnowproc == '-') adios(NULL, "missing argument to %s", argp[-2]); - nwhat = 0; continue; #ifdef MHE case BILDSW: buildsw++; /* fall... */ -#endif /* MHE */ - case NWHATSW: - nwhat++; continue; +#endif /* MHE */ case FILESW: if (file) @@ -363,7 +356,7 @@ main(int argc, char **argv) replout(in, drft, mp, mime, form, filter); fclose(in); - if (nwhat) + if (buildsw) done(0); what_now(ed, nedit, NOUSE, drft, msg, 0, mp, anot ? "Replied" : NULL, cwd); -- 1.7.10.4