]> granicus.if.org Git - neomutt/commitdiff
sync to upstream abort_noattach
authorRichard Russon <rich@flatcap.org>
Tue, 20 Mar 2018 23:26:57 +0000 (23:26 +0000)
committerRichard Russon <rich@flatcap.org>
Sun, 25 Mar 2018 22:42:43 +0000 (23:42 +0100)
34 files changed:
doc/manual.xml.head
globals.h
init.h
po/bg.po
po/ca.po
po/cs.po
po/da.po
po/de.po
po/el.po
po/en_GB.po
po/eo.po
po/es.po
po/et.po
po/eu.po
po/fr.po
po/ga.po
po/gl.po
po/hu.po
po/id.po
po/it.po
po/ja.po
po/ko.po
po/lt.po
po/nl.po
po/pl.po
po/pt_BR.po
po/ru.po
po/sk.po
po/sv.po
po/tr.po
po/uk.po
po/zh_CN.po
po/zh_TW.po
send.c

index 875ddecb9a1ba2b615d76ed0ee0cdb8a29c30df8..46672a4f616312f43558b54f7cf34da65d2782eb 100644 (file)
@@ -10782,7 +10782,7 @@ set smime_default_key = "SMIME-KEY"
             <tbody>
               <row>
                 <entry>
-                  <literal>attach_keyword</literal>
+                  <literal>abort_noattach_regex</literal>
                 </entry>
                 <entry>regular expression</entry>
                 <entry>
@@ -10813,7 +10813,7 @@ set smime_default_key = "SMIME-KEY"
 # no attachments added. This is meant to ensure that the user does not forget
 # to attach a file after promising to do so in the mail.
 
-# Ask if the user wishes to abort sending if $attach_keyword is found in the
+# Ask if the user wishes to abort sending if $abort_noattach_regex is found in the
 # body, but no attachments have been added
 # It can be set to:
 #    "yes"     : always abort
@@ -10822,13 +10822,13 @@ set smime_default_key = "SMIME-KEY"
 set abort_noattach = no
 <emphasis role="comment"># Search for the following regular expression in the body of the email
 # English: attach, attached, attachment, attachments</emphasis>
-set attach_keyword = "\\&lt;attach(|ed|ments?)\\&gt;"
+set abort_noattach_regex = "\\&lt;attach(|ed|ments?)\\&gt;"
 <emphasis role="comment"># Nederlands:
-# set attach_keyword = "\\&lt;(bijvoegen|bijgevoegd|bijlage|bijlagen)\\&gt;"
+# set abort_noattach_regex = "\\&lt;(bijvoegen|bijgevoegd|bijlage|bijlagen)\\&gt;"
 # Deutsch:
-# set attach_keyword = "\\&lt;(anhängen|angehängt|anhang|anhänge|hängt an)\\&gt;"
+# set abort_noattach_regex = "\\&lt;(anhängen|angehängt|anhang|anhänge|hängt an)\\&gt;"
 # Français:
-# set attach_keyword = "\\&lt;(attaché|attachés|attache|attachons|joint|jointe|joints|jointes|joins|joignons)\\&gt;"
+# set abort_noattach_regex = "\\&lt;(attaché|attachés|attache|attachons|joint|jointe|joints|jointes|joins|joignons)\\&gt;"
 # vim: syntax=neomuttrc</emphasis>
 </screen>
       </sect2>
index ba1792a926d5751d6f2b5d9c303f6a7dc05f6a72..293bc8764e82bde542586a01d25a4798a3fa17a4 100644 (file)
--- a/globals.h
+++ b/globals.h
@@ -109,7 +109,6 @@ WHERE char *Attribution;
 WHERE char *AttributionLocale;
 WHERE char *AttachCharset;
 WHERE char *AttachFormat;
-WHERE struct Regex *AttachKeyword;
 WHERE char *ComposeFormat;
 WHERE char *ConfigCharset;
 WHERE char *ContentType;
@@ -320,6 +319,7 @@ WHERE char *NmQueryWindowCurrentSearch;
 #endif
 
 /* These variables are backing for config items */
+WHERE struct Regex *AbortNoattachRegex;
 WHERE struct Regex *GecosMask;
 WHERE struct Regex *Mask;
 WHERE struct Regex *QuoteRegex;
