drop the builtin so called editor and the mailx feature we really dont
[apps/madmutt.git] / send.c
diff --git a/send.c b/send.c
index cf15950..82fd71a 100644 (file)
--- a/send.c
+++ b/send.c
@@ -1261,8 +1261,7 @@ int ci_send_message (int flags, /* send mode */
       msg->env->newsgroups = m_strdup(((NNTP_DATA *) ctx->data)->group);
 #endif
 
-    if (!(flags & SENDMAILX) &&
-        !(option (OPTAUTOEDIT) && option (OPTEDITHDRS)) &&
+    if (!(option (OPTAUTOEDIT) && option (OPTEDITHDRS)) &&
         !((flags & SENDREPLY) && option (OPTFASTREPLY))) {
       if (edit_envelope (msg->env, flags) == -1)
         goto cleanup;
@@ -1311,9 +1310,7 @@ int ci_send_message (int flags, /* send mode */
       process_user_header (msg->env);
 
 
-    if (option (OPTSIGONTOP)
-        && (!(flags & (SENDMAILX | SENDKEY)) && Editor
-            && m_strcmp(Editor, "builtin") != 0))
+    if (option (OPTSIGONTOP) && (!(flags & SENDKEY) && Editor))
       append_signature (tempfp);
 
     /* include replies/forwarded messages, unless we are given a template */
@@ -1321,9 +1318,7 @@ int ci_send_message (int flags, /* send mode */
         && generate_body (tempfp, msg, flags, ctx, cur) == -1)
       goto cleanup;
 
-    if (!option (OPTSIGONTOP)
-        && (!(flags & (SENDMAILX | SENDKEY)) && Editor
-            && m_strcmp(Editor, "builtin") != 0))
+    if (!option (OPTSIGONTOP) && (!(flags & SENDKEY) && Editor))
       append_signature (tempfp);
 
     /* 
@@ -1331,24 +1326,22 @@ int ci_send_message (int flags, /* send mode */
      * can take effect.
      */
 
-    if (!(flags & SENDMAILX)) {
-      if (option (OPTCRYPTAUTOSIGN))
-        msg->security |= SIGN;
-      if (option (OPTCRYPTAUTOENCRYPT))
-        msg->security |= ENCRYPT;
-      if (option (OPTCRYPTREPLYENCRYPT) && cur && (cur->security & ENCRYPT))
-        msg->security |= ENCRYPT;
-      if (option (OPTCRYPTREPLYSIGN) && cur && (cur->security & SIGN))
-        msg->security |= SIGN;
-      if (option (OPTCRYPTREPLYSIGNENCRYPTED) && cur
-          && (cur->security & ENCRYPT))
-        msg->security |= SIGN;
-      if (msg->security & (ENCRYPT | SIGN)) {
-        if (option (OPTPGPAUTOINLINE))
-          msg->security |= INLINE;
-        if (option (OPTPGPREPLYINLINE) && cur && (cur->security & INLINE))
-          msg->security |= INLINE;
-      }
+    if (option (OPTCRYPTAUTOSIGN))
+      msg->security |= SIGN;
+    if (option (OPTCRYPTAUTOENCRYPT))
+      msg->security |= ENCRYPT;
+    if (option (OPTCRYPTREPLYENCRYPT) && cur && (cur->security & ENCRYPT))
+      msg->security |= ENCRYPT;
+    if (option (OPTCRYPTREPLYSIGN) && cur && (cur->security & SIGN))
+      msg->security |= SIGN;
+    if (option (OPTCRYPTREPLYSIGNENCRYPTED) && cur
+        && (cur->security & ENCRYPT))
+      msg->security |= SIGN;
+    if (msg->security & (ENCRYPT | SIGN)) {
+      if (option (OPTPGPAUTOINLINE))
+        msg->security |= INLINE;
+      if (option (OPTPGPREPLYINLINE) && cur && (cur->security & INLINE))
+        msg->security |= INLINE;
     }
 
     if (msg->security) {
@@ -1404,11 +1397,7 @@ int ci_send_message (int flags, /* send mode */
   if (!(flags & SENDKEY))
     safe_fclose (&tempfp);
 
-  if (flags & SENDMAILX) {
-    if (mutt_builtin_editor (msg->content->filename, msg, cur) == -1)
-      goto cleanup;
-  }
-  else if (!(flags & SENDBATCH)) {
+  if (!(flags & SENDBATCH)) {
     struct stat st;
     time_t mtime = mutt_decrease_mtime (msg->content->filename, NULL);
 
@@ -1433,9 +1422,7 @@ int ci_send_message (int flags, /* send mode */
       if (mutt_needs_mailcap (msg->content)) {
         if (!mutt_edit_attachment (msg->content))
           goto cleanup;
-      } else if (!Editor || m_strcmp("builtin", Editor) == 0)
-        mutt_builtin_editor (msg->content->filename, msg, cur);
-      else if (option (OPTEDITHDRS)) {
+      } else if (option (OPTEDITHDRS)) {
         mutt_env_to_local (msg->env);
         mutt_edit_headers (Editor, msg->content->filename, msg, fcc,
                            sizeof (fcc));
@@ -1494,7 +1481,7 @@ int ci_send_message (int flags, /* send mode */
 
   mutt_update_encoding (msg->content);
 
-  if (!(flags & (SENDMAILX | SENDBATCH))) {
+  if (!(flags & SENDBATCH)) {
   main_loop:
 
     fcc_error = 0;              /* reset value since we may have failed before */
@@ -1659,7 +1646,7 @@ int ci_send_message (int flags, /* send mode */
       && (msg->content->parts != clear_content))
     free_clear_content = 1;
 
-  if (!option (OPTNOCURSES) && !(flags & SENDMAILX))
+  if (!option (OPTNOCURSES))
     mutt_message _("Sending message...");
 
   mutt_prepare_envelope (msg->env, 1);
@@ -1786,15 +1773,15 @@ int ci_send_message (int flags, /* send mode */
       goto cleanup;
     }
   }
-  else if (!option (OPTNOCURSES) && !(flags & SENDMAILX))
+  else if (!option (OPTNOCURSES))
     mutt_message (i != 0 ? _("Sending in background.") :
 #ifdef USE_NNTP
                   (flags & SENDNEWS) ? _("Article posted.") :
-                  _("Mail sent."));
+                  _("Mail sent.")
 #else
-                  _("Mail sent."));
+                  _("Mail sent.")
 #endif
-
+    );
   if (msg->security & ENCRYPT)
     p_delete(&pgpkeylist);