--- compose.c	2000/03/03 10:10:07	2.32
+++ compose.c	2000/04/27 15:33:25
@@ -882,7 +882,7 @@
 	break;
 
       case OP_COMPOSE_SEND_MESSAGE:
-      
+
         if(check_attachments(idx, idxlen) != 0)
         {
 	  menu->redraw = REDRAW_FULL;
@@ -904,8 +904,38 @@
 	    *fcc = 0;
 	}
 
-	loop = 0;
-	r = 0;
+        /* davidw */
+	{
+	    int dw = 0;
+	    char scanline[1001];
+	    FILE *toscan;
+	    /* I'm not sure if hard coding the 0 is ok?  */
+	    if (idxlen < 2)
+	    {
+		toscan = fopen(idx[0]->content->filename, "r");	    
+		if (toscan == NULL)
+		    mutt_message ("Cannot open file [%s] to scan!", idx[0]->content->filename);
+		
+		while (fgets(scanline, 1000, toscan) != NULL)
+		{
+		    if (strstr(scanline, "attach") != NULL)
+		    {
+			dw = query_quadoption(OPT_FIXATTACH, "Do you want to add an attachment?");
+		    }
+		}
+		fclose(toscan);
+		
+		if (dw == M_YES) {
+		    mutt_message("Phew, good thing we caught that!");
+		} else {
+		    loop = 0;
+		    r = 0;
+		}
+	    } else {
+		loop = 0;
+		r = 0;
+	    }
+	}
 	break;
 
       case OP_COMPOSE_EDIT_FILE:
--- init.h	2000/04/26 07:32:40	2.80
+++ init.h	2000/04/27 15:33:27
@@ -100,6 +100,7 @@
 struct option_t MuttVars[] = {
   /*++*/
   { "abort_nosubject",	DT_QUAD, R_NONE, OPT_SUBJECT, M_ASKYES },
+  { "abort_fixattach",	DT_QUAD, R_NONE, OPT_FIXATTACH, M_ASKYES },
   /*
   ** .pp
   ** If set to \fIyes\fP, when composing messages and no subject is given
--- mutt.h	2000/04/26 07:32:40	2.62
+++ mutt.h	2000/04/27 15:33:28
@@ -248,6 +248,7 @@
   OPT_ABORT,
   OPT_RECALL,
   OPT_SUBJECT,
+  OPT_FIXATTACH,
   OPT_MIMEFWDREST,
   OPT_MAX
 };