diff --git a/init.h b/init.h
index 4df6113e080ea4ac0934b857e68851a5eb9a5bc1..3663e0f3604ed1d6f790b41cc0309c684263633b 100644 (file)
--- a/init.h
+++ b/init.h
@@ -92,16 +92,28 @@ struct Option MuttVars[] = {
   { "abort_noattach", DT_QUAD, R_NONE, UL &AbortNoattach, MUTT_NO },
   /*
   ** .pp
-  ** If set to \fIyes\fP, when composing messages containing the regular expression
-  ** specified by $attach_keyword and no attachments ** are given, composition
-  ** will be aborted. If set to \fIno\fP, composing ** messages as such will never
-  ** be aborted.
+  ** If set to \fIyes\fP, when composing messages containing the regular
+  ** expression specified by $$abort_noattach_regex and no attachments are
+  ** given, composition will be aborted. If set to \fIno\fP, composing messages
+  ** as such will never be aborted.
   ** .pp
   ** Example:
   ** .ts
-  ** set attach_keyword = "\\<attach(|ed|ments?)\\>"
+  ** set abort_noattach_regex = "\\<attach(|ed|ments?)\\>"
   ** .te
   */
+  { "abort_noattach_regex",  DT_REGEX,  R_NONE, UL &AbortNoattachRegex, UL "\\<(attach|attached|attachments?)\\>" },
+  /*
+  ** .pp
+  ** Specifies a regular expression to match against the body of the message, to
+  ** determine if an attachment was mentioned but mistakenly forgotten.  If it
+  ** matches, $$abort_noattach will be consulted to determine if message sending
+  ** will be aborted.
+  ** .pp
+  ** Like other regular expressions in NeoMutt, the search is case sensitive
+  ** if the pattern contains at least one upper case letter, and case
+  ** insensitive otherwise.
+  */
   { "abort_nosubject",  DT_QUAD, R_NONE, UL &AbortNosubject, MUTT_ASKYES },
   /*
   ** .pp
@@ -275,13 +287,6 @@ struct Option MuttVars[] = {
   ** .pp
   ** For an explanation of ``soft-fill'', see the $$index_format documentation.
   */
-  { "attach_keyword",  DT_REGEX,  R_NONE, UL &AttachKeyword, UL "\\<(attach|attached|attachments?)\\>" },
-  /*
-  ** .pp
-  ** If $abort_noattach is not set to no, then the body of the message
-  ** will be scanned for this regular expression, and if found, you will
-  ** be prompted if there are no attachments.
-  */
   { "attach_sep",       DT_STRING,  R_NONE, UL &AttachSep, UL "\n" },
   /*
   ** .pp
@@ -4394,6 +4399,8 @@ struct Option MuttVars[] = {
   ** (DEPRECATED) Equivalent to setting $$wrap with a negative value.
   */
 
+  { "abort_noattach_regexp",  DT_SYNONYM, R_NONE, UL "abort_noattach_regex",     0 },
+  { "attach_keyword",         DT_SYNONYM, R_NONE, UL "abort_noattach_regex",     0 },
   { "edit_hdrs",              DT_SYNONYM, R_NONE, UL "edit_headers",             0 },
   { "envelope_from",          DT_SYNONYM, R_NONE, UL "use_envelope_from",        0 },
   { "forw_decode",            DT_SYNONYM, R_NONE, UL "forward_decode",           0 },
index d7375e0b1eccdd7ced585ef7f6fbe3556b6653bd..060fc86f700b7402f2c5d29cc74ba96d313b0f7e 100644 (file)
--- a/po/bg.po
+++ b/po/bg.po
@@ -6287,7 +6287,7 @@ msgid "No attachments, cancel sending?"
 msgstr "променя кодирането на приложението"
 
 #: send.c:1944
-msgid "Message contains text matching \"$attach_keyword\". Not sending."
+msgid "Message contains text matching \"$abort_noattach_regex\". Not sending."
 msgstr ""
 
 #: send.c:2005 smtp.c:189
index c7eccd6bdb4624c764f0831813af855f291c72d6..72d1f9228486678075577e0a4b6f5867a5ce4d6f 100644 (file)
--- a/po/ca.po
+++ b/po/ca.po
@@ -6437,7 +6437,7 @@ msgid "No attachments, cancel sending?"
 msgstr "Edita la codificació de transferència d’una adjunció."
 
 #: send.c:1944
-msgid "Message contains text matching \"$attach_keyword\". Not sending."
+msgid "Message contains text matching \"$abort_noattach_regex\". Not sending."
 msgstr ""
 
 #: send.c:2005 smtp.c:189
index 7bba972394ee09995c6b4f5e009bca3c0c6c5538..d5ff4ccf44f067fafdda4839419a33b04bac0d9d 100644 (file)
--- a/po/cs.po
+++ b/po/cs.po
@@ -6023,8 +6023,8 @@ msgid "No attachments, cancel sending?"
 msgstr "Žádné přílohy, zrušit odeslání?"
 
 #: send.c:1944
-msgid "Message contains text matching \"$attach_keyword\". Not sending."
-msgstr "Zpráva obsahuje text odpovídající „$attach_keyword“. Neodesílám."
+msgid "Message contains text matching \"$abort_noattach_regex\". Not sending."
+msgstr "Zpráva obsahuje text odpovídající „$abort_noattach_regex“. Neodesílám."
 
 #: send.c:2005 smtp.c:189
 msgid "Sending message..."
index 3d6851245aac583907a53a8ad0eef5b8455a563d..bd40236183df28811bbc2268b48d4bdf13fb4f83 100644 (file)
--- a/po/da.po
+++ b/po/da.po
@@ -6081,7 +6081,7 @@ msgid "No attachments, cancel sending?"
 msgstr "ret brevdelens indkodning"
 
 #: send.c:1944
-msgid "Message contains text matching \"$attach_keyword\". Not sending."
+msgid "Message contains text matching \"$abort_noattach_regex\". Not sending."
 msgstr ""
 
 #: send.c:2005 smtp.c:189
index 45b5dde13442fe67062ddac19a6fde66fdf415f3..1b81d576415ba87c64e881419a64a23cf7128485 100644 (file)
--- a/po/de.po
+++ b/po/de.po
@@ -6060,9 +6060,9 @@ msgid "No attachments, cancel sending?"
 msgstr "Keine Anhänge vorhanden, Senden abbrechen?"
 
 #: send.c:1944
-msgid "Message contains text matching \"$attach_keyword\". Not sending."
+msgid "Message contains text matching \"$abort_noattach_regex\". Not sending."
 msgstr ""
-"Nachricht enthält, der \"$attach_keyword\" entspricht. Versand abgebrochen."
+"Nachricht enthält, der \"$abort_noattach_regex\" entspricht. Versand abgebrochen."
 
 #: send.c:2005 smtp.c:189
 msgid "Sending message..."
index 503df3613bda788a0a7a1bc7a4c28af4adc725ce..903403c77cdc87ea0bf7771e3755dd07d1b58c2d 100644 (file)
--- a/po/el.po
+++ b/po/el.po
@@ -6283,7 +6283,7 @@ msgid "No attachments, cancel sending?"
 msgstr "επεξεργασία της κωδικοποίησης-μεταφοράς της προσάρτησης"
 
 #: send.c:1944
-msgid "Message contains text matching \"$attach_keyword\". Not sending."
+msgid "Message contains text matching \"$abort_noattach_regex\". Not sending."
 msgstr ""
 
 #: send.c:2005 smtp.c:189
index bb403be2a6ae104c857f6bdb0df53d8aa405add0..3b2fe9b59bf150dc48392078f6daf2fdb2f58e9a 100644 (file)
@@ -5996,8 +5996,8 @@ msgid "No attachments, cancel sending?"
 msgstr "No attachments, cancel sending?"
 
 #: send.c:1944
-msgid "Message contains text matching \"$attach_keyword\". Not sending."
-msgstr "Message contains text matching \"$attach_keyword\". Not sending."
+msgid "Message contains text matching \"$abort_noattach_regex\". Not sending."
+msgstr "Message contains text matching \"$abort_noattach_regex\". Not sending."
 
 #: send.c:2005 smtp.c:189
 msgid "Sending message..."
index 4b219eb38a9a4e4bc9903fa6536c1cdf50e8e117..97c3b05a57f4f3fce18186d5dcbfd408f92521c1 100644 (file)
--- a/po/eo.po
+++ b/po/eo.po
@@ -6087,7 +6087,7 @@ msgid "No attachments, cancel sending?"
 msgstr "redakti kodadon de parto"
 
 #: send.c:1944
-msgid "Message contains text matching \"$attach_keyword\". Not sending."
+msgid "Message contains text matching \"$abort_noattach_regex\". Not sending."
 msgstr ""
 
 #: send.c:2005 smtp.c:189
index 99de992bfc9ae628230557466797cc0b444348d2..6b56569c3d3a8a058b4458fed7d14db08f378fc3 100644 (file)
--- a/po/es.po
+++ b/po/es.po
@@ -6315,9 +6315,9 @@ msgid "No attachments, cancel sending?"
 msgstr "editar la codificación del archivo adjunto"
 
 #: send.c:1944
-msgid "Message contains text matching \"$attach_keyword\". Not sending."
+msgid "Message contains text matching \"$abort_noattach_regex\". Not sending."
 msgstr ""
-"El mensaje contiene texto que coincide con \"$attach_keyword\". No se envía."
+"El mensaje contiene texto que coincide con \"$abort_noattach_regex\". No se envía."
 
 #: send.c:2005 smtp.c:189
 msgid "Sending message..."
index a01cf5165f617bd1f046b27cc2612b7dc85d5015..6a9ed98ef1eabff2f6d66c05088536a69b794a77 100644 (file)
--- a/po/et.po
+++ b/po/et.po
@@ -6247,7 +6247,7 @@ msgid "No attachments, cancel sending?"
 msgstr "toimeta lisa kodeeringut"
 
 #: send.c:1944
-msgid "Message contains text matching \"$attach_keyword\". Not sending."
+msgid "Message contains text matching \"$abort_noattach_regex\". Not sending."
 msgstr ""
 
 #: send.c:2005 smtp.c:189
index 45405edffd5f8b184683ac2603ade4f5620c8053..21678679e8d9e20d7548a76f8269e915b4ca0417 100644 (file)
--- a/po/eu.po
+++ b/po/eu.po
@@ -6158,7 +6158,7 @@ msgid "No attachments, cancel sending?"
 msgstr "gehigarriaren transferentzi kodifikazioa editatu"
 
 #: send.c:1944
-msgid "Message contains text matching \"$attach_keyword\". Not sending."
+msgid "Message contains text matching \"$abort_noattach_regex\". Not sending."
 msgstr ""
 
 #: send.c:2005 smtp.c:189
index 657d89f207bf9b3d930c55d40e2a9736ad5745cc..b540aee6754727cd8a9dc7f056de2f6cb313f514 100644 (file)
--- a/po/fr.po
+++ b/po/fr.po
@@ -6310,7 +6310,7 @@ msgid "No attachments, cancel sending?"
 msgstr "éditer le transfer-encoding de l'attachement"
 
 #: send.c:1944
-msgid "Message contains text matching \"$attach_keyword\". Not sending."
+msgid "Message contains text matching \"$abort_noattach_regex\". Not sending."
 msgstr ""
 
 #: send.c:2005 smtp.c:189
index 39154408729ef9e20b345e8d18ef862c1c1d36d9..f7daed562f2f2562a65784c84bf5f7fc5c22eaeb 100644 (file)
--- a/po/ga.po
+++ b/po/ga.po
@@ -6177,7 +6177,7 @@ msgid "No attachments, cancel sending?"
 msgstr "cuir transfer-encoding an iatáin in eagar"
 
 #: send.c:1944
-msgid "Message contains text matching \"$attach_keyword\". Not sending."
+msgid "Message contains text matching \"$abort_noattach_regex\". Not sending."
 msgstr ""
 
 #: send.c:2005 smtp.c:189
index 957733155e7a065ef8a480bd09ffca4a73f0e4ae..1f25dece8932b57ab4ff0d5c9cc1706a9ee4185a 100644 (file)
--- a/po/gl.po
+++ b/po/gl.po
@@ -6314,7 +6314,7 @@ msgid "No attachments, cancel sending?"
 msgstr "edita-lo \"transfer-encoding\" do adxunto"
 
 #: send.c:1944
-msgid "Message contains text matching \"$attach_keyword\". Not sending."
+msgid "Message contains text matching \"$abort_noattach_regex\". Not sending."
 msgstr ""
 
 #: send.c:2005 smtp.c:189
index 5257ee93e785f7e6ed821c48ebef1548fa590231..e628d81d4b6ced346a103e9f73585bfa605ff4b0 100644 (file)
--- a/po/hu.po
+++ b/po/hu.po
@@ -6284,7 +6284,7 @@ msgid "No attachments, cancel sending?"
 msgstr "melléklet átviteli-kódolás szerkesztése"
 
 #: send.c:1944
-msgid "Message contains text matching \"$attach_keyword\". Not sending."
+msgid "Message contains text matching \"$abort_noattach_regex\". Not sending."
 msgstr ""
 
 #: send.c:2005 smtp.c:189
index 456137d45bdc47d3329eba36018477b1bd658e06..124969c0fa76517ff9273b67278f6dcd5f27e72d 100644 (file)
--- a/po/id.po
+++ b/po/id.po
@@ -6175,7 +6175,7 @@ msgid "No attachments, cancel sending?"
 msgstr "edit transfer-encoding dari lampiran"
 
 #: send.c:1944
-msgid "Message contains text matching \"$attach_keyword\". Not sending."
+msgid "Message contains text matching \"$abort_noattach_regex\". Not sending."
 msgstr ""
 
 #: send.c:2005 smtp.c:189
index 08421fd7dc925e3e56b78f7a2d60c91e0670467a..a1fd7a72b5c01d864dbeaedee60109224e9cab33 100644 (file)
--- a/po/it.po
+++ b/po/it.po
@@ -6147,7 +6147,7 @@ msgid "No attachments, cancel sending?"
 msgstr "modifica il transfer-encoding dell'allegato"
 
 #: send.c:1944
-msgid "Message contains text matching \"$attach_keyword\". Not sending."
+msgid "Message contains text matching \"$abort_noattach_regex\". Not sending."
 msgstr ""
 
 #: send.c:2005 smtp.c:189
index cb5f130aa6bf38d6b21500b98bed554f7257cd1d..86fef6a4c64d7b2d8e78c10344ff5cc7597ad8a5 100644 (file)
--- a/po/ja.po
+++ b/po/ja.po
@@ -6083,7 +6083,7 @@ msgid "No attachments, cancel sending?"
 msgstr "添付ファイルの content-trasfer-encoding を編集"
 
 #: send.c:1944
-msgid "Message contains text matching \"$attach_keyword\". Not sending."
+msgid "Message contains text matching \"$abort_noattach_regex\". Not sending."
 msgstr ""
 
 #: send.c:2005 smtp.c:189
index 928842c4edce9eb36f7a83f54b0a0305d0ceba93..5a7aa558275d0a1a58c8b328af85767ccd365c12 100644 (file)
--- a/po/ko.po
+++ b/po/ko.po
@@ -6235,7 +6235,7 @@ msgid "No attachments, cancel sending?"
 msgstr "첨부물 전송 부호화 방법 편집"
 
 #: send.c:1944
-msgid "Message contains text matching \"$attach_keyword\". Not sending."
+msgid "Message contains text matching \"$abort_noattach_regex\". Not sending."
 msgstr ""
 
 #: send.c:2005 smtp.c:189
index fb7a45df80d9534b72448611c78a16eb5a3a3cd0..9c21e63d35b87969611167af602aed17dcd657c3 100644 (file)
--- a/po/lt.po
+++ b/po/lt.po
@@ -6265,7 +6265,7 @@ msgid "No attachments, cancel sending?"
 msgstr "Nėra priedų, atšaukti siuntimą?"
 
 #: send.c:1944
-msgid "Message contains text matching \"$attach_keyword\". Not sending."
+msgid "Message contains text matching \"$abort_noattach_regex\". Not sending."
 msgstr ""
 
 #: send.c:2005 smtp.c:189
index ede8e364f5a9a6d1a6475a74ba4c550e307c9275..070434307a26ffb14655155de15c4f2177ecfd1e 100644 (file)
--- a/po/nl.po
+++ b/po/nl.po
@@ -6105,7 +6105,7 @@ msgid "No attachments, cancel sending?"
 msgstr "bewerk de transport-codering van een bijlage"
 
 #: send.c:1944
-msgid "Message contains text matching \"$attach_keyword\". Not sending."
+msgid "Message contains text matching \"$abort_noattach_regex\". Not sending."
 msgstr ""
 
 #: send.c:2005 smtp.c:189
index 0b8f0eb59ff6217fc7a72b15aebb104f4b1c215d..ce6bca29b8147be4fb01e5b61dccff1520440c81 100644 (file)
--- a/po/pl.po
+++ b/po/pl.po
@@ -6021,7 +6021,7 @@ msgid "No attachments, cancel sending?"
 msgstr "Brak załącznika, zaniechać wysyłania?"
 
 #: send.c:1944
-msgid "Message contains text matching \"$attach_keyword\". Not sending."
+msgid "Message contains text matching \"$abort_noattach_regex\". Not sending."
 msgstr ""
 
 #: send.c:2005 smtp.c:189
index bf36279e030e124a0090e261824ea9d2884e88c4..815baf09ebabede223a10423f46454c19c5edad4 100644 (file)
@@ -6034,9 +6034,9 @@ msgid "No attachments, cancel sending?"
 msgstr "Sem anexos, cancelar envio?"
 
 #: send.c:1944
-msgid "Message contains text matching \"$attach_keyword\". Not sending."
+msgid "Message contains text matching \"$abort_noattach_regex\". Not sending."
 msgstr ""
-"Mensagem contém texto coincidindo com \"$attach_keyword\". Envio cancelado."
+"Mensagem contém texto coincidindo com \"$abort_noattach_regex\". Envio cancelado."
 
 #: send.c:2005 smtp.c:189
 msgid "Sending message..."
index a596ff340f7ff2aab1b12d14b25ee082f33e3778..5ebb3c4240e246868ef831e87b08c1030cedc998 100644 (file)
--- a/po/ru.po
+++ b/po/ru.po
@@ -6114,7 +6114,7 @@ msgid "No attachments, cancel sending?"
 msgstr "изменить транспортную кодировку для вложения"
 
 #: send.c:1944
-msgid "Message contains text matching \"$attach_keyword\". Not sending."
+msgid "Message contains text matching \"$abort_noattach_regex\". Not sending."
 msgstr ""
 
 #: send.c:2005 smtp.c:189
index fc50768705861a8a53242f18fc6ecc25388303b2..d5c5c9c2cff6cd30c56d6f6f2aa53dc19794cde4 100644 (file)
--- a/po/sk.po
+++ b/po/sk.po
@@ -6269,7 +6269,7 @@ msgid "No attachments, cancel sending?"
 msgstr "upraviť kódovanie dát prílohy"
 
 #: send.c:1944
-msgid "Message contains text matching \"$attach_keyword\". Not sending."
+msgid "Message contains text matching \"$abort_noattach_regex\". Not sending."
 msgstr ""
 
 #: send.c:2005 smtp.c:189
index 1e164626c1059c46ce5eb3ed3e9049fabd90bc56..7f79a4a12c7a2dd1ad12fcd3db3a75719d51c893 100644 (file)
--- a/po/sv.po
+++ b/po/sv.po
@@ -6163,7 +6163,7 @@ msgid "No attachments, cancel sending?"
 msgstr "redigera transportkodning för bilagan"
 
 #: send.c:1944
-msgid "Message contains text matching \"$attach_keyword\". Not sending."
+msgid "Message contains text matching \"$abort_noattach_regex\". Not sending."
 msgstr ""
 
 #: send.c:2005 smtp.c:189
index 6d316a53671ca6069d5ad9d45ababcb7e0e733dd..5ea439198ace2d24d5a81cd62cc6351507d7b774 100644 (file)
--- a/po/tr.po
+++ b/po/tr.po
@@ -6126,7 +6126,7 @@ msgid "No attachments, cancel sending?"
 msgstr "ek iletim kodlamasını (transfer-encoding) düzenle"
 
 #: send.c:1944
-msgid "Message contains text matching \"$attach_keyword\". Not sending."
+msgid "Message contains text matching \"$abort_noattach_regex\". Not sending."
 msgstr ""
 
 #: send.c:2005 smtp.c:189
index dad8dae26e273f6d743a94684c0f9aac426644be..53667ff61fb3b7718e8ae0add32f70ca07d27450 100644 (file)
--- a/po/uk.po
+++ b/po/uk.po
@@ -6072,7 +6072,7 @@ msgid "No attachments, cancel sending?"
 msgstr "змінити спосіб кодування додатку"
 
 #: send.c:1944
-msgid "Message contains text matching \"$attach_keyword\". Not sending."
+msgid "Message contains text matching \"$abort_noattach_regex\". Not sending."
 msgstr ""
 
 #: send.c:2005 smtp.c:189
index a312488b8000e4ab62fe85000a86f1fff4100115..c0241ab69502bb40047e9f5bb28aee932c723339 100644 (file)
@@ -6137,8 +6137,8 @@ msgid "No attachments, cancel sending?"
 msgstr "编辑附件的传输编码"
 
 #: send.c:1944
-msgid "Message contains text matching \"$attach_keyword\". Not sending."
-msgstr "信件内容匹配 \"$attach_keyword\". 没有发送"
+msgid "Message contains text matching \"$abort_noattach_regex\". Not sending."
+msgstr "信件内容匹配 \"$abort_noattach_regex\". 没有发送"
 
 #: send.c:2005 smtp.c:189
 msgid "Sending message..."
index 90cae2ac23555c97261a2b0de6ea51b80c60a291..18cbc71ddebebf2343fc9f460b327fbe73c814a3 100644 (file)
@@ -6300,7 +6300,7 @@ msgid "No attachments, cancel sending?"
 msgstr "編輯附件的傳輸編碼"
 
 #: send.c:1944
-msgid "Message contains text matching \"$attach_keyword\". Not sending."
+msgid "Message contains text matching \"$abort_noattach_regex\". Not sending."
 msgstr ""
 
 #: send.c:2005 smtp.c:189
diff --git a/send.c b/send.c
index cdfe6991dd02f775f57ae5ed8adbdf5dfa9febda..5c38169a96f8b8b27c8ed298e8be6d51634f38be 100644 (file)
--- a/send.c
+++ b/send.c
@@ -1229,25 +1229,25 @@ static int is_reply(struct Header *reply, struct Header *orig)
          mutt_list_find(&orig->env->in_reply_to, reply->env->message_id);
 }
 
