Ken writes:

> Hm.  I don't think we can figure out, without a lot of work, where
> to place an appropriate format instruction to include a Fcc.

Right, I don't want to change that behavior, anyway.

> I think we're all in agreement that the current behavior where it
> takes the Fcc from the replied-to message is wrong, right?  I
> can't possibly imagine that was desired behavior

How does the attached patch look?  It adds a new flag, for use by
repl with Fcc.  A test case confirms that it solves the problem.

David
diff --git a/h/fmt_scan.h b/h/fmt_scan.h
index dfd2642..c0dde84 100644
--- a/h/fmt_scan.h
+++ b/h/fmt_scan.h
@@ -48,0 +49,2 @@ struct comp {
+#define	CF_SUPPRESS   (1<<4)	/* Suppress addition of component text, e.g.,
+				   transfer from replied-to message header. */
diff --git a/sbr/fmt_compile.c b/sbr/fmt_compile.c
index c8618ed..1ef2dbd 100644
--- a/sbr/fmt_compile.c
+++ b/sbr/fmt_compile.c
@@ -1055 +1055,5 @@ fmt_addcomptext(char *component, char *text)
-	if (strcasecmp(component, cptr->c_name ? cptr->c_name : "") == 0) {
+        /* If CF_SUPPRESS is enabled, don't add the component text.  That
+           can be used to not transfer text from the header of a replied-to
+           message. */
+	if (! (cptr->c_flags & CF_SUPPRESS)  &&
+	    strcasecmp(component, cptr->c_name ? cptr->c_name : "") == 0) {
diff --git a/uip/replsbr.c b/uip/replsbr.c
index 43948bf..546d837 100644
--- a/uip/replsbr.c
+++ b/uip/replsbr.c
@@ -119 +118,0 @@ replout (FILE *inb, char *msg, char *drft, struct msgs *mp, int outputlinelen,
-    if (fcc) {
@@ -121 +120,3 @@ replout (FILE *inb, char *msg, char *drft, struct msgs *mp, int outputlinelen,
-	if (cptr)
+    if (cptr) {
+        cptr->c_flags |= CF_SUPPRESS;
+        if (fcc)
_______________________________________________
Nmh-workers mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/nmh-workers

Reply via email to