2001-10-07 Per Abrahamsen <abraham@dina.kvl.dk>
authorPer Abrahamsen <abraham@dina.kvl.dk>
Sun, 7 Oct 2001 13:04:59 +0000 (13:04 +0000)
committerPer Abrahamsen <abraham@dina.kvl.dk>
Sun, 7 Oct 2001 13:04:59 +0000 (13:04 +0000)
* rfc2047.el (rfc2047-encode-message-header): Encode without
asking for null methods.

lisp/ChangeLog
lisp/rfc2047.el

index 0df8137..aab9982 100644 (file)
@@ -1,5 +1,8 @@
 2001-10-07  Per Abrahamsen  <abraham@dina.kvl.dk>
 
+       * rfc2047.el (rfc2047-encode-message-header): Encode without
+       asking for null methods.
+
        * gnus-group.el (gnus-group-name-charset-group-alist): Make utf-8
        default charset for newsgroup names in accordance with USEFOR.
 
index d8263bb..2482de5 100644 (file)
@@ -165,18 +165,29 @@ Should be called narrowed to the head of the message."
                       mail-parse-charset)
                  (mm-encode-coding-region (point-min) (point-max)
                                           mail-parse-charset)))
+            ;; We get this when CC'ing messsages to newsgroups with
+            ;; 8-bit names.  The group name mail copy just get
+            ;; unconditionally encoded.  Previously, it would ask
+            ;; whether to encode, which was quite confusing for the
+            ;; user.  If the new behaviour is wrong, tell me. I have
+            ;; left the old code commented out below.
+            ;; -- Per Abrahamsen <abraham@dina.kvl.dk> Date: 2001-10-07.
             ((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"))))
+             (when (delq 'ascii 
+                         (mm-find-charset-region (point-min) (point-max)))
+               (rfc2047-encode-region (point-min) (point-max))))
+;;;         ((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 (and (featurep 'mule)
                       (if (boundp 'default-enable-multibyte-characters)