-static int search_attach_keyword(char *filename)
+static bool search_attach_keyword(char *filename)
 {
-  /* Search for the regex in AttachKeyword within a file */
-  if (!AttachKeyword || !AttachKeyword->regex || !QuoteRegex || !QuoteRegex->regex)
-    return 0;
+  /* Search for the regex in AbortNoattachRegex within a file */
+  if (!AbortNoattachRegex || !AbortNoattachRegex->regex || !QuoteRegex || !QuoteRegex->regex)
+    return false;
 
   FILE *attf = mutt_file_fopen(filename, "r");
   if (!attf)
-    return 0;
+    return false;
 
   char *inputline = mutt_mem_malloc(LONG_STRING);
-  int found = 0;
+  bool found = false;
   while (!feof(attf))
   {
     fgets(inputline, LONG_STRING, attf);
     if (regexec(QuoteRegex->regex, inputline, 0, NULL, 0) != 0 &&
-        regexec(AttachKeyword->regex, inputline, 0, NULL, 0) == 0)
+        regexec(AbortNoattachRegex->regex, inputline, 0, NULL, 0) == 0)
     {
-      found = 1;
+      found = true;
       break;
     }
   }
@@ -1933,7 +1933,10 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile,
   }
 #endif
 
-  if (AbortNoattach != MUTT_NO && !msg->content->next &&
+  if (!(flags & SENDBATCH) &&
+      (AbortNoattach != MUTT_NO) && !msg->content->next &&
+      (msg->content->type == TYPETEXT) &&
+      (mutt_str_strcasecmp (msg->content->subtype, "plain") == 0) &&
       search_attach_keyword(msg->content->filename) &&
       query_quadoption(AbortNoattach, _("No attachments, cancel sending?")) != MUTT_NO)
   {
@@ -1941,7 +1944,7 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile,
     if (AbortNoattach == MUTT_YES)
     {
       mutt_error(_(
-          "Message contains text matching \"$attach_keyword\". Not sending."));
+          "Message contains text matching \"$abort_noattach_regex\". Not sending."));
     }
     goto main_loop;
   }