* gnus-draft.el (gnus-draft-send): Bind
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Wed, 19 May 2004 17:37:06 +0000 (17:37 +0000)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Wed, 19 May 2004 17:37:06 +0000 (17:37 +0000)
rfc2047-encode-encoded-words.
(rfc2047-encode-encoded-words): New variable.

lisp/ChangeLog
lisp/gnus-draft.el
lisp/rfc2047.el

index 05544bb..f73d987 100644 (file)
@@ -1,7 +1,11 @@
 2004-05-19  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
+       * gnus-draft.el (gnus-draft-send): Bind
+       rfc2047-encode-encoded-words.
+
        * rfc2047.el (rfc2047-encode-region): Encode =? strings. 
        (rfc2047-encodable-p): Say that =? needs encoding.
+       (rfc2047-encode-encoded-words): New variable.
 
        * gnus-group.el (gnus-group-select-group): Doc fix.
 
index 51f22e6..6e60a49 100644 (file)
                                   message-setup-hook))
          (gnus-agent-queue-mail (and (not is-queue)
                                      gnus-agent-queue-mail))
+        (rfc2047-encode-encoded-words nil)
          type method move-to)
     (gnus-draft-setup article (or group "nndraft:queue"))
     ;; We read the meta-information that says how and where
index b0ce5a1..b045495 100644 (file)
@@ -93,6 +93,9 @@ quoted-printable and base64 respectively.")
     (nil . ignore))
   "Alist of RFC2047 encodings to encoding functions.")
 
+(defvar rfc2047-encode-encoded-words t
+  "Whether encoded words should be encoded again.")
+
 ;;;
 ;;; Functions for encoding RFC2047 messages
 ;;;
@@ -236,7 +239,8 @@ The buffer may be narrowed."
   (let ((charsets
         (mm-find-mime-charset-region (point-min) (point-max))))
     (goto-char (point-min))
-    (or (search-forward "=?" nil t)
+    (or (and rfc2047-encode-encoded-words
+            (search-forward "=?" nil t))
        (and charsets
             (not (equal charsets (list (car message-posting-charset))))))))
 
@@ -286,7 +290,10 @@ Dynamically bind `rfc2047-encoding-type' to change that."
        ;; is relevant for instance in Subject headers with `Re:' for
        ;; interoperability with non-MIME clients, and we might as
        ;; well avoid the tail too.
-       (let ((encodable-regexp "[^\000-\177]\\|=\\?"))
+       (let ((encodable-regexp
+              (if rfc2047-encode-encoded-words
+                  "[^\000-\177]\\|=\\?"
+                "[^\000-\177]")))
          (goto-char (point-min))
          ;; Does it need encoding?
          (re-search-forward encodable-regexp (point-max) 'move)