Only ask question once when sending.
[gnus] / lisp / rfc2047.el
index cdf0269..e663384 100644 (file)
@@ -144,6 +144,18 @@ Should be called narrowed to the head of the message."
                       mail-parse-charset)
                  (mm-encode-coding-region (point-min) (point-max) 
                                           mail-parse-charset)))
+            ((null method)
+             (and (delq 'ascii 
+                        (mm-find-charset-region (point-min) 
+                                                (point-max)))
+                  (if (or (message-options-get
+                           'rfc2047-encode-message-header-encode-any) 
+                          (message-options-set
+                           'rfc2047-encode-message-header-encode-any
+                           (y-or-n-p 
+                            "Some texts are not encoded. Encode anyway?")))
+                      (rfc2047-encode-region (point-min) (point-max))
+                    (error "Cannot send unencoded text."))))
             ((mm-coding-system-p method)
              (if (featurep 'mule)
                  (mm-encode-coding-region (point-min) (point-max) method)))