From 67411b1f95d6ec987b4c732459e1ba8a8ac192c6 Mon Sep 17 00:00:00 2001 From: markus schnalke Date: Thu, 9 Feb 2012 17:22:52 +0100 Subject: [PATCH] repl: renamed -noformat to -nofilter; removed -format; default to -filter. The new default: Filter with the default filter file. --- man/mh-chart.man1 | 4 ++-- man/repl.man1 | 48 +++++++++++++++++++++--------------------------- uip/repl.c | 45 +++++++++++++++++++++------------------------ 3 files changed, 44 insertions(+), 53 deletions(-) diff --git a/man/mh-chart.man1 b/man/mh-chart.man1 index d043d92..59263a3 100644 --- a/man/mh-chart.man1 +++ b/man/mh-chart.man1 @@ -536,9 +536,9 @@ all/to/cc/me] .RB [ \-query " | " \-noquery ] .RB [ \-form .IR formfile ] -.RB [ \-format " | " \-noformat ] .RB [ \-filter -.IR filterfile ] +.IR filterfile +.RB " | " \-nofilter ] .RB [ \-mime " | " \-nomime ] .RB [ \-editor .IR editor ] diff --git a/man/repl.man1 b/man/repl.man1 index 08b6b6b..60c54b5 100644 --- a/man/repl.man1 +++ b/man/repl.man1 @@ -19,9 +19,9 @@ all/to/cc/me] .RB [ \-query " | " \-noquery ] .RB [ \-form .IR formfile ] -.RB [ \-format " | " \-noformat ] .RB [ \-filter -.IR filterfile ] +.IR filterfile +.RB " | " \-nofilter ] .RB [ \-mime " | " \-nomime ] .RB [ \-editor .IR editor ] @@ -206,24 +206,10 @@ will invoke .B mhl to format the message to which you are replying. .PP -The switches -.BR \-noformat , -.BR \-format , -and -.B \-filter -.I filterfile -specify -which message filter file to use. -.PP -If the switch -.B \-noformat -is given (it is the default), then the message -to which you are replying is not included in the body of the draft. -.PP -If the switch -.B \-format -is given, then a default message filter file -is used. This default message filter should be adequate for most users. +By default, the original message gets filtered +through a default message filter file and then included into the draft body +as quotation. +This should be adequate for most users. This default filter .RI \*(lq mhl.reply \*(rq is: @@ -236,14 +222,14 @@ is: .PP which outputs each line of the body of the message prefaced with the \*(lq>\*(rq character and a space. -.PP If a file named .RI \*(lq mhl.reply \*(rq exists in the user's .B mmh directory, -it will be used instead of this form. You may specify an alternate -message filter file with the switch +it will be used instead of this form. +.PP +You may specify an alternate message filter file with the switch .B \-filter .IR filterfile . .PP @@ -273,12 +259,21 @@ This message filter file cites the Message-ID and author of the message being replied\-to, and then outputs each line of the body prefaced with the \*(lq>\*(rq character. .PP +If the switch +.B \-nofilter +is given, then the message +to which you are replying will not be formated and thus not included in +the body of the draft. +(It may be added as MIME attachment with +.B \-mime +though.) +.PP To MIME-attach the original message, specify the .B \-mime switch. -Note: This decision is now unrelated to the \-format and \-filter options. -It's meaning changed in the transition from nmh to mmh. -Now it is possible to have the original message quoted in the body +Note: In mmh, the \-mime switch is unrelated to +the \-filter and \-nofilter switches. +It is therefore possible to have the original message quoted in the body .B and attached as MIME part. However, using the \-mime switch is discouraged. @@ -410,7 +405,6 @@ mhbuild(1), comp(1), forw(1), send(1), whatnow(1), mh\-format(5) .RB ` \-nogroup ' .RB ` "\-nocc\ all" "' with `\-nogroup', `\-cc\ all' with `\-group'" .RB ` \-noannotate ' -.RB ` \-noformat ' .RB ` \-nomime ' .RB ` \-noquery ' .fi diff --git a/uip/repl.c b/uip/repl.c index 299185d..4e2c18a 100644 --- a/uip/repl.c +++ b/uip/repl.c @@ -33,33 +33,31 @@ static struct swit switches[] = { { "noedit", 0 }, #define FILTSW 8 { "filter filterfile", 0 }, -#define FORMSW 9 +#define NFILTSW 9 + { "nofilter", 0 }, +#define FORMSW 10 { "form formfile", 0 }, -#define FRMTSW 10 - { "format", 5 }, -#define NFRMTSW 11 - { "noformat", 7 }, -#define MIMESW 12 +#define MIMESW 11 { "mime", 0 }, -#define NMIMESW 13 +#define NMIMESW 12 { "nomime", 0 }, -#define QURYSW 14 +#define QURYSW 13 { "query", 0 }, -#define NQURYSW 15 +#define NQURYSW 14 { "noquery", 0 }, -#define WHATSW 16 +#define WHATSW 15 { "whatnowproc program", 0 }, -#define NWHATSW 17 +#define NWHATSW 16 { "nowhatnowproc", 0 }, -#define VERSIONSW 18 +#define VERSIONSW 17 { "version", 0 }, -#define HELPSW 19 +#define HELPSW 18 { "help", 0 }, -#define FILESW 20 +#define FILESW 19 { "file file", 4 }, /* interface from msh */ #ifdef MHE -#define BILDSW 21 +#define BILDSW 20 { "build", 5 }, /* interface from mhe */ #endif @@ -151,6 +149,8 @@ main(int argc, char **argv) struct msgs *mp = NULL; FILE *in; + filter = getcpy(etcpath(mhlreply)); + #ifdef MHE int buildsw = 0; #endif /* MHE */ @@ -243,22 +243,19 @@ main(int argc, char **argv) argp[-2]); file = getcpy(expanddir(cp)); continue; - case FILTSW: - if (!(cp = *argp++) || *cp == '-') - adios(NULL, "missing argument to %s", - argp[-2]); - filter = getcpy(etcpath(cp)); - continue; case FORMSW: if (!(form = *argp++) || *form == '-') adios(NULL, "missing argument to %s", argp[-2]); continue; - case FRMTSW: - filter = getcpy(etcpath(mhlreply)); + case FILTSW: + if (!(cp = *argp++) || *cp == '-') + adios(NULL, "missing argument to %s", + argp[-2]); + filter = getcpy(etcpath(cp)); continue; - case NFRMTSW: + case NFILTSW: filter = NULL; continue; -- 1.7.10.4